Documentation
¶
Index ¶
- Constants
- func DecodeCall(buffer *bytes.Buffer) primitives.Call
- type Block
- type CheckedExtrinsic
- type UncheckedExtrinsic
- func DecodeUncheckedExtrinsic(buffer *bytes.Buffer) UncheckedExtrinsic
- func NewSignedUncheckedExtrinsic(function primitives.Call, address primitives.MultiAddress, ...) UncheckedExtrinsic
- func NewUncheckedExtrinsic(function primitives.Call, signedData sc.Option[primitives.ExtrinsicSignature]) UncheckedExtrinsic
- func NewUnsignedUncheckedExtrinsic(function primitives.Call) UncheckedExtrinsic
Constants ¶
View Source
const ( // ExtrinsicFormatVersion is the current version of the [`UncheckedExtrinsic`] encoded format. // // This version needs to be bumped if the encoded representation changes. // It ensures that if the representation is changed and the format is not known, // the decoding fails. ExtrinsicFormatVersion = 4 ExtrinsicBitSigned = 0b1000_0000 ExtrinsicUnmaskVersion = 0b0111_1111 )
Variables ¶
This section is empty.
Functions ¶
func DecodeCall ¶
func DecodeCall(buffer *bytes.Buffer) primitives.Call
Types ¶
type Block ¶
type Block struct {
Header types.Header
Extrinsics sc.Sequence[UncheckedExtrinsic]
}
func DecodeBlock ¶
type CheckedExtrinsic ¶
type CheckedExtrinsic struct {
Version sc.U8
// Who this purports to be from and the number of extrinsics have come before
// from the same signer, if anyone (note this is not a signature).
Signed sc.Option[primitives.AccountIdExtra]
Function primitives.Call
}
CheckedExtrinsic is the definition of something that the external world might want to say; its existence implies that it has been checked and is good, particularly with regards to the signature.
TODO: make it generic generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
func (CheckedExtrinsic) Bytes ¶
func (cxt CheckedExtrinsic) Bytes() []byte
func (CheckedExtrinsic) Encode ¶
func (cxt CheckedExtrinsic) Encode(buffer *bytes.Buffer)
type UncheckedExtrinsic ¶
type UncheckedExtrinsic struct {
Version sc.U8
// The signature, address, number of extrinsics have come before from
// the same signer and an era describing the longevity of this transaction,
// if this is a signed extrinsic.
Signature sc.Option[primitives.ExtrinsicSignature]
Function primitives.Call
}
func DecodeUncheckedExtrinsic ¶
func DecodeUncheckedExtrinsic(buffer *bytes.Buffer) UncheckedExtrinsic
func NewSignedUncheckedExtrinsic ¶
func NewSignedUncheckedExtrinsic(function primitives.Call, address primitives.MultiAddress, signature primitives.MultiSignature, extra primitives.SignedExtra) UncheckedExtrinsic
NewSignedUncheckedExtrinsic returns a new instance of a signed extrinsic.
func NewUncheckedExtrinsic ¶
func NewUncheckedExtrinsic(function primitives.Call, signedData sc.Option[primitives.ExtrinsicSignature]) UncheckedExtrinsic
func NewUnsignedUncheckedExtrinsic ¶
func NewUnsignedUncheckedExtrinsic(function primitives.Call) UncheckedExtrinsic
NewUnsignedUncheckedExtrinsic returns a new instance of an unsigned extrinsic.
func (UncheckedExtrinsic) Bytes ¶
func (uxt UncheckedExtrinsic) Bytes() []byte
func (UncheckedExtrinsic) Encode ¶
func (uxt UncheckedExtrinsic) Encode(buffer *bytes.Buffer)
func (UncheckedExtrinsic) IsSigned ¶
func (uxt UncheckedExtrinsic) IsSigned() sc.Bool
func (UncheckedExtrinsic) UnmaskedVersion ¶
func (uxt UncheckedExtrinsic) UnmaskedVersion() sc.U8
Click to show internal directories.
Click to hide internal directories.