@dfinity/ledger-icrc
Version:
A library for interfacing with ICRC ledgers on the Internet Computer.
22 lines (21 loc) • 1.11 kB
TypeScript
import type { Principal } from "@dfinity/principal";
import { Canister, type QueryParams } from "@dfinity/utils";
import type { GetTransactions, _SERVICE as IcrcIndexService } from "../candid/icrc_index";
import type { IcrcLedgerCanisterOptions } from "./types/canister.options";
import type { GetAccountTransactionsParams } from "./types/index.params";
export declare class IcrcIndexCanister extends Canister<IcrcIndexService> {
static create(options: IcrcLedgerCanisterOptions<IcrcIndexService>): IcrcIndexCanister;
/**
* Get the transactions of an account
*
* Always certified.
* `get_account_transactions` needs to be called with an update
* because the index canisters makes a call to the ledger canister to get the transaction data.
* Index Canister only holds the transactions ids in state, not the whole transaction data.
*/
getTransactions: (params: GetAccountTransactionsParams) => Promise<GetTransactions>;
/**
* Returns the ledger canister ID related to the index canister.
*/
ledgerId: (params: QueryParams) => Promise<Principal>;
}