@pushchain/core 5.1.4-alpha.1 → 5.1.4-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/package.json +4 -4
  2. package/src/lib/constants/abi/factoryV1.d.ts +59 -76
  3. package/src/lib/constants/abi/factoryV1.js +0 -517
  4. package/src/lib/constants/abi/feeLocker.evm.d.ts +15 -50
  5. package/src/lib/constants/abi/feeLocker.evm.js +0 -385
  6. package/src/lib/constants/abi/index.d.ts +1 -1
  7. package/src/lib/constants/abi/index.js +1 -2
  8. package/src/lib/constants/abi/prc20.evm.d.ts +0 -53
  9. package/src/lib/constants/abi/prc20.evm.js +1 -42
  10. package/src/lib/constants/abi/uea.svm.d.ts +21 -99
  11. package/src/lib/constants/abi/uea.svm.js +0 -299
  12. package/src/lib/constants/abi/universalGatewayV0.evm.d.ts +45 -104
  13. package/src/lib/constants/abi/universalGatewayV0.evm.js +0 -2149
  14. package/src/lib/index.d.ts +1 -1
  15. package/src/lib/orchestrator/internals/cascade.d.ts +4 -2
  16. package/src/lib/orchestrator/internals/cascade.js +34 -18
  17. package/src/lib/orchestrator/internals/execute-standard.js +5 -1
  18. package/src/lib/orchestrator/internals/gas-calculator.d.ts +9 -0
  19. package/src/lib/orchestrator/internals/gas-calculator.js +94 -0
  20. package/src/lib/orchestrator/internals/route-handlers.js +88 -57
  21. package/src/lib/orchestrator/orchestrator.d.ts +5 -3
  22. package/src/lib/orchestrator/orchestrator.js +2 -12
  23. package/src/lib/orchestrator/orchestrator.types.d.ts +8 -15
  24. package/src/lib/progress-hook/progress-hook.js +1 -1
  25. package/src/lib/push-chain/push-chain.d.ts +5 -6
  26. package/src/lib/push-chain/push-chain.js +4 -3
  27. package/src/lib/universal/account/account.d.ts +16 -8
  28. package/src/lib/universal/account/account.js +118 -73
  29. package/src/lib/universal/signer/signer.js +1 -1
  30. package/src/lib/universal/universal.types.d.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushchain/core",
3
- "version": "5.1.4-alpha.1",
3
+ "version": "5.1.4-alpha.11",
4
4
  "homepage": "https://push.org",
5
5
  "keywords": [
6
6
  "pushchain",
@@ -66,8 +66,8 @@
66
66
  "CHANGELOG.md"
67
67
  ],
68
68
  "devDependencies": {
69
+ "@types/bs58": "^4.0.0",
69
70
  "secp256k1": "^5.0.1",
70
71
  "ts-proto": "^2.0.3"
71
- },
72
- "types": "./src/index.d.ts"
73
- }
72
+ }
73
+ }
@@ -1,76 +1,59 @@
1
- export declare const FACTORY_V1: ({
2
- type: string;
3
- inputs: never[];
4
- stateMutability: string;
5
- name?: undefined;
6
- outputs?: undefined;
7
- anonymous?: undefined;
8
- } | {
9
- type: string;
10
- name: string;
11
- inputs: {
12
- name: string;
13
- type: string;
14
- internalType: string;
15
- components: {
16
- name: string;
17
- type: string;
18
- internalType: string;
19
- }[];
20
- }[];
21
- outputs: {
22
- name: string;
23
- type: string;
24
- internalType: string;
25
- }[];
26
- stateMutability: string;
27
- anonymous?: undefined;
28
- } | {
29
- type: string;
30
- name: string;
31
- inputs: {
32
- name: string;
33
- type: string;
34
- internalType: string;
35
- }[];
36
- outputs: ({
37
- name: string;
38
- type: string;
39
- internalType: string;
40
- components: {
41
- name: string;
42
- type: string;
43
- internalType: string;
44
- }[];
45
- } | {
46
- name: string;
47
- type: string;
48
- internalType: string;
49
- components?: undefined;
50
- })[];
51
- stateMutability: string;
52
- anonymous?: undefined;
53
- } | {
54
- type: string;
55
- name: string;
56
- inputs: {
57
- name: string;
58
- type: string;
59
- indexed: boolean;
60
- internalType: string;
61
- }[];
62
- anonymous: boolean;
63
- stateMutability?: undefined;
64
- outputs?: undefined;
65
- } | {
66
- type: string;
67
- name: string;
68
- inputs: {
69
- name: string;
70
- type: string;
71
- internalType: string;
72
- }[];
73
- stateMutability?: undefined;
74
- outputs?: undefined;
75
- anonymous?: undefined;
76
- })[];
1
+ export declare const FACTORY_V1: readonly [{
2
+ readonly type: "function";
3
+ readonly name: "computeUEA";
4
+ readonly inputs: readonly [{
5
+ readonly name: "_id";
6
+ readonly type: "tuple";
7
+ readonly internalType: "struct UniversalAccountId";
8
+ readonly components: readonly [{
9
+ readonly name: "chainNamespace";
10
+ readonly type: "string";
11
+ readonly internalType: "string";
12
+ }, {
13
+ readonly name: "chainId";
14
+ readonly type: "string";
15
+ readonly internalType: "string";
16
+ }, {
17
+ readonly name: "owner";
18
+ readonly type: "bytes";
19
+ readonly internalType: "bytes";
20
+ }];
21
+ }];
22
+ readonly outputs: readonly [{
23
+ readonly name: "";
24
+ readonly type: "address";
25
+ readonly internalType: "address";
26
+ }];
27
+ readonly stateMutability: "view";
28
+ }, {
29
+ readonly type: "function";
30
+ readonly name: "getOriginForUEA";
31
+ readonly inputs: readonly [{
32
+ readonly name: "addr";
33
+ readonly type: "address";
34
+ readonly internalType: "address";
35
+ }];
36
+ readonly outputs: readonly [{
37
+ readonly name: "account";
38
+ readonly type: "tuple";
39
+ readonly internalType: "struct UniversalAccountId";
40
+ readonly components: readonly [{
41
+ readonly name: "chainNamespace";
42
+ readonly type: "string";
43
+ readonly internalType: "string";
44
+ }, {
45
+ readonly name: "chainId";
46
+ readonly type: "string";
47
+ readonly internalType: "string";
48
+ }, {
49
+ readonly name: "owner";
50
+ readonly type: "bytes";
51
+ readonly internalType: "bytes";
52
+ }];
53
+ }, {
54
+ readonly name: "isUEA";
55
+ readonly type: "bool";
56
+ readonly internalType: "bool";
57
+ }];
58
+ readonly stateMutability: "view";
59
+ }];
@@ -2,68 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FACTORY_V1 = void 0;
4
4
  exports.FACTORY_V1 = [
5
- {
6
- type: 'constructor',
7
- inputs: [],
8
- stateMutability: 'nonpayable',
9
- },
10
- {
11
- type: 'function',
12
- name: 'CHAIN_to_VM',
13
- inputs: [
14
- {
15
- name: '',
16
- type: 'bytes32',
17
- internalType: 'bytes32',
18
- },
19
- ],
20
- outputs: [
21
- {
22
- name: '',
23
- type: 'bytes32',
24
- internalType: 'bytes32',
25
- },
26
- ],
27
- stateMutability: 'view',
28
- },
29
- {
30
- type: 'function',
31
- name: 'UEA_VM',
32
- inputs: [
33
- {
34
- name: '',
35
- type: 'bytes32',
36
- internalType: 'bytes32',
37
- },
38
- ],
39
- outputs: [
40
- {
41
- name: '',
42
- type: 'address',
43
- internalType: 'address',
44
- },
45
- ],
46
- stateMutability: 'view',
47
- },
48
- {
49
- type: 'function',
50
- name: 'UOA_to_UEA',
51
- inputs: [
52
- {
53
- name: '',
54
- type: 'bytes32',
55
- internalType: 'bytes32',
56
- },
57
- ],
58
- outputs: [
59
- {
60
- name: '',
61
- type: 'address',
62
- internalType: 'address',
63
- },
64
- ],
65
- stateMutability: 'view',
66
- },
67
5
  {
68
6
  type: 'function',
69
7
  name: 'computeUEA',
@@ -100,78 +38,6 @@ exports.FACTORY_V1 = [
100
38
  ],
101
39
  stateMutability: 'view',
102
40
  },
103
- {
104
- type: 'function',
105
- name: 'deployUEA',
106
- inputs: [
107
- {
108
- name: '_id',
109
- type: 'tuple',
110
- internalType: 'struct UniversalAccountId',
111
- components: [
112
- {
113
- name: 'chainNamespace',
114
- type: 'string',
115
- internalType: 'string',
116
- },
117
- {
118
- name: 'chainId',
119
- type: 'string',
120
- internalType: 'string',
121
- },
122
- {
123
- name: 'owner',
124
- type: 'bytes',
125
- internalType: 'bytes',
126
- },
127
- ],
128
- },
129
- ],
130
- outputs: [
131
- {
132
- name: '',
133
- type: 'address',
134
- internalType: 'address',
135
- },
136
- ],
137
- stateMutability: 'nonpayable',
138
- },
139
- {
140
- type: 'function',
141
- name: 'generateSalt',
142
- inputs: [
143
- {
144
- name: '_id',
145
- type: 'tuple',
146
- internalType: 'struct UniversalAccountId',
147
- components: [
148
- {
149
- name: 'chainNamespace',
150
- type: 'string',
151
- internalType: 'string',
152
- },
153
- {
154
- name: 'chainId',
155
- type: 'string',
156
- internalType: 'string',
157
- },
158
- {
159
- name: 'owner',
160
- type: 'bytes',
161
- internalType: 'bytes',
162
- },
163
- ],
164
- },
165
- ],
166
- outputs: [
167
- {
168
- name: '',
169
- type: 'bytes32',
170
- internalType: 'bytes32',
171
- },
172
- ],
173
- stateMutability: 'pure',
174
- },
175
41
  {
176
42
  type: 'function',
177
43
  name: 'getOriginForUEA',
@@ -213,388 +79,5 @@ exports.FACTORY_V1 = [
213
79
  ],
214
80
  stateMutability: 'view',
215
81
  },
216
- {
217
- type: 'function',
218
- name: 'getUEA',
219
- inputs: [
220
- {
221
- name: '_chainHash',
222
- type: 'bytes32',
223
- internalType: 'bytes32',
224
- },
225
- ],
226
- outputs: [
227
- {
228
- name: '',
229
- type: 'address',
230
- internalType: 'address',
231
- },
232
- ],
233
- stateMutability: 'view',
234
- },
235
- {
236
- type: 'function',
237
- name: 'getUEAForOrigin',
238
- inputs: [
239
- {
240
- name: '_id',
241
- type: 'tuple',
242
- internalType: 'struct UniversalAccountId',
243
- components: [
244
- {
245
- name: 'chainNamespace',
246
- type: 'string',
247
- internalType: 'string',
248
- },
249
- {
250
- name: 'chainId',
251
- type: 'string',
252
- internalType: 'string',
253
- },
254
- {
255
- name: 'owner',
256
- type: 'bytes',
257
- internalType: 'bytes',
258
- },
259
- ],
260
- },
261
- ],
262
- outputs: [
263
- {
264
- name: 'uea',
265
- type: 'address',
266
- internalType: 'address',
267
- },
268
- {
269
- name: 'isDeployed',
270
- type: 'bool',
271
- internalType: 'bool',
272
- },
273
- ],
274
- stateMutability: 'view',
275
- },
276
- {
277
- type: 'function',
278
- name: 'getVMType',
279
- inputs: [
280
- {
281
- name: '_chainHash',
282
- type: 'bytes32',
283
- internalType: 'bytes32',
284
- },
285
- ],
286
- outputs: [
287
- {
288
- name: 'vmHash',
289
- type: 'bytes32',
290
- internalType: 'bytes32',
291
- },
292
- {
293
- name: 'isRegistered',
294
- type: 'bool',
295
- internalType: 'bool',
296
- },
297
- ],
298
- stateMutability: 'view',
299
- },
300
- {
301
- type: 'function',
302
- name: 'hasCode',
303
- inputs: [
304
- {
305
- name: '_addr',
306
- type: 'address',
307
- internalType: 'address',
308
- },
309
- ],
310
- outputs: [
311
- {
312
- name: '',
313
- type: 'bool',
314
- internalType: 'bool',
315
- },
316
- ],
317
- stateMutability: 'view',
318
- },
319
- {
320
- type: 'function',
321
- name: 'initialize',
322
- inputs: [
323
- {
324
- name: 'initialOwner',
325
- type: 'address',
326
- internalType: 'address',
327
- },
328
- ],
329
- outputs: [],
330
- stateMutability: 'nonpayable',
331
- },
332
- {
333
- type: 'function',
334
- name: 'owner',
335
- inputs: [],
336
- outputs: [
337
- {
338
- name: '',
339
- type: 'address',
340
- internalType: 'address',
341
- },
342
- ],
343
- stateMutability: 'view',
344
- },
345
- {
346
- type: 'function',
347
- name: 'registerMultipleUEA',
348
- inputs: [
349
- {
350
- name: '_chainHashes',
351
- type: 'bytes32[]',
352
- internalType: 'bytes32[]',
353
- },
354
- {
355
- name: '_vmHashes',
356
- type: 'bytes32[]',
357
- internalType: 'bytes32[]',
358
- },
359
- {
360
- name: '_UEA',
361
- type: 'address[]',
362
- internalType: 'address[]',
363
- },
364
- ],
365
- outputs: [],
366
- stateMutability: 'nonpayable',
367
- },
368
- {
369
- type: 'function',
370
- name: 'registerNewChain',
371
- inputs: [
372
- {
373
- name: '_chainHash',
374
- type: 'bytes32',
375
- internalType: 'bytes32',
376
- },
377
- {
378
- name: '_vmHash',
379
- type: 'bytes32',
380
- internalType: 'bytes32',
381
- },
382
- ],
383
- outputs: [],
384
- stateMutability: 'nonpayable',
385
- },
386
- {
387
- type: 'function',
388
- name: 'registerUEA',
389
- inputs: [
390
- {
391
- name: '_chainHash',
392
- type: 'bytes32',
393
- internalType: 'bytes32',
394
- },
395
- {
396
- name: '_vmHash',
397
- type: 'bytes32',
398
- internalType: 'bytes32',
399
- },
400
- {
401
- name: '_UEA',
402
- type: 'address',
403
- internalType: 'address',
404
- },
405
- ],
406
- outputs: [],
407
- stateMutability: 'nonpayable',
408
- },
409
- {
410
- type: 'function',
411
- name: 'renounceOwnership',
412
- inputs: [],
413
- outputs: [],
414
- stateMutability: 'nonpayable',
415
- },
416
- {
417
- type: 'function',
418
- name: 'transferOwnership',
419
- inputs: [
420
- {
421
- name: 'newOwner',
422
- type: 'address',
423
- internalType: 'address',
424
- },
425
- ],
426
- outputs: [],
427
- stateMutability: 'nonpayable',
428
- },
429
- {
430
- type: 'event',
431
- name: 'ChainRegistered',
432
- inputs: [
433
- {
434
- name: 'chainHash',
435
- type: 'bytes32',
436
- indexed: true,
437
- internalType: 'bytes32',
438
- },
439
- {
440
- name: 'vmHash',
441
- type: 'bytes32',
442
- indexed: false,
443
- internalType: 'bytes32',
444
- },
445
- ],
446
- anonymous: false,
447
- },
448
- {
449
- type: 'event',
450
- name: 'Initialized',
451
- inputs: [
452
- {
453
- name: 'version',
454
- type: 'uint64',
455
- indexed: false,
456
- internalType: 'uint64',
457
- },
458
- ],
459
- anonymous: false,
460
- },
461
- {
462
- type: 'event',
463
- name: 'OwnershipTransferred',
464
- inputs: [
465
- {
466
- name: 'previousOwner',
467
- type: 'address',
468
- indexed: true,
469
- internalType: 'address',
470
- },
471
- {
472
- name: 'newOwner',
473
- type: 'address',
474
- indexed: true,
475
- internalType: 'address',
476
- },
477
- ],
478
- anonymous: false,
479
- },
480
- {
481
- type: 'event',
482
- name: 'UEADeployed',
483
- inputs: [
484
- {
485
- name: 'UEA',
486
- type: 'address',
487
- indexed: true,
488
- internalType: 'address',
489
- },
490
- {
491
- name: 'owner',
492
- type: 'bytes',
493
- indexed: false,
494
- internalType: 'bytes',
495
- },
496
- {
497
- name: 'sourceChainId',
498
- type: 'string',
499
- indexed: false,
500
- internalType: 'string',
501
- },
502
- {
503
- name: 'chainHash',
504
- type: 'bytes32',
505
- indexed: false,
506
- internalType: 'bytes32',
507
- },
508
- ],
509
- anonymous: false,
510
- },
511
- {
512
- type: 'event',
513
- name: 'UEARegistered',
514
- inputs: [
515
- {
516
- name: 'chainHash',
517
- type: 'bytes32',
518
- indexed: true,
519
- internalType: 'bytes32',
520
- },
521
- {
522
- name: 'UEA_Logic',
523
- type: 'address',
524
- indexed: false,
525
- internalType: 'address',
526
- },
527
- {
528
- name: 'vmHash',
529
- type: 'bytes32',
530
- indexed: false,
531
- internalType: 'bytes32',
532
- },
533
- ],
534
- anonymous: false,
535
- },
536
- {
537
- type: 'error',
538
- name: 'AccountAlreadyExists',
539
- inputs: [],
540
- },
541
- {
542
- type: 'error',
543
- name: 'FailedDeployment',
544
- inputs: [],
545
- },
546
- {
547
- type: 'error',
548
- name: 'InsufficientBalance',
549
- inputs: [
550
- {
551
- name: 'balance',
552
- type: 'uint256',
553
- internalType: 'uint256',
554
- },
555
- {
556
- name: 'needed',
557
- type: 'uint256',
558
- internalType: 'uint256',
559
- },
560
- ],
561
- },
562
- {
563
- type: 'error',
564
- name: 'InvalidInitialization',
565
- inputs: [],
566
- },
567
- {
568
- type: 'error',
569
- name: 'InvalidInputArgs',
570
- inputs: [],
571
- },
572
- {
573
- type: 'error',
574
- name: 'NotInitializing',
575
- inputs: [],
576
- },
577
- {
578
- type: 'error',
579
- name: 'OwnableInvalidOwner',
580
- inputs: [
581
- {
582
- name: 'owner',
583
- type: 'address',
584
- internalType: 'address',
585
- },
586
- ],
587
- },
588
- {
589
- type: 'error',
590
- name: 'OwnableUnauthorizedAccount',
591
- inputs: [
592
- {
593
- name: 'account',
594
- type: 'address',
595
- internalType: 'address',
596
- },
597
- ],
598
- },
599
82
  ];
600
83
  //# sourceMappingURL=factoryV1.js.map