client

package
v0.0.0-...-77e7770 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtrinsicHash

func ExtrinsicHash(ext types.Extrinsic) (types.Hash, error)

Types

type SubstrateClient

type SubstrateClient struct {
	Conn    *connection.Connection
	ChainID *big.Int
	// contains filtered or unexported fields
}

func NewSubstrateClient

func NewSubstrateClient(conn *connection.Connection, key *signature.KeyringPair, chainID *big.Int, tip uint64) *SubstrateClient

func (*SubstrateClient) LatestBlock

func (c *SubstrateClient) LatestBlock() (*big.Int, error)

func (*SubstrateClient) TrackExtrinsic

func (c *SubstrateClient) TrackExtrinsic(extHash types.Hash, sub *author.ExtrinsicStatusSubscription) error

func (*SubstrateClient) Transact

func (c *SubstrateClient) Transact(method string, args ...interface{}) (types.Hash, *author.ExtrinsicStatusSubscription, error)

Transact constructs and submits an extrinsic to call the method with the given arguments. All args are passed directly into GSRPC. GSRPC types are recommended to avoid serialization inconsistencies.

Jump to

Keyboard shortcuts

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