@pushchain/core 5.1.6 → 5.1.8
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/package.json +1 -1
- package/src/lib/constants/abi/feeLocker.json +1 -2579
- package/src/lib/constants/abi/universalGatewayV0.json +1 -3009
- package/src/lib/constants/chain.d.ts +3 -0
- package/src/lib/constants/chain.js +54 -1
- package/src/lib/constants/tokens.js +25 -0
- package/src/lib/generated/uexecutor/v1/types.d.ts +0 -6
- package/src/lib/generated/uexecutor/v1/types.js +0 -267
- package/src/lib/generated/uexecutor/v2/index.d.ts +1 -1
- package/src/lib/generated/uexecutor/v2/index.js +1 -9
- package/src/lib/generated/uexecutor/v2/types.d.ts +1 -7
- package/src/lib/generated/uexecutor/v2/types.js +1 -287
- package/src/lib/generated/v1/tx.d.ts +0 -4
- package/src/lib/generated/v1/tx.js +0 -205
- package/src/lib/orchestrator/orchestrator.types.d.ts +0 -7
- package/src/lib/orchestrator/payload-builders.d.ts +0 -45
- package/src/lib/orchestrator/payload-builders.js +0 -110
- package/src/lib/progress-hook/progress-hook.js +6 -6
- package/src/lib/push-client/push-client.js +12 -11
- package/src/lib/universal/account/account.js +10 -2
- package/src/lib/vm-client/evm-client.d.ts +1 -1
- package/src/lib/vm-client/evm-client.js +2 -1
- package/src/lib/vm-client/vm-client.types.d.ts +2 -1
- package/src/lib/universal-tx-detector/__tests__/fixtures/builders.d.ts +0 -32
- package/src/lib/universal-tx-detector/__tests__/fixtures/builders.js +0 -65
- package/src/lib/universal-tx-detector/__tests__/fixtures/scenarios.d.ts +0 -72
- package/src/lib/universal-tx-detector/__tests__/fixtures/scenarios.js +0 -669
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UniversalTxV2Codec = exports.OutboundTxV2Codec = exports.RevertInstructions = exports.OutboundObservation = exports.OriginatingPcTx = exports.OutboundStatus = exports.TxType = exports.PCTx = exports.Inbound = exports.UniversalPayload = exports.
|
|
4
|
-
exports.txTypeFromJSON = txTypeFromJSON;
|
|
5
|
-
exports.txTypeToJSON = txTypeToJSON;
|
|
6
|
-
exports.outboundStatusFromJSON = outboundStatusFromJSON;
|
|
7
|
-
exports.outboundStatusToJSON = outboundStatusToJSON;
|
|
3
|
+
exports.UniversalTxV2Codec = exports.OutboundTxV2Codec = exports.RevertInstructions = exports.OutboundObservation = exports.OriginatingPcTx = exports.OutboundStatus = exports.TxType = exports.PCTx = exports.Inbound = exports.UniversalPayload = exports.UniversalTxStatus = exports.VerificationType = exports.protobufPackage = void 0;
|
|
8
4
|
// Code generated to match uexecutor/v1/types.proto with expanded OutboundTx
|
|
9
5
|
// This provides v2 types with full OutboundTx fields and repeated outbound_tx array
|
|
10
6
|
/* eslint-disable */
|
|
@@ -13,11 +9,7 @@ exports.protobufPackage = 'uexecutor.v2';
|
|
|
13
9
|
// Re-export enums from v1 that are unchanged
|
|
14
10
|
var types_1 = require("../v1/types");
|
|
15
11
|
Object.defineProperty(exports, "VerificationType", { enumerable: true, get: function () { return types_1.VerificationType; } });
|
|
16
|
-
Object.defineProperty(exports, "verificationTypeFromJSON", { enumerable: true, get: function () { return types_1.verificationTypeFromJSON; } });
|
|
17
|
-
Object.defineProperty(exports, "verificationTypeToJSON", { enumerable: true, get: function () { return types_1.verificationTypeToJSON; } });
|
|
18
12
|
Object.defineProperty(exports, "UniversalTxStatus", { enumerable: true, get: function () { return types_1.UniversalTxStatus; } });
|
|
19
|
-
Object.defineProperty(exports, "universalTxStatusFromJSON", { enumerable: true, get: function () { return types_1.universalTxStatusFromJSON; } });
|
|
20
|
-
Object.defineProperty(exports, "universalTxStatusToJSON", { enumerable: true, get: function () { return types_1.universalTxStatusToJSON; } });
|
|
21
13
|
// Import types from v1 that are unchanged
|
|
22
14
|
const types_2 = require("../v1/types");
|
|
23
15
|
Object.defineProperty(exports, "UniversalPayload", { enumerable: true, get: function () { return types_2.UniversalPayload; } });
|
|
@@ -38,56 +30,6 @@ var TxType;
|
|
|
38
30
|
TxType[TxType["INBOUND_REVERT"] = 6] = "INBOUND_REVERT";
|
|
39
31
|
TxType[TxType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
40
32
|
})(TxType || (exports.TxType = TxType = {}));
|
|
41
|
-
function txTypeFromJSON(object) {
|
|
42
|
-
switch (object) {
|
|
43
|
-
case 0:
|
|
44
|
-
case 'UNSPECIFIED_TX':
|
|
45
|
-
return TxType.UNSPECIFIED_TX;
|
|
46
|
-
case 1:
|
|
47
|
-
case 'GAS':
|
|
48
|
-
return TxType.GAS;
|
|
49
|
-
case 2:
|
|
50
|
-
case 'GAS_AND_PAYLOAD':
|
|
51
|
-
return TxType.GAS_AND_PAYLOAD;
|
|
52
|
-
case 3:
|
|
53
|
-
case 'FUNDS':
|
|
54
|
-
return TxType.FUNDS;
|
|
55
|
-
case 4:
|
|
56
|
-
case 'FUNDS_AND_PAYLOAD':
|
|
57
|
-
return TxType.FUNDS_AND_PAYLOAD;
|
|
58
|
-
case 5:
|
|
59
|
-
case 'PAYLOAD':
|
|
60
|
-
return TxType.PAYLOAD;
|
|
61
|
-
case 6:
|
|
62
|
-
case 'INBOUND_REVERT':
|
|
63
|
-
return TxType.INBOUND_REVERT;
|
|
64
|
-
case -1:
|
|
65
|
-
case 'UNRECOGNIZED':
|
|
66
|
-
default:
|
|
67
|
-
return TxType.UNRECOGNIZED;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
function txTypeToJSON(object) {
|
|
71
|
-
switch (object) {
|
|
72
|
-
case TxType.UNSPECIFIED_TX:
|
|
73
|
-
return 'UNSPECIFIED_TX';
|
|
74
|
-
case TxType.GAS:
|
|
75
|
-
return 'GAS';
|
|
76
|
-
case TxType.GAS_AND_PAYLOAD:
|
|
77
|
-
return 'GAS_AND_PAYLOAD';
|
|
78
|
-
case TxType.FUNDS:
|
|
79
|
-
return 'FUNDS';
|
|
80
|
-
case TxType.FUNDS_AND_PAYLOAD:
|
|
81
|
-
return 'FUNDS_AND_PAYLOAD';
|
|
82
|
-
case TxType.PAYLOAD:
|
|
83
|
-
return 'PAYLOAD';
|
|
84
|
-
case TxType.INBOUND_REVERT:
|
|
85
|
-
return 'INBOUND_REVERT';
|
|
86
|
-
case TxType.UNRECOGNIZED:
|
|
87
|
-
default:
|
|
88
|
-
return 'UNRECOGNIZED';
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
33
|
/**
|
|
92
34
|
* OutboundStatus enum for outbound transaction status
|
|
93
35
|
*/
|
|
@@ -99,41 +41,6 @@ var OutboundStatus;
|
|
|
99
41
|
OutboundStatus[OutboundStatus["REVERTED"] = 3] = "REVERTED";
|
|
100
42
|
OutboundStatus[OutboundStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
101
43
|
})(OutboundStatus || (exports.OutboundStatus = OutboundStatus = {}));
|
|
102
|
-
function outboundStatusFromJSON(object) {
|
|
103
|
-
switch (object) {
|
|
104
|
-
case 0:
|
|
105
|
-
case 'OUTBOUND_STATUS_UNSPECIFIED':
|
|
106
|
-
return OutboundStatus.OUTBOUND_STATUS_UNSPECIFIED;
|
|
107
|
-
case 1:
|
|
108
|
-
case 'PENDING':
|
|
109
|
-
return OutboundStatus.PENDING;
|
|
110
|
-
case 2:
|
|
111
|
-
case 'OBSERVED':
|
|
112
|
-
return OutboundStatus.OBSERVED;
|
|
113
|
-
case 3:
|
|
114
|
-
case 'REVERTED':
|
|
115
|
-
return OutboundStatus.REVERTED;
|
|
116
|
-
case -1:
|
|
117
|
-
case 'UNRECOGNIZED':
|
|
118
|
-
default:
|
|
119
|
-
return OutboundStatus.UNRECOGNIZED;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
function outboundStatusToJSON(object) {
|
|
123
|
-
switch (object) {
|
|
124
|
-
case OutboundStatus.OUTBOUND_STATUS_UNSPECIFIED:
|
|
125
|
-
return 'OUTBOUND_STATUS_UNSPECIFIED';
|
|
126
|
-
case OutboundStatus.PENDING:
|
|
127
|
-
return 'PENDING';
|
|
128
|
-
case OutboundStatus.OBSERVED:
|
|
129
|
-
return 'OBSERVED';
|
|
130
|
-
case OutboundStatus.REVERTED:
|
|
131
|
-
return 'REVERTED';
|
|
132
|
-
case OutboundStatus.UNRECOGNIZED:
|
|
133
|
-
default:
|
|
134
|
-
return 'UNRECOGNIZED';
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
44
|
// ============================================================================
|
|
138
45
|
// Encoder/Decoder implementations
|
|
139
46
|
// ============================================================================
|
|
@@ -173,22 +80,6 @@ exports.OriginatingPcTx = {
|
|
|
173
80
|
}
|
|
174
81
|
return message;
|
|
175
82
|
},
|
|
176
|
-
fromJSON(object) {
|
|
177
|
-
return {
|
|
178
|
-
txHash: isSet(object.txHash) ? globalThis.String(object.txHash) : '',
|
|
179
|
-
logIndex: isSet(object.logIndex)
|
|
180
|
-
? globalThis.String(object.logIndex)
|
|
181
|
-
: '',
|
|
182
|
-
};
|
|
183
|
-
},
|
|
184
|
-
toJSON(message) {
|
|
185
|
-
const obj = {};
|
|
186
|
-
if (message.txHash !== '')
|
|
187
|
-
obj.txHash = message.txHash;
|
|
188
|
-
if (message.logIndex !== '')
|
|
189
|
-
obj.logIndex = message.logIndex;
|
|
190
|
-
return obj;
|
|
191
|
-
},
|
|
192
83
|
fromPartial(object) {
|
|
193
84
|
var _a, _b;
|
|
194
85
|
const message = createBaseOriginatingPcTx();
|
|
@@ -251,37 +142,6 @@ exports.OutboundObservation = {
|
|
|
251
142
|
}
|
|
252
143
|
return message;
|
|
253
144
|
},
|
|
254
|
-
fromJSON(object) {
|
|
255
|
-
return {
|
|
256
|
-
success: isSet(object.success)
|
|
257
|
-
? globalThis.Boolean(object.success)
|
|
258
|
-
: false,
|
|
259
|
-
blockHeight: isSet(object.blockHeight)
|
|
260
|
-
? globalThis.Number(object.blockHeight)
|
|
261
|
-
: 0,
|
|
262
|
-
txHash: isSet(object.txHash) ? globalThis.String(object.txHash) : '',
|
|
263
|
-
errorMsg: isSet(object.errorMsg)
|
|
264
|
-
? globalThis.String(object.errorMsg)
|
|
265
|
-
: '',
|
|
266
|
-
gasFeeUsed: isSet(object.gasFeeUsed)
|
|
267
|
-
? globalThis.String(object.gasFeeUsed)
|
|
268
|
-
: '',
|
|
269
|
-
};
|
|
270
|
-
},
|
|
271
|
-
toJSON(message) {
|
|
272
|
-
const obj = {};
|
|
273
|
-
if (message.success !== false)
|
|
274
|
-
obj.success = message.success;
|
|
275
|
-
if (message.blockHeight !== 0)
|
|
276
|
-
obj.blockHeight = message.blockHeight;
|
|
277
|
-
if (message.txHash !== '')
|
|
278
|
-
obj.txHash = message.txHash;
|
|
279
|
-
if (message.errorMsg !== '')
|
|
280
|
-
obj.errorMsg = message.errorMsg;
|
|
281
|
-
if (message.gasFeeUsed !== '')
|
|
282
|
-
obj.gasFeeUsed = message.gasFeeUsed;
|
|
283
|
-
return obj;
|
|
284
|
-
},
|
|
285
145
|
fromPartial(object) {
|
|
286
146
|
var _a, _b, _c, _d, _e;
|
|
287
147
|
const message = createBaseOutboundObservation();
|
|
@@ -321,19 +181,6 @@ exports.RevertInstructions = {
|
|
|
321
181
|
}
|
|
322
182
|
return message;
|
|
323
183
|
},
|
|
324
|
-
fromJSON(object) {
|
|
325
|
-
return {
|
|
326
|
-
fundRecipient: isSet(object.fundRecipient)
|
|
327
|
-
? globalThis.String(object.fundRecipient)
|
|
328
|
-
: '',
|
|
329
|
-
};
|
|
330
|
-
},
|
|
331
|
-
toJSON(message) {
|
|
332
|
-
const obj = {};
|
|
333
|
-
if (message.fundRecipient !== '')
|
|
334
|
-
obj.fundRecipient = message.fundRecipient;
|
|
335
|
-
return obj;
|
|
336
|
-
},
|
|
337
184
|
fromPartial(object) {
|
|
338
185
|
var _a;
|
|
339
186
|
const message = createBaseRevertInstructions();
|
|
@@ -495,107 +342,6 @@ exports.OutboundTxV2Codec = {
|
|
|
495
342
|
}
|
|
496
343
|
return message;
|
|
497
344
|
},
|
|
498
|
-
fromJSON(object) {
|
|
499
|
-
return {
|
|
500
|
-
destinationChain: isSet(object.destinationChain)
|
|
501
|
-
? globalThis.String(object.destinationChain)
|
|
502
|
-
: '',
|
|
503
|
-
recipient: isSet(object.recipient)
|
|
504
|
-
? globalThis.String(object.recipient)
|
|
505
|
-
: '',
|
|
506
|
-
amount: isSet(object.amount) ? globalThis.String(object.amount) : '',
|
|
507
|
-
externalAssetAddr: isSet(object.externalAssetAddr)
|
|
508
|
-
? globalThis.String(object.externalAssetAddr)
|
|
509
|
-
: '',
|
|
510
|
-
prc20AssetAddr: isSet(object.prc20AssetAddr)
|
|
511
|
-
? globalThis.String(object.prc20AssetAddr)
|
|
512
|
-
: '',
|
|
513
|
-
sender: isSet(object.sender) ? globalThis.String(object.sender) : '',
|
|
514
|
-
payload: isSet(object.payload) ? globalThis.String(object.payload) : '',
|
|
515
|
-
gasLimit: isSet(object.gasLimit)
|
|
516
|
-
? globalThis.String(object.gasLimit)
|
|
517
|
-
: '',
|
|
518
|
-
txType: isSet(object.txType) ? txTypeFromJSON(object.txType) : 0,
|
|
519
|
-
pcTx: isSet(object.pcTx)
|
|
520
|
-
? exports.OriginatingPcTx.fromJSON(object.pcTx)
|
|
521
|
-
: undefined,
|
|
522
|
-
observedTx: isSet(object.observedTx)
|
|
523
|
-
? exports.OutboundObservation.fromJSON(object.observedTx)
|
|
524
|
-
: undefined,
|
|
525
|
-
id: isSet(object.id) ? globalThis.String(object.id) : '',
|
|
526
|
-
outboundStatus: isSet(object.outboundStatus)
|
|
527
|
-
? outboundStatusFromJSON(object.outboundStatus)
|
|
528
|
-
: 0,
|
|
529
|
-
revertInstructions: isSet(object.revertInstructions)
|
|
530
|
-
? exports.RevertInstructions.fromJSON(object.revertInstructions)
|
|
531
|
-
: undefined,
|
|
532
|
-
pcRevertExecution: isSet(object.pcRevertExecution)
|
|
533
|
-
? types_3.PCTx.fromJSON(object.pcRevertExecution)
|
|
534
|
-
: undefined,
|
|
535
|
-
gasPrice: isSet(object.gasPrice)
|
|
536
|
-
? globalThis.String(object.gasPrice)
|
|
537
|
-
: '',
|
|
538
|
-
gasFee: isSet(object.gasFee) ? globalThis.String(object.gasFee) : '',
|
|
539
|
-
pcRefundExecution: isSet(object.pcRefundExecution)
|
|
540
|
-
? types_3.PCTx.fromJSON(object.pcRefundExecution)
|
|
541
|
-
: undefined,
|
|
542
|
-
refundSwapError: isSet(object.refundSwapError)
|
|
543
|
-
? globalThis.String(object.refundSwapError)
|
|
544
|
-
: '',
|
|
545
|
-
gasToken: isSet(object.gasToken)
|
|
546
|
-
? globalThis.String(object.gasToken)
|
|
547
|
-
: '',
|
|
548
|
-
abortReason: isSet(object.abortReason)
|
|
549
|
-
? globalThis.String(object.abortReason)
|
|
550
|
-
: '',
|
|
551
|
-
};
|
|
552
|
-
},
|
|
553
|
-
toJSON(message) {
|
|
554
|
-
const obj = {};
|
|
555
|
-
if (message.destinationChain !== '')
|
|
556
|
-
obj.destinationChain = message.destinationChain;
|
|
557
|
-
if (message.recipient !== '')
|
|
558
|
-
obj.recipient = message.recipient;
|
|
559
|
-
if (message.amount !== '')
|
|
560
|
-
obj.amount = message.amount;
|
|
561
|
-
if (message.externalAssetAddr !== '')
|
|
562
|
-
obj.externalAssetAddr = message.externalAssetAddr;
|
|
563
|
-
if (message.prc20AssetAddr !== '')
|
|
564
|
-
obj.prc20AssetAddr = message.prc20AssetAddr;
|
|
565
|
-
if (message.sender !== '')
|
|
566
|
-
obj.sender = message.sender;
|
|
567
|
-
if (message.payload !== '')
|
|
568
|
-
obj.payload = message.payload;
|
|
569
|
-
if (message.gasLimit !== '')
|
|
570
|
-
obj.gasLimit = message.gasLimit;
|
|
571
|
-
if (message.txType !== 0)
|
|
572
|
-
obj.txType = txTypeToJSON(message.txType);
|
|
573
|
-
if (message.pcTx !== undefined)
|
|
574
|
-
obj.pcTx = exports.OriginatingPcTx.toJSON(message.pcTx);
|
|
575
|
-
if (message.observedTx !== undefined)
|
|
576
|
-
obj.observedTx = exports.OutboundObservation.toJSON(message.observedTx);
|
|
577
|
-
if (message.id !== '')
|
|
578
|
-
obj.id = message.id;
|
|
579
|
-
if (message.outboundStatus !== 0)
|
|
580
|
-
obj.outboundStatus = outboundStatusToJSON(message.outboundStatus);
|
|
581
|
-
if (message.revertInstructions !== undefined)
|
|
582
|
-
obj.revertInstructions = exports.RevertInstructions.toJSON(message.revertInstructions);
|
|
583
|
-
if (message.pcRevertExecution !== undefined)
|
|
584
|
-
obj.pcRevertExecution = types_3.PCTx.toJSON(message.pcRevertExecution);
|
|
585
|
-
if (message.gasPrice !== '')
|
|
586
|
-
obj.gasPrice = message.gasPrice;
|
|
587
|
-
if (message.gasFee !== '')
|
|
588
|
-
obj.gasFee = message.gasFee;
|
|
589
|
-
if (message.pcRefundExecution !== undefined)
|
|
590
|
-
obj.pcRefundExecution = types_3.PCTx.toJSON(message.pcRefundExecution);
|
|
591
|
-
if (message.refundSwapError !== '')
|
|
592
|
-
obj.refundSwapError = message.refundSwapError;
|
|
593
|
-
if (message.gasToken !== '')
|
|
594
|
-
obj.gasToken = message.gasToken;
|
|
595
|
-
if (message.abortReason !== '')
|
|
596
|
-
obj.abortReason = message.abortReason;
|
|
597
|
-
return obj;
|
|
598
|
-
},
|
|
599
345
|
fromPartial(object) {
|
|
600
346
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
601
347
|
const message = createBaseOutboundTxV2();
|
|
@@ -699,38 +445,6 @@ exports.UniversalTxV2Codec = {
|
|
|
699
445
|
}
|
|
700
446
|
return message;
|
|
701
447
|
},
|
|
702
|
-
fromJSON(object) {
|
|
703
|
-
return {
|
|
704
|
-
id: isSet(object.id) ? globalThis.String(object.id) : '',
|
|
705
|
-
inboundTx: isSet(object.inboundTx)
|
|
706
|
-
? types_4.Inbound.fromJSON(object.inboundTx)
|
|
707
|
-
: undefined,
|
|
708
|
-
pcTx: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.pcTx)
|
|
709
|
-
? object.pcTx.map((e) => types_3.PCTx.fromJSON(e))
|
|
710
|
-
: [],
|
|
711
|
-
outboundTx: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.outboundTx)
|
|
712
|
-
? object.outboundTx.map((e) => exports.OutboundTxV2Codec.fromJSON(e))
|
|
713
|
-
: [],
|
|
714
|
-
universalStatus: isSet(object.universalStatus)
|
|
715
|
-
? object.universalStatus
|
|
716
|
-
: 0,
|
|
717
|
-
};
|
|
718
|
-
},
|
|
719
|
-
toJSON(message) {
|
|
720
|
-
var _a, _b;
|
|
721
|
-
const obj = {};
|
|
722
|
-
if (message.id !== '')
|
|
723
|
-
obj.id = message.id;
|
|
724
|
-
if (message.inboundTx !== undefined)
|
|
725
|
-
obj.inboundTx = types_4.Inbound.toJSON(message.inboundTx);
|
|
726
|
-
if ((_a = message.pcTx) === null || _a === void 0 ? void 0 : _a.length)
|
|
727
|
-
obj.pcTx = message.pcTx.map((e) => types_3.PCTx.toJSON(e));
|
|
728
|
-
if ((_b = message.outboundTx) === null || _b === void 0 ? void 0 : _b.length)
|
|
729
|
-
obj.outboundTx = message.outboundTx.map((e) => exports.OutboundTxV2Codec.toJSON(e));
|
|
730
|
-
if (message.universalStatus !== 0)
|
|
731
|
-
obj.universalStatus = message.universalStatus;
|
|
732
|
-
return obj;
|
|
733
|
-
},
|
|
734
448
|
fromPartial(object) {
|
|
735
449
|
var _a, _b, _c, _d;
|
|
736
450
|
const message = createBaseUniversalTxV2();
|
|
@@ -7,8 +7,6 @@ export declare enum VerificationType {
|
|
|
7
7
|
universalTxVerification = 1,
|
|
8
8
|
UNRECOGNIZED = -1
|
|
9
9
|
}
|
|
10
|
-
export declare function verificationTypeFromJSON(object: any): VerificationType;
|
|
11
|
-
export declare function verificationTypeToJSON(object: VerificationType): string;
|
|
12
10
|
/** UniversalAccount is the identifier of a owner account */
|
|
13
11
|
export interface UniversalAccountId {
|
|
14
12
|
/** chain_namespace is the CAIP-2 namespace of the chain where the owner is located (e.g. "eip155" for Ethereum) */
|
|
@@ -111,8 +109,6 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
|
111
109
|
export interface MessageFns<T> {
|
|
112
110
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
113
111
|
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
114
|
-
fromJSON(object: any): T;
|
|
115
|
-
toJSON(message: T): unknown;
|
|
116
112
|
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
117
113
|
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
118
114
|
}
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
// source: v1/tx.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.MsgMigrateUEA = exports.MigrationPayload = exports.MsgExecutePayload = exports.UniversalPayload = exports.MsgMintPC = exports.MsgDeployUEA = exports.UniversalAccountId = exports.VerificationType = exports.protobufPackage = void 0;
|
|
9
|
-
exports.verificationTypeFromJSON = verificationTypeFromJSON;
|
|
10
|
-
exports.verificationTypeToJSON = verificationTypeToJSON;
|
|
11
9
|
/* eslint-disable */
|
|
12
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
13
11
|
exports.protobufPackage = "ue.v1";
|
|
@@ -21,31 +19,6 @@ var VerificationType;
|
|
|
21
19
|
VerificationType[VerificationType["universalTxVerification"] = 1] = "universalTxVerification";
|
|
22
20
|
VerificationType[VerificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
23
21
|
})(VerificationType || (exports.VerificationType = VerificationType = {}));
|
|
24
|
-
function verificationTypeFromJSON(object) {
|
|
25
|
-
switch (object) {
|
|
26
|
-
case 0:
|
|
27
|
-
case "signedVerification":
|
|
28
|
-
return VerificationType.signedVerification;
|
|
29
|
-
case 1:
|
|
30
|
-
case "universalTxVerification":
|
|
31
|
-
return VerificationType.universalTxVerification;
|
|
32
|
-
case -1:
|
|
33
|
-
case "UNRECOGNIZED":
|
|
34
|
-
default:
|
|
35
|
-
return VerificationType.UNRECOGNIZED;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function verificationTypeToJSON(object) {
|
|
39
|
-
switch (object) {
|
|
40
|
-
case VerificationType.signedVerification:
|
|
41
|
-
return "signedVerification";
|
|
42
|
-
case VerificationType.universalTxVerification:
|
|
43
|
-
return "universalTxVerification";
|
|
44
|
-
case VerificationType.UNRECOGNIZED:
|
|
45
|
-
default:
|
|
46
|
-
return "UNRECOGNIZED";
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
22
|
function createBaseUniversalAccountId() {
|
|
50
23
|
return { chainNamespace: "", chainId: "", owner: "" };
|
|
51
24
|
}
|
|
@@ -98,26 +71,6 @@ exports.UniversalAccountId = {
|
|
|
98
71
|
}
|
|
99
72
|
return message;
|
|
100
73
|
},
|
|
101
|
-
fromJSON(object) {
|
|
102
|
-
return {
|
|
103
|
-
chainNamespace: isSet(object.chainNamespace) ? globalThis.String(object.chainNamespace) : "",
|
|
104
|
-
chainId: isSet(object.chainId) ? globalThis.String(object.chainId) : "",
|
|
105
|
-
owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
|
|
106
|
-
};
|
|
107
|
-
},
|
|
108
|
-
toJSON(message) {
|
|
109
|
-
const obj = {};
|
|
110
|
-
if (message.chainNamespace !== "") {
|
|
111
|
-
obj.chainNamespace = message.chainNamespace;
|
|
112
|
-
}
|
|
113
|
-
if (message.chainId !== "") {
|
|
114
|
-
obj.chainId = message.chainId;
|
|
115
|
-
}
|
|
116
|
-
if (message.owner !== "") {
|
|
117
|
-
obj.owner = message.owner;
|
|
118
|
-
}
|
|
119
|
-
return obj;
|
|
120
|
-
},
|
|
121
74
|
create(base) {
|
|
122
75
|
return exports.UniversalAccountId.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
123
76
|
},
|
|
@@ -182,28 +135,6 @@ exports.MsgDeployUEA = {
|
|
|
182
135
|
}
|
|
183
136
|
return message;
|
|
184
137
|
},
|
|
185
|
-
fromJSON(object) {
|
|
186
|
-
return {
|
|
187
|
-
signer: isSet(object.signer) ? globalThis.String(object.signer) : "",
|
|
188
|
-
universalAccountId: isSet(object.universalAccountId)
|
|
189
|
-
? exports.UniversalAccountId.fromJSON(object.universalAccountId)
|
|
190
|
-
: undefined,
|
|
191
|
-
txHash: isSet(object.txHash) ? globalThis.String(object.txHash) : "",
|
|
192
|
-
};
|
|
193
|
-
},
|
|
194
|
-
toJSON(message) {
|
|
195
|
-
const obj = {};
|
|
196
|
-
if (message.signer !== "") {
|
|
197
|
-
obj.signer = message.signer;
|
|
198
|
-
}
|
|
199
|
-
if (message.universalAccountId !== undefined) {
|
|
200
|
-
obj.universalAccountId = exports.UniversalAccountId.toJSON(message.universalAccountId);
|
|
201
|
-
}
|
|
202
|
-
if (message.txHash !== "") {
|
|
203
|
-
obj.txHash = message.txHash;
|
|
204
|
-
}
|
|
205
|
-
return obj;
|
|
206
|
-
},
|
|
207
138
|
create(base) {
|
|
208
139
|
return exports.MsgDeployUEA.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
209
140
|
},
|
|
@@ -270,28 +201,6 @@ exports.MsgMintPC = {
|
|
|
270
201
|
}
|
|
271
202
|
return message;
|
|
272
203
|
},
|
|
273
|
-
fromJSON(object) {
|
|
274
|
-
return {
|
|
275
|
-
signer: isSet(object.signer) ? globalThis.String(object.signer) : "",
|
|
276
|
-
universalAccountId: isSet(object.universalAccountId)
|
|
277
|
-
? exports.UniversalAccountId.fromJSON(object.universalAccountId)
|
|
278
|
-
: undefined,
|
|
279
|
-
txHash: isSet(object.txHash) ? globalThis.String(object.txHash) : "",
|
|
280
|
-
};
|
|
281
|
-
},
|
|
282
|
-
toJSON(message) {
|
|
283
|
-
const obj = {};
|
|
284
|
-
if (message.signer !== "") {
|
|
285
|
-
obj.signer = message.signer;
|
|
286
|
-
}
|
|
287
|
-
if (message.universalAccountId !== undefined) {
|
|
288
|
-
obj.universalAccountId = exports.UniversalAccountId.toJSON(message.universalAccountId);
|
|
289
|
-
}
|
|
290
|
-
if (message.txHash !== "") {
|
|
291
|
-
obj.txHash = message.txHash;
|
|
292
|
-
}
|
|
293
|
-
return obj;
|
|
294
|
-
},
|
|
295
204
|
create(base) {
|
|
296
205
|
return exports.MsgMintPC.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
297
206
|
},
|
|
@@ -428,50 +337,6 @@ exports.UniversalPayload = {
|
|
|
428
337
|
}
|
|
429
338
|
return message;
|
|
430
339
|
},
|
|
431
|
-
fromJSON(object) {
|
|
432
|
-
return {
|
|
433
|
-
to: isSet(object.to) ? globalThis.String(object.to) : "",
|
|
434
|
-
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
435
|
-
data: isSet(object.data) ? globalThis.String(object.data) : "",
|
|
436
|
-
gasLimit: isSet(object.gasLimit) ? globalThis.String(object.gasLimit) : "",
|
|
437
|
-
maxFeePerGas: isSet(object.maxFeePerGas) ? globalThis.String(object.maxFeePerGas) : "",
|
|
438
|
-
maxPriorityFeePerGas: isSet(object.maxPriorityFeePerGas) ? globalThis.String(object.maxPriorityFeePerGas) : "",
|
|
439
|
-
nonce: isSet(object.nonce) ? globalThis.String(object.nonce) : "",
|
|
440
|
-
deadline: isSet(object.deadline) ? globalThis.String(object.deadline) : "",
|
|
441
|
-
vType: isSet(object.vType) ? verificationTypeFromJSON(object.vType) : 0,
|
|
442
|
-
};
|
|
443
|
-
},
|
|
444
|
-
toJSON(message) {
|
|
445
|
-
const obj = {};
|
|
446
|
-
if (message.to !== "") {
|
|
447
|
-
obj.to = message.to;
|
|
448
|
-
}
|
|
449
|
-
if (message.value !== "") {
|
|
450
|
-
obj.value = message.value;
|
|
451
|
-
}
|
|
452
|
-
if (message.data !== "") {
|
|
453
|
-
obj.data = message.data;
|
|
454
|
-
}
|
|
455
|
-
if (message.gasLimit !== "") {
|
|
456
|
-
obj.gasLimit = message.gasLimit;
|
|
457
|
-
}
|
|
458
|
-
if (message.maxFeePerGas !== "") {
|
|
459
|
-
obj.maxFeePerGas = message.maxFeePerGas;
|
|
460
|
-
}
|
|
461
|
-
if (message.maxPriorityFeePerGas !== "") {
|
|
462
|
-
obj.maxPriorityFeePerGas = message.maxPriorityFeePerGas;
|
|
463
|
-
}
|
|
464
|
-
if (message.nonce !== "") {
|
|
465
|
-
obj.nonce = message.nonce;
|
|
466
|
-
}
|
|
467
|
-
if (message.deadline !== "") {
|
|
468
|
-
obj.deadline = message.deadline;
|
|
469
|
-
}
|
|
470
|
-
if (message.vType !== 0) {
|
|
471
|
-
obj.vType = verificationTypeToJSON(message.vType);
|
|
472
|
-
}
|
|
473
|
-
return obj;
|
|
474
|
-
},
|
|
475
340
|
create(base) {
|
|
476
341
|
return exports.UniversalPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
477
342
|
},
|
|
@@ -552,32 +417,6 @@ exports.MsgExecutePayload = {
|
|
|
552
417
|
}
|
|
553
418
|
return message;
|
|
554
419
|
},
|
|
555
|
-
fromJSON(object) {
|
|
556
|
-
return {
|
|
557
|
-
signer: isSet(object.signer) ? globalThis.String(object.signer) : "",
|
|
558
|
-
universalAccountId: isSet(object.universalAccountId)
|
|
559
|
-
? exports.UniversalAccountId.fromJSON(object.universalAccountId)
|
|
560
|
-
: undefined,
|
|
561
|
-
universalPayload: isSet(object.universalPayload) ? exports.UniversalPayload.fromJSON(object.universalPayload) : undefined,
|
|
562
|
-
verificationData: isSet(object.verificationData) ? globalThis.String(object.verificationData) : "",
|
|
563
|
-
};
|
|
564
|
-
},
|
|
565
|
-
toJSON(message) {
|
|
566
|
-
const obj = {};
|
|
567
|
-
if (message.signer !== "") {
|
|
568
|
-
obj.signer = message.signer;
|
|
569
|
-
}
|
|
570
|
-
if (message.universalAccountId !== undefined) {
|
|
571
|
-
obj.universalAccountId = exports.UniversalAccountId.toJSON(message.universalAccountId);
|
|
572
|
-
}
|
|
573
|
-
if (message.universalPayload !== undefined) {
|
|
574
|
-
obj.universalPayload = exports.UniversalPayload.toJSON(message.universalPayload);
|
|
575
|
-
}
|
|
576
|
-
if (message.verificationData !== "") {
|
|
577
|
-
obj.verificationData = message.verificationData;
|
|
578
|
-
}
|
|
579
|
-
return obj;
|
|
580
|
-
},
|
|
581
420
|
create(base) {
|
|
582
421
|
return exports.MsgExecutePayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
583
422
|
},
|
|
@@ -647,26 +486,6 @@ exports.MigrationPayload = {
|
|
|
647
486
|
}
|
|
648
487
|
return message;
|
|
649
488
|
},
|
|
650
|
-
fromJSON(object) {
|
|
651
|
-
return {
|
|
652
|
-
migration: isSet(object.migration) ? globalThis.String(object.migration) : "",
|
|
653
|
-
nonce: isSet(object.nonce) ? globalThis.String(object.nonce) : "",
|
|
654
|
-
deadline: isSet(object.deadline) ? globalThis.String(object.deadline) : "",
|
|
655
|
-
};
|
|
656
|
-
},
|
|
657
|
-
toJSON(message) {
|
|
658
|
-
const obj = {};
|
|
659
|
-
if (message.migration !== "") {
|
|
660
|
-
obj.migration = message.migration;
|
|
661
|
-
}
|
|
662
|
-
if (message.nonce !== "") {
|
|
663
|
-
obj.nonce = message.nonce;
|
|
664
|
-
}
|
|
665
|
-
if (message.deadline !== "") {
|
|
666
|
-
obj.deadline = message.deadline;
|
|
667
|
-
}
|
|
668
|
-
return obj;
|
|
669
|
-
},
|
|
670
489
|
create(base) {
|
|
671
490
|
return exports.MigrationPayload.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
672
491
|
},
|
|
@@ -741,30 +560,6 @@ exports.MsgMigrateUEA = {
|
|
|
741
560
|
}
|
|
742
561
|
return message;
|
|
743
562
|
},
|
|
744
|
-
fromJSON(object) {
|
|
745
|
-
return {
|
|
746
|
-
signer: isSet(object.signer) ? globalThis.String(object.signer) : "",
|
|
747
|
-
universalAccountId: isSet(object.universalAccountId) ? exports.UniversalAccountId.fromJSON(object.universalAccountId) : undefined,
|
|
748
|
-
migrationPayload: isSet(object.migrationPayload) ? exports.MigrationPayload.fromJSON(object.migrationPayload) : undefined,
|
|
749
|
-
signature: isSet(object.signature) ? globalThis.String(object.signature) : "",
|
|
750
|
-
};
|
|
751
|
-
},
|
|
752
|
-
toJSON(message) {
|
|
753
|
-
const obj = {};
|
|
754
|
-
if (message.signer !== "") {
|
|
755
|
-
obj.signer = message.signer;
|
|
756
|
-
}
|
|
757
|
-
if (message.universalAccountId !== undefined) {
|
|
758
|
-
obj.universalAccountId = exports.UniversalAccountId.toJSON(message.universalAccountId);
|
|
759
|
-
}
|
|
760
|
-
if (message.migrationPayload !== undefined) {
|
|
761
|
-
obj.migrationPayload = exports.MigrationPayload.toJSON(message.migrationPayload);
|
|
762
|
-
}
|
|
763
|
-
if (message.signature !== "") {
|
|
764
|
-
obj.signature = message.signature;
|
|
765
|
-
}
|
|
766
|
-
return obj;
|
|
767
|
-
},
|
|
768
563
|
create(base) {
|
|
769
564
|
return exports.MsgMigrateUEA.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
770
565
|
},
|
|
@@ -705,13 +705,6 @@ export interface OutboundTxDetails {
|
|
|
705
705
|
/** Asset address on external chain (address(0) for native) */
|
|
706
706
|
assetAddr: string;
|
|
707
707
|
}
|
|
708
|
-
/**
|
|
709
|
-
* Progress event for outbound sync operations
|
|
710
|
-
*/
|
|
711
|
-
export interface OutboundSyncProgress {
|
|
712
|
-
status: 'waiting' | 'polling' | 'success' | 'failed' | 'timeout';
|
|
713
|
-
elapsed: number;
|
|
714
|
-
}
|
|
715
708
|
/**
|
|
716
709
|
* Options for waitForOutboundTx polling
|
|
717
710
|
*/
|