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