@dfinity/ledger-icrc 2.9.0 → 2.9.1
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 +79 -12
- package/dist/candid/icrc_index-ng.did +1 -1
- package/dist/candid/icrc_ledger.did +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/chunk-3CTNWJOV.js +2 -0
- package/dist/esm/chunk-3CTNWJOV.js.map +7 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/ledger.canister.js +1 -1
- package/dist/types/errors/ledger.errors.d.ts +4 -1
- package/dist/types/ledger.canister.d.ts +12 -0
- package/package.json +2 -2
- package/dist/esm/chunk-NLNIA7XQ.js +0 -2
- package/dist/esm/chunk-NLNIA7XQ.js.map +0 -7
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,11 +177,15 @@ 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
|
|
167
187
|
|
|
168
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#
|
|
188
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L41)
|
|
169
189
|
|
|
170
190
|
#### Static Methods
|
|
171
191
|
|
|
@@ -177,7 +197,7 @@ Parameters:
|
|
|
177
197
|
| -------- | ---------------------------------------------------------------------- |
|
|
178
198
|
| `create` | `(options: IcrcLedgerCanisterOptions<_SERVICE>) => IcrcLedgerCanister` |
|
|
179
199
|
|
|
180
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#
|
|
200
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L42)
|
|
181
201
|
|
|
182
202
|
#### Methods
|
|
183
203
|
|
|
@@ -191,6 +211,7 @@ Parameters:
|
|
|
191
211
|
- [allowance](#gear-allowance)
|
|
192
212
|
- [consentMessage](#gear-consentmessage)
|
|
193
213
|
- [getBlocks](#gear-getblocks)
|
|
214
|
+
- [getIndexPrincipal](#gear-getindexprincipal)
|
|
194
215
|
|
|
195
216
|
##### :gear: metadata
|
|
196
217
|
|
|
@@ -200,7 +221,7 @@ The token metadata (name, symbol, etc.).
|
|
|
200
221
|
| ---------- | ------------------------------------------------------------- |
|
|
201
222
|
| `metadata` | `(params: QueryParams) => Promise<IcrcTokenMetadataResponse>` |
|
|
202
223
|
|
|
203
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#
|
|
224
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L56)
|
|
204
225
|
|
|
205
226
|
##### :gear: transactionFee
|
|
206
227
|
|
|
@@ -210,7 +231,11 @@ The ledger transaction fees.
|
|
|
210
231
|
| ---------------- | ------------------------------------------ |
|
|
211
232
|
| `transactionFee` | `(params: QueryParams) => Promise<bigint>` |
|
|
212
233
|
|
|
213
|
-
|
|
234
|
+
Returns:
|
|
235
|
+
|
|
236
|
+
The ledger transaction fees in Tokens
|
|
237
|
+
|
|
238
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L64)
|
|
214
239
|
|
|
215
240
|
##### :gear: balance
|
|
216
241
|
|
|
@@ -224,7 +249,11 @@ Parameters:
|
|
|
224
249
|
|
|
225
250
|
- `params`: The parameters to get the balance of an account.
|
|
226
251
|
|
|
227
|
-
|
|
252
|
+
Returns:
|
|
253
|
+
|
|
254
|
+
The balance of the given account.
|
|
255
|
+
|
|
256
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L73)
|
|
228
257
|
|
|
229
258
|
##### :gear: transfer
|
|
230
259
|
|
|
@@ -238,7 +267,7 @@ Parameters:
|
|
|
238
267
|
|
|
239
268
|
- `params`: The parameters to transfer tokens.
|
|
240
269
|
|
|
241
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#
|
|
270
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L86)
|
|
242
271
|
|
|
243
272
|
##### :gear: totalTokensSupply
|
|
244
273
|
|
|
@@ -248,7 +277,7 @@ Returns the total supply of tokens.
|
|
|
248
277
|
| ------------------- | ------------------------------------------ |
|
|
249
278
|
| `totalTokensSupply` | `(params: QueryParams) => Promise<bigint>` |
|
|
250
279
|
|
|
251
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#
|
|
280
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L102)
|
|
252
281
|
|
|
253
282
|
##### :gear: transferFrom
|
|
254
283
|
|
|
@@ -264,7 +293,7 @@ Parameters:
|
|
|
264
293
|
|
|
265
294
|
- `params`: The parameters to transfer tokens from to.
|
|
266
295
|
|
|
267
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#
|
|
296
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L114)
|
|
268
297
|
|
|
269
298
|
##### :gear: approve
|
|
270
299
|
|
|
@@ -280,7 +309,7 @@ Parameters:
|
|
|
280
309
|
|
|
281
310
|
- `params`: The parameters to approve.
|
|
282
311
|
|
|
283
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#
|
|
312
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L136)
|
|
284
313
|
|
|
285
314
|
##### :gear: allowance
|
|
286
315
|
|
|
@@ -296,7 +325,11 @@ Parameters:
|
|
|
296
325
|
|
|
297
326
|
- `params`: The parameters to call the allowance.
|
|
298
327
|
|
|
299
|
-
|
|
328
|
+
Returns:
|
|
329
|
+
|
|
330
|
+
The token allowance. If there is no active approval, the ledger MUST return `{ allowance = 0; expires_at = null }`.
|
|
331
|
+
|
|
332
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L158)
|
|
300
333
|
|
|
301
334
|
##### :gear: consentMessage
|
|
302
335
|
|
|
@@ -310,7 +343,11 @@ Parameters:
|
|
|
310
343
|
|
|
311
344
|
- `params`: - The request parameters containing the method name, arguments, and consent preferences (e.g., language).
|
|
312
345
|
|
|
313
|
-
|
|
346
|
+
Returns:
|
|
347
|
+
|
|
348
|
+
- A promise that resolves to the consent message response, which includes the consent message in the specified language and other related information.
|
|
349
|
+
|
|
350
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L176)
|
|
314
351
|
|
|
315
352
|
##### :gear: getBlocks
|
|
316
353
|
|
|
@@ -324,7 +361,25 @@ Parameters:
|
|
|
324
361
|
|
|
325
362
|
- `params`: The parameters to get the blocks.
|
|
326
363
|
|
|
327
|
-
|
|
364
|
+
Returns:
|
|
365
|
+
|
|
366
|
+
The list of blocks.
|
|
367
|
+
|
|
368
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L200)
|
|
369
|
+
|
|
370
|
+
##### :gear: getIndexPrincipal
|
|
371
|
+
|
|
372
|
+
Returns the principal of the index canister for the ledger, if one was defined as such.
|
|
373
|
+
|
|
374
|
+
| Method | Type |
|
|
375
|
+
| ------------------- | --------------------------------------------- |
|
|
376
|
+
| `getIndexPrincipal` | `(params: QueryParams) => Promise<Principal>` |
|
|
377
|
+
|
|
378
|
+
Returns:
|
|
379
|
+
|
|
380
|
+
The principal of the index canister.
|
|
381
|
+
|
|
382
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/ledger.canister.ts#L213)
|
|
328
383
|
|
|
329
384
|
### :factory: IcrcIndexCanister
|
|
330
385
|
|
|
@@ -407,6 +462,10 @@ Parameters:
|
|
|
407
462
|
|
|
408
463
|
- `params`: The parameters to get the transactions of an account.
|
|
409
464
|
|
|
465
|
+
Returns:
|
|
466
|
+
|
|
467
|
+
The list of transactions and further related information of the given account.
|
|
468
|
+
|
|
410
469
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/index-ng.canister.ts#L49)
|
|
411
470
|
|
|
412
471
|
##### :gear: ledgerId
|
|
@@ -431,6 +490,10 @@ Parameters:
|
|
|
431
490
|
|
|
432
491
|
- `params`: The parameters to get the status of the index canister.
|
|
433
492
|
|
|
493
|
+
Returns:
|
|
494
|
+
|
|
495
|
+
The status of the index canister.
|
|
496
|
+
|
|
434
497
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/index-ng.canister.ts#L78)
|
|
435
498
|
|
|
436
499
|
##### :gear: listSubaccounts
|
|
@@ -445,6 +508,10 @@ Parameters:
|
|
|
445
508
|
|
|
446
509
|
- `params`: The parameters to get the list of subaccounts.
|
|
447
510
|
|
|
511
|
+
Returns:
|
|
512
|
+
|
|
513
|
+
The list of subaccounts.
|
|
514
|
+
|
|
448
515
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc/src/index-ng.canister.ts#L87)
|
|
449
516
|
|
|
450
517
|
<!-- 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/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var Fe=Object.defineProperty;var Ze=Object.getOwnPropertyDescriptor;var Xe=Object.getOwnPropertyNames;var Ye=Object.prototype.hasOwnProperty;var je=(e,t)=>{for(var r in t)Fe(e,r,{get:t[r],enumerable:!0})},Je=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Xe(t))!Ye.call(e,o)&&o!==r&&Fe(e,o,{get:()=>t[o],enumerable:!(c=Ze(t,o))||c.enumerable});return e};var Ke=e=>Je(Fe({},"__esModule",{value:!0}),e);var ct={};je(ct,{ConsentMessageError:()=>E,ConsentMessageUnavailableError:()=>U,GenericError:()=>C,IcrcIndexCanister:()=>Z,IcrcIndexNgCanister:()=>W,IcrcLedgerCanister:()=>Y,IcrcMetadataResponseEntries:()=>Se,IcrcTransferError:()=>w,IndexError:()=>v,InsufficientPaymentError:()=>M,UnsupportedCanisterCallError:()=>q,decodeIcrcAccount:()=>et,decodePayment:()=>rt,encodeIcrcAccount:()=>De,mapIcrc21ConsentMessageError:()=>Ge,mapTokenMetadata:()=>tt,toApproveArgs:()=>we,toIcrc21ConsentMessageArgs:()=>Ee,toTransferArg:()=>Pe,toTransferFromArgs:()=>ve});module.exports=Ke(ct);var _=require("@dfinity/utils"),Pe=({from_subaccount:e,fee:t,created_at_time:r,memo:c,...o})=>({...o,fee:(0,_.toNullable)(t),memo:(0,_.toNullable)(c),from_subaccount:(0,_.toNullable)(e),created_at_time:(0,_.toNullable)(r)}),ve=({spender_subaccount:e,fee:t,created_at_time:r,memo:c,...o})=>({...o,fee:(0,_.toNullable)(t),memo:(0,_.toNullable)(c),spender_subaccount:(0,_.toNullable)(e),created_at_time:(0,_.toNullable)(r)}),we=({fee:e,created_at_time:t,memo:r,from_subaccount:c,expected_allowance:o,expires_at:n,...d})=>({...d,fee:(0,_.toNullable)(e),memo:(0,_.toNullable)(r),from_subaccount:(0,_.toNullable)(c),created_at_time:(0,_.toNullable)(t),expected_allowance:(0,_.toNullable)(o),expires_at:(0,_.toNullable)(n)}),Ee=({userPreferences:{metadata:{utcOffsetMinutes:e,language:t},deriveSpec:r},...c})=>({...c,user_preferences:{metadata:{language:t,utc_offset_minutes:(0,_.toNullable)(e)},device_spec:(0,_.isNullish)(r)?(0,_.toNullable)():(0,_.toNullable)("GenericDisplay"in r?{GenericDisplay:null}:{LineDisplay:{characters_per_line:r.LineDisplay.charactersPerLine,lines_per_page:r.LineDisplay.linesPerPage}})}});var v=class extends Error{};var w=class extends Error{errorType;constructor({msg:t,errorType:r}){super(t),this.errorType=r}},C=class extends Error{constructor(r,c){super();this.message=r;this.error_code=c}},E=class extends Error{},M=class extends E{},q=class extends E{},U=class extends E{},Ge=e=>"GenericError"in e?new C(e.GenericError.description,e.GenericError.error_code):"InsufficientPayment"in e?new M(e.InsufficientPayment.description):"UnsupportedCanisterCall"in e?new q(e.UnsupportedCanisterCall.description):"ConsentMessageUnavailable"in e?new U(e.ConsentMessageUnavailable.description):new E(`Unknown error type ${JSON.stringify(e)}`);var Ue=require("@dfinity/utils");var Ce=({IDL:e})=>{let t=e.Rec(),r=e.Record({ledger_id:e.Opt(e.Principal),retrieve_blocks_from_ledger_interval_seconds:e.Opt(e.Nat64)}),c=e.Record({ledger_id:e.Principal,retrieve_blocks_from_ledger_interval_seconds:e.Opt(e.Nat64)}),o=e.Variant({Upgrade:r,Init:c}),n=e.Nat,d=e.Vec(e.Nat8),a=e.Record({owner:e.Principal,subaccount:e.Opt(d)}),f=e.Record({max_results:e.Nat,start:e.Opt(n),account:a}),p=e.Nat,N=e.Record({from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,spender:e.Opt(a)}),O=e.Record({to:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p}),T=e.Record({fee:e.Opt(p),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,expected_allowance:e.Opt(p),expires_at:e.Opt(e.Nat64),spender:a}),i=e.Record({to:a,fee:e.Opt(p),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,spender:e.Opt(a)}),g=e.Record({burn:e.Opt(N),kind:e.Text,mint:e.Opt(O),approve:e.Opt(T),timestamp:e.Nat64,transfer:e.Opt(i)}),m=e.Record({id:n,transaction:g}),V=e.Record({balance:p,transactions:e.Vec(m),oldest_tx_id:e.Opt(n)}),R=e.Record({message:e.Text}),b=e.Variant({Ok:V,Err:R}),A=e.Record({start:e.Nat,length:e.Nat}),h=e.Vec(e.Tuple(e.Text,t));t.fill(e.Variant({Int:e.Int,Map:h,Nat:e.Nat,Nat64:e.Nat64,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(t)}));let k=t,x=e.Record({blocks:e.Vec(k),chain_length:e.Nat64}),y=e.Record({ranges:e.Vec(e.Tuple(a,e.Vec(e.Tuple(n,n))))}),s=e.Record({owner:e.Principal,start:e.Opt(d)}),F=e.Record({num_blocks_synced:n});return e.Service({get_account_transactions:e.Func([f],[b],[]),get_blocks:e.Func([A],[x],[]),get_fee_collectors_ranges:e.Func([],[y],[]),icrc1_balance_of:e.Func([a],[p],[]),ledger_id:e.Func([],[e.Principal],[]),list_subaccounts:e.Func([s],[e.Vec(d)],[]),status:e.Func([],[F],[])})};var Me=({IDL:e})=>{let t=e.Rec(),r=e.Record({ledger_id:e.Opt(e.Principal),retrieve_blocks_from_ledger_interval_seconds:e.Opt(e.Nat64)}),c=e.Record({ledger_id:e.Principal,retrieve_blocks_from_ledger_interval_seconds:e.Opt(e.Nat64)}),o=e.Variant({Upgrade:r,Init:c}),n=e.Nat,d=e.Vec(e.Nat8),a=e.Record({owner:e.Principal,subaccount:e.Opt(d)}),f=e.Record({max_results:e.Nat,start:e.Opt(n),account:a}),p=e.Nat,N=e.Record({from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,spender:e.Opt(a)}),O=e.Record({to:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p}),T=e.Record({fee:e.Opt(p),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,expected_allowance:e.Opt(p),expires_at:e.Opt(e.Nat64),spender:a}),i=e.Record({to:a,fee:e.Opt(p),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,spender:e.Opt(a)}),g=e.Record({burn:e.Opt(N),kind:e.Text,mint:e.Opt(O),approve:e.Opt(T),timestamp:e.Nat64,transfer:e.Opt(i)}),m=e.Record({id:n,transaction:g}),V=e.Record({balance:p,transactions:e.Vec(m),oldest_tx_id:e.Opt(n)}),R=e.Record({message:e.Text}),b=e.Variant({Ok:V,Err:R}),A=e.Record({start:e.Nat,length:e.Nat}),h=e.Vec(e.Tuple(e.Text,t));t.fill(e.Variant({Int:e.Int,Map:h,Nat:e.Nat,Nat64:e.Nat64,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(t)}));let k=t,x=e.Record({blocks:e.Vec(k),chain_length:e.Nat64}),y=e.Record({ranges:e.Vec(e.Tuple(a,e.Vec(e.Tuple(n,n))))}),s=e.Record({owner:e.Principal,start:e.Opt(d)}),F=e.Record({num_blocks_synced:n});return e.Service({get_account_transactions:e.Func([f],[b],["query"]),get_blocks:e.Func([A],[x],["query"]),get_fee_collectors_ranges:e.Func([],[y],["query"]),icrc1_balance_of:e.Func([a],[p],["query"]),ledger_id:e.Func([],[e.Principal],["query"]),list_subaccounts:e.Func([s],[e.Vec(d)],["query"]),status:e.Func([],[F],["query"])})};var Q=require("@dfinity/utils"),z=class extends Q.Canister{balance=t=>this.caller({certified:t.certified}).icrc1_balance_of({owner:t.owner,subaccount:(0,Q.toNullable)(t.subaccount)})};var $=require("@dfinity/utils"),Ie=({owner:e,subaccount:t})=>({owner:e,subaccount:(0,$.toNullable)(t)}),H=({account:e,max_results:t,start:r})=>({account:Ie(e),max_results:t,start:(0,$.toNullable)(r)}),qe=({owner:e,start:t})=>({owner:e,start:(0,$.toNullable)(t)});var W=class e extends z{static create(t){let{service:r,certifiedService:c,canisterId:o}=(0,Ue.createServices)({options:t,idlFactory:Me,certifiedIdlFactory:Ce});return new e(o,r,c)}getTransactions=async({certified:t,...r})=>{let c=await this.caller({certified:t}).get_account_transactions(H(r));if("Err"in c)throw new v(c.Err.message);return c.Ok};ledgerId=t=>{let{ledger_id:r}=this.caller(t);return r()};status=t=>this.caller(t).status();listSubaccounts=({certified:t,...r})=>this.caller({certified:t}).list_subaccounts(qe(r))};var X=require("@dfinity/utils");var ze=({IDL:e})=>{let t=e.Record({ledger_id:e.Principal}),r=e.Nat,c=e.Record({owner:e.Principal,subaccount:e.Opt(e.Vec(e.Nat8))}),o=e.Record({max_results:e.Nat,start:e.Opt(r),account:c}),n=e.Record({from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,spender:e.Opt(c)}),d=e.Record({to:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat}),a=e.Record({fee:e.Opt(e.Nat),from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(e.Nat64),spender:c}),f=e.Record({to:c,fee:e.Opt(e.Nat),from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,spender:e.Opt(c)}),p=e.Record({burn:e.Opt(n),kind:e.Text,mint:e.Opt(d),approve:e.Opt(a),timestamp:e.Nat64,transfer:e.Opt(f)}),N=e.Record({id:r,transaction:p}),O=e.Record({transactions:e.Vec(N),oldest_tx_id:e.Opt(r)}),T=e.Record({message:e.Text}),i=e.Variant({Ok:O,Err:T}),g=e.Vec(e.Nat8),m=e.Record({owner:e.Principal,start:e.Opt(g)});return e.Service({get_account_transactions:e.Func([o],[i],[]),ledger_id:e.Func([],[e.Principal],[]),list_subaccounts:e.Func([m],[e.Vec(g)],[])})};var Qe=({IDL:e})=>{let t=e.Record({ledger_id:e.Principal}),r=e.Nat,c=e.Record({owner:e.Principal,subaccount:e.Opt(e.Vec(e.Nat8))}),o=e.Record({max_results:e.Nat,start:e.Opt(r),account:c}),n=e.Record({from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,spender:e.Opt(c)}),d=e.Record({to:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat}),a=e.Record({fee:e.Opt(e.Nat),from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(e.Nat64),spender:c}),f=e.Record({to:c,fee:e.Opt(e.Nat),from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,spender:e.Opt(c)}),p=e.Record({burn:e.Opt(n),kind:e.Text,mint:e.Opt(d),approve:e.Opt(a),timestamp:e.Nat64,transfer:e.Opt(f)}),N=e.Record({id:r,transaction:p}),O=e.Record({transactions:e.Vec(N),oldest_tx_id:e.Opt(r)}),T=e.Record({message:e.Text}),i=e.Variant({Ok:O,Err:T}),g=e.Vec(e.Nat8),m=e.Record({owner:e.Principal,start:e.Opt(g)});return e.Service({get_account_transactions:e.Func([o],[i],[]),ledger_id:e.Func([],[e.Principal],["query"]),list_subaccounts:e.Func([m],[e.Vec(g)],["query"])})};var Z=class e extends X.Canister{static create(t){let{service:r,certifiedService:c,canisterId:o}=(0,X.createServices)({options:t,idlFactory:Qe,certifiedIdlFactory:ze});return new e(o,r,c)}getTransactions=async t=>{let r=await this.caller({certified:!0}).get_account_transactions(H(t));if("Err"in r)throw new v(r.Err.message);return r.Ok};ledgerId=t=>{let{ledger_id:r}=this.caller(t);return r()}};var G=require("@dfinity/utils");var $e=({IDL:e})=>{let t=e.Rec(),r=e.Rec(),c=e.Rec(),o=e.Record({num_blocks_to_archive:e.Opt(e.Nat64),max_transactions_per_response:e.Opt(e.Nat64),trigger_threshold:e.Opt(e.Nat64),more_controller_ids:e.Opt(e.Vec(e.Principal)),max_message_size_bytes:e.Opt(e.Nat64),cycles_for_archive_creation:e.Opt(e.Nat64),node_max_memory_size_bytes:e.Opt(e.Nat64),controller_id:e.Opt(e.Principal)}),n=e.Variant({Int:e.Int,Nat:e.Nat,Blob:e.Vec(e.Nat8),Text:e.Text}),d=e.Vec(e.Nat8),a=e.Record({owner:e.Principal,subaccount:e.Opt(d)}),f=e.Variant({SetTo:a,Unset:e.Null}),p=e.Record({icrc2:e.Bool}),N=e.Record({change_archive_options:e.Opt(o),token_symbol:e.Opt(e.Text),transfer_fee:e.Opt(e.Nat),metadata:e.Opt(e.Vec(e.Tuple(e.Text,n))),change_fee_collector:e.Opt(f),max_memo_length:e.Opt(e.Nat16),index_principal:e.Opt(e.Principal),token_name:e.Opt(e.Text),feature_flags:e.Opt(p)}),O=e.Record({decimals:e.Opt(e.Nat8),token_symbol:e.Text,transfer_fee:e.Nat,metadata:e.Vec(e.Tuple(e.Text,n)),minting_account:a,initial_balances:e.Vec(e.Tuple(a,e.Nat)),fee_collector_account:e.Opt(a),archive_options:e.Record({num_blocks_to_archive:e.Nat64,max_transactions_per_response:e.Opt(e.Nat64),trigger_threshold:e.Nat64,more_controller_ids:e.Opt(e.Vec(e.Principal)),max_message_size_bytes:e.Opt(e.Nat64),cycles_for_archive_creation:e.Opt(e.Nat64),node_max_memory_size_bytes:e.Opt(e.Nat64),controller_id:e.Principal}),max_memo_length:e.Opt(e.Nat16),index_principal:e.Opt(e.Principal),token_name:e.Text,feature_flags:e.Opt(p)}),T=e.Variant({Upgrade:e.Opt(N),Init:O}),i=e.Nat,g=e.Record({block_range_end:i,canister_id:e.Principal,block_range_start:i}),m=e.Record({start:i,length:e.Nat}),V=e.Vec(e.Tuple(e.Text,c));c.fill(e.Variant({Int:e.Int,Map:V,Nat:e.Nat,Nat64:e.Nat64,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(c)}));let R=c,b=e.Record({blocks:e.Vec(R)}),A=e.Func([m],[b],[]),h=e.Record({certificate:e.Opt(e.Vec(e.Nat8)),first_index:i,blocks:e.Vec(R),chain_length:e.Nat64,archived_blocks:e.Vec(e.Record({callback:A,start:i,length:e.Nat}))}),k=e.Record({certificate:e.Opt(e.Vec(e.Nat8)),hash_tree:e.Vec(e.Nat8)}),x=e.Nat,y=e.Record({start:x,length:e.Nat}),s=e.Nat64,F=e.Record({from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,spender:e.Opt(a)}),J=e.Record({to:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat}),K=e.Record({fee:e.Opt(e.Nat),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(s),spender:a}),I=e.Record({to:a,fee:e.Opt(e.Nat),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,spender:e.Opt(a)}),S=e.Record({burn:e.Opt(F),kind:e.Text,mint:e.Opt(J),approve:e.Opt(K),timestamp:s,transfer:e.Opt(I)}),L=e.Record({transactions:e.Vec(S)}),D=e.Func([y],[L],[]),ee=e.Record({first_index:x,log_length:e.Nat,transactions:e.Vec(S),archived_transactions:e.Vec(e.Record({callback:D,start:x,length:e.Nat}))}),te=e.Record({take:e.Opt(e.Nat),prev_spender:e.Opt(a),from_account:e.Opt(a)}),re=e.Record({from_account:a,to_spender:a,allowance:e.Nat,expires_at:e.Opt(e.Nat64)}),ce=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),AccessDenied:e.Record({reason:e.Text})}),ae=e.Variant({Ok:e.Vec(re),Err:ce}),ne=e.Variant({GenericError:e.Record({description:e.Text,error_code:e.Nat}),IndexPrincipalNotSet:e.Null}),oe=e.Variant({Ok:e.Principal,Err:ne}),l=e.Nat,se=e.Record({url:e.Text,name:e.Text}),ie=e.Record({to:a,fee:e.Opt(l),memo:e.Opt(e.Vec(e.Nat8)),from_subaccount:e.Opt(d),created_at_time:e.Opt(s),amount:l}),pe=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,BadBurn:e.Record({min_burn_amount:l}),Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:l}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,InsufficientFunds:e.Record({balance:l})}),le=e.Variant({Ok:i,Err:pe}),B=e.Record({utc_offset_minutes:e.Opt(e.Int16),language:e.Text}),de=e.Record({metadata:B,device_spec:e.Opt(e.Variant({GenericDisplay:e.Null,LineDisplay:e.Record({characters_per_line:e.Nat16,lines_per_page:e.Nat16})}))}),_e=e.Record({arg:e.Vec(e.Nat8),method:e.Text,user_preferences:de}),me=e.Variant({LineDisplayMessage:e.Record({pages:e.Vec(e.Record({lines:e.Vec(e.Text)}))}),GenericDisplayMessage:e.Text}),ue=e.Record({metadata:B,consent_message:me}),P=e.Record({description:e.Text}),ge=e.Variant({GenericError:e.Record({description:e.Text,error_code:e.Nat}),InsufficientPayment:P,UnsupportedCanisterCall:P,ConsentMessageUnavailable:P}),fe=e.Variant({Ok:ue,Err:ge}),Ne=e.Record({account:a,spender:a}),Oe=e.Record({allowance:e.Nat,expires_at:e.Opt(s)}),xe=e.Record({fee:e.Opt(e.Nat),memo:e.Opt(e.Vec(e.Nat8)),from_subaccount:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(s),spender:a}),Te=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:e.Nat}),AllowanceChanged:e.Record({current_allowance:e.Nat}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,Expired:e.Record({ledger_time:s}),InsufficientFunds:e.Record({balance:e.Nat})}),Re=e.Variant({Ok:i,Err:Te}),ye=e.Record({to:a,fee:e.Opt(l),spender_subaccount:e.Opt(d),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:l}),Ve=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,InsufficientAllowance:e.Record({allowance:l}),BadBurn:e.Record({min_burn_amount:l}),Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:l}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,InsufficientFunds:e.Record({balance:l})}),be=e.Variant({Ok:i,Err:Ve}),Ae=e.Record({from:e.Opt(e.Principal)}),he=e.Vec(e.Record({end:e.Nat,canister_id:e.Principal,start:e.Nat}));r.fill(e.Variant({Int:e.Int,Map:e.Vec(e.Tuple(e.Text,r)),Nat:e.Nat,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(r)})),t.fill(e.Record({log_length:e.Nat,blocks:e.Vec(e.Record({id:e.Nat,block:r})),archived_blocks:e.Vec(e.Record({args:e.Vec(m),callback:e.Func([e.Vec(m)],[t],[])}))}));let ke=e.Record({certificate:e.Vec(e.Nat8),hash_tree:e.Vec(e.Nat8)});return e.Service({archives:e.Func([],[e.Vec(g)],[]),get_blocks:e.Func([m],[h],[]),get_data_certificate:e.Func([],[k],[]),get_transactions:e.Func([y],[ee],[]),icrc103_get_allowances:e.Func([te],[ae],[]),icrc106_get_index_principal:e.Func([],[oe],[]),icrc10_supported_standards:e.Func([],[e.Vec(e.Record({url:e.Text,name:e.Text}))],[]),icrc1_balance_of:e.Func([a],[l],[]),icrc1_decimals:e.Func([],[e.Nat8],[]),icrc1_fee:e.Func([],[l],[]),icrc1_metadata:e.Func([],[e.Vec(e.Tuple(e.Text,n))],[]),icrc1_minting_account:e.Func([],[e.Opt(a)],[]),icrc1_name:e.Func([],[e.Text],[]),icrc1_supported_standards:e.Func([],[e.Vec(se)],[]),icrc1_symbol:e.Func([],[e.Text],[]),icrc1_total_supply:e.Func([],[l],[]),icrc1_transfer:e.Func([ie],[le],[]),icrc21_canister_call_consent_message:e.Func([_e],[fe],[]),icrc2_allowance:e.Func([Ne],[Oe],[]),icrc2_approve:e.Func([xe],[Re],[]),icrc2_transfer_from:e.Func([ye],[be],[]),icrc3_get_archives:e.Func([Ae],[he],[]),icrc3_get_blocks:e.Func([e.Vec(m)],[t],[]),icrc3_get_tip_certificate:e.Func([],[e.Opt(ke)],[]),icrc3_supported_block_types:e.Func([],[e.Vec(e.Record({url:e.Text,block_type:e.Text}))],[]),is_ledger_ready:e.Func([],[e.Bool],[])})};var He=({IDL:e})=>{let t=e.Rec(),r=e.Rec(),c=e.Rec(),o=e.Record({num_blocks_to_archive:e.Opt(e.Nat64),max_transactions_per_response:e.Opt(e.Nat64),trigger_threshold:e.Opt(e.Nat64),more_controller_ids:e.Opt(e.Vec(e.Principal)),max_message_size_bytes:e.Opt(e.Nat64),cycles_for_archive_creation:e.Opt(e.Nat64),node_max_memory_size_bytes:e.Opt(e.Nat64),controller_id:e.Opt(e.Principal)}),n=e.Variant({Int:e.Int,Nat:e.Nat,Blob:e.Vec(e.Nat8),Text:e.Text}),d=e.Vec(e.Nat8),a=e.Record({owner:e.Principal,subaccount:e.Opt(d)}),f=e.Variant({SetTo:a,Unset:e.Null}),p=e.Record({icrc2:e.Bool}),N=e.Record({change_archive_options:e.Opt(o),token_symbol:e.Opt(e.Text),transfer_fee:e.Opt(e.Nat),metadata:e.Opt(e.Vec(e.Tuple(e.Text,n))),change_fee_collector:e.Opt(f),max_memo_length:e.Opt(e.Nat16),index_principal:e.Opt(e.Principal),token_name:e.Opt(e.Text),feature_flags:e.Opt(p)}),O=e.Record({decimals:e.Opt(e.Nat8),token_symbol:e.Text,transfer_fee:e.Nat,metadata:e.Vec(e.Tuple(e.Text,n)),minting_account:a,initial_balances:e.Vec(e.Tuple(a,e.Nat)),fee_collector_account:e.Opt(a),archive_options:e.Record({num_blocks_to_archive:e.Nat64,max_transactions_per_response:e.Opt(e.Nat64),trigger_threshold:e.Nat64,more_controller_ids:e.Opt(e.Vec(e.Principal)),max_message_size_bytes:e.Opt(e.Nat64),cycles_for_archive_creation:e.Opt(e.Nat64),node_max_memory_size_bytes:e.Opt(e.Nat64),controller_id:e.Principal}),max_memo_length:e.Opt(e.Nat16),index_principal:e.Opt(e.Principal),token_name:e.Text,feature_flags:e.Opt(p)}),T=e.Variant({Upgrade:e.Opt(N),Init:O}),i=e.Nat,g=e.Record({block_range_end:i,canister_id:e.Principal,block_range_start:i}),m=e.Record({start:i,length:e.Nat}),V=e.Vec(e.Tuple(e.Text,c));c.fill(e.Variant({Int:e.Int,Map:V,Nat:e.Nat,Nat64:e.Nat64,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(c)}));let R=c,b=e.Record({blocks:e.Vec(R)}),A=e.Func([m],[b],["query"]),h=e.Record({certificate:e.Opt(e.Vec(e.Nat8)),first_index:i,blocks:e.Vec(R),chain_length:e.Nat64,archived_blocks:e.Vec(e.Record({callback:A,start:i,length:e.Nat}))}),k=e.Record({certificate:e.Opt(e.Vec(e.Nat8)),hash_tree:e.Vec(e.Nat8)}),x=e.Nat,y=e.Record({start:x,length:e.Nat}),s=e.Nat64,F=e.Record({from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,spender:e.Opt(a)}),J=e.Record({to:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat}),K=e.Record({fee:e.Opt(e.Nat),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(s),spender:a}),I=e.Record({to:a,fee:e.Opt(e.Nat),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,spender:e.Opt(a)}),S=e.Record({burn:e.Opt(F),kind:e.Text,mint:e.Opt(J),approve:e.Opt(K),timestamp:s,transfer:e.Opt(I)}),L=e.Record({transactions:e.Vec(S)}),D=e.Func([y],[L],["query"]),ee=e.Record({first_index:x,log_length:e.Nat,transactions:e.Vec(S),archived_transactions:e.Vec(e.Record({callback:D,start:x,length:e.Nat}))}),te=e.Record({take:e.Opt(e.Nat),prev_spender:e.Opt(a),from_account:e.Opt(a)}),re=e.Record({from_account:a,to_spender:a,allowance:e.Nat,expires_at:e.Opt(e.Nat64)}),ce=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),AccessDenied:e.Record({reason:e.Text})}),ae=e.Variant({Ok:e.Vec(re),Err:ce}),ne=e.Variant({GenericError:e.Record({description:e.Text,error_code:e.Nat}),IndexPrincipalNotSet:e.Null}),oe=e.Variant({Ok:e.Principal,Err:ne}),l=e.Nat,se=e.Record({url:e.Text,name:e.Text}),ie=e.Record({to:a,fee:e.Opt(l),memo:e.Opt(e.Vec(e.Nat8)),from_subaccount:e.Opt(d),created_at_time:e.Opt(s),amount:l}),pe=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,BadBurn:e.Record({min_burn_amount:l}),Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:l}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,InsufficientFunds:e.Record({balance:l})}),le=e.Variant({Ok:i,Err:pe}),B=e.Record({utc_offset_minutes:e.Opt(e.Int16),language:e.Text}),de=e.Record({metadata:B,device_spec:e.Opt(e.Variant({GenericDisplay:e.Null,LineDisplay:e.Record({characters_per_line:e.Nat16,lines_per_page:e.Nat16})}))}),_e=e.Record({arg:e.Vec(e.Nat8),method:e.Text,user_preferences:de}),me=e.Variant({LineDisplayMessage:e.Record({pages:e.Vec(e.Record({lines:e.Vec(e.Text)}))}),GenericDisplayMessage:e.Text}),ue=e.Record({metadata:B,consent_message:me}),P=e.Record({description:e.Text}),ge=e.Variant({GenericError:e.Record({description:e.Text,error_code:e.Nat}),InsufficientPayment:P,UnsupportedCanisterCall:P,ConsentMessageUnavailable:P}),fe=e.Variant({Ok:ue,Err:ge}),Ne=e.Record({account:a,spender:a}),Oe=e.Record({allowance:e.Nat,expires_at:e.Opt(s)}),xe=e.Record({fee:e.Opt(e.Nat),memo:e.Opt(e.Vec(e.Nat8)),from_subaccount:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(s),spender:a}),Te=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:e.Nat}),AllowanceChanged:e.Record({current_allowance:e.Nat}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,Expired:e.Record({ledger_time:s}),InsufficientFunds:e.Record({balance:e.Nat})}),Re=e.Variant({Ok:i,Err:Te}),ye=e.Record({to:a,fee:e.Opt(l),spender_subaccount:e.Opt(d),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:l}),Ve=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,InsufficientAllowance:e.Record({allowance:l}),BadBurn:e.Record({min_burn_amount:l}),Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:l}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,InsufficientFunds:e.Record({balance:l})}),be=e.Variant({Ok:i,Err:Ve}),Ae=e.Record({from:e.Opt(e.Principal)}),he=e.Vec(e.Record({end:e.Nat,canister_id:e.Principal,start:e.Nat}));r.fill(e.Variant({Int:e.Int,Map:e.Vec(e.Tuple(e.Text,r)),Nat:e.Nat,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(r)})),t.fill(e.Record({log_length:e.Nat,blocks:e.Vec(e.Record({id:e.Nat,block:r})),archived_blocks:e.Vec(e.Record({args:e.Vec(m),callback:e.Func([e.Vec(m)],[t],["query"])}))}));let ke=e.Record({certificate:e.Vec(e.Nat8),hash_tree:e.Vec(e.Nat8)});return e.Service({archives:e.Func([],[e.Vec(g)],["query"]),get_blocks:e.Func([m],[h],["query"]),get_data_certificate:e.Func([],[k],["query"]),get_transactions:e.Func([y],[ee],["query"]),icrc103_get_allowances:e.Func([te],[ae],["query"]),icrc106_get_index_principal:e.Func([],[oe],["query"]),icrc10_supported_standards:e.Func([],[e.Vec(e.Record({url:e.Text,name:e.Text}))],["query"]),icrc1_balance_of:e.Func([a],[l],["query"]),icrc1_decimals:e.Func([],[e.Nat8],["query"]),icrc1_fee:e.Func([],[l],["query"]),icrc1_metadata:e.Func([],[e.Vec(e.Tuple(e.Text,n))],["query"]),icrc1_minting_account:e.Func([],[e.Opt(a)],["query"]),icrc1_name:e.Func([],[e.Text],["query"]),icrc1_supported_standards:e.Func([],[e.Vec(se)],["query"]),icrc1_symbol:e.Func([],[e.Text],["query"]),icrc1_total_supply:e.Func([],[l],["query"]),icrc1_transfer:e.Func([ie],[le],[]),icrc21_canister_call_consent_message:e.Func([_e],[fe],[]),icrc2_allowance:e.Func([Ne],[Oe],["query"]),icrc2_approve:e.Func([xe],[Re],[]),icrc2_transfer_from:e.Func([ye],[be],[]),icrc3_get_archives:e.Func([Ae],[he],["query"]),icrc3_get_blocks:e.Func([e.Vec(m)],[t],["query"]),icrc3_get_tip_certificate:e.Func([],[e.Opt(ke)],["query"]),icrc3_supported_block_types:e.Func([],[e.Vec(e.Record({url:e.Text,block_type:e.Text}))],["query"]),is_ledger_ready:e.Func([],[e.Bool],["query"])})};var Y=class e extends G.Canister{static create(t){let{service:r,certifiedService:c,canisterId:o}=(0,G.createServices)({options:t,idlFactory:He,certifiedIdlFactory:$e});return new e(o,r,c)}metadata=t=>this.caller(t).icrc1_metadata();transactionFee=t=>this.caller(t).icrc1_fee();balance=t=>this.caller({certified:t.certified}).icrc1_balance_of({owner:t.owner,subaccount:(0,G.toNullable)(t.subaccount)});transfer=async t=>{let r=await this.caller({certified:!0}).icrc1_transfer(Pe(t));if("Err"in r)throw new w({errorType:r.Err,msg:"Failed to transfer"});return r.Ok};totalTokensSupply=t=>this.caller(t).icrc1_total_supply();transferFrom=async t=>{let r=await this.caller({certified:!0}).icrc2_transfer_from(ve(t));if("Err"in r)throw new w({errorType:r.Err,msg:"Failed to transfer from"});return r.Ok};approve=async t=>{let r=await this.caller({certified:!0}).icrc2_approve(we(t));if("Err"in r)throw new w({errorType:r.Err,msg:"Failed to entitle the spender to transfer the amount"});return r.Ok};allowance=t=>{let{certified:r,...c}=t;return this.caller({certified:r}).icrc2_allowance({...c})};consentMessage=async t=>{let{icrc21_canister_call_consent_message:r}=this.caller({certified:!0}),c=await r(Ee(t));if("Err"in c)throw Ge(c.Err);return c.Ok};getBlocks=t=>this.caller({certified:t.certified}).icrc3_get_blocks(t.args)};var Se=(n=>(n.SYMBOL="icrc1:symbol",n.NAME="icrc1:name",n.DECIMALS="icrc1:decimals",n.FEE="icrc1:fee",n.LOGO="icrc1:logo",n))(Se||{});var Be=require("@dfinity/principal"),u=require("@dfinity/utils");var Le=64,De=({owner:e,subaccount:t})=>{if((0,u.isNullish)(t))return e.toText();let c=(o=>o.replace(/^0+/,""))((0,u.uint8ArrayToHexString)(Uint8Array.from(t)));return c.length===0?e.toText():`${e.toText()}-${We({owner:e,subaccount:t})}.${c}`},We=({owner:e,subaccount:t})=>{let r=(0,u.bigEndianCrc32)(Uint8Array.from([...e.toUint8Array(),...t]));return(0,u.encodeBase32)(r)},et=e=>{let[t,r,...c]=e.split(".");if(!(0,u.notEmptyString)(t))throw new Error("Invalid account. No string provided.");if(c.length>0)throw new Error("Invalid account string format. Expected at most one '.' separator.");if((0,u.isNullish)(r))return{owner:Be.Principal.fromText(e)};let[o,...n]=t.split("-").reverse(),d=n.reverse().join("-"),a={owner:Be.Principal.fromText(d),subaccount:(0,u.hexStringToUint8Array)(r.padStart(Le,"0"))};if(We(a)!==o)throw new Error("Invalid account. Invalid checksum.");return a},tt=e=>{let t=e.reduce((c,[o,n])=>{switch(o){case"icrc1:symbol":c={...c,..."Text"in n&&{symbol:n.Text}};break;case"icrc1:name":c={...c,..."Text"in n&&{name:n.Text}};break;case"icrc1:fee":c={...c,..."Nat"in n&&{fee:n.Nat}};break;case"icrc1:decimals":c={...c,..."Nat"in n&&{decimals:Number(n.Nat)}};break;case"icrc1:logo":c={...c,..."Text"in n&&{icon:n.Text}}}return c},{});if((c=>(0,u.nonNullish)(c.symbol)&&(0,u.nonNullish)(c.name)&&(0,u.nonNullish)(c.fee)&&(0,u.nonNullish)(c.decimals))(t))return t};var j=require("@dfinity/utils"),rt=e=>{let t=/^([a-zA-Z]+):([A-Za-z0-9:\-.]+).*?(?:[?&](?:amount|value)=(\d+(?:\.\d+)?))?$/,r=e.match(t);if((0,j.isNullish)(r))return;let[c,o,n,d]=r;return{token:o,identifier:n,...(0,j.nonNullish)(d)&&!isNaN(parseFloat(d))&&{amount:parseFloat(d)}}};0&&(module.exports={ConsentMessageError,ConsentMessageUnavailableError,GenericError,IcrcIndexCanister,IcrcIndexNgCanister,IcrcLedgerCanister,IcrcMetadataResponseEntries,IcrcTransferError,IndexError,InsufficientPaymentError,UnsupportedCanisterCallError,decodeIcrcAccount,decodePayment,encodeIcrcAccount,mapIcrc21ConsentMessageError,mapTokenMetadata,toApproveArgs,toIcrc21ConsentMessageArgs,toTransferArg,toTransferFromArgs});
|
|
1
|
+
"use strict";var Pe=Object.defineProperty;var Ye=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var Je=Object.prototype.hasOwnProperty;var Ke=(e,t)=>{for(var r in t)Pe(e,r,{get:t[r],enumerable:!0})},Ie=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of je(t))!Je.call(e,o)&&o!==r&&Pe(e,o,{get:()=>t[o],enumerable:!(c=Ye(t,o))||c.enumerable});return e};var Le=e=>Ie(Pe({},"__esModule",{value:!0}),e);var nt={};Ke(nt,{ConsentMessageError:()=>G,ConsentMessageUnavailableError:()=>U,GenericError:()=>C,IcrcIndexCanister:()=>X,IcrcIndexNgCanister:()=>Z,IcrcLedgerCanister:()=>j,IcrcMetadataResponseEntries:()=>Ce,IcrcTransferError:()=>E,IndexError:()=>v,IndexPrincipalNotSetError:()=>z,InsufficientPaymentError:()=>M,UnsupportedCanisterCallError:()=>q,decodeIcrcAccount:()=>rt,decodePayment:()=>at,encodeIcrcAccount:()=>tt,mapIcrc106GetIndexPrincipalError:()=>Be,mapIcrc21ConsentMessageError:()=>Se,mapTokenMetadata:()=>ct,toApproveArgs:()=>Ge,toIcrc21ConsentMessageArgs:()=>we,toTransferArg:()=>ve,toTransferFromArgs:()=>Ee});module.exports=Le(nt);var _=require("@dfinity/utils"),ve=({from_subaccount:e,fee:t,created_at_time:r,memo:c,...o})=>({...o,fee:(0,_.toNullable)(t),memo:(0,_.toNullable)(c),from_subaccount:(0,_.toNullable)(e),created_at_time:(0,_.toNullable)(r)}),Ee=({spender_subaccount:e,fee:t,created_at_time:r,memo:c,...o})=>({...o,fee:(0,_.toNullable)(t),memo:(0,_.toNullable)(c),spender_subaccount:(0,_.toNullable)(e),created_at_time:(0,_.toNullable)(r)}),Ge=({fee:e,created_at_time:t,memo:r,from_subaccount:c,expected_allowance:o,expires_at:n,...d})=>({...d,fee:(0,_.toNullable)(e),memo:(0,_.toNullable)(r),from_subaccount:(0,_.toNullable)(c),created_at_time:(0,_.toNullable)(t),expected_allowance:(0,_.toNullable)(o),expires_at:(0,_.toNullable)(n)}),we=({userPreferences:{metadata:{utcOffsetMinutes:e,language:t},deriveSpec:r},...c})=>({...c,user_preferences:{metadata:{language:t,utc_offset_minutes:(0,_.toNullable)(e)},device_spec:(0,_.isNullish)(r)?(0,_.toNullable)():(0,_.toNullable)("GenericDisplay"in r?{GenericDisplay:null}:{LineDisplay:{characters_per_line:r.LineDisplay.charactersPerLine,lines_per_page:r.LineDisplay.linesPerPage}})}});var v=class extends Error{};var E=class extends Error{errorType;constructor({msg:t,errorType:r}){super(t),this.errorType=r}},C=class extends Error{constructor(r,c){super();this.message=r;this.error_code=c}},G=class extends Error{},M=class extends G{},q=class extends G{},U=class extends G{},Se=e=>"GenericError"in e?new C(e.GenericError.description,e.GenericError.error_code):"InsufficientPayment"in e?new M(e.InsufficientPayment.description):"UnsupportedCanisterCall"in e?new q(e.UnsupportedCanisterCall.description):"ConsentMessageUnavailable"in e?new U(e.ConsentMessageUnavailable.description):new G(`Unknown error type ${JSON.stringify(e)}`),z=class extends Error{},Be=e=>"IndexPrincipalNotSet"in e?new z("Index principal is not set for this ledger canister."):new C(e.GenericError.description,e.GenericError.error_code);var Qe=require("@dfinity/utils");var qe=({IDL:e})=>{let t=e.Rec(),r=e.Record({ledger_id:e.Opt(e.Principal),retrieve_blocks_from_ledger_interval_seconds:e.Opt(e.Nat64)}),c=e.Record({ledger_id:e.Principal,retrieve_blocks_from_ledger_interval_seconds:e.Opt(e.Nat64)}),o=e.Variant({Upgrade:r,Init:c}),n=e.Nat,d=e.Vec(e.Nat8),a=e.Record({owner:e.Principal,subaccount:e.Opt(d)}),f=e.Record({max_results:e.Nat,start:e.Opt(n),account:a}),p=e.Nat,N=e.Record({from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,spender:e.Opt(a)}),O=e.Record({to:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p}),T=e.Record({fee:e.Opt(p),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,expected_allowance:e.Opt(p),expires_at:e.Opt(e.Nat64),spender:a}),i=e.Record({to:a,fee:e.Opt(p),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,spender:e.Opt(a)}),g=e.Record({burn:e.Opt(N),kind:e.Text,mint:e.Opt(O),approve:e.Opt(T),timestamp:e.Nat64,transfer:e.Opt(i)}),m=e.Record({id:n,transaction:g}),V=e.Record({balance:p,transactions:e.Vec(m),oldest_tx_id:e.Opt(n)}),R=e.Record({message:e.Text}),b=e.Variant({Ok:V,Err:R}),A=e.Record({start:e.Nat,length:e.Nat}),h=e.Vec(e.Tuple(e.Text,t));t.fill(e.Variant({Int:e.Int,Map:h,Nat:e.Nat,Nat64:e.Nat64,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(t)}));let k=t,x=e.Record({blocks:e.Vec(k),chain_length:e.Nat64}),y=e.Record({ranges:e.Vec(e.Tuple(a,e.Vec(e.Tuple(n,n))))}),s=e.Record({owner:e.Principal,start:e.Opt(d)}),F=e.Record({num_blocks_synced:n});return e.Service({get_account_transactions:e.Func([f],[b],[]),get_blocks:e.Func([A],[x],[]),get_fee_collectors_ranges:e.Func([],[y],[]),icrc1_balance_of:e.Func([a],[p],[]),ledger_id:e.Func([],[e.Principal],[]),list_subaccounts:e.Func([s],[e.Vec(d)],[]),status:e.Func([],[F],[])})};var Ue=({IDL:e})=>{let t=e.Rec(),r=e.Record({ledger_id:e.Opt(e.Principal),retrieve_blocks_from_ledger_interval_seconds:e.Opt(e.Nat64)}),c=e.Record({ledger_id:e.Principal,retrieve_blocks_from_ledger_interval_seconds:e.Opt(e.Nat64)}),o=e.Variant({Upgrade:r,Init:c}),n=e.Nat,d=e.Vec(e.Nat8),a=e.Record({owner:e.Principal,subaccount:e.Opt(d)}),f=e.Record({max_results:e.Nat,start:e.Opt(n),account:a}),p=e.Nat,N=e.Record({from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,spender:e.Opt(a)}),O=e.Record({to:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p}),T=e.Record({fee:e.Opt(p),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,expected_allowance:e.Opt(p),expires_at:e.Opt(e.Nat64),spender:a}),i=e.Record({to:a,fee:e.Opt(p),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:p,spender:e.Opt(a)}),g=e.Record({burn:e.Opt(N),kind:e.Text,mint:e.Opt(O),approve:e.Opt(T),timestamp:e.Nat64,transfer:e.Opt(i)}),m=e.Record({id:n,transaction:g}),V=e.Record({balance:p,transactions:e.Vec(m),oldest_tx_id:e.Opt(n)}),R=e.Record({message:e.Text}),b=e.Variant({Ok:V,Err:R}),A=e.Record({start:e.Nat,length:e.Nat}),h=e.Vec(e.Tuple(e.Text,t));t.fill(e.Variant({Int:e.Int,Map:h,Nat:e.Nat,Nat64:e.Nat64,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(t)}));let k=t,x=e.Record({blocks:e.Vec(k),chain_length:e.Nat64}),y=e.Record({ranges:e.Vec(e.Tuple(a,e.Vec(e.Tuple(n,n))))}),s=e.Record({owner:e.Principal,start:e.Opt(d)}),F=e.Record({num_blocks_synced:n});return e.Service({get_account_transactions:e.Func([f],[b],["query"]),get_blocks:e.Func([A],[x],["query"]),get_fee_collectors_ranges:e.Func([],[y],["query"]),icrc1_balance_of:e.Func([a],[p],["query"]),ledger_id:e.Func([],[e.Principal],["query"]),list_subaccounts:e.Func([s],[e.Vec(d)],["query"]),status:e.Func([],[F],["query"])})};var $=require("@dfinity/utils"),Q=class extends $.Canister{balance=t=>this.caller({certified:t.certified}).icrc1_balance_of({owner:t.owner,subaccount:(0,$.toNullable)(t.subaccount)})};var H=require("@dfinity/utils"),De=({owner:e,subaccount:t})=>({owner:e,subaccount:(0,H.toNullable)(t)}),W=({account:e,max_results:t,start:r})=>({account:De(e),max_results:t,start:(0,H.toNullable)(r)}),ze=({owner:e,start:t})=>({owner:e,start:(0,H.toNullable)(t)});var Z=class e extends Q{static create(t){let{service:r,certifiedService:c,canisterId:o}=(0,Qe.createServices)({options:t,idlFactory:Ue,certifiedIdlFactory:qe});return new e(o,r,c)}getTransactions=async({certified:t,...r})=>{let c=await this.caller({certified:t}).get_account_transactions(W(r));if("Err"in c)throw new v(c.Err.message);return c.Ok};ledgerId=t=>{let{ledger_id:r}=this.caller(t);return r()};status=t=>this.caller(t).status();listSubaccounts=({certified:t,...r})=>this.caller({certified:t}).list_subaccounts(ze(r))};var Y=require("@dfinity/utils");var $e=({IDL:e})=>{let t=e.Record({ledger_id:e.Principal}),r=e.Nat,c=e.Record({owner:e.Principal,subaccount:e.Opt(e.Vec(e.Nat8))}),o=e.Record({max_results:e.Nat,start:e.Opt(r),account:c}),n=e.Record({from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,spender:e.Opt(c)}),d=e.Record({to:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat}),a=e.Record({fee:e.Opt(e.Nat),from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(e.Nat64),spender:c}),f=e.Record({to:c,fee:e.Opt(e.Nat),from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,spender:e.Opt(c)}),p=e.Record({burn:e.Opt(n),kind:e.Text,mint:e.Opt(d),approve:e.Opt(a),timestamp:e.Nat64,transfer:e.Opt(f)}),N=e.Record({id:r,transaction:p}),O=e.Record({transactions:e.Vec(N),oldest_tx_id:e.Opt(r)}),T=e.Record({message:e.Text}),i=e.Variant({Ok:O,Err:T}),g=e.Vec(e.Nat8),m=e.Record({owner:e.Principal,start:e.Opt(g)});return e.Service({get_account_transactions:e.Func([o],[i],[]),ledger_id:e.Func([],[e.Principal],[]),list_subaccounts:e.Func([m],[e.Vec(g)],[])})};var He=({IDL:e})=>{let t=e.Record({ledger_id:e.Principal}),r=e.Nat,c=e.Record({owner:e.Principal,subaccount:e.Opt(e.Vec(e.Nat8))}),o=e.Record({max_results:e.Nat,start:e.Opt(r),account:c}),n=e.Record({from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,spender:e.Opt(c)}),d=e.Record({to:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat}),a=e.Record({fee:e.Opt(e.Nat),from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(e.Nat64),spender:c}),f=e.Record({to:c,fee:e.Opt(e.Nat),from:c,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat,spender:e.Opt(c)}),p=e.Record({burn:e.Opt(n),kind:e.Text,mint:e.Opt(d),approve:e.Opt(a),timestamp:e.Nat64,transfer:e.Opt(f)}),N=e.Record({id:r,transaction:p}),O=e.Record({transactions:e.Vec(N),oldest_tx_id:e.Opt(r)}),T=e.Record({message:e.Text}),i=e.Variant({Ok:O,Err:T}),g=e.Vec(e.Nat8),m=e.Record({owner:e.Principal,start:e.Opt(g)});return e.Service({get_account_transactions:e.Func([o],[i],[]),ledger_id:e.Func([],[e.Principal],["query"]),list_subaccounts:e.Func([m],[e.Vec(g)],["query"])})};var X=class e extends Y.Canister{static create(t){let{service:r,certifiedService:c,canisterId:o}=(0,Y.createServices)({options:t,idlFactory:He,certifiedIdlFactory:$e});return new e(o,r,c)}getTransactions=async t=>{let r=await this.caller({certified:!0}).get_account_transactions(W(t));if("Err"in r)throw new v(r.Err.message);return r.Ok};ledgerId=t=>{let{ledger_id:r}=this.caller(t);return r()}};var w=require("@dfinity/utils");var We=({IDL:e})=>{let t=e.Rec(),r=e.Rec(),c=e.Rec(),o=e.Record({num_blocks_to_archive:e.Opt(e.Nat64),max_transactions_per_response:e.Opt(e.Nat64),trigger_threshold:e.Opt(e.Nat64),more_controller_ids:e.Opt(e.Vec(e.Principal)),max_message_size_bytes:e.Opt(e.Nat64),cycles_for_archive_creation:e.Opt(e.Nat64),node_max_memory_size_bytes:e.Opt(e.Nat64),controller_id:e.Opt(e.Principal)}),n=e.Variant({Int:e.Int,Nat:e.Nat,Blob:e.Vec(e.Nat8),Text:e.Text}),d=e.Vec(e.Nat8),a=e.Record({owner:e.Principal,subaccount:e.Opt(d)}),f=e.Variant({SetTo:a,Unset:e.Null}),p=e.Record({icrc2:e.Bool}),N=e.Record({change_archive_options:e.Opt(o),token_symbol:e.Opt(e.Text),transfer_fee:e.Opt(e.Nat),metadata:e.Opt(e.Vec(e.Tuple(e.Text,n))),change_fee_collector:e.Opt(f),max_memo_length:e.Opt(e.Nat16),index_principal:e.Opt(e.Principal),token_name:e.Opt(e.Text),feature_flags:e.Opt(p)}),O=e.Record({decimals:e.Opt(e.Nat8),token_symbol:e.Text,transfer_fee:e.Nat,metadata:e.Vec(e.Tuple(e.Text,n)),minting_account:a,initial_balances:e.Vec(e.Tuple(a,e.Nat)),fee_collector_account:e.Opt(a),archive_options:e.Record({num_blocks_to_archive:e.Nat64,max_transactions_per_response:e.Opt(e.Nat64),trigger_threshold:e.Nat64,more_controller_ids:e.Opt(e.Vec(e.Principal)),max_message_size_bytes:e.Opt(e.Nat64),cycles_for_archive_creation:e.Opt(e.Nat64),node_max_memory_size_bytes:e.Opt(e.Nat64),controller_id:e.Principal}),max_memo_length:e.Opt(e.Nat16),index_principal:e.Opt(e.Principal),token_name:e.Text,feature_flags:e.Opt(p)}),T=e.Variant({Upgrade:e.Opt(N),Init:O}),i=e.Nat,g=e.Record({block_range_end:i,canister_id:e.Principal,block_range_start:i}),m=e.Record({start:i,length:e.Nat}),V=e.Vec(e.Tuple(e.Text,c));c.fill(e.Variant({Int:e.Int,Map:V,Nat:e.Nat,Nat64:e.Nat64,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(c)}));let R=c,b=e.Record({blocks:e.Vec(R)}),A=e.Func([m],[b],[]),h=e.Record({certificate:e.Opt(e.Vec(e.Nat8)),first_index:i,blocks:e.Vec(R),chain_length:e.Nat64,archived_blocks:e.Vec(e.Record({callback:A,start:i,length:e.Nat}))}),k=e.Record({certificate:e.Opt(e.Vec(e.Nat8)),hash_tree:e.Vec(e.Nat8)}),x=e.Nat,y=e.Record({start:x,length:e.Nat}),s=e.Nat64,F=e.Record({from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,spender:e.Opt(a)}),K=e.Record({to:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat}),I=e.Record({fee:e.Opt(e.Nat),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(s),spender:a}),L=e.Record({to:a,fee:e.Opt(e.Nat),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,spender:e.Opt(a)}),S=e.Record({burn:e.Opt(F),kind:e.Text,mint:e.Opt(K),approve:e.Opt(I),timestamp:s,transfer:e.Opt(L)}),D=e.Record({transactions:e.Vec(S)}),ee=e.Func([y],[D],[]),te=e.Record({first_index:x,log_length:e.Nat,transactions:e.Vec(S),archived_transactions:e.Vec(e.Record({callback:ee,start:x,length:e.Nat}))}),re=e.Record({take:e.Opt(e.Nat),prev_spender:e.Opt(a),from_account:e.Opt(a)}),ce=e.Record({from_account:a,to_spender:a,allowance:e.Nat,expires_at:e.Opt(e.Nat64)}),ae=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),AccessDenied:e.Record({reason:e.Text})}),ne=e.Variant({Ok:e.Vec(ce),Err:ae}),oe=e.Variant({GenericError:e.Record({description:e.Text,error_code:e.Nat}),IndexPrincipalNotSet:e.Null}),se=e.Variant({Ok:e.Principal,Err:oe}),l=e.Nat,ie=e.Record({url:e.Text,name:e.Text}),pe=e.Record({to:a,fee:e.Opt(l),memo:e.Opt(e.Vec(e.Nat8)),from_subaccount:e.Opt(d),created_at_time:e.Opt(s),amount:l}),le=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,BadBurn:e.Record({min_burn_amount:l}),Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:l}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,InsufficientFunds:e.Record({balance:l})}),de=e.Variant({Ok:i,Err:le}),B=e.Record({utc_offset_minutes:e.Opt(e.Int16),language:e.Text}),_e=e.Record({metadata:B,device_spec:e.Opt(e.Variant({GenericDisplay:e.Null,LineDisplay:e.Record({characters_per_line:e.Nat16,lines_per_page:e.Nat16})}))}),me=e.Record({arg:e.Vec(e.Nat8),method:e.Text,user_preferences:_e}),ue=e.Variant({LineDisplayMessage:e.Record({pages:e.Vec(e.Record({lines:e.Vec(e.Text)}))}),GenericDisplayMessage:e.Text}),ge=e.Record({metadata:B,consent_message:ue}),P=e.Record({description:e.Text}),fe=e.Variant({GenericError:e.Record({description:e.Text,error_code:e.Nat}),InsufficientPayment:P,UnsupportedCanisterCall:P,ConsentMessageUnavailable:P}),Ne=e.Variant({Ok:ge,Err:fe}),Oe=e.Record({account:a,spender:a}),xe=e.Record({allowance:e.Nat,expires_at:e.Opt(s)}),Te=e.Record({fee:e.Opt(e.Nat),memo:e.Opt(e.Vec(e.Nat8)),from_subaccount:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(s),spender:a}),Re=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:e.Nat}),AllowanceChanged:e.Record({current_allowance:e.Nat}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,Expired:e.Record({ledger_time:s}),InsufficientFunds:e.Record({balance:e.Nat})}),ye=e.Variant({Ok:i,Err:Re}),Ve=e.Record({to:a,fee:e.Opt(l),spender_subaccount:e.Opt(d),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:l}),be=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,InsufficientAllowance:e.Record({allowance:l}),BadBurn:e.Record({min_burn_amount:l}),Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:l}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,InsufficientFunds:e.Record({balance:l})}),Ae=e.Variant({Ok:i,Err:be}),he=e.Record({from:e.Opt(e.Principal)}),ke=e.Vec(e.Record({end:e.Nat,canister_id:e.Principal,start:e.Nat}));r.fill(e.Variant({Int:e.Int,Map:e.Vec(e.Tuple(e.Text,r)),Nat:e.Nat,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(r)})),t.fill(e.Record({log_length:e.Nat,blocks:e.Vec(e.Record({id:e.Nat,block:r})),archived_blocks:e.Vec(e.Record({args:e.Vec(m),callback:e.Func([e.Vec(m)],[t],[])}))}));let Fe=e.Record({certificate:e.Vec(e.Nat8),hash_tree:e.Vec(e.Nat8)});return e.Service({archives:e.Func([],[e.Vec(g)],[]),get_blocks:e.Func([m],[h],[]),get_data_certificate:e.Func([],[k],[]),get_transactions:e.Func([y],[te],[]),icrc103_get_allowances:e.Func([re],[ne],[]),icrc106_get_index_principal:e.Func([],[se],[]),icrc10_supported_standards:e.Func([],[e.Vec(e.Record({url:e.Text,name:e.Text}))],[]),icrc1_balance_of:e.Func([a],[l],[]),icrc1_decimals:e.Func([],[e.Nat8],[]),icrc1_fee:e.Func([],[l],[]),icrc1_metadata:e.Func([],[e.Vec(e.Tuple(e.Text,n))],[]),icrc1_minting_account:e.Func([],[e.Opt(a)],[]),icrc1_name:e.Func([],[e.Text],[]),icrc1_supported_standards:e.Func([],[e.Vec(ie)],[]),icrc1_symbol:e.Func([],[e.Text],[]),icrc1_total_supply:e.Func([],[l],[]),icrc1_transfer:e.Func([pe],[de],[]),icrc21_canister_call_consent_message:e.Func([me],[Ne],[]),icrc2_allowance:e.Func([Oe],[xe],[]),icrc2_approve:e.Func([Te],[ye],[]),icrc2_transfer_from:e.Func([Ve],[Ae],[]),icrc3_get_archives:e.Func([he],[ke],[]),icrc3_get_blocks:e.Func([e.Vec(m)],[t],[]),icrc3_get_tip_certificate:e.Func([],[e.Opt(Fe)],[]),icrc3_supported_block_types:e.Func([],[e.Vec(e.Record({url:e.Text,block_type:e.Text}))],[]),is_ledger_ready:e.Func([],[e.Bool],[])})};var Ze=({IDL:e})=>{let t=e.Rec(),r=e.Rec(),c=e.Rec(),o=e.Record({num_blocks_to_archive:e.Opt(e.Nat64),max_transactions_per_response:e.Opt(e.Nat64),trigger_threshold:e.Opt(e.Nat64),more_controller_ids:e.Opt(e.Vec(e.Principal)),max_message_size_bytes:e.Opt(e.Nat64),cycles_for_archive_creation:e.Opt(e.Nat64),node_max_memory_size_bytes:e.Opt(e.Nat64),controller_id:e.Opt(e.Principal)}),n=e.Variant({Int:e.Int,Nat:e.Nat,Blob:e.Vec(e.Nat8),Text:e.Text}),d=e.Vec(e.Nat8),a=e.Record({owner:e.Principal,subaccount:e.Opt(d)}),f=e.Variant({SetTo:a,Unset:e.Null}),p=e.Record({icrc2:e.Bool}),N=e.Record({change_archive_options:e.Opt(o),token_symbol:e.Opt(e.Text),transfer_fee:e.Opt(e.Nat),metadata:e.Opt(e.Vec(e.Tuple(e.Text,n))),change_fee_collector:e.Opt(f),max_memo_length:e.Opt(e.Nat16),index_principal:e.Opt(e.Principal),token_name:e.Opt(e.Text),feature_flags:e.Opt(p)}),O=e.Record({decimals:e.Opt(e.Nat8),token_symbol:e.Text,transfer_fee:e.Nat,metadata:e.Vec(e.Tuple(e.Text,n)),minting_account:a,initial_balances:e.Vec(e.Tuple(a,e.Nat)),fee_collector_account:e.Opt(a),archive_options:e.Record({num_blocks_to_archive:e.Nat64,max_transactions_per_response:e.Opt(e.Nat64),trigger_threshold:e.Nat64,more_controller_ids:e.Opt(e.Vec(e.Principal)),max_message_size_bytes:e.Opt(e.Nat64),cycles_for_archive_creation:e.Opt(e.Nat64),node_max_memory_size_bytes:e.Opt(e.Nat64),controller_id:e.Principal}),max_memo_length:e.Opt(e.Nat16),index_principal:e.Opt(e.Principal),token_name:e.Text,feature_flags:e.Opt(p)}),T=e.Variant({Upgrade:e.Opt(N),Init:O}),i=e.Nat,g=e.Record({block_range_end:i,canister_id:e.Principal,block_range_start:i}),m=e.Record({start:i,length:e.Nat}),V=e.Vec(e.Tuple(e.Text,c));c.fill(e.Variant({Int:e.Int,Map:V,Nat:e.Nat,Nat64:e.Nat64,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(c)}));let R=c,b=e.Record({blocks:e.Vec(R)}),A=e.Func([m],[b],["query"]),h=e.Record({certificate:e.Opt(e.Vec(e.Nat8)),first_index:i,blocks:e.Vec(R),chain_length:e.Nat64,archived_blocks:e.Vec(e.Record({callback:A,start:i,length:e.Nat}))}),k=e.Record({certificate:e.Opt(e.Vec(e.Nat8)),hash_tree:e.Vec(e.Nat8)}),x=e.Nat,y=e.Record({start:x,length:e.Nat}),s=e.Nat64,F=e.Record({from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,spender:e.Opt(a)}),K=e.Record({to:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat}),I=e.Record({fee:e.Opt(e.Nat),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(s),spender:a}),L=e.Record({to:a,fee:e.Opt(e.Nat),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,spender:e.Opt(a)}),S=e.Record({burn:e.Opt(F),kind:e.Text,mint:e.Opt(K),approve:e.Opt(I),timestamp:s,transfer:e.Opt(L)}),D=e.Record({transactions:e.Vec(S)}),ee=e.Func([y],[D],["query"]),te=e.Record({first_index:x,log_length:e.Nat,transactions:e.Vec(S),archived_transactions:e.Vec(e.Record({callback:ee,start:x,length:e.Nat}))}),re=e.Record({take:e.Opt(e.Nat),prev_spender:e.Opt(a),from_account:e.Opt(a)}),ce=e.Record({from_account:a,to_spender:a,allowance:e.Nat,expires_at:e.Opt(e.Nat64)}),ae=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),AccessDenied:e.Record({reason:e.Text})}),ne=e.Variant({Ok:e.Vec(ce),Err:ae}),oe=e.Variant({GenericError:e.Record({description:e.Text,error_code:e.Nat}),IndexPrincipalNotSet:e.Null}),se=e.Variant({Ok:e.Principal,Err:oe}),l=e.Nat,ie=e.Record({url:e.Text,name:e.Text}),pe=e.Record({to:a,fee:e.Opt(l),memo:e.Opt(e.Vec(e.Nat8)),from_subaccount:e.Opt(d),created_at_time:e.Opt(s),amount:l}),le=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,BadBurn:e.Record({min_burn_amount:l}),Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:l}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,InsufficientFunds:e.Record({balance:l})}),de=e.Variant({Ok:i,Err:le}),B=e.Record({utc_offset_minutes:e.Opt(e.Int16),language:e.Text}),_e=e.Record({metadata:B,device_spec:e.Opt(e.Variant({GenericDisplay:e.Null,LineDisplay:e.Record({characters_per_line:e.Nat16,lines_per_page:e.Nat16})}))}),me=e.Record({arg:e.Vec(e.Nat8),method:e.Text,user_preferences:_e}),ue=e.Variant({LineDisplayMessage:e.Record({pages:e.Vec(e.Record({lines:e.Vec(e.Text)}))}),GenericDisplayMessage:e.Text}),ge=e.Record({metadata:B,consent_message:ue}),P=e.Record({description:e.Text}),fe=e.Variant({GenericError:e.Record({description:e.Text,error_code:e.Nat}),InsufficientPayment:P,UnsupportedCanisterCall:P,ConsentMessageUnavailable:P}),Ne=e.Variant({Ok:ge,Err:fe}),Oe=e.Record({account:a,spender:a}),xe=e.Record({allowance:e.Nat,expires_at:e.Opt(s)}),Te=e.Record({fee:e.Opt(e.Nat),memo:e.Opt(e.Vec(e.Nat8)),from_subaccount:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:e.Nat,expected_allowance:e.Opt(e.Nat),expires_at:e.Opt(s),spender:a}),Re=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:e.Nat}),AllowanceChanged:e.Record({current_allowance:e.Nat}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,Expired:e.Record({ledger_time:s}),InsufficientFunds:e.Record({balance:e.Nat})}),ye=e.Variant({Ok:i,Err:Re}),Ve=e.Record({to:a,fee:e.Opt(l),spender_subaccount:e.Opt(d),from:a,memo:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(s),amount:l}),be=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,InsufficientAllowance:e.Record({allowance:l}),BadBurn:e.Record({min_burn_amount:l}),Duplicate:e.Record({duplicate_of:i}),BadFee:e.Record({expected_fee:l}),CreatedInFuture:e.Record({ledger_time:s}),TooOld:e.Null,InsufficientFunds:e.Record({balance:l})}),Ae=e.Variant({Ok:i,Err:be}),he=e.Record({from:e.Opt(e.Principal)}),ke=e.Vec(e.Record({end:e.Nat,canister_id:e.Principal,start:e.Nat}));r.fill(e.Variant({Int:e.Int,Map:e.Vec(e.Tuple(e.Text,r)),Nat:e.Nat,Blob:e.Vec(e.Nat8),Text:e.Text,Array:e.Vec(r)})),t.fill(e.Record({log_length:e.Nat,blocks:e.Vec(e.Record({id:e.Nat,block:r})),archived_blocks:e.Vec(e.Record({args:e.Vec(m),callback:e.Func([e.Vec(m)],[t],["query"])}))}));let Fe=e.Record({certificate:e.Vec(e.Nat8),hash_tree:e.Vec(e.Nat8)});return e.Service({archives:e.Func([],[e.Vec(g)],["query"]),get_blocks:e.Func([m],[h],["query"]),get_data_certificate:e.Func([],[k],["query"]),get_transactions:e.Func([y],[te],["query"]),icrc103_get_allowances:e.Func([re],[ne],["query"]),icrc106_get_index_principal:e.Func([],[se],["query"]),icrc10_supported_standards:e.Func([],[e.Vec(e.Record({url:e.Text,name:e.Text}))],["query"]),icrc1_balance_of:e.Func([a],[l],["query"]),icrc1_decimals:e.Func([],[e.Nat8],["query"]),icrc1_fee:e.Func([],[l],["query"]),icrc1_metadata:e.Func([],[e.Vec(e.Tuple(e.Text,n))],["query"]),icrc1_minting_account:e.Func([],[e.Opt(a)],["query"]),icrc1_name:e.Func([],[e.Text],["query"]),icrc1_supported_standards:e.Func([],[e.Vec(ie)],["query"]),icrc1_symbol:e.Func([],[e.Text],["query"]),icrc1_total_supply:e.Func([],[l],["query"]),icrc1_transfer:e.Func([pe],[de],[]),icrc21_canister_call_consent_message:e.Func([me],[Ne],[]),icrc2_allowance:e.Func([Oe],[xe],["query"]),icrc2_approve:e.Func([Te],[ye],[]),icrc2_transfer_from:e.Func([Ve],[Ae],[]),icrc3_get_archives:e.Func([he],[ke],["query"]),icrc3_get_blocks:e.Func([e.Vec(m)],[t],["query"]),icrc3_get_tip_certificate:e.Func([],[e.Opt(Fe)],["query"]),icrc3_supported_block_types:e.Func([],[e.Vec(e.Record({url:e.Text,block_type:e.Text}))],["query"]),is_ledger_ready:e.Func([],[e.Bool],["query"])})};var j=class e extends w.Canister{static create(t){let{service:r,certifiedService:c,canisterId:o}=(0,w.createServices)({options:t,idlFactory:Ze,certifiedIdlFactory:We});return new e(o,r,c)}metadata=t=>this.caller(t).icrc1_metadata();transactionFee=t=>this.caller(t).icrc1_fee();balance=t=>this.caller({certified:t.certified}).icrc1_balance_of({owner:t.owner,subaccount:(0,w.toNullable)(t.subaccount)});transfer=async t=>{let r=await this.caller({certified:!0}).icrc1_transfer(ve(t));if("Err"in r)throw new E({errorType:r.Err,msg:"Failed to transfer"});return r.Ok};totalTokensSupply=t=>this.caller(t).icrc1_total_supply();transferFrom=async t=>{let r=await this.caller({certified:!0}).icrc2_transfer_from(Ee(t));if("Err"in r)throw new E({errorType:r.Err,msg:"Failed to transfer from"});return r.Ok};approve=async t=>{let r=await this.caller({certified:!0}).icrc2_approve(Ge(t));if("Err"in r)throw new E({errorType:r.Err,msg:"Failed to entitle the spender to transfer the amount"});return r.Ok};allowance=t=>{let{certified:r,...c}=t;return this.caller({certified:r}).icrc2_allowance({...c})};consentMessage=async t=>{let{icrc21_canister_call_consent_message:r}=this.caller({certified:!0}),c=await r(we(t));if("Err"in c)throw Se(c.Err);return c.Ok};getBlocks=t=>this.caller({certified:t.certified}).icrc3_get_blocks(t.args);getIndexPrincipal=async t=>{let{icrc106_get_index_principal:r}=this.caller(t),c=await r();if("Err"in c)throw Be(c.Err);return c.Ok}};var Ce=(n=>(n.SYMBOL="icrc1:symbol",n.NAME="icrc1:name",n.DECIMALS="icrc1:decimals",n.FEE="icrc1:fee",n.LOGO="icrc1:logo",n))(Ce||{});var Me=require("@dfinity/principal"),u=require("@dfinity/utils");var et=64,tt=({owner:e,subaccount:t})=>{if((0,u.isNullish)(t))return e.toText();let c=(o=>o.replace(/^0+/,""))((0,u.uint8ArrayToHexString)(Uint8Array.from(t)));return c.length===0?e.toText():`${e.toText()}-${Xe({owner:e,subaccount:t})}.${c}`},Xe=({owner:e,subaccount:t})=>{let r=(0,u.bigEndianCrc32)(Uint8Array.from([...e.toUint8Array(),...t]));return(0,u.encodeBase32)(r)},rt=e=>{let[t,r,...c]=e.split(".");if(!(0,u.notEmptyString)(t))throw new Error("Invalid account. No string provided.");if(c.length>0)throw new Error("Invalid account string format. Expected at most one '.' separator.");if((0,u.isNullish)(r))return{owner:Me.Principal.fromText(e)};let[o,...n]=t.split("-").reverse(),d=n.reverse().join("-"),a={owner:Me.Principal.fromText(d),subaccount:(0,u.hexStringToUint8Array)(r.padStart(et,"0"))};if(Xe(a)!==o)throw new Error("Invalid account. Invalid checksum.");return a},ct=e=>{let t=e.reduce((c,[o,n])=>{switch(o){case"icrc1:symbol":c={...c,..."Text"in n&&{symbol:n.Text}};break;case"icrc1:name":c={...c,..."Text"in n&&{name:n.Text}};break;case"icrc1:fee":c={...c,..."Nat"in n&&{fee:n.Nat}};break;case"icrc1:decimals":c={...c,..."Nat"in n&&{decimals:Number(n.Nat)}};break;case"icrc1:logo":c={...c,..."Text"in n&&{icon:n.Text}}}return c},{});if((c=>(0,u.nonNullish)(c.symbol)&&(0,u.nonNullish)(c.name)&&(0,u.nonNullish)(c.fee)&&(0,u.nonNullish)(c.decimals))(t))return t};var J=require("@dfinity/utils"),at=e=>{let t=/^([a-zA-Z]+):([A-Za-z0-9:\-.]+).*?(?:[?&](?:amount|value)=(\d+(?:\.\d+)?))?$/,r=e.match(t);if((0,J.isNullish)(r))return;let[c,o,n,d]=r;return{token:o,identifier:n,...(0,J.nonNullish)(d)&&!isNaN(parseFloat(d))&&{amount:parseFloat(d)}}};0&&(module.exports={ConsentMessageError,ConsentMessageUnavailableError,GenericError,IcrcIndexCanister,IcrcIndexNgCanister,IcrcLedgerCanister,IcrcMetadataResponseEntries,IcrcTransferError,IndexError,IndexPrincipalNotSetError,InsufficientPaymentError,UnsupportedCanisterCallError,decodeIcrcAccount,decodePayment,encodeIcrcAccount,mapIcrc106GetIndexPrincipalError,mapIcrc21ConsentMessageError,mapTokenMetadata,toApproveArgs,toIcrc21ConsentMessageArgs,toTransferArg,toTransferFromArgs});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|