index

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: 0

Documentation

Overview

Package index provides a client for the "index" 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

type Account struct {
	Owner      principal.Principal `ic:"owner" json:"owner"`
	Subaccount *[]byte             `ic:"subaccount,omitempty" json:"subaccount,omitempty"`
}

type Agent

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

Agent is a client for the "index" canister.

func NewAgent

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

NewAgent creates a new agent for the "index" canister.

func (Agent) GetAccountTransactions

func (a Agent) GetAccountTransactions(arg0 GetAccountTransactionsArgs) (*GetTransactionsResult, error)

GetAccountTransactions calls the "get_account_transactions" method on the "index" canister.

func (Agent) LedgerId

func (a Agent) LedgerId() (*principal.Principal, error)

LedgerId calls the "ledger_id" method on the "index" canister.

func (Agent) ListSubaccounts

func (a Agent) ListSubaccounts(arg0 ListSubaccountsArgs) (*[]SubAccount, error)

ListSubaccounts calls the "list_subaccounts" method on the "index" canister.

type Approve

type Approve struct {
	Fee               *idl.Nat `ic:"fee,omitempty" json:"fee,omitempty"`
	From              Account  `ic:"from" json:"from"`
	Memo              *[]uint8 `ic:"memo,omitempty" json:"memo,omitempty"`
	CreatedAtTime     *uint64  `ic:"created_at_time,omitempty" json:"created_at_time,omitempty"`
	Amount            idl.Nat  `ic:"amount" json:"amount"`
	ExpectedAllowance *idl.Nat `ic:"expected_allowance,omitempty" json:"expected_allowance,omitempty"`
	ExpiresAt         *uint64  `ic:"expires_at,omitempty" json:"expires_at,omitempty"`
	Spender           Account  `ic:"spender" json:"spender"`
}

type Burn

type Burn struct {
	From          Account  `ic:"from" json:"from"`
	Memo          *[]uint8 `ic:"memo,omitempty" json:"memo,omitempty"`
	CreatedAtTime *uint64  `ic:"created_at_time,omitempty" json:"created_at_time,omitempty"`
	Amount        idl.Nat  `ic:"amount" json:"amount"`
	Spender       *Account `ic:"spender,omitempty" json:"spender,omitempty"`
}

type GetAccountTransactionsArgs

type GetAccountTransactionsArgs struct {
	Account    Account `ic:"account" json:"account"`
	Start      *TxId   `ic:"start,omitempty" json:"start,omitempty"`
	MaxResults idl.Nat `ic:"max_results" json:"max_results"`
}

type GetTransactions

type GetTransactions struct {
	Transactions []TransactionWithId `ic:"transactions" json:"transactions"`
	OldestTxId   *TxId               `ic:"oldest_tx_id,omitempty" json:"oldest_tx_id,omitempty"`
}

type GetTransactionsErr

type GetTransactionsErr struct {
	Message string `ic:"message" json:"message"`
}

type GetTransactionsResult

type GetTransactionsResult struct {
	Ok  *GetTransactions    `ic:"Ok,variant"`
	Err *GetTransactionsErr `ic:"Err,variant"`
}

type InitArgs

type InitArgs struct {
	LedgerId principal.Principal `ic:"ledger_id" json:"ledger_id"`
}

type ListSubaccountsArgs

type ListSubaccountsArgs struct {
	Owner principal.Principal `ic:"owner" json:"owner"`
	Start *SubAccount         `ic:"start,omitempty" json:"start,omitempty"`
}

type Mint

type Mint struct {
	To            Account  `ic:"to" json:"to"`
	Memo          *[]uint8 `ic:"memo,omitempty" json:"memo,omitempty"`
	CreatedAtTime *uint64  `ic:"created_at_time,omitempty" json:"created_at_time,omitempty"`
	Amount        idl.Nat  `ic:"amount" json:"amount"`
}

type SubAccount

type SubAccount = []byte

type Transaction

type Transaction struct {
	Burn      *Burn     `ic:"burn,omitempty" json:"burn,omitempty"`
	Kind      string    `ic:"kind" json:"kind"`
	Mint      *Mint     `ic:"mint,omitempty" json:"mint,omitempty"`
	Approve   *Approve  `ic:"approve,omitempty" json:"approve,omitempty"`
	Timestamp uint64    `ic:"timestamp" json:"timestamp"`
	Transfer  *Transfer `ic:"transfer,omitempty" json:"transfer,omitempty"`
}

type TransactionWithId

type TransactionWithId struct {
	Id          TxId        `ic:"id" json:"id"`
	Transaction Transaction `ic:"transaction" json:"transaction"`
}

type Transfer

type Transfer struct {
	To            Account  `ic:"to" json:"to"`
	Fee           *idl.Nat `ic:"fee,omitempty" json:"fee,omitempty"`
	From          Account  `ic:"from" json:"from"`
	Memo          *[]uint8 `ic:"memo,omitempty" json:"memo,omitempty"`
	CreatedAtTime *uint64  `ic:"created_at_time,omitempty" json:"created_at_time,omitempty"`
	Amount        idl.Nat  `ic:"amount" json:"amount"`
	Spender       *Account `ic:"spender,omitempty" json:"spender,omitempty"`
}

type TxId

type TxId = idl.Nat

Jump to

Keyboard shortcuts

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