Versions in this module Expand all Collapse all v1 v1.8.4 Feb 22, 2022 v1.8.3 Feb 22, 2022 Changes in this version + func NewCodecs(fxs []Fx) (codec.Manager, codec.Manager, error) + func NewPubSubFilterer(tx *Tx) pubsub.Filterer + type AssetDefinition struct + Denomination cjson.Uint8 + InitialState map[string][]interface{} + Memo string + Name string + Symbol string + type AssetIDChangeAddr struct + type Balance struct + AssetID string + Balance json.Uint64 + type BaseTx struct + func (t *BaseTx) ExecuteWithSideEffects(_ *VM, batch database.Batch) error + func (t *BaseTx) Init(vm *VM) error + func (t *BaseTx) SemanticVerify(vm *VM, tx UnsignedTx, creds []verify.Verifiable) error + func (t *BaseTx) SyntacticVerify(ctx *snow.Context, c codec.Manager, txFeeAssetID ids.ID, txFee uint64, ...) error + type BuildGenesisArgs struct + Encoding formatting.Encoding + GenesisData map[string]AssetDefinition + NetworkID cjson.Uint32 + type BuildGenesisReply struct + Bytes string + Encoding formatting.Encoding + type Client interface + ConfirmTx func(ctx context.Context, txID ids.ID, numChecks int, checkFreq time.Duration) (choices.Status, error) + CreateAddress func(ctx context.Context, user api.UserPass) (string, error) + CreateAsset func(ctx context.Context, user api.UserPass, from []string, ...) (ids.ID, error) + CreateFixedCapAsset func(ctx context.Context, user api.UserPass, from []string, ...) (ids.ID, error) + CreateNFTAsset func(ctx context.Context, user api.UserPass, from []string, ...) (ids.ID, error) + CreateVariableCapAsset func(ctx context.Context, user api.UserPass, from []string, ...) (ids.ID, error) + Export func(ctx context.Context, user api.UserPass, from []string, changeAddr string, ...) (ids.ID, error) + ExportKey func(ctx context.Context, user api.UserPass, addr string) (string, error) + GetAllBalances func(context.Context, string, bool) (*GetAllBalancesReply, error) + GetAssetDescription func(ctx context.Context, assetID string) (*GetAssetDescriptionReply, error) + GetAtomicUTXOs func(ctx context.Context, addrs []string, sourceChain string, limit uint32, ...) ([][]byte, api.Index, error) + GetBalance func(ctx context.Context, addr string, assetID string, includePartial bool) (*GetBalanceReply, error) + GetTx func(ctx context.Context, txID ids.ID) ([]byte, error) + GetTxStatus func(ctx context.Context, txID ids.ID) (choices.Status, error) + GetUTXOs func(ctx context.Context, addrs []string, limit uint32, ...) ([][]byte, api.Index, error) + Import func(ctx context.Context, user api.UserPass, to, sourceChain string) (ids.ID, error) + ImportKey func(ctx context.Context, user api.UserPass, privateKey string) (string, error) + ListAddresses func(ctx context.Context, user api.UserPass) ([]string, error) + Mint func(ctx context.Context, user api.UserPass, from []string, changeAddr string, ...) (ids.ID, error) + MintNFT func(ctx context.Context, user api.UserPass, from []string, changeAddr string, ...) (ids.ID, error) + SendNFT func(ctx context.Context, user api.UserPass, from []string, changeAddr string, ...) (ids.ID, error) + func NewClient(uri, chain string) Client + type Config struct + IndexAllowIncomplete bool + IndexTransactions bool + type CreateAssetArgs struct + Denomination byte + InitialHolders []*Holder + MinterSets []Owners + Name string + Symbol string + type CreateAssetTx struct + Denomination byte + Name string + States []*InitialState + Symbol string + func (t *CreateAssetTx) Init(vm *VM) error + func (t *CreateAssetTx) InitialStates() []*InitialState + func (t *CreateAssetTx) Sort() + func (t *CreateAssetTx) SyntacticVerify(ctx *snow.Context, c codec.Manager, txFeeAssetID ids.ID, _ uint64, ...) error + func (t *CreateAssetTx) UTXOs() []*avax.UTXO + type CreateNFTAssetArgs struct + MinterSets []Owners + Name string + Symbol string + type ExportArgs struct + Amount json.Uint64 + AssetID string + To string + type ExportKeyArgs struct + Address string + type ExportKeyReply struct + PrivateKey string + type ExportTx struct + DestinationChain ids.ID + ExportedOuts []*avax.TransferableOutput + func (t *ExportTx) ExecuteWithSideEffects(vm *VM, batch database.Batch) error + func (t *ExportTx) Init(vm *VM) error + func (t *ExportTx) SemanticVerify(vm *VM, tx UnsignedTx, creds []verify.Verifiable) error + func (t *ExportTx) SyntacticVerify(ctx *snow.Context, c codec.Manager, txFeeAssetID ids.ID, txFee uint64, ...) error + type Factory struct + CreateAssetTxFee uint64 + TxFee uint64 + func (f *Factory) New(*snow.Context) (interface{}, error) + type FormattedAssetID struct + AssetID ids.ID + type Fx interface + Bootstrapped func() error + Bootstrapping func() error + Initialize func(vm interface{}) error + VerifyOperation func(tx, op, cred interface{}, utxos []interface{}) error + VerifyTransfer func(tx, in, cred, utxo interface{}) error + type FxCredential struct + FxID ids.ID + type FxOperation interface + Outs func() []verify.State + type Genesis struct + Txs []*GenesisAsset + func (g *Genesis) IsSortedAndUnique() bool + func (g *Genesis) Len() int + func (g *Genesis) Less(i, j int) bool + func (g *Genesis) Sort() + func (g *Genesis) Swap(i, j int) + type GenesisAsset struct + Alias string + type GetAddressTxsArgs struct + AssetID string + Cursor json.Uint64 + PageSize json.Uint64 + type GetAddressTxsReply struct + Cursor json.Uint64 + TxIDs []ids.ID + type GetAllBalancesArgs struct + IncludePartial bool + type GetAllBalancesReply struct + Balances []Balance + type GetAssetDescriptionArgs struct + AssetID string + type GetAssetDescriptionReply struct + Denomination json.Uint8 + Name string + Symbol string + type GetBalanceArgs struct + Address string + AssetID string + IncludePartial bool + type GetBalanceReply struct + Balance json.Uint64 + UTXOIDs []avax.UTXOID + type GetTxStatusReply struct + Status choices.Status + type Holder struct + Address string + Amount json.Uint64 + type ImportArgs struct + SourceChain string + To string + type ImportKeyArgs struct + PrivateKey string + type ImportKeyReply struct + Address string + type ImportTx struct + ImportedIns []*avax.TransferableInput + SourceChain ids.ID + func (t *ImportTx) AssetIDs() ids.Set + func (t *ImportTx) ConsumedAssetIDs() ids.Set + func (t *ImportTx) ExecuteWithSideEffects(vm *VM, batch database.Batch) error + func (t *ImportTx) Init(vm *VM) error + func (t *ImportTx) InputUTXOs() []*avax.UTXOID + func (t *ImportTx) NumCredentials() int + func (t *ImportTx) SemanticVerify(vm *VM, tx UnsignedTx, creds []verify.Verifiable) error + func (t *ImportTx) SyntacticVerify(ctx *snow.Context, c codec.Manager, txFeeAssetID ids.ID, txFee uint64, ...) error + type InitialState struct + FxID ids.ID + FxIndex uint32 + Outs []verify.State + func (is *InitialState) InitCtx(ctx *snow.Context) + func (is *InitialState) Sort(c codec.Manager) + func (is *InitialState) Verify(c codec.Manager, numFxs int) error + type MintArgs struct + Amount json.Uint64 + AssetID string + To string + type MintNFTArgs struct + AssetID string + Encoding formatting.Encoding + Payload string + To string + type Operation struct + FxID ids.ID + Op FxOperation + UTXOIDs []*avax.UTXOID + func (op *Operation) Verify(c codec.Manager) error + type OperationTx struct + Ops []*Operation + func (t *OperationTx) AssetIDs() ids.Set + func (t *OperationTx) ConsumedAssetIDs() ids.Set + func (t *OperationTx) Init(vm *VM) error + func (t *OperationTx) InputUTXOs() []*avax.UTXOID + func (t *OperationTx) NumCredentials() int + func (t *OperationTx) Operations() []*Operation + func (t *OperationTx) SemanticVerify(vm *VM, tx UnsignedTx, creds []verify.Verifiable) error + func (t *OperationTx) SyntacticVerify(ctx *snow.Context, c codec.Manager, txFeeAssetID ids.ID, txFee uint64, ...) error + func (t *OperationTx) UTXOs() []*avax.UTXO + type Owners struct + Minters []string + Threshold json.Uint32 + type SendArgs struct + Memo string + type SendMultipleArgs struct + Memo string + Outputs []SendOutput + type SendNFTArgs struct + AssetID string + GroupID json.Uint32 + To string + type SendOutput struct + Amount json.Uint64 + AssetID string + To string + type Service struct + func (service *Service) CreateAddress(r *http.Request, args *api.UserPass, reply *api.JSONAddress) error + func (service *Service) CreateAsset(r *http.Request, args *CreateAssetArgs, reply *AssetIDChangeAddr) error + func (service *Service) CreateFixedCapAsset(r *http.Request, args *CreateAssetArgs, reply *AssetIDChangeAddr) error + func (service *Service) CreateNFTAsset(r *http.Request, args *CreateNFTAssetArgs, reply *AssetIDChangeAddr) error + func (service *Service) CreateVariableCapAsset(r *http.Request, args *CreateAssetArgs, reply *AssetIDChangeAddr) error + func (service *Service) Export(_ *http.Request, args *ExportArgs, reply *api.JSONTxIDChangeAddr) error + func (service *Service) ExportKey(r *http.Request, args *ExportKeyArgs, reply *ExportKeyReply) error + func (service *Service) GetAddressTxs(r *http.Request, args *GetAddressTxsArgs, reply *GetAddressTxsReply) error + func (service *Service) GetAllBalances(r *http.Request, args *GetAllBalancesArgs, reply *GetAllBalancesReply) 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) GetTx(r *http.Request, args *api.GetTxArgs, reply *api.GetTxReply) error + func (service *Service) GetTxStatus(r *http.Request, args *api.JSONTxID, reply *GetTxStatusReply) error + func (service *Service) GetUTXOs(r *http.Request, args *api.GetUTXOsArgs, reply *api.GetUTXOsReply) error + func (service *Service) Import(_ *http.Request, args *ImportArgs, reply *api.JSONTxID) error + func (service *Service) ImportKey(r *http.Request, args *ImportKeyArgs, reply *api.JSONAddress) error + func (service *Service) IssueTx(r *http.Request, args *api.FormattedTx, reply *api.JSONTxID) error + func (service *Service) ListAddresses(_ *http.Request, args *api.UserPass, response *api.JSONAddresses) error + func (service *Service) Mint(r *http.Request, args *MintArgs, reply *api.JSONTxIDChangeAddr) error + func (service *Service) MintNFT(r *http.Request, args *MintNFTArgs, reply *api.JSONTxIDChangeAddr) error + func (service *Service) Send(r *http.Request, args *SendArgs, reply *api.JSONTxIDChangeAddr) error + func (service *Service) SendMultiple(r *http.Request, args *SendMultipleArgs, reply *api.JSONTxIDChangeAddr) error + func (service *Service) SendNFT(r *http.Request, args *SendNFTArgs, reply *api.JSONTxIDChangeAddr) error + type State interface + DeduplicateTx func(tx *UniqueTx) *UniqueTx + func NewMeteredState(db database.Database, genesisCodec, codec codec.Manager, ...) (State, error) + func NewState(db database.Database, genesisCodec, codec codec.Manager) State + type StaticService struct + func CreateStaticService() *StaticService + func (ss *StaticService) BuildGenesis(_ *http.Request, args *BuildGenesisArgs, reply *BuildGenesisReply) error + type Tx struct + Creds []*FxCredential + func (t *Tx) Credentials() []verify.Verifiable + func (t *Tx) Init(vm *VM) error + func (t *Tx) SemanticVerify(vm *VM, tx UnsignedTx) error + func (t *Tx) SignNFTFx(c codec.Manager, signers [][]*crypto.PrivateKeySECP256K1R) error + func (t *Tx) SignPropertyFx(c codec.Manager, signers [][]*crypto.PrivateKeySECP256K1R) error + func (t *Tx) SignSECP256K1Fx(c codec.Manager, signers [][]*crypto.PrivateKeySECP256K1R) error + func (t *Tx) SyntacticVerify(ctx *snow.Context, c codec.Manager, txFeeAssetID ids.ID, txFee uint64, ...) error + type TxCachedState struct + type TxState interface + DeleteTx func(txID ids.ID) error + GetTx func(txID ids.ID) (*Tx, error) + PutTx func(txID ids.ID, tx *Tx) error + func NewMeteredTxState(db database.Database, codec codec.Manager, metrics prometheus.Registerer) (TxState, error) + func NewTxState(db database.Database, codec codec.Manager) TxState + type UniqueTx struct + func (tx *UniqueTx) Accept() error + func (tx *UniqueTx) Bytes() []byte + func (tx *UniqueTx) Dependencies() ([]snowstorm.Tx, error) + func (tx *UniqueTx) Evict() + func (tx *UniqueTx) ID() ids.ID + func (tx *UniqueTx) InputIDs() []ids.ID + func (tx *UniqueTx) InputUTXOs() []*avax.UTXOID + func (tx *UniqueTx) Key() interface{} + func (tx *UniqueTx) Reject() error + func (tx *UniqueTx) SemanticVerify() error + func (tx *UniqueTx) Status() choices.Status + func (tx *UniqueTx) SyntacticVerify() error + func (tx *UniqueTx) UTXOs() []*avax.UTXO + func (tx *UniqueTx) Verify() error + func (tx *UniqueTx) Whitelist() (ids.Set, bool, error) + type UnsignedTx interface + AssetIDs func() ids.Set + Bytes func() []byte + ConsumedAssetIDs func() ids.Set + ExecuteWithSideEffects func(vm *VM, batch database.Batch) error + ID func() ids.ID + Init func(*VM) error + Initialize func(unsignedBytes, bytes []byte) + InputUTXOs func() []*avax.UTXOID + NumCredentials func() int + SemanticVerify func(vm *VM, tx UnsignedTx, creds []verify.Verifiable) error + SyntacticVerify func(ctx *snow.Context, c codec.Manager, txFeeAssetID ids.ID, txFee uint64, ...) error + UTXOs func() []*avax.UTXO + UnsignedBytes func() []byte + type VM struct + func (vm *VM) AppGossip(nodeID ids.ShortID, msg []byte) error + func (vm *VM) AppRequest(nodeID ids.ShortID, requestID uint32, deadline time.Time, request []byte) error + func (vm *VM) AppRequestFailed(nodeID ids.ShortID, requestID uint32) error + func (vm *VM) AppResponse(nodeID ids.ShortID, requestID uint32, response []byte) error + func (vm *VM) Connected(nodeID ids.ShortID, nodeVersion version.Application) error + func (vm *VM) CreateHandlers() (map[string]*common.HTTPHandler, error) + func (vm *VM) CreateStaticHandlers() (map[string]*common.HTTPHandler, error) + func (vm *VM) Disconnected(nodeID ids.ShortID) error + func (vm *VM) FlushTxs() + func (vm *VM) GetTx(txID ids.ID) (snowstorm.Tx, error) + func (vm *VM) HealthCheck() (interface{}, error) + func (vm *VM) Initialize(ctx *snow.Context, dbManager manager.Manager, genesisBytes []byte, ...) error + func (vm *VM) IssueTx(b []byte) (ids.ID, error) + func (vm *VM) LoadUser(username string, password string, addrsToUse ids.ShortSet) ([]*avax.UTXO, *secp256k1fx.Keychain, error) + func (vm *VM) Mint(utxos []*avax.UTXO, kc *secp256k1fx.Keychain, amounts map[ids.ID]uint64, ...) ([]*Operation, [][]*crypto.PrivateKeySECP256K1R, error) + func (vm *VM) MintNFT(utxos []*avax.UTXO, kc *secp256k1fx.Keychain, assetID ids.ID, payload []byte, ...) ([]*Operation, [][]*crypto.PrivateKeySECP256K1R, error) + func (vm *VM) ParseTx(b []byte) (snowstorm.Tx, error) + func (vm *VM) PendingTxs() []snowstorm.Tx + func (vm *VM) SetState(state snow.State) error + func (vm *VM) Shutdown() error + func (vm *VM) Spend(utxos []*avax.UTXO, kc *secp256k1fx.Keychain, amounts map[ids.ID]uint64) (map[ids.ID]uint64, []*avax.TransferableInput, [][]*crypto.PrivateKeySECP256K1R, ...) + func (vm *VM) SpendAll(utxos []*avax.UTXO, kc *secp256k1fx.Keychain) (map[ids.ID]uint64, []*avax.TransferableInput, [][]*crypto.PrivateKeySECP256K1R, ...) + func (vm *VM) SpendNFT(utxos []*avax.UTXO, kc *secp256k1fx.Keychain, assetID ids.ID, groupID uint32, ...) ([]*Operation, [][]*crypto.PrivateKeySECP256K1R, error) + func (vm *VM) Version() (string, error) + type WalletClient interface + IssueTx func(ctx context.Context, tx []byte) (ids.ID, error) + Send func(ctx context.Context, user api.UserPass, from []string, changeAddr string, ...) (ids.ID, error) + SendMultiple func(ctx context.Context, user api.UserPass, from []string, changeAddr string, ...) (ids.ID, error) + func NewWalletClient(uri, chain string) WalletClient + type WalletService struct + func (w *WalletService) IssueTx(r *http.Request, args *api.FormattedTx, reply *api.JSONTxID) error + func (w *WalletService) Send(r *http.Request, args *SendArgs, reply *api.JSONTxIDChangeAddr) error + func (w *WalletService) SendMultiple(r *http.Request, args *SendMultipleArgs, reply *api.JSONTxIDChangeAddr) error