Documentation
¶
Index ¶
- type ChainContext
- type ChainState
- type GenesisTx
- type Transaction
- type TxBase
- func (tx *TxBase) Apply(ctx ChainContext, cs ChainState) error
- func (tx *TxBase) Bytes() []byte
- func (tx *TxBase) Gas() uint64
- func (tx *TxBase) ID() ids.ID32
- func (tx *TxBase) LD() *ld.Transaction
- func (tx *TxBase) MarshalJSON() ([]byte, error)
- func (tx *TxBase) SyntacticVerify() error
- func (tx *TxBase) Type() ld.TxType
- type TxBorrow
- type TxCloseLending
- type TxCreateData
- type TxCreateModel
- type TxCreateStake
- type TxCreateToken
- type TxDeleteData
- type TxDestroyStake
- type TxDestroyToken
- type TxEth
- type TxExchange
- type TxOpenLending
- type TxPunish
- type TxRepay
- type TxResetStake
- type TxTakeStake
- type TxTest
- type TxTransfer
- type TxTransferCash
- type TxTransferMultiple
- type TxTransferPay
- type TxUpdateAccountInfo
- type TxUpdateData
- type TxUpdateDataInfo
- type TxUpdateDataInfoByAuth
- type TxUpdateModelInfo
- type TxUpdateNonceTable
- type TxUpdateStakeApprover
- type TxUpgradeData
- type TxWithdrawStake
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainContext ¶
type ChainState ¶
type ChainState interface { Height() uint64 Timestamp() uint64 LoadAccount(ids.Address) (*acct.Account, error) LoadLedger(*acct.Account) error LoadModel(ids.ModelID) (*ld.ModelInfo, error) SaveModel(*ld.ModelInfo) error LoadData(ids.DataID) (*ld.DataInfo, error) SaveData(*ld.DataInfo) error SavePrevData(*ld.DataInfo) error DeleteData(*ld.DataInfo, []byte) error SaveName(*service.Name) error DeleteName(*service.Name) error }
type GenesisTx ¶
type GenesisTx interface {
ApplyGenesis(ctx ChainContext, cs ChainState) error
}
type Transaction ¶
type Transaction interface { LD() *ld.Transaction ID() ids.ID32 Type() ld.TxType Gas() uint64 Bytes() []byte SyntacticVerify() error Apply(ctx ChainContext, cs ChainState) error MarshalJSON() ([]byte, error) }
func NewGenesisTx ¶
func NewGenesisTx(tx *ld.Transaction) (Transaction, error)
func NewTx ¶
func NewTx(tx *ld.Transaction) (Transaction, error)
NewTx returns a stateful transaction from a ld.Transaction.
type TxBase ¶
type TxBase struct {
// contains filtered or unexported fields
}
func (*TxBase) Apply ¶
func (tx *TxBase) Apply(ctx ChainContext, cs ChainState) error
call after SyntacticVerify
func (*TxBase) LD ¶
func (tx *TxBase) LD() *ld.Transaction
func (*TxBase) MarshalJSON ¶
func (*TxBase) SyntacticVerify ¶
type TxBorrow ¶
type TxBorrow struct { TxBase // contains filtered or unexported fields }
func (*TxBorrow) Apply ¶
func (tx *TxBorrow) Apply(ctx ChainContext, cs ChainState) error
func (*TxBorrow) MarshalJSON ¶
func (*TxBorrow) SyntacticVerify ¶
type TxCloseLending ¶
type TxCloseLending struct {
TxBase
}
func (*TxCloseLending) Apply ¶
func (tx *TxCloseLending) Apply(ctx ChainContext, cs ChainState) error
func (*TxCloseLending) SyntacticVerify ¶
func (tx *TxCloseLending) SyntacticVerify() error
type TxCreateData ¶
type TxCreateData struct { TxBase // contains filtered or unexported fields }
func (*TxCreateData) Apply ¶
func (tx *TxCreateData) Apply(ctx ChainContext, cs ChainState) error
func (*TxCreateData) ApplyGenesis ¶
func (tx *TxCreateData) ApplyGenesis(ctx ChainContext, cs ChainState) error
ApplyGenesis skipping signature verification
func (*TxCreateData) MarshalJSON ¶
func (tx *TxCreateData) MarshalJSON() ([]byte, error)
func (*TxCreateData) SyntacticVerify ¶
func (tx *TxCreateData) SyntacticVerify() error
TxCreateData{ID, Version, Threshold, Keepers, Data} no model keepers TxCreateData{ID, Version, To, Amount, Threshold, Keepers, Data, Expire} with model keepers
type TxCreateModel ¶
type TxCreateModel struct { TxBase // contains filtered or unexported fields }
func (*TxCreateModel) Apply ¶
func (tx *TxCreateModel) Apply(ctx ChainContext, cs ChainState) error
func (*TxCreateModel) ApplyGenesis ¶
func (tx *TxCreateModel) ApplyGenesis(ctx ChainContext, cs ChainState) error
ApplyGenesis skipping signature verification
func (*TxCreateModel) MarshalJSON ¶
func (tx *TxCreateModel) MarshalJSON() ([]byte, error)
func (*TxCreateModel) SyntacticVerify ¶
func (tx *TxCreateModel) SyntacticVerify() error
type TxCreateStake ¶
type TxCreateStake struct { TxBase // contains filtered or unexported fields }
func (*TxCreateStake) Apply ¶
func (tx *TxCreateStake) Apply(ctx ChainContext, cs ChainState) error
func (*TxCreateStake) MarshalJSON ¶
func (tx *TxCreateStake) MarshalJSON() ([]byte, error)
func (*TxCreateStake) SyntacticVerify ¶
func (tx *TxCreateStake) SyntacticVerify() error
type TxCreateToken ¶
type TxCreateToken struct { TxBase // contains filtered or unexported fields }
func (*TxCreateToken) Apply ¶
func (tx *TxCreateToken) Apply(ctx ChainContext, cs ChainState) error
func (*TxCreateToken) ApplyGenesis ¶
func (tx *TxCreateToken) ApplyGenesis(ctx ChainContext, cs ChainState) error
ApplyGenesis skipping signature verification
func (*TxCreateToken) MarshalJSON ¶
func (tx *TxCreateToken) MarshalJSON() ([]byte, error)
func (*TxCreateToken) SyntacticVerify ¶
func (tx *TxCreateToken) SyntacticVerify() error
type TxDeleteData ¶
type TxDeleteData struct { TxBase // contains filtered or unexported fields }
func (*TxDeleteData) Apply ¶
func (tx *TxDeleteData) Apply(ctx ChainContext, cs ChainState) error
func (*TxDeleteData) MarshalJSON ¶
func (tx *TxDeleteData) MarshalJSON() ([]byte, error)
func (*TxDeleteData) SyntacticVerify ¶
func (tx *TxDeleteData) SyntacticVerify() error
type TxDestroyStake ¶
type TxDestroyStake struct {
TxBase
}
func (*TxDestroyStake) Apply ¶
func (tx *TxDestroyStake) Apply(ctx ChainContext, cs ChainState) error
func (*TxDestroyStake) SyntacticVerify ¶
func (tx *TxDestroyStake) SyntacticVerify() error
type TxDestroyToken ¶
type TxDestroyToken struct {
TxBase
}
func (*TxDestroyToken) Apply ¶
func (tx *TxDestroyToken) Apply(ctx ChainContext, cs ChainState) error
func (*TxDestroyToken) SyntacticVerify ¶
func (tx *TxDestroyToken) SyntacticVerify() error
type TxEth ¶
type TxEth struct { TxBase // contains filtered or unexported fields }
func (*TxEth) SyntacticVerify ¶
type TxExchange ¶
type TxExchange struct { TxBase // contains filtered or unexported fields }
func (*TxExchange) Apply ¶
func (tx *TxExchange) Apply(ctx ChainContext, cs ChainState) error
func (*TxExchange) MarshalJSON ¶
func (tx *TxExchange) MarshalJSON() ([]byte, error)
func (*TxExchange) SyntacticVerify ¶
func (tx *TxExchange) SyntacticVerify() error
type TxOpenLending ¶
type TxOpenLending struct { TxBase // contains filtered or unexported fields }
func (*TxOpenLending) Apply ¶
func (tx *TxOpenLending) Apply(ctx ChainContext, cs ChainState) error
func (*TxOpenLending) MarshalJSON ¶
func (tx *TxOpenLending) MarshalJSON() ([]byte, error)
func (*TxOpenLending) SyntacticVerify ¶
func (tx *TxOpenLending) SyntacticVerify() error
type TxPunish ¶
type TxPunish struct { TxBase // contains filtered or unexported fields }
func (*TxPunish) Apply ¶
func (tx *TxPunish) Apply(ctx ChainContext, cs ChainState) error
func (*TxPunish) MarshalJSON ¶
func (*TxPunish) SyntacticVerify ¶
type TxRepay ¶
type TxRepay struct {
TxBase
}
func (*TxRepay) Apply ¶
func (tx *TxRepay) Apply(ctx ChainContext, cs ChainState) error
func (*TxRepay) SyntacticVerify ¶
type TxResetStake ¶
type TxResetStake struct { TxBase // contains filtered or unexported fields }
func (*TxResetStake) Apply ¶
func (tx *TxResetStake) Apply(ctx ChainContext, cs ChainState) error
func (*TxResetStake) MarshalJSON ¶
func (tx *TxResetStake) MarshalJSON() ([]byte, error)
func (*TxResetStake) SyntacticVerify ¶
func (tx *TxResetStake) SyntacticVerify() error
type TxTakeStake ¶
type TxTakeStake struct { TxBase // contains filtered or unexported fields }
func (*TxTakeStake) Apply ¶
func (tx *TxTakeStake) Apply(ctx ChainContext, cs ChainState) error
func (*TxTakeStake) MarshalJSON ¶
func (tx *TxTakeStake) MarshalJSON() ([]byte, error)
func (*TxTakeStake) SyntacticVerify ¶
func (tx *TxTakeStake) SyntacticVerify() error
type TxTest ¶
type TxTest struct { TxBase // contains filtered or unexported fields }
func (*TxTest) Apply ¶
func (tx *TxTest) Apply(ctx ChainContext, cs ChainState) error
call after SyntacticVerify
func (*TxTest) MarshalJSON ¶
func (*TxTest) SyntacticVerify ¶
type TxTransfer ¶
type TxTransfer struct {
TxBase
}
func (*TxTransfer) ApplyGenesis ¶
func (tx *TxTransfer) ApplyGenesis(ctx ChainContext, cs ChainState) error
ApplyGenesis skipping signature verification
func (*TxTransfer) SyntacticVerify ¶
func (tx *TxTransfer) SyntacticVerify() error
type TxTransferCash ¶
type TxTransferCash struct { TxBase // contains filtered or unexported fields }
func (*TxTransferCash) Apply ¶
func (tx *TxTransferCash) Apply(ctx ChainContext, cs ChainState) error
func (*TxTransferCash) MarshalJSON ¶
func (tx *TxTransferCash) MarshalJSON() ([]byte, error)
func (*TxTransferCash) SyntacticVerify ¶
func (tx *TxTransferCash) SyntacticVerify() error
type TxTransferMultiple ¶
type TxTransferMultiple struct { TxBase // contains filtered or unexported fields }
func (*TxTransferMultiple) Apply ¶
func (tx *TxTransferMultiple) Apply(ctx ChainContext, cs ChainState) error
Apply skipping signature verification
func (*TxTransferMultiple) MarshalJSON ¶
func (tx *TxTransferMultiple) MarshalJSON() ([]byte, error)
func (*TxTransferMultiple) SyntacticVerify ¶
func (tx *TxTransferMultiple) SyntacticVerify() error
type TxTransferPay ¶
type TxTransferPay struct { TxBase // contains filtered or unexported fields }
func (*TxTransferPay) Apply ¶
func (tx *TxTransferPay) Apply(ctx ChainContext, cs ChainState) error
func (*TxTransferPay) MarshalJSON ¶
func (tx *TxTransferPay) MarshalJSON() ([]byte, error)
func (*TxTransferPay) SyntacticVerify ¶
func (tx *TxTransferPay) SyntacticVerify() error
type TxUpdateAccountInfo ¶
type TxUpdateAccountInfo struct { TxBase // contains filtered or unexported fields }
func (*TxUpdateAccountInfo) Apply ¶
func (tx *TxUpdateAccountInfo) Apply(ctx ChainContext, cs ChainState) error
func (*TxUpdateAccountInfo) ApplyGenesis ¶
func (tx *TxUpdateAccountInfo) ApplyGenesis(ctx ChainContext, cs ChainState) error
ApplyGenesis skipping signature verification
func (*TxUpdateAccountInfo) MarshalJSON ¶
func (tx *TxUpdateAccountInfo) MarshalJSON() ([]byte, error)
func (*TxUpdateAccountInfo) SyntacticVerify ¶
func (tx *TxUpdateAccountInfo) SyntacticVerify() error
type TxUpdateData ¶
type TxUpdateData struct { TxBase // contains filtered or unexported fields }
func (*TxUpdateData) Apply ¶
func (tx *TxUpdateData) Apply(ctx ChainContext, cs ChainState) error
func (*TxUpdateData) MarshalJSON ¶
func (tx *TxUpdateData) MarshalJSON() ([]byte, error)
func (*TxUpdateData) SyntacticVerify ¶
func (tx *TxUpdateData) SyntacticVerify() error
type TxUpdateDataInfo ¶
type TxUpdateDataInfo struct { TxBase // contains filtered or unexported fields }
func (*TxUpdateDataInfo) Apply ¶
func (tx *TxUpdateDataInfo) Apply(ctx ChainContext, cs ChainState) error
func (*TxUpdateDataInfo) MarshalJSON ¶
func (tx *TxUpdateDataInfo) MarshalJSON() ([]byte, error)
func (*TxUpdateDataInfo) SyntacticVerify ¶
func (tx *TxUpdateDataInfo) SyntacticVerify() error
type TxUpdateDataInfoByAuth ¶
type TxUpdateDataInfoByAuth struct { TxBase // contains filtered or unexported fields }
func (*TxUpdateDataInfoByAuth) Apply ¶
func (tx *TxUpdateDataInfoByAuth) Apply(ctx ChainContext, cs ChainState) error
func (*TxUpdateDataInfoByAuth) MarshalJSON ¶
func (tx *TxUpdateDataInfoByAuth) MarshalJSON() ([]byte, error)
func (*TxUpdateDataInfoByAuth) SyntacticVerify ¶
func (tx *TxUpdateDataInfoByAuth) SyntacticVerify() error
type TxUpdateModelInfo ¶
type TxUpdateModelInfo struct { TxBase // contains filtered or unexported fields }
func (*TxUpdateModelInfo) Apply ¶
func (tx *TxUpdateModelInfo) Apply(ctx ChainContext, cs ChainState) error
func (*TxUpdateModelInfo) MarshalJSON ¶
func (tx *TxUpdateModelInfo) MarshalJSON() ([]byte, error)
func (*TxUpdateModelInfo) SyntacticVerify ¶
func (tx *TxUpdateModelInfo) SyntacticVerify() error
type TxUpdateNonceTable ¶
type TxUpdateNonceTable struct { TxBase // contains filtered or unexported fields }
func (*TxUpdateNonceTable) Apply ¶
func (tx *TxUpdateNonceTable) Apply(ctx ChainContext, cs ChainState) error
func (*TxUpdateNonceTable) MarshalJSON ¶
func (tx *TxUpdateNonceTable) MarshalJSON() ([]byte, error)
func (*TxUpdateNonceTable) SyntacticVerify ¶
func (tx *TxUpdateNonceTable) SyntacticVerify() error
ApplyGenesis skipping signature verification
type TxUpdateStakeApprover ¶
type TxUpdateStakeApprover struct { TxBase // contains filtered or unexported fields }
func (*TxUpdateStakeApprover) Apply ¶
func (tx *TxUpdateStakeApprover) Apply(ctx ChainContext, cs ChainState) error
func (*TxUpdateStakeApprover) MarshalJSON ¶
func (tx *TxUpdateStakeApprover) MarshalJSON() ([]byte, error)
func (*TxUpdateStakeApprover) SyntacticVerify ¶
func (tx *TxUpdateStakeApprover) SyntacticVerify() error
type TxUpgradeData ¶
type TxUpgradeData struct { TxBase // contains filtered or unexported fields }
func (*TxUpgradeData) Apply ¶
func (tx *TxUpgradeData) Apply(ctx ChainContext, cs ChainState) error
func (*TxUpgradeData) MarshalJSON ¶
func (tx *TxUpgradeData) MarshalJSON() ([]byte, error)
func (*TxUpgradeData) SyntacticVerify ¶
func (tx *TxUpgradeData) SyntacticVerify() error
type TxWithdrawStake ¶
type TxWithdrawStake struct { TxBase // contains filtered or unexported fields }
func (*TxWithdrawStake) Apply ¶
func (tx *TxWithdrawStake) Apply(ctx ChainContext, cs ChainState) error
func (*TxWithdrawStake) MarshalJSON ¶
func (tx *TxWithdrawStake) MarshalJSON() ([]byte, error)
func (*TxWithdrawStake) SyntacticVerify ¶
func (tx *TxWithdrawStake) SyntacticVerify() error
Source Files
¶
- chain.go
- transaction.go
- tx_account_lending_borrow.go
- tx_account_lending_close.go
- tx_account_lending_open.go
- tx_account_lending_repay.go
- tx_account_staking_approver.go
- tx_account_staking_create.go
- tx_account_staking_destroy.go
- tx_account_staking_reset.go
- tx_account_staking_take.go
- tx_account_staking_withdraw.go
- tx_account_token_create.go
- tx_account_token_destroy.go
- tx_account_update_info.go
- tx_account_update_noncetable.go
- tx_base.go
- tx_data_create.go
- tx_data_delete.go
- tx_data_update.go
- tx_data_update_info.go
- tx_data_update_info_by_auth.go
- tx_data_upgrade.go
- tx_model_create.go
- tx_model_update_info.go
- tx_punish.go
- tx_test_tx.go
- tx_transfer.go
- tx_transfer_cash.go
- tx_transfer_eth.go
- tx_transfer_exchange.go
- tx_transfer_multiple.go
- tx_transfer_pay.go
Click to show internal directories.
Click to hide internal directories.