near-kit 0.14.0 → 0.16.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/dist/core/actions.d.ts +106 -1
- package/dist/core/actions.d.ts.map +1 -1
- package/dist/core/actions.js +145 -0
- package/dist/core/actions.js.map +1 -1
- package/dist/core/constants.d.ts +22 -0
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +23 -0
- package/dist/core/constants.js.map +1 -1
- package/dist/core/near.d.ts +53 -2
- package/dist/core/near.d.ts.map +1 -1
- package/dist/core/near.js +59 -11
- package/dist/core/near.js.map +1 -1
- package/dist/core/rpc/rpc-schemas.d.ts +1066 -50
- package/dist/core/rpc/rpc-schemas.d.ts.map +1 -1
- package/dist/core/rpc/rpc-schemas.js +217 -5
- package/dist/core/rpc/rpc-schemas.js.map +1 -1
- package/dist/core/rpc/rpc.d.ts +98 -1
- package/dist/core/rpc/rpc.d.ts.map +1 -1
- package/dist/core/rpc/rpc.js +163 -1
- package/dist/core/rpc/rpc.js.map +1 -1
- package/dist/core/schema.d.ts +3024 -290
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +333 -42
- package/dist/core/schema.js.map +1 -1
- package/dist/core/transaction.d.ts +164 -2
- package/dist/core/transaction.d.ts.map +1 -1
- package/dist/core/transaction.js +385 -17
- package/dist/core/transaction.js.map +1 -1
- package/dist/core/types.d.ts +20 -4
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +1 -0
- package/dist/core/types.js.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/sandbox/sandbox.js +1 -1
- package/dist/sandbox/sandbox.js.map +1 -1
- package/dist/utils/key.d.ts +65 -1
- package/dist/utils/key.d.ts.map +1 -1
- package/dist/utils/key.js +137 -1
- package/dist/utils/key.js.map +1 -1
- package/dist/utils/nep413.d.ts +47 -3
- package/dist/utils/nep413.d.ts.map +1 -1
- package/dist/utils/nep413.js +33 -6
- package/dist/utils/nep413.js.map +1 -1
- package/dist/utils/validation.d.ts +8 -2
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +38 -12
- package/dist/utils/validation.js.map +1 -1
- package/package.json +8 -7
package/dist/core/schema.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { b } from "@zorsh/zorsh";
|
|
10
10
|
import type { DelegateAction } from "./actions.js";
|
|
11
|
-
import type { Ed25519PublicKey, Ed25519Signature, PublicKey, Secp256k1PublicKey, Secp256k1Signature, Signature, SignedTransaction, Transaction } from "./types.js";
|
|
11
|
+
import type { Ed25519PublicKey, Ed25519Signature, MlDsa65PublicKey, MlDsa65Signature, PublicKey, Secp256k1PublicKey, Secp256k1Signature, Signature, SignedTransaction, Transaction } from "./types.js";
|
|
12
12
|
/**
|
|
13
13
|
* Prefix for delegate actions (NEP-366 meta transactions)
|
|
14
14
|
* Value: 2^30 + 366 = 1073742190
|
|
@@ -19,7 +19,16 @@ import type { Ed25519PublicKey, Ed25519Signature, PublicKey, Secp256k1PublicKey,
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const DELEGATE_ACTION_PREFIX = 1073742190;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Prefix for V2 delegate actions (gas-key meta transactions, NEP-611).
|
|
23
|
+
* Value: 2^30 + 611 = 1073742435
|
|
24
|
+
*
|
|
25
|
+
* This is the NEP-461 domain tag for `DelegateActionV2`. It is DISTINCT from
|
|
26
|
+
* {@link DELEGATE_ACTION_PREFIX}, so a V1 delegate signature is never valid for
|
|
27
|
+
* a V2 delegate action and vice versa.
|
|
28
|
+
*/
|
|
29
|
+
export declare const DELEGATE_ACTION_V2_PREFIX = 1073742435;
|
|
30
|
+
/**
|
|
31
|
+
* PublicKey enum (0 = Ed25519, 1 = Secp256k1, 2 = ML-DSA-65)
|
|
23
32
|
*/
|
|
24
33
|
export declare const PublicKeySchema: import("@zorsh/zorsh").Schema<{
|
|
25
34
|
ed25519Key: {
|
|
@@ -29,9 +38,13 @@ export declare const PublicKeySchema: import("@zorsh/zorsh").Schema<{
|
|
|
29
38
|
secp256k1Key: {
|
|
30
39
|
data: number[];
|
|
31
40
|
};
|
|
41
|
+
} | {
|
|
42
|
+
mlDsa65Key: {
|
|
43
|
+
data: number[];
|
|
44
|
+
};
|
|
32
45
|
}, string>;
|
|
33
46
|
/**
|
|
34
|
-
* Signature enum (0 = Ed25519, 1 = Secp256k1)
|
|
47
|
+
* Signature enum (0 = Ed25519, 1 = Secp256k1, 2 = ML-DSA-65)
|
|
35
48
|
*/
|
|
36
49
|
export declare const SignatureSchema: import("@zorsh/zorsh").Schema<{
|
|
37
50
|
ed25519Signature: {
|
|
@@ -41,11 +54,43 @@ export declare const SignatureSchema: import("@zorsh/zorsh").Schema<{
|
|
|
41
54
|
secp256k1Signature: {
|
|
42
55
|
data: number[];
|
|
43
56
|
};
|
|
57
|
+
} | {
|
|
58
|
+
mlDsa65Signature: {
|
|
59
|
+
data: number[];
|
|
60
|
+
};
|
|
61
|
+
}, string>;
|
|
62
|
+
/**
|
|
63
|
+
* Function call permission with optional allowance
|
|
64
|
+
*/
|
|
65
|
+
declare const FunctionCallPermissionSchema: import("@zorsh/zorsh").Schema<{
|
|
66
|
+
allowance: bigint | null;
|
|
67
|
+
receiverId: string;
|
|
68
|
+
methodNames: string[];
|
|
69
|
+
}, string>;
|
|
70
|
+
/**
|
|
71
|
+
* FunctionCallPermission type inferred from the Borsh schema.
|
|
72
|
+
*/
|
|
73
|
+
export type FunctionCallPermissionBorsh = b.infer<typeof FunctionCallPermissionSchema>;
|
|
74
|
+
/**
|
|
75
|
+
* Gas key information (protocol v85 / NEAR 2.13).
|
|
76
|
+
*
|
|
77
|
+
* Gas keys are access keys with a prepaid balance used to pay for gas. A single
|
|
78
|
+
* gas key allocates `numNonces` independent nonce slots so it can sign multiple
|
|
79
|
+
* transactions in parallel.
|
|
80
|
+
*
|
|
81
|
+
* Field order matches nearcore `GasKeyInfo { balance: u128, num_nonces: u16 }`.
|
|
82
|
+
*/
|
|
83
|
+
declare const GasKeyInfoSchema: import("@zorsh/zorsh").Schema<{
|
|
84
|
+
balance: bigint;
|
|
85
|
+
numNonces: number;
|
|
44
86
|
}, string>;
|
|
45
87
|
/**
|
|
46
|
-
* AccessKeyPermission enum
|
|
88
|
+
* AccessKeyPermission enum.
|
|
89
|
+
*
|
|
90
|
+
* Variant order is the Borsh discriminant and MUST match nearcore:
|
|
91
|
+
* 0 = FunctionCall, 1 = FullAccess, 2 = GasKeyFunctionCall, 3 = GasKeyFullAccess.
|
|
47
92
|
*/
|
|
48
|
-
declare const AccessKeyPermissionSchema: import("@zorsh/zorsh").Schema<{
|
|
93
|
+
export declare const AccessKeyPermissionSchema: import("@zorsh/zorsh").Schema<{
|
|
49
94
|
functionCall: {
|
|
50
95
|
allowance: bigint | null;
|
|
51
96
|
receiverId: string;
|
|
@@ -53,7 +98,30 @@ declare const AccessKeyPermissionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
53
98
|
};
|
|
54
99
|
} | {
|
|
55
100
|
fullAccess: {};
|
|
101
|
+
} | {
|
|
102
|
+
gasKeyFunctionCall: {
|
|
103
|
+
gasKeyInfo: {
|
|
104
|
+
balance: bigint;
|
|
105
|
+
numNonces: number;
|
|
106
|
+
};
|
|
107
|
+
functionCall: {
|
|
108
|
+
allowance: bigint | null;
|
|
109
|
+
receiverId: string;
|
|
110
|
+
methodNames: string[];
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
} | {
|
|
114
|
+
gasKeyFullAccess: {
|
|
115
|
+
gasKeyInfo: {
|
|
116
|
+
balance: bigint;
|
|
117
|
+
numNonces: number;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
56
120
|
}, string>;
|
|
121
|
+
/**
|
|
122
|
+
* GasKeyInfo type inferred from the Borsh schema.
|
|
123
|
+
*/
|
|
124
|
+
export type GasKeyInfoBorsh = b.infer<typeof GasKeyInfoSchema>;
|
|
57
125
|
/**
|
|
58
126
|
* AccessKeyPermission type inferred from schema
|
|
59
127
|
*/
|
|
@@ -97,6 +165,10 @@ declare const StakeSchema: import("@zorsh/zorsh").Schema<{
|
|
|
97
165
|
secp256k1Key: {
|
|
98
166
|
data: number[];
|
|
99
167
|
};
|
|
168
|
+
} | {
|
|
169
|
+
mlDsa65Key: {
|
|
170
|
+
data: number[];
|
|
171
|
+
};
|
|
100
172
|
};
|
|
101
173
|
}, string>;
|
|
102
174
|
/**
|
|
@@ -111,6 +183,10 @@ declare const AddKeySchema: import("@zorsh/zorsh").Schema<{
|
|
|
111
183
|
secp256k1Key: {
|
|
112
184
|
data: number[];
|
|
113
185
|
};
|
|
186
|
+
} | {
|
|
187
|
+
mlDsa65Key: {
|
|
188
|
+
data: number[];
|
|
189
|
+
};
|
|
114
190
|
};
|
|
115
191
|
accessKey: {
|
|
116
192
|
nonce: bigint;
|
|
@@ -122,6 +198,25 @@ declare const AddKeySchema: import("@zorsh/zorsh").Schema<{
|
|
|
122
198
|
};
|
|
123
199
|
} | {
|
|
124
200
|
fullAccess: {};
|
|
201
|
+
} | {
|
|
202
|
+
gasKeyFunctionCall: {
|
|
203
|
+
gasKeyInfo: {
|
|
204
|
+
balance: bigint;
|
|
205
|
+
numNonces: number;
|
|
206
|
+
};
|
|
207
|
+
functionCall: {
|
|
208
|
+
allowance: bigint | null;
|
|
209
|
+
receiverId: string;
|
|
210
|
+
methodNames: string[];
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
} | {
|
|
214
|
+
gasKeyFullAccess: {
|
|
215
|
+
gasKeyInfo: {
|
|
216
|
+
balance: bigint;
|
|
217
|
+
numNonces: number;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
125
220
|
};
|
|
126
221
|
};
|
|
127
222
|
}, string>;
|
|
@@ -137,6 +232,10 @@ declare const DeleteKeySchema: import("@zorsh/zorsh").Schema<{
|
|
|
137
232
|
secp256k1Key: {
|
|
138
233
|
data: number[];
|
|
139
234
|
};
|
|
235
|
+
} | {
|
|
236
|
+
mlDsa65Key: {
|
|
237
|
+
data: number[];
|
|
238
|
+
};
|
|
140
239
|
};
|
|
141
240
|
}, string>;
|
|
142
241
|
/**
|
|
@@ -145,6 +244,51 @@ declare const DeleteKeySchema: import("@zorsh/zorsh").Schema<{
|
|
|
145
244
|
declare const DeleteAccountSchema: import("@zorsh/zorsh").Schema<{
|
|
146
245
|
beneficiaryId: string;
|
|
147
246
|
}, string>;
|
|
247
|
+
/**
|
|
248
|
+
* TransferToGasKey action (protocol v85 / NEAR 2.13).
|
|
249
|
+
*
|
|
250
|
+
* Funds a gas key's prepaid balance. Mirrors nearcore
|
|
251
|
+
* `TransferToGasKeyAction { public_key: PublicKey, deposit: u128 }`.
|
|
252
|
+
*/
|
|
253
|
+
declare const TransferToGasKeySchema: import("@zorsh/zorsh").Schema<{
|
|
254
|
+
publicKey: {
|
|
255
|
+
ed25519Key: {
|
|
256
|
+
data: number[];
|
|
257
|
+
};
|
|
258
|
+
} | {
|
|
259
|
+
secp256k1Key: {
|
|
260
|
+
data: number[];
|
|
261
|
+
};
|
|
262
|
+
} | {
|
|
263
|
+
mlDsa65Key: {
|
|
264
|
+
data: number[];
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
deposit: bigint;
|
|
268
|
+
}, string>;
|
|
269
|
+
/**
|
|
270
|
+
* WithdrawFromGasKey action (protocol v85 / NEAR 2.13).
|
|
271
|
+
*
|
|
272
|
+
* Withdraws NEAR from a gas key's balance back to the account. Mirrors nearcore
|
|
273
|
+
* `WithdrawFromGasKeyAction { public_key: PublicKey, amount: u128 }`. Note the
|
|
274
|
+
* second field is `amount`, not `deposit`.
|
|
275
|
+
*/
|
|
276
|
+
declare const WithdrawFromGasKeySchema: import("@zorsh/zorsh").Schema<{
|
|
277
|
+
publicKey: {
|
|
278
|
+
ed25519Key: {
|
|
279
|
+
data: number[];
|
|
280
|
+
};
|
|
281
|
+
} | {
|
|
282
|
+
secp256k1Key: {
|
|
283
|
+
data: number[];
|
|
284
|
+
};
|
|
285
|
+
} | {
|
|
286
|
+
mlDsa65Key: {
|
|
287
|
+
data: number[];
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
amount: bigint;
|
|
291
|
+
}, string>;
|
|
148
292
|
/**
|
|
149
293
|
* DeployGlobalContract action
|
|
150
294
|
*/
|
|
@@ -210,9 +354,43 @@ declare const DeterministicStateInitSchema: import("@zorsh/zorsh").Schema<{
|
|
|
210
354
|
deposit: bigint;
|
|
211
355
|
}, string>;
|
|
212
356
|
/**
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
357
|
+
* TransactionNonce enum (NEAR 2.13).
|
|
358
|
+
*
|
|
359
|
+
* Variant order is the Borsh discriminant and MUST match nearcore:
|
|
360
|
+
* 0 = `Nonce { nonce: u64 }` (ordinary access keys),
|
|
361
|
+
* 1 = `GasKeyNonce { nonce: u64, nonce_index: u16 }` (gas keys).
|
|
362
|
+
*/
|
|
363
|
+
export declare const TransactionNonceSchema: import("@zorsh/zorsh").Schema<{
|
|
364
|
+
nonce: {
|
|
365
|
+
nonce: bigint;
|
|
366
|
+
};
|
|
367
|
+
} | {
|
|
368
|
+
gasKeyNonce: {
|
|
369
|
+
nonce: bigint;
|
|
370
|
+
nonceIndex: number;
|
|
371
|
+
};
|
|
372
|
+
}, string>;
|
|
373
|
+
/**
|
|
374
|
+
* NonceMode enum (NEAR 2.13).
|
|
375
|
+
*
|
|
376
|
+
* Variant order is the Borsh discriminant and MUST match nearcore:
|
|
377
|
+
* 0 = `Monotonic` (default; any nonce strictly greater than the access key
|
|
378
|
+
* nonce), 1 = `Strict` (nonce must be exactly `ak_nonce + 1`).
|
|
379
|
+
*/
|
|
380
|
+
export declare const NonceModeSchema: import("@zorsh/zorsh").Schema<{
|
|
381
|
+
monotonic: {};
|
|
382
|
+
} | {
|
|
383
|
+
strict: {};
|
|
384
|
+
}, string>;
|
|
385
|
+
/**
|
|
386
|
+
* ClassicActions enum - the actions allowed inside a DelegateAction (NEP-366),
|
|
387
|
+
* mirroring nearcore's `NonDelegateAction` which wraps the full `Action` enum.
|
|
388
|
+
*
|
|
389
|
+
* The Borsh discriminants MUST match `Action` exactly. A zorsh enum assigns
|
|
390
|
+
* discriminants positionally, so slot 8 (`Action::Delegate`) is kept as a
|
|
391
|
+
* placeholder to keep slots 9..=13 aligned with the protocol; it is never
|
|
392
|
+
* emitted because delegate actions cannot be nested. The gas-key actions
|
|
393
|
+
* therefore land at their true discriminants 12 and 13.
|
|
216
394
|
*/
|
|
217
395
|
declare const ClassicActionsSchema: import("@zorsh/zorsh").Schema<{
|
|
218
396
|
stake: {
|
|
@@ -225,6 +403,10 @@ declare const ClassicActionsSchema: import("@zorsh/zorsh").Schema<{
|
|
|
225
403
|
secp256k1Key: {
|
|
226
404
|
data: number[];
|
|
227
405
|
};
|
|
406
|
+
} | {
|
|
407
|
+
mlDsa65Key: {
|
|
408
|
+
data: number[];
|
|
409
|
+
};
|
|
228
410
|
};
|
|
229
411
|
};
|
|
230
412
|
} | {
|
|
@@ -254,6 +436,10 @@ declare const ClassicActionsSchema: import("@zorsh/zorsh").Schema<{
|
|
|
254
436
|
secp256k1Key: {
|
|
255
437
|
data: number[];
|
|
256
438
|
};
|
|
439
|
+
} | {
|
|
440
|
+
mlDsa65Key: {
|
|
441
|
+
data: number[];
|
|
442
|
+
};
|
|
257
443
|
};
|
|
258
444
|
accessKey: {
|
|
259
445
|
nonce: bigint;
|
|
@@ -265,6 +451,25 @@ declare const ClassicActionsSchema: import("@zorsh/zorsh").Schema<{
|
|
|
265
451
|
};
|
|
266
452
|
} | {
|
|
267
453
|
fullAccess: {};
|
|
454
|
+
} | {
|
|
455
|
+
gasKeyFunctionCall: {
|
|
456
|
+
gasKeyInfo: {
|
|
457
|
+
balance: bigint;
|
|
458
|
+
numNonces: number;
|
|
459
|
+
};
|
|
460
|
+
functionCall: {
|
|
461
|
+
allowance: bigint | null;
|
|
462
|
+
receiverId: string;
|
|
463
|
+
methodNames: string[];
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
} | {
|
|
467
|
+
gasKeyFullAccess: {
|
|
468
|
+
gasKeyInfo: {
|
|
469
|
+
balance: bigint;
|
|
470
|
+
numNonces: number;
|
|
471
|
+
};
|
|
472
|
+
};
|
|
268
473
|
};
|
|
269
474
|
};
|
|
270
475
|
};
|
|
@@ -278,12 +483,18 @@ declare const ClassicActionsSchema: import("@zorsh/zorsh").Schema<{
|
|
|
278
483
|
secp256k1Key: {
|
|
279
484
|
data: number[];
|
|
280
485
|
};
|
|
486
|
+
} | {
|
|
487
|
+
mlDsa65Key: {
|
|
488
|
+
data: number[];
|
|
489
|
+
};
|
|
281
490
|
};
|
|
282
491
|
};
|
|
283
492
|
} | {
|
|
284
493
|
deleteAccount: {
|
|
285
494
|
beneficiaryId: string;
|
|
286
495
|
};
|
|
496
|
+
} | {
|
|
497
|
+
delegatePlaceholder: {};
|
|
287
498
|
} | {
|
|
288
499
|
deployGlobalContract: {
|
|
289
500
|
code: Uint8Array<ArrayBufferLike>;
|
|
@@ -315,12 +526,50 @@ declare const ClassicActionsSchema: import("@zorsh/zorsh").Schema<{
|
|
|
315
526
|
};
|
|
316
527
|
deposit: bigint;
|
|
317
528
|
};
|
|
529
|
+
} | {
|
|
530
|
+
transferToGasKey: {
|
|
531
|
+
publicKey: {
|
|
532
|
+
ed25519Key: {
|
|
533
|
+
data: number[];
|
|
534
|
+
};
|
|
535
|
+
} | {
|
|
536
|
+
secp256k1Key: {
|
|
537
|
+
data: number[];
|
|
538
|
+
};
|
|
539
|
+
} | {
|
|
540
|
+
mlDsa65Key: {
|
|
541
|
+
data: number[];
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
deposit: bigint;
|
|
545
|
+
};
|
|
546
|
+
} | {
|
|
547
|
+
withdrawFromGasKey: {
|
|
548
|
+
publicKey: {
|
|
549
|
+
ed25519Key: {
|
|
550
|
+
data: number[];
|
|
551
|
+
};
|
|
552
|
+
} | {
|
|
553
|
+
secp256k1Key: {
|
|
554
|
+
data: number[];
|
|
555
|
+
};
|
|
556
|
+
} | {
|
|
557
|
+
mlDsa65Key: {
|
|
558
|
+
data: number[];
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
amount: bigint;
|
|
562
|
+
};
|
|
318
563
|
}, string>;
|
|
319
564
|
/**
|
|
320
|
-
* ClassicAction type - actions that can be used within a DelegateAction
|
|
321
|
-
*
|
|
565
|
+
* ClassicAction type - actions that can be used within a DelegateAction.
|
|
566
|
+
*
|
|
567
|
+
* Excludes the `delegatePlaceholder` (discriminant-alignment-only) variant so
|
|
568
|
+
* callers cannot construct a nested delegate action, which the protocol forbids.
|
|
322
569
|
*/
|
|
323
|
-
export type ClassicAction = b.infer<typeof ClassicActionsSchema
|
|
570
|
+
export type ClassicAction = Exclude<b.infer<typeof ClassicActionsSchema>, {
|
|
571
|
+
delegatePlaceholder: unknown;
|
|
572
|
+
}>;
|
|
324
573
|
/**
|
|
325
574
|
* SignedDelegate - a delegate action with signature
|
|
326
575
|
*/
|
|
@@ -339,6 +588,10 @@ declare const SignedDelegateSchema: import("@zorsh/zorsh").Schema<{
|
|
|
339
588
|
secp256k1Key: {
|
|
340
589
|
data: number[];
|
|
341
590
|
};
|
|
591
|
+
} | {
|
|
592
|
+
mlDsa65Key: {
|
|
593
|
+
data: number[];
|
|
594
|
+
};
|
|
342
595
|
};
|
|
343
596
|
};
|
|
344
597
|
} | {
|
|
@@ -368,6 +621,10 @@ declare const SignedDelegateSchema: import("@zorsh/zorsh").Schema<{
|
|
|
368
621
|
secp256k1Key: {
|
|
369
622
|
data: number[];
|
|
370
623
|
};
|
|
624
|
+
} | {
|
|
625
|
+
mlDsa65Key: {
|
|
626
|
+
data: number[];
|
|
627
|
+
};
|
|
371
628
|
};
|
|
372
629
|
accessKey: {
|
|
373
630
|
nonce: bigint;
|
|
@@ -379,6 +636,25 @@ declare const SignedDelegateSchema: import("@zorsh/zorsh").Schema<{
|
|
|
379
636
|
};
|
|
380
637
|
} | {
|
|
381
638
|
fullAccess: {};
|
|
639
|
+
} | {
|
|
640
|
+
gasKeyFunctionCall: {
|
|
641
|
+
gasKeyInfo: {
|
|
642
|
+
balance: bigint;
|
|
643
|
+
numNonces: number;
|
|
644
|
+
};
|
|
645
|
+
functionCall: {
|
|
646
|
+
allowance: bigint | null;
|
|
647
|
+
receiverId: string;
|
|
648
|
+
methodNames: string[];
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
} | {
|
|
652
|
+
gasKeyFullAccess: {
|
|
653
|
+
gasKeyInfo: {
|
|
654
|
+
balance: bigint;
|
|
655
|
+
numNonces: number;
|
|
656
|
+
};
|
|
657
|
+
};
|
|
382
658
|
};
|
|
383
659
|
};
|
|
384
660
|
};
|
|
@@ -392,12 +668,18 @@ declare const SignedDelegateSchema: import("@zorsh/zorsh").Schema<{
|
|
|
392
668
|
secp256k1Key: {
|
|
393
669
|
data: number[];
|
|
394
670
|
};
|
|
671
|
+
} | {
|
|
672
|
+
mlDsa65Key: {
|
|
673
|
+
data: number[];
|
|
674
|
+
};
|
|
395
675
|
};
|
|
396
676
|
};
|
|
397
677
|
} | {
|
|
398
678
|
deleteAccount: {
|
|
399
679
|
beneficiaryId: string;
|
|
400
680
|
};
|
|
681
|
+
} | {
|
|
682
|
+
delegatePlaceholder: {};
|
|
401
683
|
} | {
|
|
402
684
|
deployGlobalContract: {
|
|
403
685
|
code: Uint8Array<ArrayBufferLike>;
|
|
@@ -429,6 +711,40 @@ declare const SignedDelegateSchema: import("@zorsh/zorsh").Schema<{
|
|
|
429
711
|
};
|
|
430
712
|
deposit: bigint;
|
|
431
713
|
};
|
|
714
|
+
} | {
|
|
715
|
+
transferToGasKey: {
|
|
716
|
+
publicKey: {
|
|
717
|
+
ed25519Key: {
|
|
718
|
+
data: number[];
|
|
719
|
+
};
|
|
720
|
+
} | {
|
|
721
|
+
secp256k1Key: {
|
|
722
|
+
data: number[];
|
|
723
|
+
};
|
|
724
|
+
} | {
|
|
725
|
+
mlDsa65Key: {
|
|
726
|
+
data: number[];
|
|
727
|
+
};
|
|
728
|
+
};
|
|
729
|
+
deposit: bigint;
|
|
730
|
+
};
|
|
731
|
+
} | {
|
|
732
|
+
withdrawFromGasKey: {
|
|
733
|
+
publicKey: {
|
|
734
|
+
ed25519Key: {
|
|
735
|
+
data: number[];
|
|
736
|
+
};
|
|
737
|
+
} | {
|
|
738
|
+
secp256k1Key: {
|
|
739
|
+
data: number[];
|
|
740
|
+
};
|
|
741
|
+
} | {
|
|
742
|
+
mlDsa65Key: {
|
|
743
|
+
data: number[];
|
|
744
|
+
};
|
|
745
|
+
};
|
|
746
|
+
amount: bigint;
|
|
747
|
+
};
|
|
432
748
|
})[];
|
|
433
749
|
nonce: bigint;
|
|
434
750
|
maxBlockHeight: bigint;
|
|
@@ -440,6 +756,10 @@ declare const SignedDelegateSchema: import("@zorsh/zorsh").Schema<{
|
|
|
440
756
|
secp256k1Key: {
|
|
441
757
|
data: number[];
|
|
442
758
|
};
|
|
759
|
+
} | {
|
|
760
|
+
mlDsa65Key: {
|
|
761
|
+
data: number[];
|
|
762
|
+
};
|
|
443
763
|
};
|
|
444
764
|
};
|
|
445
765
|
signature: {
|
|
@@ -450,25 +770,26 @@ declare const SignedDelegateSchema: import("@zorsh/zorsh").Schema<{
|
|
|
450
770
|
secp256k1Signature: {
|
|
451
771
|
data: number[];
|
|
452
772
|
};
|
|
773
|
+
} | {
|
|
774
|
+
mlDsa65Signature: {
|
|
775
|
+
data: number[];
|
|
776
|
+
};
|
|
453
777
|
};
|
|
454
778
|
}, string>;
|
|
455
779
|
/**
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
* 9 = DeployGlobalContract
|
|
468
|
-
* 10 = UseGlobalContract
|
|
469
|
-
* 11 = DeterministicStateInit (NEP-616)
|
|
780
|
+
* Actions allowed inside a DelegateActionV2, mirroring nearcore's
|
|
781
|
+
* `NonDelegateAction` (which wraps the full `Action` enum and rejects nested
|
|
782
|
+
* delegates at runtime).
|
|
783
|
+
*
|
|
784
|
+
* The Borsh discriminants MUST match the corresponding `Action` variants. A
|
|
785
|
+
* zorsh enum assigns discriminants positionally, so slot 8 (`Action::Delegate`)
|
|
786
|
+
* is kept as a placeholder to keep slots 9..=13 aligned with the protocol; it is
|
|
787
|
+
* never emitted because delegate actions cannot be nested. Both delegate
|
|
788
|
+
* variants are intentionally absent: slot 8 (`Delegate`) is a placeholder and
|
|
789
|
+
* slot 14 (`DelegateV2`) is simply not listed, since a delegate action cannot
|
|
790
|
+
* contain another delegate action.
|
|
470
791
|
*/
|
|
471
|
-
|
|
792
|
+
declare const NonDelegateActionSchema: import("@zorsh/zorsh").Schema<{
|
|
472
793
|
stake: {
|
|
473
794
|
stake: bigint;
|
|
474
795
|
publicKey: {
|
|
@@ -479,6 +800,10 @@ export declare const ActionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
479
800
|
secp256k1Key: {
|
|
480
801
|
data: number[];
|
|
481
802
|
};
|
|
803
|
+
} | {
|
|
804
|
+
mlDsa65Key: {
|
|
805
|
+
data: number[];
|
|
806
|
+
};
|
|
482
807
|
};
|
|
483
808
|
};
|
|
484
809
|
} | {
|
|
@@ -508,6 +833,10 @@ export declare const ActionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
508
833
|
secp256k1Key: {
|
|
509
834
|
data: number[];
|
|
510
835
|
};
|
|
836
|
+
} | {
|
|
837
|
+
mlDsa65Key: {
|
|
838
|
+
data: number[];
|
|
839
|
+
};
|
|
511
840
|
};
|
|
512
841
|
accessKey: {
|
|
513
842
|
nonce: bigint;
|
|
@@ -519,6 +848,25 @@ export declare const ActionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
519
848
|
};
|
|
520
849
|
} | {
|
|
521
850
|
fullAccess: {};
|
|
851
|
+
} | {
|
|
852
|
+
gasKeyFunctionCall: {
|
|
853
|
+
gasKeyInfo: {
|
|
854
|
+
balance: bigint;
|
|
855
|
+
numNonces: number;
|
|
856
|
+
};
|
|
857
|
+
functionCall: {
|
|
858
|
+
allowance: bigint | null;
|
|
859
|
+
receiverId: string;
|
|
860
|
+
methodNames: string[];
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
} | {
|
|
864
|
+
gasKeyFullAccess: {
|
|
865
|
+
gasKeyInfo: {
|
|
866
|
+
balance: bigint;
|
|
867
|
+
numNonces: number;
|
|
868
|
+
};
|
|
869
|
+
};
|
|
522
870
|
};
|
|
523
871
|
};
|
|
524
872
|
};
|
|
@@ -532,12 +880,18 @@ export declare const ActionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
532
880
|
secp256k1Key: {
|
|
533
881
|
data: number[];
|
|
534
882
|
};
|
|
883
|
+
} | {
|
|
884
|
+
mlDsa65Key: {
|
|
885
|
+
data: number[];
|
|
886
|
+
};
|
|
535
887
|
};
|
|
536
888
|
};
|
|
537
889
|
} | {
|
|
538
890
|
deleteAccount: {
|
|
539
891
|
beneficiaryId: string;
|
|
540
892
|
};
|
|
893
|
+
} | {
|
|
894
|
+
delegatePlaceholder: {};
|
|
541
895
|
} | {
|
|
542
896
|
deployGlobalContract: {
|
|
543
897
|
code: Uint8Array<ArrayBufferLike>;
|
|
@@ -570,21 +924,269 @@ export declare const ActionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
570
924
|
deposit: bigint;
|
|
571
925
|
};
|
|
572
926
|
} | {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
927
|
+
transferToGasKey: {
|
|
928
|
+
publicKey: {
|
|
929
|
+
ed25519Key: {
|
|
930
|
+
data: number[];
|
|
931
|
+
};
|
|
932
|
+
} | {
|
|
933
|
+
secp256k1Key: {
|
|
934
|
+
data: number[];
|
|
935
|
+
};
|
|
936
|
+
} | {
|
|
937
|
+
mlDsa65Key: {
|
|
938
|
+
data: number[];
|
|
939
|
+
};
|
|
940
|
+
};
|
|
941
|
+
deposit: bigint;
|
|
942
|
+
};
|
|
943
|
+
} | {
|
|
944
|
+
withdrawFromGasKey: {
|
|
945
|
+
publicKey: {
|
|
946
|
+
ed25519Key: {
|
|
947
|
+
data: number[];
|
|
948
|
+
};
|
|
949
|
+
} | {
|
|
950
|
+
secp256k1Key: {
|
|
951
|
+
data: number[];
|
|
952
|
+
};
|
|
953
|
+
} | {
|
|
954
|
+
mlDsa65Key: {
|
|
955
|
+
data: number[];
|
|
956
|
+
};
|
|
957
|
+
};
|
|
958
|
+
amount: bigint;
|
|
959
|
+
};
|
|
960
|
+
}, string>;
|
|
961
|
+
/**
|
|
962
|
+
* DelegateActionV2 struct (NEAR 2.13).
|
|
963
|
+
*
|
|
964
|
+
* Field order matches nearcore `DelegateActionV2`: sender_id, receiver_id,
|
|
965
|
+
* actions, nonce (a {@link TransactionNonceSchema}), max_block_height, public_key.
|
|
966
|
+
*/
|
|
967
|
+
declare const DelegateActionV2Schema: import("@zorsh/zorsh").Schema<{
|
|
968
|
+
senderId: string;
|
|
969
|
+
receiverId: string;
|
|
970
|
+
actions: ({
|
|
971
|
+
stake: {
|
|
972
|
+
stake: bigint;
|
|
973
|
+
publicKey: {
|
|
974
|
+
ed25519Key: {
|
|
975
|
+
data: number[];
|
|
976
|
+
};
|
|
977
|
+
} | {
|
|
978
|
+
secp256k1Key: {
|
|
979
|
+
data: number[];
|
|
980
|
+
};
|
|
981
|
+
} | {
|
|
982
|
+
mlDsa65Key: {
|
|
983
|
+
data: number[];
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
} | {
|
|
988
|
+
createAccount: {};
|
|
989
|
+
} | {
|
|
990
|
+
deployContract: {
|
|
991
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
992
|
+
};
|
|
993
|
+
} | {
|
|
994
|
+
functionCall: {
|
|
995
|
+
methodName: string;
|
|
996
|
+
args: Uint8Array<ArrayBufferLike>;
|
|
997
|
+
gas: bigint;
|
|
998
|
+
deposit: bigint;
|
|
999
|
+
};
|
|
1000
|
+
} | {
|
|
1001
|
+
transfer: {
|
|
1002
|
+
deposit: bigint;
|
|
1003
|
+
};
|
|
1004
|
+
} | {
|
|
1005
|
+
addKey: {
|
|
1006
|
+
publicKey: {
|
|
1007
|
+
ed25519Key: {
|
|
1008
|
+
data: number[];
|
|
1009
|
+
};
|
|
1010
|
+
} | {
|
|
1011
|
+
secp256k1Key: {
|
|
1012
|
+
data: number[];
|
|
1013
|
+
};
|
|
1014
|
+
} | {
|
|
1015
|
+
mlDsa65Key: {
|
|
1016
|
+
data: number[];
|
|
1017
|
+
};
|
|
1018
|
+
};
|
|
1019
|
+
accessKey: {
|
|
1020
|
+
nonce: bigint;
|
|
1021
|
+
permission: {
|
|
1022
|
+
functionCall: {
|
|
1023
|
+
allowance: bigint | null;
|
|
1024
|
+
receiverId: string;
|
|
1025
|
+
methodNames: string[];
|
|
1026
|
+
};
|
|
1027
|
+
} | {
|
|
1028
|
+
fullAccess: {};
|
|
1029
|
+
} | {
|
|
1030
|
+
gasKeyFunctionCall: {
|
|
1031
|
+
gasKeyInfo: {
|
|
1032
|
+
balance: bigint;
|
|
1033
|
+
numNonces: number;
|
|
1034
|
+
};
|
|
1035
|
+
functionCall: {
|
|
1036
|
+
allowance: bigint | null;
|
|
1037
|
+
receiverId: string;
|
|
1038
|
+
methodNames: string[];
|
|
1039
|
+
};
|
|
1040
|
+
};
|
|
1041
|
+
} | {
|
|
1042
|
+
gasKeyFullAccess: {
|
|
1043
|
+
gasKeyInfo: {
|
|
1044
|
+
balance: bigint;
|
|
1045
|
+
numNonces: number;
|
|
1046
|
+
};
|
|
1047
|
+
};
|
|
1048
|
+
};
|
|
1049
|
+
};
|
|
1050
|
+
};
|
|
1051
|
+
} | {
|
|
1052
|
+
deleteKey: {
|
|
1053
|
+
publicKey: {
|
|
1054
|
+
ed25519Key: {
|
|
1055
|
+
data: number[];
|
|
1056
|
+
};
|
|
1057
|
+
} | {
|
|
1058
|
+
secp256k1Key: {
|
|
1059
|
+
data: number[];
|
|
1060
|
+
};
|
|
1061
|
+
} | {
|
|
1062
|
+
mlDsa65Key: {
|
|
1063
|
+
data: number[];
|
|
1064
|
+
};
|
|
1065
|
+
};
|
|
1066
|
+
};
|
|
1067
|
+
} | {
|
|
1068
|
+
deleteAccount: {
|
|
1069
|
+
beneficiaryId: string;
|
|
1070
|
+
};
|
|
1071
|
+
} | {
|
|
1072
|
+
delegatePlaceholder: {};
|
|
1073
|
+
} | {
|
|
1074
|
+
deployGlobalContract: {
|
|
1075
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
1076
|
+
deployMode: {
|
|
1077
|
+
CodeHash: {};
|
|
1078
|
+
} | {
|
|
1079
|
+
AccountId: {};
|
|
1080
|
+
};
|
|
1081
|
+
};
|
|
1082
|
+
} | {
|
|
1083
|
+
useGlobalContract: {
|
|
1084
|
+
contractIdentifier: {
|
|
1085
|
+
CodeHash: number[];
|
|
1086
|
+
} | {
|
|
1087
|
+
AccountId: string;
|
|
1088
|
+
};
|
|
1089
|
+
};
|
|
1090
|
+
} | {
|
|
1091
|
+
deterministicStateInit: {
|
|
1092
|
+
stateInit: {
|
|
1093
|
+
V1: {
|
|
1094
|
+
code: {
|
|
1095
|
+
CodeHash: number[];
|
|
1096
|
+
} | {
|
|
1097
|
+
AccountId: string;
|
|
1098
|
+
};
|
|
1099
|
+
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
1100
|
+
};
|
|
1101
|
+
};
|
|
1102
|
+
deposit: bigint;
|
|
1103
|
+
};
|
|
1104
|
+
} | {
|
|
1105
|
+
transferToGasKey: {
|
|
1106
|
+
publicKey: {
|
|
1107
|
+
ed25519Key: {
|
|
1108
|
+
data: number[];
|
|
1109
|
+
};
|
|
1110
|
+
} | {
|
|
1111
|
+
secp256k1Key: {
|
|
1112
|
+
data: number[];
|
|
1113
|
+
};
|
|
1114
|
+
} | {
|
|
1115
|
+
mlDsa65Key: {
|
|
1116
|
+
data: number[];
|
|
1117
|
+
};
|
|
1118
|
+
};
|
|
1119
|
+
deposit: bigint;
|
|
1120
|
+
};
|
|
1121
|
+
} | {
|
|
1122
|
+
withdrawFromGasKey: {
|
|
1123
|
+
publicKey: {
|
|
1124
|
+
ed25519Key: {
|
|
1125
|
+
data: number[];
|
|
1126
|
+
};
|
|
1127
|
+
} | {
|
|
1128
|
+
secp256k1Key: {
|
|
1129
|
+
data: number[];
|
|
1130
|
+
};
|
|
1131
|
+
} | {
|
|
1132
|
+
mlDsa65Key: {
|
|
1133
|
+
data: number[];
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
1136
|
+
amount: bigint;
|
|
1137
|
+
};
|
|
1138
|
+
})[];
|
|
1139
|
+
nonce: {
|
|
1140
|
+
nonce: {
|
|
1141
|
+
nonce: bigint;
|
|
1142
|
+
};
|
|
1143
|
+
} | {
|
|
1144
|
+
gasKeyNonce: {
|
|
1145
|
+
nonce: bigint;
|
|
1146
|
+
nonceIndex: number;
|
|
1147
|
+
};
|
|
1148
|
+
};
|
|
1149
|
+
maxBlockHeight: bigint;
|
|
1150
|
+
publicKey: {
|
|
1151
|
+
ed25519Key: {
|
|
1152
|
+
data: number[];
|
|
1153
|
+
};
|
|
1154
|
+
} | {
|
|
1155
|
+
secp256k1Key: {
|
|
1156
|
+
data: number[];
|
|
1157
|
+
};
|
|
1158
|
+
} | {
|
|
1159
|
+
mlDsa65Key: {
|
|
1160
|
+
data: number[];
|
|
1161
|
+
};
|
|
1162
|
+
};
|
|
1163
|
+
}, string>;
|
|
1164
|
+
/**
|
|
1165
|
+
* VersionedSignedDelegateAction struct (NEAR 2.13).
|
|
1166
|
+
*
|
|
1167
|
+
* The payload carried by `Action::DelegateV2`: a versioned delegate-action
|
|
1168
|
+
* payload plus its signature.
|
|
1169
|
+
*/
|
|
1170
|
+
declare const VersionedSignedDelegateActionSchema: import("@zorsh/zorsh").Schema<{
|
|
1171
|
+
delegateAction: {
|
|
1172
|
+
v2: {
|
|
1173
|
+
senderId: string;
|
|
1174
|
+
receiverId: string;
|
|
1175
|
+
actions: ({
|
|
1176
|
+
stake: {
|
|
1177
|
+
stake: bigint;
|
|
1178
|
+
publicKey: {
|
|
1179
|
+
ed25519Key: {
|
|
1180
|
+
data: number[];
|
|
1181
|
+
};
|
|
1182
|
+
} | {
|
|
585
1183
|
secp256k1Key: {
|
|
586
1184
|
data: number[];
|
|
587
1185
|
};
|
|
1186
|
+
} | {
|
|
1187
|
+
mlDsa65Key: {
|
|
1188
|
+
data: number[];
|
|
1189
|
+
};
|
|
588
1190
|
};
|
|
589
1191
|
};
|
|
590
1192
|
} | {
|
|
@@ -614,6 +1216,10 @@ export declare const ActionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
614
1216
|
secp256k1Key: {
|
|
615
1217
|
data: number[];
|
|
616
1218
|
};
|
|
1219
|
+
} | {
|
|
1220
|
+
mlDsa65Key: {
|
|
1221
|
+
data: number[];
|
|
1222
|
+
};
|
|
617
1223
|
};
|
|
618
1224
|
accessKey: {
|
|
619
1225
|
nonce: bigint;
|
|
@@ -624,130 +1230,2068 @@ export declare const ActionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
624
1230
|
methodNames: string[];
|
|
625
1231
|
};
|
|
626
1232
|
} | {
|
|
627
|
-
fullAccess: {};
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
1233
|
+
fullAccess: {};
|
|
1234
|
+
} | {
|
|
1235
|
+
gasKeyFunctionCall: {
|
|
1236
|
+
gasKeyInfo: {
|
|
1237
|
+
balance: bigint;
|
|
1238
|
+
numNonces: number;
|
|
1239
|
+
};
|
|
1240
|
+
functionCall: {
|
|
1241
|
+
allowance: bigint | null;
|
|
1242
|
+
receiverId: string;
|
|
1243
|
+
methodNames: string[];
|
|
1244
|
+
};
|
|
1245
|
+
};
|
|
1246
|
+
} | {
|
|
1247
|
+
gasKeyFullAccess: {
|
|
1248
|
+
gasKeyInfo: {
|
|
1249
|
+
balance: bigint;
|
|
1250
|
+
numNonces: number;
|
|
1251
|
+
};
|
|
1252
|
+
};
|
|
1253
|
+
};
|
|
1254
|
+
};
|
|
1255
|
+
};
|
|
1256
|
+
} | {
|
|
1257
|
+
deleteKey: {
|
|
1258
|
+
publicKey: {
|
|
1259
|
+
ed25519Key: {
|
|
1260
|
+
data: number[];
|
|
1261
|
+
};
|
|
1262
|
+
} | {
|
|
1263
|
+
secp256k1Key: {
|
|
1264
|
+
data: number[];
|
|
1265
|
+
};
|
|
1266
|
+
} | {
|
|
1267
|
+
mlDsa65Key: {
|
|
1268
|
+
data: number[];
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
};
|
|
1272
|
+
} | {
|
|
1273
|
+
deleteAccount: {
|
|
1274
|
+
beneficiaryId: string;
|
|
1275
|
+
};
|
|
1276
|
+
} | {
|
|
1277
|
+
delegatePlaceholder: {};
|
|
1278
|
+
} | {
|
|
1279
|
+
deployGlobalContract: {
|
|
1280
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
1281
|
+
deployMode: {
|
|
1282
|
+
CodeHash: {};
|
|
1283
|
+
} | {
|
|
1284
|
+
AccountId: {};
|
|
1285
|
+
};
|
|
1286
|
+
};
|
|
1287
|
+
} | {
|
|
1288
|
+
useGlobalContract: {
|
|
1289
|
+
contractIdentifier: {
|
|
1290
|
+
CodeHash: number[];
|
|
1291
|
+
} | {
|
|
1292
|
+
AccountId: string;
|
|
1293
|
+
};
|
|
1294
|
+
};
|
|
1295
|
+
} | {
|
|
1296
|
+
deterministicStateInit: {
|
|
1297
|
+
stateInit: {
|
|
1298
|
+
V1: {
|
|
1299
|
+
code: {
|
|
1300
|
+
CodeHash: number[];
|
|
1301
|
+
} | {
|
|
1302
|
+
AccountId: string;
|
|
1303
|
+
};
|
|
1304
|
+
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
1305
|
+
};
|
|
1306
|
+
};
|
|
1307
|
+
deposit: bigint;
|
|
1308
|
+
};
|
|
1309
|
+
} | {
|
|
1310
|
+
transferToGasKey: {
|
|
1311
|
+
publicKey: {
|
|
1312
|
+
ed25519Key: {
|
|
1313
|
+
data: number[];
|
|
1314
|
+
};
|
|
1315
|
+
} | {
|
|
1316
|
+
secp256k1Key: {
|
|
1317
|
+
data: number[];
|
|
1318
|
+
};
|
|
1319
|
+
} | {
|
|
1320
|
+
mlDsa65Key: {
|
|
1321
|
+
data: number[];
|
|
1322
|
+
};
|
|
1323
|
+
};
|
|
1324
|
+
deposit: bigint;
|
|
1325
|
+
};
|
|
1326
|
+
} | {
|
|
1327
|
+
withdrawFromGasKey: {
|
|
1328
|
+
publicKey: {
|
|
1329
|
+
ed25519Key: {
|
|
1330
|
+
data: number[];
|
|
1331
|
+
};
|
|
1332
|
+
} | {
|
|
1333
|
+
secp256k1Key: {
|
|
1334
|
+
data: number[];
|
|
1335
|
+
};
|
|
1336
|
+
} | {
|
|
1337
|
+
mlDsa65Key: {
|
|
1338
|
+
data: number[];
|
|
1339
|
+
};
|
|
1340
|
+
};
|
|
1341
|
+
amount: bigint;
|
|
1342
|
+
};
|
|
1343
|
+
})[];
|
|
1344
|
+
nonce: {
|
|
1345
|
+
nonce: {
|
|
1346
|
+
nonce: bigint;
|
|
1347
|
+
};
|
|
1348
|
+
} | {
|
|
1349
|
+
gasKeyNonce: {
|
|
1350
|
+
nonce: bigint;
|
|
1351
|
+
nonceIndex: number;
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
maxBlockHeight: bigint;
|
|
1355
|
+
publicKey: {
|
|
1356
|
+
ed25519Key: {
|
|
1357
|
+
data: number[];
|
|
1358
|
+
};
|
|
1359
|
+
} | {
|
|
1360
|
+
secp256k1Key: {
|
|
1361
|
+
data: number[];
|
|
1362
|
+
};
|
|
1363
|
+
} | {
|
|
1364
|
+
mlDsa65Key: {
|
|
1365
|
+
data: number[];
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
signature: {
|
|
1371
|
+
ed25519Signature: {
|
|
1372
|
+
data: number[];
|
|
1373
|
+
};
|
|
1374
|
+
} | {
|
|
1375
|
+
secp256k1Signature: {
|
|
1376
|
+
data: number[];
|
|
1377
|
+
};
|
|
1378
|
+
} | {
|
|
1379
|
+
mlDsa65Signature: {
|
|
1380
|
+
data: number[];
|
|
1381
|
+
};
|
|
1382
|
+
};
|
|
1383
|
+
}, string>;
|
|
1384
|
+
/**
|
|
1385
|
+
* Actions allowed inside a DelegateActionV2. Excludes the
|
|
1386
|
+
* `delegatePlaceholder` (discriminant-alignment-only) variant so callers cannot
|
|
1387
|
+
* construct a nested delegate action.
|
|
1388
|
+
*/
|
|
1389
|
+
export type NonDelegateActionBorsh = Exclude<b.infer<typeof NonDelegateActionSchema>, {
|
|
1390
|
+
delegatePlaceholder: unknown;
|
|
1391
|
+
}>;
|
|
1392
|
+
export type DelegateActionV2Borsh = b.infer<typeof DelegateActionV2Schema>;
|
|
1393
|
+
export type VersionedSignedDelegateActionBorsh = b.infer<typeof VersionedSignedDelegateActionSchema>;
|
|
1394
|
+
/**
|
|
1395
|
+
* Action enum matching NEAR protocol action discriminants
|
|
1396
|
+
* Order matters! Each position corresponds to the action type index:
|
|
1397
|
+
* 0 = CreateAccount
|
|
1398
|
+
* 1 = DeployContract
|
|
1399
|
+
* 2 = FunctionCall
|
|
1400
|
+
* 3 = Transfer
|
|
1401
|
+
* 4 = Stake
|
|
1402
|
+
* 5 = AddKey
|
|
1403
|
+
* 6 = DeleteKey
|
|
1404
|
+
* 7 = DeleteAccount
|
|
1405
|
+
* 8 = SignedDelegate
|
|
1406
|
+
* 9 = DeployGlobalContract
|
|
1407
|
+
* 10 = UseGlobalContract
|
|
1408
|
+
* 11 = DeterministicStateInit (NEP-616)
|
|
1409
|
+
* 12 = TransferToGasKey (protocol v85 / NEAR 2.13)
|
|
1410
|
+
* 13 = WithdrawFromGasKey (protocol v85 / NEAR 2.13)
|
|
1411
|
+
* 14 = DelegateV2 (protocol v85 / NEAR 2.13)
|
|
1412
|
+
*/
|
|
1413
|
+
export declare const ActionSchema: import("@zorsh/zorsh").Schema<{
|
|
1414
|
+
stake: {
|
|
1415
|
+
stake: bigint;
|
|
1416
|
+
publicKey: {
|
|
1417
|
+
ed25519Key: {
|
|
1418
|
+
data: number[];
|
|
1419
|
+
};
|
|
1420
|
+
} | {
|
|
1421
|
+
secp256k1Key: {
|
|
1422
|
+
data: number[];
|
|
1423
|
+
};
|
|
1424
|
+
} | {
|
|
1425
|
+
mlDsa65Key: {
|
|
1426
|
+
data: number[];
|
|
1427
|
+
};
|
|
1428
|
+
};
|
|
1429
|
+
};
|
|
1430
|
+
} | {
|
|
1431
|
+
createAccount: {};
|
|
1432
|
+
} | {
|
|
1433
|
+
deployContract: {
|
|
1434
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
1435
|
+
};
|
|
1436
|
+
} | {
|
|
1437
|
+
functionCall: {
|
|
1438
|
+
methodName: string;
|
|
1439
|
+
args: Uint8Array<ArrayBufferLike>;
|
|
1440
|
+
gas: bigint;
|
|
1441
|
+
deposit: bigint;
|
|
1442
|
+
};
|
|
1443
|
+
} | {
|
|
1444
|
+
transfer: {
|
|
1445
|
+
deposit: bigint;
|
|
1446
|
+
};
|
|
1447
|
+
} | {
|
|
1448
|
+
addKey: {
|
|
1449
|
+
publicKey: {
|
|
1450
|
+
ed25519Key: {
|
|
1451
|
+
data: number[];
|
|
1452
|
+
};
|
|
1453
|
+
} | {
|
|
1454
|
+
secp256k1Key: {
|
|
1455
|
+
data: number[];
|
|
1456
|
+
};
|
|
1457
|
+
} | {
|
|
1458
|
+
mlDsa65Key: {
|
|
1459
|
+
data: number[];
|
|
1460
|
+
};
|
|
1461
|
+
};
|
|
1462
|
+
accessKey: {
|
|
1463
|
+
nonce: bigint;
|
|
1464
|
+
permission: {
|
|
1465
|
+
functionCall: {
|
|
1466
|
+
allowance: bigint | null;
|
|
1467
|
+
receiverId: string;
|
|
1468
|
+
methodNames: string[];
|
|
1469
|
+
};
|
|
1470
|
+
} | {
|
|
1471
|
+
fullAccess: {};
|
|
1472
|
+
} | {
|
|
1473
|
+
gasKeyFunctionCall: {
|
|
1474
|
+
gasKeyInfo: {
|
|
1475
|
+
balance: bigint;
|
|
1476
|
+
numNonces: number;
|
|
1477
|
+
};
|
|
1478
|
+
functionCall: {
|
|
1479
|
+
allowance: bigint | null;
|
|
1480
|
+
receiverId: string;
|
|
1481
|
+
methodNames: string[];
|
|
1482
|
+
};
|
|
1483
|
+
};
|
|
1484
|
+
} | {
|
|
1485
|
+
gasKeyFullAccess: {
|
|
1486
|
+
gasKeyInfo: {
|
|
1487
|
+
balance: bigint;
|
|
1488
|
+
numNonces: number;
|
|
1489
|
+
};
|
|
1490
|
+
};
|
|
1491
|
+
};
|
|
1492
|
+
};
|
|
1493
|
+
};
|
|
1494
|
+
} | {
|
|
1495
|
+
deleteKey: {
|
|
1496
|
+
publicKey: {
|
|
1497
|
+
ed25519Key: {
|
|
1498
|
+
data: number[];
|
|
1499
|
+
};
|
|
1500
|
+
} | {
|
|
1501
|
+
secp256k1Key: {
|
|
1502
|
+
data: number[];
|
|
1503
|
+
};
|
|
1504
|
+
} | {
|
|
1505
|
+
mlDsa65Key: {
|
|
1506
|
+
data: number[];
|
|
1507
|
+
};
|
|
1508
|
+
};
|
|
1509
|
+
};
|
|
1510
|
+
} | {
|
|
1511
|
+
deleteAccount: {
|
|
1512
|
+
beneficiaryId: string;
|
|
1513
|
+
};
|
|
1514
|
+
} | {
|
|
1515
|
+
deployGlobalContract: {
|
|
1516
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
1517
|
+
deployMode: {
|
|
1518
|
+
CodeHash: {};
|
|
1519
|
+
} | {
|
|
1520
|
+
AccountId: {};
|
|
1521
|
+
};
|
|
1522
|
+
};
|
|
1523
|
+
} | {
|
|
1524
|
+
useGlobalContract: {
|
|
1525
|
+
contractIdentifier: {
|
|
1526
|
+
CodeHash: number[];
|
|
1527
|
+
} | {
|
|
1528
|
+
AccountId: string;
|
|
1529
|
+
};
|
|
1530
|
+
};
|
|
1531
|
+
} | {
|
|
1532
|
+
deterministicStateInit: {
|
|
1533
|
+
stateInit: {
|
|
1534
|
+
V1: {
|
|
1535
|
+
code: {
|
|
1536
|
+
CodeHash: number[];
|
|
1537
|
+
} | {
|
|
1538
|
+
AccountId: string;
|
|
1539
|
+
};
|
|
1540
|
+
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
1541
|
+
};
|
|
1542
|
+
};
|
|
1543
|
+
deposit: bigint;
|
|
1544
|
+
};
|
|
1545
|
+
} | {
|
|
1546
|
+
transferToGasKey: {
|
|
1547
|
+
publicKey: {
|
|
1548
|
+
ed25519Key: {
|
|
1549
|
+
data: number[];
|
|
1550
|
+
};
|
|
1551
|
+
} | {
|
|
1552
|
+
secp256k1Key: {
|
|
1553
|
+
data: number[];
|
|
1554
|
+
};
|
|
1555
|
+
} | {
|
|
1556
|
+
mlDsa65Key: {
|
|
1557
|
+
data: number[];
|
|
1558
|
+
};
|
|
1559
|
+
};
|
|
1560
|
+
deposit: bigint;
|
|
1561
|
+
};
|
|
1562
|
+
} | {
|
|
1563
|
+
withdrawFromGasKey: {
|
|
1564
|
+
publicKey: {
|
|
1565
|
+
ed25519Key: {
|
|
1566
|
+
data: number[];
|
|
1567
|
+
};
|
|
1568
|
+
} | {
|
|
1569
|
+
secp256k1Key: {
|
|
1570
|
+
data: number[];
|
|
1571
|
+
};
|
|
1572
|
+
} | {
|
|
1573
|
+
mlDsa65Key: {
|
|
1574
|
+
data: number[];
|
|
1575
|
+
};
|
|
1576
|
+
};
|
|
1577
|
+
amount: bigint;
|
|
1578
|
+
};
|
|
1579
|
+
} | {
|
|
1580
|
+
signedDelegate: {
|
|
1581
|
+
delegateAction: {
|
|
1582
|
+
senderId: string;
|
|
1583
|
+
receiverId: string;
|
|
1584
|
+
actions: ({
|
|
1585
|
+
stake: {
|
|
1586
|
+
stake: bigint;
|
|
1587
|
+
publicKey: {
|
|
1588
|
+
ed25519Key: {
|
|
1589
|
+
data: number[];
|
|
1590
|
+
};
|
|
1591
|
+
} | {
|
|
1592
|
+
secp256k1Key: {
|
|
1593
|
+
data: number[];
|
|
1594
|
+
};
|
|
1595
|
+
} | {
|
|
1596
|
+
mlDsa65Key: {
|
|
1597
|
+
data: number[];
|
|
1598
|
+
};
|
|
1599
|
+
};
|
|
1600
|
+
};
|
|
1601
|
+
} | {
|
|
1602
|
+
createAccount: {};
|
|
1603
|
+
} | {
|
|
1604
|
+
deployContract: {
|
|
1605
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
1606
|
+
};
|
|
1607
|
+
} | {
|
|
1608
|
+
functionCall: {
|
|
1609
|
+
methodName: string;
|
|
1610
|
+
args: Uint8Array<ArrayBufferLike>;
|
|
1611
|
+
gas: bigint;
|
|
1612
|
+
deposit: bigint;
|
|
1613
|
+
};
|
|
1614
|
+
} | {
|
|
1615
|
+
transfer: {
|
|
1616
|
+
deposit: bigint;
|
|
1617
|
+
};
|
|
1618
|
+
} | {
|
|
1619
|
+
addKey: {
|
|
1620
|
+
publicKey: {
|
|
1621
|
+
ed25519Key: {
|
|
1622
|
+
data: number[];
|
|
1623
|
+
};
|
|
1624
|
+
} | {
|
|
1625
|
+
secp256k1Key: {
|
|
1626
|
+
data: number[];
|
|
1627
|
+
};
|
|
1628
|
+
} | {
|
|
1629
|
+
mlDsa65Key: {
|
|
1630
|
+
data: number[];
|
|
1631
|
+
};
|
|
1632
|
+
};
|
|
1633
|
+
accessKey: {
|
|
1634
|
+
nonce: bigint;
|
|
1635
|
+
permission: {
|
|
1636
|
+
functionCall: {
|
|
1637
|
+
allowance: bigint | null;
|
|
1638
|
+
receiverId: string;
|
|
1639
|
+
methodNames: string[];
|
|
1640
|
+
};
|
|
1641
|
+
} | {
|
|
1642
|
+
fullAccess: {};
|
|
1643
|
+
} | {
|
|
1644
|
+
gasKeyFunctionCall: {
|
|
1645
|
+
gasKeyInfo: {
|
|
1646
|
+
balance: bigint;
|
|
1647
|
+
numNonces: number;
|
|
1648
|
+
};
|
|
1649
|
+
functionCall: {
|
|
1650
|
+
allowance: bigint | null;
|
|
1651
|
+
receiverId: string;
|
|
1652
|
+
methodNames: string[];
|
|
1653
|
+
};
|
|
1654
|
+
};
|
|
1655
|
+
} | {
|
|
1656
|
+
gasKeyFullAccess: {
|
|
1657
|
+
gasKeyInfo: {
|
|
1658
|
+
balance: bigint;
|
|
1659
|
+
numNonces: number;
|
|
1660
|
+
};
|
|
1661
|
+
};
|
|
1662
|
+
};
|
|
1663
|
+
};
|
|
1664
|
+
};
|
|
1665
|
+
} | {
|
|
1666
|
+
deleteKey: {
|
|
1667
|
+
publicKey: {
|
|
1668
|
+
ed25519Key: {
|
|
1669
|
+
data: number[];
|
|
1670
|
+
};
|
|
1671
|
+
} | {
|
|
1672
|
+
secp256k1Key: {
|
|
1673
|
+
data: number[];
|
|
1674
|
+
};
|
|
1675
|
+
} | {
|
|
1676
|
+
mlDsa65Key: {
|
|
1677
|
+
data: number[];
|
|
1678
|
+
};
|
|
1679
|
+
};
|
|
1680
|
+
};
|
|
1681
|
+
} | {
|
|
1682
|
+
deleteAccount: {
|
|
1683
|
+
beneficiaryId: string;
|
|
1684
|
+
};
|
|
1685
|
+
} | {
|
|
1686
|
+
delegatePlaceholder: {};
|
|
1687
|
+
} | {
|
|
1688
|
+
deployGlobalContract: {
|
|
1689
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
1690
|
+
deployMode: {
|
|
1691
|
+
CodeHash: {};
|
|
1692
|
+
} | {
|
|
1693
|
+
AccountId: {};
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
} | {
|
|
1697
|
+
useGlobalContract: {
|
|
1698
|
+
contractIdentifier: {
|
|
1699
|
+
CodeHash: number[];
|
|
1700
|
+
} | {
|
|
1701
|
+
AccountId: string;
|
|
1702
|
+
};
|
|
1703
|
+
};
|
|
1704
|
+
} | {
|
|
1705
|
+
deterministicStateInit: {
|
|
1706
|
+
stateInit: {
|
|
1707
|
+
V1: {
|
|
1708
|
+
code: {
|
|
1709
|
+
CodeHash: number[];
|
|
1710
|
+
} | {
|
|
1711
|
+
AccountId: string;
|
|
1712
|
+
};
|
|
1713
|
+
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
1714
|
+
};
|
|
1715
|
+
};
|
|
1716
|
+
deposit: bigint;
|
|
1717
|
+
};
|
|
1718
|
+
} | {
|
|
1719
|
+
transferToGasKey: {
|
|
1720
|
+
publicKey: {
|
|
1721
|
+
ed25519Key: {
|
|
1722
|
+
data: number[];
|
|
1723
|
+
};
|
|
1724
|
+
} | {
|
|
1725
|
+
secp256k1Key: {
|
|
1726
|
+
data: number[];
|
|
1727
|
+
};
|
|
1728
|
+
} | {
|
|
1729
|
+
mlDsa65Key: {
|
|
1730
|
+
data: number[];
|
|
1731
|
+
};
|
|
1732
|
+
};
|
|
1733
|
+
deposit: bigint;
|
|
1734
|
+
};
|
|
1735
|
+
} | {
|
|
1736
|
+
withdrawFromGasKey: {
|
|
1737
|
+
publicKey: {
|
|
1738
|
+
ed25519Key: {
|
|
1739
|
+
data: number[];
|
|
1740
|
+
};
|
|
1741
|
+
} | {
|
|
1742
|
+
secp256k1Key: {
|
|
1743
|
+
data: number[];
|
|
1744
|
+
};
|
|
1745
|
+
} | {
|
|
1746
|
+
mlDsa65Key: {
|
|
1747
|
+
data: number[];
|
|
1748
|
+
};
|
|
1749
|
+
};
|
|
1750
|
+
amount: bigint;
|
|
1751
|
+
};
|
|
1752
|
+
})[];
|
|
1753
|
+
nonce: bigint;
|
|
1754
|
+
maxBlockHeight: bigint;
|
|
1755
|
+
publicKey: {
|
|
1756
|
+
ed25519Key: {
|
|
1757
|
+
data: number[];
|
|
1758
|
+
};
|
|
1759
|
+
} | {
|
|
1760
|
+
secp256k1Key: {
|
|
1761
|
+
data: number[];
|
|
1762
|
+
};
|
|
1763
|
+
} | {
|
|
1764
|
+
mlDsa65Key: {
|
|
1765
|
+
data: number[];
|
|
1766
|
+
};
|
|
1767
|
+
};
|
|
1768
|
+
};
|
|
1769
|
+
signature: {
|
|
1770
|
+
ed25519Signature: {
|
|
1771
|
+
data: number[];
|
|
1772
|
+
};
|
|
1773
|
+
} | {
|
|
1774
|
+
secp256k1Signature: {
|
|
1775
|
+
data: number[];
|
|
1776
|
+
};
|
|
1777
|
+
} | {
|
|
1778
|
+
mlDsa65Signature: {
|
|
1779
|
+
data: number[];
|
|
1780
|
+
};
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
} | {
|
|
1784
|
+
delegateV2: {
|
|
1785
|
+
delegateAction: {
|
|
1786
|
+
v2: {
|
|
1787
|
+
senderId: string;
|
|
1788
|
+
receiverId: string;
|
|
1789
|
+
actions: ({
|
|
1790
|
+
stake: {
|
|
1791
|
+
stake: bigint;
|
|
1792
|
+
publicKey: {
|
|
1793
|
+
ed25519Key: {
|
|
1794
|
+
data: number[];
|
|
1795
|
+
};
|
|
1796
|
+
} | {
|
|
1797
|
+
secp256k1Key: {
|
|
1798
|
+
data: number[];
|
|
1799
|
+
};
|
|
1800
|
+
} | {
|
|
1801
|
+
mlDsa65Key: {
|
|
1802
|
+
data: number[];
|
|
1803
|
+
};
|
|
1804
|
+
};
|
|
1805
|
+
};
|
|
1806
|
+
} | {
|
|
1807
|
+
createAccount: {};
|
|
1808
|
+
} | {
|
|
1809
|
+
deployContract: {
|
|
1810
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
1811
|
+
};
|
|
1812
|
+
} | {
|
|
1813
|
+
functionCall: {
|
|
1814
|
+
methodName: string;
|
|
1815
|
+
args: Uint8Array<ArrayBufferLike>;
|
|
1816
|
+
gas: bigint;
|
|
1817
|
+
deposit: bigint;
|
|
1818
|
+
};
|
|
1819
|
+
} | {
|
|
1820
|
+
transfer: {
|
|
1821
|
+
deposit: bigint;
|
|
1822
|
+
};
|
|
1823
|
+
} | {
|
|
1824
|
+
addKey: {
|
|
1825
|
+
publicKey: {
|
|
1826
|
+
ed25519Key: {
|
|
1827
|
+
data: number[];
|
|
1828
|
+
};
|
|
1829
|
+
} | {
|
|
1830
|
+
secp256k1Key: {
|
|
1831
|
+
data: number[];
|
|
1832
|
+
};
|
|
1833
|
+
} | {
|
|
1834
|
+
mlDsa65Key: {
|
|
1835
|
+
data: number[];
|
|
1836
|
+
};
|
|
1837
|
+
};
|
|
1838
|
+
accessKey: {
|
|
1839
|
+
nonce: bigint;
|
|
1840
|
+
permission: {
|
|
1841
|
+
functionCall: {
|
|
1842
|
+
allowance: bigint | null;
|
|
1843
|
+
receiverId: string;
|
|
1844
|
+
methodNames: string[];
|
|
1845
|
+
};
|
|
1846
|
+
} | {
|
|
1847
|
+
fullAccess: {};
|
|
1848
|
+
} | {
|
|
1849
|
+
gasKeyFunctionCall: {
|
|
1850
|
+
gasKeyInfo: {
|
|
1851
|
+
balance: bigint;
|
|
1852
|
+
numNonces: number;
|
|
1853
|
+
};
|
|
1854
|
+
functionCall: {
|
|
1855
|
+
allowance: bigint | null;
|
|
1856
|
+
receiverId: string;
|
|
1857
|
+
methodNames: string[];
|
|
1858
|
+
};
|
|
1859
|
+
};
|
|
1860
|
+
} | {
|
|
1861
|
+
gasKeyFullAccess: {
|
|
1862
|
+
gasKeyInfo: {
|
|
1863
|
+
balance: bigint;
|
|
1864
|
+
numNonces: number;
|
|
1865
|
+
};
|
|
1866
|
+
};
|
|
1867
|
+
};
|
|
1868
|
+
};
|
|
1869
|
+
};
|
|
1870
|
+
} | {
|
|
1871
|
+
deleteKey: {
|
|
1872
|
+
publicKey: {
|
|
1873
|
+
ed25519Key: {
|
|
1874
|
+
data: number[];
|
|
1875
|
+
};
|
|
1876
|
+
} | {
|
|
1877
|
+
secp256k1Key: {
|
|
1878
|
+
data: number[];
|
|
1879
|
+
};
|
|
1880
|
+
} | {
|
|
1881
|
+
mlDsa65Key: {
|
|
1882
|
+
data: number[];
|
|
1883
|
+
};
|
|
1884
|
+
};
|
|
1885
|
+
};
|
|
1886
|
+
} | {
|
|
1887
|
+
deleteAccount: {
|
|
1888
|
+
beneficiaryId: string;
|
|
1889
|
+
};
|
|
1890
|
+
} | {
|
|
1891
|
+
delegatePlaceholder: {};
|
|
1892
|
+
} | {
|
|
1893
|
+
deployGlobalContract: {
|
|
1894
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
1895
|
+
deployMode: {
|
|
1896
|
+
CodeHash: {};
|
|
1897
|
+
} | {
|
|
1898
|
+
AccountId: {};
|
|
1899
|
+
};
|
|
1900
|
+
};
|
|
1901
|
+
} | {
|
|
1902
|
+
useGlobalContract: {
|
|
1903
|
+
contractIdentifier: {
|
|
1904
|
+
CodeHash: number[];
|
|
1905
|
+
} | {
|
|
1906
|
+
AccountId: string;
|
|
1907
|
+
};
|
|
1908
|
+
};
|
|
1909
|
+
} | {
|
|
1910
|
+
deterministicStateInit: {
|
|
1911
|
+
stateInit: {
|
|
1912
|
+
V1: {
|
|
1913
|
+
code: {
|
|
1914
|
+
CodeHash: number[];
|
|
1915
|
+
} | {
|
|
1916
|
+
AccountId: string;
|
|
1917
|
+
};
|
|
1918
|
+
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
1919
|
+
};
|
|
1920
|
+
};
|
|
1921
|
+
deposit: bigint;
|
|
1922
|
+
};
|
|
1923
|
+
} | {
|
|
1924
|
+
transferToGasKey: {
|
|
1925
|
+
publicKey: {
|
|
1926
|
+
ed25519Key: {
|
|
1927
|
+
data: number[];
|
|
1928
|
+
};
|
|
1929
|
+
} | {
|
|
1930
|
+
secp256k1Key: {
|
|
1931
|
+
data: number[];
|
|
1932
|
+
};
|
|
1933
|
+
} | {
|
|
1934
|
+
mlDsa65Key: {
|
|
1935
|
+
data: number[];
|
|
1936
|
+
};
|
|
1937
|
+
};
|
|
1938
|
+
deposit: bigint;
|
|
1939
|
+
};
|
|
1940
|
+
} | {
|
|
1941
|
+
withdrawFromGasKey: {
|
|
1942
|
+
publicKey: {
|
|
1943
|
+
ed25519Key: {
|
|
1944
|
+
data: number[];
|
|
1945
|
+
};
|
|
1946
|
+
} | {
|
|
1947
|
+
secp256k1Key: {
|
|
1948
|
+
data: number[];
|
|
1949
|
+
};
|
|
1950
|
+
} | {
|
|
1951
|
+
mlDsa65Key: {
|
|
1952
|
+
data: number[];
|
|
1953
|
+
};
|
|
1954
|
+
};
|
|
1955
|
+
amount: bigint;
|
|
1956
|
+
};
|
|
1957
|
+
})[];
|
|
1958
|
+
nonce: {
|
|
1959
|
+
nonce: {
|
|
1960
|
+
nonce: bigint;
|
|
1961
|
+
};
|
|
1962
|
+
} | {
|
|
1963
|
+
gasKeyNonce: {
|
|
1964
|
+
nonce: bigint;
|
|
1965
|
+
nonceIndex: number;
|
|
1966
|
+
};
|
|
1967
|
+
};
|
|
1968
|
+
maxBlockHeight: bigint;
|
|
1969
|
+
publicKey: {
|
|
1970
|
+
ed25519Key: {
|
|
1971
|
+
data: number[];
|
|
1972
|
+
};
|
|
1973
|
+
} | {
|
|
1974
|
+
secp256k1Key: {
|
|
1975
|
+
data: number[];
|
|
1976
|
+
};
|
|
1977
|
+
} | {
|
|
1978
|
+
mlDsa65Key: {
|
|
1979
|
+
data: number[];
|
|
1980
|
+
};
|
|
1981
|
+
};
|
|
1982
|
+
};
|
|
1983
|
+
};
|
|
1984
|
+
signature: {
|
|
1985
|
+
ed25519Signature: {
|
|
1986
|
+
data: number[];
|
|
1987
|
+
};
|
|
1988
|
+
} | {
|
|
1989
|
+
secp256k1Signature: {
|
|
1990
|
+
data: number[];
|
|
1991
|
+
};
|
|
1992
|
+
} | {
|
|
1993
|
+
mlDsa65Signature: {
|
|
1994
|
+
data: number[];
|
|
1995
|
+
};
|
|
1996
|
+
};
|
|
1997
|
+
};
|
|
1998
|
+
}, string>;
|
|
1999
|
+
/**
|
|
2000
|
+
* Action type inferred from the Borsh schema
|
|
2001
|
+
* This is the single source of truth for action types
|
|
2002
|
+
*/
|
|
2003
|
+
export type Action = b.infer<typeof ActionSchema>;
|
|
2004
|
+
export type TransferAction = {
|
|
2005
|
+
transfer: b.infer<typeof TransferSchema>;
|
|
2006
|
+
};
|
|
2007
|
+
export type FunctionCallAction = {
|
|
2008
|
+
functionCall: b.infer<typeof FunctionCallSchema>;
|
|
2009
|
+
};
|
|
2010
|
+
export type CreateAccountAction = {
|
|
2011
|
+
createAccount: b.infer<typeof CreateAccountSchema>;
|
|
2012
|
+
};
|
|
2013
|
+
export type DeleteAccountAction = {
|
|
2014
|
+
deleteAccount: b.infer<typeof DeleteAccountSchema>;
|
|
2015
|
+
};
|
|
2016
|
+
export type DeployContractAction = {
|
|
2017
|
+
deployContract: b.infer<typeof DeployContractSchema>;
|
|
2018
|
+
};
|
|
2019
|
+
export type StakeAction = {
|
|
2020
|
+
stake: b.infer<typeof StakeSchema>;
|
|
2021
|
+
};
|
|
2022
|
+
export type AddKeyAction = {
|
|
2023
|
+
addKey: b.infer<typeof AddKeySchema>;
|
|
2024
|
+
};
|
|
2025
|
+
export type DeleteKeyAction = {
|
|
2026
|
+
deleteKey: b.infer<typeof DeleteKeySchema>;
|
|
2027
|
+
};
|
|
2028
|
+
export type DeployGlobalContractAction = {
|
|
2029
|
+
deployGlobalContract: b.infer<typeof DeployGlobalContractSchema>;
|
|
2030
|
+
};
|
|
2031
|
+
export type UseGlobalContractAction = {
|
|
2032
|
+
useGlobalContract: b.infer<typeof UseGlobalContractSchema>;
|
|
2033
|
+
};
|
|
2034
|
+
export type SignedDelegateAction = {
|
|
2035
|
+
signedDelegate: b.infer<typeof SignedDelegateSchema>;
|
|
2036
|
+
};
|
|
2037
|
+
export type DeterministicStateInitAction = {
|
|
2038
|
+
deterministicStateInit: b.infer<typeof DeterministicStateInitSchema>;
|
|
2039
|
+
};
|
|
2040
|
+
export type TransferToGasKeyAction = {
|
|
2041
|
+
transferToGasKey: b.infer<typeof TransferToGasKeySchema>;
|
|
2042
|
+
};
|
|
2043
|
+
export type WithdrawFromGasKeyAction = {
|
|
2044
|
+
withdrawFromGasKey: b.infer<typeof WithdrawFromGasKeySchema>;
|
|
2045
|
+
};
|
|
2046
|
+
export type DelegateV2Action = {
|
|
2047
|
+
delegateV2: b.infer<typeof VersionedSignedDelegateActionSchema>;
|
|
2048
|
+
};
|
|
2049
|
+
export type StateInit = b.infer<typeof DeterministicAccountStateInitSchema>;
|
|
2050
|
+
export type StateInitV1 = b.infer<typeof DeterministicAccountStateInitV1Schema>;
|
|
2051
|
+
export { DeterministicAccountStateInitSchema, DeterministicAccountStateInitV1Schema, };
|
|
2052
|
+
/**
|
|
2053
|
+
* Transaction schema
|
|
2054
|
+
* Field order: signerId, publicKey, nonce, receiverId, blockHash, actions
|
|
2055
|
+
*/
|
|
2056
|
+
export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
2057
|
+
signerId: string;
|
|
2058
|
+
publicKey: {
|
|
2059
|
+
ed25519Key: {
|
|
2060
|
+
data: number[];
|
|
2061
|
+
};
|
|
2062
|
+
} | {
|
|
2063
|
+
secp256k1Key: {
|
|
2064
|
+
data: number[];
|
|
2065
|
+
};
|
|
2066
|
+
} | {
|
|
2067
|
+
mlDsa65Key: {
|
|
2068
|
+
data: number[];
|
|
2069
|
+
};
|
|
2070
|
+
};
|
|
2071
|
+
nonce: bigint;
|
|
2072
|
+
receiverId: string;
|
|
2073
|
+
blockHash: number[];
|
|
2074
|
+
actions: ({
|
|
2075
|
+
stake: {
|
|
2076
|
+
stake: bigint;
|
|
2077
|
+
publicKey: {
|
|
2078
|
+
ed25519Key: {
|
|
2079
|
+
data: number[];
|
|
2080
|
+
};
|
|
2081
|
+
} | {
|
|
2082
|
+
secp256k1Key: {
|
|
2083
|
+
data: number[];
|
|
2084
|
+
};
|
|
2085
|
+
} | {
|
|
2086
|
+
mlDsa65Key: {
|
|
2087
|
+
data: number[];
|
|
2088
|
+
};
|
|
2089
|
+
};
|
|
2090
|
+
};
|
|
2091
|
+
} | {
|
|
2092
|
+
createAccount: {};
|
|
2093
|
+
} | {
|
|
2094
|
+
deployContract: {
|
|
2095
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
2096
|
+
};
|
|
2097
|
+
} | {
|
|
2098
|
+
functionCall: {
|
|
2099
|
+
methodName: string;
|
|
2100
|
+
args: Uint8Array<ArrayBufferLike>;
|
|
2101
|
+
gas: bigint;
|
|
2102
|
+
deposit: bigint;
|
|
2103
|
+
};
|
|
2104
|
+
} | {
|
|
2105
|
+
transfer: {
|
|
2106
|
+
deposit: bigint;
|
|
2107
|
+
};
|
|
2108
|
+
} | {
|
|
2109
|
+
addKey: {
|
|
2110
|
+
publicKey: {
|
|
2111
|
+
ed25519Key: {
|
|
2112
|
+
data: number[];
|
|
2113
|
+
};
|
|
2114
|
+
} | {
|
|
2115
|
+
secp256k1Key: {
|
|
2116
|
+
data: number[];
|
|
2117
|
+
};
|
|
2118
|
+
} | {
|
|
2119
|
+
mlDsa65Key: {
|
|
2120
|
+
data: number[];
|
|
2121
|
+
};
|
|
2122
|
+
};
|
|
2123
|
+
accessKey: {
|
|
2124
|
+
nonce: bigint;
|
|
2125
|
+
permission: {
|
|
2126
|
+
functionCall: {
|
|
2127
|
+
allowance: bigint | null;
|
|
2128
|
+
receiverId: string;
|
|
2129
|
+
methodNames: string[];
|
|
2130
|
+
};
|
|
2131
|
+
} | {
|
|
2132
|
+
fullAccess: {};
|
|
2133
|
+
} | {
|
|
2134
|
+
gasKeyFunctionCall: {
|
|
2135
|
+
gasKeyInfo: {
|
|
2136
|
+
balance: bigint;
|
|
2137
|
+
numNonces: number;
|
|
2138
|
+
};
|
|
2139
|
+
functionCall: {
|
|
2140
|
+
allowance: bigint | null;
|
|
2141
|
+
receiverId: string;
|
|
2142
|
+
methodNames: string[];
|
|
2143
|
+
};
|
|
2144
|
+
};
|
|
2145
|
+
} | {
|
|
2146
|
+
gasKeyFullAccess: {
|
|
2147
|
+
gasKeyInfo: {
|
|
2148
|
+
balance: bigint;
|
|
2149
|
+
numNonces: number;
|
|
2150
|
+
};
|
|
2151
|
+
};
|
|
2152
|
+
};
|
|
2153
|
+
};
|
|
2154
|
+
};
|
|
2155
|
+
} | {
|
|
2156
|
+
deleteKey: {
|
|
2157
|
+
publicKey: {
|
|
2158
|
+
ed25519Key: {
|
|
2159
|
+
data: number[];
|
|
2160
|
+
};
|
|
2161
|
+
} | {
|
|
2162
|
+
secp256k1Key: {
|
|
2163
|
+
data: number[];
|
|
2164
|
+
};
|
|
2165
|
+
} | {
|
|
2166
|
+
mlDsa65Key: {
|
|
2167
|
+
data: number[];
|
|
2168
|
+
};
|
|
2169
|
+
};
|
|
2170
|
+
};
|
|
2171
|
+
} | {
|
|
2172
|
+
deleteAccount: {
|
|
2173
|
+
beneficiaryId: string;
|
|
2174
|
+
};
|
|
2175
|
+
} | {
|
|
2176
|
+
deployGlobalContract: {
|
|
2177
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
2178
|
+
deployMode: {
|
|
2179
|
+
CodeHash: {};
|
|
2180
|
+
} | {
|
|
2181
|
+
AccountId: {};
|
|
2182
|
+
};
|
|
2183
|
+
};
|
|
2184
|
+
} | {
|
|
2185
|
+
useGlobalContract: {
|
|
2186
|
+
contractIdentifier: {
|
|
2187
|
+
CodeHash: number[];
|
|
2188
|
+
} | {
|
|
2189
|
+
AccountId: string;
|
|
2190
|
+
};
|
|
2191
|
+
};
|
|
2192
|
+
} | {
|
|
2193
|
+
deterministicStateInit: {
|
|
2194
|
+
stateInit: {
|
|
2195
|
+
V1: {
|
|
2196
|
+
code: {
|
|
2197
|
+
CodeHash: number[];
|
|
2198
|
+
} | {
|
|
2199
|
+
AccountId: string;
|
|
2200
|
+
};
|
|
2201
|
+
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
2202
|
+
};
|
|
2203
|
+
};
|
|
2204
|
+
deposit: bigint;
|
|
2205
|
+
};
|
|
2206
|
+
} | {
|
|
2207
|
+
transferToGasKey: {
|
|
2208
|
+
publicKey: {
|
|
2209
|
+
ed25519Key: {
|
|
2210
|
+
data: number[];
|
|
2211
|
+
};
|
|
2212
|
+
} | {
|
|
2213
|
+
secp256k1Key: {
|
|
2214
|
+
data: number[];
|
|
2215
|
+
};
|
|
2216
|
+
} | {
|
|
2217
|
+
mlDsa65Key: {
|
|
2218
|
+
data: number[];
|
|
2219
|
+
};
|
|
2220
|
+
};
|
|
2221
|
+
deposit: bigint;
|
|
2222
|
+
};
|
|
2223
|
+
} | {
|
|
2224
|
+
withdrawFromGasKey: {
|
|
2225
|
+
publicKey: {
|
|
2226
|
+
ed25519Key: {
|
|
2227
|
+
data: number[];
|
|
2228
|
+
};
|
|
2229
|
+
} | {
|
|
2230
|
+
secp256k1Key: {
|
|
2231
|
+
data: number[];
|
|
2232
|
+
};
|
|
2233
|
+
} | {
|
|
2234
|
+
mlDsa65Key: {
|
|
2235
|
+
data: number[];
|
|
2236
|
+
};
|
|
2237
|
+
};
|
|
2238
|
+
amount: bigint;
|
|
2239
|
+
};
|
|
2240
|
+
} | {
|
|
2241
|
+
signedDelegate: {
|
|
2242
|
+
delegateAction: {
|
|
2243
|
+
senderId: string;
|
|
2244
|
+
receiverId: string;
|
|
2245
|
+
actions: ({
|
|
2246
|
+
stake: {
|
|
2247
|
+
stake: bigint;
|
|
2248
|
+
publicKey: {
|
|
2249
|
+
ed25519Key: {
|
|
2250
|
+
data: number[];
|
|
2251
|
+
};
|
|
2252
|
+
} | {
|
|
2253
|
+
secp256k1Key: {
|
|
2254
|
+
data: number[];
|
|
2255
|
+
};
|
|
2256
|
+
} | {
|
|
2257
|
+
mlDsa65Key: {
|
|
2258
|
+
data: number[];
|
|
2259
|
+
};
|
|
2260
|
+
};
|
|
2261
|
+
};
|
|
2262
|
+
} | {
|
|
2263
|
+
createAccount: {};
|
|
2264
|
+
} | {
|
|
2265
|
+
deployContract: {
|
|
2266
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
2267
|
+
};
|
|
2268
|
+
} | {
|
|
2269
|
+
functionCall: {
|
|
2270
|
+
methodName: string;
|
|
2271
|
+
args: Uint8Array<ArrayBufferLike>;
|
|
2272
|
+
gas: bigint;
|
|
2273
|
+
deposit: bigint;
|
|
2274
|
+
};
|
|
2275
|
+
} | {
|
|
2276
|
+
transfer: {
|
|
2277
|
+
deposit: bigint;
|
|
2278
|
+
};
|
|
2279
|
+
} | {
|
|
2280
|
+
addKey: {
|
|
2281
|
+
publicKey: {
|
|
2282
|
+
ed25519Key: {
|
|
2283
|
+
data: number[];
|
|
2284
|
+
};
|
|
2285
|
+
} | {
|
|
2286
|
+
secp256k1Key: {
|
|
2287
|
+
data: number[];
|
|
2288
|
+
};
|
|
2289
|
+
} | {
|
|
2290
|
+
mlDsa65Key: {
|
|
2291
|
+
data: number[];
|
|
2292
|
+
};
|
|
2293
|
+
};
|
|
2294
|
+
accessKey: {
|
|
2295
|
+
nonce: bigint;
|
|
2296
|
+
permission: {
|
|
2297
|
+
functionCall: {
|
|
2298
|
+
allowance: bigint | null;
|
|
2299
|
+
receiverId: string;
|
|
2300
|
+
methodNames: string[];
|
|
2301
|
+
};
|
|
2302
|
+
} | {
|
|
2303
|
+
fullAccess: {};
|
|
2304
|
+
} | {
|
|
2305
|
+
gasKeyFunctionCall: {
|
|
2306
|
+
gasKeyInfo: {
|
|
2307
|
+
balance: bigint;
|
|
2308
|
+
numNonces: number;
|
|
2309
|
+
};
|
|
2310
|
+
functionCall: {
|
|
2311
|
+
allowance: bigint | null;
|
|
2312
|
+
receiverId: string;
|
|
2313
|
+
methodNames: string[];
|
|
2314
|
+
};
|
|
2315
|
+
};
|
|
2316
|
+
} | {
|
|
2317
|
+
gasKeyFullAccess: {
|
|
2318
|
+
gasKeyInfo: {
|
|
2319
|
+
balance: bigint;
|
|
2320
|
+
numNonces: number;
|
|
2321
|
+
};
|
|
2322
|
+
};
|
|
2323
|
+
};
|
|
2324
|
+
};
|
|
2325
|
+
};
|
|
2326
|
+
} | {
|
|
2327
|
+
deleteKey: {
|
|
2328
|
+
publicKey: {
|
|
2329
|
+
ed25519Key: {
|
|
2330
|
+
data: number[];
|
|
2331
|
+
};
|
|
2332
|
+
} | {
|
|
2333
|
+
secp256k1Key: {
|
|
2334
|
+
data: number[];
|
|
2335
|
+
};
|
|
2336
|
+
} | {
|
|
2337
|
+
mlDsa65Key: {
|
|
2338
|
+
data: number[];
|
|
2339
|
+
};
|
|
2340
|
+
};
|
|
2341
|
+
};
|
|
2342
|
+
} | {
|
|
2343
|
+
deleteAccount: {
|
|
2344
|
+
beneficiaryId: string;
|
|
2345
|
+
};
|
|
2346
|
+
} | {
|
|
2347
|
+
delegatePlaceholder: {};
|
|
2348
|
+
} | {
|
|
2349
|
+
deployGlobalContract: {
|
|
2350
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
2351
|
+
deployMode: {
|
|
2352
|
+
CodeHash: {};
|
|
2353
|
+
} | {
|
|
2354
|
+
AccountId: {};
|
|
2355
|
+
};
|
|
2356
|
+
};
|
|
2357
|
+
} | {
|
|
2358
|
+
useGlobalContract: {
|
|
2359
|
+
contractIdentifier: {
|
|
2360
|
+
CodeHash: number[];
|
|
2361
|
+
} | {
|
|
2362
|
+
AccountId: string;
|
|
2363
|
+
};
|
|
2364
|
+
};
|
|
2365
|
+
} | {
|
|
2366
|
+
deterministicStateInit: {
|
|
2367
|
+
stateInit: {
|
|
2368
|
+
V1: {
|
|
2369
|
+
code: {
|
|
2370
|
+
CodeHash: number[];
|
|
2371
|
+
} | {
|
|
2372
|
+
AccountId: string;
|
|
2373
|
+
};
|
|
2374
|
+
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
2375
|
+
};
|
|
2376
|
+
};
|
|
2377
|
+
deposit: bigint;
|
|
2378
|
+
};
|
|
2379
|
+
} | {
|
|
2380
|
+
transferToGasKey: {
|
|
2381
|
+
publicKey: {
|
|
2382
|
+
ed25519Key: {
|
|
2383
|
+
data: number[];
|
|
2384
|
+
};
|
|
2385
|
+
} | {
|
|
2386
|
+
secp256k1Key: {
|
|
2387
|
+
data: number[];
|
|
2388
|
+
};
|
|
2389
|
+
} | {
|
|
2390
|
+
mlDsa65Key: {
|
|
2391
|
+
data: number[];
|
|
2392
|
+
};
|
|
2393
|
+
};
|
|
2394
|
+
deposit: bigint;
|
|
2395
|
+
};
|
|
2396
|
+
} | {
|
|
2397
|
+
withdrawFromGasKey: {
|
|
2398
|
+
publicKey: {
|
|
2399
|
+
ed25519Key: {
|
|
2400
|
+
data: number[];
|
|
2401
|
+
};
|
|
2402
|
+
} | {
|
|
2403
|
+
secp256k1Key: {
|
|
2404
|
+
data: number[];
|
|
2405
|
+
};
|
|
2406
|
+
} | {
|
|
2407
|
+
mlDsa65Key: {
|
|
2408
|
+
data: number[];
|
|
2409
|
+
};
|
|
2410
|
+
};
|
|
2411
|
+
amount: bigint;
|
|
2412
|
+
};
|
|
2413
|
+
})[];
|
|
2414
|
+
nonce: bigint;
|
|
2415
|
+
maxBlockHeight: bigint;
|
|
2416
|
+
publicKey: {
|
|
2417
|
+
ed25519Key: {
|
|
2418
|
+
data: number[];
|
|
2419
|
+
};
|
|
2420
|
+
} | {
|
|
2421
|
+
secp256k1Key: {
|
|
2422
|
+
data: number[];
|
|
2423
|
+
};
|
|
2424
|
+
} | {
|
|
2425
|
+
mlDsa65Key: {
|
|
2426
|
+
data: number[];
|
|
2427
|
+
};
|
|
2428
|
+
};
|
|
2429
|
+
};
|
|
2430
|
+
signature: {
|
|
2431
|
+
ed25519Signature: {
|
|
2432
|
+
data: number[];
|
|
2433
|
+
};
|
|
2434
|
+
} | {
|
|
2435
|
+
secp256k1Signature: {
|
|
2436
|
+
data: number[];
|
|
2437
|
+
};
|
|
2438
|
+
} | {
|
|
2439
|
+
mlDsa65Signature: {
|
|
2440
|
+
data: number[];
|
|
2441
|
+
};
|
|
2442
|
+
};
|
|
2443
|
+
};
|
|
2444
|
+
} | {
|
|
2445
|
+
delegateV2: {
|
|
2446
|
+
delegateAction: {
|
|
2447
|
+
v2: {
|
|
2448
|
+
senderId: string;
|
|
2449
|
+
receiverId: string;
|
|
2450
|
+
actions: ({
|
|
2451
|
+
stake: {
|
|
2452
|
+
stake: bigint;
|
|
2453
|
+
publicKey: {
|
|
2454
|
+
ed25519Key: {
|
|
2455
|
+
data: number[];
|
|
2456
|
+
};
|
|
2457
|
+
} | {
|
|
2458
|
+
secp256k1Key: {
|
|
2459
|
+
data: number[];
|
|
2460
|
+
};
|
|
2461
|
+
} | {
|
|
2462
|
+
mlDsa65Key: {
|
|
2463
|
+
data: number[];
|
|
2464
|
+
};
|
|
2465
|
+
};
|
|
2466
|
+
};
|
|
2467
|
+
} | {
|
|
2468
|
+
createAccount: {};
|
|
2469
|
+
} | {
|
|
2470
|
+
deployContract: {
|
|
2471
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
2472
|
+
};
|
|
2473
|
+
} | {
|
|
2474
|
+
functionCall: {
|
|
2475
|
+
methodName: string;
|
|
2476
|
+
args: Uint8Array<ArrayBufferLike>;
|
|
2477
|
+
gas: bigint;
|
|
2478
|
+
deposit: bigint;
|
|
2479
|
+
};
|
|
2480
|
+
} | {
|
|
2481
|
+
transfer: {
|
|
2482
|
+
deposit: bigint;
|
|
2483
|
+
};
|
|
2484
|
+
} | {
|
|
2485
|
+
addKey: {
|
|
2486
|
+
publicKey: {
|
|
2487
|
+
ed25519Key: {
|
|
2488
|
+
data: number[];
|
|
2489
|
+
};
|
|
2490
|
+
} | {
|
|
2491
|
+
secp256k1Key: {
|
|
2492
|
+
data: number[];
|
|
2493
|
+
};
|
|
2494
|
+
} | {
|
|
2495
|
+
mlDsa65Key: {
|
|
2496
|
+
data: number[];
|
|
2497
|
+
};
|
|
2498
|
+
};
|
|
2499
|
+
accessKey: {
|
|
2500
|
+
nonce: bigint;
|
|
2501
|
+
permission: {
|
|
2502
|
+
functionCall: {
|
|
2503
|
+
allowance: bigint | null;
|
|
2504
|
+
receiverId: string;
|
|
2505
|
+
methodNames: string[];
|
|
2506
|
+
};
|
|
2507
|
+
} | {
|
|
2508
|
+
fullAccess: {};
|
|
2509
|
+
} | {
|
|
2510
|
+
gasKeyFunctionCall: {
|
|
2511
|
+
gasKeyInfo: {
|
|
2512
|
+
balance: bigint;
|
|
2513
|
+
numNonces: number;
|
|
2514
|
+
};
|
|
2515
|
+
functionCall: {
|
|
2516
|
+
allowance: bigint | null;
|
|
2517
|
+
receiverId: string;
|
|
2518
|
+
methodNames: string[];
|
|
2519
|
+
};
|
|
2520
|
+
};
|
|
2521
|
+
} | {
|
|
2522
|
+
gasKeyFullAccess: {
|
|
2523
|
+
gasKeyInfo: {
|
|
2524
|
+
balance: bigint;
|
|
2525
|
+
numNonces: number;
|
|
2526
|
+
};
|
|
2527
|
+
};
|
|
2528
|
+
};
|
|
2529
|
+
};
|
|
2530
|
+
};
|
|
2531
|
+
} | {
|
|
2532
|
+
deleteKey: {
|
|
2533
|
+
publicKey: {
|
|
2534
|
+
ed25519Key: {
|
|
2535
|
+
data: number[];
|
|
2536
|
+
};
|
|
2537
|
+
} | {
|
|
2538
|
+
secp256k1Key: {
|
|
2539
|
+
data: number[];
|
|
2540
|
+
};
|
|
2541
|
+
} | {
|
|
2542
|
+
mlDsa65Key: {
|
|
2543
|
+
data: number[];
|
|
2544
|
+
};
|
|
2545
|
+
};
|
|
2546
|
+
};
|
|
2547
|
+
} | {
|
|
2548
|
+
deleteAccount: {
|
|
2549
|
+
beneficiaryId: string;
|
|
2550
|
+
};
|
|
2551
|
+
} | {
|
|
2552
|
+
delegatePlaceholder: {};
|
|
2553
|
+
} | {
|
|
2554
|
+
deployGlobalContract: {
|
|
2555
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
2556
|
+
deployMode: {
|
|
2557
|
+
CodeHash: {};
|
|
2558
|
+
} | {
|
|
2559
|
+
AccountId: {};
|
|
2560
|
+
};
|
|
2561
|
+
};
|
|
2562
|
+
} | {
|
|
2563
|
+
useGlobalContract: {
|
|
2564
|
+
contractIdentifier: {
|
|
2565
|
+
CodeHash: number[];
|
|
2566
|
+
} | {
|
|
2567
|
+
AccountId: string;
|
|
2568
|
+
};
|
|
2569
|
+
};
|
|
2570
|
+
} | {
|
|
2571
|
+
deterministicStateInit: {
|
|
2572
|
+
stateInit: {
|
|
2573
|
+
V1: {
|
|
2574
|
+
code: {
|
|
2575
|
+
CodeHash: number[];
|
|
2576
|
+
} | {
|
|
2577
|
+
AccountId: string;
|
|
2578
|
+
};
|
|
2579
|
+
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
2580
|
+
};
|
|
2581
|
+
};
|
|
2582
|
+
deposit: bigint;
|
|
2583
|
+
};
|
|
2584
|
+
} | {
|
|
2585
|
+
transferToGasKey: {
|
|
2586
|
+
publicKey: {
|
|
2587
|
+
ed25519Key: {
|
|
2588
|
+
data: number[];
|
|
2589
|
+
};
|
|
2590
|
+
} | {
|
|
2591
|
+
secp256k1Key: {
|
|
2592
|
+
data: number[];
|
|
2593
|
+
};
|
|
2594
|
+
} | {
|
|
2595
|
+
mlDsa65Key: {
|
|
2596
|
+
data: number[];
|
|
2597
|
+
};
|
|
2598
|
+
};
|
|
2599
|
+
deposit: bigint;
|
|
2600
|
+
};
|
|
2601
|
+
} | {
|
|
2602
|
+
withdrawFromGasKey: {
|
|
2603
|
+
publicKey: {
|
|
2604
|
+
ed25519Key: {
|
|
2605
|
+
data: number[];
|
|
2606
|
+
};
|
|
2607
|
+
} | {
|
|
2608
|
+
secp256k1Key: {
|
|
2609
|
+
data: number[];
|
|
2610
|
+
};
|
|
2611
|
+
} | {
|
|
2612
|
+
mlDsa65Key: {
|
|
2613
|
+
data: number[];
|
|
2614
|
+
};
|
|
2615
|
+
};
|
|
2616
|
+
amount: bigint;
|
|
2617
|
+
};
|
|
2618
|
+
})[];
|
|
2619
|
+
nonce: {
|
|
2620
|
+
nonce: {
|
|
2621
|
+
nonce: bigint;
|
|
2622
|
+
};
|
|
2623
|
+
} | {
|
|
2624
|
+
gasKeyNonce: {
|
|
2625
|
+
nonce: bigint;
|
|
2626
|
+
nonceIndex: number;
|
|
2627
|
+
};
|
|
2628
|
+
};
|
|
2629
|
+
maxBlockHeight: bigint;
|
|
2630
|
+
publicKey: {
|
|
2631
|
+
ed25519Key: {
|
|
2632
|
+
data: number[];
|
|
2633
|
+
};
|
|
2634
|
+
} | {
|
|
2635
|
+
secp256k1Key: {
|
|
2636
|
+
data: number[];
|
|
2637
|
+
};
|
|
2638
|
+
} | {
|
|
2639
|
+
mlDsa65Key: {
|
|
2640
|
+
data: number[];
|
|
2641
|
+
};
|
|
2642
|
+
};
|
|
2643
|
+
};
|
|
2644
|
+
};
|
|
2645
|
+
signature: {
|
|
2646
|
+
ed25519Signature: {
|
|
2647
|
+
data: number[];
|
|
2648
|
+
};
|
|
2649
|
+
} | {
|
|
2650
|
+
secp256k1Signature: {
|
|
2651
|
+
data: number[];
|
|
2652
|
+
};
|
|
2653
|
+
} | {
|
|
2654
|
+
mlDsa65Signature: {
|
|
2655
|
+
data: number[];
|
|
2656
|
+
};
|
|
2657
|
+
};
|
|
2658
|
+
};
|
|
2659
|
+
})[];
|
|
2660
|
+
}, string>;
|
|
2661
|
+
/**
|
|
2662
|
+
* SignedTransaction schema
|
|
2663
|
+
*/
|
|
2664
|
+
export declare const SignedTransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
2665
|
+
transaction: {
|
|
2666
|
+
signerId: string;
|
|
2667
|
+
publicKey: {
|
|
2668
|
+
ed25519Key: {
|
|
2669
|
+
data: number[];
|
|
2670
|
+
};
|
|
2671
|
+
} | {
|
|
2672
|
+
secp256k1Key: {
|
|
2673
|
+
data: number[];
|
|
2674
|
+
};
|
|
2675
|
+
} | {
|
|
2676
|
+
mlDsa65Key: {
|
|
2677
|
+
data: number[];
|
|
2678
|
+
};
|
|
2679
|
+
};
|
|
2680
|
+
nonce: bigint;
|
|
2681
|
+
receiverId: string;
|
|
2682
|
+
blockHash: number[];
|
|
2683
|
+
actions: ({
|
|
2684
|
+
stake: {
|
|
2685
|
+
stake: bigint;
|
|
2686
|
+
publicKey: {
|
|
2687
|
+
ed25519Key: {
|
|
2688
|
+
data: number[];
|
|
2689
|
+
};
|
|
2690
|
+
} | {
|
|
2691
|
+
secp256k1Key: {
|
|
2692
|
+
data: number[];
|
|
2693
|
+
};
|
|
2694
|
+
} | {
|
|
2695
|
+
mlDsa65Key: {
|
|
2696
|
+
data: number[];
|
|
2697
|
+
};
|
|
2698
|
+
};
|
|
2699
|
+
};
|
|
2700
|
+
} | {
|
|
2701
|
+
createAccount: {};
|
|
2702
|
+
} | {
|
|
2703
|
+
deployContract: {
|
|
2704
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
2705
|
+
};
|
|
2706
|
+
} | {
|
|
2707
|
+
functionCall: {
|
|
2708
|
+
methodName: string;
|
|
2709
|
+
args: Uint8Array<ArrayBufferLike>;
|
|
2710
|
+
gas: bigint;
|
|
2711
|
+
deposit: bigint;
|
|
2712
|
+
};
|
|
2713
|
+
} | {
|
|
2714
|
+
transfer: {
|
|
2715
|
+
deposit: bigint;
|
|
2716
|
+
};
|
|
2717
|
+
} | {
|
|
2718
|
+
addKey: {
|
|
2719
|
+
publicKey: {
|
|
2720
|
+
ed25519Key: {
|
|
2721
|
+
data: number[];
|
|
2722
|
+
};
|
|
2723
|
+
} | {
|
|
2724
|
+
secp256k1Key: {
|
|
2725
|
+
data: number[];
|
|
2726
|
+
};
|
|
2727
|
+
} | {
|
|
2728
|
+
mlDsa65Key: {
|
|
2729
|
+
data: number[];
|
|
2730
|
+
};
|
|
2731
|
+
};
|
|
2732
|
+
accessKey: {
|
|
2733
|
+
nonce: bigint;
|
|
2734
|
+
permission: {
|
|
2735
|
+
functionCall: {
|
|
2736
|
+
allowance: bigint | null;
|
|
2737
|
+
receiverId: string;
|
|
2738
|
+
methodNames: string[];
|
|
2739
|
+
};
|
|
2740
|
+
} | {
|
|
2741
|
+
fullAccess: {};
|
|
2742
|
+
} | {
|
|
2743
|
+
gasKeyFunctionCall: {
|
|
2744
|
+
gasKeyInfo: {
|
|
2745
|
+
balance: bigint;
|
|
2746
|
+
numNonces: number;
|
|
2747
|
+
};
|
|
2748
|
+
functionCall: {
|
|
2749
|
+
allowance: bigint | null;
|
|
2750
|
+
receiverId: string;
|
|
2751
|
+
methodNames: string[];
|
|
2752
|
+
};
|
|
2753
|
+
};
|
|
2754
|
+
} | {
|
|
2755
|
+
gasKeyFullAccess: {
|
|
2756
|
+
gasKeyInfo: {
|
|
2757
|
+
balance: bigint;
|
|
2758
|
+
numNonces: number;
|
|
2759
|
+
};
|
|
2760
|
+
};
|
|
2761
|
+
};
|
|
2762
|
+
};
|
|
2763
|
+
};
|
|
2764
|
+
} | {
|
|
2765
|
+
deleteKey: {
|
|
2766
|
+
publicKey: {
|
|
2767
|
+
ed25519Key: {
|
|
2768
|
+
data: number[];
|
|
2769
|
+
};
|
|
2770
|
+
} | {
|
|
2771
|
+
secp256k1Key: {
|
|
2772
|
+
data: number[];
|
|
2773
|
+
};
|
|
2774
|
+
} | {
|
|
2775
|
+
mlDsa65Key: {
|
|
2776
|
+
data: number[];
|
|
2777
|
+
};
|
|
2778
|
+
};
|
|
2779
|
+
};
|
|
2780
|
+
} | {
|
|
2781
|
+
deleteAccount: {
|
|
2782
|
+
beneficiaryId: string;
|
|
2783
|
+
};
|
|
2784
|
+
} | {
|
|
2785
|
+
deployGlobalContract: {
|
|
2786
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
2787
|
+
deployMode: {
|
|
2788
|
+
CodeHash: {};
|
|
2789
|
+
} | {
|
|
2790
|
+
AccountId: {};
|
|
2791
|
+
};
|
|
2792
|
+
};
|
|
2793
|
+
} | {
|
|
2794
|
+
useGlobalContract: {
|
|
2795
|
+
contractIdentifier: {
|
|
2796
|
+
CodeHash: number[];
|
|
2797
|
+
} | {
|
|
2798
|
+
AccountId: string;
|
|
2799
|
+
};
|
|
2800
|
+
};
|
|
2801
|
+
} | {
|
|
2802
|
+
deterministicStateInit: {
|
|
2803
|
+
stateInit: {
|
|
2804
|
+
V1: {
|
|
2805
|
+
code: {
|
|
2806
|
+
CodeHash: number[];
|
|
2807
|
+
} | {
|
|
2808
|
+
AccountId: string;
|
|
2809
|
+
};
|
|
2810
|
+
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
2811
|
+
};
|
|
2812
|
+
};
|
|
2813
|
+
deposit: bigint;
|
|
2814
|
+
};
|
|
2815
|
+
} | {
|
|
2816
|
+
transferToGasKey: {
|
|
2817
|
+
publicKey: {
|
|
2818
|
+
ed25519Key: {
|
|
2819
|
+
data: number[];
|
|
2820
|
+
};
|
|
2821
|
+
} | {
|
|
2822
|
+
secp256k1Key: {
|
|
2823
|
+
data: number[];
|
|
2824
|
+
};
|
|
2825
|
+
} | {
|
|
2826
|
+
mlDsa65Key: {
|
|
2827
|
+
data: number[];
|
|
2828
|
+
};
|
|
2829
|
+
};
|
|
2830
|
+
deposit: bigint;
|
|
2831
|
+
};
|
|
2832
|
+
} | {
|
|
2833
|
+
withdrawFromGasKey: {
|
|
2834
|
+
publicKey: {
|
|
2835
|
+
ed25519Key: {
|
|
2836
|
+
data: number[];
|
|
2837
|
+
};
|
|
2838
|
+
} | {
|
|
2839
|
+
secp256k1Key: {
|
|
2840
|
+
data: number[];
|
|
2841
|
+
};
|
|
2842
|
+
} | {
|
|
2843
|
+
mlDsa65Key: {
|
|
2844
|
+
data: number[];
|
|
2845
|
+
};
|
|
2846
|
+
};
|
|
2847
|
+
amount: bigint;
|
|
2848
|
+
};
|
|
2849
|
+
} | {
|
|
2850
|
+
signedDelegate: {
|
|
2851
|
+
delegateAction: {
|
|
2852
|
+
senderId: string;
|
|
2853
|
+
receiverId: string;
|
|
2854
|
+
actions: ({
|
|
2855
|
+
stake: {
|
|
2856
|
+
stake: bigint;
|
|
2857
|
+
publicKey: {
|
|
2858
|
+
ed25519Key: {
|
|
2859
|
+
data: number[];
|
|
2860
|
+
};
|
|
2861
|
+
} | {
|
|
2862
|
+
secp256k1Key: {
|
|
2863
|
+
data: number[];
|
|
2864
|
+
};
|
|
2865
|
+
} | {
|
|
2866
|
+
mlDsa65Key: {
|
|
2867
|
+
data: number[];
|
|
2868
|
+
};
|
|
2869
|
+
};
|
|
2870
|
+
};
|
|
2871
|
+
} | {
|
|
2872
|
+
createAccount: {};
|
|
2873
|
+
} | {
|
|
2874
|
+
deployContract: {
|
|
2875
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
2876
|
+
};
|
|
2877
|
+
} | {
|
|
2878
|
+
functionCall: {
|
|
2879
|
+
methodName: string;
|
|
2880
|
+
args: Uint8Array<ArrayBufferLike>;
|
|
2881
|
+
gas: bigint;
|
|
2882
|
+
deposit: bigint;
|
|
2883
|
+
};
|
|
2884
|
+
} | {
|
|
2885
|
+
transfer: {
|
|
2886
|
+
deposit: bigint;
|
|
2887
|
+
};
|
|
2888
|
+
} | {
|
|
2889
|
+
addKey: {
|
|
2890
|
+
publicKey: {
|
|
2891
|
+
ed25519Key: {
|
|
2892
|
+
data: number[];
|
|
2893
|
+
};
|
|
2894
|
+
} | {
|
|
2895
|
+
secp256k1Key: {
|
|
2896
|
+
data: number[];
|
|
2897
|
+
};
|
|
2898
|
+
} | {
|
|
2899
|
+
mlDsa65Key: {
|
|
2900
|
+
data: number[];
|
|
2901
|
+
};
|
|
2902
|
+
};
|
|
2903
|
+
accessKey: {
|
|
2904
|
+
nonce: bigint;
|
|
2905
|
+
permission: {
|
|
2906
|
+
functionCall: {
|
|
2907
|
+
allowance: bigint | null;
|
|
2908
|
+
receiverId: string;
|
|
2909
|
+
methodNames: string[];
|
|
2910
|
+
};
|
|
2911
|
+
} | {
|
|
2912
|
+
fullAccess: {};
|
|
2913
|
+
} | {
|
|
2914
|
+
gasKeyFunctionCall: {
|
|
2915
|
+
gasKeyInfo: {
|
|
2916
|
+
balance: bigint;
|
|
2917
|
+
numNonces: number;
|
|
2918
|
+
};
|
|
2919
|
+
functionCall: {
|
|
2920
|
+
allowance: bigint | null;
|
|
2921
|
+
receiverId: string;
|
|
2922
|
+
methodNames: string[];
|
|
2923
|
+
};
|
|
2924
|
+
};
|
|
2925
|
+
} | {
|
|
2926
|
+
gasKeyFullAccess: {
|
|
2927
|
+
gasKeyInfo: {
|
|
2928
|
+
balance: bigint;
|
|
2929
|
+
numNonces: number;
|
|
2930
|
+
};
|
|
2931
|
+
};
|
|
2932
|
+
};
|
|
2933
|
+
};
|
|
2934
|
+
};
|
|
2935
|
+
} | {
|
|
2936
|
+
deleteKey: {
|
|
2937
|
+
publicKey: {
|
|
2938
|
+
ed25519Key: {
|
|
2939
|
+
data: number[];
|
|
2940
|
+
};
|
|
2941
|
+
} | {
|
|
2942
|
+
secp256k1Key: {
|
|
2943
|
+
data: number[];
|
|
2944
|
+
};
|
|
2945
|
+
} | {
|
|
2946
|
+
mlDsa65Key: {
|
|
2947
|
+
data: number[];
|
|
2948
|
+
};
|
|
2949
|
+
};
|
|
2950
|
+
};
|
|
2951
|
+
} | {
|
|
2952
|
+
deleteAccount: {
|
|
2953
|
+
beneficiaryId: string;
|
|
2954
|
+
};
|
|
2955
|
+
} | {
|
|
2956
|
+
delegatePlaceholder: {};
|
|
2957
|
+
} | {
|
|
2958
|
+
deployGlobalContract: {
|
|
2959
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
2960
|
+
deployMode: {
|
|
2961
|
+
CodeHash: {};
|
|
2962
|
+
} | {
|
|
2963
|
+
AccountId: {};
|
|
2964
|
+
};
|
|
2965
|
+
};
|
|
2966
|
+
} | {
|
|
2967
|
+
useGlobalContract: {
|
|
2968
|
+
contractIdentifier: {
|
|
2969
|
+
CodeHash: number[];
|
|
2970
|
+
} | {
|
|
2971
|
+
AccountId: string;
|
|
2972
|
+
};
|
|
2973
|
+
};
|
|
2974
|
+
} | {
|
|
2975
|
+
deterministicStateInit: {
|
|
2976
|
+
stateInit: {
|
|
2977
|
+
V1: {
|
|
2978
|
+
code: {
|
|
2979
|
+
CodeHash: number[];
|
|
2980
|
+
} | {
|
|
2981
|
+
AccountId: string;
|
|
2982
|
+
};
|
|
2983
|
+
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
2984
|
+
};
|
|
2985
|
+
};
|
|
2986
|
+
deposit: bigint;
|
|
2987
|
+
};
|
|
2988
|
+
} | {
|
|
2989
|
+
transferToGasKey: {
|
|
2990
|
+
publicKey: {
|
|
2991
|
+
ed25519Key: {
|
|
2992
|
+
data: number[];
|
|
2993
|
+
};
|
|
2994
|
+
} | {
|
|
2995
|
+
secp256k1Key: {
|
|
2996
|
+
data: number[];
|
|
2997
|
+
};
|
|
2998
|
+
} | {
|
|
2999
|
+
mlDsa65Key: {
|
|
3000
|
+
data: number[];
|
|
3001
|
+
};
|
|
3002
|
+
};
|
|
3003
|
+
deposit: bigint;
|
|
3004
|
+
};
|
|
3005
|
+
} | {
|
|
3006
|
+
withdrawFromGasKey: {
|
|
3007
|
+
publicKey: {
|
|
3008
|
+
ed25519Key: {
|
|
3009
|
+
data: number[];
|
|
3010
|
+
};
|
|
3011
|
+
} | {
|
|
3012
|
+
secp256k1Key: {
|
|
3013
|
+
data: number[];
|
|
3014
|
+
};
|
|
3015
|
+
} | {
|
|
3016
|
+
mlDsa65Key: {
|
|
3017
|
+
data: number[];
|
|
3018
|
+
};
|
|
3019
|
+
};
|
|
3020
|
+
amount: bigint;
|
|
3021
|
+
};
|
|
3022
|
+
})[];
|
|
3023
|
+
nonce: bigint;
|
|
3024
|
+
maxBlockHeight: bigint;
|
|
3025
|
+
publicKey: {
|
|
3026
|
+
ed25519Key: {
|
|
3027
|
+
data: number[];
|
|
3028
|
+
};
|
|
3029
|
+
} | {
|
|
3030
|
+
secp256k1Key: {
|
|
3031
|
+
data: number[];
|
|
3032
|
+
};
|
|
3033
|
+
} | {
|
|
3034
|
+
mlDsa65Key: {
|
|
3035
|
+
data: number[];
|
|
3036
|
+
};
|
|
3037
|
+
};
|
|
3038
|
+
};
|
|
3039
|
+
signature: {
|
|
3040
|
+
ed25519Signature: {
|
|
3041
|
+
data: number[];
|
|
3042
|
+
};
|
|
3043
|
+
} | {
|
|
3044
|
+
secp256k1Signature: {
|
|
3045
|
+
data: number[];
|
|
3046
|
+
};
|
|
3047
|
+
} | {
|
|
3048
|
+
mlDsa65Signature: {
|
|
3049
|
+
data: number[];
|
|
3050
|
+
};
|
|
3051
|
+
};
|
|
3052
|
+
};
|
|
3053
|
+
} | {
|
|
3054
|
+
delegateV2: {
|
|
3055
|
+
delegateAction: {
|
|
3056
|
+
v2: {
|
|
3057
|
+
senderId: string;
|
|
3058
|
+
receiverId: string;
|
|
3059
|
+
actions: ({
|
|
3060
|
+
stake: {
|
|
3061
|
+
stake: bigint;
|
|
3062
|
+
publicKey: {
|
|
3063
|
+
ed25519Key: {
|
|
3064
|
+
data: number[];
|
|
3065
|
+
};
|
|
3066
|
+
} | {
|
|
3067
|
+
secp256k1Key: {
|
|
3068
|
+
data: number[];
|
|
3069
|
+
};
|
|
3070
|
+
} | {
|
|
3071
|
+
mlDsa65Key: {
|
|
3072
|
+
data: number[];
|
|
3073
|
+
};
|
|
3074
|
+
};
|
|
3075
|
+
};
|
|
3076
|
+
} | {
|
|
3077
|
+
createAccount: {};
|
|
3078
|
+
} | {
|
|
3079
|
+
deployContract: {
|
|
3080
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
3081
|
+
};
|
|
3082
|
+
} | {
|
|
3083
|
+
functionCall: {
|
|
3084
|
+
methodName: string;
|
|
3085
|
+
args: Uint8Array<ArrayBufferLike>;
|
|
3086
|
+
gas: bigint;
|
|
3087
|
+
deposit: bigint;
|
|
3088
|
+
};
|
|
3089
|
+
} | {
|
|
3090
|
+
transfer: {
|
|
3091
|
+
deposit: bigint;
|
|
3092
|
+
};
|
|
3093
|
+
} | {
|
|
3094
|
+
addKey: {
|
|
3095
|
+
publicKey: {
|
|
3096
|
+
ed25519Key: {
|
|
3097
|
+
data: number[];
|
|
3098
|
+
};
|
|
3099
|
+
} | {
|
|
3100
|
+
secp256k1Key: {
|
|
3101
|
+
data: number[];
|
|
3102
|
+
};
|
|
3103
|
+
} | {
|
|
3104
|
+
mlDsa65Key: {
|
|
3105
|
+
data: number[];
|
|
3106
|
+
};
|
|
3107
|
+
};
|
|
3108
|
+
accessKey: {
|
|
3109
|
+
nonce: bigint;
|
|
3110
|
+
permission: {
|
|
3111
|
+
functionCall: {
|
|
3112
|
+
allowance: bigint | null;
|
|
3113
|
+
receiverId: string;
|
|
3114
|
+
methodNames: string[];
|
|
3115
|
+
};
|
|
3116
|
+
} | {
|
|
3117
|
+
fullAccess: {};
|
|
3118
|
+
} | {
|
|
3119
|
+
gasKeyFunctionCall: {
|
|
3120
|
+
gasKeyInfo: {
|
|
3121
|
+
balance: bigint;
|
|
3122
|
+
numNonces: number;
|
|
3123
|
+
};
|
|
3124
|
+
functionCall: {
|
|
3125
|
+
allowance: bigint | null;
|
|
3126
|
+
receiverId: string;
|
|
3127
|
+
methodNames: string[];
|
|
3128
|
+
};
|
|
3129
|
+
};
|
|
3130
|
+
} | {
|
|
3131
|
+
gasKeyFullAccess: {
|
|
3132
|
+
gasKeyInfo: {
|
|
3133
|
+
balance: bigint;
|
|
3134
|
+
numNonces: number;
|
|
3135
|
+
};
|
|
3136
|
+
};
|
|
3137
|
+
};
|
|
3138
|
+
};
|
|
3139
|
+
};
|
|
3140
|
+
} | {
|
|
3141
|
+
deleteKey: {
|
|
3142
|
+
publicKey: {
|
|
3143
|
+
ed25519Key: {
|
|
3144
|
+
data: number[];
|
|
3145
|
+
};
|
|
3146
|
+
} | {
|
|
3147
|
+
secp256k1Key: {
|
|
3148
|
+
data: number[];
|
|
3149
|
+
};
|
|
3150
|
+
} | {
|
|
3151
|
+
mlDsa65Key: {
|
|
3152
|
+
data: number[];
|
|
3153
|
+
};
|
|
3154
|
+
};
|
|
3155
|
+
};
|
|
3156
|
+
} | {
|
|
3157
|
+
deleteAccount: {
|
|
3158
|
+
beneficiaryId: string;
|
|
3159
|
+
};
|
|
3160
|
+
} | {
|
|
3161
|
+
delegatePlaceholder: {};
|
|
3162
|
+
} | {
|
|
3163
|
+
deployGlobalContract: {
|
|
3164
|
+
code: Uint8Array<ArrayBufferLike>;
|
|
3165
|
+
deployMode: {
|
|
3166
|
+
CodeHash: {};
|
|
3167
|
+
} | {
|
|
3168
|
+
AccountId: {};
|
|
3169
|
+
};
|
|
3170
|
+
};
|
|
3171
|
+
} | {
|
|
3172
|
+
useGlobalContract: {
|
|
3173
|
+
contractIdentifier: {
|
|
3174
|
+
CodeHash: number[];
|
|
3175
|
+
} | {
|
|
3176
|
+
AccountId: string;
|
|
3177
|
+
};
|
|
3178
|
+
};
|
|
3179
|
+
} | {
|
|
3180
|
+
deterministicStateInit: {
|
|
3181
|
+
stateInit: {
|
|
3182
|
+
V1: {
|
|
3183
|
+
code: {
|
|
3184
|
+
CodeHash: number[];
|
|
3185
|
+
} | {
|
|
3186
|
+
AccountId: string;
|
|
3187
|
+
};
|
|
3188
|
+
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
3189
|
+
};
|
|
3190
|
+
};
|
|
3191
|
+
deposit: bigint;
|
|
3192
|
+
};
|
|
3193
|
+
} | {
|
|
3194
|
+
transferToGasKey: {
|
|
3195
|
+
publicKey: {
|
|
3196
|
+
ed25519Key: {
|
|
3197
|
+
data: number[];
|
|
3198
|
+
};
|
|
3199
|
+
} | {
|
|
3200
|
+
secp256k1Key: {
|
|
3201
|
+
data: number[];
|
|
3202
|
+
};
|
|
3203
|
+
} | {
|
|
3204
|
+
mlDsa65Key: {
|
|
3205
|
+
data: number[];
|
|
3206
|
+
};
|
|
3207
|
+
};
|
|
3208
|
+
deposit: bigint;
|
|
3209
|
+
};
|
|
3210
|
+
} | {
|
|
3211
|
+
withdrawFromGasKey: {
|
|
3212
|
+
publicKey: {
|
|
3213
|
+
ed25519Key: {
|
|
3214
|
+
data: number[];
|
|
3215
|
+
};
|
|
3216
|
+
} | {
|
|
3217
|
+
secp256k1Key: {
|
|
3218
|
+
data: number[];
|
|
3219
|
+
};
|
|
3220
|
+
} | {
|
|
3221
|
+
mlDsa65Key: {
|
|
3222
|
+
data: number[];
|
|
3223
|
+
};
|
|
3224
|
+
};
|
|
3225
|
+
amount: bigint;
|
|
3226
|
+
};
|
|
3227
|
+
})[];
|
|
3228
|
+
nonce: {
|
|
3229
|
+
nonce: {
|
|
3230
|
+
nonce: bigint;
|
|
3231
|
+
};
|
|
3232
|
+
} | {
|
|
3233
|
+
gasKeyNonce: {
|
|
3234
|
+
nonce: bigint;
|
|
3235
|
+
nonceIndex: number;
|
|
3236
|
+
};
|
|
636
3237
|
};
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
3238
|
+
maxBlockHeight: bigint;
|
|
3239
|
+
publicKey: {
|
|
3240
|
+
ed25519Key: {
|
|
3241
|
+
data: number[];
|
|
3242
|
+
};
|
|
3243
|
+
} | {
|
|
3244
|
+
secp256k1Key: {
|
|
3245
|
+
data: number[];
|
|
3246
|
+
};
|
|
3247
|
+
} | {
|
|
3248
|
+
mlDsa65Key: {
|
|
3249
|
+
data: number[];
|
|
3250
|
+
};
|
|
640
3251
|
};
|
|
641
3252
|
};
|
|
642
3253
|
};
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
};
|
|
647
|
-
} | {
|
|
648
|
-
deployGlobalContract: {
|
|
649
|
-
code: Uint8Array<ArrayBufferLike>;
|
|
650
|
-
deployMode: {
|
|
651
|
-
CodeHash: {};
|
|
652
|
-
} | {
|
|
653
|
-
AccountId: {};
|
|
3254
|
+
signature: {
|
|
3255
|
+
ed25519Signature: {
|
|
3256
|
+
data: number[];
|
|
654
3257
|
};
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
contractIdentifier: {
|
|
659
|
-
CodeHash: number[];
|
|
660
|
-
} | {
|
|
661
|
-
AccountId: string;
|
|
3258
|
+
} | {
|
|
3259
|
+
secp256k1Signature: {
|
|
3260
|
+
data: number[];
|
|
662
3261
|
};
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
stateInit: {
|
|
667
|
-
V1: {
|
|
668
|
-
code: {
|
|
669
|
-
CodeHash: number[];
|
|
670
|
-
} | {
|
|
671
|
-
AccountId: string;
|
|
672
|
-
};
|
|
673
|
-
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
674
|
-
};
|
|
3262
|
+
} | {
|
|
3263
|
+
mlDsa65Signature: {
|
|
3264
|
+
data: number[];
|
|
675
3265
|
};
|
|
676
|
-
deposit: bigint;
|
|
677
|
-
};
|
|
678
|
-
})[];
|
|
679
|
-
nonce: bigint;
|
|
680
|
-
maxBlockHeight: bigint;
|
|
681
|
-
publicKey: {
|
|
682
|
-
ed25519Key: {
|
|
683
|
-
data: number[];
|
|
684
|
-
};
|
|
685
|
-
} | {
|
|
686
|
-
secp256k1Key: {
|
|
687
|
-
data: number[];
|
|
688
3266
|
};
|
|
689
3267
|
};
|
|
3268
|
+
})[];
|
|
3269
|
+
};
|
|
3270
|
+
signature: {
|
|
3271
|
+
ed25519Signature: {
|
|
3272
|
+
data: number[];
|
|
690
3273
|
};
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
};
|
|
3274
|
+
} | {
|
|
3275
|
+
secp256k1Signature: {
|
|
3276
|
+
data: number[];
|
|
3277
|
+
};
|
|
3278
|
+
} | {
|
|
3279
|
+
mlDsa65Signature: {
|
|
3280
|
+
data: number[];
|
|
699
3281
|
};
|
|
700
3282
|
};
|
|
701
3283
|
}, string>;
|
|
702
3284
|
/**
|
|
703
|
-
*
|
|
704
|
-
*
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
functionCall: b.infer<typeof FunctionCallSchema>;
|
|
712
|
-
};
|
|
713
|
-
export type CreateAccountAction = {
|
|
714
|
-
createAccount: b.infer<typeof CreateAccountSchema>;
|
|
715
|
-
};
|
|
716
|
-
export type DeleteAccountAction = {
|
|
717
|
-
deleteAccount: b.infer<typeof DeleteAccountSchema>;
|
|
718
|
-
};
|
|
719
|
-
export type DeployContractAction = {
|
|
720
|
-
deployContract: b.infer<typeof DeployContractSchema>;
|
|
721
|
-
};
|
|
722
|
-
export type StakeAction = {
|
|
723
|
-
stake: b.infer<typeof StakeSchema>;
|
|
724
|
-
};
|
|
725
|
-
export type AddKeyAction = {
|
|
726
|
-
addKey: b.infer<typeof AddKeySchema>;
|
|
727
|
-
};
|
|
728
|
-
export type DeleteKeyAction = {
|
|
729
|
-
deleteKey: b.infer<typeof DeleteKeySchema>;
|
|
730
|
-
};
|
|
731
|
-
export type DeployGlobalContractAction = {
|
|
732
|
-
deployGlobalContract: b.infer<typeof DeployGlobalContractSchema>;
|
|
733
|
-
};
|
|
734
|
-
export type UseGlobalContractAction = {
|
|
735
|
-
useGlobalContract: b.infer<typeof UseGlobalContractSchema>;
|
|
736
|
-
};
|
|
737
|
-
export type SignedDelegateAction = {
|
|
738
|
-
signedDelegate: b.infer<typeof SignedDelegateSchema>;
|
|
739
|
-
};
|
|
740
|
-
export type DeterministicStateInitAction = {
|
|
741
|
-
deterministicStateInit: b.infer<typeof DeterministicStateInitSchema>;
|
|
742
|
-
};
|
|
743
|
-
export type StateInit = b.infer<typeof DeterministicAccountStateInitSchema>;
|
|
744
|
-
export type StateInitV1 = b.infer<typeof DeterministicAccountStateInitV1Schema>;
|
|
745
|
-
export { DeterministicAccountStateInitSchema, DeterministicAccountStateInitV1Schema, };
|
|
746
|
-
/**
|
|
747
|
-
* Transaction schema
|
|
748
|
-
* Field order: signerId, publicKey, nonce, receiverId, blockHash, actions
|
|
3285
|
+
* TransactionV1 schema (NEAR 2.13).
|
|
3286
|
+
*
|
|
3287
|
+
* Same shape as V0 but the `nonce` is a {@link TransactionNonceSchema} and a
|
|
3288
|
+
* trailing `nonceMode` is appended. Field order matches nearcore `TransactionV1`:
|
|
3289
|
+
* signer_id, public_key, nonce, receiver_id, block_hash, actions, nonce_mode.
|
|
3290
|
+
*
|
|
3291
|
+
* This serializes the struct ALONE (no version tag); use
|
|
3292
|
+
* {@link serializeTransactionV1} to get the tagged wire bytes.
|
|
749
3293
|
*/
|
|
750
|
-
export declare const
|
|
3294
|
+
export declare const TransactionV1Schema: import("@zorsh/zorsh").Schema<{
|
|
751
3295
|
signerId: string;
|
|
752
3296
|
publicKey: {
|
|
753
3297
|
ed25519Key: {
|
|
@@ -757,8 +3301,21 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
757
3301
|
secp256k1Key: {
|
|
758
3302
|
data: number[];
|
|
759
3303
|
};
|
|
3304
|
+
} | {
|
|
3305
|
+
mlDsa65Key: {
|
|
3306
|
+
data: number[];
|
|
3307
|
+
};
|
|
3308
|
+
};
|
|
3309
|
+
nonce: {
|
|
3310
|
+
nonce: {
|
|
3311
|
+
nonce: bigint;
|
|
3312
|
+
};
|
|
3313
|
+
} | {
|
|
3314
|
+
gasKeyNonce: {
|
|
3315
|
+
nonce: bigint;
|
|
3316
|
+
nonceIndex: number;
|
|
3317
|
+
};
|
|
760
3318
|
};
|
|
761
|
-
nonce: bigint;
|
|
762
3319
|
receiverId: string;
|
|
763
3320
|
blockHash: number[];
|
|
764
3321
|
actions: ({
|
|
@@ -772,6 +3329,10 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
772
3329
|
secp256k1Key: {
|
|
773
3330
|
data: number[];
|
|
774
3331
|
};
|
|
3332
|
+
} | {
|
|
3333
|
+
mlDsa65Key: {
|
|
3334
|
+
data: number[];
|
|
3335
|
+
};
|
|
775
3336
|
};
|
|
776
3337
|
};
|
|
777
3338
|
} | {
|
|
@@ -801,6 +3362,10 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
801
3362
|
secp256k1Key: {
|
|
802
3363
|
data: number[];
|
|
803
3364
|
};
|
|
3365
|
+
} | {
|
|
3366
|
+
mlDsa65Key: {
|
|
3367
|
+
data: number[];
|
|
3368
|
+
};
|
|
804
3369
|
};
|
|
805
3370
|
accessKey: {
|
|
806
3371
|
nonce: bigint;
|
|
@@ -812,6 +3377,25 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
812
3377
|
};
|
|
813
3378
|
} | {
|
|
814
3379
|
fullAccess: {};
|
|
3380
|
+
} | {
|
|
3381
|
+
gasKeyFunctionCall: {
|
|
3382
|
+
gasKeyInfo: {
|
|
3383
|
+
balance: bigint;
|
|
3384
|
+
numNonces: number;
|
|
3385
|
+
};
|
|
3386
|
+
functionCall: {
|
|
3387
|
+
allowance: bigint | null;
|
|
3388
|
+
receiverId: string;
|
|
3389
|
+
methodNames: string[];
|
|
3390
|
+
};
|
|
3391
|
+
};
|
|
3392
|
+
} | {
|
|
3393
|
+
gasKeyFullAccess: {
|
|
3394
|
+
gasKeyInfo: {
|
|
3395
|
+
balance: bigint;
|
|
3396
|
+
numNonces: number;
|
|
3397
|
+
};
|
|
3398
|
+
};
|
|
815
3399
|
};
|
|
816
3400
|
};
|
|
817
3401
|
};
|
|
@@ -825,6 +3409,10 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
825
3409
|
secp256k1Key: {
|
|
826
3410
|
data: number[];
|
|
827
3411
|
};
|
|
3412
|
+
} | {
|
|
3413
|
+
mlDsa65Key: {
|
|
3414
|
+
data: number[];
|
|
3415
|
+
};
|
|
828
3416
|
};
|
|
829
3417
|
};
|
|
830
3418
|
} | {
|
|
@@ -862,6 +3450,40 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
862
3450
|
};
|
|
863
3451
|
deposit: bigint;
|
|
864
3452
|
};
|
|
3453
|
+
} | {
|
|
3454
|
+
transferToGasKey: {
|
|
3455
|
+
publicKey: {
|
|
3456
|
+
ed25519Key: {
|
|
3457
|
+
data: number[];
|
|
3458
|
+
};
|
|
3459
|
+
} | {
|
|
3460
|
+
secp256k1Key: {
|
|
3461
|
+
data: number[];
|
|
3462
|
+
};
|
|
3463
|
+
} | {
|
|
3464
|
+
mlDsa65Key: {
|
|
3465
|
+
data: number[];
|
|
3466
|
+
};
|
|
3467
|
+
};
|
|
3468
|
+
deposit: bigint;
|
|
3469
|
+
};
|
|
3470
|
+
} | {
|
|
3471
|
+
withdrawFromGasKey: {
|
|
3472
|
+
publicKey: {
|
|
3473
|
+
ed25519Key: {
|
|
3474
|
+
data: number[];
|
|
3475
|
+
};
|
|
3476
|
+
} | {
|
|
3477
|
+
secp256k1Key: {
|
|
3478
|
+
data: number[];
|
|
3479
|
+
};
|
|
3480
|
+
} | {
|
|
3481
|
+
mlDsa65Key: {
|
|
3482
|
+
data: number[];
|
|
3483
|
+
};
|
|
3484
|
+
};
|
|
3485
|
+
amount: bigint;
|
|
3486
|
+
};
|
|
865
3487
|
} | {
|
|
866
3488
|
signedDelegate: {
|
|
867
3489
|
delegateAction: {
|
|
@@ -878,6 +3500,10 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
878
3500
|
secp256k1Key: {
|
|
879
3501
|
data: number[];
|
|
880
3502
|
};
|
|
3503
|
+
} | {
|
|
3504
|
+
mlDsa65Key: {
|
|
3505
|
+
data: number[];
|
|
3506
|
+
};
|
|
881
3507
|
};
|
|
882
3508
|
};
|
|
883
3509
|
} | {
|
|
@@ -907,6 +3533,10 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
907
3533
|
secp256k1Key: {
|
|
908
3534
|
data: number[];
|
|
909
3535
|
};
|
|
3536
|
+
} | {
|
|
3537
|
+
mlDsa65Key: {
|
|
3538
|
+
data: number[];
|
|
3539
|
+
};
|
|
910
3540
|
};
|
|
911
3541
|
accessKey: {
|
|
912
3542
|
nonce: bigint;
|
|
@@ -918,6 +3548,25 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
918
3548
|
};
|
|
919
3549
|
} | {
|
|
920
3550
|
fullAccess: {};
|
|
3551
|
+
} | {
|
|
3552
|
+
gasKeyFunctionCall: {
|
|
3553
|
+
gasKeyInfo: {
|
|
3554
|
+
balance: bigint;
|
|
3555
|
+
numNonces: number;
|
|
3556
|
+
};
|
|
3557
|
+
functionCall: {
|
|
3558
|
+
allowance: bigint | null;
|
|
3559
|
+
receiverId: string;
|
|
3560
|
+
methodNames: string[];
|
|
3561
|
+
};
|
|
3562
|
+
};
|
|
3563
|
+
} | {
|
|
3564
|
+
gasKeyFullAccess: {
|
|
3565
|
+
gasKeyInfo: {
|
|
3566
|
+
balance: bigint;
|
|
3567
|
+
numNonces: number;
|
|
3568
|
+
};
|
|
3569
|
+
};
|
|
921
3570
|
};
|
|
922
3571
|
};
|
|
923
3572
|
};
|
|
@@ -931,12 +3580,18 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
931
3580
|
secp256k1Key: {
|
|
932
3581
|
data: number[];
|
|
933
3582
|
};
|
|
3583
|
+
} | {
|
|
3584
|
+
mlDsa65Key: {
|
|
3585
|
+
data: number[];
|
|
3586
|
+
};
|
|
934
3587
|
};
|
|
935
3588
|
};
|
|
936
3589
|
} | {
|
|
937
3590
|
deleteAccount: {
|
|
938
3591
|
beneficiaryId: string;
|
|
939
3592
|
};
|
|
3593
|
+
} | {
|
|
3594
|
+
delegatePlaceholder: {};
|
|
940
3595
|
} | {
|
|
941
3596
|
deployGlobalContract: {
|
|
942
3597
|
code: Uint8Array<ArrayBufferLike>;
|
|
@@ -966,7 +3621,41 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
966
3621
|
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
967
3622
|
};
|
|
968
3623
|
};
|
|
969
|
-
deposit: bigint;
|
|
3624
|
+
deposit: bigint;
|
|
3625
|
+
};
|
|
3626
|
+
} | {
|
|
3627
|
+
transferToGasKey: {
|
|
3628
|
+
publicKey: {
|
|
3629
|
+
ed25519Key: {
|
|
3630
|
+
data: number[];
|
|
3631
|
+
};
|
|
3632
|
+
} | {
|
|
3633
|
+
secp256k1Key: {
|
|
3634
|
+
data: number[];
|
|
3635
|
+
};
|
|
3636
|
+
} | {
|
|
3637
|
+
mlDsa65Key: {
|
|
3638
|
+
data: number[];
|
|
3639
|
+
};
|
|
3640
|
+
};
|
|
3641
|
+
deposit: bigint;
|
|
3642
|
+
};
|
|
3643
|
+
} | {
|
|
3644
|
+
withdrawFromGasKey: {
|
|
3645
|
+
publicKey: {
|
|
3646
|
+
ed25519Key: {
|
|
3647
|
+
data: number[];
|
|
3648
|
+
};
|
|
3649
|
+
} | {
|
|
3650
|
+
secp256k1Key: {
|
|
3651
|
+
data: number[];
|
|
3652
|
+
};
|
|
3653
|
+
} | {
|
|
3654
|
+
mlDsa65Key: {
|
|
3655
|
+
data: number[];
|
|
3656
|
+
};
|
|
3657
|
+
};
|
|
3658
|
+
amount: bigint;
|
|
970
3659
|
};
|
|
971
3660
|
})[];
|
|
972
3661
|
nonce: bigint;
|
|
@@ -979,6 +3668,10 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
979
3668
|
secp256k1Key: {
|
|
980
3669
|
data: number[];
|
|
981
3670
|
};
|
|
3671
|
+
} | {
|
|
3672
|
+
mlDsa65Key: {
|
|
3673
|
+
data: number[];
|
|
3674
|
+
};
|
|
982
3675
|
};
|
|
983
3676
|
};
|
|
984
3677
|
signature: {
|
|
@@ -989,132 +3682,16 @@ export declare const TransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
989
3682
|
secp256k1Signature: {
|
|
990
3683
|
data: number[];
|
|
991
3684
|
};
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
}, string>;
|
|
996
|
-
/**
|
|
997
|
-
* SignedTransaction schema
|
|
998
|
-
*/
|
|
999
|
-
export declare const SignedTransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
1000
|
-
transaction: {
|
|
1001
|
-
signerId: string;
|
|
1002
|
-
publicKey: {
|
|
1003
|
-
ed25519Key: {
|
|
1004
|
-
data: number[];
|
|
1005
|
-
};
|
|
1006
|
-
} | {
|
|
1007
|
-
secp256k1Key: {
|
|
1008
|
-
data: number[];
|
|
1009
|
-
};
|
|
1010
|
-
};
|
|
1011
|
-
nonce: bigint;
|
|
1012
|
-
receiverId: string;
|
|
1013
|
-
blockHash: number[];
|
|
1014
|
-
actions: ({
|
|
1015
|
-
stake: {
|
|
1016
|
-
stake: bigint;
|
|
1017
|
-
publicKey: {
|
|
1018
|
-
ed25519Key: {
|
|
1019
|
-
data: number[];
|
|
1020
|
-
};
|
|
1021
|
-
} | {
|
|
1022
|
-
secp256k1Key: {
|
|
1023
|
-
data: number[];
|
|
1024
|
-
};
|
|
1025
|
-
};
|
|
1026
|
-
};
|
|
1027
|
-
} | {
|
|
1028
|
-
createAccount: {};
|
|
1029
|
-
} | {
|
|
1030
|
-
deployContract: {
|
|
1031
|
-
code: Uint8Array<ArrayBufferLike>;
|
|
1032
|
-
};
|
|
1033
|
-
} | {
|
|
1034
|
-
functionCall: {
|
|
1035
|
-
methodName: string;
|
|
1036
|
-
args: Uint8Array<ArrayBufferLike>;
|
|
1037
|
-
gas: bigint;
|
|
1038
|
-
deposit: bigint;
|
|
1039
|
-
};
|
|
1040
|
-
} | {
|
|
1041
|
-
transfer: {
|
|
1042
|
-
deposit: bigint;
|
|
1043
|
-
};
|
|
1044
|
-
} | {
|
|
1045
|
-
addKey: {
|
|
1046
|
-
publicKey: {
|
|
1047
|
-
ed25519Key: {
|
|
1048
|
-
data: number[];
|
|
1049
|
-
};
|
|
1050
|
-
} | {
|
|
1051
|
-
secp256k1Key: {
|
|
1052
|
-
data: number[];
|
|
1053
|
-
};
|
|
1054
|
-
};
|
|
1055
|
-
accessKey: {
|
|
1056
|
-
nonce: bigint;
|
|
1057
|
-
permission: {
|
|
1058
|
-
functionCall: {
|
|
1059
|
-
allowance: bigint | null;
|
|
1060
|
-
receiverId: string;
|
|
1061
|
-
methodNames: string[];
|
|
1062
|
-
};
|
|
1063
|
-
} | {
|
|
1064
|
-
fullAccess: {};
|
|
1065
|
-
};
|
|
1066
|
-
};
|
|
1067
|
-
};
|
|
1068
|
-
} | {
|
|
1069
|
-
deleteKey: {
|
|
1070
|
-
publicKey: {
|
|
1071
|
-
ed25519Key: {
|
|
1072
|
-
data: number[];
|
|
1073
|
-
};
|
|
1074
|
-
} | {
|
|
1075
|
-
secp256k1Key: {
|
|
1076
|
-
data: number[];
|
|
1077
|
-
};
|
|
1078
|
-
};
|
|
1079
|
-
};
|
|
1080
|
-
} | {
|
|
1081
|
-
deleteAccount: {
|
|
1082
|
-
beneficiaryId: string;
|
|
1083
|
-
};
|
|
1084
|
-
} | {
|
|
1085
|
-
deployGlobalContract: {
|
|
1086
|
-
code: Uint8Array<ArrayBufferLike>;
|
|
1087
|
-
deployMode: {
|
|
1088
|
-
CodeHash: {};
|
|
1089
|
-
} | {
|
|
1090
|
-
AccountId: {};
|
|
1091
|
-
};
|
|
1092
|
-
};
|
|
1093
|
-
} | {
|
|
1094
|
-
useGlobalContract: {
|
|
1095
|
-
contractIdentifier: {
|
|
1096
|
-
CodeHash: number[];
|
|
1097
|
-
} | {
|
|
1098
|
-
AccountId: string;
|
|
1099
|
-
};
|
|
1100
|
-
};
|
|
1101
|
-
} | {
|
|
1102
|
-
deterministicStateInit: {
|
|
1103
|
-
stateInit: {
|
|
1104
|
-
V1: {
|
|
1105
|
-
code: {
|
|
1106
|
-
CodeHash: number[];
|
|
1107
|
-
} | {
|
|
1108
|
-
AccountId: string;
|
|
1109
|
-
};
|
|
1110
|
-
data: Map<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
|
|
1111
|
-
};
|
|
3685
|
+
} | {
|
|
3686
|
+
mlDsa65Signature: {
|
|
3687
|
+
data: number[];
|
|
1112
3688
|
};
|
|
1113
|
-
deposit: bigint;
|
|
1114
3689
|
};
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
|
|
3690
|
+
};
|
|
3691
|
+
} | {
|
|
3692
|
+
delegateV2: {
|
|
3693
|
+
delegateAction: {
|
|
3694
|
+
v2: {
|
|
1118
3695
|
senderId: string;
|
|
1119
3696
|
receiverId: string;
|
|
1120
3697
|
actions: ({
|
|
@@ -1128,6 +3705,10 @@ export declare const SignedTransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
1128
3705
|
secp256k1Key: {
|
|
1129
3706
|
data: number[];
|
|
1130
3707
|
};
|
|
3708
|
+
} | {
|
|
3709
|
+
mlDsa65Key: {
|
|
3710
|
+
data: number[];
|
|
3711
|
+
};
|
|
1131
3712
|
};
|
|
1132
3713
|
};
|
|
1133
3714
|
} | {
|
|
@@ -1157,6 +3738,10 @@ export declare const SignedTransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
1157
3738
|
secp256k1Key: {
|
|
1158
3739
|
data: number[];
|
|
1159
3740
|
};
|
|
3741
|
+
} | {
|
|
3742
|
+
mlDsa65Key: {
|
|
3743
|
+
data: number[];
|
|
3744
|
+
};
|
|
1160
3745
|
};
|
|
1161
3746
|
accessKey: {
|
|
1162
3747
|
nonce: bigint;
|
|
@@ -1168,6 +3753,25 @@ export declare const SignedTransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
1168
3753
|
};
|
|
1169
3754
|
} | {
|
|
1170
3755
|
fullAccess: {};
|
|
3756
|
+
} | {
|
|
3757
|
+
gasKeyFunctionCall: {
|
|
3758
|
+
gasKeyInfo: {
|
|
3759
|
+
balance: bigint;
|
|
3760
|
+
numNonces: number;
|
|
3761
|
+
};
|
|
3762
|
+
functionCall: {
|
|
3763
|
+
allowance: bigint | null;
|
|
3764
|
+
receiverId: string;
|
|
3765
|
+
methodNames: string[];
|
|
3766
|
+
};
|
|
3767
|
+
};
|
|
3768
|
+
} | {
|
|
3769
|
+
gasKeyFullAccess: {
|
|
3770
|
+
gasKeyInfo: {
|
|
3771
|
+
balance: bigint;
|
|
3772
|
+
numNonces: number;
|
|
3773
|
+
};
|
|
3774
|
+
};
|
|
1171
3775
|
};
|
|
1172
3776
|
};
|
|
1173
3777
|
};
|
|
@@ -1181,12 +3785,18 @@ export declare const SignedTransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
1181
3785
|
secp256k1Key: {
|
|
1182
3786
|
data: number[];
|
|
1183
3787
|
};
|
|
3788
|
+
} | {
|
|
3789
|
+
mlDsa65Key: {
|
|
3790
|
+
data: number[];
|
|
3791
|
+
};
|
|
1184
3792
|
};
|
|
1185
3793
|
};
|
|
1186
3794
|
} | {
|
|
1187
3795
|
deleteAccount: {
|
|
1188
3796
|
beneficiaryId: string;
|
|
1189
3797
|
};
|
|
3798
|
+
} | {
|
|
3799
|
+
delegatePlaceholder: {};
|
|
1190
3800
|
} | {
|
|
1191
3801
|
deployGlobalContract: {
|
|
1192
3802
|
code: Uint8Array<ArrayBufferLike>;
|
|
@@ -1218,8 +3828,51 @@ export declare const SignedTransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
1218
3828
|
};
|
|
1219
3829
|
deposit: bigint;
|
|
1220
3830
|
};
|
|
3831
|
+
} | {
|
|
3832
|
+
transferToGasKey: {
|
|
3833
|
+
publicKey: {
|
|
3834
|
+
ed25519Key: {
|
|
3835
|
+
data: number[];
|
|
3836
|
+
};
|
|
3837
|
+
} | {
|
|
3838
|
+
secp256k1Key: {
|
|
3839
|
+
data: number[];
|
|
3840
|
+
};
|
|
3841
|
+
} | {
|
|
3842
|
+
mlDsa65Key: {
|
|
3843
|
+
data: number[];
|
|
3844
|
+
};
|
|
3845
|
+
};
|
|
3846
|
+
deposit: bigint;
|
|
3847
|
+
};
|
|
3848
|
+
} | {
|
|
3849
|
+
withdrawFromGasKey: {
|
|
3850
|
+
publicKey: {
|
|
3851
|
+
ed25519Key: {
|
|
3852
|
+
data: number[];
|
|
3853
|
+
};
|
|
3854
|
+
} | {
|
|
3855
|
+
secp256k1Key: {
|
|
3856
|
+
data: number[];
|
|
3857
|
+
};
|
|
3858
|
+
} | {
|
|
3859
|
+
mlDsa65Key: {
|
|
3860
|
+
data: number[];
|
|
3861
|
+
};
|
|
3862
|
+
};
|
|
3863
|
+
amount: bigint;
|
|
3864
|
+
};
|
|
1221
3865
|
})[];
|
|
1222
|
-
nonce:
|
|
3866
|
+
nonce: {
|
|
3867
|
+
nonce: {
|
|
3868
|
+
nonce: bigint;
|
|
3869
|
+
};
|
|
3870
|
+
} | {
|
|
3871
|
+
gasKeyNonce: {
|
|
3872
|
+
nonce: bigint;
|
|
3873
|
+
nonceIndex: number;
|
|
3874
|
+
};
|
|
3875
|
+
};
|
|
1223
3876
|
maxBlockHeight: bigint;
|
|
1224
3877
|
publicKey: {
|
|
1225
3878
|
ed25519Key: {
|
|
@@ -1229,30 +3882,36 @@ export declare const SignedTransactionSchema: import("@zorsh/zorsh").Schema<{
|
|
|
1229
3882
|
secp256k1Key: {
|
|
1230
3883
|
data: number[];
|
|
1231
3884
|
};
|
|
3885
|
+
} | {
|
|
3886
|
+
mlDsa65Key: {
|
|
3887
|
+
data: number[];
|
|
3888
|
+
};
|
|
1232
3889
|
};
|
|
1233
3890
|
};
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
3891
|
+
};
|
|
3892
|
+
signature: {
|
|
3893
|
+
ed25519Signature: {
|
|
3894
|
+
data: number[];
|
|
3895
|
+
};
|
|
3896
|
+
} | {
|
|
3897
|
+
secp256k1Signature: {
|
|
3898
|
+
data: number[];
|
|
3899
|
+
};
|
|
3900
|
+
} | {
|
|
3901
|
+
mlDsa65Signature: {
|
|
3902
|
+
data: number[];
|
|
1242
3903
|
};
|
|
1243
3904
|
};
|
|
1244
|
-
})[];
|
|
1245
|
-
};
|
|
1246
|
-
signature: {
|
|
1247
|
-
ed25519Signature: {
|
|
1248
|
-
data: number[];
|
|
1249
3905
|
};
|
|
3906
|
+
})[];
|
|
3907
|
+
nonceMode: {
|
|
3908
|
+
monotonic: {};
|
|
1250
3909
|
} | {
|
|
1251
|
-
|
|
1252
|
-
data: number[];
|
|
1253
|
-
};
|
|
3910
|
+
strict: {};
|
|
1254
3911
|
};
|
|
1255
3912
|
}, string>;
|
|
3913
|
+
export type TransactionNonceBorsh = b.infer<typeof TransactionNonceSchema>;
|
|
3914
|
+
export type NonceModeBorsh = b.infer<typeof NonceModeSchema>;
|
|
1256
3915
|
/**
|
|
1257
3916
|
* Convert our PublicKey type to zorsh-compatible format.
|
|
1258
3917
|
*
|
|
@@ -1268,6 +3927,11 @@ export declare function publicKeyToZorsh(pk: Secp256k1PublicKey): {
|
|
|
1268
3927
|
data: number[];
|
|
1269
3928
|
};
|
|
1270
3929
|
};
|
|
3930
|
+
export declare function publicKeyToZorsh(pk: MlDsa65PublicKey): {
|
|
3931
|
+
mlDsa65Key: {
|
|
3932
|
+
data: number[];
|
|
3933
|
+
};
|
|
3934
|
+
};
|
|
1271
3935
|
export declare function publicKeyToZorsh(pk: PublicKey): {
|
|
1272
3936
|
ed25519Key: {
|
|
1273
3937
|
data: number[];
|
|
@@ -1276,6 +3940,10 @@ export declare function publicKeyToZorsh(pk: PublicKey): {
|
|
|
1276
3940
|
secp256k1Key: {
|
|
1277
3941
|
data: number[];
|
|
1278
3942
|
};
|
|
3943
|
+
} | {
|
|
3944
|
+
mlDsa65Key: {
|
|
3945
|
+
data: number[];
|
|
3946
|
+
};
|
|
1279
3947
|
};
|
|
1280
3948
|
/**
|
|
1281
3949
|
* Convert our Signature type to zorsh-compatible format.
|
|
@@ -1292,6 +3960,11 @@ export declare function signatureToZorsh(sig: Secp256k1Signature): {
|
|
|
1292
3960
|
data: number[];
|
|
1293
3961
|
};
|
|
1294
3962
|
};
|
|
3963
|
+
export declare function signatureToZorsh(sig: MlDsa65Signature): {
|
|
3964
|
+
mlDsa65Signature: {
|
|
3965
|
+
data: number[];
|
|
3966
|
+
};
|
|
3967
|
+
};
|
|
1295
3968
|
export declare function signatureToZorsh(sig: Signature): {
|
|
1296
3969
|
ed25519Signature: {
|
|
1297
3970
|
data: number[];
|
|
@@ -1300,6 +3973,10 @@ export declare function signatureToZorsh(sig: Signature): {
|
|
|
1300
3973
|
secp256k1Signature: {
|
|
1301
3974
|
data: number[];
|
|
1302
3975
|
};
|
|
3976
|
+
} | {
|
|
3977
|
+
mlDsa65Signature: {
|
|
3978
|
+
data: number[];
|
|
3979
|
+
};
|
|
1303
3980
|
};
|
|
1304
3981
|
/**
|
|
1305
3982
|
* Serialize a transaction to bytes
|
|
@@ -1309,6 +3986,38 @@ export declare function serializeTransaction(tx: Transaction): Uint8Array;
|
|
|
1309
3986
|
* Serialize a signed transaction to bytes
|
|
1310
3987
|
*/
|
|
1311
3988
|
export declare function serializeSignedTransaction(signedTx: SignedTransaction): Uint8Array;
|
|
3989
|
+
/**
|
|
3990
|
+
* The V1 fields of a transaction, mirroring nearcore `TransactionV1`.
|
|
3991
|
+
*
|
|
3992
|
+
* `nonce` is a {@link TransactionNonceBorsh} (carries a nonce index for gas
|
|
3993
|
+
* keys) and `nonceMode` controls validation. The remaining fields match the
|
|
3994
|
+
* ordinary {@link Transaction}.
|
|
3995
|
+
*/
|
|
3996
|
+
export interface TransactionV1 {
|
|
3997
|
+
signerId: string;
|
|
3998
|
+
publicKey: PublicKey;
|
|
3999
|
+
nonce: TransactionNonceBorsh;
|
|
4000
|
+
receiverId: string;
|
|
4001
|
+
blockHash: Uint8Array;
|
|
4002
|
+
actions: Action[];
|
|
4003
|
+
nonceMode: NonceModeBorsh;
|
|
4004
|
+
}
|
|
4005
|
+
/**
|
|
4006
|
+
* Serialize a V1 transaction to wire bytes (`[0x01] ++ borsh(TransactionV1)`).
|
|
4007
|
+
*
|
|
4008
|
+
* Use this for the signing payload of a gas-key or strict-nonce transaction. A
|
|
4009
|
+
* V0 transaction stays tag-less via {@link serializeTransaction}; never write a
|
|
4010
|
+
* `0x00` tag for V0 (that would break backward compatibility).
|
|
4011
|
+
*/
|
|
4012
|
+
export declare function serializeTransactionV1(tx: TransactionV1): Uint8Array;
|
|
4013
|
+
/**
|
|
4014
|
+
* Serialize a signed V1 transaction to wire bytes.
|
|
4015
|
+
*
|
|
4016
|
+
* The encoding is `[0x01] ++ borsh(TransactionV1) ++ borsh(Signature)`: the
|
|
4017
|
+
* version tag belongs to the inner `Transaction`, and the signature follows the
|
|
4018
|
+
* (tagged) transaction, matching nearcore's `SignedTransaction` borsh.
|
|
4019
|
+
*/
|
|
4020
|
+
export declare function serializeSignedTransactionV1(tx: TransactionV1, signature: Signature): Uint8Array;
|
|
1312
4021
|
/**
|
|
1313
4022
|
* Serialize a delegate action for signing
|
|
1314
4023
|
*
|
|
@@ -1330,6 +4039,18 @@ export declare function serializeSignedTransaction(signedTx: SignedTransaction):
|
|
|
1330
4039
|
* ```
|
|
1331
4040
|
*/
|
|
1332
4041
|
export declare function serializeDelegateAction(delegateAction: DelegateAction): Uint8Array;
|
|
4042
|
+
/**
|
|
4043
|
+
* Serialize a V2 delegate action for signing (NEP-611 / NEAR 2.13).
|
|
4044
|
+
*
|
|
4045
|
+
* Prepends the DISTINCT V2 domain tag ({@link DELEGATE_ACTION_V2_PREFIX}) and
|
|
4046
|
+
* wraps the action in the versioned payload enum (`V2` => `[0x00]`), exactly as
|
|
4047
|
+
* nearcore's `VersionedDelegateActionPayload::get_nep461_hash` does. The result
|
|
4048
|
+
* is hashed (SHA-256) and signed.
|
|
4049
|
+
*
|
|
4050
|
+
* @param delegateAction - The V2 delegate action in Borsh-ready form (its
|
|
4051
|
+
* `publicKey` already converted via {@link publicKeyToZorsh}).
|
|
4052
|
+
*/
|
|
4053
|
+
export declare function serializeDelegateActionV2(delegateAction: DelegateActionV2Borsh): Uint8Array;
|
|
1333
4054
|
export type DelegateActionPayloadFormat = "base64" | "bytes";
|
|
1334
4055
|
type DelegatePayloadReturn<F extends DelegateActionPayloadFormat> = F extends "bytes" ? Uint8Array : string;
|
|
1335
4056
|
/**
|
|
@@ -1345,4 +4066,17 @@ export declare function encodeSignedDelegateAction<F extends DelegateActionPaylo
|
|
|
1345
4066
|
* SignedDelegateAction that `.delegate()` returns.
|
|
1346
4067
|
*/
|
|
1347
4068
|
export declare function decodeSignedDelegateAction(payload: string | Uint8Array): SignedDelegateAction;
|
|
4069
|
+
/**
|
|
4070
|
+
* Encode a V2 signed delegate action ({@link DelegateV2Action}) for transport.
|
|
4071
|
+
*
|
|
4072
|
+
* - Default output is a base64 string that can be sent via JSON/HTTP.
|
|
4073
|
+
* - Pass `"bytes"` to receive a raw Uint8Array.
|
|
4074
|
+
*/
|
|
4075
|
+
export declare function encodeSignedDelegateActionV2(signedDelegate: DelegateV2Action): string;
|
|
4076
|
+
export declare function encodeSignedDelegateActionV2<F extends DelegateActionPayloadFormat>(signedDelegate: DelegateV2Action, format: F): DelegatePayloadReturn<F>;
|
|
4077
|
+
/**
|
|
4078
|
+
* Decode an encoded V2 payload (base64 string or bytes) back into a
|
|
4079
|
+
* {@link DelegateV2Action}.
|
|
4080
|
+
*/
|
|
4081
|
+
export declare function decodeSignedDelegateActionV2(payload: string | Uint8Array): DelegateV2Action;
|
|
1348
4082
|
//# sourceMappingURL=schema.d.ts.map
|