@dfinity/ledger-icrc 2.9.0-next-2025-07-02 → 2.9.0-next-2025-07-07
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -0
- package/dist/candid/icrc_index-ng.did +1 -1
- package/dist/candid/icrc_ledger.did +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,6 +74,10 @@ Parameters:
|
|
|
74
74
|
|
|
75
75
|
- `account`: : Principal, subaccount?: Uint8Array }
|
|
76
76
|
|
|
77
|
+
Returns:
|
|
78
|
+
|
|
79
|
+
string
|
|
80
|
+
|
|
77
81
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/utils/ledger.utils.ts#L27)
|
|
78
82
|
|
|
79
83
|
#### :gear: decodeIcrcAccount
|
|
@@ -89,6 +93,10 @@ Parameters:
|
|
|
89
93
|
|
|
90
94
|
- `accountString`: string
|
|
91
95
|
|
|
96
|
+
Returns:
|
|
97
|
+
|
|
98
|
+
IcrcAccount { owner: Principal, subaccount?: Uint8Array }
|
|
99
|
+
|
|
92
100
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/utils/ledger.utils.ts#L67)
|
|
93
101
|
|
|
94
102
|
#### :gear: mapTokenMetadata
|
|
@@ -108,6 +116,10 @@ Parameters:
|
|
|
108
116
|
|
|
109
117
|
- `response`: - An array of key-value pairs representing token metadata.
|
|
110
118
|
|
|
119
|
+
Returns:
|
|
120
|
+
|
|
121
|
+
- A structured metadata record or `undefined` if required fields are missing.
|
|
122
|
+
|
|
111
123
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/utils/ledger.utils.ts#L118)
|
|
112
124
|
|
|
113
125
|
#### :gear: decodePayment
|
|
@@ -139,6 +151,10 @@ Parameters:
|
|
|
139
151
|
|
|
140
152
|
- `code`: string
|
|
141
153
|
|
|
154
|
+
Returns:
|
|
155
|
+
|
|
156
|
+
: string; identifier: string; amount?: number } | undefined
|
|
157
|
+
|
|
142
158
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/utils/payment.utils.ts#L26)
|
|
143
159
|
|
|
144
160
|
### :factory: IcrcCanister
|
|
@@ -161,6 +177,10 @@ Parameters:
|
|
|
161
177
|
|
|
162
178
|
- `params`: The parameters to get the balance of an account.
|
|
163
179
|
|
|
180
|
+
Returns:
|
|
181
|
+
|
|
182
|
+
The balance of the given account.
|
|
183
|
+
|
|
164
184
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/canister.ts#L18)
|
|
165
185
|
|
|
166
186
|
### :factory: IcrcLedgerCanister
|
|
@@ -210,6 +230,10 @@ The ledger transaction fees.
|
|
|
210
230
|
| ---------------- | ------------------------------------------ |
|
|
211
231
|
| `transactionFee` | `(params: QueryParams) => Promise<bigint>` |
|
|
212
232
|
|
|
233
|
+
Returns:
|
|
234
|
+
|
|
235
|
+
The ledger transaction fees in Tokens
|
|
236
|
+
|
|
213
237
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L62)
|
|
214
238
|
|
|
215
239
|
##### :gear: balance
|
|
@@ -224,6 +248,10 @@ Parameters:
|
|
|
224
248
|
|
|
225
249
|
- `params`: The parameters to get the balance of an account.
|
|
226
250
|
|
|
251
|
+
Returns:
|
|
252
|
+
|
|
253
|
+
The balance of the given account.
|
|
254
|
+
|
|
227
255
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L71)
|
|
228
256
|
|
|
229
257
|
##### :gear: transfer
|
|
@@ -296,6 +324,10 @@ Parameters:
|
|
|
296
324
|
|
|
297
325
|
- `params`: The parameters to call the allowance.
|
|
298
326
|
|
|
327
|
+
Returns:
|
|
328
|
+
|
|
329
|
+
The token allowance. If there is no active approval, the ledger MUST return `{ allowance = 0; expires_at = null }`.
|
|
330
|
+
|
|
299
331
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L156)
|
|
300
332
|
|
|
301
333
|
##### :gear: consentMessage
|
|
@@ -310,6 +342,10 @@ Parameters:
|
|
|
310
342
|
|
|
311
343
|
- `params`: - The request parameters containing the method name, arguments, and consent preferences (e.g., language).
|
|
312
344
|
|
|
345
|
+
Returns:
|
|
346
|
+
|
|
347
|
+
- A promise that resolves to the consent message response, which includes the consent message in the specified language and other related information.
|
|
348
|
+
|
|
313
349
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L174)
|
|
314
350
|
|
|
315
351
|
##### :gear: getBlocks
|
|
@@ -324,6 +360,10 @@ Parameters:
|
|
|
324
360
|
|
|
325
361
|
- `params`: The parameters to get the blocks.
|
|
326
362
|
|
|
363
|
+
Returns:
|
|
364
|
+
|
|
365
|
+
The list of blocks.
|
|
366
|
+
|
|
327
367
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L198)
|
|
328
368
|
|
|
329
369
|
### :factory: IcrcIndexCanister
|
|
@@ -407,6 +447,10 @@ Parameters:
|
|
|
407
447
|
|
|
408
448
|
- `params`: The parameters to get the transactions of an account.
|
|
409
449
|
|
|
450
|
+
Returns:
|
|
451
|
+
|
|
452
|
+
The list of transactions and further related information of the given account.
|
|
453
|
+
|
|
410
454
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/index-ng.canister.ts#L49)
|
|
411
455
|
|
|
412
456
|
##### :gear: ledgerId
|
|
@@ -431,6 +475,10 @@ Parameters:
|
|
|
431
475
|
|
|
432
476
|
- `params`: The parameters to get the status of the index canister.
|
|
433
477
|
|
|
478
|
+
Returns:
|
|
479
|
+
|
|
480
|
+
The status of the index canister.
|
|
481
|
+
|
|
434
482
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/index-ng.canister.ts#L78)
|
|
435
483
|
|
|
436
484
|
##### :gear: listSubaccounts
|
|
@@ -445,6 +493,10 @@ Parameters:
|
|
|
445
493
|
|
|
446
494
|
- `params`: The parameters to get the list of subaccounts.
|
|
447
495
|
|
|
496
|
+
Returns:
|
|
497
|
+
|
|
498
|
+
The list of subaccounts.
|
|
499
|
+
|
|
448
500
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/index-ng.canister.ts#L87)
|
|
449
501
|
|
|
450
502
|
<!-- TSDOC_END -->
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit e915efe (2025-07-02 tags: release-2025-07-03_03-27-base) 'rs/ledger_suite/icrc1/index-ng/index-ng.did' by import-candid
|
|
2
2
|
type Tokens = nat;
|
|
3
3
|
|
|
4
4
|
type InitArg = record {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit e915efe (2025-07-02 tags: release-2025-07-03_03-27-base) 'rs/ledger_suite/icrc1/ledger/ledger.did' by import-candid
|
|
2
2
|
type BlockIndex = nat;
|
|
3
3
|
type Subaccount = blob;
|
|
4
4
|
// Number of nanoseconds since the UNIX epoch in UTC timezone.
|
package/package.json
CHANGED