Documentation ¶
Index ¶
- Constants
- Variables
- type BondTx
- func (tx *BondTx) AddInput(st state.AccountGetter, pubkey crypto.PublicKey, amt uint64) error
- func (tx *BondTx) AddInputWithSequence(pubkey crypto.PublicKey, amt uint64, sequence uint64) error
- func (tx *BondTx) AddOutput(addr crypto.Address, amt uint64) error
- func (tx *BondTx) GetInputs() []*TxInput
- func (tx *BondTx) String() string
- func (tx *BondTx) Type() Type
- type CallTx
- type ErrTxInvalidSequence
- type ErrTxInvalidString
- type GovernanceTx
- type NameTx
- type Payload
- type PermissionsTx
- type SendTx
- func (tx *SendTx) AddInput(st state.AccountGetter, pubkey crypto.PublicKey, amt uint64) error
- func (tx *SendTx) AddInputWithSequence(pubkey crypto.PublicKey, amt uint64, sequence uint64) error
- func (tx *SendTx) AddOutput(addr crypto.Address, amt uint64) error
- func (tx *SendTx) GetInputs() []*TxInput
- func (tx *SendTx) String() string
- func (tx *SendTx) Type() Type
- type TxInput
- type TxOutput
- type Type
- type UnbondTx
Constants ¶
View Source
const ( TypeUnknown = Type(0x00) // Account transactions TypeSend = Type(0x01) TypeCall = Type(0x02) TypeName = Type(0x03) // Validation transactions TypeBond = Type(0x11) TypeUnbond = Type(0x12) // Admin transactions TypePermissions = Type(0x21) TypeGovernance = Type(0x22) )
Types of Payload implementations
Variables ¶
View Source
var ( ErrTxInvalidAddress = errors.New("error invalid address") ErrTxDuplicateAddress = errors.New("error duplicate address") ErrTxInvalidAmount = errors.New("error invalid amount") ErrTxInsufficientFunds = errors.New("error insufficient funds") ErrTxUnknownPubKey = errors.New("error unknown pubkey") ErrTxInvalidPubKey = errors.New("error invalid pubkey") ErrTxInvalidSignature = errors.New("error invalid signature") )
Functions ¶
This section is empty.
Types ¶
type BondTx ¶
type BondTx struct { // At least one should have bond permission (even if 0 amount transfer) Inputs []*TxInput UnbondTo []*TxOutput }
func (*BondTx) AddInputWithSequence ¶
type CallTx ¶
type CallTx struct { Input *TxInput // Pointer since CallTx defines unset 'to' address as inducing account creation Address *crypto.Address GasLimit uint64 Fee uint64 // Signing normalisation needs omitempty Data binary.HexBytes `json:",omitempty"` }
func NewCallTxWithSequence ¶
type ErrTxInvalidSequence ¶
func (ErrTxInvalidSequence) Error ¶
func (e ErrTxInvalidSequence) Error() string
type ErrTxInvalidString ¶
type ErrTxInvalidString struct {
Msg string
}
func (ErrTxInvalidString) Error ¶
func (e ErrTxInvalidString) Error() string
type GovernanceTx ¶
type GovernanceTx struct { Input *TxInput AccountUpdates []spec.TemplateAccount }
func NewGovTx ¶
func NewGovTx(st state.AccountGetter, from crypto.Address, accounts ...spec.TemplateAccount) (*GovernanceTx, error)
func NewGovTxWithSequence ¶
func NewGovTxWithSequence(from crypto.Address, sequence uint64, accounts []spec.TemplateAccount) *GovernanceTx
func (*GovernanceTx) GetInputs ¶
func (tx *GovernanceTx) GetInputs() []*TxInput
func (*GovernanceTx) String ¶
func (tx *GovernanceTx) String() string
func (*GovernanceTx) Type ¶
func (tx *GovernanceTx) Type() Type
type PermissionsTx ¶
func NewPermissionsTx ¶
func NewPermissionsTx(st state.AccountGetter, from crypto.PublicKey, args snatives.PermArgs) (*PermissionsTx, error)
func (*PermissionsTx) GetInputs ¶
func (tx *PermissionsTx) GetInputs() []*TxInput
func (*PermissionsTx) String ¶
func (tx *PermissionsTx) String() string
func (*PermissionsTx) Type ¶
func (tx *PermissionsTx) Type() Type
type TxInput ¶
func (*TxInput) ValidateBasic ¶
type TxOutput ¶
func (*TxOutput) ValidateBasic ¶
type Type ¶
type Type int8
func TxTypeFromString ¶
func (Type) MarshalText ¶
func (*Type) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.