Versions in this module Expand all Collapse all v1 v1.1.1 Dec 18, 2024 Changes in this version + var ErrWrongOwnerType = errors.New("wrong owner type") + type APIBlockchain struct + ID ids.ID + Name string + SubnetID ids.ID + VMID ids.ID + type APIClaimable struct + ExpiredDepositRewards utilsjson.Uint64 + RewardOwner platformapi.Owner + ValidatorRewards utilsjson.Uint64 + type APIDeposit struct + Amount utilsjson.Uint64 + ClaimedRewardAmount utilsjson.Uint64 + DepositOfferID ids.ID + DepositTxID ids.ID + Duration uint32 + RewardOwner platformapi.Owner + Start utilsjson.Uint64 + UnlockableAmount utilsjson.Uint64 + UnlockedAmount utilsjson.Uint64 + type APIDepositOffer struct + DepositedAmount utilsjson.Uint64 + End utilsjson.Uint64 + Flags utilsjson.Uint64 + ID ids.ID + InterestRateNominator utilsjson.Uint64 + MaxDuration uint32 + Memo types.JSONByteSlice + MinAmount utilsjson.Uint64 + MinDuration uint32 + NoRewardsPeriodDuration uint32 + OwnerAddress ids.ShortID + RewardedAmount utilsjson.Uint64 + Start utilsjson.Uint64 + TotalMaxAmount utilsjson.Uint64 + TotalMaxRewardAmount utilsjson.Uint64 + UnlockPeriodDuration uint32 + UpgradeVersion uint16 + type APISubnet struct + ControlKeys []string + ID ids.ID + Threshold json.Uint32 + type AddDelegatorArgs struct + RewardAddress string + type AddSubnetValidatorArgs struct + SubnetID string + type AddValidatorArgs struct + DelegationFeeRate json.Float32 + NodeOwnerAddress string + RewardAddress string + type CaminoClient interface + GetAddressStates func(ctx context.Context, addr ids.ShortID, options ...rpc.Option) (as.AddressState, error) + GetAllDepositOffers func(ctx context.Context, getAllDepositOffersArgs *GetAllDepositOffersArgs, ...) (*GetAllDepositOffersReply, error) + GetBlockAtHeight func(ctx context.Context, height uint32, encoding formatting.Encoding, ...) (any, error) + GetClaimables func(ctx context.Context, owners []*secp256k1fx.OutputOwners, options ...rpc.Option) ([]*state.Claimable, error) + GetConfiguration func(ctx context.Context, options ...rpc.Option) (*GetConfigurationReply, error) + GetLastAcceptedBlock func(ctx context.Context, encoding formatting.Encoding, options ...rpc.Option) (any, error) + GetMultisigAlias func(ctx context.Context, multisigAddress string, options ...rpc.Option) (*GetMultisigAliasReply, error) + GetRegisteredShortIDLink func(ctx context.Context, addrStr ids.ShortID, options ...rpc.Option) (string, error) + type CaminoService struct + func (s *CaminoService) Claim(_ *http.Request, args *ClaimArgs, reply *api.JSONTxID) error + func (s *CaminoService) GetAddressStates(_ *http.Request, args *api.JSONAddress, response *utilsjson.Uint64) error + func (s *CaminoService) GetAllDepositOffers(_ *http.Request, args *GetAllDepositOffersArgs, ...) error + func (s *CaminoService) GetBalance(_ *http.Request, args *GetBalanceRequest, response *GetBalanceResponseWrapper) error + func (s *CaminoService) GetBlockAtHeight(r *http.Request, args *GetBlockAtHeightArgs, reply *api.GetBlockResponse) error + func (s *CaminoService) GetClaimables(_ *http.Request, args *GetClaimablesArgs, response *GetClaimablesReply) error + func (s *CaminoService) GetConfiguration(_ *http.Request, _ *struct{}, reply *GetConfigurationReply) error + func (s *CaminoService) GetCurrentSupply(_ *http.Request, args *GetCurrentSupplyArgs, reply *GetCurrentSupplyReply) error + func (s *CaminoService) GetDeposits(_ *http.Request, args *GetDepositsArgs, reply *GetDepositsReply) error + func (s *CaminoService) GetLastAcceptedBlock(r *http.Request, args *api.Encoding, reply *api.GetBlockResponse) error + func (s *CaminoService) GetMultisigAlias(_ *http.Request, args *api.JSONAddress, response *GetMultisigAliasReply) error + func (s *CaminoService) GetRegisteredShortIDLink(_ *http.Request, args *api.JSONAddress, response *api.JSONAddress) error + func (s *CaminoService) GetUpgradePhases(_ *http.Request, _ *struct{}, response *GetUpgradePhasesReply) error + func (s *CaminoService) GetValidatorsAt(r *http.Request, args *GetValidatorsAtArgs, reply *GetValidatorsAtReply2) error + func (s *CaminoService) RegisterNode(_ *http.Request, args *RegisterNodeArgs, reply *api.JSONTxID) error + func (s *CaminoService) SetAddressState(_ *http.Request, args *SetAddressStateArgs, response *api.JSONTxID) error + func (s *CaminoService) Spend(_ *http.Request, args *SpendArgs, response *SpendReply) error + func (s *CaminoService) Transfer(_ *http.Request, args *TransferArgs, reply *api.JSONTxID) error + type ClaimArgs struct + Change platformapi.Owner + ClaimTo platformapi.Owner + Claimables []ClaimedAmount + type ClaimedAmount struct + Amount utilsjson.Uint64 + ClaimType txs.ClaimType + ClaimableOwner platformapi.Owner + DepositTxID ids.ID + type Client interface + AddDelegator func(ctx context.Context, user api.UserPass, from []ids.ShortID, ...) (ids.ID, error) + AddSubnetValidator func(ctx context.Context, user api.UserPass, from []ids.ShortID, ...) (ids.ID, error) + AddValidator func(ctx context.Context, user api.UserPass, from []ids.ShortID, ...) (ids.ID, error) + AwaitTxDecided func(ctx context.Context, txID ids.ID, freq time.Duration, options ...rpc.Option) (*GetTxStatusResponse, error) + CreateAddress func(ctx context.Context, user api.UserPass, options ...rpc.Option) (ids.ShortID, error) + CreateBlockchain func(ctx context.Context, user api.UserPass, from []ids.ShortID, ...) (ids.ID, error) + CreateSubnet func(ctx context.Context, user api.UserPass, from []ids.ShortID, ...) (ids.ID, error) + ExportAVAX func(ctx context.Context, user api.UserPass, from []ids.ShortID, ...) (ids.ID, error) + ExportKey func(ctx context.Context, user api.UserPass, address ids.ShortID, ...) (*secp256k1.PrivateKey, error) + GetAtomicUTXOs func(ctx context.Context, addrs []ids.ShortID, sourceChain string, limit uint32, ...) ([][]byte, ids.ShortID, ids.ID, error) + GetBalance func(ctx context.Context, addrs []ids.ShortID, options ...rpc.Option) (*GetBalanceResponse, error) + GetBlock func(ctx context.Context, blockID ids.ID, options ...rpc.Option) ([]byte, error) + GetBlockchainStatus func(ctx context.Context, blockchainID string, options ...rpc.Option) (status.BlockchainStatus, error) + GetBlockchains func(ctx context.Context, options ...rpc.Option) ([]APIBlockchain, error) + GetCurrentSupply func(ctx context.Context, subnetID ids.ID, options ...rpc.Option) (uint64, error) + GetCurrentValidators func(ctx context.Context, subnetID ids.ID, nodeIDs []ids.NodeID, ...) ([]ClientPermissionlessValidator, error) + GetHeight func(ctx context.Context, options ...rpc.Option) (uint64, error) + GetMaxStakeAmount func(ctx context.Context, subnetID ids.ID, nodeID ids.NodeID, startTime uint64, ...) (uint64, error) + GetMinStake func(ctx context.Context, subnetID ids.ID, options ...rpc.Option) (uint64, uint64, error) + GetPendingValidators func(ctx context.Context, subnetID ids.ID, nodeIDs []ids.NodeID, ...) ([]interface{}, []interface{}, error) + GetRewardUTXOs func(context.Context, *api.GetTxArgs, ...rpc.Option) ([][]byte, error) + GetStake func(ctx context.Context, addrs []ids.ShortID, options ...rpc.Option) (map[ids.ID]uint64, [][]byte, error) + GetStakingAssetID func(ctx context.Context, subnetID ids.ID, options ...rpc.Option) (ids.ID, error) + GetSubnets func(ctx context.Context, subnetIDs []ids.ID, options ...rpc.Option) ([]ClientSubnet, error) + GetTimestamp func(ctx context.Context, options ...rpc.Option) (time.Time, error) + GetTotalStake func(ctx context.Context, subnetID ids.ID, options ...rpc.Option) (uint64, error) + GetTx func(ctx context.Context, txID ids.ID, options ...rpc.Option) ([]byte, error) + GetTxStatus func(ctx context.Context, txID ids.ID, options ...rpc.Option) (*GetTxStatusResponse, error) + GetUTXOs func(ctx context.Context, addrs []ids.ShortID, limit uint32, ...) ([][]byte, ids.ShortID, ids.ID, error) + GetValidatorsAt func(ctx context.Context, subnetID ids.ID, height uint64, options ...rpc.Option) (map[ids.NodeID]uint64, error) + ImportAVAX func(ctx context.Context, user api.UserPass, from []ids.ShortID, ...) (ids.ID, error) + ImportKey func(ctx context.Context, user api.UserPass, privateKey *secp256k1.PrivateKey, ...) (ids.ShortID, error) + IssueTx func(ctx context.Context, tx []byte, options ...rpc.Option) (ids.ID, error) + ListAddresses func(ctx context.Context, user api.UserPass, options ...rpc.Option) ([]ids.ShortID, error) + SampleValidators func(ctx context.Context, subnetID ids.ID, sampleSize uint16, options ...rpc.Option) ([]ids.NodeID, error) + ValidatedBy func(ctx context.Context, blockchainID ids.ID, options ...rpc.Option) (ids.ID, error) + Validates func(ctx context.Context, subnetID ids.ID, options ...rpc.Option) ([]ids.ID, error) + func NewClient(uri string) Client + type ClientDelegator struct + PotentialReward *uint64 + RewardOwner *ClientOwner + type ClientOwner struct + Addresses []ids.ShortID + Locktime uint64 + Threshold uint32 + type ClientPermissionlessValidator struct + AccruedDelegateeReward *uint64 + Connected *bool + DelegationFee float32 + DelegationRewardOwner *ClientOwner + DelegatorCount *uint64 + DelegatorWeight *uint64 + Delegators []ClientDelegator + PotentialReward *uint64 + Signer *signer.ProofOfPossession + Uptime *float32 + ValidationRewardOwner *ClientOwner + type ClientStaker struct + EndTime uint64 + NodeID ids.NodeID + StakeAmount *uint64 + StartTime uint64 + TxID ids.ID + Weight uint64 + type ClientSubnet struct + ControlKeys []ids.ShortID + ID ids.ID + Threshold uint32 + type ConsortiumMemberValidator struct + ConsortiumMemberAddress string + ValidatorWeight utilsjson.Uint64 + type CreateBlockchainArgs struct + Encoding formatting.Encoding + FxIDs []string + GenesisData string + Name string + SubnetID ids.ID + VMID string + type CreateSubnetArgs struct + type ExportAVAXArgs struct + Amount json.Uint64 + TargetChain string + To string + type ExportKeyArgs struct + Address string + type ExportKeyReply struct + PrivateKey *secp256k1.PrivateKey + type Factory struct + func (f *Factory) New(logging.Logger) (interface{}, error) + type GetAllDepositOffersArgs struct + Timestamp utilsjson.Uint64 + type GetAllDepositOffersReply struct + DepositOffers []*APIDepositOffer + type GetBalanceRequest struct + Addresses []string + type GetBalanceResponse struct + Balance json.Uint64 + Balances map[ids.ID]json.Uint64 + LockedNotStakeable json.Uint64 + LockedNotStakeables map[ids.ID]json.Uint64 + LockedStakeable json.Uint64 + LockedStakeables map[ids.ID]json.Uint64 + UTXOIDs []*avax.UTXOID + Unlocked json.Uint64 + Unlockeds map[ids.ID]json.Uint64 + type GetBalanceResponseV2 struct + Balances map[ids.ID]utilsjson.Uint64 + BondedOutputs map[ids.ID]utilsjson.Uint64 + DepositedBondedOutputs map[ids.ID]utilsjson.Uint64 + DepositedOutputs map[ids.ID]utilsjson.Uint64 + UTXOIDs []*avax.UTXOID + UnlockedOutputs map[ids.ID]utilsjson.Uint64 + type GetBalanceResponseWrapper struct + LockModeBondDeposit bool + func (response GetBalanceResponseWrapper) MarshalJSON() ([]byte, error) + type GetBlockAtHeightArgs struct + Encoding formatting.Encoding + Height uint32 + type GetBlockchainStatusArgs struct + BlockchainID string + type GetBlockchainStatusReply struct + Status status.BlockchainStatus + type GetBlockchainsResponse struct + Blockchains []APIBlockchain + type GetClaimablesArgs struct + Owners []platformapi.Owner + type GetClaimablesReply struct + Claimables []APIClaimable + type GetConfigurationReply struct + AssetID ids.ID + AssetSymbol string + Blockchains []APIBlockchain + CodecVersion utilsjson.Uint16 + Hrp string + LockModeBondDeposit bool + MaxConsumptionRate utilsjson.Uint64 + MaxStakeDuration utilsjson.Uint64 + MaxValidatorStake utilsjson.Uint64 + MinConsumptionRate utilsjson.Uint64 + MinDelegationFee utilsjson.Uint32 + MinDelegatorStake utilsjson.Uint64 + MinStakeDuration utilsjson.Uint64 + MinValidatorStake utilsjson.Uint64 + NetworkID utilsjson.Uint32 + SupplyCap utilsjson.Uint64 + VerifyNodeSignature bool + type GetCurrentSupplyArgs struct + SubnetID ids.ID + type GetCurrentSupplyReply struct + Supply json.Uint64 + type GetCurrentValidatorsArgs struct + NodeIDs []ids.NodeID + SubnetID ids.ID + type GetCurrentValidatorsReply struct + Validators []interface{} + type GetDepositsArgs struct + DepositTxIDs []ids.ID + type GetDepositsReply struct + AvailableRewards []utilsjson.Uint64 + Deposits []*APIDeposit + Timestamp utilsjson.Uint64 + type GetMaxStakeAmountArgs struct + EndTime json.Uint64 + NodeID ids.NodeID + StartTime json.Uint64 + SubnetID ids.ID + type GetMaxStakeAmountReply struct + Amount json.Uint64 + type GetMinStakeArgs struct + SubnetID ids.ID + type GetMinStakeReply struct + MinDelegatorStake json.Uint64 + MinValidatorStake json.Uint64 + type GetMultisigAliasReply struct + Memo types.JSONByteSlice + type GetPendingValidatorsArgs struct + NodeIDs []ids.NodeID + SubnetID ids.ID + type GetPendingValidatorsReply struct + Delegators []interface{} + Validators []interface{} + type GetRewardUTXOsReply struct + Encoding formatting.Encoding + NumFetched json.Uint64 + UTXOs []string + type GetStakeArgs struct + Encoding formatting.Encoding + type GetStakeReply struct + Encoding formatting.Encoding + Outputs []string + Staked json.Uint64 + Stakeds map[ids.ID]json.Uint64 + type GetStakingAssetIDArgs struct + SubnetID ids.ID + type GetStakingAssetIDResponse struct + AssetID ids.ID + type GetSubnetsArgs struct + IDs []ids.ID + type GetSubnetsResponse struct + Subnets []APISubnet + type GetTimestampReply struct + Timestamp time.Time + type GetTotalStakeArgs struct + SubnetID ids.ID + type GetTotalStakeReply struct + Stake json.Uint64 + Weight json.Uint64 + type GetTxStatusArgs struct + TxID ids.ID + type GetTxStatusResponse struct + Reason string + Status status.Status + type GetUpgradePhasesReply struct + AthensPhase utilsjson.Uint32 + BerlinPhase utilsjson.Uint32 + type GetValidatorsAtArgs struct + Height json.Uint64 + SubnetID ids.ID + type GetValidatorsAtReply struct + Validators map[ids.NodeID]uint64 + type GetValidatorsAtReply2 struct + Validators map[ids.NodeID]ConsortiumMemberValidator + type ImportAVAXArgs struct + SourceChain string + To string + type ImportKeyArgs struct + PrivateKey *secp256k1.PrivateKey + type Index struct + Address string + UTXO string + type RegisterNodeArgs struct + Change platformapi.Owner + NewNodeID ids.NodeID + NodeOwnerAddress string + OldNodeID ids.NodeID + type SampleValidatorsArgs struct + Size json.Uint16 + SubnetID ids.ID + type SampleValidatorsReply struct + Validators []ids.NodeID + type Service struct + func (s *Service) AddDelegator(_ *http.Request, args *AddDelegatorArgs, reply *api.JSONTxIDChangeAddr) error + func (s *Service) AddSubnetValidator(_ *http.Request, args *AddSubnetValidatorArgs, ...) error + func (s *Service) AddValidator(_ *http.Request, args *AddValidatorArgs, reply *api.JSONTxIDChangeAddr) error + func (s *Service) CreateAddress(_ *http.Request, args *api.UserPass, response *api.JSONAddress) error + func (s *Service) CreateBlockchain(_ *http.Request, args *CreateBlockchainArgs, response *api.JSONTxIDChangeAddr) error + func (s *Service) CreateSubnet(_ *http.Request, args *CreateSubnetArgs, response *api.JSONTxIDChangeAddr) error + func (s *Service) ExportAVAX(_ *http.Request, args *ExportAVAXArgs, response *api.JSONTxIDChangeAddr) error + func (s *Service) ExportKey(_ *http.Request, args *ExportKeyArgs, reply *ExportKeyReply) error + func (s *Service) GetBalance(_ *http.Request, args *GetBalanceRequest, response *GetBalanceResponse) error + func (s *Service) GetBlock(_ *http.Request, args *api.GetBlockArgs, response *api.GetBlockResponse) error + func (s *Service) GetBlockchainStatus(r *http.Request, args *GetBlockchainStatusArgs, ...) error + func (s *Service) GetBlockchains(_ *http.Request, _ *struct{}, response *GetBlockchainsResponse) error + func (s *Service) GetCurrentSupply(_ *http.Request, args *GetCurrentSupplyArgs, reply *GetCurrentSupplyReply) error + func (s *Service) GetCurrentValidators(_ *http.Request, args *GetCurrentValidatorsArgs, ...) error + func (s *Service) GetHeight(r *http.Request, _ *struct{}, response *api.GetHeightResponse) error + func (s *Service) GetMaxStakeAmount(_ *http.Request, args *GetMaxStakeAmountArgs, reply *GetMaxStakeAmountReply) error + func (s *Service) GetMinStake(_ *http.Request, args *GetMinStakeArgs, reply *GetMinStakeReply) error + func (s *Service) GetPendingValidators(_ *http.Request, args *GetPendingValidatorsArgs, ...) error + func (s *Service) GetRewardUTXOs(_ *http.Request, args *api.GetTxArgs, reply *GetRewardUTXOsReply) error + func (s *Service) GetStake(_ *http.Request, args *GetStakeArgs, response *GetStakeReply) error + func (s *Service) GetStakingAssetID(_ *http.Request, args *GetStakingAssetIDArgs, ...) error + func (s *Service) GetSubnets(_ *http.Request, args *GetSubnetsArgs, response *GetSubnetsResponse) error + func (s *Service) GetTimestamp(_ *http.Request, _ *struct{}, reply *GetTimestampReply) error + func (s *Service) GetTotalStake(_ *http.Request, args *GetTotalStakeArgs, reply *GetTotalStakeReply) error + func (s *Service) GetTx(_ *http.Request, args *api.GetTxArgs, response *api.GetTxReply) error + func (s *Service) GetTxStatus(_ *http.Request, args *GetTxStatusArgs, response *GetTxStatusResponse) error + func (s *Service) GetUTXOs(_ *http.Request, args *api.GetUTXOsArgs, response *api.GetUTXOsReply) error + func (s *Service) GetValidatorsAt(r *http.Request, args *GetValidatorsAtArgs, reply *GetValidatorsAtReply) error + func (s *Service) ImportAVAX(_ *http.Request, args *ImportAVAXArgs, response *api.JSONTxIDChangeAddr) error + func (s *Service) ImportKey(_ *http.Request, args *ImportKeyArgs, reply *api.JSONAddress) error + func (s *Service) IssueTx(_ *http.Request, args *api.FormattedTx, response *api.JSONTxID) error + func (s *Service) ListAddresses(_ *http.Request, args *api.UserPass, response *api.JSONAddresses) error + func (s *Service) SampleValidators(_ *http.Request, args *SampleValidatorsArgs, reply *SampleValidatorsReply) error + func (s *Service) ValidatedBy(r *http.Request, args *ValidatedByArgs, response *ValidatedByResponse) error + func (s *Service) Validates(_ *http.Request, args *ValidatesArgs, response *ValidatesResponse) error + type SetAddressStateArgs struct + Address string + Change platformapi.Owner + Remove bool + State as.AddressStateBit + type SpendArgs struct + AmountToBurn utilsjson.Uint64 + AmountToLock utilsjson.Uint64 + AsOf utilsjson.Uint64 + Change platformapi.Owner + Encoding formatting.Encoding + LockMode byte + To platformapi.Owner + type SpendReply struct + Ins string + Outs string + Owners string + Signers [][]ids.ShortID + type TransferArgs struct + Amount utilsjson.Uint64 + Change platformapi.Owner + TransferTo platformapi.Owner + type VM struct + func (*VM) CreateStaticHandlers(context.Context) (map[string]*common.HTTPHandler, error) + func (*VM) Version(context.Context) (string, error) + func (vm *VM) Clock() *mockable.Clock + func (vm *VM) CodecRegistry() codec.Registry + func (vm *VM) Connected(_ context.Context, nodeID ids.NodeID, _ *version.Application) error + func (vm *VM) ConnectedSubnet(_ context.Context, nodeID ids.NodeID, subnetID ids.ID) error + func (vm *VM) CreateHandlers(context.Context) (map[string]*common.HTTPHandler, error) + func (vm *VM) Disconnected(_ context.Context, nodeID ids.NodeID) error + func (vm *VM) GetBlock(_ context.Context, blkID ids.ID) (snowman.Block, error) + func (vm *VM) GetCurrentHeight(context.Context) (uint64, error) + func (vm *VM) GetFeeAssetID() ids.ID + func (vm *VM) GetMinimumHeight(ctx context.Context) (uint64, error) + func (vm *VM) GetSubnetID(_ context.Context, chainID ids.ID) (ids.ID, error) + func (vm *VM) GetValidatorSet(ctx context.Context, height uint64, subnetID ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error) + func (vm *VM) HealthCheck(context.Context) (interface{}, error) + func (vm *VM) Initialize(ctx context.Context, chainCtx *snow.Context, dbManager manager.Manager, ...) error + func (vm *VM) LastAccepted(context.Context) (ids.ID, error) + func (vm *VM) Logger() logging.Logger + func (vm *VM) ParseBlock(_ context.Context, b []byte) (snowman.Block, error) + func (vm *VM) SetPreference(_ context.Context, blkID ids.ID) error + func (vm *VM) SetState(_ context.Context, state snow.State) error + func (vm *VM) Shutdown(context.Context) error + type ValidatedByArgs struct + BlockchainID ids.ID + type ValidatedByResponse struct + SubnetID ids.ID + type ValidatesArgs struct + SubnetID ids.ID + type ValidatesResponse struct + BlockchainIDs []ids.ID