type Account = T.Account
type Subaccount = T.Subaccount
type AccountBalances = T.AccountBalances
type Transaction = T.Transaction
type Balance = T.Balance
type TransferArgs = T.TransferArgs
type Mint = T.Mint
type BurnArgs = T.BurnArgs
type TransactionRequest = T.TransactionRequest
type TransferError = T.TransferError
type SupportedStandard = T.SupportedStandard
type InitArgs = T.InitArgs
type TokenInitArgs = T.TokenInitArgs
type TokenData = T.TokenData
type MetaDatum = T.MetaDatum
type TxLog = T.TxLog
type TxIndex = T.TxIndex
type TokenInterface = T.TokenInterface
type RosettaInterface = T.RosettaInterface
type FullInterface = T.FullInterface
type ArchiveInterface = T.ArchiveInterface
type GetTransactionsRequest = T.GetTransactionsRequest
type GetTransactionsResponse = T.GetTransactionsResponse
type QueryArchiveFn = T.QueryArchiveFn
type TransactionRange = T.TransactionRange
type ArchivedTransaction = T.ArchivedTransaction
type TransferResult = T.TransferResult
let MAX_TRANSACTIONS_IN_LEDGER
let MAX_TRANSACTION_BYTES : Nat64
let MAX_TRANSACTIONS_PER_REQUEST
func init(args : T.InitArgs) : T.TokenData
Initialize a new ICRC-1 token
func name(token : T.TokenData) : Text
Retrieve the name of the token
func symbol(token : T.TokenData) : Text
Retrieve the symbol of the token
func decimals() : Nat8
Retrieve the number of decimals specified for the token
func fee(token : T.TokenData) : T.Balance
Retrieve the fee for each transfer
func set_fee(token : T.TokenData, fee : Nat)
Set the fee for each transfer
func metadata(token : T.TokenData) : [T.MetaDatum]
Retrieve all the metadata of the token
func total_supply(token : T.TokenData) : T.Balance
Returns the total supply of circulating tokens
func minted_supply(token : T.TokenData) : T.Balance
Returns the total supply of minted tokens
func burned_supply(token : T.TokenData) : T.Balance
Returns the total supply of burned tokens
func max_supply(token : T.TokenData) : T.Balance
Returns the maximum supply of tokens
func minting_account(token : T.TokenData) : T.Account
Returns the account with the permission to mint tokens
Note: The minting account can only participate in minting and burning transactions, so any tokens sent to it will be considered burned.
func balance_of(account : T.Account) : T.Balance
Retrieve the balance of a given account
func supported_standards(token : T.TokenData) : [T.SupportedStandard]
Returns an array of standards supported by this token
func balance_from_float(token : T.TokenData, float : Float) : T.Balance
Formats a float to a nat balance and applies the correct number of decimal places
func transfer(token : T.TokenData, args : T.TransferArgs, caller : Principal) : async T.TransferResult
Transfers tokens from one account to another account (minting and burning included)
func mint(token : T.TokenData, args : T.Mint, caller : Principal) : async T.TransferResult
Helper function to mint tokens with minimum args
func burn(token : T.TokenData, args : T.BurnArgs, caller : Principal) : async T.TransferResult
Helper function to burn tokens with minimum args
func total_transactions(token : T.TokenData) : Nat
Returns the total number of transactions that have been processed by the given token.
func get_transaction(token : T.TokenData, tx_index : T.TxIndex) : async ?T.Transaction
Retrieves the transaction specified by the given tx_index
func get_transactions(token : T.TokenData, req : T.GetTransactionsRequest) : T.GetTransactionsResponse
Retrieves the transactions specified by the given range