rpc

package
v0.0.0-...-78810ce Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(rpc *gsrpc.SubstrateAPI, maxDepth int, delay time.Duration) *Client

func (*Client) GetEvents

func (client *Client) GetEvents(ctx context.Context, blockHash types.Hash, extrinsicOffset int) ([]api.EventI, error)

func (*Client) GetTx

func (client *Client) GetTx(ctx context.Context, extrinsicHash string) (*Tx, error)

func (*Client) ScanBlocksForExtrinsic

func (client *Client) ScanBlocksForExtrinsic(ctx context.Context, extrinsicHash []byte) (block *types.SignedBlock, blockHash types.Hash, ext *types.Extrinsic, index int, found bool, err error)

type Event

type Event struct {
	Module string
	Event  string
	Raw    *parser.Event
}

func NewEvent

func NewEvent(raw *parser.Event) *Event

func (*Event) GetEvent

func (ev *Event) GetEvent() string

Or may just be the "name"

func (*Event) GetModule

func (ev *Event) GetModule() string

Or may be called "pallet"

func (*Event) GetParam

func (ev *Event) GetParam(name string, index int) (interface{}, bool)

type Tx

type Tx struct {
	BlockHash     types.Hash
	Block         *types.SignedBlock
	Events        []api.EventI
	Extrinsic     *types.Extrinsic
	ExtrinsicHash []byte
}

func (*Tx) Get

func (tx *Tx) Get(module, event string) (api.EventI, bool)

Jump to

Keyboard shortcuts

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