author

package
v2.0.0-alpha.5+incompa... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

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

Author exposes methods for authoring of network items

func NewAuthor

func NewAuthor(cl client.Client) *Author

NewAuthor creates a new Author struct

func (*Author) PendingExtrinsics

func (a *Author) PendingExtrinsics() ([]types.Extrinsic, error)

PendingExtrinsics returns all pending extrinsics, potentially grouped by sender

func (*Author) SubmitAndWatchExtrinsic

func (a *Author) SubmitAndWatchExtrinsic(xt types.Extrinsic) (*ExtrinsicStatusSubscription, error)

SubmitAndWatchExtrinsic will submit and subscribe to watch an extrinsic until unsubscribed, returning a subscription that will receive server notifications containing the extrinsic status updates.

func (*Author) SubmitExtrinsic

func (a *Author) SubmitExtrinsic(xt types.Extrinsic) (types.Hash, error)

SubmitExtrinsic will submit a fully formatted extrinsic for block inclusion

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL