Documentation
¶
Index ¶
- Constants
- func GetBlockHash(client client.Client, blockNumber uint64) (types.Hash, error)
- func GetBlockHashLatest(client client.Client) (types.Hash, error)
- func GetFinalizedHead(client client.Client) (types.Hash, error)
- func GetHeader(client1 client.Client, blockHash types.Hash) (*header.Header, error)
- func GetHeaderLatest(client1 client.Client) (*header.Header, error)
- func SubmitExtrinsic(xt extrinsic.Extrinsic, client client.Client) (types.Hash, error)
- type ArbitraryMessage
- type Block
- type BoundedData
- type Cell
- type DataProof
- type ExtrinsicStatusSubscription
- type FungibleToken
- type GDataProof
- type GProof
- type Message
- type ProofResponse
- type SignedBlock
- type TxDataRoot
Constants ¶
const BoundedDataMaxLen = 32 // Adjust the maximum length as needed
BoundedDataMaxLen is the maximum length for the bounded data
const MaxCells = 10000
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArbitraryMessage ¶
type ArbitraryMessage struct {
BoundedData
}
ArbitraryMessage struct represents the ArbitraryMessage variant
type BoundedData ¶
type BoundedData struct {
Data []byte
}
type DataProof ¶
type DataProof struct { Roots TxDataRoot Proof []types.Hash NumberOfLeaves uint32 // Change to uint32 to match Rust u32 LeafIndex uint32 // Change to uint32 to match Rust u32 Leaf types.Hash }
DataProof struct represents the data proof response
type ExtrinsicStatusSubscription ¶
type ExtrinsicStatusSubscription struct {
// contains filtered or unexported fields
}
func SubmitAndWatchExtrinsic ¶
func SubmitAndWatchExtrinsic(xt extrinsic.Extrinsic, client client.Client) (*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 (*ExtrinsicStatusSubscription) Chan ¶
func (s *ExtrinsicStatusSubscription) Chan() <-chan types.ExtrinsicStatus
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.
type FungibleToken ¶
FungibleToken struct represents the FungibleToken variant
type GDataProof ¶
type GDataProof struct { RawScalar big.Int `json:"RawScalar"` // For U256 Proof GProof `json:"Proof"` }
func (*GDataProof) MarshalJSON ¶
func (g *GDataProof) MarshalJSON() ([]byte, error)
func (*GDataProof) UnmarshalJSON ¶
func (g *GDataProof) UnmarshalJSON(data []byte) error
type Message ¶
type Message interface {
// contains filtered or unexported methods
}
Message interface represents the enum variants
type ProofResponse ¶
type SignedBlock ¶
type SignedBlock struct { Block Block `json:"block"` Justification types.Justification `json:"justification"` }
func GetAvailBlock ¶
GetBlock returns the header and body of the relay chain block with the given hash
func GetAvailBlockLatest ¶
func GetAvailBlockLatest(client1 client.Client) (*SignedBlock, error)