Documentation ¶
Index ¶
- Variables
- type AssetDefinition
- type BaseTx
- func (t *BaseTx) AssetIDs() ids.Set
- func (t *BaseTx) ExecuteWithSideEffects(_ *VM, batch database.Batch) error
- func (t *BaseTx) InputUTXOs() []*ava.UTXOID
- func (t *BaseTx) NumCredentials() int
- func (t *BaseTx) SemanticVerify(vm *VM, uTx *UniqueTx, creds []verify.Verifiable) error
- func (t *BaseTx) SyntacticVerify(ctx *snow.Context, c codec.Codec, _ int) error
- func (t *BaseTx) UTXOs() []*ava.UTXO
- type BuildGenesisArgs
- type BuildGenesisReply
- type CreateAddressArgs
- type CreateAddressReply
- type CreateAssetTx
- type CreateFixedCapAssetArgs
- type CreateFixedCapAssetReply
- type CreateMintTxArgs
- type CreateMintTxReply
- type CreateVariableCapAssetArgs
- type CreateVariableCapAssetReply
- type ExportAVAArgs
- type ExportAVAReply
- type ExportKeyArgs
- type ExportKeyReply
- type ExportTx
- type Factory
- type Fx
- type FxOperation
- type Genesis
- type GenesisAsset
- type GetAssetDescriptionArgs
- type GetAssetDescriptionReply
- type GetBalanceArgs
- type GetBalanceReply
- type GetTxStatusArgs
- type GetTxStatusReply
- type GetUTXOsArgs
- type GetUTXOsReply
- type Holder
- type ImportAVAArgs
- type ImportAVAReply
- type ImportKeyArgs
- type ImportKeyReply
- type ImportTx
- func (t *ImportTx) AssetIDs() ids.Set
- func (t *ImportTx) ExecuteWithSideEffects(vm *VM, batch database.Batch) error
- func (t *ImportTx) InputUTXOs() []*ava.UTXOID
- func (t *ImportTx) NumCredentials() int
- func (t *ImportTx) SemanticVerify(vm *VM, uTx *UniqueTx, creds []verify.Verifiable) error
- func (t *ImportTx) SyntacticVerify(ctx *snow.Context, c codec.Codec, numFxs int) error
- type InitialState
- type IssueTxArgs
- type IssueTxReply
- type Operation
- type OperationTx
- func (t *OperationTx) AssetIDs() ids.Set
- func (t *OperationTx) InputUTXOs() []*ava.UTXOID
- func (t *OperationTx) NumCredentials() int
- func (t *OperationTx) Operations() []*Operation
- func (t *OperationTx) SemanticVerify(vm *VM, uTx *UniqueTx, creds []verify.Verifiable) error
- func (t *OperationTx) SyntacticVerify(ctx *snow.Context, c codec.Codec, numFxs int) error
- func (t *OperationTx) UTXOs() []*ava.UTXO
- type Owners
- type SendArgs
- type SendReply
- type Service
- func (service *Service) CreateAddress(r *http.Request, args *CreateAddressArgs, reply *CreateAddressReply) error
- func (service *Service) CreateFixedCapAsset(r *http.Request, args *CreateFixedCapAssetArgs, ...) error
- func (service *Service) CreateMintTx(r *http.Request, args *CreateMintTxArgs, reply *CreateMintTxReply) error
- func (service *Service) CreateVariableCapAsset(r *http.Request, args *CreateVariableCapAssetArgs, ...) error
- func (service *Service) ExportAVA(_ *http.Request, args *ExportAVAArgs, reply *ExportAVAReply) error
- func (service *Service) ExportKey(r *http.Request, args *ExportKeyArgs, reply *ExportKeyReply) error
- func (service *Service) GetAssetDescription(_ *http.Request, args *GetAssetDescriptionArgs, ...) error
- func (service *Service) GetBalance(r *http.Request, args *GetBalanceArgs, reply *GetBalanceReply) error
- func (service *Service) GetTxStatus(r *http.Request, args *GetTxStatusArgs, reply *GetTxStatusReply) error
- func (service *Service) GetUTXOs(r *http.Request, args *GetUTXOsArgs, reply *GetUTXOsReply) error
- func (service *Service) ImportAVA(_ *http.Request, args *ImportAVAArgs, reply *ImportAVAReply) error
- func (service *Service) ImportKey(r *http.Request, args *ImportKeyArgs, reply *ImportKeyReply) error
- func (service *Service) IssueTx(r *http.Request, args *IssueTxArgs, reply *IssueTxReply) error
- func (service *Service) Send(r *http.Request, args *SendArgs, reply *SendReply) error
- func (service *Service) SignMintTx(r *http.Request, args *SignMintTxArgs, reply *SignMintTxReply) error
- type SignMintTxArgs
- type SignMintTxReply
- type StaticService
- type Tx
- type TxState
- type UniqueTx
- func (tx *UniqueTx) Accept()
- func (tx *UniqueTx) Bytes() []byte
- func (tx *UniqueTx) Dependencies() []snowstorm.Tx
- func (tx *UniqueTx) Evict()
- func (tx *UniqueTx) ID() ids.ID
- func (tx *UniqueTx) InputIDs() ids.Set
- func (tx *UniqueTx) InputUTXOs() []*ava.UTXOID
- func (tx *UniqueTx) Reject()
- func (tx *UniqueTx) SemanticVerify() error
- func (tx *UniqueTx) Status() choices.Status
- func (tx *UniqueTx) SyntacticVerify() error
- func (tx *UniqueTx) UTXOs() []*ava.UTXO
- func (tx *UniqueTx) UnsignedBytes() []byte
- func (tx *UniqueTx) Verify() error
- type UnsignedTx
- type VM
- func (vm *VM) Clock() *timer.Clock
- func (vm *VM) Codec() codec.Codec
- func (vm *VM) CreateHandlers() map[string]*common.HTTPHandler
- func (vm *VM) CreateStaticHandlers() map[string]*common.HTTPHandler
- func (vm *VM) FlushTxs()
- func (vm *VM) Format(b []byte) string
- func (vm *VM) GetAtomicUTXOs(addrs ids.Set) ([]*ava.UTXO, error)
- func (vm *VM) GetTx(txID ids.ID) (snowstorm.Tx, error)
- func (vm *VM) GetUTXOs(addrs ids.Set) ([]*ava.UTXO, error)
- func (vm *VM) Initialize(ctx *snow.Context, db database.Database, genesisBytes []byte, ...) error
- func (vm *VM) IssueTx(b []byte, onDecide func(choices.Status)) (ids.ID, error)
- func (vm *VM) Logger() logging.Logger
- func (vm *VM) Parse(addrStr string) ([]byte, error)
- func (vm *VM) ParseTx(b []byte) (snowstorm.Tx, error)
- func (vm *VM) PendingTxs() []snowstorm.Tx
- func (vm *VM) Shutdown()
Constants ¶
This section is empty.
Variables ¶
var (
ID = ids.NewID([32]byte{'a', 'v', 'm'})
)
ID that this VM uses when labeled
Functions ¶
This section is empty.
Types ¶
type AssetDefinition ¶
type AssetDefinition struct { Name string `json:"name"` Symbol string `json:"symbol"` Denomination cjson.Uint8 `json:"denomination"` InitialState map[string][]interface{} `json:"initialState"` }
AssetDefinition ...
type BaseTx ¶
type BaseTx struct { ava.Metadata NetID uint32 `serialize:"true" json:"networkID"` // ID of the network this chain lives on BCID ids.ID `serialize:"true" json:"blockchainID"` // ID of the chain on which this transaction exists (prevents replay attacks) Outs []*ava.TransferableOutput `serialize:"true" json:"outputs"` // The outputs of this transaction Ins []*ava.TransferableInput `serialize:"true" json:"inputs"` // The inputs to this transaction }
BaseTx is the basis of all transactions.
func (*BaseTx) ExecuteWithSideEffects ¶
ExecuteWithSideEffects writes the batch with any additional side effects
func (*BaseTx) InputUTXOs ¶
InputUTXOs track which UTXOs this transaction is consuming.
func (*BaseTx) NumCredentials ¶
NumCredentials returns the number of expected credentials
func (*BaseTx) SemanticVerify ¶
SemanticVerify that this transaction is valid to be spent.
func (*BaseTx) SyntacticVerify ¶
SyntacticVerify that this transaction is well-formed.
type BuildGenesisArgs ¶
type BuildGenesisArgs struct {
GenesisData map[string]AssetDefinition `json:"genesisData"`
}
BuildGenesisArgs are arguments for BuildGenesis
type BuildGenesisReply ¶
type BuildGenesisReply struct {
Bytes formatting.CB58 `json:"bytes"`
}
BuildGenesisReply is the reply from BuildGenesis
type CreateAddressArgs ¶
type CreateAddressArgs struct { Username string `json:"username"` Password string `json:"password"` }
CreateAddressArgs are arguments for calling CreateAddress
type CreateAddressReply ¶
type CreateAddressReply struct {
Address string `json:"address"`
}
CreateAddressReply define the reply from a CreateAddress call
type CreateAssetTx ¶
type CreateAssetTx struct { BaseTx `serialize:"true"` Name string `serialize:"true" json:"name"` Symbol string `serialize:"true" json:"symbol"` Denomination byte `serialize:"true" json:"denomination"` States []*InitialState `serialize:"true" json:"initialStates"` }
CreateAssetTx is a transaction that creates a new asset.
func (*CreateAssetTx) InitialStates ¶
func (t *CreateAssetTx) InitialStates() []*InitialState
InitialStates track which virtual machines, and the initial state of these machines, this asset uses. The returned array should not be modified.
func (*CreateAssetTx) SyntacticVerify ¶
SyntacticVerify that this transaction is well-formed.
func (*CreateAssetTx) UTXOs ¶
func (t *CreateAssetTx) UTXOs() []*ava.UTXO
UTXOs returns the UTXOs transaction is producing.
type CreateFixedCapAssetArgs ¶
type CreateFixedCapAssetArgs struct { Username string `json:"username"` Password string `json:"password"` Name string `json:"name"` Symbol string `json:"symbol"` Denomination byte `json:"denomination"` InitialHolders []*Holder `json:"initialHolders"` }
CreateFixedCapAssetArgs are arguments for passing into CreateFixedCapAsset requests
type CreateFixedCapAssetReply ¶
CreateFixedCapAssetReply defines the CreateFixedCapAsset replies returned from the API
type CreateMintTxArgs ¶
type CreateMintTxArgs struct { Amount json.Uint64 `json:"amount"` AssetID string `json:"assetID"` To string `json:"to"` Minters []string `json:"minters"` }
CreateMintTxArgs are arguments for passing into CreateMintTx requests
type CreateMintTxReply ¶
type CreateMintTxReply struct {
Tx formatting.CB58 `json:"tx"`
}
CreateMintTxReply defines the CreateMintTx replies returned from the API
type CreateVariableCapAssetArgs ¶
type CreateVariableCapAssetArgs struct { Username string `json:"username"` Password string `json:"password"` Name string `json:"name"` Symbol string `json:"symbol"` Denomination byte `json:"denomination"` MinterSets []Owners `json:"minterSets"` }
CreateVariableCapAssetArgs are arguments for passing into CreateVariableCapAsset requests
type CreateVariableCapAssetReply ¶
CreateVariableCapAssetReply defines the CreateVariableCapAsset replies returned from the API
type ExportAVAArgs ¶
type ExportAVAArgs struct { // User providing exported AVA Username string `json:"username"` Password string `json:"password"` // Amount of nAVA to send Amount json.Uint64 `json:"amount"` // ID of P-Chain account that will receive the AVA To ids.ShortID `json:"to"` }
ExportAVAArgs are arguments for passing into ExportAVA requests
type ExportAVAReply ¶
ExportAVAReply defines the Send replies returned from the API
type ExportKeyArgs ¶
type ExportKeyArgs struct { Username string `json:"username"` Password string `json:"password"` Address string `json:"address"` }
ExportKeyArgs are arguments for ExportKey
type ExportKeyReply ¶
type ExportKeyReply struct { // The decrypted PrivateKey for the Address provided in the arguments PrivateKey formatting.CB58 `json:"privateKey"` }
ExportKeyReply is the response for ExportKey
type ExportTx ¶
type ExportTx struct { BaseTx `serialize:"true"` Outs []*ava.TransferableOutput `serialize:"true" json:"exportedOutputs"` // The outputs this transaction is sending to the other chain }
ExportTx is the basis of all transactions.
func (*ExportTx) ExecuteWithSideEffects ¶
ExecuteWithSideEffects writes the batch with any additional side effects
func (*ExportTx) SemanticVerify ¶
SemanticVerify that this transaction is valid to be spent.
type Fx ¶
type Fx interface { // Initialize this feature extension to be running under this VM. Should // return an error if the VM is incompatible. Initialize(vm interface{}) error // VerifyTransfer verifies that the specified transaction can spend the // provided utxo with no restrictions on the destination. If the transaction // can't spend the output based on the input and credential, a non-nil error // should be returned. VerifyTransfer(tx, in, cred, utxo interface{}) error // VerifyOperation verifies that the specified transaction can spend the // provided utxos conditioned on the result being restricted to the provided // outputs. If the transaction can't spend the output based on the input and // credential, a non-nil error should be returned. VerifyOperation(tx, op, cred interface{}, utxos []interface{}) error }
Fx is the interface a feature extension must implement to support the AVM.
type FxOperation ¶
type FxOperation interface { verify.Verifiable Outs() []verify.Verifiable }
FxOperation ...
type Genesis ¶
type Genesis struct {
Txs []*GenesisAsset `serialize:"true"`
}
Genesis ...
func (*Genesis) IsSortedAndUnique ¶
IsSortedAndUnique ...
type GenesisAsset ¶
type GenesisAsset struct { Alias string `serialize:"true"` CreateAssetTx `serialize:"true"` }
GenesisAsset ...
type GetAssetDescriptionArgs ¶
type GetAssetDescriptionArgs struct {
AssetID string `json:"assetID"`
}
GetAssetDescriptionArgs are arguments for passing into GetAssetDescription requests
type GetAssetDescriptionReply ¶
type GetAssetDescriptionReply struct { AssetID ids.ID `json:"assetID"` Name string `json:"name"` Symbol string `json:"symbol"` Denomination json.Uint8 `json:"denomination"` }
GetAssetDescriptionReply defines the GetAssetDescription replies returned from the API
type GetBalanceArgs ¶
GetBalanceArgs are arguments for passing into GetBalance requests
type GetBalanceReply ¶
GetBalanceReply defines the GetBalance replies returned from the API
type GetTxStatusArgs ¶
GetTxStatusArgs are arguments for passing into GetTxStatus requests
type GetTxStatusReply ¶
GetTxStatusReply defines the GetTxStatus replies returned from the API
type GetUTXOsArgs ¶
type GetUTXOsArgs struct {
Addresses []string `json:"addresses"`
}
GetUTXOsArgs are arguments for passing into GetUTXOs requests
type GetUTXOsReply ¶
type GetUTXOsReply struct {
UTXOs []formatting.CB58 `json:"utxos"`
}
GetUTXOsReply defines the GetUTXOs replies returned from the API
type ImportAVAArgs ¶
type ImportAVAArgs struct { // User that controls To Username string `json:"username"` Password string `json:"password"` // Address receiving the imported AVA To string `json:"to"` }
ImportAVAArgs are arguments for passing into ImportAVA requests
type ImportAVAReply ¶
ImportAVAReply defines the ImportAVA replies returned from the API
type ImportKeyArgs ¶
type ImportKeyArgs struct { Username string `json:"username"` Password string `json:"password"` PrivateKey formatting.CB58 `json:"privateKey"` }
ImportKeyArgs are arguments for ImportKey
type ImportKeyReply ¶
type ImportKeyReply struct { // The address controlled by the PrivateKey provided in the arguments Address string `json:"address"` }
ImportKeyReply is the response for ImportKey
type ImportTx ¶
type ImportTx struct { BaseTx `serialize:"true"` Ins []*ava.TransferableInput `serialize:"true" json:"importedInputs"` // The inputs to this transaction }
ImportTx is a transaction that imports an asset from another blockchain.
func (*ImportTx) ExecuteWithSideEffects ¶
ExecuteWithSideEffects writes the batch with any additional side effects
func (*ImportTx) InputUTXOs ¶
InputUTXOs track which UTXOs this transaction is consuming.
func (*ImportTx) NumCredentials ¶
NumCredentials returns the number of expected credentials
func (*ImportTx) SemanticVerify ¶
SemanticVerify that this transaction is well-formed.
type InitialState ¶
type InitialState struct { FxID uint32 `serialize:"true" json:"fxID"` Outs []verify.Verifiable `serialize:"true" json:"outputs"` }
InitialState ...
type IssueTxArgs ¶
type IssueTxArgs struct {
Tx formatting.CB58 `json:"tx"`
}
IssueTxArgs are arguments for passing into IssueTx requests
type IssueTxReply ¶
IssueTxReply defines the IssueTx replies returned from the API
type Operation ¶
type Operation struct { ava.Asset `serialize:"true"` UTXOIDs []*ava.UTXOID `serialize:"true" json:"inputIDs"` Op FxOperation `serialize:"true" json:"operation"` }
Operation ...
type OperationTx ¶
type OperationTx struct { BaseTx `serialize:"true"` Ops []*Operation `serialize:"true" json:"operations"` }
OperationTx is a transaction with no credentials.
func (*OperationTx) AssetIDs ¶
func (t *OperationTx) AssetIDs() ids.Set
AssetIDs returns the IDs of the assets this transaction depends on
func (*OperationTx) InputUTXOs ¶
func (t *OperationTx) InputUTXOs() []*ava.UTXOID
InputUTXOs track which UTXOs this transaction is consuming.
func (*OperationTx) NumCredentials ¶
func (t *OperationTx) NumCredentials() int
NumCredentials returns the number of expected credentials
func (*OperationTx) Operations ¶
func (t *OperationTx) Operations() []*Operation
Operations track which ops this transaction is performing. The returned array should not be modified.
func (*OperationTx) SemanticVerify ¶
func (t *OperationTx) SemanticVerify(vm *VM, uTx *UniqueTx, creds []verify.Verifiable) error
SemanticVerify that this transaction is well-formed.
func (*OperationTx) SyntacticVerify ¶
SyntacticVerify that this transaction is well-formed.
func (*OperationTx) UTXOs ¶
func (t *OperationTx) UTXOs() []*ava.UTXO
UTXOs returns the UTXOs transaction is producing.
type SendArgs ¶
type SendArgs struct { Username string `json:"username"` Password string `json:"password"` Amount json.Uint64 `json:"amount"` AssetID string `json:"assetID"` To string `json:"to"` }
SendArgs are arguments for passing into Send requests
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service defines the base service for the asset vm
func (*Service) CreateAddress ¶
func (service *Service) CreateAddress(r *http.Request, args *CreateAddressArgs, reply *CreateAddressReply) error
CreateAddress creates an address for the user [args.Username]
func (*Service) CreateFixedCapAsset ¶
func (service *Service) CreateFixedCapAsset(r *http.Request, args *CreateFixedCapAssetArgs, reply *CreateFixedCapAssetReply) error
CreateFixedCapAsset returns ID of the newly created asset
func (*Service) CreateMintTx ¶
func (service *Service) CreateMintTx(r *http.Request, args *CreateMintTxArgs, reply *CreateMintTxReply) error
CreateMintTx returns the newly created unsigned transaction
func (*Service) CreateVariableCapAsset ¶
func (service *Service) CreateVariableCapAsset(r *http.Request, args *CreateVariableCapAssetArgs, reply *CreateVariableCapAssetReply) error
CreateVariableCapAsset returns ID of the newly created asset
func (*Service) ExportAVA ¶
func (service *Service) ExportAVA(_ *http.Request, args *ExportAVAArgs, reply *ExportAVAReply) error
ExportAVA sends AVA from this chain to the P-Chain. After this tx is accepted, the AVA must be imported to the P-chain with an importTx. Returns the ID of the newly created atomic transaction
func (*Service) ExportKey ¶
func (service *Service) ExportKey(r *http.Request, args *ExportKeyArgs, reply *ExportKeyReply) error
ExportKey returns a private key from the provided user
func (*Service) GetAssetDescription ¶
func (service *Service) GetAssetDescription(_ *http.Request, args *GetAssetDescriptionArgs, reply *GetAssetDescriptionReply) error
GetAssetDescription creates an empty account with the name passed in
func (*Service) GetBalance ¶
func (service *Service) GetBalance(r *http.Request, args *GetBalanceArgs, reply *GetBalanceReply) error
GetBalance returns the amount of an asset that an address at least partially owns
func (*Service) GetTxStatus ¶
func (service *Service) GetTxStatus(r *http.Request, args *GetTxStatusArgs, reply *GetTxStatusReply) error
GetTxStatus returns the status of the specified transaction
func (*Service) GetUTXOs ¶
func (service *Service) GetUTXOs(r *http.Request, args *GetUTXOsArgs, reply *GetUTXOsReply) error
GetUTXOs creates an empty account with the name passed in
func (*Service) ImportAVA ¶
func (service *Service) ImportAVA(_ *http.Request, args *ImportAVAArgs, reply *ImportAVAReply) error
ImportAVA imports AVA to this chain from the P-Chain. The AVA must have already been exported from the P-Chain. Returns the ID of the newly created atomic transaction
func (*Service) ImportKey ¶
func (service *Service) ImportKey(r *http.Request, args *ImportKeyArgs, reply *ImportKeyReply) error
ImportKey adds a private key to the provided user
func (*Service) IssueTx ¶
func (service *Service) IssueTx(r *http.Request, args *IssueTxArgs, reply *IssueTxReply) error
IssueTx attempts to issue a transaction into consensus
func (*Service) SignMintTx ¶
func (service *Service) SignMintTx(r *http.Request, args *SignMintTxArgs, reply *SignMintTxReply) error
SignMintTx returns the newly signed transaction
type SignMintTxArgs ¶
type SignMintTxArgs struct { Username string `json:"username"` Password string `json:"password"` Minter string `json:"minter"` Tx formatting.CB58 `json:"tx"` }
SignMintTxArgs are arguments for passing into SignMintTx requests
type SignMintTxReply ¶
type SignMintTxReply struct {
Tx formatting.CB58 `json:"tx"`
}
SignMintTxReply defines the SignMintTx replies returned from the API
type StaticService ¶
type StaticService struct{}
StaticService defines the base service for the asset vm
func (*StaticService) BuildGenesis ¶
func (*StaticService) BuildGenesis(_ *http.Request, args *BuildGenesisArgs, reply *BuildGenesisReply) error
BuildGenesis returns the UTXOs such that at least one address in [args.Addresses] is referenced in the UTXO.
type Tx ¶
type Tx struct { UnsignedTx `serialize:"true" json:"unsignedTx"` Creds []verify.Verifiable `serialize:"true" json:"credentials"` // The credentials of this transaction }
Tx is the core operation that can be performed. The tx uses the UTXO model. Specifically, a txs inputs will consume previous txs outputs. A tx will be valid if the inputs have the authority to consume the outputs they are attempting to consume and the inputs consume sufficient state to produce the outputs.
func (*Tx) Credentials ¶
func (t *Tx) Credentials() []verify.Verifiable
Credentials describes the authorization that allows the Inputs to consume the specified UTXOs. The returned array should not be modified.
func (*Tx) SemanticVerify ¶
SemanticVerify verifies that this transaction is well-formed.
type UniqueTx ¶
type UniqueTx struct { *TxState // contains filtered or unexported fields }
UniqueTx provides a de-duplication service for txs. This only provides a performance boost
func (*UniqueTx) Accept ¶
func (tx *UniqueTx) Accept()
Accept is called when the transaction was finalized as accepted by consensus
func (*UniqueTx) Dependencies ¶
Dependencies returns the set of transactions this transaction builds on
func (*UniqueTx) Evict ¶
func (tx *UniqueTx) Evict()
Evict is called when this UniqueTx will no longer be returned from a cache lookup
func (*UniqueTx) InputUTXOs ¶
InputUTXOs returns the utxos that will be consumed on tx acceptance
func (*UniqueTx) Reject ¶
func (tx *UniqueTx) Reject()
Reject is called when the transaction was finalized as rejected by consensus
func (*UniqueTx) SemanticVerify ¶
SemanticVerify the validity of this transaction
func (*UniqueTx) SyntacticVerify ¶
SyntacticVerify verifies that this transaction is well formed
func (*UniqueTx) UTXOs ¶
UTXOs returns the utxos that will be added to the UTXO set on tx acceptance
func (*UniqueTx) UnsignedBytes ¶
UnsignedBytes returns the unsigned bytes of the transaction
type UnsignedTx ¶
type UnsignedTx interface { Initialize(bytes []byte) ID() ids.ID Bytes() []byte AssetIDs() ids.Set NumCredentials() int InputUTXOs() []*ava.UTXOID UTXOs() []*ava.UTXO SyntacticVerify(ctx *snow.Context, c codec.Codec, numFxs int) error SemanticVerify(vm *VM, uTx *UniqueTx, creds []verify.Verifiable) error ExecuteWithSideEffects(vm *VM, batch database.Batch) error }
UnsignedTx ...
type VM ¶
VM implements the avalanche.DAGVM interface
func (*VM) CreateHandlers ¶
func (vm *VM) CreateHandlers() map[string]*common.HTTPHandler
CreateHandlers implements the avalanche.DAGVM interface
func (*VM) CreateStaticHandlers ¶
func (vm *VM) CreateStaticHandlers() map[string]*common.HTTPHandler
CreateStaticHandlers implements the avalanche.DAGVM interface
func (*VM) GetAtomicUTXOs ¶
GetAtomicUTXOs returns the utxos that at least one of the provided addresses is referenced in.
func (*VM) GetUTXOs ¶
GetUTXOs returns the utxos that at least one of the provided addresses is referenced in.
func (*VM) Initialize ¶
func (vm *VM) Initialize( ctx *snow.Context, db database.Database, genesisBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, ) error
Initialize implements the avalanche.DAGVM interface
func (*VM) IssueTx ¶
IssueTx attempts to send a transaction to consensus. If onDecide is specified, the function will be called when the transaction is either accepted or rejected with the appropriate status. This function will go out of scope when the transaction is removed from memory.
func (*VM) PendingTxs ¶
PendingTxs implements the avalanche.DAGVM interface