icpledger

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

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

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

type Agent struct {
	*agent.Agent
	CanisterId principal.Principal
}

Agent is a client for the "icpledger" canister.

func NewAgent

func NewAgent(canisterId principal.Principal, config agent.Config) (*Agent, error)

NewAgent creates a new agent 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) Archives

func (a Agent) Archives() (*Archives, error)

Archives calls the "archives" method on the "icpledger" canister.

func (Agent) Decimals

func (a Agent) Decimals() (*struct {
	Decimals uint32 `ic:"decimals" json:"decimals"`
}, error)

Decimals calls the "decimals" 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

func (a Agent) Icrc1Decimals() (*uint8, error)

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

func (a Agent) Icrc1MintingAccount() (**Account, error)

Icrc1MintingAccount calls the "icrc1_minting_account" method on the "icpledger" canister.

func (Agent) Icrc1Name added in v0.3.4

func (a Agent) Icrc1Name() (*string, error)

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

func (a Agent) Icrc1Symbol() (*string, error)

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) 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) Name

func (a Agent) Name() (*struct {
	Name string `ic:"name" json:"name"`
}, error)

Name calls the "name" 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) Symbol

func (a Agent) Symbol() (*struct {
	Symbol string `ic:"symbol" json:"symbol"`
}, error)

Symbol calls the "symbol" 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 AllowanceArgs struct {
	Account Account `ic:"account" json:"account"`
	Spender Account `ic:"spender" json:"spender"`
}

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"`
	TemporarilyUnavailable *idl.Null `ic:"TemporarilyUnavailable,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 Archive

type Archive struct {
	CanisterId principal.Principal `ic:"canister_id" json:"canister_id"`
}

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 ArchivedEncodedBlocksRange struct {
	Callback struct {
	} `ic:"callback" json:"callback"`
	Start  uint64 `ic:"start" json:"start"`
	Length uint64 `ic:"length" json:"length"`
}

type Archives

type Archives struct {
	Archives []Archive `ic:"archives" json:"archives"`
}

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 Duration added in v0.3.4

type Duration struct {
	Secs  uint64 `ic:"secs" json:"secs"`
	Nanos uint32 `ic:"nanos" json:"nanos"`
}

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 Icrc1BlockIndex = idl.Nat

type Icrc1Timestamp added in v0.3.4

type Icrc1Timestamp = uint64

type Icrc1Tokens added in v0.3.4

type Icrc1Tokens = idl.Nat

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"`
	TemporarilyUnavailable *idl.Null `ic:"TemporarilyUnavailable,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 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 Memo

type Memo = uint64

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 Tokens

type Tokens struct {
	E8s uint64 `ic:"e8s" json:"e8s"`
}

type Transaction

type Transaction struct {
	Memo          Memo       `ic:"memo" json:"memo"`
	Icrc1Memo     *[]byte    `ic:"icrc1_memo,omitempty" json:"icrc1_memo,omitempty"`
	Operation     *Operation `ic:"operation,omitempty" json:"operation,omitempty"`
	CreatedAtTime TimeStamp  `ic:"created_at_time" json:"created_at_time"`
}

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"`
	TemporarilyUnavailable *idl.Null `ic:"TemporarilyUnavailable,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"`
}

type Value added in v0.3.4

type Value struct {
	Nat  *idl.Nat `ic:"Nat,variant"`
	Int  *idl.Int `ic:"Int,variant"`
	Text *string  `ic:"Text,variant"`
	Blob *[]byte  `ic:"Blob,variant"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL