@dfinity/ledger-icrc 6.0.1-next-2025-12-08.1 → 6.0.1-next-2025-12-10

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.
Files changed (62) hide show
  1. package/dist/index.d.ts +18 -18
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +4 -4
  4. package/dist/index.mjs +1 -1
  5. package/dist/index.mjs.map +4 -4
  6. package/package.json +3 -4
  7. package/dist/candid/icrc_icrc-1.certified.idl.d.ts +0 -2
  8. package/dist/candid/icrc_icrc-1.certified.idl.js +0 -68
  9. package/dist/candid/icrc_icrc-1.d.ts +0 -69
  10. package/dist/candid/icrc_icrc-1.did +0 -54
  11. package/dist/candid/icrc_icrc-1.idl.d.ts +0 -2
  12. package/dist/candid/icrc_icrc-1.idl.js +0 -72
  13. package/dist/candid/icrc_icrc-10.certified.idl.d.ts +0 -2
  14. package/dist/candid/icrc_icrc-10.certified.idl.js +0 -20
  15. package/dist/candid/icrc_icrc-10.d.ts +0 -21
  16. package/dist/candid/icrc_icrc-10.did +0 -8
  17. package/dist/candid/icrc_icrc-10.idl.d.ts +0 -2
  18. package/dist/candid/icrc_icrc-10.idl.js +0 -24
  19. package/dist/candid/icrc_index-ng.certified.idl.d.ts +0 -2
  20. package/dist/candid/icrc_index-ng.certified.idl.js +0 -157
  21. package/dist/candid/icrc_index-ng.d.ts +0 -160
  22. package/dist/candid/icrc_index-ng.did +0 -163
  23. package/dist/candid/icrc_index-ng.idl.d.ts +0 -2
  24. package/dist/candid/icrc_index-ng.idl.js +0 -157
  25. package/dist/candid/icrc_index.certified.idl.d.ts +0 -2
  26. package/dist/candid/icrc_index.certified.idl.js +0 -99
  27. package/dist/candid/icrc_index.d.ts +0 -108
  28. package/dist/candid/icrc_index.did +0 -98
  29. package/dist/candid/icrc_index.idl.d.ts +0 -2
  30. package/dist/candid/icrc_index.idl.js +0 -99
  31. package/dist/candid/icrc_ledger.certified.idl.d.ts +0 -2
  32. package/dist/candid/icrc_ledger.certified.idl.js +0 -531
  33. package/dist/candid/icrc_ledger.d.ts +0 -596
  34. package/dist/candid/icrc_ledger.did +0 -586
  35. package/dist/candid/icrc_ledger.idl.d.ts +0 -2
  36. package/dist/candid/icrc_ledger.idl.js +0 -551
  37. package/dist/candid/icrc_nft-ledger.certified.idl.d.ts +0 -2
  38. package/dist/candid/icrc_nft-ledger.certified.idl.js +0 -102
  39. package/dist/candid/icrc_nft-ledger.d.ts +0 -80
  40. package/dist/candid/icrc_nft-ledger.did +0 -67
  41. package/dist/candid/icrc_nft-ledger.idl.d.ts +0 -2
  42. package/dist/candid/icrc_nft-ledger.idl.js +0 -106
  43. package/dist/canister.d.ts +0 -13
  44. package/dist/converters/converters.d.ts +0 -16
  45. package/dist/converters/index.converters.d.ts +0 -6
  46. package/dist/converters/ledger.converters.d.ts +0 -6
  47. package/dist/errors/index.errors.d.ts +0 -2
  48. package/dist/errors/ledger.errors.d.ts +0 -25
  49. package/dist/index-ng.canister.d.ts +0 -43
  50. package/dist/index.canister.d.ts +0 -21
  51. package/dist/ledger.canister.d.ts +0 -121
  52. package/dist/nft-ledger.canister.d.ts +0 -16
  53. package/dist/types/canister.options.d.ts +0 -5
  54. package/dist/types/canister.types.d.ts +0 -2
  55. package/dist/types/index-ng.params.d.ts +0 -12
  56. package/dist/types/index-ng.types.d.ts +0 -1
  57. package/dist/types/index.params.d.ts +0 -7
  58. package/dist/types/index.types.d.ts +0 -1
  59. package/dist/types/ledger.params.d.ts +0 -109
  60. package/dist/types/ledger.responses.d.ts +0 -24
  61. package/dist/utils/ledger.utils.d.ts +0 -31
  62. package/dist/utils/payment.utils.d.ts +0 -28
@@ -1,551 +0,0 @@
1
- /* eslint-disable */
2
-
3
- // @ts-nocheck
4
-
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
- // You should NOT make any changes in this file as it will be overwritten.
7
- // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
-
9
- export const idlFactory = ({ IDL }) => {
10
- const GetBlocksResult = IDL.Rec();
11
- const ICRC3Value = IDL.Rec();
12
- const Value = IDL.Rec();
13
- const ChangeArchiveOptions = IDL.Record({
14
- num_blocks_to_archive: IDL.Opt(IDL.Nat64),
15
- max_transactions_per_response: IDL.Opt(IDL.Nat64),
16
- trigger_threshold: IDL.Opt(IDL.Nat64),
17
- more_controller_ids: IDL.Opt(IDL.Vec(IDL.Principal)),
18
- max_message_size_bytes: IDL.Opt(IDL.Nat64),
19
- cycles_for_archive_creation: IDL.Opt(IDL.Nat64),
20
- node_max_memory_size_bytes: IDL.Opt(IDL.Nat64),
21
- controller_id: IDL.Opt(IDL.Principal),
22
- });
23
- const MetadataValue = IDL.Variant({
24
- Int: IDL.Int,
25
- Nat: IDL.Nat,
26
- Blob: IDL.Vec(IDL.Nat8),
27
- Text: IDL.Text,
28
- });
29
- const Subaccount = IDL.Vec(IDL.Nat8);
30
- const Account = IDL.Record({
31
- owner: IDL.Principal,
32
- subaccount: IDL.Opt(Subaccount),
33
- });
34
- const ChangeFeeCollector = IDL.Variant({
35
- SetTo: Account,
36
- Unset: IDL.Null,
37
- });
38
- const FeatureFlags = IDL.Record({ icrc2: IDL.Bool });
39
- const UpgradeArgs = IDL.Record({
40
- change_archive_options: IDL.Opt(ChangeArchiveOptions),
41
- token_symbol: IDL.Opt(IDL.Text),
42
- transfer_fee: IDL.Opt(IDL.Nat),
43
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, MetadataValue))),
44
- change_fee_collector: IDL.Opt(ChangeFeeCollector),
45
- max_memo_length: IDL.Opt(IDL.Nat16),
46
- index_principal: IDL.Opt(IDL.Principal),
47
- token_name: IDL.Opt(IDL.Text),
48
- feature_flags: IDL.Opt(FeatureFlags),
49
- });
50
- const InitArgs = IDL.Record({
51
- decimals: IDL.Opt(IDL.Nat8),
52
- token_symbol: IDL.Text,
53
- transfer_fee: IDL.Nat,
54
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, MetadataValue)),
55
- minting_account: Account,
56
- initial_balances: IDL.Vec(IDL.Tuple(Account, IDL.Nat)),
57
- fee_collector_account: IDL.Opt(Account),
58
- archive_options: IDL.Record({
59
- num_blocks_to_archive: IDL.Nat64,
60
- max_transactions_per_response: IDL.Opt(IDL.Nat64),
61
- trigger_threshold: IDL.Nat64,
62
- more_controller_ids: IDL.Opt(IDL.Vec(IDL.Principal)),
63
- max_message_size_bytes: IDL.Opt(IDL.Nat64),
64
- cycles_for_archive_creation: IDL.Opt(IDL.Nat64),
65
- node_max_memory_size_bytes: IDL.Opt(IDL.Nat64),
66
- controller_id: IDL.Principal,
67
- }),
68
- max_memo_length: IDL.Opt(IDL.Nat16),
69
- index_principal: IDL.Opt(IDL.Principal),
70
- token_name: IDL.Text,
71
- feature_flags: IDL.Opt(FeatureFlags),
72
- });
73
- const LedgerArg = IDL.Variant({
74
- Upgrade: IDL.Opt(UpgradeArgs),
75
- Init: InitArgs,
76
- });
77
- const BlockIndex = IDL.Nat;
78
- const ArchiveInfo = IDL.Record({
79
- block_range_end: BlockIndex,
80
- canister_id: IDL.Principal,
81
- block_range_start: BlockIndex,
82
- });
83
- const GetBlocksArgs = IDL.Record({
84
- start: BlockIndex,
85
- length: IDL.Nat,
86
- });
87
- const Map = IDL.Vec(IDL.Tuple(IDL.Text, Value));
88
- Value.fill(
89
- IDL.Variant({
90
- Int: IDL.Int,
91
- Map: Map,
92
- Nat: IDL.Nat,
93
- Nat64: IDL.Nat64,
94
- Blob: IDL.Vec(IDL.Nat8),
95
- Text: IDL.Text,
96
- Array: IDL.Vec(Value),
97
- }),
98
- );
99
- const Block = Value;
100
- const BlockRange = IDL.Record({ blocks: IDL.Vec(Block) });
101
- const QueryBlockArchiveFn = IDL.Func(
102
- [GetBlocksArgs],
103
- [BlockRange],
104
- ["query"],
105
- );
106
- const GetBlocksResponse = IDL.Record({
107
- certificate: IDL.Opt(IDL.Vec(IDL.Nat8)),
108
- first_index: BlockIndex,
109
- blocks: IDL.Vec(Block),
110
- chain_length: IDL.Nat64,
111
- archived_blocks: IDL.Vec(
112
- IDL.Record({
113
- callback: QueryBlockArchiveFn,
114
- start: BlockIndex,
115
- length: IDL.Nat,
116
- }),
117
- ),
118
- });
119
- const DataCertificate = IDL.Record({
120
- certificate: IDL.Opt(IDL.Vec(IDL.Nat8)),
121
- hash_tree: IDL.Vec(IDL.Nat8),
122
- });
123
- const TxIndex = IDL.Nat;
124
- const GetTransactionsRequest = IDL.Record({
125
- start: TxIndex,
126
- length: IDL.Nat,
127
- });
128
- const Timestamp = IDL.Nat64;
129
- const Burn = IDL.Record({
130
- fee: IDL.Opt(IDL.Nat),
131
- from: Account,
132
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
133
- created_at_time: IDL.Opt(Timestamp),
134
- amount: IDL.Nat,
135
- spender: IDL.Opt(Account),
136
- });
137
- const Mint = IDL.Record({
138
- to: Account,
139
- fee: IDL.Opt(IDL.Nat),
140
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
141
- created_at_time: IDL.Opt(Timestamp),
142
- amount: IDL.Nat,
143
- });
144
- const Approve = IDL.Record({
145
- fee: IDL.Opt(IDL.Nat),
146
- from: Account,
147
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
148
- created_at_time: IDL.Opt(Timestamp),
149
- amount: IDL.Nat,
150
- expected_allowance: IDL.Opt(IDL.Nat),
151
- expires_at: IDL.Opt(Timestamp),
152
- spender: Account,
153
- });
154
- const FeeCollector = IDL.Record({
155
- ts: IDL.Opt(IDL.Nat64),
156
- fee_collector: IDL.Opt(Account),
157
- caller: IDL.Opt(IDL.Principal),
158
- });
159
- const Transfer = IDL.Record({
160
- to: Account,
161
- fee: IDL.Opt(IDL.Nat),
162
- from: Account,
163
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
164
- created_at_time: IDL.Opt(Timestamp),
165
- amount: IDL.Nat,
166
- spender: IDL.Opt(Account),
167
- });
168
- const Transaction = IDL.Record({
169
- burn: IDL.Opt(Burn),
170
- kind: IDL.Text,
171
- mint: IDL.Opt(Mint),
172
- approve: IDL.Opt(Approve),
173
- fee_collector: IDL.Opt(FeeCollector),
174
- timestamp: Timestamp,
175
- transfer: IDL.Opt(Transfer),
176
- });
177
- const TransactionRange = IDL.Record({
178
- transactions: IDL.Vec(Transaction),
179
- });
180
- const QueryArchiveFn = IDL.Func(
181
- [GetTransactionsRequest],
182
- [TransactionRange],
183
- ["query"],
184
- );
185
- const GetTransactionsResponse = IDL.Record({
186
- first_index: TxIndex,
187
- log_length: IDL.Nat,
188
- transactions: IDL.Vec(Transaction),
189
- archived_transactions: IDL.Vec(
190
- IDL.Record({
191
- callback: QueryArchiveFn,
192
- start: TxIndex,
193
- length: IDL.Nat,
194
- }),
195
- ),
196
- });
197
- const GetAllowancesArgs = IDL.Record({
198
- take: IDL.Opt(IDL.Nat),
199
- prev_spender: IDL.Opt(Account),
200
- from_account: IDL.Opt(Account),
201
- });
202
- const Allowance103 = IDL.Record({
203
- from_account: Account,
204
- to_spender: Account,
205
- allowance: IDL.Nat,
206
- expires_at: IDL.Opt(IDL.Nat64),
207
- });
208
- const GetAllowancesError = IDL.Variant({
209
- GenericError: IDL.Record({
210
- message: IDL.Text,
211
- error_code: IDL.Nat,
212
- }),
213
- AccessDenied: IDL.Record({ reason: IDL.Text }),
214
- });
215
- const icrc103_get_allowances_response = IDL.Variant({
216
- Ok: IDL.Vec(Allowance103),
217
- Err: GetAllowancesError,
218
- });
219
- const GetIndexPrincipalError = IDL.Variant({
220
- GenericError: IDL.Record({
221
- description: IDL.Text,
222
- error_code: IDL.Nat,
223
- }),
224
- IndexPrincipalNotSet: IDL.Null,
225
- });
226
- const GetIndexPrincipalResult = IDL.Variant({
227
- Ok: IDL.Principal,
228
- Err: GetIndexPrincipalError,
229
- });
230
- const Tokens = IDL.Nat;
231
- const StandardRecord = IDL.Record({ url: IDL.Text, name: IDL.Text });
232
- const TransferArg = IDL.Record({
233
- to: Account,
234
- fee: IDL.Opt(Tokens),
235
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
236
- from_subaccount: IDL.Opt(Subaccount),
237
- created_at_time: IDL.Opt(Timestamp),
238
- amount: Tokens,
239
- });
240
- const TransferError = IDL.Variant({
241
- GenericError: IDL.Record({
242
- message: IDL.Text,
243
- error_code: IDL.Nat,
244
- }),
245
- TemporarilyUnavailable: IDL.Null,
246
- BadBurn: IDL.Record({ min_burn_amount: Tokens }),
247
- Duplicate: IDL.Record({ duplicate_of: BlockIndex }),
248
- BadFee: IDL.Record({ expected_fee: Tokens }),
249
- CreatedInFuture: IDL.Record({ ledger_time: Timestamp }),
250
- TooOld: IDL.Null,
251
- InsufficientFunds: IDL.Record({ balance: Tokens }),
252
- });
253
- const TransferResult = IDL.Variant({
254
- Ok: BlockIndex,
255
- Err: TransferError,
256
- });
257
- const icrc21_consent_message_metadata = IDL.Record({
258
- utc_offset_minutes: IDL.Opt(IDL.Int16),
259
- language: IDL.Text,
260
- });
261
- const icrc21_consent_message_spec = IDL.Record({
262
- metadata: icrc21_consent_message_metadata,
263
- device_spec: IDL.Opt(
264
- IDL.Variant({ GenericDisplay: IDL.Null, FieldsDisplay: IDL.Null }),
265
- ),
266
- });
267
- const icrc21_consent_message_request = IDL.Record({
268
- arg: IDL.Vec(IDL.Nat8),
269
- method: IDL.Text,
270
- user_preferences: icrc21_consent_message_spec,
271
- });
272
- const Icrc21Value = IDL.Variant({
273
- Text: IDL.Record({ content: IDL.Text }),
274
- TokenAmount: IDL.Record({
275
- decimals: IDL.Nat8,
276
- amount: IDL.Nat64,
277
- symbol: IDL.Text,
278
- }),
279
- TimestampSeconds: IDL.Record({ amount: IDL.Nat64 }),
280
- DurationSeconds: IDL.Record({ amount: IDL.Nat64 }),
281
- });
282
- const FieldsDisplay = IDL.Record({
283
- fields: IDL.Vec(IDL.Tuple(IDL.Text, Icrc21Value)),
284
- intent: IDL.Text,
285
- });
286
- const icrc21_consent_message = IDL.Variant({
287
- FieldsDisplayMessage: FieldsDisplay,
288
- GenericDisplayMessage: IDL.Text,
289
- });
290
- const icrc21_consent_info = IDL.Record({
291
- metadata: icrc21_consent_message_metadata,
292
- consent_message: icrc21_consent_message,
293
- });
294
- const icrc21_error_info = IDL.Record({ description: IDL.Text });
295
- const icrc21_error = IDL.Variant({
296
- GenericError: IDL.Record({
297
- description: IDL.Text,
298
- error_code: IDL.Nat,
299
- }),
300
- InsufficientPayment: icrc21_error_info,
301
- UnsupportedCanisterCall: icrc21_error_info,
302
- ConsentMessageUnavailable: icrc21_error_info,
303
- });
304
- const icrc21_consent_message_response = IDL.Variant({
305
- Ok: icrc21_consent_info,
306
- Err: icrc21_error,
307
- });
308
- const AllowanceArgs = IDL.Record({
309
- account: Account,
310
- spender: Account,
311
- });
312
- const Allowance = IDL.Record({
313
- allowance: IDL.Nat,
314
- expires_at: IDL.Opt(Timestamp),
315
- });
316
- const ApproveArgs = IDL.Record({
317
- fee: IDL.Opt(IDL.Nat),
318
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
319
- from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
320
- created_at_time: IDL.Opt(Timestamp),
321
- amount: IDL.Nat,
322
- expected_allowance: IDL.Opt(IDL.Nat),
323
- expires_at: IDL.Opt(Timestamp),
324
- spender: Account,
325
- });
326
- const ApproveError = IDL.Variant({
327
- GenericError: IDL.Record({
328
- message: IDL.Text,
329
- error_code: IDL.Nat,
330
- }),
331
- TemporarilyUnavailable: IDL.Null,
332
- Duplicate: IDL.Record({ duplicate_of: BlockIndex }),
333
- BadFee: IDL.Record({ expected_fee: IDL.Nat }),
334
- AllowanceChanged: IDL.Record({ current_allowance: IDL.Nat }),
335
- CreatedInFuture: IDL.Record({ ledger_time: Timestamp }),
336
- TooOld: IDL.Null,
337
- Expired: IDL.Record({ ledger_time: Timestamp }),
338
- InsufficientFunds: IDL.Record({ balance: IDL.Nat }),
339
- });
340
- const ApproveResult = IDL.Variant({
341
- Ok: BlockIndex,
342
- Err: ApproveError,
343
- });
344
- const TransferFromArgs = IDL.Record({
345
- to: Account,
346
- fee: IDL.Opt(Tokens),
347
- spender_subaccount: IDL.Opt(Subaccount),
348
- from: Account,
349
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
350
- created_at_time: IDL.Opt(Timestamp),
351
- amount: Tokens,
352
- });
353
- const TransferFromError = IDL.Variant({
354
- GenericError: IDL.Record({
355
- message: IDL.Text,
356
- error_code: IDL.Nat,
357
- }),
358
- TemporarilyUnavailable: IDL.Null,
359
- InsufficientAllowance: IDL.Record({ allowance: Tokens }),
360
- BadBurn: IDL.Record({ min_burn_amount: Tokens }),
361
- Duplicate: IDL.Record({ duplicate_of: BlockIndex }),
362
- BadFee: IDL.Record({ expected_fee: Tokens }),
363
- CreatedInFuture: IDL.Record({ ledger_time: Timestamp }),
364
- TooOld: IDL.Null,
365
- InsufficientFunds: IDL.Record({ balance: Tokens }),
366
- });
367
- const TransferFromResult = IDL.Variant({
368
- Ok: BlockIndex,
369
- Err: TransferFromError,
370
- });
371
- const GetArchivesArgs = IDL.Record({ from: IDL.Opt(IDL.Principal) });
372
- const GetArchivesResult = IDL.Vec(
373
- IDL.Record({
374
- end: IDL.Nat,
375
- canister_id: IDL.Principal,
376
- start: IDL.Nat,
377
- }),
378
- );
379
- ICRC3Value.fill(
380
- IDL.Variant({
381
- Int: IDL.Int,
382
- Map: IDL.Vec(IDL.Tuple(IDL.Text, ICRC3Value)),
383
- Nat: IDL.Nat,
384
- Blob: IDL.Vec(IDL.Nat8),
385
- Text: IDL.Text,
386
- Array: IDL.Vec(ICRC3Value),
387
- }),
388
- );
389
- GetBlocksResult.fill(
390
- IDL.Record({
391
- log_length: IDL.Nat,
392
- blocks: IDL.Vec(IDL.Record({ id: IDL.Nat, block: ICRC3Value })),
393
- archived_blocks: IDL.Vec(
394
- IDL.Record({
395
- args: IDL.Vec(GetBlocksArgs),
396
- callback: IDL.Func(
397
- [IDL.Vec(GetBlocksArgs)],
398
- [GetBlocksResult],
399
- ["query"],
400
- ),
401
- }),
402
- ),
403
- }),
404
- );
405
- const ICRC3DataCertificate = IDL.Record({
406
- certificate: IDL.Vec(IDL.Nat8),
407
- hash_tree: IDL.Vec(IDL.Nat8),
408
- });
409
-
410
- return IDL.Service({
411
- archives: IDL.Func([], [IDL.Vec(ArchiveInfo)], ["query"]),
412
- get_blocks: IDL.Func([GetBlocksArgs], [GetBlocksResponse], ["query"]),
413
- get_data_certificate: IDL.Func([], [DataCertificate], ["query"]),
414
- get_transactions: IDL.Func(
415
- [GetTransactionsRequest],
416
- [GetTransactionsResponse],
417
- ["query"],
418
- ),
419
- icrc103_get_allowances: IDL.Func(
420
- [GetAllowancesArgs],
421
- [icrc103_get_allowances_response],
422
- ["query"],
423
- ),
424
- icrc106_get_index_principal: IDL.Func(
425
- [],
426
- [GetIndexPrincipalResult],
427
- ["query"],
428
- ),
429
- icrc10_supported_standards: IDL.Func(
430
- [],
431
- [IDL.Vec(IDL.Record({ url: IDL.Text, name: IDL.Text }))],
432
- ["query"],
433
- ),
434
- icrc1_balance_of: IDL.Func([Account], [Tokens], ["query"]),
435
- icrc1_decimals: IDL.Func([], [IDL.Nat8], ["query"]),
436
- icrc1_fee: IDL.Func([], [Tokens], ["query"]),
437
- icrc1_metadata: IDL.Func(
438
- [],
439
- [IDL.Vec(IDL.Tuple(IDL.Text, MetadataValue))],
440
- ["query"],
441
- ),
442
- icrc1_minting_account: IDL.Func([], [IDL.Opt(Account)], ["query"]),
443
- icrc1_name: IDL.Func([], [IDL.Text], ["query"]),
444
- icrc1_supported_standards: IDL.Func(
445
- [],
446
- [IDL.Vec(StandardRecord)],
447
- ["query"],
448
- ),
449
- icrc1_symbol: IDL.Func([], [IDL.Text], ["query"]),
450
- icrc1_total_supply: IDL.Func([], [Tokens], ["query"]),
451
- icrc1_transfer: IDL.Func([TransferArg], [TransferResult], []),
452
- icrc21_canister_call_consent_message: IDL.Func(
453
- [icrc21_consent_message_request],
454
- [icrc21_consent_message_response],
455
- [],
456
- ),
457
- icrc2_allowance: IDL.Func([AllowanceArgs], [Allowance], ["query"]),
458
- icrc2_approve: IDL.Func([ApproveArgs], [ApproveResult], []),
459
- icrc2_transfer_from: IDL.Func([TransferFromArgs], [TransferFromResult], []),
460
- icrc3_get_archives: IDL.Func(
461
- [GetArchivesArgs],
462
- [GetArchivesResult],
463
- ["query"],
464
- ),
465
- icrc3_get_blocks: IDL.Func(
466
- [IDL.Vec(GetBlocksArgs)],
467
- [GetBlocksResult],
468
- ["query"],
469
- ),
470
- icrc3_get_tip_certificate: IDL.Func(
471
- [],
472
- [IDL.Opt(ICRC3DataCertificate)],
473
- ["query"],
474
- ),
475
- icrc3_supported_block_types: IDL.Func(
476
- [],
477
- [IDL.Vec(IDL.Record({ url: IDL.Text, block_type: IDL.Text }))],
478
- ["query"],
479
- ),
480
- is_ledger_ready: IDL.Func([], [IDL.Bool], ["query"]),
481
- });
482
- };
483
-
484
- export const init = ({ IDL }) => {
485
- const ChangeArchiveOptions = IDL.Record({
486
- num_blocks_to_archive: IDL.Opt(IDL.Nat64),
487
- max_transactions_per_response: IDL.Opt(IDL.Nat64),
488
- trigger_threshold: IDL.Opt(IDL.Nat64),
489
- more_controller_ids: IDL.Opt(IDL.Vec(IDL.Principal)),
490
- max_message_size_bytes: IDL.Opt(IDL.Nat64),
491
- cycles_for_archive_creation: IDL.Opt(IDL.Nat64),
492
- node_max_memory_size_bytes: IDL.Opt(IDL.Nat64),
493
- controller_id: IDL.Opt(IDL.Principal),
494
- });
495
- const MetadataValue = IDL.Variant({
496
- Int: IDL.Int,
497
- Nat: IDL.Nat,
498
- Blob: IDL.Vec(IDL.Nat8),
499
- Text: IDL.Text,
500
- });
501
- const Subaccount = IDL.Vec(IDL.Nat8);
502
- const Account = IDL.Record({
503
- owner: IDL.Principal,
504
- subaccount: IDL.Opt(Subaccount),
505
- });
506
- const ChangeFeeCollector = IDL.Variant({
507
- SetTo: Account,
508
- Unset: IDL.Null,
509
- });
510
- const FeatureFlags = IDL.Record({ icrc2: IDL.Bool });
511
- const UpgradeArgs = IDL.Record({
512
- change_archive_options: IDL.Opt(ChangeArchiveOptions),
513
- token_symbol: IDL.Opt(IDL.Text),
514
- transfer_fee: IDL.Opt(IDL.Nat),
515
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, MetadataValue))),
516
- change_fee_collector: IDL.Opt(ChangeFeeCollector),
517
- max_memo_length: IDL.Opt(IDL.Nat16),
518
- index_principal: IDL.Opt(IDL.Principal),
519
- token_name: IDL.Opt(IDL.Text),
520
- feature_flags: IDL.Opt(FeatureFlags),
521
- });
522
- const InitArgs = IDL.Record({
523
- decimals: IDL.Opt(IDL.Nat8),
524
- token_symbol: IDL.Text,
525
- transfer_fee: IDL.Nat,
526
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, MetadataValue)),
527
- minting_account: Account,
528
- initial_balances: IDL.Vec(IDL.Tuple(Account, IDL.Nat)),
529
- fee_collector_account: IDL.Opt(Account),
530
- archive_options: IDL.Record({
531
- num_blocks_to_archive: IDL.Nat64,
532
- max_transactions_per_response: IDL.Opt(IDL.Nat64),
533
- trigger_threshold: IDL.Nat64,
534
- more_controller_ids: IDL.Opt(IDL.Vec(IDL.Principal)),
535
- max_message_size_bytes: IDL.Opt(IDL.Nat64),
536
- cycles_for_archive_creation: IDL.Opt(IDL.Nat64),
537
- node_max_memory_size_bytes: IDL.Opt(IDL.Nat64),
538
- controller_id: IDL.Principal,
539
- }),
540
- max_memo_length: IDL.Opt(IDL.Nat16),
541
- index_principal: IDL.Opt(IDL.Principal),
542
- token_name: IDL.Text,
543
- feature_flags: IDL.Opt(FeatureFlags),
544
- });
545
- const LedgerArg = IDL.Variant({
546
- Upgrade: IDL.Opt(UpgradeArgs),
547
- Init: InitArgs,
548
- });
549
-
550
- return [LedgerArg];
551
- };
@@ -1,2 +0,0 @@
1
- import type { IDL } from "@icp-sdk/core/candid";
2
- export const idlFactory: IDL.InterfaceFactory;
@@ -1,102 +0,0 @@
1
- /* eslint-disable */
2
-
3
- // @ts-nocheck
4
-
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
- // You should NOT make any changes in this file as it will be overwritten.
7
- // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
-
9
- export const idlFactory = ({ IDL }) => {
10
- const Value = IDL.Rec();
11
- const Subaccount = IDL.Vec(IDL.Nat8);
12
- const Account = IDL.Record({
13
- owner: IDL.Principal,
14
- subaccount: IDL.Opt(Subaccount),
15
- });
16
- Value.fill(
17
- IDL.Variant({
18
- Int: IDL.Int,
19
- Map: IDL.Vec(IDL.Tuple(IDL.Text, Value)),
20
- Nat: IDL.Nat,
21
- Blob: IDL.Vec(IDL.Nat8),
22
- Text: IDL.Text,
23
- Array: IDL.Vec(Value),
24
- }),
25
- );
26
- const TransferArg = IDL.Record({
27
- to: Account,
28
- token_id: IDL.Nat,
29
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
30
- from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
31
- created_at_time: IDL.Opt(IDL.Nat64),
32
- });
33
- const TransferError = IDL.Variant({
34
- GenericError: IDL.Record({
35
- message: IDL.Text,
36
- error_code: IDL.Nat,
37
- }),
38
- Duplicate: IDL.Record({ duplicate_of: IDL.Nat }),
39
- NonExistingTokenId: IDL.Null,
40
- Unauthorized: IDL.Null,
41
- CreatedInFuture: IDL.Record({ ledger_time: IDL.Nat64 }),
42
- InvalidRecipient: IDL.Null,
43
- GenericBatchError: IDL.Record({
44
- message: IDL.Text,
45
- error_code: IDL.Nat,
46
- }),
47
- TooOld: IDL.Null,
48
- });
49
- const TransferResult = IDL.Variant({ Ok: IDL.Nat, Err: TransferError });
50
-
51
- return IDL.Service({
52
- icrc7_atomic_batch_transfers: IDL.Func([], [IDL.Opt(IDL.Bool)], []),
53
- icrc7_balance_of: IDL.Func([IDL.Vec(Account)], [IDL.Vec(IDL.Nat)], []),
54
- icrc7_collection_metadata: IDL.Func(
55
- [],
56
- [IDL.Vec(IDL.Tuple(IDL.Text, Value))],
57
- [],
58
- ),
59
- icrc7_default_take_value: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
60
- icrc7_description: IDL.Func([], [IDL.Opt(IDL.Text)], []),
61
- icrc7_logo: IDL.Func([], [IDL.Opt(IDL.Text)], []),
62
- icrc7_max_memo_size: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
63
- icrc7_max_query_batch_size: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
64
- icrc7_max_take_value: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
65
- icrc7_max_update_batch_size: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
66
- icrc7_name: IDL.Func([], [IDL.Text], []),
67
- icrc7_owner_of: IDL.Func(
68
- [IDL.Vec(IDL.Nat)],
69
- [IDL.Vec(IDL.Opt(Account))],
70
- [],
71
- ),
72
- icrc7_permitted_drift: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
73
- icrc7_supply_cap: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
74
- icrc7_symbol: IDL.Func([], [IDL.Text], []),
75
- icrc7_token_metadata: IDL.Func(
76
- [IDL.Vec(IDL.Nat)],
77
- [IDL.Vec(IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, Value))))],
78
- [],
79
- ),
80
- icrc7_tokens: IDL.Func(
81
- [IDL.Opt(IDL.Nat), IDL.Opt(IDL.Nat)],
82
- [IDL.Vec(IDL.Nat)],
83
- [],
84
- ),
85
- icrc7_tokens_of: IDL.Func(
86
- [Account, IDL.Opt(IDL.Nat), IDL.Opt(IDL.Nat)],
87
- [IDL.Vec(IDL.Nat)],
88
- [],
89
- ),
90
- icrc7_total_supply: IDL.Func([], [IDL.Nat], []),
91
- icrc7_transfer: IDL.Func(
92
- [IDL.Vec(TransferArg)],
93
- [IDL.Vec(IDL.Opt(TransferResult))],
94
- [],
95
- ),
96
- icrc7_tx_window: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
97
- });
98
- };
99
-
100
- export const init = ({ IDL }) => {
101
- return [];
102
- };