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 AccountBalanceArgs
- type AccountIdentifier
- type Agent
- func (a Agent) AccountBalance(arg0 AccountBalanceArgs) (*Tokens, error)
- func (a Agent) Archives() (*Archives, error)
- func (a Agent) Decimals() (..., error)
- func (a Agent) Name() (..., error)
- func (a Agent) QueryBlocks(arg0 GetBlocksArgs) (*QueryBlocksResponse, error)
- func (a Agent) Symbol() (..., error)
- func (a Agent) Transfer(arg0 TransferArgs) (*TransferResult, error)
- func (a Agent) TransferFee(arg0 TransferFeeArg) (*TransferFee, error)
- type Archive
- type Archives
- type Block
- type BlockIndex
- type BlockRange
- type GetBlocksArgs
- type Memo
- type Operation
- type QueryArchiveError
- type QueryArchiveFn
- type QueryArchiveResult
- type QueryBlocksResponse
- type SubAccount
- type TimeStamp
- type Tokens
- type Transaction
- type TransferArgs
- type TransferError
- type TransferFee
- type TransferFeeArg
- type TransferResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalanceArgs ¶
type AccountBalanceArgs = struct {
Account AccountIdentifier `ic:"account"`
}
type AccountIdentifier ¶
type AccountIdentifier = []byte
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
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) QueryBlocks ¶
func (a Agent) QueryBlocks(arg0 GetBlocksArgs) (*QueryBlocksResponse, error)
QueryBlocks calls the "query_blocks" 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 Block ¶
type Block = struct {
ParentHash *[]byte `ic:"parent_hash,omitempty"`
Transaction Transaction `ic:"transaction"`
Timestamp TimeStamp `ic:"timestamp"`
}
type BlockIndex ¶
type BlockIndex = uint64
type BlockRange ¶
type BlockRange = struct {
Blocks []Block `ic:"blocks"`
}
type GetBlocksArgs ¶
type GetBlocksArgs = struct {
Start BlockIndex `ic:"start"`
Length uint64 `ic:"length"`
}
type Operation ¶
type Operation = struct {
Mint *struct {
To AccountIdentifier `ic:"to"`
Amount Tokens `ic:"amount"`
} `ic:"Mint,variant"`
Burn *struct {
From AccountIdentifier `ic:"from"`
Amount Tokens `ic:"amount"`
} `ic:"Burn,variant"`
Transfer *struct {
From AccountIdentifier `ic:"from"`
To AccountIdentifier `ic:"to"`
Amount Tokens `ic:"amount"`
Fee Tokens `ic:"fee"`
} `ic:"Transfer,variant"`
Approve *struct {
From AccountIdentifier `ic:"from"`
Spender AccountIdentifier `ic:"spender"`
AllowanceE8s idl.Int `ic:"allowance_e8s"`
Fee Tokens `ic:"fee"`
ExpiresAt *TimeStamp `ic:"expires_at,omitempty"`
} `ic:"Approve,variant"`
TransferFrom *struct {
From AccountIdentifier `ic:"from"`
To AccountIdentifier `ic:"to"`
Spender AccountIdentifier `ic:"spender"`
Amount Tokens `ic:"amount"`
Fee Tokens `ic:"fee"`
} `ic:"TransferFrom,variant"`
}
type QueryArchiveError ¶
type QueryArchiveError = struct {
BadFirstBlockIndex *struct {
RequestedIndex BlockIndex `ic:"requested_index"`
FirstValidIndex BlockIndex `ic:"first_valid_index"`
} `ic:"BadFirstBlockIndex,variant"`
Other *struct {
ErrorCode uint64 `ic:"error_code"`
ErrorMessage string `ic:"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"`
Certificate *[]byte `ic:"certificate,omitempty"`
Blocks []Block `ic:"blocks"`
FirstBlockIndex BlockIndex `ic:"first_block_index"`
ArchivedBlocks []struct {
Start BlockIndex `ic:"start"`
Length uint64 `ic:"length"`
Callback QueryArchiveFn `ic:"callback"`
} `ic:"archived_blocks"`
}
type SubAccount ¶
type SubAccount = []byte
type Transaction ¶
type TransferArgs ¶
type TransferArgs = struct {
Memo Memo `ic:"memo"`
Amount Tokens `ic:"amount"`
Fee Tokens `ic:"fee"`
FromSubaccount *SubAccount `ic:"from_subaccount,omitempty"`
To AccountIdentifier `ic:"to"`
CreatedAtTime *TimeStamp `ic:"created_at_time,omitempty"`
}
type TransferError ¶
type TransferError = struct {
BadFee *struct {
ExpectedFee Tokens `ic:"expected_fee"`
} `ic:"BadFee,variant"`
InsufficientFunds *struct {
Balance Tokens `ic:"balance"`
} `ic:"InsufficientFunds,variant"`
TxTooOld *struct {
AllowedWindowNanos uint64 `ic:"allowed_window_nanos"`
} `ic:"TxTooOld,variant"`
TxCreatedInFuture *struct{} `ic:"TxCreatedInFuture,variant"`
TxDuplicate *struct {
DuplicateOf BlockIndex `ic:"duplicate_of"`
} `ic:"TxDuplicate,variant"`
}
type TransferFee ¶
type TransferFee = struct {
TransferFee Tokens `ic:"transfer_fee"`
}
type TransferFeeArg ¶
type TransferFeeArg = struct {
}
type TransferResult ¶
type TransferResult = struct {
Ok *BlockIndex `ic:"Ok,variant"`
Err *TransferError `ic:"Err,variant"`
}
Click to show internal directories.
Click to hide internal directories.