icrc1

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 icrc1 provides a client for the "icrc1" 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 *Subaccount         `ic:"subaccount,omitempty" json:"subaccount,omitempty"`
}

type Agent

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

Agent is a client for the "icrc1" canister.

func NewAgent

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

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

func (Agent) Icrc1BalanceOf

func (a Agent) Icrc1BalanceOf(arg0 Account) (*idl.Nat, error)

Icrc1BalanceOf calls the "icrc1_balance_of" method on the "icrc1" canister.

func (Agent) Icrc1Decimals

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

Icrc1Decimals calls the "icrc1_decimals" method on the "icrc1" canister.

func (Agent) Icrc1Fee

func (a Agent) Icrc1Fee() (*idl.Nat, error)

Icrc1Fee calls the "icrc1_fee" method on the "icrc1" canister.

func (Agent) Icrc1Metadata

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 "icrc1" canister.

func (Agent) Icrc1MintingAccount

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

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

func (Agent) Icrc1Name

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

Icrc1Name calls the "icrc1_name" method on the "icrc1" canister.

func (Agent) Icrc1SupportedStandards

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 "icrc1" canister.

func (Agent) Icrc1Symbol

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

Icrc1Symbol calls the "icrc1_symbol" method on the "icrc1" canister.

func (Agent) Icrc1TotalSupply

func (a Agent) Icrc1TotalSupply() (*idl.Nat, error)

Icrc1TotalSupply calls the "icrc1_total_supply" method on the "icrc1" canister.

func (Agent) Icrc1Transfer

func (a Agent) Icrc1Transfer(arg0 TransferArgs) (*struct {
	Ok  *idl.Nat       `ic:"Ok,variant"`
	Err *TransferError `ic:"Err,variant"`
}, error)

Icrc1Transfer calls the "icrc1_transfer" method on the "icrc1" canister.

type Duration

type Duration = uint64

type Subaccount

type Subaccount = []byte

type Timestamp

type Timestamp = uint64

type TransferArgs

type TransferArgs struct {
	FromSubaccount *Subaccount `ic:"from_subaccount,omitempty" json:"from_subaccount,omitempty"`
	To             Account     `ic:"to" json:"to"`
	Amount         idl.Nat     `ic:"amount" json:"amount"`
	Fee            *idl.Nat    `ic:"fee,omitempty" json:"fee,omitempty"`
	Memo           *[]byte     `ic:"memo,omitempty" json:"memo,omitempty"`
	CreatedAtTime  *Timestamp  `ic:"created_at_time,omitempty" json:"created_at_time,omitempty"`
}

type TransferError

type TransferError struct {
	BadFee *struct {
		ExpectedFee idl.Nat `ic:"expected_fee" json:"expected_fee"`
	} `ic:"BadFee,variant"`
	BadBurn *struct {
		MinBurnAmount idl.Nat `ic:"min_burn_amount" json:"min_burn_amount"`
	} `ic:"BadBurn,variant"`
	InsufficientFunds *struct {
		Balance idl.Nat `ic:"balance" json:"balance"`
	} `ic:"InsufficientFunds,variant"`
	TooOld          *idl.Null `ic:"TooOld,variant"`
	CreatedInFuture *struct {
		LedgerTime Timestamp `ic:"ledger_time" json:"ledger_time"`
	} `ic:"CreatedInFuture,variant"`
	Duplicate *struct {
		DuplicateOf idl.Nat `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 Value

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