type Account = T.Accounttype Subaccount = T.Subaccounttype AccountBalances = T.AccountBalancestype Transaction = T.Transactiontype Balance = T.Balancetype TransferArgs = T.TransferArgstype Mint = T.Minttype BurnArgs = T.BurnArgstype TransactionRequest = T.TransactionRequesttype TransferError = T.TransferErrortype SupportedStandard = T.SupportedStandardtype InitArgs = T.InitArgstype TokenInitArgs = T.TokenInitArgstype TokenData = T.TokenDatatype MetaDatum = T.MetaDatumtype TxLog = T.TxLogtype TxIndex = T.TxIndextype TokenInterface = T.TokenInterfacetype RosettaInterface = T.RosettaInterfacetype FullInterface = T.FullInterfacetype ArchiveInterface = T.ArchiveInterfacetype GetTransactionsRequest = T.GetTransactionsRequesttype GetTransactionsResponse = T.GetTransactionsResponsetype QueryArchiveFn = T.QueryArchiveFntype TransactionRange = T.TransactionRangetype ArchivedTransaction = T.ArchivedTransactiontype TransferResult = T.TransferResultlet MAX_TRANSACTIONS_IN_LEDGERlet MAX_TRANSACTION_BYTES : Nat64let MAX_TRANSACTIONS_PER_REQUESTfunc init(args : T.InitArgs) : T.TokenDataInitialize a new ICRC-1 token
func name(token : T.TokenData) : TextRetrieve the name of the token
func symbol(token : T.TokenData) : TextRetrieve the symbol of the token
func decimals() : Nat8Retrieve the number of decimals specified for the token
func fee(token : T.TokenData) : T.BalanceRetrieve 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.BalanceReturns the total supply of circulating tokens
func minted_supply(token : T.TokenData) : T.BalanceReturns the total supply of minted tokens
func burned_supply(token : T.TokenData) : T.BalanceReturns the total supply of burned tokens
func max_supply(token : T.TokenData) : T.BalanceReturns the maximum supply of tokens
func minting_account(token : T.TokenData) : T.AccountReturns 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.BalanceRetrieve 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.BalanceFormats 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.TransferResultTransfers tokens from one account to another account (minting and burning included)
func mint(token : T.TokenData, args : T.Mint, caller : Principal) : async T.TransferResultHelper function to mint tokens with minimum args
func burn(token : T.TokenData, args : T.BurnArgs, caller : Principal) : async T.TransferResultHelper function to burn tokens with minimum args
func total_transactions(token : T.TokenData) : NatReturns 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.TransactionRetrieves the transaction specified by the given tx_index
func get_transactions(token : T.TokenData, req : T.GetTransactionsRequest) : T.GetTransactionsResponseRetrieves the transactions specified by the given range