package author

import "github.com/centrifuge/go-substrate-rpc-client/v4/rpc/author"

Index

Types

type Author

type Author interface {
	SubmitAndWatchExtrinsic(xt types.Extrinsic) (*ExtrinsicStatusSubscription, error)
	PendingExtrinsics() ([]types.Extrinsic, error)
	SubmitExtrinsic(xt types.Extrinsic) (types.Hash, error)
}

func NewAuthor

func NewAuthor(cl client.Client) Author

NewAuthor creates a new author struct

type ExtrinsicStatusSubscription

type ExtrinsicStatusSubscription struct {
	// contains filtered or unexported fields
}

ExtrinsicStatusSubscription is a subscription established through one of the Client's subscribe methods.

func (*ExtrinsicStatusSubscription) Chan

Chan returns the subscription channel.

The channel is closed when Unsubscribe is called on the subscription.

func (*ExtrinsicStatusSubscription) Err

func (s *ExtrinsicStatusSubscription) Err() <-chan error

Err returns the subscription error channel. The intended use of Err is to schedule resubscription when the client connection is closed unexpectedly.

The error channel receives a value when the subscription has ended due to an error. The received error is nil if Close has been called on the underlying client and no other error has occurred.

The error channel is closed when Unsubscribe is called on the subscription.

func (*ExtrinsicStatusSubscription) Unsubscribe

func (s *ExtrinsicStatusSubscription) Unsubscribe()

Unsubscribe unsubscribes the notification and closes the error channel. It can safely be called more than once.

Source Files

author.go pending_extrinsics.go submit_and_watch_extrinsic.go submit_extrinsic.go

Directories

PathSynopsis
rpc/author/mocks
Version
v4.2.1 (latest)
Published
Dec 5, 2023
Platform
linux/amd64
Imports
7 packages
Last checked
1 week ago

Tools for package owners.