import { Canister } from '../../_canister'; import { type Account, type ApproveArgs, type ApproveResult, type IcrcCanisterOptions, type TransferArgs, type TransferFromArgs, type TransferFromResult, type TransferResult } from './schema'; /** * Provides a simple interface to interact with an ICRC Ledger, * when developing Juno Serverless Functions in TypeScript. * * @param {CanisterOptions} [options] - The options providing the ICRC ledger canister ID. */ export declare class IcrcLedgerCanister extends Canister { constructor(options: IcrcCanisterOptions); /** * Returns the balance of an ICRC account. * * @param {Account} account - The account to query. * @returns {Promise} The token balance for the account. */ icrc1BalanceOf: ({ account }: { account: Account; }) => Promise; /** * Transfers tokens using the ICRC-1 `icrc1_transfer` method. * * Use this to send tokens from the caller's account to another account * when writing Juno Serverless Functions in TypeScript. * * @param {TransferArgs} args - Transfer arguments (amount, fee, to, memo, created_at_time, etc.). * @returns {Promise} The result of the transfer. */ icrc1Transfer: ({ args }: { args: TransferArgs; }) => Promise; /** * Transfers tokens using the ICRC-2 `icrc2_transfer_from` method. * * Allows transferring tokens from another user's account when an approval * has previously been granted via `icrc2_approve`. * * @param {TransferFromArgs} args - Transfer-from arguments (amount, from_subaccount, spender, etc.). * @returns {Promise} The result of the transfer-from operation. */ icrc2TransferFrom: ({ args }: { args: TransferFromArgs; }) => Promise; /** * Approves a spender to transfer tokens on behalf of the caller using the ICRC-2 `icrc2_approve` method. * * @param {ApproveArgs} args - Approve arguments (amount, spender, fee, expires_at, etc.). * @returns {Promise} The result of the approval. */ icrc2Approve: ({ args }: { args: ApproveArgs; }) => Promise; }