@fastnear/utils 0.6.2 → 0.7.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.
@@ -1,3228 +1,109 @@
1
+ import { Hex } from '@noble/curves/abstract/utils';
2
+ import { Schema, serialize, deserialize } from 'borsh';
1
3
  import * as borshSchema from '@fastnear/borsh-schema';
2
- export { borshSchema as reExportBorshSchema };
3
4
  export { sha256 } from '@noble/hashes/sha2';
4
5
  export { base58_to_binary as fromBase58, binary_to_base58 as toBase58 } from 'base58-js';
5
6
 
6
- declare const keyFromString: (key: any) => any;
7
- declare const keyToString: (key: any) => string;
8
- declare function publicKeyFromPrivate(privateKey: any): string;
7
+ declare const keyFromString: (key: any) => Uint8Array<ArrayBufferLike>;
8
+ declare const keyToString: (key: Uint8Array) => string;
9
+ declare function publicKeyFromPrivate(privateKey: string): string;
9
10
  declare function privateKeyFromRandom(): string;
10
- declare function signHash(hash: any, privateKey: any): any;
11
- declare function signBytes(bytes: any, privateKey: any): any;
11
+ declare function signHash(hashBytes: Uint8Array, privateKey: string, opts?: any): Hex;
12
+ declare function signBytes(bytes: Uint8Array, privateKey: string): Hex;
12
13
 
13
- declare function mapTransaction(jsonTransaction: any): {
14
- signerId: any;
14
+ interface PlainTransaction {
15
+ signerId: string;
16
+ publicKey: string;
17
+ nonce: string | bigint | number;
18
+ receiverId: string;
19
+ blockHash: string;
20
+ actions: Array<any>;
21
+ }
22
+ interface PlainSignedTransaction {
23
+ transaction: object;
24
+ signature: object;
25
+ }
26
+ declare const txToJson: (tx: PlainTransaction) => Record<string, any>;
27
+ declare const txToJsonStringified: (tx: PlainTransaction) => string;
28
+ declare function mapTransaction(jsonTransaction: PlainTransaction): {
29
+ signerId: string;
15
30
  publicKey: {
16
31
  ed25519Key: {
17
- data: any;
32
+ data: Uint8Array<ArrayBufferLike>;
18
33
  };
19
34
  };
20
35
  nonce: bigint;
21
- receiverId: any;
22
- blockHash: any;
23
- actions: any;
36
+ receiverId: string;
37
+ blockHash: Uint8Array<ArrayBufferLike>;
38
+ actions: object[];
24
39
  };
25
- declare function serializeTransaction(jsonTransaction: any): Uint8Array<ArrayBufferLike>;
26
- declare function serializeSignedTransaction(jsonTransaction: any, signature: any): Uint8Array<ArrayBufferLike>;
27
- declare function mapAction(action: any): any;
40
+ declare function serializeTransaction(jsonTransaction: PlainTransaction): Uint8Array<ArrayBufferLike>;
41
+ declare function serializeSignedTransaction(jsonTransaction: PlainTransaction, signature: any): Uint8Array<ArrayBufferLike>;
42
+ declare function mapAction(action: any): object;
28
43
  declare const SCHEMA: {
29
- Ed25519Signature: {
30
- struct: {
31
- data: {
32
- array: {
33
- type: string;
34
- len: number;
35
- };
36
- };
37
- };
38
- };
39
- Secp256k1Signature: {
40
- struct: {
41
- data: {
42
- array: {
43
- type: string;
44
- len: number;
45
- };
46
- };
47
- };
48
- };
49
- Signature: {
50
- enum: ({
51
- struct: {
52
- ed25519Signature: {
53
- struct: {
54
- data: {
55
- array: {
56
- type: string;
57
- len: number;
58
- };
59
- };
60
- };
61
- };
62
- secp256k1Signature?: undefined;
63
- };
64
- } | {
65
- struct: {
66
- secp256k1Signature: {
67
- struct: {
68
- data: {
69
- array: {
70
- type: string;
71
- len: number;
72
- };
73
- };
74
- };
75
- };
76
- ed25519Signature?: undefined;
77
- };
78
- })[];
79
- };
80
- Ed25519Data: {
81
- struct: {
82
- data: {
83
- array: {
84
- type: string;
85
- len: number;
86
- };
87
- };
88
- };
89
- };
90
- Secp256k1Data: {
91
- struct: {
92
- data: {
93
- array: {
94
- type: string;
95
- len: number;
96
- };
97
- };
98
- };
99
- };
100
- PublicKey: {
101
- enum: ({
102
- struct: {
103
- ed25519Key: {
104
- struct: {
105
- data: {
106
- array: {
107
- type: string;
108
- len: number;
109
- };
110
- };
111
- };
112
- };
113
- secp256k1Key?: undefined;
114
- };
115
- } | {
116
- struct: {
117
- secp256k1Key: {
118
- struct: {
119
- data: {
120
- array: {
121
- type: string;
122
- len: number;
123
- };
124
- };
125
- };
126
- };
127
- ed25519Key?: undefined;
128
- };
129
- })[];
130
- };
131
- FunctionCallPermission: {
132
- struct: {
133
- allowance: {
134
- option: string;
135
- };
136
- receiverId: string;
137
- methodNames: {
138
- array: {
139
- type: string;
140
- };
141
- };
142
- };
143
- };
144
- FullAccessPermission: {
145
- struct: {};
146
- };
147
- AccessKeyPermission: {
148
- enum: ({
149
- struct: {
150
- functionCall: {
151
- struct: {
152
- allowance: {
153
- option: string;
154
- };
155
- receiverId: string;
156
- methodNames: {
157
- array: {
158
- type: string;
159
- };
160
- };
161
- };
162
- };
163
- fullAccess?: undefined;
164
- };
165
- } | {
166
- struct: {
167
- fullAccess: {
168
- struct: {};
169
- };
170
- functionCall?: undefined;
171
- };
172
- })[];
173
- };
174
- AccessKey: {
175
- struct: {
176
- nonce: string;
177
- permission: {
178
- enum: ({
179
- struct: {
180
- functionCall: {
181
- struct: {
182
- allowance: {
183
- option: string;
184
- };
185
- receiverId: string;
186
- methodNames: {
187
- array: {
188
- type: string;
189
- };
190
- };
191
- };
192
- };
193
- fullAccess?: undefined;
194
- };
195
- } | {
196
- struct: {
197
- fullAccess: {
198
- struct: {};
199
- };
200
- functionCall?: undefined;
201
- };
202
- })[];
203
- };
204
- };
205
- };
206
- CreateAccount: {
207
- struct: {};
208
- };
209
- DeployContract: {
210
- struct: {
211
- code: {
212
- array: {
213
- type: string;
214
- };
215
- };
216
- };
217
- };
218
- FunctionCall: {
219
- struct: {
220
- methodName: string;
221
- args: {
222
- array: {
223
- type: string;
224
- };
225
- };
226
- gas: string;
227
- deposit: string;
228
- };
229
- };
230
- Transfer: {
231
- struct: {
232
- deposit: string;
233
- };
234
- };
235
- Stake: {
236
- struct: {
237
- stake: string;
238
- publicKey: {
239
- enum: ({
240
- struct: {
241
- ed25519Key: {
242
- struct: {
243
- data: {
244
- array: {
245
- type: string;
246
- len: number;
247
- };
248
- };
249
- };
250
- };
251
- secp256k1Key?: undefined;
252
- };
253
- } | {
254
- struct: {
255
- secp256k1Key: {
256
- struct: {
257
- data: {
258
- array: {
259
- type: string;
260
- len: number;
261
- };
262
- };
263
- };
264
- };
265
- ed25519Key?: undefined;
266
- };
267
- })[];
268
- };
269
- };
270
- };
271
- AddKey: {
272
- struct: {
273
- publicKey: {
274
- enum: ({
275
- struct: {
276
- ed25519Key: {
277
- struct: {
278
- data: {
279
- array: {
280
- type: string;
281
- len: number;
282
- };
283
- };
284
- };
285
- };
286
- secp256k1Key?: undefined;
287
- };
288
- } | {
289
- struct: {
290
- secp256k1Key: {
291
- struct: {
292
- data: {
293
- array: {
294
- type: string;
295
- len: number;
296
- };
297
- };
298
- };
299
- };
300
- ed25519Key?: undefined;
301
- };
302
- })[];
303
- };
304
- accessKey: {
305
- struct: {
306
- nonce: string;
307
- permission: {
308
- enum: ({
309
- struct: {
310
- functionCall: {
311
- struct: {
312
- allowance: {
313
- option: string;
314
- };
315
- receiverId: string;
316
- methodNames: {
317
- array: {
318
- type: string;
319
- };
320
- };
321
- };
322
- };
323
- fullAccess?: undefined;
324
- };
325
- } | {
326
- struct: {
327
- fullAccess: {
328
- struct: {};
329
- };
330
- functionCall?: undefined;
331
- };
332
- })[];
333
- };
334
- };
335
- };
336
- };
337
- };
338
- DeleteKey: {
339
- struct: {
340
- publicKey: {
341
- enum: ({
342
- struct: {
343
- ed25519Key: {
344
- struct: {
345
- data: {
346
- array: {
347
- type: string;
348
- len: number;
349
- };
350
- };
351
- };
352
- };
353
- secp256k1Key?: undefined;
354
- };
355
- } | {
356
- struct: {
357
- secp256k1Key: {
358
- struct: {
359
- data: {
360
- array: {
361
- type: string;
362
- len: number;
363
- };
364
- };
365
- };
366
- };
367
- ed25519Key?: undefined;
368
- };
369
- })[];
370
- };
371
- };
372
- };
373
- DeleteAccount: {
374
- struct: {
375
- beneficiaryId: string;
376
- };
377
- };
378
- ClassicAction: {
379
- enum: ({
380
- struct: {
381
- createAccount: {
382
- struct: {};
383
- };
384
- deployContract?: undefined;
385
- functionCall?: undefined;
386
- transfer?: undefined;
387
- stake?: undefined;
388
- addKey?: undefined;
389
- deleteKey?: undefined;
390
- deleteAccount?: undefined;
391
- };
392
- } | {
393
- struct: {
394
- deployContract: {
395
- struct: {
396
- code: {
397
- array: {
398
- type: string;
399
- };
400
- };
401
- };
402
- };
403
- createAccount?: undefined;
404
- functionCall?: undefined;
405
- transfer?: undefined;
406
- stake?: undefined;
407
- addKey?: undefined;
408
- deleteKey?: undefined;
409
- deleteAccount?: undefined;
410
- };
411
- } | {
412
- struct: {
413
- functionCall: {
414
- struct: {
415
- methodName: string;
416
- args: {
417
- array: {
418
- type: string;
419
- };
420
- };
421
- gas: string;
422
- deposit: string;
423
- };
424
- };
425
- createAccount?: undefined;
426
- deployContract?: undefined;
427
- transfer?: undefined;
428
- stake?: undefined;
429
- addKey?: undefined;
430
- deleteKey?: undefined;
431
- deleteAccount?: undefined;
432
- };
433
- } | {
434
- struct: {
435
- transfer: {
436
- struct: {
437
- deposit: string;
438
- };
439
- };
440
- createAccount?: undefined;
441
- deployContract?: undefined;
442
- functionCall?: undefined;
443
- stake?: undefined;
444
- addKey?: undefined;
445
- deleteKey?: undefined;
446
- deleteAccount?: undefined;
447
- };
448
- } | {
449
- struct: {
450
- stake: {
451
- struct: {
452
- stake: string;
453
- publicKey: {
454
- enum: ({
455
- struct: {
456
- ed25519Key: {
457
- struct: {
458
- data: {
459
- array: {
460
- type: string;
461
- len: number;
462
- };
463
- };
464
- };
465
- };
466
- secp256k1Key?: undefined;
467
- };
468
- } | {
469
- struct: {
470
- secp256k1Key: {
471
- struct: {
472
- data: {
473
- array: {
474
- type: string;
475
- len: number;
476
- };
477
- };
478
- };
479
- };
480
- ed25519Key?: undefined;
481
- };
482
- })[];
483
- };
484
- };
485
- };
486
- createAccount?: undefined;
487
- deployContract?: undefined;
488
- functionCall?: undefined;
489
- transfer?: undefined;
490
- addKey?: undefined;
491
- deleteKey?: undefined;
492
- deleteAccount?: undefined;
493
- };
494
- } | {
495
- struct: {
496
- addKey: {
497
- struct: {
498
- publicKey: {
499
- enum: ({
500
- struct: {
501
- ed25519Key: {
502
- struct: {
503
- data: {
504
- array: {
505
- type: string;
506
- len: number;
507
- };
508
- };
509
- };
510
- };
511
- secp256k1Key?: undefined;
512
- };
513
- } | {
514
- struct: {
515
- secp256k1Key: {
516
- struct: {
517
- data: {
518
- array: {
519
- type: string;
520
- len: number;
521
- };
522
- };
523
- };
524
- };
525
- ed25519Key?: undefined;
526
- };
527
- })[];
528
- };
529
- accessKey: {
530
- struct: {
531
- nonce: string;
532
- permission: {
533
- enum: ({
534
- struct: {
535
- functionCall: {
536
- struct: {
537
- allowance: {
538
- option: string;
539
- };
540
- receiverId: string;
541
- methodNames: {
542
- array: {
543
- type: string;
544
- };
545
- };
546
- };
547
- };
548
- fullAccess?: undefined;
549
- };
550
- } | {
551
- struct: {
552
- fullAccess: {
553
- struct: {};
554
- };
555
- functionCall?: undefined;
556
- };
557
- })[];
558
- };
559
- };
560
- };
561
- };
562
- };
563
- createAccount?: undefined;
564
- deployContract?: undefined;
565
- functionCall?: undefined;
566
- transfer?: undefined;
567
- stake?: undefined;
568
- deleteKey?: undefined;
569
- deleteAccount?: undefined;
570
- };
571
- } | {
572
- struct: {
573
- deleteKey: {
574
- struct: {
575
- publicKey: {
576
- enum: ({
577
- struct: {
578
- ed25519Key: {
579
- struct: {
580
- data: {
581
- array: {
582
- type: string;
583
- len: number;
584
- };
585
- };
586
- };
587
- };
588
- secp256k1Key?: undefined;
589
- };
590
- } | {
591
- struct: {
592
- secp256k1Key: {
593
- struct: {
594
- data: {
595
- array: {
596
- type: string;
597
- len: number;
598
- };
599
- };
600
- };
601
- };
602
- ed25519Key?: undefined;
603
- };
604
- })[];
605
- };
606
- };
607
- };
608
- createAccount?: undefined;
609
- deployContract?: undefined;
610
- functionCall?: undefined;
611
- transfer?: undefined;
612
- stake?: undefined;
613
- addKey?: undefined;
614
- deleteAccount?: undefined;
615
- };
616
- } | {
617
- struct: {
618
- deleteAccount: {
619
- struct: {
620
- beneficiaryId: string;
621
- };
622
- };
623
- createAccount?: undefined;
624
- deployContract?: undefined;
625
- functionCall?: undefined;
626
- transfer?: undefined;
627
- stake?: undefined;
628
- addKey?: undefined;
629
- deleteKey?: undefined;
630
- };
631
- })[];
632
- };
633
- DelegateAction: {
634
- struct: {
635
- senderId: string;
636
- receiverId: string;
637
- actions: {
638
- array: {
639
- type: {
640
- enum: ({
641
- struct: {
642
- createAccount: {
643
- struct: {};
644
- };
645
- deployContract?: undefined;
646
- functionCall?: undefined;
647
- transfer?: undefined;
648
- stake?: undefined;
649
- addKey?: undefined;
650
- deleteKey?: undefined;
651
- deleteAccount?: undefined;
652
- };
653
- } | {
654
- struct: {
655
- deployContract: {
656
- struct: {
657
- code: {
658
- array: {
659
- type: string;
660
- };
661
- };
662
- };
663
- };
664
- createAccount?: undefined;
665
- functionCall?: undefined;
666
- transfer?: undefined;
667
- stake?: undefined;
668
- addKey?: undefined;
669
- deleteKey?: undefined;
670
- deleteAccount?: undefined;
671
- };
672
- } | {
673
- struct: {
674
- functionCall: {
675
- struct: {
676
- methodName: string;
677
- args: {
678
- array: {
679
- type: string;
680
- };
681
- };
682
- gas: string;
683
- deposit: string;
684
- };
685
- };
686
- createAccount?: undefined;
687
- deployContract?: undefined;
688
- transfer?: undefined;
689
- stake?: undefined;
690
- addKey?: undefined;
691
- deleteKey?: undefined;
692
- deleteAccount?: undefined;
693
- };
694
- } | {
695
- struct: {
696
- transfer: {
697
- struct: {
698
- deposit: string;
699
- };
700
- };
701
- createAccount?: undefined;
702
- deployContract?: undefined;
703
- functionCall?: undefined;
704
- stake?: undefined;
705
- addKey?: undefined;
706
- deleteKey?: undefined;
707
- deleteAccount?: undefined;
708
- };
709
- } | {
710
- struct: {
711
- stake: {
712
- struct: {
713
- stake: string;
714
- publicKey: {
715
- enum: ({
716
- struct: {
717
- ed25519Key: {
718
- struct: {
719
- data: {
720
- array: {
721
- type: string;
722
- len: number;
723
- };
724
- };
725
- };
726
- };
727
- secp256k1Key?: undefined;
728
- };
729
- } | {
730
- struct: {
731
- secp256k1Key: {
732
- struct: {
733
- data: {
734
- array: {
735
- type: string;
736
- len: number;
737
- };
738
- };
739
- };
740
- };
741
- ed25519Key?: undefined;
742
- };
743
- })[];
744
- };
745
- };
746
- };
747
- createAccount?: undefined;
748
- deployContract?: undefined;
749
- functionCall?: undefined;
750
- transfer?: undefined;
751
- addKey?: undefined;
752
- deleteKey?: undefined;
753
- deleteAccount?: undefined;
754
- };
755
- } | {
756
- struct: {
757
- addKey: {
758
- struct: {
759
- publicKey: {
760
- enum: ({
761
- struct: {
762
- ed25519Key: {
763
- struct: {
764
- data: {
765
- array: {
766
- type: string;
767
- len: number;
768
- };
769
- };
770
- };
771
- };
772
- secp256k1Key?: undefined;
773
- };
774
- } | {
775
- struct: {
776
- secp256k1Key: {
777
- struct: {
778
- data: {
779
- array: {
780
- type: string;
781
- len: number;
782
- };
783
- };
784
- };
785
- };
786
- ed25519Key?: undefined;
787
- };
788
- })[];
789
- };
790
- accessKey: {
791
- struct: {
792
- nonce: string;
793
- permission: {
794
- enum: ({
795
- struct: {
796
- functionCall: {
797
- struct: {
798
- allowance: {
799
- option: string;
800
- };
801
- receiverId: string;
802
- methodNames: {
803
- array: {
804
- type: string;
805
- };
806
- };
807
- };
808
- };
809
- fullAccess?: undefined;
810
- };
811
- } | {
812
- struct: {
813
- fullAccess: {
814
- struct: {};
815
- };
816
- functionCall?: undefined;
817
- };
818
- })[];
819
- };
820
- };
821
- };
822
- };
823
- };
824
- createAccount?: undefined;
825
- deployContract?: undefined;
826
- functionCall?: undefined;
827
- transfer?: undefined;
828
- stake?: undefined;
829
- deleteKey?: undefined;
830
- deleteAccount?: undefined;
831
- };
832
- } | {
833
- struct: {
834
- deleteKey: {
835
- struct: {
836
- publicKey: {
837
- enum: ({
838
- struct: {
839
- ed25519Key: {
840
- struct: {
841
- data: {
842
- array: {
843
- type: string;
844
- len: number;
845
- };
846
- };
847
- };
848
- };
849
- secp256k1Key?: undefined;
850
- };
851
- } | {
852
- struct: {
853
- secp256k1Key: {
854
- struct: {
855
- data: {
856
- array: {
857
- type: string;
858
- len: number;
859
- };
860
- };
861
- };
862
- };
863
- ed25519Key?: undefined;
864
- };
865
- })[];
866
- };
867
- };
868
- };
869
- createAccount?: undefined;
870
- deployContract?: undefined;
871
- functionCall?: undefined;
872
- transfer?: undefined;
873
- stake?: undefined;
874
- addKey?: undefined;
875
- deleteAccount?: undefined;
876
- };
877
- } | {
878
- struct: {
879
- deleteAccount: {
880
- struct: {
881
- beneficiaryId: string;
882
- };
883
- };
884
- createAccount?: undefined;
885
- deployContract?: undefined;
886
- functionCall?: undefined;
887
- transfer?: undefined;
888
- stake?: undefined;
889
- addKey?: undefined;
890
- deleteKey?: undefined;
891
- };
892
- })[];
893
- };
894
- };
895
- };
896
- nonce: string;
897
- maxBlockHeight: string;
898
- publicKey: {
899
- enum: ({
900
- struct: {
901
- ed25519Key: {
902
- struct: {
903
- data: {
904
- array: {
905
- type: string;
906
- len: number;
907
- };
908
- };
909
- };
910
- };
911
- secp256k1Key?: undefined;
912
- };
913
- } | {
914
- struct: {
915
- secp256k1Key: {
916
- struct: {
917
- data: {
918
- array: {
919
- type: string;
920
- len: number;
921
- };
922
- };
923
- };
924
- };
925
- ed25519Key?: undefined;
926
- };
927
- })[];
928
- };
929
- };
930
- };
931
- SignedDelegate: {
932
- struct: {
933
- delegateAction: {
934
- struct: {
935
- senderId: string;
936
- receiverId: string;
937
- actions: {
938
- array: {
939
- type: {
940
- enum: ({
941
- struct: {
942
- createAccount: {
943
- struct: {};
944
- };
945
- deployContract?: undefined;
946
- functionCall?: undefined;
947
- transfer?: undefined;
948
- stake?: undefined;
949
- addKey?: undefined;
950
- deleteKey?: undefined;
951
- deleteAccount?: undefined;
952
- };
953
- } | {
954
- struct: {
955
- deployContract: {
956
- struct: {
957
- code: {
958
- array: {
959
- type: string;
960
- };
961
- };
962
- };
963
- };
964
- createAccount?: undefined;
965
- functionCall?: undefined;
966
- transfer?: undefined;
967
- stake?: undefined;
968
- addKey?: undefined;
969
- deleteKey?: undefined;
970
- deleteAccount?: undefined;
971
- };
972
- } | {
973
- struct: {
974
- functionCall: {
975
- struct: {
976
- methodName: string;
977
- args: {
978
- array: {
979
- type: string;
980
- };
981
- };
982
- gas: string;
983
- deposit: string;
984
- };
985
- };
986
- createAccount?: undefined;
987
- deployContract?: undefined;
988
- transfer?: undefined;
989
- stake?: undefined;
990
- addKey?: undefined;
991
- deleteKey?: undefined;
992
- deleteAccount?: undefined;
993
- };
994
- } | {
995
- struct: {
996
- transfer: {
997
- struct: {
998
- deposit: string;
999
- };
1000
- };
1001
- createAccount?: undefined;
1002
- deployContract?: undefined;
1003
- functionCall?: undefined;
1004
- stake?: undefined;
1005
- addKey?: undefined;
1006
- deleteKey?: undefined;
1007
- deleteAccount?: undefined;
1008
- };
1009
- } | {
1010
- struct: {
1011
- stake: {
1012
- struct: {
1013
- stake: string;
1014
- publicKey: {
1015
- enum: ({
1016
- struct: {
1017
- ed25519Key: {
1018
- struct: {
1019
- data: {
1020
- array: {
1021
- type: string;
1022
- len: number;
1023
- };
1024
- };
1025
- };
1026
- };
1027
- secp256k1Key?: undefined;
1028
- };
1029
- } | {
1030
- struct: {
1031
- secp256k1Key: {
1032
- struct: {
1033
- data: {
1034
- array: {
1035
- type: string;
1036
- len: number;
1037
- };
1038
- };
1039
- };
1040
- };
1041
- ed25519Key?: undefined;
1042
- };
1043
- })[];
1044
- };
1045
- };
1046
- };
1047
- createAccount?: undefined;
1048
- deployContract?: undefined;
1049
- functionCall?: undefined;
1050
- transfer?: undefined;
1051
- addKey?: undefined;
1052
- deleteKey?: undefined;
1053
- deleteAccount?: undefined;
1054
- };
1055
- } | {
1056
- struct: {
1057
- addKey: {
1058
- struct: {
1059
- publicKey: {
1060
- enum: ({
1061
- struct: {
1062
- ed25519Key: {
1063
- struct: {
1064
- data: {
1065
- array: {
1066
- type: string;
1067
- len: number;
1068
- };
1069
- };
1070
- };
1071
- };
1072
- secp256k1Key?: undefined;
1073
- };
1074
- } | {
1075
- struct: {
1076
- secp256k1Key: {
1077
- struct: {
1078
- data: {
1079
- array: {
1080
- type: string;
1081
- len: number;
1082
- };
1083
- };
1084
- };
1085
- };
1086
- ed25519Key?: undefined;
1087
- };
1088
- })[];
1089
- };
1090
- accessKey: {
1091
- struct: {
1092
- nonce: string;
1093
- permission: {
1094
- enum: ({
1095
- struct: {
1096
- functionCall: {
1097
- struct: {
1098
- allowance: {
1099
- option: string;
1100
- };
1101
- receiverId: string;
1102
- methodNames: {
1103
- array: {
1104
- type: string;
1105
- };
1106
- };
1107
- };
1108
- };
1109
- fullAccess?: undefined;
1110
- };
1111
- } | {
1112
- struct: {
1113
- fullAccess: {
1114
- struct: {};
1115
- };
1116
- functionCall?: undefined;
1117
- };
1118
- })[];
1119
- };
1120
- };
1121
- };
1122
- };
1123
- };
1124
- createAccount?: undefined;
1125
- deployContract?: undefined;
1126
- functionCall?: undefined;
1127
- transfer?: undefined;
1128
- stake?: undefined;
1129
- deleteKey?: undefined;
1130
- deleteAccount?: undefined;
1131
- };
1132
- } | {
1133
- struct: {
1134
- deleteKey: {
1135
- struct: {
1136
- publicKey: {
1137
- enum: ({
1138
- struct: {
1139
- ed25519Key: {
1140
- struct: {
1141
- data: {
1142
- array: {
1143
- type: string;
1144
- len: number;
1145
- };
1146
- };
1147
- };
1148
- };
1149
- secp256k1Key?: undefined;
1150
- };
1151
- } | {
1152
- struct: {
1153
- secp256k1Key: {
1154
- struct: {
1155
- data: {
1156
- array: {
1157
- type: string;
1158
- len: number;
1159
- };
1160
- };
1161
- };
1162
- };
1163
- ed25519Key?: undefined;
1164
- };
1165
- })[];
1166
- };
1167
- };
1168
- };
1169
- createAccount?: undefined;
1170
- deployContract?: undefined;
1171
- functionCall?: undefined;
1172
- transfer?: undefined;
1173
- stake?: undefined;
1174
- addKey?: undefined;
1175
- deleteAccount?: undefined;
1176
- };
1177
- } | {
1178
- struct: {
1179
- deleteAccount: {
1180
- struct: {
1181
- beneficiaryId: string;
1182
- };
1183
- };
1184
- createAccount?: undefined;
1185
- deployContract?: undefined;
1186
- functionCall?: undefined;
1187
- transfer?: undefined;
1188
- stake?: undefined;
1189
- addKey?: undefined;
1190
- deleteKey?: undefined;
1191
- };
1192
- })[];
1193
- };
1194
- };
1195
- };
1196
- nonce: string;
1197
- maxBlockHeight: string;
1198
- publicKey: {
1199
- enum: ({
1200
- struct: {
1201
- ed25519Key: {
1202
- struct: {
1203
- data: {
1204
- array: {
1205
- type: string;
1206
- len: number;
1207
- };
1208
- };
1209
- };
1210
- };
1211
- secp256k1Key?: undefined;
1212
- };
1213
- } | {
1214
- struct: {
1215
- secp256k1Key: {
1216
- struct: {
1217
- data: {
1218
- array: {
1219
- type: string;
1220
- len: number;
1221
- };
1222
- };
1223
- };
1224
- };
1225
- ed25519Key?: undefined;
1226
- };
1227
- })[];
1228
- };
1229
- };
1230
- };
1231
- signature: {
1232
- enum: ({
1233
- struct: {
1234
- ed25519Signature: {
1235
- struct: {
1236
- data: {
1237
- array: {
1238
- type: string;
1239
- len: number;
1240
- };
1241
- };
1242
- };
1243
- };
1244
- secp256k1Signature?: undefined;
1245
- };
1246
- } | {
1247
- struct: {
1248
- secp256k1Signature: {
1249
- struct: {
1250
- data: {
1251
- array: {
1252
- type: string;
1253
- len: number;
1254
- };
1255
- };
1256
- };
1257
- };
1258
- ed25519Signature?: undefined;
1259
- };
1260
- })[];
1261
- };
1262
- };
1263
- };
1264
- Action: {
1265
- enum: ({
1266
- struct: {
1267
- createAccount: {
1268
- struct: {};
1269
- };
1270
- deployContract?: undefined;
1271
- functionCall?: undefined;
1272
- transfer?: undefined;
1273
- stake?: undefined;
1274
- addKey?: undefined;
1275
- deleteKey?: undefined;
1276
- deleteAccount?: undefined;
1277
- signedDelegate?: undefined;
1278
- };
1279
- } | {
1280
- struct: {
1281
- deployContract: {
1282
- struct: {
1283
- code: {
1284
- array: {
1285
- type: string;
1286
- };
1287
- };
1288
- };
1289
- };
1290
- createAccount?: undefined;
1291
- functionCall?: undefined;
1292
- transfer?: undefined;
1293
- stake?: undefined;
1294
- addKey?: undefined;
1295
- deleteKey?: undefined;
1296
- deleteAccount?: undefined;
1297
- signedDelegate?: undefined;
1298
- };
1299
- } | {
1300
- struct: {
1301
- functionCall: {
1302
- struct: {
1303
- methodName: string;
1304
- args: {
1305
- array: {
1306
- type: string;
1307
- };
1308
- };
1309
- gas: string;
1310
- deposit: string;
1311
- };
1312
- };
1313
- createAccount?: undefined;
1314
- deployContract?: undefined;
1315
- transfer?: undefined;
1316
- stake?: undefined;
1317
- addKey?: undefined;
1318
- deleteKey?: undefined;
1319
- deleteAccount?: undefined;
1320
- signedDelegate?: undefined;
1321
- };
1322
- } | {
1323
- struct: {
1324
- transfer: {
1325
- struct: {
1326
- deposit: string;
1327
- };
1328
- };
1329
- createAccount?: undefined;
1330
- deployContract?: undefined;
1331
- functionCall?: undefined;
1332
- stake?: undefined;
1333
- addKey?: undefined;
1334
- deleteKey?: undefined;
1335
- deleteAccount?: undefined;
1336
- signedDelegate?: undefined;
1337
- };
1338
- } | {
1339
- struct: {
1340
- stake: {
1341
- struct: {
1342
- stake: string;
1343
- publicKey: {
1344
- enum: ({
1345
- struct: {
1346
- ed25519Key: {
1347
- struct: {
1348
- data: {
1349
- array: {
1350
- type: string;
1351
- len: number;
1352
- };
1353
- };
1354
- };
1355
- };
1356
- secp256k1Key?: undefined;
1357
- };
1358
- } | {
1359
- struct: {
1360
- secp256k1Key: {
1361
- struct: {
1362
- data: {
1363
- array: {
1364
- type: string;
1365
- len: number;
1366
- };
1367
- };
1368
- };
1369
- };
1370
- ed25519Key?: undefined;
1371
- };
1372
- })[];
1373
- };
1374
- };
1375
- };
1376
- createAccount?: undefined;
1377
- deployContract?: undefined;
1378
- functionCall?: undefined;
1379
- transfer?: undefined;
1380
- addKey?: undefined;
1381
- deleteKey?: undefined;
1382
- deleteAccount?: undefined;
1383
- signedDelegate?: undefined;
1384
- };
1385
- } | {
1386
- struct: {
1387
- addKey: {
1388
- struct: {
1389
- publicKey: {
1390
- enum: ({
1391
- struct: {
1392
- ed25519Key: {
1393
- struct: {
1394
- data: {
1395
- array: {
1396
- type: string;
1397
- len: number;
1398
- };
1399
- };
1400
- };
1401
- };
1402
- secp256k1Key?: undefined;
1403
- };
1404
- } | {
1405
- struct: {
1406
- secp256k1Key: {
1407
- struct: {
1408
- data: {
1409
- array: {
1410
- type: string;
1411
- len: number;
1412
- };
1413
- };
1414
- };
1415
- };
1416
- ed25519Key?: undefined;
1417
- };
1418
- })[];
1419
- };
1420
- accessKey: {
1421
- struct: {
1422
- nonce: string;
1423
- permission: {
1424
- enum: ({
1425
- struct: {
1426
- functionCall: {
1427
- struct: {
1428
- allowance: {
1429
- option: string;
1430
- };
1431
- receiverId: string;
1432
- methodNames: {
1433
- array: {
1434
- type: string;
1435
- };
1436
- };
1437
- };
1438
- };
1439
- fullAccess?: undefined;
1440
- };
1441
- } | {
1442
- struct: {
1443
- fullAccess: {
1444
- struct: {};
1445
- };
1446
- functionCall?: undefined;
1447
- };
1448
- })[];
1449
- };
1450
- };
1451
- };
1452
- };
1453
- };
1454
- createAccount?: undefined;
1455
- deployContract?: undefined;
1456
- functionCall?: undefined;
1457
- transfer?: undefined;
1458
- stake?: undefined;
1459
- deleteKey?: undefined;
1460
- deleteAccount?: undefined;
1461
- signedDelegate?: undefined;
1462
- };
1463
- } | {
1464
- struct: {
1465
- deleteKey: {
1466
- struct: {
1467
- publicKey: {
1468
- enum: ({
1469
- struct: {
1470
- ed25519Key: {
1471
- struct: {
1472
- data: {
1473
- array: {
1474
- type: string;
1475
- len: number;
1476
- };
1477
- };
1478
- };
1479
- };
1480
- secp256k1Key?: undefined;
1481
- };
1482
- } | {
1483
- struct: {
1484
- secp256k1Key: {
1485
- struct: {
1486
- data: {
1487
- array: {
1488
- type: string;
1489
- len: number;
1490
- };
1491
- };
1492
- };
1493
- };
1494
- ed25519Key?: undefined;
1495
- };
1496
- })[];
1497
- };
1498
- };
1499
- };
1500
- createAccount?: undefined;
1501
- deployContract?: undefined;
1502
- functionCall?: undefined;
1503
- transfer?: undefined;
1504
- stake?: undefined;
1505
- addKey?: undefined;
1506
- deleteAccount?: undefined;
1507
- signedDelegate?: undefined;
1508
- };
1509
- } | {
1510
- struct: {
1511
- deleteAccount: {
1512
- struct: {
1513
- beneficiaryId: string;
1514
- };
1515
- };
1516
- createAccount?: undefined;
1517
- deployContract?: undefined;
1518
- functionCall?: undefined;
1519
- transfer?: undefined;
1520
- stake?: undefined;
1521
- addKey?: undefined;
1522
- deleteKey?: undefined;
1523
- signedDelegate?: undefined;
1524
- };
1525
- } | {
1526
- struct: {
1527
- signedDelegate: {
1528
- struct: {
1529
- delegateAction: {
1530
- struct: {
1531
- senderId: string;
1532
- receiverId: string;
1533
- actions: {
1534
- array: {
1535
- type: {
1536
- enum: ({
1537
- struct: {
1538
- createAccount: {
1539
- struct: {};
1540
- };
1541
- deployContract?: undefined;
1542
- functionCall?: undefined;
1543
- transfer?: undefined;
1544
- stake?: undefined;
1545
- addKey?: undefined;
1546
- deleteKey?: undefined;
1547
- deleteAccount?: undefined;
1548
- };
1549
- } | {
1550
- struct: {
1551
- deployContract: {
1552
- struct: {
1553
- code: {
1554
- array: {
1555
- type: string;
1556
- };
1557
- };
1558
- };
1559
- };
1560
- createAccount?: undefined;
1561
- functionCall?: undefined;
1562
- transfer?: undefined;
1563
- stake?: undefined;
1564
- addKey?: undefined;
1565
- deleteKey?: undefined;
1566
- deleteAccount?: undefined;
1567
- };
1568
- } | {
1569
- struct: {
1570
- functionCall: {
1571
- struct: {
1572
- methodName: string;
1573
- args: {
1574
- array: {
1575
- type: string;
1576
- };
1577
- };
1578
- gas: string;
1579
- deposit: string;
1580
- };
1581
- };
1582
- createAccount?: undefined;
1583
- deployContract?: undefined;
1584
- transfer?: undefined;
1585
- stake?: undefined;
1586
- addKey?: undefined;
1587
- deleteKey?: undefined;
1588
- deleteAccount?: undefined;
1589
- };
1590
- } | {
1591
- struct: {
1592
- transfer: {
1593
- struct: {
1594
- deposit: string;
1595
- };
1596
- };
1597
- createAccount?: undefined;
1598
- deployContract?: undefined;
1599
- functionCall?: undefined;
1600
- stake?: undefined;
1601
- addKey?: undefined;
1602
- deleteKey?: undefined;
1603
- deleteAccount?: undefined;
1604
- };
1605
- } | {
1606
- struct: {
1607
- stake: {
1608
- struct: {
1609
- stake: string;
1610
- publicKey: {
1611
- enum: ({
1612
- struct: {
1613
- ed25519Key: {
1614
- struct: {
1615
- data: {
1616
- array: {
1617
- type: string;
1618
- len: number;
1619
- };
1620
- };
1621
- };
1622
- };
1623
- secp256k1Key?: undefined;
1624
- };
1625
- } | {
1626
- struct: {
1627
- secp256k1Key: {
1628
- struct: {
1629
- data: {
1630
- array: {
1631
- type: string;
1632
- len: number;
1633
- };
1634
- };
1635
- };
1636
- };
1637
- ed25519Key?: undefined;
1638
- };
1639
- })[];
1640
- };
1641
- };
1642
- };
1643
- createAccount?: undefined;
1644
- deployContract?: undefined;
1645
- functionCall?: undefined;
1646
- transfer?: undefined;
1647
- addKey?: undefined;
1648
- deleteKey?: undefined;
1649
- deleteAccount?: undefined;
1650
- };
1651
- } | {
1652
- struct: {
1653
- addKey: {
1654
- struct: {
1655
- publicKey: {
1656
- enum: ({
1657
- struct: {
1658
- ed25519Key: {
1659
- struct: {
1660
- data: {
1661
- array: {
1662
- type: string;
1663
- len: number;
1664
- };
1665
- };
1666
- };
1667
- };
1668
- secp256k1Key?: undefined;
1669
- };
1670
- } | {
1671
- struct: {
1672
- secp256k1Key: {
1673
- struct: {
1674
- data: {
1675
- array: {
1676
- type: string;
1677
- len: number;
1678
- };
1679
- };
1680
- };
1681
- };
1682
- ed25519Key?: undefined;
1683
- };
1684
- })[];
1685
- };
1686
- accessKey: {
1687
- struct: {
1688
- nonce: string;
1689
- permission: {
1690
- enum: ({
1691
- struct: {
1692
- functionCall: {
1693
- struct: {
1694
- allowance: {
1695
- option: string;
1696
- };
1697
- receiverId: string;
1698
- methodNames: {
1699
- array: {
1700
- type: string;
1701
- };
1702
- };
1703
- };
1704
- };
1705
- fullAccess?: undefined;
1706
- };
1707
- } | {
1708
- struct: {
1709
- fullAccess: {
1710
- struct: {};
1711
- };
1712
- functionCall?: undefined;
1713
- };
1714
- })[];
1715
- };
1716
- };
1717
- };
1718
- };
1719
- };
1720
- createAccount?: undefined;
1721
- deployContract?: undefined;
1722
- functionCall?: undefined;
1723
- transfer?: undefined;
1724
- stake?: undefined;
1725
- deleteKey?: undefined;
1726
- deleteAccount?: undefined;
1727
- };
1728
- } | {
1729
- struct: {
1730
- deleteKey: {
1731
- struct: {
1732
- publicKey: {
1733
- enum: ({
1734
- struct: {
1735
- ed25519Key: {
1736
- struct: {
1737
- data: {
1738
- array: {
1739
- type: string;
1740
- len: number;
1741
- };
1742
- };
1743
- };
1744
- };
1745
- secp256k1Key?: undefined;
1746
- };
1747
- } | {
1748
- struct: {
1749
- secp256k1Key: {
1750
- struct: {
1751
- data: {
1752
- array: {
1753
- type: string;
1754
- len: number;
1755
- };
1756
- };
1757
- };
1758
- };
1759
- ed25519Key?: undefined;
1760
- };
1761
- })[];
1762
- };
1763
- };
1764
- };
1765
- createAccount?: undefined;
1766
- deployContract?: undefined;
1767
- functionCall?: undefined;
1768
- transfer?: undefined;
1769
- stake?: undefined;
1770
- addKey?: undefined;
1771
- deleteAccount?: undefined;
1772
- };
1773
- } | {
1774
- struct: {
1775
- deleteAccount: {
1776
- struct: {
1777
- beneficiaryId: string;
1778
- };
1779
- };
1780
- createAccount?: undefined;
1781
- deployContract?: undefined;
1782
- functionCall?: undefined;
1783
- transfer?: undefined;
1784
- stake?: undefined;
1785
- addKey?: undefined;
1786
- deleteKey?: undefined;
1787
- };
1788
- })[];
1789
- };
1790
- };
1791
- };
1792
- nonce: string;
1793
- maxBlockHeight: string;
1794
- publicKey: {
1795
- enum: ({
1796
- struct: {
1797
- ed25519Key: {
1798
- struct: {
1799
- data: {
1800
- array: {
1801
- type: string;
1802
- len: number;
1803
- };
1804
- };
1805
- };
1806
- };
1807
- secp256k1Key?: undefined;
1808
- };
1809
- } | {
1810
- struct: {
1811
- secp256k1Key: {
1812
- struct: {
1813
- data: {
1814
- array: {
1815
- type: string;
1816
- len: number;
1817
- };
1818
- };
1819
- };
1820
- };
1821
- ed25519Key?: undefined;
1822
- };
1823
- })[];
1824
- };
1825
- };
1826
- };
1827
- signature: {
1828
- enum: ({
1829
- struct: {
1830
- ed25519Signature: {
1831
- struct: {
1832
- data: {
1833
- array: {
1834
- type: string;
1835
- len: number;
1836
- };
1837
- };
1838
- };
1839
- };
1840
- secp256k1Signature?: undefined;
1841
- };
1842
- } | {
1843
- struct: {
1844
- secp256k1Signature: {
1845
- struct: {
1846
- data: {
1847
- array: {
1848
- type: string;
1849
- len: number;
1850
- };
1851
- };
1852
- };
1853
- };
1854
- ed25519Signature?: undefined;
1855
- };
1856
- })[];
1857
- };
1858
- };
1859
- };
1860
- createAccount?: undefined;
1861
- deployContract?: undefined;
1862
- functionCall?: undefined;
1863
- transfer?: undefined;
1864
- stake?: undefined;
1865
- addKey?: undefined;
1866
- deleteKey?: undefined;
1867
- deleteAccount?: undefined;
1868
- };
1869
- })[];
1870
- };
1871
- Transaction: {
1872
- struct: {
1873
- signerId: string;
1874
- publicKey: {
1875
- enum: ({
1876
- struct: {
1877
- ed25519Key: {
1878
- struct: {
1879
- data: {
1880
- array: {
1881
- type: string;
1882
- len: number;
1883
- };
1884
- };
1885
- };
1886
- };
1887
- secp256k1Key?: undefined;
1888
- };
1889
- } | {
1890
- struct: {
1891
- secp256k1Key: {
1892
- struct: {
1893
- data: {
1894
- array: {
1895
- type: string;
1896
- len: number;
1897
- };
1898
- };
1899
- };
1900
- };
1901
- ed25519Key?: undefined;
1902
- };
1903
- })[];
1904
- };
1905
- nonce: string;
1906
- receiverId: string;
1907
- blockHash: {
1908
- array: {
1909
- type: string;
1910
- len: number;
1911
- };
1912
- };
1913
- actions: {
1914
- array: {
1915
- type: {
1916
- enum: ({
1917
- struct: {
1918
- createAccount: {
1919
- struct: {};
1920
- };
1921
- deployContract?: undefined;
1922
- functionCall?: undefined;
1923
- transfer?: undefined;
1924
- stake?: undefined;
1925
- addKey?: undefined;
1926
- deleteKey?: undefined;
1927
- deleteAccount?: undefined;
1928
- signedDelegate?: undefined;
1929
- };
1930
- } | {
1931
- struct: {
1932
- deployContract: {
1933
- struct: {
1934
- code: {
1935
- array: {
1936
- type: string;
1937
- };
1938
- };
1939
- };
1940
- };
1941
- createAccount?: undefined;
1942
- functionCall?: undefined;
1943
- transfer?: undefined;
1944
- stake?: undefined;
1945
- addKey?: undefined;
1946
- deleteKey?: undefined;
1947
- deleteAccount?: undefined;
1948
- signedDelegate?: undefined;
1949
- };
1950
- } | {
1951
- struct: {
1952
- functionCall: {
1953
- struct: {
1954
- methodName: string;
1955
- args: {
1956
- array: {
1957
- type: string;
1958
- };
1959
- };
1960
- gas: string;
1961
- deposit: string;
1962
- };
1963
- };
1964
- createAccount?: undefined;
1965
- deployContract?: undefined;
1966
- transfer?: undefined;
1967
- stake?: undefined;
1968
- addKey?: undefined;
1969
- deleteKey?: undefined;
1970
- deleteAccount?: undefined;
1971
- signedDelegate?: undefined;
1972
- };
1973
- } | {
1974
- struct: {
1975
- transfer: {
1976
- struct: {
1977
- deposit: string;
1978
- };
1979
- };
1980
- createAccount?: undefined;
1981
- deployContract?: undefined;
1982
- functionCall?: undefined;
1983
- stake?: undefined;
1984
- addKey?: undefined;
1985
- deleteKey?: undefined;
1986
- deleteAccount?: undefined;
1987
- signedDelegate?: undefined;
1988
- };
1989
- } | {
1990
- struct: {
1991
- stake: {
1992
- struct: {
1993
- stake: string;
1994
- publicKey: {
1995
- enum: ({
1996
- struct: {
1997
- ed25519Key: {
1998
- struct: {
1999
- data: {
2000
- array: {
2001
- type: string;
2002
- len: number;
2003
- };
2004
- };
2005
- };
2006
- };
2007
- secp256k1Key?: undefined;
2008
- };
2009
- } | {
2010
- struct: {
2011
- secp256k1Key: {
2012
- struct: {
2013
- data: {
2014
- array: {
2015
- type: string;
2016
- len: number;
2017
- };
2018
- };
2019
- };
2020
- };
2021
- ed25519Key?: undefined;
2022
- };
2023
- })[];
2024
- };
2025
- };
2026
- };
2027
- createAccount?: undefined;
2028
- deployContract?: undefined;
2029
- functionCall?: undefined;
2030
- transfer?: undefined;
2031
- addKey?: undefined;
2032
- deleteKey?: undefined;
2033
- deleteAccount?: undefined;
2034
- signedDelegate?: undefined;
2035
- };
2036
- } | {
2037
- struct: {
2038
- addKey: {
2039
- struct: {
2040
- publicKey: {
2041
- enum: ({
2042
- struct: {
2043
- ed25519Key: {
2044
- struct: {
2045
- data: {
2046
- array: {
2047
- type: string;
2048
- len: number;
2049
- };
2050
- };
2051
- };
2052
- };
2053
- secp256k1Key?: undefined;
2054
- };
2055
- } | {
2056
- struct: {
2057
- secp256k1Key: {
2058
- struct: {
2059
- data: {
2060
- array: {
2061
- type: string;
2062
- len: number;
2063
- };
2064
- };
2065
- };
2066
- };
2067
- ed25519Key?: undefined;
2068
- };
2069
- })[];
2070
- };
2071
- accessKey: {
2072
- struct: {
2073
- nonce: string;
2074
- permission: {
2075
- enum: ({
2076
- struct: {
2077
- functionCall: {
2078
- struct: {
2079
- allowance: {
2080
- option: string;
2081
- };
2082
- receiverId: string;
2083
- methodNames: {
2084
- array: {
2085
- type: string;
2086
- };
2087
- };
2088
- };
2089
- };
2090
- fullAccess?: undefined;
2091
- };
2092
- } | {
2093
- struct: {
2094
- fullAccess: {
2095
- struct: {};
2096
- };
2097
- functionCall?: undefined;
2098
- };
2099
- })[];
2100
- };
2101
- };
2102
- };
2103
- };
2104
- };
2105
- createAccount?: undefined;
2106
- deployContract?: undefined;
2107
- functionCall?: undefined;
2108
- transfer?: undefined;
2109
- stake?: undefined;
2110
- deleteKey?: undefined;
2111
- deleteAccount?: undefined;
2112
- signedDelegate?: undefined;
2113
- };
2114
- } | {
2115
- struct: {
2116
- deleteKey: {
2117
- struct: {
2118
- publicKey: {
2119
- enum: ({
2120
- struct: {
2121
- ed25519Key: {
2122
- struct: {
2123
- data: {
2124
- array: {
2125
- type: string;
2126
- len: number;
2127
- };
2128
- };
2129
- };
2130
- };
2131
- secp256k1Key?: undefined;
2132
- };
2133
- } | {
2134
- struct: {
2135
- secp256k1Key: {
2136
- struct: {
2137
- data: {
2138
- array: {
2139
- type: string;
2140
- len: number;
2141
- };
2142
- };
2143
- };
2144
- };
2145
- ed25519Key?: undefined;
2146
- };
2147
- })[];
2148
- };
2149
- };
2150
- };
2151
- createAccount?: undefined;
2152
- deployContract?: undefined;
2153
- functionCall?: undefined;
2154
- transfer?: undefined;
2155
- stake?: undefined;
2156
- addKey?: undefined;
2157
- deleteAccount?: undefined;
2158
- signedDelegate?: undefined;
2159
- };
2160
- } | {
2161
- struct: {
2162
- deleteAccount: {
2163
- struct: {
2164
- beneficiaryId: string;
2165
- };
2166
- };
2167
- createAccount?: undefined;
2168
- deployContract?: undefined;
2169
- functionCall?: undefined;
2170
- transfer?: undefined;
2171
- stake?: undefined;
2172
- addKey?: undefined;
2173
- deleteKey?: undefined;
2174
- signedDelegate?: undefined;
2175
- };
2176
- } | {
2177
- struct: {
2178
- signedDelegate: {
2179
- struct: {
2180
- delegateAction: {
2181
- struct: {
2182
- senderId: string;
2183
- receiverId: string;
2184
- actions: {
2185
- array: {
2186
- type: {
2187
- enum: ({
2188
- struct: {
2189
- createAccount: {
2190
- struct: {};
2191
- };
2192
- deployContract?: undefined;
2193
- functionCall?: undefined;
2194
- transfer?: undefined;
2195
- stake?: undefined;
2196
- addKey?: undefined;
2197
- deleteKey?: undefined;
2198
- deleteAccount?: undefined;
2199
- };
2200
- } | {
2201
- struct: {
2202
- deployContract: {
2203
- struct: {
2204
- code: {
2205
- array: {
2206
- type: string;
2207
- };
2208
- };
2209
- };
2210
- };
2211
- createAccount?: undefined;
2212
- functionCall?: undefined;
2213
- transfer?: undefined;
2214
- stake?: undefined;
2215
- addKey?: undefined;
2216
- deleteKey?: undefined;
2217
- deleteAccount?: undefined;
2218
- };
2219
- } | {
2220
- struct: {
2221
- functionCall: {
2222
- struct: {
2223
- methodName: string;
2224
- args: {
2225
- array: {
2226
- type: string;
2227
- };
2228
- };
2229
- gas: string;
2230
- deposit: string;
2231
- };
2232
- };
2233
- createAccount?: undefined;
2234
- deployContract?: undefined;
2235
- transfer?: undefined;
2236
- stake?: undefined;
2237
- addKey?: undefined;
2238
- deleteKey?: undefined;
2239
- deleteAccount?: undefined;
2240
- };
2241
- } | {
2242
- struct: {
2243
- transfer: {
2244
- struct: {
2245
- deposit: string;
2246
- };
2247
- };
2248
- createAccount?: undefined;
2249
- deployContract?: undefined;
2250
- functionCall?: undefined;
2251
- stake?: undefined;
2252
- addKey?: undefined;
2253
- deleteKey?: undefined;
2254
- deleteAccount?: undefined;
2255
- };
2256
- } | {
2257
- struct: {
2258
- stake: {
2259
- struct: {
2260
- stake: string;
2261
- publicKey: {
2262
- enum: ({
2263
- struct: {
2264
- ed25519Key: {
2265
- struct: {
2266
- data: {
2267
- array: {
2268
- type: string;
2269
- len: number;
2270
- };
2271
- };
2272
- };
2273
- };
2274
- secp256k1Key?: undefined;
2275
- };
2276
- } | {
2277
- struct: {
2278
- secp256k1Key: {
2279
- struct: {
2280
- data: {
2281
- array: {
2282
- type: string;
2283
- len: number;
2284
- };
2285
- };
2286
- };
2287
- };
2288
- ed25519Key?: undefined;
2289
- };
2290
- })[];
2291
- };
2292
- };
2293
- };
2294
- createAccount?: undefined;
2295
- deployContract?: undefined;
2296
- functionCall?: undefined;
2297
- transfer?: undefined;
2298
- addKey?: undefined;
2299
- deleteKey?: undefined;
2300
- deleteAccount?: undefined;
2301
- };
2302
- } | {
2303
- struct: {
2304
- addKey: {
2305
- struct: {
2306
- publicKey: {
2307
- enum: ({
2308
- struct: {
2309
- ed25519Key: {
2310
- struct: {
2311
- data: {
2312
- array: {
2313
- type: string;
2314
- len: number;
2315
- };
2316
- };
2317
- };
2318
- };
2319
- secp256k1Key?: undefined;
2320
- };
2321
- } | {
2322
- struct: {
2323
- secp256k1Key: {
2324
- struct: {
2325
- data: {
2326
- array: {
2327
- type: string;
2328
- len: number;
2329
- };
2330
- };
2331
- };
2332
- };
2333
- ed25519Key?: undefined;
2334
- };
2335
- })[];
2336
- };
2337
- accessKey: {
2338
- struct: {
2339
- nonce: string;
2340
- permission: {
2341
- enum: ({
2342
- struct: {
2343
- functionCall: {
2344
- struct: {
2345
- allowance: {
2346
- option: string;
2347
- };
2348
- receiverId: string;
2349
- methodNames: {
2350
- array: {
2351
- type: string;
2352
- };
2353
- };
2354
- };
2355
- };
2356
- fullAccess?: undefined;
2357
- };
2358
- } | {
2359
- struct: {
2360
- fullAccess: {
2361
- struct: {};
2362
- };
2363
- functionCall?: undefined;
2364
- };
2365
- })[];
2366
- };
2367
- };
2368
- };
2369
- };
2370
- };
2371
- createAccount?: undefined;
2372
- deployContract?: undefined;
2373
- functionCall?: undefined;
2374
- transfer?: undefined;
2375
- stake?: undefined;
2376
- deleteKey?: undefined;
2377
- deleteAccount?: undefined;
2378
- };
2379
- } | {
2380
- struct: {
2381
- deleteKey: {
2382
- struct: {
2383
- publicKey: {
2384
- enum: ({
2385
- struct: {
2386
- ed25519Key: {
2387
- struct: {
2388
- data: {
2389
- array: {
2390
- type: string;
2391
- len: number;
2392
- };
2393
- };
2394
- };
2395
- };
2396
- secp256k1Key?: undefined;
2397
- };
2398
- } | {
2399
- struct: {
2400
- secp256k1Key: {
2401
- struct: {
2402
- data: {
2403
- array: {
2404
- type: string;
2405
- len: number;
2406
- };
2407
- };
2408
- };
2409
- };
2410
- ed25519Key?: undefined;
2411
- };
2412
- })[];
2413
- };
2414
- };
2415
- };
2416
- createAccount?: undefined;
2417
- deployContract?: undefined;
2418
- functionCall?: undefined;
2419
- transfer?: undefined;
2420
- stake?: undefined;
2421
- addKey?: undefined;
2422
- deleteAccount?: undefined;
2423
- };
2424
- } | {
2425
- struct: {
2426
- deleteAccount: {
2427
- struct: {
2428
- beneficiaryId: string;
2429
- };
2430
- };
2431
- createAccount?: undefined;
2432
- deployContract?: undefined;
2433
- functionCall?: undefined;
2434
- transfer?: undefined;
2435
- stake?: undefined;
2436
- addKey?: undefined;
2437
- deleteKey?: undefined;
2438
- };
2439
- })[];
2440
- };
2441
- };
2442
- };
2443
- nonce: string;
2444
- maxBlockHeight: string;
2445
- publicKey: {
2446
- enum: ({
2447
- struct: {
2448
- ed25519Key: {
2449
- struct: {
2450
- data: {
2451
- array: {
2452
- type: string;
2453
- len: number;
2454
- };
2455
- };
2456
- };
2457
- };
2458
- secp256k1Key?: undefined;
2459
- };
2460
- } | {
2461
- struct: {
2462
- secp256k1Key: {
2463
- struct: {
2464
- data: {
2465
- array: {
2466
- type: string;
2467
- len: number;
2468
- };
2469
- };
2470
- };
2471
- };
2472
- ed25519Key?: undefined;
2473
- };
2474
- })[];
2475
- };
2476
- };
2477
- };
2478
- signature: {
2479
- enum: ({
2480
- struct: {
2481
- ed25519Signature: {
2482
- struct: {
2483
- data: {
2484
- array: {
2485
- type: string;
2486
- len: number;
2487
- };
2488
- };
2489
- };
2490
- };
2491
- secp256k1Signature?: undefined;
2492
- };
2493
- } | {
2494
- struct: {
2495
- secp256k1Signature: {
2496
- struct: {
2497
- data: {
2498
- array: {
2499
- type: string;
2500
- len: number;
2501
- };
2502
- };
2503
- };
2504
- };
2505
- ed25519Signature?: undefined;
2506
- };
2507
- })[];
2508
- };
2509
- };
2510
- };
2511
- createAccount?: undefined;
2512
- deployContract?: undefined;
2513
- functionCall?: undefined;
2514
- transfer?: undefined;
2515
- stake?: undefined;
2516
- addKey?: undefined;
2517
- deleteKey?: undefined;
2518
- deleteAccount?: undefined;
2519
- };
2520
- })[];
2521
- };
2522
- };
2523
- };
2524
- };
2525
- };
2526
- SignedTransaction: {
2527
- struct: {
2528
- transaction: {
2529
- struct: {
2530
- signerId: string;
2531
- publicKey: {
2532
- enum: ({
2533
- struct: {
2534
- ed25519Key: {
2535
- struct: {
2536
- data: {
2537
- array: {
2538
- type: string;
2539
- len: number;
2540
- };
2541
- };
2542
- };
2543
- };
2544
- secp256k1Key?: undefined;
2545
- };
2546
- } | {
2547
- struct: {
2548
- secp256k1Key: {
2549
- struct: {
2550
- data: {
2551
- array: {
2552
- type: string;
2553
- len: number;
2554
- };
2555
- };
2556
- };
2557
- };
2558
- ed25519Key?: undefined;
2559
- };
2560
- })[];
2561
- };
2562
- nonce: string;
2563
- receiverId: string;
2564
- blockHash: {
2565
- array: {
2566
- type: string;
2567
- len: number;
2568
- };
2569
- };
2570
- actions: {
2571
- array: {
2572
- type: {
2573
- enum: ({
2574
- struct: {
2575
- createAccount: {
2576
- struct: {};
2577
- };
2578
- deployContract?: undefined;
2579
- functionCall?: undefined;
2580
- transfer?: undefined;
2581
- stake?: undefined;
2582
- addKey?: undefined;
2583
- deleteKey?: undefined;
2584
- deleteAccount?: undefined;
2585
- signedDelegate?: undefined;
2586
- };
2587
- } | {
2588
- struct: {
2589
- deployContract: {
2590
- struct: {
2591
- code: {
2592
- array: {
2593
- type: string;
2594
- };
2595
- };
2596
- };
2597
- };
2598
- createAccount?: undefined;
2599
- functionCall?: undefined;
2600
- transfer?: undefined;
2601
- stake?: undefined;
2602
- addKey?: undefined;
2603
- deleteKey?: undefined;
2604
- deleteAccount?: undefined;
2605
- signedDelegate?: undefined;
2606
- };
2607
- } | {
2608
- struct: {
2609
- functionCall: {
2610
- struct: {
2611
- methodName: string;
2612
- args: {
2613
- array: {
2614
- type: string;
2615
- };
2616
- };
2617
- gas: string;
2618
- deposit: string;
2619
- };
2620
- };
2621
- createAccount?: undefined;
2622
- deployContract?: undefined;
2623
- transfer?: undefined;
2624
- stake?: undefined;
2625
- addKey?: undefined;
2626
- deleteKey?: undefined;
2627
- deleteAccount?: undefined;
2628
- signedDelegate?: undefined;
2629
- };
2630
- } | {
2631
- struct: {
2632
- transfer: {
2633
- struct: {
2634
- deposit: string;
2635
- };
2636
- };
2637
- createAccount?: undefined;
2638
- deployContract?: undefined;
2639
- functionCall?: undefined;
2640
- stake?: undefined;
2641
- addKey?: undefined;
2642
- deleteKey?: undefined;
2643
- deleteAccount?: undefined;
2644
- signedDelegate?: undefined;
2645
- };
2646
- } | {
2647
- struct: {
2648
- stake: {
2649
- struct: {
2650
- stake: string;
2651
- publicKey: {
2652
- enum: ({
2653
- struct: {
2654
- ed25519Key: {
2655
- struct: {
2656
- data: {
2657
- array: {
2658
- type: string;
2659
- len: number;
2660
- };
2661
- };
2662
- };
2663
- };
2664
- secp256k1Key?: undefined;
2665
- };
2666
- } | {
2667
- struct: {
2668
- secp256k1Key: {
2669
- struct: {
2670
- data: {
2671
- array: {
2672
- type: string;
2673
- len: number;
2674
- };
2675
- };
2676
- };
2677
- };
2678
- ed25519Key?: undefined;
2679
- };
2680
- })[];
2681
- };
2682
- };
2683
- };
2684
- createAccount?: undefined;
2685
- deployContract?: undefined;
2686
- functionCall?: undefined;
2687
- transfer?: undefined;
2688
- addKey?: undefined;
2689
- deleteKey?: undefined;
2690
- deleteAccount?: undefined;
2691
- signedDelegate?: undefined;
2692
- };
2693
- } | {
2694
- struct: {
2695
- addKey: {
2696
- struct: {
2697
- publicKey: {
2698
- enum: ({
2699
- struct: {
2700
- ed25519Key: {
2701
- struct: {
2702
- data: {
2703
- array: {
2704
- type: string;
2705
- len: number;
2706
- };
2707
- };
2708
- };
2709
- };
2710
- secp256k1Key?: undefined;
2711
- };
2712
- } | {
2713
- struct: {
2714
- secp256k1Key: {
2715
- struct: {
2716
- data: {
2717
- array: {
2718
- type: string;
2719
- len: number;
2720
- };
2721
- };
2722
- };
2723
- };
2724
- ed25519Key?: undefined;
2725
- };
2726
- })[];
2727
- };
2728
- accessKey: {
2729
- struct: {
2730
- nonce: string;
2731
- permission: {
2732
- enum: ({
2733
- struct: {
2734
- functionCall: {
2735
- struct: {
2736
- allowance: {
2737
- option: string;
2738
- };
2739
- receiverId: string;
2740
- methodNames: {
2741
- array: {
2742
- type: string;
2743
- };
2744
- };
2745
- };
2746
- };
2747
- fullAccess?: undefined;
2748
- };
2749
- } | {
2750
- struct: {
2751
- fullAccess: {
2752
- struct: {};
2753
- };
2754
- functionCall?: undefined;
2755
- };
2756
- })[];
2757
- };
2758
- };
2759
- };
2760
- };
2761
- };
2762
- createAccount?: undefined;
2763
- deployContract?: undefined;
2764
- functionCall?: undefined;
2765
- transfer?: undefined;
2766
- stake?: undefined;
2767
- deleteKey?: undefined;
2768
- deleteAccount?: undefined;
2769
- signedDelegate?: undefined;
2770
- };
2771
- } | {
2772
- struct: {
2773
- deleteKey: {
2774
- struct: {
2775
- publicKey: {
2776
- enum: ({
2777
- struct: {
2778
- ed25519Key: {
2779
- struct: {
2780
- data: {
2781
- array: {
2782
- type: string;
2783
- len: number;
2784
- };
2785
- };
2786
- };
2787
- };
2788
- secp256k1Key?: undefined;
2789
- };
2790
- } | {
2791
- struct: {
2792
- secp256k1Key: {
2793
- struct: {
2794
- data: {
2795
- array: {
2796
- type: string;
2797
- len: number;
2798
- };
2799
- };
2800
- };
2801
- };
2802
- ed25519Key?: undefined;
2803
- };
2804
- })[];
2805
- };
2806
- };
2807
- };
2808
- createAccount?: undefined;
2809
- deployContract?: undefined;
2810
- functionCall?: undefined;
2811
- transfer?: undefined;
2812
- stake?: undefined;
2813
- addKey?: undefined;
2814
- deleteAccount?: undefined;
2815
- signedDelegate?: undefined;
2816
- };
2817
- } | {
2818
- struct: {
2819
- deleteAccount: {
2820
- struct: {
2821
- beneficiaryId: string;
2822
- };
2823
- };
2824
- createAccount?: undefined;
2825
- deployContract?: undefined;
2826
- functionCall?: undefined;
2827
- transfer?: undefined;
2828
- stake?: undefined;
2829
- addKey?: undefined;
2830
- deleteKey?: undefined;
2831
- signedDelegate?: undefined;
2832
- };
2833
- } | {
2834
- struct: {
2835
- signedDelegate: {
2836
- struct: {
2837
- delegateAction: {
2838
- struct: {
2839
- senderId: string;
2840
- receiverId: string;
2841
- actions: {
2842
- array: {
2843
- type: {
2844
- enum: ({
2845
- struct: {
2846
- createAccount: {
2847
- struct: {};
2848
- };
2849
- deployContract?: undefined;
2850
- functionCall?: undefined;
2851
- transfer?: undefined;
2852
- stake?: undefined;
2853
- addKey?: undefined;
2854
- deleteKey?: undefined;
2855
- deleteAccount?: undefined;
2856
- };
2857
- } | {
2858
- struct: {
2859
- deployContract: {
2860
- struct: {
2861
- code: {
2862
- array: {
2863
- type: string;
2864
- };
2865
- };
2866
- };
2867
- };
2868
- createAccount?: undefined;
2869
- functionCall?: undefined;
2870
- transfer?: undefined;
2871
- stake?: undefined;
2872
- addKey?: undefined;
2873
- deleteKey?: undefined;
2874
- deleteAccount?: undefined;
2875
- };
2876
- } | {
2877
- struct: {
2878
- functionCall: {
2879
- struct: {
2880
- methodName: string;
2881
- args: {
2882
- array: {
2883
- type: string;
2884
- };
2885
- };
2886
- gas: string;
2887
- deposit: string;
2888
- };
2889
- };
2890
- createAccount?: undefined;
2891
- deployContract?: undefined;
2892
- transfer?: undefined;
2893
- stake?: undefined;
2894
- addKey?: undefined;
2895
- deleteKey?: undefined;
2896
- deleteAccount?: undefined;
2897
- };
2898
- } | {
2899
- struct: {
2900
- transfer: {
2901
- struct: {
2902
- deposit: string;
2903
- };
2904
- };
2905
- createAccount?: undefined;
2906
- deployContract?: undefined;
2907
- functionCall?: undefined;
2908
- stake?: undefined;
2909
- addKey?: undefined;
2910
- deleteKey?: undefined;
2911
- deleteAccount?: undefined;
2912
- };
2913
- } | {
2914
- struct: {
2915
- stake: {
2916
- struct: {
2917
- stake: string;
2918
- publicKey: {
2919
- enum: ({
2920
- struct: {
2921
- ed25519Key: {
2922
- struct: {
2923
- data: {
2924
- array: {
2925
- type: string;
2926
- len: number;
2927
- };
2928
- };
2929
- };
2930
- };
2931
- secp256k1Key?: undefined;
2932
- };
2933
- } | {
2934
- struct: {
2935
- secp256k1Key: {
2936
- struct: {
2937
- data: {
2938
- array: {
2939
- type: string;
2940
- len: number;
2941
- };
2942
- };
2943
- };
2944
- };
2945
- ed25519Key?: undefined;
2946
- };
2947
- })[];
2948
- };
2949
- };
2950
- };
2951
- createAccount?: undefined;
2952
- deployContract?: undefined;
2953
- functionCall?: undefined;
2954
- transfer?: undefined;
2955
- addKey?: undefined;
2956
- deleteKey?: undefined;
2957
- deleteAccount?: undefined;
2958
- };
2959
- } | {
2960
- struct: {
2961
- addKey: {
2962
- struct: {
2963
- publicKey: {
2964
- enum: ({
2965
- struct: {
2966
- ed25519Key: {
2967
- struct: {
2968
- data: {
2969
- array: {
2970
- type: string;
2971
- len: number;
2972
- };
2973
- };
2974
- };
2975
- };
2976
- secp256k1Key?: undefined;
2977
- };
2978
- } | {
2979
- struct: {
2980
- secp256k1Key: {
2981
- struct: {
2982
- data: {
2983
- array: {
2984
- type: string;
2985
- len: number;
2986
- };
2987
- };
2988
- };
2989
- };
2990
- ed25519Key?: undefined;
2991
- };
2992
- })[];
2993
- };
2994
- accessKey: {
2995
- struct: {
2996
- nonce: string;
2997
- permission: {
2998
- enum: ({
2999
- struct: {
3000
- functionCall: {
3001
- struct: {
3002
- allowance: {
3003
- option: string;
3004
- };
3005
- receiverId: string;
3006
- methodNames: {
3007
- array: {
3008
- type: string;
3009
- };
3010
- };
3011
- };
3012
- };
3013
- fullAccess?: undefined;
3014
- };
3015
- } | {
3016
- struct: {
3017
- fullAccess: {
3018
- struct: {};
3019
- };
3020
- functionCall?: undefined;
3021
- };
3022
- })[];
3023
- };
3024
- };
3025
- };
3026
- };
3027
- };
3028
- createAccount?: undefined;
3029
- deployContract?: undefined;
3030
- functionCall?: undefined;
3031
- transfer?: undefined;
3032
- stake?: undefined;
3033
- deleteKey?: undefined;
3034
- deleteAccount?: undefined;
3035
- };
3036
- } | {
3037
- struct: {
3038
- deleteKey: {
3039
- struct: {
3040
- publicKey: {
3041
- enum: ({
3042
- struct: {
3043
- ed25519Key: {
3044
- struct: {
3045
- data: {
3046
- array: {
3047
- type: string;
3048
- len: number;
3049
- };
3050
- };
3051
- };
3052
- };
3053
- secp256k1Key?: undefined;
3054
- };
3055
- } | {
3056
- struct: {
3057
- secp256k1Key: {
3058
- struct: {
3059
- data: {
3060
- array: {
3061
- type: string;
3062
- len: number;
3063
- };
3064
- };
3065
- };
3066
- };
3067
- ed25519Key?: undefined;
3068
- };
3069
- })[];
3070
- };
3071
- };
3072
- };
3073
- createAccount?: undefined;
3074
- deployContract?: undefined;
3075
- functionCall?: undefined;
3076
- transfer?: undefined;
3077
- stake?: undefined;
3078
- addKey?: undefined;
3079
- deleteAccount?: undefined;
3080
- };
3081
- } | {
3082
- struct: {
3083
- deleteAccount: {
3084
- struct: {
3085
- beneficiaryId: string;
3086
- };
3087
- };
3088
- createAccount?: undefined;
3089
- deployContract?: undefined;
3090
- functionCall?: undefined;
3091
- transfer?: undefined;
3092
- stake?: undefined;
3093
- addKey?: undefined;
3094
- deleteKey?: undefined;
3095
- };
3096
- })[];
3097
- };
3098
- };
3099
- };
3100
- nonce: string;
3101
- maxBlockHeight: string;
3102
- publicKey: {
3103
- enum: ({
3104
- struct: {
3105
- ed25519Key: {
3106
- struct: {
3107
- data: {
3108
- array: {
3109
- type: string;
3110
- len: number;
3111
- };
3112
- };
3113
- };
3114
- };
3115
- secp256k1Key?: undefined;
3116
- };
3117
- } | {
3118
- struct: {
3119
- secp256k1Key: {
3120
- struct: {
3121
- data: {
3122
- array: {
3123
- type: string;
3124
- len: number;
3125
- };
3126
- };
3127
- };
3128
- };
3129
- ed25519Key?: undefined;
3130
- };
3131
- })[];
3132
- };
3133
- };
3134
- };
3135
- signature: {
3136
- enum: ({
3137
- struct: {
3138
- ed25519Signature: {
3139
- struct: {
3140
- data: {
3141
- array: {
3142
- type: string;
3143
- len: number;
3144
- };
3145
- };
3146
- };
3147
- };
3148
- secp256k1Signature?: undefined;
3149
- };
3150
- } | {
3151
- struct: {
3152
- secp256k1Signature: {
3153
- struct: {
3154
- data: {
3155
- array: {
3156
- type: string;
3157
- len: number;
3158
- };
3159
- };
3160
- };
3161
- };
3162
- ed25519Signature?: undefined;
3163
- };
3164
- })[];
3165
- };
3166
- };
3167
- };
3168
- createAccount?: undefined;
3169
- deployContract?: undefined;
3170
- functionCall?: undefined;
3171
- transfer?: undefined;
3172
- stake?: undefined;
3173
- addKey?: undefined;
3174
- deleteKey?: undefined;
3175
- deleteAccount?: undefined;
3176
- };
3177
- })[];
3178
- };
3179
- };
3180
- };
3181
- };
3182
- };
3183
- signature: {
3184
- enum: ({
3185
- struct: {
3186
- ed25519Signature: {
3187
- struct: {
3188
- data: {
3189
- array: {
3190
- type: string;
3191
- len: number;
3192
- };
3193
- };
3194
- };
3195
- };
3196
- secp256k1Signature?: undefined;
3197
- };
3198
- } | {
3199
- struct: {
3200
- secp256k1Signature: {
3201
- struct: {
3202
- data: {
3203
- array: {
3204
- type: string;
3205
- len: number;
3206
- };
3207
- };
3208
- };
3209
- };
3210
- ed25519Signature?: undefined;
3211
- };
3212
- })[];
3213
- };
3214
- };
3215
- };
44
+ Ed25519Signature: Schema;
45
+ Secp256k1Signature: Schema;
46
+ Signature: Schema;
47
+ Ed25519Data: Schema;
48
+ Secp256k1Data: Schema;
49
+ PublicKey: Schema;
50
+ FunctionCallPermission: Schema;
51
+ FullAccessPermission: Schema;
52
+ AccessKeyPermission: Schema;
53
+ AccessKey: Schema;
54
+ CreateAccount: Schema;
55
+ DeployContract: Schema;
56
+ FunctionCall: Schema;
57
+ Transfer: Schema;
58
+ Stake: Schema;
59
+ AddKey: Schema;
60
+ DeleteKey: Schema;
61
+ DeleteAccount: Schema;
62
+ ClassicAction: Schema;
63
+ DelegateAction: Schema;
64
+ SignedDelegate: Schema;
65
+ Action: Schema;
66
+ Transaction: Schema;
67
+ SignedTransaction: Schema;
3216
68
  };
3217
69
 
3218
- declare function toBase64(data: any): string;
3219
- declare function fromBase64(str: any): Uint8Array<ArrayBuffer>;
70
+ declare function toHex(data: Uint8Array): string;
71
+ declare function fromHex(hex: string): Uint8Array;
72
+ declare function base64ToBytes(b64Val: string): Uint8Array;
73
+ declare function bytesToBase64(bytesArr: Uint8Array): string;
74
+ declare function toBase64(strVal: string): string | null;
75
+ declare function fromBase64(strVal: string): string | null;
3220
76
  declare function convertUnit(s: string | TemplateStringsArray, ...args: any[]): string;
3221
- declare function lsSet(key: any, value: any): void;
3222
- declare function lsGet(key: any): any;
77
+ declare function lsSet(key: string, value: any): void;
78
+ declare function lsGet(key: string): any;
3223
79
  declare function deepCopy(obj: any): any;
3224
80
  declare function tryParseJson(...args: any[]): any;
3225
81
  declare function parseJsonFromBytes(bytes: Uint8Array): any;
3226
- declare function canSignWithLAK(actions: any): any;
82
+ declare function canSignWithLAK(actions: any): boolean;
83
+
84
+ declare const LsPrefix = "__fastnear_";
85
+ interface StorageBackend {
86
+ getItem(key: string): string | null;
87
+ setItem(key: string, value: string): void;
88
+ removeItem(key: string): void;
89
+ clear(): void;
90
+ }
91
+ declare const createDefaultStorage: () => StorageBackend;
92
+ declare const memoryStore: Map<string, string>;
93
+ declare const storage: {
94
+ setBackend: (customBackend: StorageBackend) => void;
95
+ set: (key: string, value: any) => void;
96
+ get: (key: string) => any;
97
+ remove: (key: string) => void;
98
+ clear: () => void;
99
+ };
100
+
101
+ declare const exp: {
102
+ borsh: {
103
+ serialize: typeof serialize;
104
+ deserialize: typeof deserialize;
105
+ };
106
+ borshSchema: typeof borshSchema;
107
+ };
3227
108
 
3228
- export { SCHEMA, canSignWithLAK, convertUnit, deepCopy, fromBase64, keyFromString, keyToString, lsGet, lsSet, mapAction, mapTransaction, parseJsonFromBytes, privateKeyFromRandom, publicKeyFromPrivate, serializeSignedTransaction, serializeTransaction, signBytes, signHash, toBase64, tryParseJson };
109
+ export { LsPrefix, type PlainSignedTransaction, type PlainTransaction, SCHEMA, type StorageBackend, base64ToBytes, bytesToBase64, canSignWithLAK, convertUnit, createDefaultStorage, deepCopy, exp, fromBase64, fromHex, keyFromString, keyToString, lsGet, lsSet, mapAction, mapTransaction, memoryStore, parseJsonFromBytes, privateKeyFromRandom, publicKeyFromPrivate, serializeSignedTransaction, serializeTransaction, signBytes, signHash, storage, toBase64, toHex, tryParseJson, txToJson, txToJsonStringified };