Documentation
¶
Overview ¶
Package icpledger provides a client for the "icpledger" canister. Do NOT edit this file. It was automatically generated by https://github.com/aviate-labs/agent-go.
Index ¶
- type Account
- type AccountBalanceArgs
- type AccountBalanceArgsDfx
- type AccountIdentifier
- type Agent
- func (a Agent) AccountBalance(arg0 AccountBalanceArgs) (*Tokens, error)
- func (a Agent) AccountBalanceDfx(arg0 AccountBalanceArgsDfx) (*Tokens, error)
- func (a Agent) AccountIdentifier(arg0 Account) (*AccountIdentifier, error)
- func (a Agent) Archives() (*Archives, error)
- func (a Agent) Decimals() (..., error)
- func (a Agent) Icrc10SupportedStandards() (..., error)
- func (a Agent) Icrc1BalanceOf(arg0 Account) (*Icrc1Tokens, error)
- func (a Agent) Icrc1Decimals() (*uint8, error)
- func (a Agent) Icrc1Fee() (*Icrc1Tokens, error)
- func (a Agent) Icrc1Metadata() (..., error)
- func (a Agent) Icrc1MintingAccount() (**Account, error)
- func (a Agent) Icrc1Name() (*string, error)
- func (a Agent) Icrc1SupportedStandards() (..., error)
- func (a Agent) Icrc1Symbol() (*string, error)
- func (a Agent) Icrc1TotalSupply() (*Icrc1Tokens, error)
- func (a Agent) Icrc1Transfer(arg0 TransferArg) (*Icrc1TransferResult, error)
- func (a Agent) Icrc21CanisterCallConsentMessage(arg0 Icrc21ConsentMessageRequest) (*Icrc21ConsentMessageResponse, error)
- func (a Agent) Icrc2Allowance(arg0 AllowanceArgs) (*Allowance, error)
- func (a Agent) Icrc2Approve(arg0 ApproveArgs) (*ApproveResult, error)
- func (a Agent) Icrc2TransferFrom(arg0 TransferFromArgs) (*TransferFromResult, error)
- func (a Agent) Name() (..., error)
- func (a Agent) QueryBlocks(arg0 GetBlocksArgs) (*QueryBlocksResponse, error)
- func (a Agent) QueryEncodedBlocks(arg0 GetBlocksArgs) (*QueryEncodedBlocksResponse, error)
- func (a Agent) SendDfx(arg0 SendArgs) (*BlockIndex, error)
- func (a Agent) Symbol() (..., error)
- func (a Agent) Transfer(arg0 TransferArgs) (*TransferResult, error)
- func (a Agent) TransferFee(arg0 TransferFeeArg) (*TransferFee, error)
- type Allowance
- type AllowanceArgs
- type ApproveArgs
- type ApproveError
- type ApproveResult
- type Archive
- type ArchiveOptions
- type ArchivedBlocksRange
- type ArchivedEncodedBlocksRange
- type Archives
- type Block
- type BlockIndex
- type BlockRange
- type Duration
- type FeatureFlags
- type GetBlocksArgs
- type Icrc1BlockIndex
- type Icrc1Timestamp
- type Icrc1Tokens
- type Icrc1TransferError
- type Icrc1TransferResult
- type Icrc21ConsentInfo
- type Icrc21ConsentMessage
- type Icrc21ConsentMessageMetadata
- type Icrc21ConsentMessageRequest
- type Icrc21ConsentMessageResponse
- type Icrc21ConsentMessageSpec
- type Icrc21Error
- type Icrc21ErrorInfo
- type InitArgs
- type LedgerCanisterPayload
- type Memo
- type Operation
- type QueryArchiveError
- type QueryArchiveFn
- type QueryArchiveResult
- type QueryBlocksResponse
- type QueryEncodedBlocksResponse
- type SendArgs
- type SubAccount
- type TextAccountIdentifier
- type TimeStamp
- type Tokens
- type Transaction
- type TransferArg
- type TransferArgs
- type TransferError
- type TransferFee
- type TransferFeeArg
- type TransferFromArgs
- type TransferFromError
- type TransferFromResult
- type TransferResult
- type UpgradeArgs
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶ added in v0.3.4
type Account struct { Owner principal.Principal `ic:"owner" json:"owner"` Subaccount *SubAccount `ic:"subaccount,omitempty" json:"subaccount,omitempty"` }
type AccountBalanceArgs ¶
type AccountBalanceArgs struct {
Account AccountIdentifier `ic:"account" json:"account"`
}
type AccountBalanceArgsDfx ¶ added in v0.3.4
type AccountBalanceArgsDfx struct {
Account TextAccountIdentifier `ic:"account" json:"account"`
}
type AccountIdentifier ¶
type AccountIdentifier = []byte
type Agent ¶
Agent is a client for the "icpledger" canister.
func (Agent) AccountBalance ¶
func (a Agent) AccountBalance(arg0 AccountBalanceArgs) (*Tokens, error)
AccountBalance calls the "account_balance" method on the "icpledger" canister.
func (Agent) AccountBalanceDfx ¶ added in v0.3.4
func (a Agent) AccountBalanceDfx(arg0 AccountBalanceArgsDfx) (*Tokens, error)
AccountBalanceDfx calls the "account_balance_dfx" method on the "icpledger" canister.
func (Agent) AccountIdentifier ¶ added in v0.3.4
func (a Agent) AccountIdentifier(arg0 Account) (*AccountIdentifier, error)
AccountIdentifier calls the "account_identifier" method on the "icpledger" canister.
func (Agent) Icrc10SupportedStandards ¶ added in v0.5.0
func (a Agent) Icrc10SupportedStandards() (*[]struct { Name string `ic:"name" json:"name"` Url string `ic:"url" json:"url"` }, error)
Icrc10SupportedStandards calls the "icrc10_supported_standards" method on the "icpledger" canister.
func (Agent) Icrc1BalanceOf ¶ added in v0.3.4
func (a Agent) Icrc1BalanceOf(arg0 Account) (*Icrc1Tokens, error)
Icrc1BalanceOf calls the "icrc1_balance_of" method on the "icpledger" canister.
func (Agent) Icrc1Decimals ¶ added in v0.3.4
Icrc1Decimals calls the "icrc1_decimals" method on the "icpledger" canister.
func (Agent) Icrc1Fee ¶ added in v0.3.4
func (a Agent) Icrc1Fee() (*Icrc1Tokens, error)
Icrc1Fee calls the "icrc1_fee" method on the "icpledger" canister.
func (Agent) Icrc1Metadata ¶ added in v0.3.4
func (a Agent) Icrc1Metadata() (*[]struct { Field0 string `ic:"0" json:"0"` Field1 Value `ic:"1" json:"1"` }, error)
Icrc1Metadata calls the "icrc1_metadata" method on the "icpledger" canister.
func (Agent) Icrc1MintingAccount ¶ added in v0.3.4
Icrc1MintingAccount calls the "icrc1_minting_account" method on the "icpledger" canister.
func (Agent) Icrc1Name ¶ added in v0.3.4
Icrc1Name calls the "icrc1_name" method on the "icpledger" canister.
func (Agent) Icrc1SupportedStandards ¶ added in v0.3.4
func (a Agent) Icrc1SupportedStandards() (*[]struct { Name string `ic:"name" json:"name"` Url string `ic:"url" json:"url"` }, error)
Icrc1SupportedStandards calls the "icrc1_supported_standards" method on the "icpledger" canister.
func (Agent) Icrc1Symbol ¶ added in v0.3.4
Icrc1Symbol calls the "icrc1_symbol" method on the "icpledger" canister.
func (Agent) Icrc1TotalSupply ¶ added in v0.3.4
func (a Agent) Icrc1TotalSupply() (*Icrc1Tokens, error)
Icrc1TotalSupply calls the "icrc1_total_supply" method on the "icpledger" canister.
func (Agent) Icrc1Transfer ¶ added in v0.3.4
func (a Agent) Icrc1Transfer(arg0 TransferArg) (*Icrc1TransferResult, error)
Icrc1Transfer calls the "icrc1_transfer" method on the "icpledger" canister.
func (Agent) Icrc21CanisterCallConsentMessage ¶ added in v0.5.0
func (a Agent) Icrc21CanisterCallConsentMessage(arg0 Icrc21ConsentMessageRequest) (*Icrc21ConsentMessageResponse, error)
Icrc21CanisterCallConsentMessage calls the "icrc21_canister_call_consent_message" method on the "icpledger" canister.
func (Agent) Icrc2Allowance ¶ added in v0.3.4
func (a Agent) Icrc2Allowance(arg0 AllowanceArgs) (*Allowance, error)
Icrc2Allowance calls the "icrc2_allowance" method on the "icpledger" canister.
func (Agent) Icrc2Approve ¶ added in v0.3.4
func (a Agent) Icrc2Approve(arg0 ApproveArgs) (*ApproveResult, error)
Icrc2Approve calls the "icrc2_approve" method on the "icpledger" canister.
func (Agent) Icrc2TransferFrom ¶ added in v0.3.4
func (a Agent) Icrc2TransferFrom(arg0 TransferFromArgs) (*TransferFromResult, error)
Icrc2TransferFrom calls the "icrc2_transfer_from" method on the "icpledger" canister.
func (Agent) QueryBlocks ¶
func (a Agent) QueryBlocks(arg0 GetBlocksArgs) (*QueryBlocksResponse, error)
QueryBlocks calls the "query_blocks" method on the "icpledger" canister.
func (Agent) QueryEncodedBlocks ¶ added in v0.3.4
func (a Agent) QueryEncodedBlocks(arg0 GetBlocksArgs) (*QueryEncodedBlocksResponse, error)
QueryEncodedBlocks calls the "query_encoded_blocks" method on the "icpledger" canister.
func (Agent) SendDfx ¶ added in v0.3.4
func (a Agent) SendDfx(arg0 SendArgs) (*BlockIndex, error)
SendDfx calls the "send_dfx" method on the "icpledger" canister.
func (Agent) Transfer ¶
func (a Agent) Transfer(arg0 TransferArgs) (*TransferResult, error)
Transfer calls the "transfer" method on the "icpledger" canister.
func (Agent) TransferFee ¶
func (a Agent) TransferFee(arg0 TransferFeeArg) (*TransferFee, error)
TransferFee calls the "transfer_fee" method on the "icpledger" canister.
type Allowance ¶ added in v0.3.4
type Allowance struct { Allowance Icrc1Tokens `ic:"allowance" json:"allowance"` ExpiresAt *Icrc1Timestamp `ic:"expires_at,omitempty" json:"expires_at,omitempty"` }
type AllowanceArgs ¶ added in v0.3.4
type ApproveArgs ¶ added in v0.3.4
type ApproveArgs struct { FromSubaccount *SubAccount `ic:"from_subaccount,omitempty" json:"from_subaccount,omitempty"` Spender Account `ic:"spender" json:"spender"` Amount Icrc1Tokens `ic:"amount" json:"amount"` ExpectedAllowance *Icrc1Tokens `ic:"expected_allowance,omitempty" json:"expected_allowance,omitempty"` ExpiresAt *Icrc1Timestamp `ic:"expires_at,omitempty" json:"expires_at,omitempty"` Fee *Icrc1Tokens `ic:"fee,omitempty" json:"fee,omitempty"` Memo *[]byte `ic:"memo,omitempty" json:"memo,omitempty"` CreatedAtTime *Icrc1Timestamp `ic:"created_at_time,omitempty" json:"created_at_time,omitempty"` }
type ApproveError ¶ added in v0.3.4
type ApproveError struct { BadFee *struct { ExpectedFee Icrc1Tokens `ic:"expected_fee" json:"expected_fee"` } `ic:"BadFee,variant"` InsufficientFunds *struct { Balance Icrc1Tokens `ic:"balance" json:"balance"` } `ic:"InsufficientFunds,variant"` AllowanceChanged *struct { CurrentAllowance Icrc1Tokens `ic:"current_allowance" json:"current_allowance"` } `ic:"AllowanceChanged,variant"` Expired *struct { LedgerTime uint64 `ic:"ledger_time" json:"ledger_time"` } `ic:"Expired,variant"` TooOld *idl.Null `ic:"TooOld,variant"` CreatedInFuture *struct { LedgerTime uint64 `ic:"ledger_time" json:"ledger_time"` } `ic:"CreatedInFuture,variant"` Duplicate *struct { DuplicateOf Icrc1BlockIndex `ic:"duplicate_of" json:"duplicate_of"` } `ic:"Duplicate,variant"` GenericError *struct { ErrorCode idl.Nat `ic:"error_code" json:"error_code"` Message string `ic:"message" json:"message"` } `ic:"GenericError,variant"` }
type ApproveResult ¶ added in v0.3.4
type ApproveResult struct { Ok *Icrc1BlockIndex `ic:"Ok,variant"` Err *ApproveError `ic:"Err,variant"` }
type ArchiveOptions ¶ added in v0.3.4
type ArchiveOptions struct { TriggerThreshold uint64 `ic:"trigger_threshold" json:"trigger_threshold"` NumBlocksToArchive uint64 `ic:"num_blocks_to_archive" json:"num_blocks_to_archive"` NodeMaxMemorySizeBytes *uint64 `ic:"node_max_memory_size_bytes,omitempty" json:"node_max_memory_size_bytes,omitempty"` MaxMessageSizeBytes *uint64 `ic:"max_message_size_bytes,omitempty" json:"max_message_size_bytes,omitempty"` ControllerId principal.Principal `ic:"controller_id" json:"controller_id"` MoreControllerIds *[]principal.Principal `ic:"more_controller_ids,omitempty" json:"more_controller_ids,omitempty"` CyclesForArchiveCreation *uint64 `ic:"cycles_for_archive_creation,omitempty" json:"cycles_for_archive_creation,omitempty"` MaxTransactionsPerResponse *uint64 `ic:"max_transactions_per_response,omitempty" json:"max_transactions_per_response,omitempty"` }
type ArchivedBlocksRange ¶ added in v0.3.4
type ArchivedBlocksRange struct { Start BlockIndex `ic:"start" json:"start"` Length uint64 `ic:"length" json:"length"` Callback QueryArchiveFn `ic:"callback" json:"callback"` }
type ArchivedEncodedBlocksRange ¶ added in v0.3.4
type Block ¶
type Block struct { ParentHash *[]byte `ic:"parent_hash,omitempty" json:"parent_hash,omitempty"` Transaction Transaction `ic:"transaction" json:"transaction"` Timestamp TimeStamp `ic:"timestamp" json:"timestamp"` }
type BlockIndex ¶
type BlockIndex = uint64
type BlockRange ¶
type BlockRange struct {
Blocks []Block `ic:"blocks" json:"blocks"`
}
type FeatureFlags ¶ added in v0.3.4
type FeatureFlags struct {
Icrc2 bool `ic:"icrc2" json:"icrc2"`
}
type GetBlocksArgs ¶
type GetBlocksArgs struct { Start BlockIndex `ic:"start" json:"start"` Length uint64 `ic:"length" json:"length"` }
type Icrc1BlockIndex ¶ added in v0.3.4
type Icrc1Timestamp ¶ added in v0.3.4
type Icrc1Timestamp = uint64
type Icrc1Tokens ¶ added in v0.3.4
type Icrc1TransferError ¶ added in v0.3.4
type Icrc1TransferError struct { BadFee *struct { ExpectedFee Icrc1Tokens `ic:"expected_fee" json:"expected_fee"` } `ic:"BadFee,variant"` BadBurn *struct { MinBurnAmount Icrc1Tokens `ic:"min_burn_amount" json:"min_burn_amount"` } `ic:"BadBurn,variant"` InsufficientFunds *struct { Balance Icrc1Tokens `ic:"balance" json:"balance"` } `ic:"InsufficientFunds,variant"` TooOld *idl.Null `ic:"TooOld,variant"` CreatedInFuture *struct { LedgerTime uint64 `ic:"ledger_time" json:"ledger_time"` } `ic:"CreatedInFuture,variant"` Duplicate *struct { DuplicateOf Icrc1BlockIndex `ic:"duplicate_of" json:"duplicate_of"` } `ic:"Duplicate,variant"` GenericError *struct { ErrorCode idl.Nat `ic:"error_code" json:"error_code"` Message string `ic:"message" json:"message"` } `ic:"GenericError,variant"` }
type Icrc1TransferResult ¶ added in v0.3.4
type Icrc1TransferResult struct { Ok *Icrc1BlockIndex `ic:"Ok,variant"` Err *Icrc1TransferError `ic:"Err,variant"` }
type Icrc21ConsentInfo ¶ added in v0.5.0
type Icrc21ConsentInfo struct { ConsentMessage Icrc21ConsentMessage `ic:"consent_message" json:"consent_message"` Metadata Icrc21ConsentMessageMetadata `ic:"metadata" json:"metadata"` }
type Icrc21ConsentMessage ¶ added in v0.5.0
type Icrc21ConsentMessageMetadata ¶ added in v0.5.0
type Icrc21ConsentMessageMetadata struct {
Language string `ic:"language" json:"language"`
}
type Icrc21ConsentMessageRequest ¶ added in v0.5.0
type Icrc21ConsentMessageRequest struct { Method string `ic:"method" json:"method"` Arg []byte `ic:"arg" json:"arg"` UserPreferences Icrc21ConsentMessageSpec `ic:"user_preferences" json:"user_preferences"` }
type Icrc21ConsentMessageResponse ¶ added in v0.5.0
type Icrc21ConsentMessageResponse struct { Ok *Icrc21ConsentInfo `ic:"Ok,variant"` Err *Icrc21Error `ic:"Err,variant"` }
type Icrc21ConsentMessageSpec ¶ added in v0.5.0
type Icrc21ConsentMessageSpec struct { Metadata Icrc21ConsentMessageMetadata `ic:"metadata" json:"metadata"` DeviceSpec *struct { GenericDisplay *idl.Null `ic:"GenericDisplay,variant"` LineDisplay *struct { CharactersPerLine uint16 `ic:"characters_per_line" json:"characters_per_line"` LinesPerPage uint16 `ic:"lines_per_page" json:"lines_per_page"` } `ic:"LineDisplay,variant"` } `ic:"device_spec,omitempty" json:"device_spec,omitempty"` }
type Icrc21Error ¶ added in v0.5.0
type Icrc21Error struct { UnsupportedCanisterCall *Icrc21ErrorInfo `ic:"UnsupportedCanisterCall,variant"` InsufficientPayment *Icrc21ErrorInfo `ic:"InsufficientPayment,variant"` GenericError *struct { ErrorCode idl.Nat `ic:"error_code" json:"error_code"` Description string `ic:"description" json:"description"` } `ic:"GenericError,variant"` }
type Icrc21ErrorInfo ¶ added in v0.5.0
type Icrc21ErrorInfo struct {
Description string `ic:"description" json:"description"`
}
type InitArgs ¶ added in v0.3.4
type InitArgs struct { MintingAccount TextAccountIdentifier `ic:"minting_account" json:"minting_account"` Icrc1MintingAccount *Account `ic:"icrc1_minting_account,omitempty" json:"icrc1_minting_account,omitempty"` InitialValues []struct { Field0 TextAccountIdentifier `ic:"0" json:"0"` Field1 Tokens `ic:"1" json:"1"` } `ic:"initial_values" json:"initial_values"` MaxMessageSizeBytes *uint64 `ic:"max_message_size_bytes,omitempty" json:"max_message_size_bytes,omitempty"` TransactionWindow *Duration `ic:"transaction_window,omitempty" json:"transaction_window,omitempty"` ArchiveOptions *ArchiveOptions `ic:"archive_options,omitempty" json:"archive_options,omitempty"` SendWhitelist []principal.Principal `ic:"send_whitelist" json:"send_whitelist"` TransferFee *Tokens `ic:"transfer_fee,omitempty" json:"transfer_fee,omitempty"` TokenSymbol *string `ic:"token_symbol,omitempty" json:"token_symbol,omitempty"` TokenName *string `ic:"token_name,omitempty" json:"token_name,omitempty"` FeatureFlags *FeatureFlags `ic:"feature_flags,omitempty" json:"feature_flags,omitempty"` MaximumNumberOfAccounts *uint64 `ic:"maximum_number_of_accounts,omitempty" json:"maximum_number_of_accounts,omitempty"` AccountsOverflowTrimQuantity *uint64 `ic:"accounts_overflow_trim_quantity,omitempty" json:"accounts_overflow_trim_quantity,omitempty"` }
type LedgerCanisterPayload ¶ added in v0.3.4
type LedgerCanisterPayload struct { Init *InitArgs `ic:"Init,variant"` Upgrade **UpgradeArgs `ic:"Upgrade,variant"` }
type Operation ¶
type Operation struct { Mint *struct { To AccountIdentifier `ic:"to" json:"to"` Amount Tokens `ic:"amount" json:"amount"` } `ic:"Mint,variant"` Burn *struct { From AccountIdentifier `ic:"from" json:"from"` Spender *AccountIdentifier `ic:"spender,omitempty" json:"spender,omitempty"` Amount Tokens `ic:"amount" json:"amount"` } `ic:"Burn,variant"` Transfer *struct { From AccountIdentifier `ic:"from" json:"from"` To AccountIdentifier `ic:"to" json:"to"` Amount Tokens `ic:"amount" json:"amount"` Fee Tokens `ic:"fee" json:"fee"` Spender *[]uint8 `ic:"spender,omitempty" json:"spender,omitempty"` } `ic:"Transfer,variant"` Approve *struct { From AccountIdentifier `ic:"from" json:"from"` Spender AccountIdentifier `ic:"spender" json:"spender"` AllowanceE8s idl.Int `ic:"allowance_e8s" json:"allowance_e8s"` Allowance Tokens `ic:"allowance" json:"allowance"` Fee Tokens `ic:"fee" json:"fee"` ExpiresAt *TimeStamp `ic:"expires_at,omitempty" json:"expires_at,omitempty"` ExpectedAllowance *Tokens `ic:"expected_allowance,omitempty" json:"expected_allowance,omitempty"` } `ic:"Approve,variant"` }
type QueryArchiveError ¶
type QueryArchiveError struct { BadFirstBlockIndex *struct { RequestedIndex BlockIndex `ic:"requested_index" json:"requested_index"` FirstValidIndex BlockIndex `ic:"first_valid_index" json:"first_valid_index"` } `ic:"BadFirstBlockIndex,variant"` Other *struct { ErrorCode uint64 `ic:"error_code" json:"error_code"` ErrorMessage string `ic:"error_message" json:"error_message"` } `ic:"Other,variant"` }
type QueryArchiveFn ¶
type QueryArchiveFn struct { }
type QueryArchiveResult ¶
type QueryArchiveResult struct { Ok *BlockRange `ic:"Ok,variant"` Err *QueryArchiveError `ic:"Err,variant"` }
type QueryBlocksResponse ¶
type QueryBlocksResponse struct { ChainLength uint64 `ic:"chain_length" json:"chain_length"` Certificate *[]byte `ic:"certificate,omitempty" json:"certificate,omitempty"` Blocks []Block `ic:"blocks" json:"blocks"` FirstBlockIndex BlockIndex `ic:"first_block_index" json:"first_block_index"` ArchivedBlocks []ArchivedBlocksRange `ic:"archived_blocks" json:"archived_blocks"` }
type QueryEncodedBlocksResponse ¶ added in v0.3.4
type QueryEncodedBlocksResponse struct { Certificate *[]byte `ic:"certificate,omitempty" json:"certificate,omitempty"` Blocks [][]byte `ic:"blocks" json:"blocks"` ChainLength uint64 `ic:"chain_length" json:"chain_length"` FirstBlockIndex uint64 `ic:"first_block_index" json:"first_block_index"` ArchivedBlocks []ArchivedEncodedBlocksRange `ic:"archived_blocks" json:"archived_blocks"` }
type SendArgs ¶ added in v0.3.4
type SendArgs struct { Memo Memo `ic:"memo" json:"memo"` Amount Tokens `ic:"amount" json:"amount"` Fee Tokens `ic:"fee" json:"fee"` FromSubaccount *SubAccount `ic:"from_subaccount,omitempty" json:"from_subaccount,omitempty"` To TextAccountIdentifier `ic:"to" json:"to"` CreatedAtTime *TimeStamp `ic:"created_at_time,omitempty" json:"created_at_time,omitempty"` }
type SubAccount ¶
type SubAccount = []byte
type TextAccountIdentifier ¶ added in v0.3.4
type TextAccountIdentifier = string
type TimeStamp ¶
type TimeStamp struct {
TimestampNanos uint64 `ic:"timestamp_nanos" json:"timestamp_nanos"`
}
type Transaction ¶
type TransferArg ¶ added in v0.3.4
type TransferArg struct { FromSubaccount *SubAccount `ic:"from_subaccount,omitempty" json:"from_subaccount,omitempty"` To Account `ic:"to" json:"to"` Amount Icrc1Tokens `ic:"amount" json:"amount"` Fee *Icrc1Tokens `ic:"fee,omitempty" json:"fee,omitempty"` Memo *[]byte `ic:"memo,omitempty" json:"memo,omitempty"` CreatedAtTime *Icrc1Timestamp `ic:"created_at_time,omitempty" json:"created_at_time,omitempty"` }
type TransferArgs ¶
type TransferArgs struct { Memo Memo `ic:"memo" json:"memo"` Amount Tokens `ic:"amount" json:"amount"` Fee Tokens `ic:"fee" json:"fee"` FromSubaccount *SubAccount `ic:"from_subaccount,omitempty" json:"from_subaccount,omitempty"` To AccountIdentifier `ic:"to" json:"to"` CreatedAtTime *TimeStamp `ic:"created_at_time,omitempty" json:"created_at_time,omitempty"` }
type TransferError ¶
type TransferError struct { BadFee *struct { ExpectedFee Tokens `ic:"expected_fee" json:"expected_fee"` } `ic:"BadFee,variant"` InsufficientFunds *struct { Balance Tokens `ic:"balance" json:"balance"` } `ic:"InsufficientFunds,variant"` TxTooOld *struct { AllowedWindowNanos uint64 `ic:"allowed_window_nanos" json:"allowed_window_nanos"` } `ic:"TxTooOld,variant"` TxCreatedInFuture *idl.Null `ic:"TxCreatedInFuture,variant"` TxDuplicate *struct { DuplicateOf BlockIndex `ic:"duplicate_of" json:"duplicate_of"` } `ic:"TxDuplicate,variant"` }
type TransferFee ¶
type TransferFee struct {
TransferFee Tokens `ic:"transfer_fee" json:"transfer_fee"`
}
type TransferFeeArg ¶
type TransferFeeArg struct { }
type TransferFromArgs ¶ added in v0.3.4
type TransferFromArgs struct { SpenderSubaccount *SubAccount `ic:"spender_subaccount,omitempty" json:"spender_subaccount,omitempty"` From Account `ic:"from" json:"from"` To Account `ic:"to" json:"to"` Amount Icrc1Tokens `ic:"amount" json:"amount"` Fee *Icrc1Tokens `ic:"fee,omitempty" json:"fee,omitempty"` Memo *[]byte `ic:"memo,omitempty" json:"memo,omitempty"` CreatedAtTime *Icrc1Timestamp `ic:"created_at_time,omitempty" json:"created_at_time,omitempty"` }
type TransferFromError ¶ added in v0.3.4
type TransferFromError struct { BadFee *struct { ExpectedFee Icrc1Tokens `ic:"expected_fee" json:"expected_fee"` } `ic:"BadFee,variant"` BadBurn *struct { MinBurnAmount Icrc1Tokens `ic:"min_burn_amount" json:"min_burn_amount"` } `ic:"BadBurn,variant"` InsufficientFunds *struct { Balance Icrc1Tokens `ic:"balance" json:"balance"` } `ic:"InsufficientFunds,variant"` InsufficientAllowance *struct { Allowance Icrc1Tokens `ic:"allowance" json:"allowance"` } `ic:"InsufficientAllowance,variant"` TooOld *idl.Null `ic:"TooOld,variant"` CreatedInFuture *struct { LedgerTime Icrc1Timestamp `ic:"ledger_time" json:"ledger_time"` } `ic:"CreatedInFuture,variant"` Duplicate *struct { DuplicateOf Icrc1BlockIndex `ic:"duplicate_of" json:"duplicate_of"` } `ic:"Duplicate,variant"` GenericError *struct { ErrorCode idl.Nat `ic:"error_code" json:"error_code"` Message string `ic:"message" json:"message"` } `ic:"GenericError,variant"` }
type TransferFromResult ¶ added in v0.3.4
type TransferFromResult struct { Ok *Icrc1BlockIndex `ic:"Ok,variant"` Err *TransferFromError `ic:"Err,variant"` }
type TransferResult ¶
type TransferResult struct { Ok *BlockIndex `ic:"Ok,variant"` Err *TransferError `ic:"Err,variant"` }
type UpgradeArgs ¶ added in v0.3.4
type UpgradeArgs struct { MaximumNumberOfAccounts *uint64 `ic:"maximum_number_of_accounts,omitempty" json:"maximum_number_of_accounts,omitempty"` Icrc1MintingAccount *Account `ic:"icrc1_minting_account,omitempty" json:"icrc1_minting_account,omitempty"` FeatureFlags *FeatureFlags `ic:"feature_flags,omitempty" json:"feature_flags,omitempty"` }