@junobuild/functions 0.8.4 → 0.9.0
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/canisters/ckbtc/index.js +1 -1
- package/canisters/cketh/index.js +1 -1
- package/canisters/cmc/cmc.canister.d.ts +6 -6
- package/canisters/cmc/index.d.ts +1 -0
- package/canisters/cmc/index.js +1 -1
- package/canisters/cmc/index.js.map +4 -4
- package/canisters/cmc/schema.d.ts +92 -0
- package/canisters/declarations/_idl.d.ts +2 -1
- package/canisters/declarations/_types.d.ts +2 -1
- package/canisters/declarations/ckbtc/bitcoin.did.d.ts +8 -0
- package/canisters/declarations/ckbtc/bitcoin.did.idl.d.ts +2 -0
- package/canisters/declarations/ckbtc/minter.did.d.ts +190 -0
- package/canisters/declarations/ckbtc/minter.did.idl.d.ts +9 -0
- package/canisters/declarations/cketh/minter.did.d.ts +140 -0
- package/canisters/declarations/cketh/minter.did.idl.d.ts +8 -0
- package/canisters/declarations/cycles-ledger/cycles-ledger.did.d.ts +413 -0
- package/canisters/declarations/cycles-ledger/cycles-ledger.did.idl.d.ts +82 -0
- package/canisters/declarations/ic-management/ic-management.did.d.ts +18 -4
- package/canisters/declarations/ledger-icp/index.did.d.ts +20 -1
- package/canisters/declarations/ledger-icp/index.did.idl.d.ts +5 -1
- package/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +1 -0
- package/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +1 -0
- package/canisters/declarations/nns/governance.did.d.ts +100 -0
- package/canisters/declarations/nns/governance.did.idl.d.ts +11 -0
- package/canisters/declarations/nns/governance_test.did.d.ts +100 -0
- package/canisters/declarations/nns/governance_test.did.idl.d.ts +11 -0
- package/canisters/declarations/nns/sns_wasm.did.d.ts +4 -0
- package/canisters/declarations/nns/sns_wasm.did.idl.d.ts +1 -0
- package/canisters/declarations/sns/governance.did.d.ts +4 -0
- package/canisters/declarations/sns/governance.did.idl.d.ts +1 -0
- package/canisters/declarations/sns/governance_test.did.d.ts +4 -0
- package/canisters/declarations/sns/governance_test.did.idl.d.ts +1 -0
- package/canisters/ic-management/index.js +1 -1
- package/canisters/index.d.ts +1 -1
- package/canisters/index.js +1 -1
- package/canisters/ledger/cycles/index.d.ts +1 -0
- package/canisters/ledger/cycles/index.js +2 -0
- package/canisters/ledger/cycles/index.js.map +7 -0
- package/canisters/ledger/icp/index.d.ts +1 -0
- package/canisters/ledger/icp/index.js +1 -1
- package/canisters/ledger/icp/index.js.map +4 -4
- package/canisters/ledger/icp/ledger.canister.d.ts +6 -6
- package/canisters/ledger/icp/schema.d.ts +152 -0
- package/canisters/ledger/icrc/index.d.ts +1 -1
- package/canisters/ledger/icrc/index.js +1 -1
- package/canisters/ledger/icrc/index.js.map +4 -4
- package/canisters/ledger/icrc/ledger.canister.d.ts +22 -14
- package/canisters/ledger/icrc/schema.d.ts +507 -0
- package/canisters/nns/index.js +1 -1
- package/canisters/sns/index.js +1 -1
- package/chunk-I3WMKZTG.js +2 -0
- package/chunk-I3WMKZTG.js.map +7 -0
- package/{chunk-X3EF7OU6.js → chunk-JI3RCRR6.js} +1 -1
- package/{chunk-X3EF7OU6.js.map → chunk-JI3RCRR6.js.map} +1 -1
- package/package.json +5 -1
- package/src/canisters/declarations/ckbtc/bitcoin.did.d.ts +8 -0
- package/src/canisters/declarations/ckbtc/bitcoin.did.idl.js +16 -0
- package/src/canisters/declarations/ckbtc/minter.did.d.ts +190 -0
- package/src/canisters/declarations/ckbtc/minter.did.idl.js +118 -0
- package/src/canisters/declarations/cketh/minter.did.d.ts +140 -0
- package/src/canisters/declarations/cketh/minter.did.idl.js +78 -0
- package/src/canisters/declarations/cycles-ledger/cycles-ledger.did.d.ts +413 -0
- package/src/canisters/declarations/cycles-ledger/cycles-ledger.did.idl.js +806 -0
- package/src/canisters/declarations/ic-management/ic-management.did.d.ts +18 -4
- package/src/canisters/declarations/ic-management/ic-management.did.idl.js +32 -8
- package/src/canisters/declarations/ledger-icp/index.did.d.ts +20 -1
- package/src/canisters/declarations/ledger-icp/index.did.idl.js +32 -5
- package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +1 -0
- package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +2 -0
- package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +1 -0
- package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +2 -0
- package/src/canisters/declarations/nns/governance.did.d.ts +100 -0
- package/src/canisters/declarations/nns/governance.did.idl.js +132 -0
- package/src/canisters/declarations/nns/governance_test.did.d.ts +100 -0
- package/src/canisters/declarations/nns/governance_test.did.idl.js +132 -0
- package/src/canisters/declarations/nns/sns_wasm.did.d.ts +4 -0
- package/src/canisters/declarations/nns/sns_wasm.did.idl.js +8 -0
- package/src/canisters/declarations/sns/governance.did.d.ts +4 -0
- package/src/canisters/declarations/sns/governance.did.idl.js +12 -0
- package/src/canisters/declarations/sns/governance_test.did.d.ts +4 -0
- package/src/canisters/declarations/sns/governance_test.did.idl.js +12 -0
- package/canisters/ledger/icrc/schemas.d.ts +0 -11
- package/chunk-I4MVAQHI.js +0 -2
- package/chunk-I4MVAQHI.js.map +0 -7
- /package/canisters/{schemas.d.ts → schema.d.ts} +0 -0
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import type { Principal } from '@icp-sdk/core/principal';
|
|
2
|
+
import * as z from 'zod';
|
|
3
|
+
/**
|
|
4
|
+
* @see CanisterOptions
|
|
5
|
+
*/
|
|
6
|
+
export declare const IcrcCanisterOptionsSchema: z.ZodObject<{
|
|
7
|
+
canisterId: z.ZodNonOptional<z.ZodOptional<z.ZodPipe<z.ZodCustom<Principal, Principal>, z.ZodTransform<Principal, Principal>>>>;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
/**
|
|
10
|
+
* The options to initialize an Icrc canister.
|
|
11
|
+
*/
|
|
12
|
+
export type IcrcCanisterOptions = z.infer<typeof IcrcCanisterOptionsSchema>;
|
|
13
|
+
export declare const SubaccountSchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
14
|
+
export declare const AccountSchema: z.ZodObject<{
|
|
15
|
+
owner: z.ZodPipe<z.ZodCustom<Principal, Principal>, z.ZodTransform<Principal, Principal>>;
|
|
16
|
+
subaccount: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export declare const TokensSchema: z.ZodBigInt;
|
|
19
|
+
export declare const TransferArgsSchema: z.ZodObject<{
|
|
20
|
+
to: z.ZodObject<{
|
|
21
|
+
owner: z.ZodPipe<z.ZodCustom<Principal, Principal>, z.ZodTransform<Principal, Principal>>;
|
|
22
|
+
subaccount: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
fee: z.ZodOptional<z.ZodBigInt>;
|
|
25
|
+
memo: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
26
|
+
from_subaccount: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
27
|
+
created_at_time: z.ZodOptional<z.ZodBigInt>;
|
|
28
|
+
amount: z.ZodBigInt;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
export declare const TransferErrorSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
31
|
+
GenericError: z.ZodObject<{
|
|
32
|
+
message: z.ZodString;
|
|
33
|
+
error_code: z.ZodBigInt;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
36
|
+
TemporarilyUnavailable: z.ZodNull;
|
|
37
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
38
|
+
BadBurn: z.ZodObject<{
|
|
39
|
+
min_burn_amount: z.ZodBigInt;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
42
|
+
Duplicate: z.ZodObject<{
|
|
43
|
+
duplicate_of: z.ZodBigInt;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
46
|
+
BadFee: z.ZodObject<{
|
|
47
|
+
expected_fee: z.ZodBigInt;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
50
|
+
CreatedInFuture: z.ZodObject<{
|
|
51
|
+
ledger_time: z.ZodBigInt;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
54
|
+
TooOld: z.ZodNull;
|
|
55
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
56
|
+
InsufficientFunds: z.ZodObject<{
|
|
57
|
+
balance: z.ZodBigInt;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
}, z.core.$strict>]>;
|
|
60
|
+
export declare const TransferResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
61
|
+
Ok: z.ZodBigInt;
|
|
62
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
63
|
+
Err: z.ZodUnion<readonly [z.ZodObject<{
|
|
64
|
+
GenericError: z.ZodObject<{
|
|
65
|
+
message: z.ZodString;
|
|
66
|
+
error_code: z.ZodBigInt;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
69
|
+
TemporarilyUnavailable: z.ZodNull;
|
|
70
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
71
|
+
BadBurn: z.ZodObject<{
|
|
72
|
+
min_burn_amount: z.ZodBigInt;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
75
|
+
Duplicate: z.ZodObject<{
|
|
76
|
+
duplicate_of: z.ZodBigInt;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
79
|
+
BadFee: z.ZodObject<{
|
|
80
|
+
expected_fee: z.ZodBigInt;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
83
|
+
CreatedInFuture: z.ZodObject<{
|
|
84
|
+
ledger_time: z.ZodBigInt;
|
|
85
|
+
}, z.core.$strict>;
|
|
86
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
87
|
+
TooOld: z.ZodNull;
|
|
88
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
89
|
+
InsufficientFunds: z.ZodObject<{
|
|
90
|
+
balance: z.ZodBigInt;
|
|
91
|
+
}, z.core.$strict>;
|
|
92
|
+
}, z.core.$strict>]>;
|
|
93
|
+
}, z.core.$strict>]>;
|
|
94
|
+
export declare const TransferFromArgsSchema: z.ZodObject<{
|
|
95
|
+
to: z.ZodObject<{
|
|
96
|
+
owner: z.ZodPipe<z.ZodCustom<Principal, Principal>, z.ZodTransform<Principal, Principal>>;
|
|
97
|
+
subaccount: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
98
|
+
}, z.core.$strict>;
|
|
99
|
+
fee: z.ZodOptional<z.ZodBigInt>;
|
|
100
|
+
spender_subaccount: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
101
|
+
from: z.ZodObject<{
|
|
102
|
+
owner: z.ZodPipe<z.ZodCustom<Principal, Principal>, z.ZodTransform<Principal, Principal>>;
|
|
103
|
+
subaccount: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
memo: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
106
|
+
created_at_time: z.ZodOptional<z.ZodBigInt>;
|
|
107
|
+
amount: z.ZodBigInt;
|
|
108
|
+
}, z.core.$strict>;
|
|
109
|
+
export declare const TransferFromErrorSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
110
|
+
GenericError: z.ZodObject<{
|
|
111
|
+
message: z.ZodString;
|
|
112
|
+
error_code: z.ZodBigInt;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
115
|
+
TemporarilyUnavailable: z.ZodNull;
|
|
116
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
117
|
+
InsufficientAllowance: z.ZodObject<{
|
|
118
|
+
allowance: z.ZodBigInt;
|
|
119
|
+
}, z.core.$strict>;
|
|
120
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
121
|
+
BadBurn: z.ZodObject<{
|
|
122
|
+
min_burn_amount: z.ZodBigInt;
|
|
123
|
+
}, z.core.$strict>;
|
|
124
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
125
|
+
Duplicate: z.ZodObject<{
|
|
126
|
+
duplicate_of: z.ZodBigInt;
|
|
127
|
+
}, z.core.$strict>;
|
|
128
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
129
|
+
BadFee: z.ZodObject<{
|
|
130
|
+
expected_fee: z.ZodBigInt;
|
|
131
|
+
}, z.core.$strict>;
|
|
132
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
133
|
+
CreatedInFuture: z.ZodObject<{
|
|
134
|
+
ledger_time: z.ZodBigInt;
|
|
135
|
+
}, z.core.$strict>;
|
|
136
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
137
|
+
TooOld: z.ZodNull;
|
|
138
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
139
|
+
InsufficientFunds: z.ZodObject<{
|
|
140
|
+
balance: z.ZodBigInt;
|
|
141
|
+
}, z.core.$strict>;
|
|
142
|
+
}, z.core.$strict>]>;
|
|
143
|
+
export declare const TransferFromResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
144
|
+
Ok: z.ZodBigInt;
|
|
145
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
146
|
+
Err: z.ZodUnion<readonly [z.ZodObject<{
|
|
147
|
+
GenericError: z.ZodObject<{
|
|
148
|
+
message: z.ZodString;
|
|
149
|
+
error_code: z.ZodBigInt;
|
|
150
|
+
}, z.core.$strict>;
|
|
151
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
152
|
+
TemporarilyUnavailable: z.ZodNull;
|
|
153
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
154
|
+
InsufficientAllowance: z.ZodObject<{
|
|
155
|
+
allowance: z.ZodBigInt;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
158
|
+
BadBurn: z.ZodObject<{
|
|
159
|
+
min_burn_amount: z.ZodBigInt;
|
|
160
|
+
}, z.core.$strict>;
|
|
161
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
162
|
+
Duplicate: z.ZodObject<{
|
|
163
|
+
duplicate_of: z.ZodBigInt;
|
|
164
|
+
}, z.core.$strict>;
|
|
165
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
166
|
+
BadFee: z.ZodObject<{
|
|
167
|
+
expected_fee: z.ZodBigInt;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
170
|
+
CreatedInFuture: z.ZodObject<{
|
|
171
|
+
ledger_time: z.ZodBigInt;
|
|
172
|
+
}, z.core.$strict>;
|
|
173
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
174
|
+
TooOld: z.ZodNull;
|
|
175
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
176
|
+
InsufficientFunds: z.ZodObject<{
|
|
177
|
+
balance: z.ZodBigInt;
|
|
178
|
+
}, z.core.$strict>;
|
|
179
|
+
}, z.core.$strict>]>;
|
|
180
|
+
}, z.core.$strict>]>;
|
|
181
|
+
export declare const ApproveArgsSchema: z.ZodObject<{
|
|
182
|
+
fee: z.ZodOptional<z.ZodBigInt>;
|
|
183
|
+
memo: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
184
|
+
from_subaccount: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
185
|
+
created_at_time: z.ZodOptional<z.ZodBigInt>;
|
|
186
|
+
amount: z.ZodBigInt;
|
|
187
|
+
expected_allowance: z.ZodOptional<z.ZodBigInt>;
|
|
188
|
+
expires_at: z.ZodOptional<z.ZodBigInt>;
|
|
189
|
+
spender: z.ZodObject<{
|
|
190
|
+
owner: z.ZodPipe<z.ZodCustom<Principal, Principal>, z.ZodTransform<Principal, Principal>>;
|
|
191
|
+
subaccount: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
192
|
+
}, z.core.$strict>;
|
|
193
|
+
}, z.core.$strict>;
|
|
194
|
+
export declare const ApproveErrorSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
195
|
+
GenericError: z.ZodObject<{
|
|
196
|
+
message: z.ZodString;
|
|
197
|
+
error_code: z.ZodBigInt;
|
|
198
|
+
}, z.core.$strict>;
|
|
199
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
200
|
+
TemporarilyUnavailable: z.ZodNull;
|
|
201
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
202
|
+
Duplicate: z.ZodObject<{
|
|
203
|
+
duplicate_of: z.ZodBigInt;
|
|
204
|
+
}, z.core.$strict>;
|
|
205
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
206
|
+
BadFee: z.ZodObject<{
|
|
207
|
+
expected_fee: z.ZodBigInt;
|
|
208
|
+
}, z.core.$strict>;
|
|
209
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
210
|
+
AllowanceChanged: z.ZodObject<{
|
|
211
|
+
current_allowance: z.ZodBigInt;
|
|
212
|
+
}, z.core.$strict>;
|
|
213
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
214
|
+
CreatedInFuture: z.ZodObject<{
|
|
215
|
+
ledger_time: z.ZodBigInt;
|
|
216
|
+
}, z.core.$strict>;
|
|
217
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
218
|
+
TooOld: z.ZodNull;
|
|
219
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
220
|
+
Expired: z.ZodObject<{
|
|
221
|
+
ledger_time: z.ZodBigInt;
|
|
222
|
+
}, z.core.$strict>;
|
|
223
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
224
|
+
InsufficientFunds: z.ZodObject<{
|
|
225
|
+
balance: z.ZodBigInt;
|
|
226
|
+
}, z.core.$strict>;
|
|
227
|
+
}, z.core.$strict>]>;
|
|
228
|
+
export declare const ApproveResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
229
|
+
Ok: z.ZodBigInt;
|
|
230
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
231
|
+
Err: z.ZodUnion<readonly [z.ZodObject<{
|
|
232
|
+
GenericError: z.ZodObject<{
|
|
233
|
+
message: z.ZodString;
|
|
234
|
+
error_code: z.ZodBigInt;
|
|
235
|
+
}, z.core.$strict>;
|
|
236
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
237
|
+
TemporarilyUnavailable: z.ZodNull;
|
|
238
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
239
|
+
Duplicate: z.ZodObject<{
|
|
240
|
+
duplicate_of: z.ZodBigInt;
|
|
241
|
+
}, z.core.$strict>;
|
|
242
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
243
|
+
BadFee: z.ZodObject<{
|
|
244
|
+
expected_fee: z.ZodBigInt;
|
|
245
|
+
}, z.core.$strict>;
|
|
246
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
247
|
+
AllowanceChanged: z.ZodObject<{
|
|
248
|
+
current_allowance: z.ZodBigInt;
|
|
249
|
+
}, z.core.$strict>;
|
|
250
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
251
|
+
CreatedInFuture: z.ZodObject<{
|
|
252
|
+
ledger_time: z.ZodBigInt;
|
|
253
|
+
}, z.core.$strict>;
|
|
254
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
255
|
+
TooOld: z.ZodNull;
|
|
256
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
257
|
+
Expired: z.ZodObject<{
|
|
258
|
+
ledger_time: z.ZodBigInt;
|
|
259
|
+
}, z.core.$strict>;
|
|
260
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
261
|
+
InsufficientFunds: z.ZodObject<{
|
|
262
|
+
balance: z.ZodBigInt;
|
|
263
|
+
}, z.core.$strict>;
|
|
264
|
+
}, z.core.$strict>]>;
|
|
265
|
+
}, z.core.$strict>]>;
|
|
266
|
+
/**
|
|
267
|
+
* Subaccount is an arbitrary 32-byte array used to compute the source address.
|
|
268
|
+
*/
|
|
269
|
+
export type Subaccount = Uint8Array;
|
|
270
|
+
/**
|
|
271
|
+
* An ICRC account, consisting of an owner principal and an optional subaccount.
|
|
272
|
+
*/
|
|
273
|
+
export interface Account {
|
|
274
|
+
/** The account owner. */
|
|
275
|
+
owner: Principal;
|
|
276
|
+
/** An optional subaccount to distinguish multiple accounts for the same owner. */
|
|
277
|
+
subaccount?: Subaccount;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Errors that can occur during an ICRC-1 transfer.
|
|
281
|
+
*/
|
|
282
|
+
export type TransferError =
|
|
283
|
+
/** An error not covered by the other variants. */
|
|
284
|
+
{
|
|
285
|
+
GenericError: {
|
|
286
|
+
message: string;
|
|
287
|
+
error_code: bigint;
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
/** The ledger is temporarily unavailable. */
|
|
291
|
+
| {
|
|
292
|
+
TemporarilyUnavailable: null;
|
|
293
|
+
}
|
|
294
|
+
/** The burn amount is below the minimum. */
|
|
295
|
+
| {
|
|
296
|
+
BadBurn: {
|
|
297
|
+
min_burn_amount: bigint;
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
/** The transaction is a duplicate. */
|
|
301
|
+
| {
|
|
302
|
+
Duplicate: {
|
|
303
|
+
duplicate_of: bigint;
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
/** The fee does not match the expected fee. */
|
|
307
|
+
| {
|
|
308
|
+
BadFee: {
|
|
309
|
+
expected_fee: bigint;
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
/** The `created_at_time` is too far in the future. */
|
|
313
|
+
| {
|
|
314
|
+
CreatedInFuture: {
|
|
315
|
+
ledger_time: bigint;
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
/** The transaction is too old. */
|
|
319
|
+
| {
|
|
320
|
+
TooOld: null;
|
|
321
|
+
}
|
|
322
|
+
/** The account does not have enough funds. */
|
|
323
|
+
| {
|
|
324
|
+
InsufficientFunds: {
|
|
325
|
+
balance: bigint;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* The result of an ICRC-1 `icrc1_transfer` call.
|
|
330
|
+
* Returns the block index of the transaction on success.
|
|
331
|
+
*/
|
|
332
|
+
export type TransferResult = {
|
|
333
|
+
Ok: bigint;
|
|
334
|
+
} | {
|
|
335
|
+
Err: TransferError;
|
|
336
|
+
};
|
|
337
|
+
/**
|
|
338
|
+
* Arguments for the ICRC-1 `icrc1_transfer` call.
|
|
339
|
+
*/
|
|
340
|
+
export interface TransferArgs {
|
|
341
|
+
/** The destination account. */
|
|
342
|
+
to: Account;
|
|
343
|
+
/** An optional fee. Uses the default ledger fee if not provided. */
|
|
344
|
+
fee?: bigint;
|
|
345
|
+
/** An optional memo for the transaction. */
|
|
346
|
+
memo?: Uint8Array;
|
|
347
|
+
/** An optional subaccount to transfer from. Uses the default subaccount if not provided. */
|
|
348
|
+
from_subaccount?: Subaccount;
|
|
349
|
+
/** An optional timestamp. Uses current IC time if not provided. */
|
|
350
|
+
created_at_time?: bigint;
|
|
351
|
+
/** The amount to transfer. */
|
|
352
|
+
amount: bigint;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Errors that can occur during an ICRC-2 transfer-from.
|
|
356
|
+
*/
|
|
357
|
+
export type TransferFromError =
|
|
358
|
+
/** An error not covered by the other variants. */
|
|
359
|
+
{
|
|
360
|
+
GenericError: {
|
|
361
|
+
message: string;
|
|
362
|
+
error_code: bigint;
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
/** The ledger is temporarily unavailable. */
|
|
366
|
+
| {
|
|
367
|
+
TemporarilyUnavailable: null;
|
|
368
|
+
}
|
|
369
|
+
/** The spender's allowance is insufficient. */
|
|
370
|
+
| {
|
|
371
|
+
InsufficientAllowance: {
|
|
372
|
+
allowance: bigint;
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
/** The burn amount is below the minimum. */
|
|
376
|
+
| {
|
|
377
|
+
BadBurn: {
|
|
378
|
+
min_burn_amount: bigint;
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
/** The transaction is a duplicate. */
|
|
382
|
+
| {
|
|
383
|
+
Duplicate: {
|
|
384
|
+
duplicate_of: bigint;
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
/** The fee does not match the expected fee. */
|
|
388
|
+
| {
|
|
389
|
+
BadFee: {
|
|
390
|
+
expected_fee: bigint;
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
/** The `created_at_time` is too far in the future. */
|
|
394
|
+
| {
|
|
395
|
+
CreatedInFuture: {
|
|
396
|
+
ledger_time: bigint;
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
/** The transaction is too old. */
|
|
400
|
+
| {
|
|
401
|
+
TooOld: null;
|
|
402
|
+
}
|
|
403
|
+
/** The account does not have enough funds. */
|
|
404
|
+
| {
|
|
405
|
+
InsufficientFunds: {
|
|
406
|
+
balance: bigint;
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
/**
|
|
410
|
+
* The result of an ICRC-2 `icrc2_transfer_from` call.
|
|
411
|
+
* Returns the block index of the transaction on success.
|
|
412
|
+
*/
|
|
413
|
+
export type TransferFromResult = {
|
|
414
|
+
Ok: bigint;
|
|
415
|
+
} | {
|
|
416
|
+
Err: TransferFromError;
|
|
417
|
+
};
|
|
418
|
+
/**
|
|
419
|
+
* Arguments for the ICRC-2 `icrc2_transfer_from` call.
|
|
420
|
+
*/
|
|
421
|
+
export interface TransferFromArgs {
|
|
422
|
+
/** The destination account. */
|
|
423
|
+
to: Account;
|
|
424
|
+
/** An optional fee. Uses the default ledger fee if not provided. */
|
|
425
|
+
fee?: bigint;
|
|
426
|
+
/** An optional subaccount of the spender. */
|
|
427
|
+
spender_subaccount?: Subaccount;
|
|
428
|
+
/** The account to transfer from. */
|
|
429
|
+
from: Account;
|
|
430
|
+
/** An optional memo for the transaction. */
|
|
431
|
+
memo?: Uint8Array;
|
|
432
|
+
/** An optional timestamp. Uses current IC time if not provided. */
|
|
433
|
+
created_at_time?: bigint;
|
|
434
|
+
/** The amount to transfer. */
|
|
435
|
+
amount: bigint;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Amount of ICRC tokens, represented as a natural number.
|
|
439
|
+
*/
|
|
440
|
+
export type Tokens = bigint;
|
|
441
|
+
/**
|
|
442
|
+
* Arguments for the ICRC-2 `icrc2_approve` call.
|
|
443
|
+
*/
|
|
444
|
+
export interface ApproveArgs {
|
|
445
|
+
/** An optional fee. Uses the default ledger fee if not provided. */
|
|
446
|
+
fee?: bigint;
|
|
447
|
+
/** An optional memo for the transaction. */
|
|
448
|
+
memo?: Uint8Array;
|
|
449
|
+
/** An optional subaccount of the approver. */
|
|
450
|
+
from_subaccount?: Subaccount;
|
|
451
|
+
/** An optional timestamp. Uses current IC time if not provided. */
|
|
452
|
+
created_at_time?: bigint;
|
|
453
|
+
/** The amount to approve. */
|
|
454
|
+
amount: bigint;
|
|
455
|
+
/** An optional expected current allowance for optimistic concurrency control. */
|
|
456
|
+
expected_allowance?: bigint;
|
|
457
|
+
/** An optional expiry timestamp for the approval. */
|
|
458
|
+
expires_at?: bigint;
|
|
459
|
+
/** The spender account being approved. */
|
|
460
|
+
spender: Account;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Errors that can occur during an ICRC-2 approve.
|
|
464
|
+
*/
|
|
465
|
+
export type ApproveError = {
|
|
466
|
+
GenericError: {
|
|
467
|
+
message: string;
|
|
468
|
+
error_code: bigint;
|
|
469
|
+
};
|
|
470
|
+
} | {
|
|
471
|
+
TemporarilyUnavailable: null;
|
|
472
|
+
} | {
|
|
473
|
+
Duplicate: {
|
|
474
|
+
duplicate_of: bigint;
|
|
475
|
+
};
|
|
476
|
+
} | {
|
|
477
|
+
BadFee: {
|
|
478
|
+
expected_fee: bigint;
|
|
479
|
+
};
|
|
480
|
+
} | {
|
|
481
|
+
AllowanceChanged: {
|
|
482
|
+
current_allowance: bigint;
|
|
483
|
+
};
|
|
484
|
+
} | {
|
|
485
|
+
CreatedInFuture: {
|
|
486
|
+
ledger_time: bigint;
|
|
487
|
+
};
|
|
488
|
+
} | {
|
|
489
|
+
TooOld: null;
|
|
490
|
+
} | {
|
|
491
|
+
Expired: {
|
|
492
|
+
ledger_time: bigint;
|
|
493
|
+
};
|
|
494
|
+
} | {
|
|
495
|
+
InsufficientFunds: {
|
|
496
|
+
balance: bigint;
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
/**
|
|
500
|
+
* The result of an ICRC-2 `icrc2_approve` call.
|
|
501
|
+
* Returns the block index of the approval on success.
|
|
502
|
+
*/
|
|
503
|
+
export type ApproveResult = {
|
|
504
|
+
Ok: bigint;
|
|
505
|
+
} | {
|
|
506
|
+
Err: ApproveError;
|
|
507
|
+
};
|
package/canisters/nns/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l as n,m as s}from"../../chunk-I3WMKZTG.js";import"../../chunk-4C666HHU.js";export{n as NnsGovernanceIdl,s as NnsSnsWasmIdl};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/canisters/sns/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{m as n,n as s,o as S,p as e}from"../../chunk-I3WMKZTG.js";import"../../chunk-4C666HHU.js";export{n as NnsSnsWasmIdl,s as SnsGovernanceIdl,S as SnsRootIdl,e as SnsSwapIdl};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|