Documentation
¶
Overview ¶
Copyright 2020 ChainSafe Systems (ON) Corp. This file is part of gossamer.
The gossamer library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The gossamer library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the gossamer library. If not, see <http://www.gnu.org/licenses/>.
Index ¶
Constants ¶
const ( AuthoritiesChangeType = 0 TransferType = 1 IncludeDataType = 2 StorageChangeType = 3 )
nolint
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthoritiesChangeExt ¶
type AuthoritiesChangeExt struct {
// contains filtered or unexported fields
}
AuthoritiesChangeExt represents an Extrinsic::AuthoritiesChange
func NewAuthoritiesChangeExt ¶
func NewAuthoritiesChangeExt(authorityIDs [][32]byte) *AuthoritiesChangeExt
NewAuthoritiesChangeExt returns an AuthoritiesChangeExt
func (*AuthoritiesChangeExt) Decode ¶
func (e *AuthoritiesChangeExt) Decode(r io.Reader) error
Decode decodes the SCALE encoding into a AuthoritiesChangeExt
func (*AuthoritiesChangeExt) Encode ¶
func (e *AuthoritiesChangeExt) Encode() ([]byte, error)
Encode returns the SCALE encoding of the AuthoritiesChangeExt
func (*AuthoritiesChangeExt) Type ¶
func (e *AuthoritiesChangeExt) Type() int
Type returns AuthoritiesChangeType
type Function ¶ added in v0.2.0
type Function struct { Pall Pallet PallFunc PalletFunction FuncCallData interface{} }
Function struct to represent extrinsic call function
type IncludeDataExt ¶
type IncludeDataExt struct {
// contains filtered or unexported fields
}
IncludeDataExt represents an Extrinsic::IncludeData
func NewIncludeDataExt ¶
func NewIncludeDataExt(data []byte) *IncludeDataExt
NewIncludeDataExt returns a IncludeDataExt
func (*IncludeDataExt) Decode ¶
func (e *IncludeDataExt) Decode(r io.Reader) error
Decode decodes the SCALE encoding into a IncludeDataExt
func (*IncludeDataExt) Encode ¶
func (e *IncludeDataExt) Encode() ([]byte, error)
Encode returns the SCALE encoding of the IncludeDataExt
type PalletFunction ¶ added in v0.2.0
type PalletFunction byte
PalletFunction for function index within pallet
const ( PB_Transfer PalletFunction = iota PB_Set_balance PB_Force_transfer PB_Transfer_keep_alive )
pallet_balances function index
const ( SYS_fill_block PalletFunction = iota SYS_remark SYS_set_heap_pages SYS_set_code SYS_set_storage SYS_kill_storage SYS_kill_prefix )
pallet_system function index
const (
SESS_set_keys PalletFunction = iota
)
session function index
type StorageChangeExt ¶
type StorageChangeExt struct {
// contains filtered or unexported fields
}
StorageChangeExt represents an Extrinsic::StorageChange
func NewStorageChangeExt ¶
func NewStorageChangeExt(key []byte, value *optional.Bytes) *StorageChangeExt
NewStorageChangeExt returns a StorageChangesExt
func (*StorageChangeExt) Decode ¶
func (e *StorageChangeExt) Decode(r io.Reader) error
Decode decodes the SCALE encoding into a StorageChangeExt
func (*StorageChangeExt) Encode ¶
func (e *StorageChangeExt) Encode() ([]byte, error)
Encode returns the SCALE encoding of the StorageChangeExt
func (*StorageChangeExt) Key ¶
func (e *StorageChangeExt) Key() []byte
Key returns the extrinsic's key
func (*StorageChangeExt) Type ¶
func (e *StorageChangeExt) Type() int
Type returns StorageChangeType
func (*StorageChangeExt) Value ¶
func (e *StorageChangeExt) Value() *optional.Bytes
Value returns the extrinsic's value
type Transfer ¶
type Transfer struct {
// contains filtered or unexported fields
}
Transfer represents a runtime Transfer
func NewTransfer ¶
NewTransfer returns a Transfer
func (*Transfer) AsSignedExtrinsic ¶
func (t *Transfer) AsSignedExtrinsic(key *sr25519.PrivateKey) (*TransferExt, error)
AsSignedExtrinsic returns a TransferExt that includes the transfer and a signature.
type TransferExt ¶
type TransferExt struct {
// contains filtered or unexported fields
}
TransferExt represents an Extrinsic::Transfer
func NewTransferExt ¶
func NewTransferExt(transfer *Transfer, signature [sr25519.SignatureLength]byte) *TransferExt
NewTransferExt returns a TransferExt
func (*TransferExt) Decode ¶
func (e *TransferExt) Decode(r io.Reader) error
Decode decodes the SCALE encoding into a TransferExt
func (*TransferExt) Encode ¶
func (e *TransferExt) Encode() ([]byte, error)
Encode returns the SCALE encoding of the TransferExt
type UncheckedExtrinsic ¶ added in v0.2.0
UncheckedExtrinsic generic implementation of pre-verification extrinsic
func CreateUncheckedExtrinsic ¶ added in v0.2.0
func CreateUncheckedExtrinsic(fnc *Function, index *big.Int, signer crypto.Keypair, additional interface{}) (*UncheckedExtrinsic, error)
CreateUncheckedExtrinsic builds UncheckedExtrinsic given function interface, index, genesisHash and Keypair
func CreateUncheckedExtrinsicUnsigned ¶ added in v0.2.0
func CreateUncheckedExtrinsicUnsigned(fnc *Function) (*UncheckedExtrinsic, error)
CreateUncheckedExtrinsicUnsigned to build unsigned extrinsic
func (*UncheckedExtrinsic) Encode ¶ added in v0.2.0
func (ux *UncheckedExtrinsic) Encode() ([]byte, error)
Encode scale encode UncheckedExtrinsic