From 35a36b47a6dd8a859b1a83c2938e468a210865d4 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Tue, 21 Apr 2026 13:19:00 +0200 Subject: [PATCH] docs: fix IcrcLedgerCanister requires a principal --- references/functions-typescript.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/references/functions-typescript.md b/references/functions-typescript.md index c1dfd54..4346c86 100644 --- a/references/functions-typescript.md +++ b/references/functions-typescript.md @@ -359,7 +359,7 @@ const result = await ledger.transfer({ // ICRC Ledger (ckBTC, ckETH, etc.) import { IcrcLedgerCanister } from "@junobuild/functions/canisters/ledger/icrc"; -const icrc = new IcrcLedgerCanister({ canisterId: "your-icrc-ledger-id" }); +const icrc = new IcrcLedgerCanister({ canisterId: Principal.fromText("your-icrc-ledger-id") }); const balance = await icrc.icrc1BalanceOf({ account: { owner: Principal.fromText("...") } }); await icrc.icrc1Transfer({ args: { to: { owner: ... }, amount: 1_000_000n } }); await icrc.icrc2TransferFrom({ args: { from: ..., to: ..., amount: ... } });