Documentation ¶
Index ¶
- type PolkadotNode
- func (n *PolkadotNode) ExtrinsicSign(ext extrinsic.Extrinsic, signer sr25519.Pair) (extrinsic.Extrinsic, error)
- func (n *PolkadotNode) GetBestNumber() (uint64, error)
- func (n *PolkadotNode) GetBlock(hash types.Hash) (types.Block, error)
- func (n *PolkadotNode) GetBlockHash(height uint64) (types.Hash, error)
- func (n *PolkadotNode) GetEventRecords(hash types.Hash, event types.Event) ([]events.EventRecord, error)
- func (n *PolkadotNode) GetFinalizedHead() (types.Header, error)
- func (n *PolkadotNode) GetMetadata() (types.Metadata, error)
- func (n *PolkadotNode) GetStorage(item types.StorageKey) (types.StorageData, error)
- func (n *PolkadotNode) QuerySubscribe(query query.Subscription) (query.Subscriber, error)
- func (n *PolkadotNode) SubmitExtrinsic(ext extrinsic.Extrinsic) (types.Hash, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolkadotNode ¶
PolkadotNode represents a Polkadot node
func NewPolkadotNode ¶
func NewPolkadotNode(url string) (*PolkadotNode, error)
NewPolkadotNode creates a new Polkadot node
func (*PolkadotNode) ExtrinsicSign ¶
func (n *PolkadotNode) ExtrinsicSign(ext extrinsic.Extrinsic, signer sr25519.Pair) (extrinsic.Extrinsic, error)
ExtrinsicSign signs an extrinsic
func (*PolkadotNode) GetBestNumber ¶
func (n *PolkadotNode) GetBestNumber() (uint64, error)
GetBestNumber gets the best block number
func (*PolkadotNode) GetBlockHash ¶
func (n *PolkadotNode) GetBlockHash(height uint64) (types.Hash, error)
GetBlockHash gets the hash of a block by its height
func (*PolkadotNode) GetEventRecords ¶
func (n *PolkadotNode) GetEventRecords(hash types.Hash, event types.Event) ([]events.EventRecord, error)
GetEventRecords gets the event records for a block
func (*PolkadotNode) GetFinalizedHead ¶
func (n *PolkadotNode) GetFinalizedHead() (types.Header, error)
GetFinalizedHead gets the finalized head of the chain
func (*PolkadotNode) GetMetadata ¶
func (n *PolkadotNode) GetMetadata() (types.Metadata, error)
GetMetadata gets the metadata of the chain
func (*PolkadotNode) GetStorage ¶
func (n *PolkadotNode) GetStorage(item types.StorageKey) (types.StorageData, error)
GetStorage gets the value of a storage item
func (*PolkadotNode) QuerySubscribe ¶
func (n *PolkadotNode) QuerySubscribe(query query.Subscription) (query.Subscriber, error)
QuerySubscribe subscribes to a query
func (*PolkadotNode) SubmitExtrinsic ¶
SubmitExtrinsic submits an extrinsic
Click to show internal directories.
Click to hide internal directories.