@dfinity/ledger-icrc 6.0.1 → 7.0.0-beta-2025-12-18
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/dist/index.d.ts +23 -17
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +4 -4
- package/package.json +4 -5
- package/dist/candid/icrc_index-ng.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_index-ng.certified.idl.js +0 -151
- package/dist/candid/icrc_index-ng.d.ts +0 -154
- package/dist/candid/icrc_index-ng.did +0 -156
- package/dist/candid/icrc_index-ng.idl.d.ts +0 -2
- package/dist/candid/icrc_index-ng.idl.js +0 -151
- package/dist/candid/icrc_index.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_index.certified.idl.js +0 -99
- package/dist/candid/icrc_index.d.ts +0 -108
- package/dist/candid/icrc_index.did +0 -98
- package/dist/candid/icrc_index.idl.d.ts +0 -2
- package/dist/candid/icrc_index.idl.js +0 -99
- package/dist/candid/icrc_ledger.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_ledger.certified.idl.js +0 -525
- package/dist/candid/icrc_ledger.d.ts +0 -590
- package/dist/candid/icrc_ledger.did +0 -579
- package/dist/candid/icrc_ledger.idl.d.ts +0 -2
- package/dist/candid/icrc_ledger.idl.js +0 -545
- package/dist/candid/icrc_nft-ledger.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_nft-ledger.certified.idl.js +0 -102
- package/dist/candid/icrc_nft-ledger.d.ts +0 -80
- package/dist/candid/icrc_nft-ledger.did +0 -67
- package/dist/candid/icrc_nft-ledger.idl.d.ts +0 -2
- package/dist/candid/icrc_nft-ledger.idl.js +0 -106
- package/dist/canister.d.ts +0 -13
- package/dist/converters/converters.d.ts +0 -16
- package/dist/converters/index.converters.d.ts +0 -6
- package/dist/converters/ledger.converters.d.ts +0 -6
- package/dist/errors/index.errors.d.ts +0 -2
- package/dist/errors/ledger.errors.d.ts +0 -25
- package/dist/index-ng.canister.d.ts +0 -43
- package/dist/index.canister.d.ts +0 -21
- package/dist/ledger.canister.d.ts +0 -127
- package/dist/types/canister.options.d.ts +0 -5
- package/dist/types/index-ng.params.d.ts +0 -12
- package/dist/types/index-ng.types.d.ts +0 -1
- package/dist/types/index.params.d.ts +0 -7
- package/dist/types/index.types.d.ts +0 -1
- package/dist/types/ledger.params.d.ts +0 -109
- package/dist/types/ledger.responses.d.ts +0 -24
- package/dist/utils/ledger.utils.d.ts +0 -31
- package/dist/utils/payment.utils.d.ts +0 -28
|
@@ -1,545 +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 Transfer = IDL.Record({
|
|
155
|
-
to: Account,
|
|
156
|
-
fee: IDL.Opt(IDL.Nat),
|
|
157
|
-
from: Account,
|
|
158
|
-
memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
159
|
-
created_at_time: IDL.Opt(Timestamp),
|
|
160
|
-
amount: IDL.Nat,
|
|
161
|
-
spender: IDL.Opt(Account),
|
|
162
|
-
});
|
|
163
|
-
const Transaction = IDL.Record({
|
|
164
|
-
burn: IDL.Opt(Burn),
|
|
165
|
-
kind: IDL.Text,
|
|
166
|
-
mint: IDL.Opt(Mint),
|
|
167
|
-
approve: IDL.Opt(Approve),
|
|
168
|
-
timestamp: Timestamp,
|
|
169
|
-
transfer: IDL.Opt(Transfer),
|
|
170
|
-
});
|
|
171
|
-
const TransactionRange = IDL.Record({
|
|
172
|
-
transactions: IDL.Vec(Transaction),
|
|
173
|
-
});
|
|
174
|
-
const QueryArchiveFn = IDL.Func(
|
|
175
|
-
[GetTransactionsRequest],
|
|
176
|
-
[TransactionRange],
|
|
177
|
-
["query"],
|
|
178
|
-
);
|
|
179
|
-
const GetTransactionsResponse = IDL.Record({
|
|
180
|
-
first_index: TxIndex,
|
|
181
|
-
log_length: IDL.Nat,
|
|
182
|
-
transactions: IDL.Vec(Transaction),
|
|
183
|
-
archived_transactions: IDL.Vec(
|
|
184
|
-
IDL.Record({
|
|
185
|
-
callback: QueryArchiveFn,
|
|
186
|
-
start: TxIndex,
|
|
187
|
-
length: IDL.Nat,
|
|
188
|
-
}),
|
|
189
|
-
),
|
|
190
|
-
});
|
|
191
|
-
const GetAllowancesArgs = IDL.Record({
|
|
192
|
-
take: IDL.Opt(IDL.Nat),
|
|
193
|
-
prev_spender: IDL.Opt(Account),
|
|
194
|
-
from_account: IDL.Opt(Account),
|
|
195
|
-
});
|
|
196
|
-
const Allowance103 = IDL.Record({
|
|
197
|
-
from_account: Account,
|
|
198
|
-
to_spender: Account,
|
|
199
|
-
allowance: IDL.Nat,
|
|
200
|
-
expires_at: IDL.Opt(IDL.Nat64),
|
|
201
|
-
});
|
|
202
|
-
const GetAllowancesError = IDL.Variant({
|
|
203
|
-
GenericError: IDL.Record({
|
|
204
|
-
message: IDL.Text,
|
|
205
|
-
error_code: IDL.Nat,
|
|
206
|
-
}),
|
|
207
|
-
AccessDenied: IDL.Record({ reason: IDL.Text }),
|
|
208
|
-
});
|
|
209
|
-
const icrc103_get_allowances_response = IDL.Variant({
|
|
210
|
-
Ok: IDL.Vec(Allowance103),
|
|
211
|
-
Err: GetAllowancesError,
|
|
212
|
-
});
|
|
213
|
-
const GetIndexPrincipalError = IDL.Variant({
|
|
214
|
-
GenericError: IDL.Record({
|
|
215
|
-
description: IDL.Text,
|
|
216
|
-
error_code: IDL.Nat,
|
|
217
|
-
}),
|
|
218
|
-
IndexPrincipalNotSet: IDL.Null,
|
|
219
|
-
});
|
|
220
|
-
const GetIndexPrincipalResult = IDL.Variant({
|
|
221
|
-
Ok: IDL.Principal,
|
|
222
|
-
Err: GetIndexPrincipalError,
|
|
223
|
-
});
|
|
224
|
-
const Tokens = IDL.Nat;
|
|
225
|
-
const StandardRecord = IDL.Record({ url: IDL.Text, name: IDL.Text });
|
|
226
|
-
const TransferArg = IDL.Record({
|
|
227
|
-
to: Account,
|
|
228
|
-
fee: IDL.Opt(Tokens),
|
|
229
|
-
memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
230
|
-
from_subaccount: IDL.Opt(Subaccount),
|
|
231
|
-
created_at_time: IDL.Opt(Timestamp),
|
|
232
|
-
amount: Tokens,
|
|
233
|
-
});
|
|
234
|
-
const TransferError = IDL.Variant({
|
|
235
|
-
GenericError: IDL.Record({
|
|
236
|
-
message: IDL.Text,
|
|
237
|
-
error_code: IDL.Nat,
|
|
238
|
-
}),
|
|
239
|
-
TemporarilyUnavailable: IDL.Null,
|
|
240
|
-
BadBurn: IDL.Record({ min_burn_amount: Tokens }),
|
|
241
|
-
Duplicate: IDL.Record({ duplicate_of: BlockIndex }),
|
|
242
|
-
BadFee: IDL.Record({ expected_fee: Tokens }),
|
|
243
|
-
CreatedInFuture: IDL.Record({ ledger_time: Timestamp }),
|
|
244
|
-
TooOld: IDL.Null,
|
|
245
|
-
InsufficientFunds: IDL.Record({ balance: Tokens }),
|
|
246
|
-
});
|
|
247
|
-
const TransferResult = IDL.Variant({
|
|
248
|
-
Ok: BlockIndex,
|
|
249
|
-
Err: TransferError,
|
|
250
|
-
});
|
|
251
|
-
const icrc21_consent_message_metadata = IDL.Record({
|
|
252
|
-
utc_offset_minutes: IDL.Opt(IDL.Int16),
|
|
253
|
-
language: IDL.Text,
|
|
254
|
-
});
|
|
255
|
-
const icrc21_consent_message_spec = IDL.Record({
|
|
256
|
-
metadata: icrc21_consent_message_metadata,
|
|
257
|
-
device_spec: IDL.Opt(
|
|
258
|
-
IDL.Variant({ GenericDisplay: IDL.Null, FieldsDisplay: IDL.Null }),
|
|
259
|
-
),
|
|
260
|
-
});
|
|
261
|
-
const icrc21_consent_message_request = IDL.Record({
|
|
262
|
-
arg: IDL.Vec(IDL.Nat8),
|
|
263
|
-
method: IDL.Text,
|
|
264
|
-
user_preferences: icrc21_consent_message_spec,
|
|
265
|
-
});
|
|
266
|
-
const Icrc21Value = IDL.Variant({
|
|
267
|
-
Text: IDL.Record({ content: IDL.Text }),
|
|
268
|
-
TokenAmount: IDL.Record({
|
|
269
|
-
decimals: IDL.Nat8,
|
|
270
|
-
amount: IDL.Nat64,
|
|
271
|
-
symbol: IDL.Text,
|
|
272
|
-
}),
|
|
273
|
-
TimestampSeconds: IDL.Record({ amount: IDL.Nat64 }),
|
|
274
|
-
DurationSeconds: IDL.Record({ amount: IDL.Nat64 }),
|
|
275
|
-
});
|
|
276
|
-
const FieldsDisplay = IDL.Record({
|
|
277
|
-
fields: IDL.Vec(IDL.Tuple(IDL.Text, Icrc21Value)),
|
|
278
|
-
intent: IDL.Text,
|
|
279
|
-
});
|
|
280
|
-
const icrc21_consent_message = IDL.Variant({
|
|
281
|
-
FieldsDisplayMessage: FieldsDisplay,
|
|
282
|
-
GenericDisplayMessage: IDL.Text,
|
|
283
|
-
});
|
|
284
|
-
const icrc21_consent_info = IDL.Record({
|
|
285
|
-
metadata: icrc21_consent_message_metadata,
|
|
286
|
-
consent_message: icrc21_consent_message,
|
|
287
|
-
});
|
|
288
|
-
const icrc21_error_info = IDL.Record({ description: IDL.Text });
|
|
289
|
-
const icrc21_error = IDL.Variant({
|
|
290
|
-
GenericError: IDL.Record({
|
|
291
|
-
description: IDL.Text,
|
|
292
|
-
error_code: IDL.Nat,
|
|
293
|
-
}),
|
|
294
|
-
InsufficientPayment: icrc21_error_info,
|
|
295
|
-
UnsupportedCanisterCall: icrc21_error_info,
|
|
296
|
-
ConsentMessageUnavailable: icrc21_error_info,
|
|
297
|
-
});
|
|
298
|
-
const icrc21_consent_message_response = IDL.Variant({
|
|
299
|
-
Ok: icrc21_consent_info,
|
|
300
|
-
Err: icrc21_error,
|
|
301
|
-
});
|
|
302
|
-
const AllowanceArgs = IDL.Record({
|
|
303
|
-
account: Account,
|
|
304
|
-
spender: Account,
|
|
305
|
-
});
|
|
306
|
-
const Allowance = IDL.Record({
|
|
307
|
-
allowance: IDL.Nat,
|
|
308
|
-
expires_at: IDL.Opt(Timestamp),
|
|
309
|
-
});
|
|
310
|
-
const ApproveArgs = IDL.Record({
|
|
311
|
-
fee: IDL.Opt(IDL.Nat),
|
|
312
|
-
memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
313
|
-
from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
314
|
-
created_at_time: IDL.Opt(Timestamp),
|
|
315
|
-
amount: IDL.Nat,
|
|
316
|
-
expected_allowance: IDL.Opt(IDL.Nat),
|
|
317
|
-
expires_at: IDL.Opt(Timestamp),
|
|
318
|
-
spender: Account,
|
|
319
|
-
});
|
|
320
|
-
const ApproveError = IDL.Variant({
|
|
321
|
-
GenericError: IDL.Record({
|
|
322
|
-
message: IDL.Text,
|
|
323
|
-
error_code: IDL.Nat,
|
|
324
|
-
}),
|
|
325
|
-
TemporarilyUnavailable: IDL.Null,
|
|
326
|
-
Duplicate: IDL.Record({ duplicate_of: BlockIndex }),
|
|
327
|
-
BadFee: IDL.Record({ expected_fee: IDL.Nat }),
|
|
328
|
-
AllowanceChanged: IDL.Record({ current_allowance: IDL.Nat }),
|
|
329
|
-
CreatedInFuture: IDL.Record({ ledger_time: Timestamp }),
|
|
330
|
-
TooOld: IDL.Null,
|
|
331
|
-
Expired: IDL.Record({ ledger_time: Timestamp }),
|
|
332
|
-
InsufficientFunds: IDL.Record({ balance: IDL.Nat }),
|
|
333
|
-
});
|
|
334
|
-
const ApproveResult = IDL.Variant({
|
|
335
|
-
Ok: BlockIndex,
|
|
336
|
-
Err: ApproveError,
|
|
337
|
-
});
|
|
338
|
-
const TransferFromArgs = IDL.Record({
|
|
339
|
-
to: Account,
|
|
340
|
-
fee: IDL.Opt(Tokens),
|
|
341
|
-
spender_subaccount: IDL.Opt(Subaccount),
|
|
342
|
-
from: Account,
|
|
343
|
-
memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
344
|
-
created_at_time: IDL.Opt(Timestamp),
|
|
345
|
-
amount: Tokens,
|
|
346
|
-
});
|
|
347
|
-
const TransferFromError = IDL.Variant({
|
|
348
|
-
GenericError: IDL.Record({
|
|
349
|
-
message: IDL.Text,
|
|
350
|
-
error_code: IDL.Nat,
|
|
351
|
-
}),
|
|
352
|
-
TemporarilyUnavailable: IDL.Null,
|
|
353
|
-
InsufficientAllowance: IDL.Record({ allowance: Tokens }),
|
|
354
|
-
BadBurn: IDL.Record({ min_burn_amount: Tokens }),
|
|
355
|
-
Duplicate: IDL.Record({ duplicate_of: BlockIndex }),
|
|
356
|
-
BadFee: IDL.Record({ expected_fee: Tokens }),
|
|
357
|
-
CreatedInFuture: IDL.Record({ ledger_time: Timestamp }),
|
|
358
|
-
TooOld: IDL.Null,
|
|
359
|
-
InsufficientFunds: IDL.Record({ balance: Tokens }),
|
|
360
|
-
});
|
|
361
|
-
const TransferFromResult = IDL.Variant({
|
|
362
|
-
Ok: BlockIndex,
|
|
363
|
-
Err: TransferFromError,
|
|
364
|
-
});
|
|
365
|
-
const GetArchivesArgs = IDL.Record({ from: IDL.Opt(IDL.Principal) });
|
|
366
|
-
const GetArchivesResult = IDL.Vec(
|
|
367
|
-
IDL.Record({
|
|
368
|
-
end: IDL.Nat,
|
|
369
|
-
canister_id: IDL.Principal,
|
|
370
|
-
start: IDL.Nat,
|
|
371
|
-
}),
|
|
372
|
-
);
|
|
373
|
-
ICRC3Value.fill(
|
|
374
|
-
IDL.Variant({
|
|
375
|
-
Int: IDL.Int,
|
|
376
|
-
Map: IDL.Vec(IDL.Tuple(IDL.Text, ICRC3Value)),
|
|
377
|
-
Nat: IDL.Nat,
|
|
378
|
-
Blob: IDL.Vec(IDL.Nat8),
|
|
379
|
-
Text: IDL.Text,
|
|
380
|
-
Array: IDL.Vec(ICRC3Value),
|
|
381
|
-
}),
|
|
382
|
-
);
|
|
383
|
-
GetBlocksResult.fill(
|
|
384
|
-
IDL.Record({
|
|
385
|
-
log_length: IDL.Nat,
|
|
386
|
-
blocks: IDL.Vec(IDL.Record({ id: IDL.Nat, block: ICRC3Value })),
|
|
387
|
-
archived_blocks: IDL.Vec(
|
|
388
|
-
IDL.Record({
|
|
389
|
-
args: IDL.Vec(GetBlocksArgs),
|
|
390
|
-
callback: IDL.Func(
|
|
391
|
-
[IDL.Vec(GetBlocksArgs)],
|
|
392
|
-
[GetBlocksResult],
|
|
393
|
-
["query"],
|
|
394
|
-
),
|
|
395
|
-
}),
|
|
396
|
-
),
|
|
397
|
-
}),
|
|
398
|
-
);
|
|
399
|
-
const ICRC3DataCertificate = IDL.Record({
|
|
400
|
-
certificate: IDL.Vec(IDL.Nat8),
|
|
401
|
-
hash_tree: IDL.Vec(IDL.Nat8),
|
|
402
|
-
});
|
|
403
|
-
|
|
404
|
-
return IDL.Service({
|
|
405
|
-
archives: IDL.Func([], [IDL.Vec(ArchiveInfo)], ["query"]),
|
|
406
|
-
get_blocks: IDL.Func([GetBlocksArgs], [GetBlocksResponse], ["query"]),
|
|
407
|
-
get_data_certificate: IDL.Func([], [DataCertificate], ["query"]),
|
|
408
|
-
get_transactions: IDL.Func(
|
|
409
|
-
[GetTransactionsRequest],
|
|
410
|
-
[GetTransactionsResponse],
|
|
411
|
-
["query"],
|
|
412
|
-
),
|
|
413
|
-
icrc103_get_allowances: IDL.Func(
|
|
414
|
-
[GetAllowancesArgs],
|
|
415
|
-
[icrc103_get_allowances_response],
|
|
416
|
-
["query"],
|
|
417
|
-
),
|
|
418
|
-
icrc106_get_index_principal: IDL.Func(
|
|
419
|
-
[],
|
|
420
|
-
[GetIndexPrincipalResult],
|
|
421
|
-
["query"],
|
|
422
|
-
),
|
|
423
|
-
icrc10_supported_standards: IDL.Func(
|
|
424
|
-
[],
|
|
425
|
-
[IDL.Vec(IDL.Record({ url: IDL.Text, name: IDL.Text }))],
|
|
426
|
-
["query"],
|
|
427
|
-
),
|
|
428
|
-
icrc1_balance_of: IDL.Func([Account], [Tokens], ["query"]),
|
|
429
|
-
icrc1_decimals: IDL.Func([], [IDL.Nat8], ["query"]),
|
|
430
|
-
icrc1_fee: IDL.Func([], [Tokens], ["query"]),
|
|
431
|
-
icrc1_metadata: IDL.Func(
|
|
432
|
-
[],
|
|
433
|
-
[IDL.Vec(IDL.Tuple(IDL.Text, MetadataValue))],
|
|
434
|
-
["query"],
|
|
435
|
-
),
|
|
436
|
-
icrc1_minting_account: IDL.Func([], [IDL.Opt(Account)], ["query"]),
|
|
437
|
-
icrc1_name: IDL.Func([], [IDL.Text], ["query"]),
|
|
438
|
-
icrc1_supported_standards: IDL.Func(
|
|
439
|
-
[],
|
|
440
|
-
[IDL.Vec(StandardRecord)],
|
|
441
|
-
["query"],
|
|
442
|
-
),
|
|
443
|
-
icrc1_symbol: IDL.Func([], [IDL.Text], ["query"]),
|
|
444
|
-
icrc1_total_supply: IDL.Func([], [Tokens], ["query"]),
|
|
445
|
-
icrc1_transfer: IDL.Func([TransferArg], [TransferResult], []),
|
|
446
|
-
icrc21_canister_call_consent_message: IDL.Func(
|
|
447
|
-
[icrc21_consent_message_request],
|
|
448
|
-
[icrc21_consent_message_response],
|
|
449
|
-
[],
|
|
450
|
-
),
|
|
451
|
-
icrc2_allowance: IDL.Func([AllowanceArgs], [Allowance], ["query"]),
|
|
452
|
-
icrc2_approve: IDL.Func([ApproveArgs], [ApproveResult], []),
|
|
453
|
-
icrc2_transfer_from: IDL.Func([TransferFromArgs], [TransferFromResult], []),
|
|
454
|
-
icrc3_get_archives: IDL.Func(
|
|
455
|
-
[GetArchivesArgs],
|
|
456
|
-
[GetArchivesResult],
|
|
457
|
-
["query"],
|
|
458
|
-
),
|
|
459
|
-
icrc3_get_blocks: IDL.Func(
|
|
460
|
-
[IDL.Vec(GetBlocksArgs)],
|
|
461
|
-
[GetBlocksResult],
|
|
462
|
-
["query"],
|
|
463
|
-
),
|
|
464
|
-
icrc3_get_tip_certificate: IDL.Func(
|
|
465
|
-
[],
|
|
466
|
-
[IDL.Opt(ICRC3DataCertificate)],
|
|
467
|
-
["query"],
|
|
468
|
-
),
|
|
469
|
-
icrc3_supported_block_types: IDL.Func(
|
|
470
|
-
[],
|
|
471
|
-
[IDL.Vec(IDL.Record({ url: IDL.Text, block_type: IDL.Text }))],
|
|
472
|
-
["query"],
|
|
473
|
-
),
|
|
474
|
-
is_ledger_ready: IDL.Func([], [IDL.Bool], ["query"]),
|
|
475
|
-
});
|
|
476
|
-
};
|
|
477
|
-
|
|
478
|
-
export const init = ({ IDL }) => {
|
|
479
|
-
const ChangeArchiveOptions = IDL.Record({
|
|
480
|
-
num_blocks_to_archive: IDL.Opt(IDL.Nat64),
|
|
481
|
-
max_transactions_per_response: IDL.Opt(IDL.Nat64),
|
|
482
|
-
trigger_threshold: IDL.Opt(IDL.Nat64),
|
|
483
|
-
more_controller_ids: IDL.Opt(IDL.Vec(IDL.Principal)),
|
|
484
|
-
max_message_size_bytes: IDL.Opt(IDL.Nat64),
|
|
485
|
-
cycles_for_archive_creation: IDL.Opt(IDL.Nat64),
|
|
486
|
-
node_max_memory_size_bytes: IDL.Opt(IDL.Nat64),
|
|
487
|
-
controller_id: IDL.Opt(IDL.Principal),
|
|
488
|
-
});
|
|
489
|
-
const MetadataValue = IDL.Variant({
|
|
490
|
-
Int: IDL.Int,
|
|
491
|
-
Nat: IDL.Nat,
|
|
492
|
-
Blob: IDL.Vec(IDL.Nat8),
|
|
493
|
-
Text: IDL.Text,
|
|
494
|
-
});
|
|
495
|
-
const Subaccount = IDL.Vec(IDL.Nat8);
|
|
496
|
-
const Account = IDL.Record({
|
|
497
|
-
owner: IDL.Principal,
|
|
498
|
-
subaccount: IDL.Opt(Subaccount),
|
|
499
|
-
});
|
|
500
|
-
const ChangeFeeCollector = IDL.Variant({
|
|
501
|
-
SetTo: Account,
|
|
502
|
-
Unset: IDL.Null,
|
|
503
|
-
});
|
|
504
|
-
const FeatureFlags = IDL.Record({ icrc2: IDL.Bool });
|
|
505
|
-
const UpgradeArgs = IDL.Record({
|
|
506
|
-
change_archive_options: IDL.Opt(ChangeArchiveOptions),
|
|
507
|
-
token_symbol: IDL.Opt(IDL.Text),
|
|
508
|
-
transfer_fee: IDL.Opt(IDL.Nat),
|
|
509
|
-
metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, MetadataValue))),
|
|
510
|
-
change_fee_collector: IDL.Opt(ChangeFeeCollector),
|
|
511
|
-
max_memo_length: IDL.Opt(IDL.Nat16),
|
|
512
|
-
index_principal: IDL.Opt(IDL.Principal),
|
|
513
|
-
token_name: IDL.Opt(IDL.Text),
|
|
514
|
-
feature_flags: IDL.Opt(FeatureFlags),
|
|
515
|
-
});
|
|
516
|
-
const InitArgs = IDL.Record({
|
|
517
|
-
decimals: IDL.Opt(IDL.Nat8),
|
|
518
|
-
token_symbol: IDL.Text,
|
|
519
|
-
transfer_fee: IDL.Nat,
|
|
520
|
-
metadata: IDL.Vec(IDL.Tuple(IDL.Text, MetadataValue)),
|
|
521
|
-
minting_account: Account,
|
|
522
|
-
initial_balances: IDL.Vec(IDL.Tuple(Account, IDL.Nat)),
|
|
523
|
-
fee_collector_account: IDL.Opt(Account),
|
|
524
|
-
archive_options: IDL.Record({
|
|
525
|
-
num_blocks_to_archive: IDL.Nat64,
|
|
526
|
-
max_transactions_per_response: IDL.Opt(IDL.Nat64),
|
|
527
|
-
trigger_threshold: IDL.Nat64,
|
|
528
|
-
more_controller_ids: IDL.Opt(IDL.Vec(IDL.Principal)),
|
|
529
|
-
max_message_size_bytes: IDL.Opt(IDL.Nat64),
|
|
530
|
-
cycles_for_archive_creation: IDL.Opt(IDL.Nat64),
|
|
531
|
-
node_max_memory_size_bytes: IDL.Opt(IDL.Nat64),
|
|
532
|
-
controller_id: IDL.Principal,
|
|
533
|
-
}),
|
|
534
|
-
max_memo_length: IDL.Opt(IDL.Nat16),
|
|
535
|
-
index_principal: IDL.Opt(IDL.Principal),
|
|
536
|
-
token_name: IDL.Text,
|
|
537
|
-
feature_flags: IDL.Opt(FeatureFlags),
|
|
538
|
-
});
|
|
539
|
-
const LedgerArg = IDL.Variant({
|
|
540
|
-
Upgrade: IDL.Opt(UpgradeArgs),
|
|
541
|
-
Init: InitArgs,
|
|
542
|
-
});
|
|
543
|
-
|
|
544
|
-
return [LedgerArg];
|
|
545
|
-
};
|
|
@@ -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
|
-
};
|