@junobuild/functions 0.4.1 → 0.5.1-next-2025-11-29

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 (137) hide show
  1. package/canisters/_canister.d.ts +17 -0
  2. package/canisters/_constants.d.ts +3 -0
  3. package/canisters/ckbtc/index.d.ts +1 -0
  4. package/canisters/ckbtc/index.js +2 -0
  5. package/canisters/cketh/index.d.ts +1 -0
  6. package/canisters/cketh/index.js +2 -0
  7. package/canisters/cketh/index.js.map +7 -0
  8. package/canisters/cmc/cmc.canister.d.ts +28 -0
  9. package/canisters/cmc/index.d.ts +2 -0
  10. package/canisters/cmc/index.js +2 -0
  11. package/canisters/cmc/index.js.map +7 -0
  12. package/canisters/declarations/_idl.d.ts +16 -0
  13. package/canisters/declarations/_types.d.ts +16 -0
  14. package/canisters/declarations/ckbtc/bitcoin.did.d.ts +134 -0
  15. package/canisters/declarations/ckbtc/bitcoin.did.idl.d.ts +40 -0
  16. package/canisters/declarations/ckbtc/minter.did.d.ts +831 -0
  17. package/canisters/declarations/ckbtc/minter.did.idl.d.ts +61 -0
  18. package/canisters/declarations/cketh/minter.did.d.ts +893 -0
  19. package/canisters/declarations/cketh/minter.did.idl.d.ts +58 -0
  20. package/canisters/declarations/cketh/orchestrator.did.d.ts +302 -0
  21. package/canisters/declarations/cketh/orchestrator.did.idl.d.ts +34 -0
  22. package/canisters/declarations/cmc/cmc.did.d.ts +344 -0
  23. package/canisters/declarations/cmc/cmc.did.idl.d.ts +53 -0
  24. package/canisters/declarations/ic-management/ic-management.did.d.ts +583 -0
  25. package/canisters/declarations/ic-management/ic-management.did.idl.d.ts +147 -0
  26. package/canisters/declarations/index.d.ts +2 -0
  27. package/canisters/declarations/ledger-icp/index.did.d.ts +119 -0
  28. package/canisters/declarations/ledger-icp/index.did.idl.d.ts +35 -0
  29. package/canisters/declarations/ledger-icp/ledger.did.d.ts +606 -0
  30. package/canisters/declarations/ledger-icp/ledger.did.idl.d.ts +106 -0
  31. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +148 -0
  32. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.d.ts +44 -0
  33. package/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +102 -0
  34. package/canisters/declarations/ledger-icrc/icrc_index.did.idl.d.ts +28 -0
  35. package/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +579 -0
  36. package/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.d.ts +100 -0
  37. package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +81 -0
  38. package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.d.ts +39 -0
  39. package/canisters/declarations/nns/genesis_token.did.d.ts +49 -0
  40. package/canisters/declarations/nns/genesis_token.did.idl.d.ts +24 -0
  41. package/canisters/declarations/nns/governance.did.d.ts +1254 -0
  42. package/canisters/declarations/nns/governance.did.idl.d.ts +217 -0
  43. package/canisters/declarations/nns/governance_test.did.d.ts +1258 -0
  44. package/canisters/declarations/nns/governance_test.did.idl.d.ts +218 -0
  45. package/canisters/declarations/nns/sns_wasm.did.d.ts +286 -0
  46. package/canisters/declarations/nns/sns_wasm.did.idl.d.ts +80 -0
  47. package/canisters/declarations/sns/sns_governance.did.d.ts +834 -0
  48. package/canisters/declarations/sns/sns_governance.did.idl.d.ts +189 -0
  49. package/canisters/declarations/sns/sns_governance_test.did.d.ts +861 -0
  50. package/canisters/declarations/sns/sns_governance_test.did.idl.d.ts +199 -0
  51. package/canisters/declarations/sns/sns_root.did.d.ts +204 -0
  52. package/canisters/declarations/sns/sns_root.did.idl.d.ts +53 -0
  53. package/canisters/declarations/sns/sns_swap.did.d.ts +411 -0
  54. package/canisters/declarations/sns/sns_swap.did.idl.d.ts +108 -0
  55. package/canisters/ic-management/index.d.ts +1 -0
  56. package/canisters/ic-management/index.js +2 -0
  57. package/canisters/ic-management/index.js.map +7 -0
  58. package/canisters/index.d.ts +1 -0
  59. package/canisters/index.js +2 -0
  60. package/canisters/index.js.map +7 -0
  61. package/canisters/ledger/icp/index.d.ts +2 -0
  62. package/canisters/ledger/icp/index.js +2 -0
  63. package/canisters/ledger/icp/index.js.map +7 -0
  64. package/canisters/ledger/icp/ledger.canister.d.ts +24 -0
  65. package/canisters/ledger/icrc/index.d.ts +3 -0
  66. package/canisters/ledger/icrc/index.js +2 -0
  67. package/canisters/ledger/icrc/index.js.map +7 -0
  68. package/canisters/ledger/icrc/ledger.canister.d.ts +45 -0
  69. package/canisters/ledger/icrc/schemas.d.ts +11 -0
  70. package/canisters/nns/index.d.ts +1 -0
  71. package/canisters/nns/index.js +2 -0
  72. package/canisters/nns/index.js.map +7 -0
  73. package/canisters/schemas.d.ts +11 -0
  74. package/canisters/sns/index.d.ts +1 -0
  75. package/canisters/sns/index.js +2 -0
  76. package/canisters/sns/index.js.map +7 -0
  77. package/chunk-4C666HHU.js +2 -0
  78. package/chunk-4C666HHU.js.map +7 -0
  79. package/chunk-5NZMOUKF.js +2 -0
  80. package/chunk-5NZMOUKF.js.map +7 -0
  81. package/chunk-BXZ5PSUW.js +2 -0
  82. package/chunk-BXZ5PSUW.js.map +7 -0
  83. package/chunk-EMQQE34V.js +2 -0
  84. package/chunk-EMQQE34V.js.map +7 -0
  85. package/chunk-HANEPD6T.js +2 -0
  86. package/chunk-HANEPD6T.js.map +7 -0
  87. package/chunk-TZVF5LQY.js +2 -0
  88. package/chunk-TZVF5LQY.js.map +7 -0
  89. package/ic-cdk.js +1 -1
  90. package/ic-cdk.js.map +4 -4
  91. package/index.js +1 -1
  92. package/index.js.map +1 -1
  93. package/package.json +43 -6
  94. package/sdk.js +1 -1
  95. package/sdk.js.map +1 -1
  96. package/src/canisters/declarations/ckbtc/bitcoin.did.d.ts +134 -0
  97. package/src/canisters/declarations/ckbtc/bitcoin.did.idl.js +302 -0
  98. package/src/canisters/declarations/ckbtc/minter.did.d.ts +831 -0
  99. package/src/canisters/declarations/ckbtc/minter.did.idl.js +893 -0
  100. package/src/canisters/declarations/cketh/minter.did.d.ts +893 -0
  101. package/src/canisters/declarations/cketh/minter.did.idl.js +878 -0
  102. package/src/canisters/declarations/cketh/orchestrator.did.d.ts +302 -0
  103. package/src/canisters/declarations/cketh/orchestrator.did.idl.js +343 -0
  104. package/src/canisters/declarations/cmc/cmc.did.d.ts +344 -0
  105. package/src/canisters/declarations/cmc/cmc.did.idl.js +338 -0
  106. package/src/canisters/declarations/ic-management/ic-management.did.d.ts +583 -0
  107. package/src/canisters/declarations/ic-management/ic-management.did.idl.js +1150 -0
  108. package/src/canisters/declarations/ledger-icp/index.did.d.ts +119 -0
  109. package/src/canisters/declarations/ledger-icp/index.did.idl.js +225 -0
  110. package/src/canisters/declarations/ledger-icp/ledger.did.d.ts +606 -0
  111. package/src/canisters/declarations/ledger-icp/ledger.did.idl.js +813 -0
  112. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +148 -0
  113. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.js +274 -0
  114. package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +102 -0
  115. package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +171 -0
  116. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +579 -0
  117. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +923 -0
  118. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +81 -0
  119. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.js +163 -0
  120. package/src/canisters/declarations/nns/genesis_token.did.d.ts +49 -0
  121. package/src/canisters/declarations/nns/genesis_token.did.idl.js +84 -0
  122. package/src/canisters/declarations/nns/governance.did.d.ts +1254 -0
  123. package/src/canisters/declarations/nns/governance.did.idl.js +2756 -0
  124. package/src/canisters/declarations/nns/governance_test.did.d.ts +1258 -0
  125. package/src/canisters/declarations/nns/governance_test.did.idl.js +2758 -0
  126. package/src/canisters/declarations/nns/sns_wasm.did.d.ts +286 -0
  127. package/src/canisters/declarations/nns/sns_wasm.did.idl.js +589 -0
  128. package/src/canisters/declarations/sns/sns_governance.did.d.ts +834 -0
  129. package/src/canisters/declarations/sns/sns_governance.did.idl.js +2235 -0
  130. package/src/canisters/declarations/sns/sns_governance_test.did.d.ts +861 -0
  131. package/src/canisters/declarations/sns/sns_governance_test.did.idl.js +2283 -0
  132. package/src/canisters/declarations/sns/sns_root.did.d.ts +204 -0
  133. package/src/canisters/declarations/sns/sns_root.did.idl.js +433 -0
  134. package/src/canisters/declarations/sns/sns_swap.did.d.ts +411 -0
  135. package/src/canisters/declarations/sns/sns_swap.did.idl.js +858 -0
  136. package/global.d.js +0 -1
  137. /package/{global.d.js.map → canisters/ckbtc/index.js.map} +0 -0
@@ -0,0 +1,606 @@
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
+ import type { ActorMethod } from '@icp-sdk/core/agent';
10
+ import type { IDL } from '@icp-sdk/core/candid';
11
+ import type { Principal } from '@icp-sdk/core/principal';
12
+
13
+ export interface Account {
14
+ 'owner' : Principal,
15
+ 'subaccount' : [] | [SubAccount],
16
+ }
17
+ /**
18
+ * Arguments for the `account_balance` call.
19
+ */
20
+ export interface AccountBalanceArgs { 'account' : AccountIdentifier }
21
+ export interface AccountBalanceArgsDfx { 'account' : TextAccountIdentifier }
22
+ /**
23
+ * AccountIdentifier is a 32-byte array.
24
+ * The first 4 bytes is big-endian encoding of a CRC32 checksum of the last 28 bytes.
25
+ */
26
+ export type AccountIdentifier = Uint8Array;
27
+ export interface Allowance {
28
+ 'allowance' : Icrc1Tokens,
29
+ 'expires_at' : [] | [Icrc1Timestamp],
30
+ }
31
+ export interface AllowanceArgs { 'account' : Account, 'spender' : Account }
32
+ /**
33
+ * The allowances returned by the `get_allowances` endpoint.
34
+ */
35
+ export type Allowances = Array<
36
+ {
37
+ 'from_account_id' : TextAccountIdentifier,
38
+ 'to_spender_id' : TextAccountIdentifier,
39
+ 'allowance' : Tokens,
40
+ 'expires_at' : [] | [bigint],
41
+ }
42
+ >;
43
+ export interface ApproveArgs {
44
+ 'fee' : [] | [Icrc1Tokens],
45
+ 'memo' : [] | [Uint8Array],
46
+ 'from_subaccount' : [] | [SubAccount],
47
+ 'created_at_time' : [] | [Icrc1Timestamp],
48
+ 'amount' : Icrc1Tokens,
49
+ 'expected_allowance' : [] | [Icrc1Tokens],
50
+ 'expires_at' : [] | [Icrc1Timestamp],
51
+ 'spender' : Account,
52
+ }
53
+ export type ApproveError = {
54
+ 'GenericError' : { 'message' : string, 'error_code' : bigint }
55
+ } |
56
+ { 'TemporarilyUnavailable' : null } |
57
+ { 'Duplicate' : { 'duplicate_of' : Icrc1BlockIndex } } |
58
+ { 'BadFee' : { 'expected_fee' : Icrc1Tokens } } |
59
+ { 'AllowanceChanged' : { 'current_allowance' : Icrc1Tokens } } |
60
+ { 'CreatedInFuture' : { 'ledger_time' : bigint } } |
61
+ { 'TooOld' : null } |
62
+ { 'Expired' : { 'ledger_time' : bigint } } |
63
+ { 'InsufficientFunds' : { 'balance' : Icrc1Tokens } };
64
+ export type ApproveResult = { 'Ok' : Icrc1BlockIndex } |
65
+ { 'Err' : ApproveError };
66
+ export interface Archive { 'canister_id' : Principal }
67
+ export interface ArchiveOptions {
68
+ 'num_blocks_to_archive' : bigint,
69
+ 'max_transactions_per_response' : [] | [bigint],
70
+ 'trigger_threshold' : bigint,
71
+ 'more_controller_ids' : [] | [Array<Principal>],
72
+ 'max_message_size_bytes' : [] | [bigint],
73
+ 'cycles_for_archive_creation' : [] | [bigint],
74
+ 'node_max_memory_size_bytes' : [] | [bigint],
75
+ 'controller_id' : Principal,
76
+ }
77
+ export interface ArchivedBlocksRange {
78
+ /**
79
+ * The function that should be called to fetch the archived blocks.
80
+ * The range of the blocks accessible using this function is given by [from]
81
+ * and [len] fields above.
82
+ */
83
+ 'callback' : [Principal, string],
84
+ /**
85
+ * The index of the first archived block that can be fetched using the callback.
86
+ */
87
+ 'start' : BlockIndex,
88
+ /**
89
+ * The number of blocks that can be fetch using the callback.
90
+ */
91
+ 'length' : bigint,
92
+ }
93
+ export interface ArchivedEncodedBlocksRange {
94
+ 'callback' : [Principal, string],
95
+ 'start' : bigint,
96
+ 'length' : bigint,
97
+ }
98
+ export interface Archives { 'archives' : Array<Archive> }
99
+ export interface Block {
100
+ 'transaction' : Transaction,
101
+ 'timestamp' : TimeStamp,
102
+ 'parent_hash' : [] | [Uint8Array],
103
+ }
104
+ /**
105
+ * Sequence number of a block produced by the ledger.
106
+ */
107
+ export type BlockIndex = bigint;
108
+ /**
109
+ * A prefix of the block range specified in the [GetBlocksArgs] request.
110
+ */
111
+ export interface BlockRange {
112
+ /**
113
+ * A prefix of the requested block range.
114
+ * The index of the first block is equal to [GetBlocksArgs.from].
115
+ *
116
+ * Note that the number of blocks might be less than the requested
117
+ * [GetBlocksArgs.len] for various reasons, for example:
118
+ *
119
+ * 1. The query might have hit the replica with an outdated state
120
+ * that doesn't have the full block range yet.
121
+ * 2. The requested range is too large to fit into a single reply.
122
+ *
123
+ * NOTE: the list of blocks can be empty if:
124
+ * 1. [GetBlocksArgs.len] was zero.
125
+ * 2. [GetBlocksArgs.from] was larger than the last block known to the canister.
126
+ */
127
+ 'blocks' : Array<Block>,
128
+ }
129
+ export interface Duration { 'secs' : bigint, 'nanos' : number }
130
+ export interface FeatureFlags { 'icrc2' : boolean }
131
+ export interface FieldsDisplay {
132
+ 'fields' : Array<[string, Icrc21Value]>,
133
+ 'intent' : string,
134
+ }
135
+ /**
136
+ * The arguments for the `get_allowances` endpoint.
137
+ * The `prev_spender_id` argument can be used for pagination. If specified
138
+ * the endpoint returns allowances that are lexicographically greater than
139
+ * (`from_account_id`, `prev_spender_id`) - start with spender after `prev_spender_id`.
140
+ */
141
+ export interface GetAllowancesArgs {
142
+ 'prev_spender_id' : [] | [TextAccountIdentifier],
143
+ 'from_account_id' : TextAccountIdentifier,
144
+ 'take' : [] | [bigint],
145
+ }
146
+ export interface GetBlocksArgs {
147
+ /**
148
+ * The index of the first block to fetch.
149
+ */
150
+ 'start' : BlockIndex,
151
+ /**
152
+ * Max number of blocks to fetch.
153
+ */
154
+ 'length' : bigint,
155
+ }
156
+ export type Icrc1BlockIndex = bigint;
157
+ /**
158
+ * Number of nanoseconds since the UNIX epoch in UTC timezone.
159
+ */
160
+ export type Icrc1Timestamp = bigint;
161
+ export type Icrc1Tokens = bigint;
162
+ export type Icrc1TransferError = {
163
+ 'GenericError' : { 'message' : string, 'error_code' : bigint }
164
+ } |
165
+ { 'TemporarilyUnavailable' : null } |
166
+ { 'BadBurn' : { 'min_burn_amount' : Icrc1Tokens } } |
167
+ { 'Duplicate' : { 'duplicate_of' : Icrc1BlockIndex } } |
168
+ { 'BadFee' : { 'expected_fee' : Icrc1Tokens } } |
169
+ { 'CreatedInFuture' : { 'ledger_time' : bigint } } |
170
+ { 'TooOld' : null } |
171
+ { 'InsufficientFunds' : { 'balance' : Icrc1Tokens } };
172
+ export type Icrc1TransferResult = { 'Ok' : Icrc1BlockIndex } |
173
+ { 'Err' : Icrc1TransferError };
174
+ export type Icrc21Value = { 'Text' : { 'content' : string } } |
175
+ {
176
+ 'TokenAmount' : {
177
+ 'decimals' : number,
178
+ 'amount' : bigint,
179
+ 'symbol' : string,
180
+ }
181
+ } |
182
+ { 'TimestampSeconds' : { 'amount' : bigint } } |
183
+ { 'DurationSeconds' : { 'amount' : bigint } };
184
+ export interface InitArgs {
185
+ 'send_whitelist' : Array<Principal>,
186
+ 'token_symbol' : [] | [string],
187
+ 'transfer_fee' : [] | [Tokens],
188
+ 'minting_account' : TextAccountIdentifier,
189
+ 'transaction_window' : [] | [Duration],
190
+ 'max_message_size_bytes' : [] | [bigint],
191
+ 'icrc1_minting_account' : [] | [Account],
192
+ 'archive_options' : [] | [ArchiveOptions],
193
+ 'initial_values' : Array<[TextAccountIdentifier, Tokens]>,
194
+ 'token_name' : [] | [string],
195
+ 'feature_flags' : [] | [FeatureFlags],
196
+ }
197
+ export type LedgerCanisterPayload = { 'Upgrade' : [] | [UpgradeArgs] } |
198
+ { 'Init' : InitArgs };
199
+ /**
200
+ * An arbitrary number associated with a transaction.
201
+ * The caller can set it in a `transfer` call as a correlation identifier.
202
+ */
203
+ export type Memo = bigint;
204
+ export type Operation = {
205
+ 'Approve' : {
206
+ 'fee' : Tokens,
207
+ 'from' : AccountIdentifier,
208
+ /**
209
+ * This field is deprecated and should not be used.
210
+ */
211
+ 'allowance_e8s' : bigint,
212
+ 'allowance' : Tokens,
213
+ 'expected_allowance' : [] | [Tokens],
214
+ 'expires_at' : [] | [TimeStamp],
215
+ 'spender' : AccountIdentifier,
216
+ }
217
+ } |
218
+ {
219
+ 'Burn' : {
220
+ 'from' : AccountIdentifier,
221
+ 'amount' : Tokens,
222
+ 'spender' : [] | [AccountIdentifier],
223
+ }
224
+ } |
225
+ { 'Mint' : { 'to' : AccountIdentifier, 'amount' : Tokens } } |
226
+ {
227
+ 'Transfer' : {
228
+ 'to' : AccountIdentifier,
229
+ 'fee' : Tokens,
230
+ 'from' : AccountIdentifier,
231
+ 'amount' : Tokens,
232
+ 'spender' : [] | [Uint8Array],
233
+ }
234
+ };
235
+ /**
236
+ * An error indicating that the arguments passed to [QueryArchiveFn] were invalid.
237
+ */
238
+ export type QueryArchiveError = {
239
+ /**
240
+ * [GetBlocksArgs.from] argument was smaller than the first block
241
+ * served by the canister that received the request.
242
+ */
243
+ 'BadFirstBlockIndex' : {
244
+ 'requested_index' : BlockIndex,
245
+ 'first_valid_index' : BlockIndex,
246
+ }
247
+ } |
248
+ {
249
+ /**
250
+ * Reserved for future use.
251
+ */
252
+ 'Other' : { 'error_message' : string, 'error_code' : bigint }
253
+ };
254
+ /**
255
+ * A function that is used for fetching archived ledger blocks.
256
+ */
257
+ export type QueryArchiveFn = ActorMethod<[GetBlocksArgs], QueryArchiveResult>;
258
+ export type QueryArchiveResult = {
259
+ /**
260
+ * Successfully fetched zero or more blocks.
261
+ */
262
+ 'Ok' : BlockRange
263
+ } |
264
+ {
265
+ /**
266
+ * The [GetBlocksArgs] request was invalid.
267
+ */
268
+ 'Err' : QueryArchiveError
269
+ };
270
+ /**
271
+ * The result of a "query_blocks" call.
272
+ *
273
+ * The structure of the result is somewhat complicated because the main ledger canister might
274
+ * not have all the blocks that the caller requested: One or more "archive" canisters might
275
+ * store some of the requested blocks.
276
+ *
277
+ * Note: as of Q4 2021 when this interface is authored, the IC doesn't support making nested
278
+ * query calls within a query call.
279
+ */
280
+ export interface QueryBlocksResponse {
281
+ /**
282
+ * System certificate for the hash of the latest block in the chain.
283
+ * Only present if `query_blocks` is called in a non-replicated query context.
284
+ */
285
+ 'certificate' : [] | [Uint8Array],
286
+ /**
287
+ * List of blocks that were available in the ledger when it processed the call.
288
+ *
289
+ * The blocks form a contiguous range, with the first block having index
290
+ * [first_block_index] (see below), and the last block having index
291
+ * [first_block_index] + len(blocks) - 1.
292
+ *
293
+ * The block range can be an arbitrary sub-range of the originally requested range.
294
+ */
295
+ 'blocks' : Array<Block>,
296
+ /**
297
+ * The total number of blocks in the chain.
298
+ * If the chain length is positive, the index of the last block is `chain_len - 1`.
299
+ */
300
+ 'chain_length' : bigint,
301
+ /**
302
+ * The index of the first block in "blocks".
303
+ * If the blocks vector is empty, the exact value of this field is not specified.
304
+ */
305
+ 'first_block_index' : BlockIndex,
306
+ /**
307
+ * Encoding of instructions for fetching archived blocks whose indices fall into the
308
+ * requested range.
309
+ *
310
+ * For each entry `e` in [archived_blocks], `[e.from, e.from + len)` is a sub-range
311
+ * of the originally requested block range.
312
+ */
313
+ 'archived_blocks' : Array<ArchivedBlocksRange>,
314
+ }
315
+ export interface QueryEncodedBlocksResponse {
316
+ 'certificate' : [] | [Uint8Array],
317
+ 'blocks' : Array<Uint8Array>,
318
+ 'chain_length' : bigint,
319
+ 'first_block_index' : bigint,
320
+ 'archived_blocks' : Array<ArchivedEncodedBlocksRange>,
321
+ }
322
+ export interface RemoveApprovalArgs {
323
+ 'fee' : [] | [Icrc1Tokens],
324
+ 'from_subaccount' : [] | [SubAccount],
325
+ 'spender' : AccountIdentifier,
326
+ }
327
+ /**
328
+ * Arguments for the `send_dfx` call.
329
+ */
330
+ export interface SendArgs {
331
+ 'to' : TextAccountIdentifier,
332
+ 'fee' : Tokens,
333
+ 'memo' : Memo,
334
+ 'from_subaccount' : [] | [SubAccount],
335
+ 'created_at_time' : [] | [TimeStamp],
336
+ 'amount' : Tokens,
337
+ }
338
+ /**
339
+ * Subaccount is an arbitrary 32-byte byte array.
340
+ * Ledger uses subaccounts to compute the source address, which enables one
341
+ * principal to control multiple ledger accounts.
342
+ */
343
+ export type SubAccount = Uint8Array;
344
+ /**
345
+ * Account identifier encoded as a 64-byte ASCII hex string.
346
+ */
347
+ export type TextAccountIdentifier = string;
348
+ /**
349
+ * Number of nanoseconds from the UNIX epoch in UTC timezone.
350
+ */
351
+ export interface TimeStamp { 'timestamp_nanos' : bigint }
352
+ export interface TipOfChainRes {
353
+ 'certification' : [] | [Uint8Array],
354
+ 'tip_index' : BlockIndex,
355
+ }
356
+ /**
357
+ * Amount of tokens, measured in 10^-8 of a token.
358
+ */
359
+ export interface Tokens { 'e8s' : bigint }
360
+ export interface Transaction {
361
+ 'memo' : Memo,
362
+ 'icrc1_memo' : [] | [Uint8Array],
363
+ 'operation' : [] | [Operation],
364
+ 'created_at_time' : TimeStamp,
365
+ }
366
+ export interface TransferArg {
367
+ 'to' : Account,
368
+ 'fee' : [] | [Icrc1Tokens],
369
+ 'memo' : [] | [Uint8Array],
370
+ 'from_subaccount' : [] | [SubAccount],
371
+ 'created_at_time' : [] | [Icrc1Timestamp],
372
+ 'amount' : Icrc1Tokens,
373
+ }
374
+ /**
375
+ * Arguments for the `transfer` call.
376
+ */
377
+ export interface TransferArgs {
378
+ /**
379
+ * The destination account.
380
+ * If the transfer is successful, the balance of this address increases by `amount`.
381
+ */
382
+ 'to' : AccountIdentifier,
383
+ /**
384
+ * The amount that the caller pays for the transaction.
385
+ * Must be 10000 e8s.
386
+ */
387
+ 'fee' : Tokens,
388
+ /**
389
+ * Transaction memo.
390
+ * See comments for the `Memo` type.
391
+ */
392
+ 'memo' : Memo,
393
+ /**
394
+ * The subaccount from which the caller wants to transfer funds.
395
+ * If null, the ledger uses the default (all zeros) subaccount to compute the source address.
396
+ * See comments for the `SubAccount` type.
397
+ */
398
+ 'from_subaccount' : [] | [SubAccount],
399
+ /**
400
+ * The point in time when the caller created this request.
401
+ * If null, the ledger uses current IC time as the timestamp.
402
+ */
403
+ 'created_at_time' : [] | [TimeStamp],
404
+ /**
405
+ * The amount that the caller wants to transfer to the destination address.
406
+ */
407
+ 'amount' : Tokens,
408
+ }
409
+ export type TransferError = {
410
+ /**
411
+ * The request is too old.
412
+ * The ledger only accepts requests created within 24 hours window.
413
+ * This is a non-recoverable error.
414
+ */
415
+ 'TxTooOld' : { 'allowed_window_nanos' : bigint }
416
+ } |
417
+ {
418
+ /**
419
+ * The fee that the caller specified in the transfer request was not the one that ledger expects.
420
+ * The caller can change the transfer fee to the `expected_fee` and retry the request.
421
+ */
422
+ 'BadFee' : { 'expected_fee' : Tokens }
423
+ } |
424
+ {
425
+ /**
426
+ * The ledger has already executed the request.
427
+ * `duplicate_of` field is equal to the index of the block containing the original transaction.
428
+ */
429
+ 'TxDuplicate' : { 'duplicate_of' : BlockIndex }
430
+ } |
431
+ {
432
+ /**
433
+ * The caller specified `created_at_time` that is too far in future.
434
+ * The caller can retry the request later.
435
+ */
436
+ 'TxCreatedInFuture' : null
437
+ } |
438
+ {
439
+ /**
440
+ * The account specified by the caller doesn't have enough funds.
441
+ */
442
+ 'InsufficientFunds' : { 'balance' : Tokens }
443
+ };
444
+ export interface TransferFee {
445
+ /**
446
+ * The fee to pay to perform a transfer
447
+ */
448
+ 'transfer_fee' : Tokens,
449
+ }
450
+ export type TransferFeeArg = {};
451
+ export interface TransferFromArgs {
452
+ 'to' : Account,
453
+ 'fee' : [] | [Icrc1Tokens],
454
+ 'spender_subaccount' : [] | [SubAccount],
455
+ 'from' : Account,
456
+ 'memo' : [] | [Uint8Array],
457
+ 'created_at_time' : [] | [Icrc1Timestamp],
458
+ 'amount' : Icrc1Tokens,
459
+ }
460
+ export type TransferFromError = {
461
+ 'GenericError' : { 'message' : string, 'error_code' : bigint }
462
+ } |
463
+ { 'TemporarilyUnavailable' : null } |
464
+ { 'InsufficientAllowance' : { 'allowance' : Icrc1Tokens } } |
465
+ { 'BadBurn' : { 'min_burn_amount' : Icrc1Tokens } } |
466
+ { 'Duplicate' : { 'duplicate_of' : Icrc1BlockIndex } } |
467
+ { 'BadFee' : { 'expected_fee' : Icrc1Tokens } } |
468
+ { 'CreatedInFuture' : { 'ledger_time' : Icrc1Timestamp } } |
469
+ { 'TooOld' : null } |
470
+ { 'InsufficientFunds' : { 'balance' : Icrc1Tokens } };
471
+ export type TransferFromResult = { 'Ok' : Icrc1BlockIndex } |
472
+ { 'Err' : TransferFromError };
473
+ export type TransferResult = { 'Ok' : BlockIndex } |
474
+ { 'Err' : TransferError };
475
+ export interface UpgradeArgs {
476
+ 'icrc1_minting_account' : [] | [Account],
477
+ 'feature_flags' : [] | [FeatureFlags],
478
+ }
479
+ /**
480
+ * The value returned from the [icrc1_metadata] endpoint.
481
+ */
482
+ export type Value = { 'Int' : bigint } |
483
+ { 'Nat' : bigint } |
484
+ { 'Blob' : Uint8Array } |
485
+ { 'Text' : string };
486
+ export interface icrc21_consent_info {
487
+ 'metadata' : icrc21_consent_message_metadata,
488
+ 'consent_message' : icrc21_consent_message,
489
+ }
490
+ export type icrc21_consent_message = {
491
+ 'FieldsDisplayMessage' : FieldsDisplay
492
+ } |
493
+ { 'GenericDisplayMessage' : string };
494
+ export interface icrc21_consent_message_metadata {
495
+ 'utc_offset_minutes' : [] | [number],
496
+ 'language' : string,
497
+ }
498
+ export interface icrc21_consent_message_request {
499
+ 'arg' : Uint8Array,
500
+ 'method' : string,
501
+ 'user_preferences' : icrc21_consent_message_spec,
502
+ }
503
+ export type icrc21_consent_message_response = { 'Ok' : icrc21_consent_info } |
504
+ { 'Err' : icrc21_error };
505
+ export interface icrc21_consent_message_spec {
506
+ 'metadata' : icrc21_consent_message_metadata,
507
+ 'device_spec' : [] | [
508
+ { 'GenericDisplay' : null } |
509
+ { 'FieldsDisplay' : null }
510
+ ],
511
+ }
512
+ export type icrc21_error = {
513
+ /**
514
+ * Any error not covered by the above variants.
515
+ */
516
+ 'GenericError' : { 'description' : string, 'error_code' : bigint }
517
+ } |
518
+ { 'InsufficientPayment' : icrc21_error_info } |
519
+ { 'UnsupportedCanisterCall' : icrc21_error_info } |
520
+ { 'ConsentMessageUnavailable' : icrc21_error_info };
521
+ export interface icrc21_error_info { 'description' : string }
522
+ export interface _SERVICE {
523
+ /**
524
+ * Returns the amount of Tokens on the specified account.
525
+ */
526
+ 'account_balance' : ActorMethod<[AccountBalanceArgs], Tokens>,
527
+ 'account_balance_dfx' : ActorMethod<[AccountBalanceArgsDfx], Tokens>,
528
+ /**
529
+ * Returns the account identifier for the given Principal and subaccount.
530
+ */
531
+ 'account_identifier' : ActorMethod<[Account], AccountIdentifier>,
532
+ /**
533
+ * Returns the existing archive canisters information.
534
+ */
535
+ 'archives' : ActorMethod<[], Archives>,
536
+ /**
537
+ * Returns token decimals.
538
+ */
539
+ 'decimals' : ActorMethod<[], { 'decimals' : number }>,
540
+ 'get_allowances' : ActorMethod<[GetAllowancesArgs], Allowances>,
541
+ 'icrc10_supported_standards' : ActorMethod<
542
+ [],
543
+ Array<{ 'url' : string, 'name' : string }>
544
+ >,
545
+ 'icrc1_balance_of' : ActorMethod<[Account], Icrc1Tokens>,
546
+ 'icrc1_decimals' : ActorMethod<[], number>,
547
+ 'icrc1_fee' : ActorMethod<[], Icrc1Tokens>,
548
+ 'icrc1_metadata' : ActorMethod<[], Array<[string, Value]>>,
549
+ 'icrc1_minting_account' : ActorMethod<[], [] | [Account]>,
550
+ /**
551
+ * The following methods implement the ICRC-1 Token Standard.
552
+ * https://github.com/dfinity/ICRC-1/tree/main/standards/ICRC-1
553
+ */
554
+ 'icrc1_name' : ActorMethod<[], string>,
555
+ 'icrc1_supported_standards' : ActorMethod<
556
+ [],
557
+ Array<{ 'url' : string, 'name' : string }>
558
+ >,
559
+ 'icrc1_symbol' : ActorMethod<[], string>,
560
+ 'icrc1_total_supply' : ActorMethod<[], Icrc1Tokens>,
561
+ 'icrc1_transfer' : ActorMethod<[TransferArg], Icrc1TransferResult>,
562
+ 'icrc21_canister_call_consent_message' : ActorMethod<
563
+ [icrc21_consent_message_request],
564
+ icrc21_consent_message_response
565
+ >,
566
+ 'icrc2_allowance' : ActorMethod<[AllowanceArgs], Allowance>,
567
+ 'icrc2_approve' : ActorMethod<[ApproveArgs], ApproveResult>,
568
+ 'icrc2_transfer_from' : ActorMethod<[TransferFromArgs], TransferFromResult>,
569
+ 'is_ledger_ready' : ActorMethod<[], boolean>,
570
+ /**
571
+ * Returns token name.
572
+ */
573
+ 'name' : ActorMethod<[], { 'name' : string }>,
574
+ /**
575
+ * Queries blocks in the specified range.
576
+ */
577
+ 'query_blocks' : ActorMethod<[GetBlocksArgs], QueryBlocksResponse>,
578
+ /**
579
+ * Queries encoded blocks in the specified range
580
+ */
581
+ 'query_encoded_blocks' : ActorMethod<
582
+ [GetBlocksArgs],
583
+ QueryEncodedBlocksResponse
584
+ >,
585
+ 'remove_approval' : ActorMethod<[RemoveApprovalArgs], ApproveResult>,
586
+ 'send_dfx' : ActorMethod<[SendArgs], BlockIndex>,
587
+ /**
588
+ * Returns token symbol.
589
+ */
590
+ 'symbol' : ActorMethod<[], { 'symbol' : string }>,
591
+ 'tip_of_chain' : ActorMethod<[], TipOfChainRes>,
592
+ /**
593
+ * Transfers tokens from a subaccount of the caller to the destination address.
594
+ * The source address is computed from the principal of the caller and the specified subaccount.
595
+ * When successful, returns the index of the block containing the transaction.
596
+ */
597
+ 'transfer' : ActorMethod<[TransferArgs], TransferResult>,
598
+ /**
599
+ * Returns the current transfer_fee.
600
+ */
601
+ 'transfer_fee' : ActorMethod<[TransferFeeArg], TransferFee>,
602
+ }
603
+ export declare const idlService: IDL.ServiceClass;
604
+ export declare const idlInitArgs: IDL.Type[];
605
+ export declare const idlFactory: IDL.InterfaceFactory;
606
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];