@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.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/src/lib/constants/abi/feeLocker.json +1 -2579
  3. package/src/lib/constants/abi/universalGatewayV0.json +1 -3009
  4. package/src/lib/constants/chain.d.ts +3 -0
  5. package/src/lib/constants/chain.js +54 -1
  6. package/src/lib/constants/tokens.js +25 -0
  7. package/src/lib/generated/uexecutor/v1/types.d.ts +0 -6
  8. package/src/lib/generated/uexecutor/v1/types.js +0 -267
  9. package/src/lib/generated/uexecutor/v2/index.d.ts +1 -1
  10. package/src/lib/generated/uexecutor/v2/index.js +1 -9
  11. package/src/lib/generated/uexecutor/v2/types.d.ts +1 -7
  12. package/src/lib/generated/uexecutor/v2/types.js +1 -287
  13. package/src/lib/generated/v1/tx.d.ts +0 -4
  14. package/src/lib/generated/v1/tx.js +0 -205
  15. package/src/lib/orchestrator/orchestrator.types.d.ts +0 -7
  16. package/src/lib/orchestrator/payload-builders.d.ts +0 -45
  17. package/src/lib/orchestrator/payload-builders.js +0 -110
  18. package/src/lib/progress-hook/progress-hook.js +6 -6
  19. package/src/lib/push-client/push-client.js +12 -11
  20. package/src/lib/universal/account/account.js +10 -2
  21. package/src/lib/vm-client/evm-client.d.ts +1 -1
  22. package/src/lib/vm-client/evm-client.js +2 -1
  23. package/src/lib/vm-client/vm-client.types.d.ts +2 -1
  24. package/src/lib/universal-tx-detector/__tests__/fixtures/builders.d.ts +0 -32
  25. package/src/lib/universal-tx-detector/__tests__/fixtures/builders.js +0 -65
  26. package/src/lib/universal-tx-detector/__tests__/fixtures/scenarios.d.ts +0 -72
  27. package/src/lib/universal-tx-detector/__tests__/fixtures/scenarios.js +0 -669
@@ -1,4 +1,5 @@
1
1
  import { CHAIN, PUSH_NETWORK, VM } from './enums';
2
+ import { type Chain } from 'viem';
2
3
  /**
3
4
  * Maps VM type to its namespace
4
5
  * References -
@@ -76,6 +77,8 @@ export declare const PUSH_CHAIN_INFO: Record<CHAIN.PUSH_MAINNET | CHAIN.PUSH_TES
76
77
  pushToUsdcNumerator: bigint;
77
78
  pushToUsdcDenominator: bigint;
78
79
  }>;
80
+ export declare const PUSH_VIEM_CHAINS: Record<CHAIN.PUSH_MAINNET | CHAIN.PUSH_TESTNET_DONUT | CHAIN.PUSH_LOCALNET, Chain>;
81
+ export declare function getPushViemChain(chain: CHAIN): Chain | undefined;
79
82
  /**
80
83
  * UniversalGateway contract addresses on external chains
81
84
  * These are the contracts that handle inbound/outbound universal transactions
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CHAIN_EXPLORERS = exports.CEA_FACTORY_ADDRESSES = exports.VAULT_ADDRESSES = exports.SVM_PYTH_PRICE_FEED = exports.UNIVERSAL_GATEWAY_ADDRESSES = exports.PUSH_CHAIN_INFO = exports.CHAIN_INFO = exports.SYNTHETIC_PUSH_ERC20 = exports.UEA_MIGRATION = exports.UEA_FACTORY = exports.UEA_PROXY = exports.VM_NAMESPACE = void 0;
3
+ exports.CHAIN_EXPLORERS = exports.CEA_FACTORY_ADDRESSES = exports.VAULT_ADDRESSES = exports.SVM_PYTH_PRICE_FEED = exports.UNIVERSAL_GATEWAY_ADDRESSES = exports.PUSH_VIEM_CHAINS = exports.PUSH_CHAIN_INFO = exports.CHAIN_INFO = exports.SYNTHETIC_PUSH_ERC20 = exports.UEA_MIGRATION = exports.UEA_FACTORY = exports.UEA_PROXY = exports.VM_NAMESPACE = void 0;
4
+ exports.getPushViemChain = getPushViemChain;
4
5
  exports.getExplorerTxUrl = getExplorerTxUrl;
5
6
  exports.getExplorerAddressUrl = getExplorerAddressUrl;
6
7
  const enums_1 = require("./enums");
8
+ const viem_1 = require("viem");
7
9
  const chains_1 = require("viem/chains");
8
10
  /**
9
11
  * Maps VM type to its namespace
@@ -287,6 +289,57 @@ exports.PUSH_CHAIN_INFO = {
287
289
  [enums_1.CHAIN.PUSH_LOCALNET]: Object.assign(Object.assign({}, exports.CHAIN_INFO[enums_1.CHAIN.PUSH_LOCALNET]), { denom: 'upc', tendermintRpc: ['http://localhost:26657'], prefix: 'push', factoryAddress: '0x00000000000000000000000000000000000000eA', pushDecimals: BigInt(1e18), usdcDecimals: BigInt(1e8), pushToUsdcNumerator: BigInt(1e7), pushToUsdcDenominator: BigInt(1e18) }),
288
290
  };
289
291
  // ============================================================================
292
+ // Push Chain viem definitions
293
+ // ============================================================================
294
+ // viem uses `chain.nativeCurrency.symbol` to format error messages
295
+ // (e.g. `value: 1 PC` in InsufficientFundsError). A PublicClient built
296
+ // without a chain falls back to "ETH".
297
+ exports.PUSH_VIEM_CHAINS = {
298
+ [enums_1.CHAIN.PUSH_MAINNET]: (0, viem_1.defineChain)({
299
+ id: Number.isFinite(parseInt(exports.CHAIN_INFO[enums_1.CHAIN.PUSH_MAINNET].chainId))
300
+ ? parseInt(exports.CHAIN_INFO[enums_1.CHAIN.PUSH_MAINNET].chainId)
301
+ : 0,
302
+ name: 'Push Mainnet',
303
+ nativeCurrency: { name: 'PC', symbol: 'PC', decimals: 18 },
304
+ rpcUrls: {
305
+ default: { http: exports.CHAIN_INFO[enums_1.CHAIN.PUSH_MAINNET].defaultRPC },
306
+ },
307
+ blockExplorers: exports.CHAIN_INFO[enums_1.CHAIN.PUSH_MAINNET].explorerUrl
308
+ ? {
309
+ default: {
310
+ name: 'Push Explorer',
311
+ url: exports.CHAIN_INFO[enums_1.CHAIN.PUSH_MAINNET].explorerUrl,
312
+ },
313
+ }
314
+ : undefined,
315
+ }),
316
+ [enums_1.CHAIN.PUSH_TESTNET_DONUT]: (0, viem_1.defineChain)({
317
+ id: parseInt(exports.CHAIN_INFO[enums_1.CHAIN.PUSH_TESTNET_DONUT].chainId),
318
+ name: 'Push Testnet Donut',
319
+ nativeCurrency: { name: 'PC', symbol: 'PC', decimals: 18 },
320
+ rpcUrls: {
321
+ default: { http: exports.CHAIN_INFO[enums_1.CHAIN.PUSH_TESTNET_DONUT].defaultRPC },
322
+ },
323
+ blockExplorers: {
324
+ default: {
325
+ name: 'Push Explorer',
326
+ url: exports.CHAIN_INFO[enums_1.CHAIN.PUSH_TESTNET_DONUT].explorerUrl,
327
+ },
328
+ },
329
+ }),
330
+ [enums_1.CHAIN.PUSH_LOCALNET]: (0, viem_1.defineChain)({
331
+ id: parseInt(exports.CHAIN_INFO[enums_1.CHAIN.PUSH_LOCALNET].chainId),
332
+ name: 'Push Localnet',
333
+ nativeCurrency: { name: 'PC', symbol: 'PC', decimals: 18 },
334
+ rpcUrls: {
335
+ default: { http: exports.CHAIN_INFO[enums_1.CHAIN.PUSH_LOCALNET].defaultRPC },
336
+ },
337
+ }),
338
+ };
339
+ function getPushViemChain(chain) {
340
+ return exports.PUSH_VIEM_CHAINS[chain];
341
+ }
342
+ // ============================================================================
290
343
  // Multi-Chain Gateway & CEA Configuration
291
344
  // ============================================================================
292
345
  /**
@@ -229,8 +229,33 @@ function makeToken(chain, symbol) {
229
229
  mechanism: meta.mechanism,
230
230
  };
231
231
  }
232
+ // Flat PRC-20 list for Push Chain — synthetic ERC-20 representations of
233
+ // origin-chain assets that can be moved out of Push Chain back to their source.
234
+ // Source of truth: SYNTHETIC_PUSH_ERC20 in ./chain.
235
+ function buildPushChainMoveableTokenList() {
236
+ const s = chain_1.SYNTHETIC_PUSH_ERC20[enums_1.PUSH_NETWORK.TESTNET_DONUT];
237
+ const mk = (symbol, decimals, address) => ({ symbol, decimals, address, mechanism: 'approve' });
238
+ return [
239
+ mk('pETH', 18, s.pETH),
240
+ mk('pETH_ARB', 18, s.pETH_ARB),
241
+ mk('pETH_BASE', 18, s.pETH_BASE),
242
+ mk('pETH_BNB', 18, s.pETH_BNB),
243
+ mk('pSOL', 9, s.pSOL),
244
+ mk('USDT', 6, s.USDT_ETH),
245
+ mk('USDT', 6, s.USDT_ARB),
246
+ mk('USDT', 6, s.USDT_BASE),
247
+ mk('USDT', 6, s.USDT_BNB),
248
+ mk('USDT', 6, s.USDT_SOL),
249
+ mk('USDC', 6, s.USDC_ETH),
250
+ mk('USDC', 6, s.USDC_ARB),
251
+ mk('USDC', 6, s.USDC_BASE),
252
+ mk('USDC', 6, s.USDC_BNB),
253
+ mk('USDC', 6, s.USDC_SOL),
254
+ ];
255
+ }
232
256
  // Minimal initial registries. These can be extended safely without breaking the API.
233
257
  exports.MOVEABLE_TOKENS = {
258
+ [enums_1.CHAIN.PUSH_TESTNET_DONUT]: buildPushChainMoveableTokenList(),
234
259
  [enums_1.CHAIN.ETHEREUM_SEPOLIA]: [
235
260
  makeToken(enums_1.CHAIN.ETHEREUM_SEPOLIA, 'ETH'),
236
261
  makeToken(enums_1.CHAIN.ETHEREUM_SEPOLIA, 'USDT'),
@@ -5,8 +5,6 @@ export declare enum VerificationType {
5
5
  universalTxVerification = 1,
6
6
  UNRECOGNIZED = -1
7
7
  }
8
- export declare function verificationTypeFromJSON(object: any): VerificationType;
9
- export declare function verificationTypeToJSON(object: VerificationType): string;
10
8
  export declare enum UniversalTxStatus {
11
9
  UNIVERSAL_TX_STATUS_UNSPECIFIED = 0,
12
10
  INBOUND_SUCCESS = 1,
@@ -20,8 +18,6 @@ export declare enum UniversalTxStatus {
20
18
  CANCELED = 9,
21
19
  UNRECOGNIZED = -1
22
20
  }
23
- export declare function universalTxStatusFromJSON(object: any): UniversalTxStatus;
24
- export declare function universalTxStatusToJSON(object: UniversalTxStatus): string;
25
21
  export interface UniversalPayload {
26
22
  to: string;
27
23
  value: string;
@@ -83,8 +79,6 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
83
79
  export interface MessageFns<T> {
84
80
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
85
81
  decode(input: BinaryReader | Uint8Array, length?: number): T;
86
- fromJSON(object: any): T;
87
- toJSON(message: T): unknown;
88
82
  create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
89
83
  fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
90
84
  }
@@ -6,10 +6,6 @@
6
6
  // source: uexecutor/v1/types.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.UniversalTx = exports.OutboundTx = exports.PCTx = exports.Inbound = exports.UniversalPayload = exports.UniversalTxStatus = exports.VerificationType = exports.protobufPackage = void 0;
9
- exports.verificationTypeFromJSON = verificationTypeFromJSON;
10
- exports.verificationTypeToJSON = verificationTypeToJSON;
11
- exports.universalTxStatusFromJSON = universalTxStatusFromJSON;
12
- exports.universalTxStatusToJSON = universalTxStatusToJSON;
13
9
  /* eslint-disable */
14
10
  const wire_1 = require("@bufbuild/protobuf/wire");
15
11
  exports.protobufPackage = "uexecutor.v1";
@@ -19,31 +15,6 @@ var VerificationType;
19
15
  VerificationType[VerificationType["universalTxVerification"] = 1] = "universalTxVerification";
20
16
  VerificationType[VerificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
21
17
  })(VerificationType || (exports.VerificationType = VerificationType = {}));
22
- function verificationTypeFromJSON(object) {
23
- switch (object) {
24
- case 0:
25
- case "signedVerification":
26
- return VerificationType.signedVerification;
27
- case 1:
28
- case "universalTxVerification":
29
- return VerificationType.universalTxVerification;
30
- case -1:
31
- case "UNRECOGNIZED":
32
- default:
33
- return VerificationType.UNRECOGNIZED;
34
- }
35
- }
36
- function verificationTypeToJSON(object) {
37
- switch (object) {
38
- case VerificationType.signedVerification:
39
- return "signedVerification";
40
- case VerificationType.universalTxVerification:
41
- return "universalTxVerification";
42
- case VerificationType.UNRECOGNIZED:
43
- default:
44
- return "UNRECOGNIZED";
45
- }
46
- }
47
18
  var UniversalTxStatus;
48
19
  (function (UniversalTxStatus) {
49
20
  UniversalTxStatus[UniversalTxStatus["UNIVERSAL_TX_STATUS_UNSPECIFIED"] = 0] = "UNIVERSAL_TX_STATUS_UNSPECIFIED";
@@ -58,71 +29,6 @@ var UniversalTxStatus;
58
29
  UniversalTxStatus[UniversalTxStatus["CANCELED"] = 9] = "CANCELED";
59
30
  UniversalTxStatus[UniversalTxStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
60
31
  })(UniversalTxStatus || (exports.UniversalTxStatus = UniversalTxStatus = {}));
61
- function universalTxStatusFromJSON(object) {
62
- switch (object) {
63
- case 0:
64
- case "UNIVERSAL_TX_STATUS_UNSPECIFIED":
65
- return UniversalTxStatus.UNIVERSAL_TX_STATUS_UNSPECIFIED;
66
- case 1:
67
- case "INBOUND_SUCCESS":
68
- return UniversalTxStatus.INBOUND_SUCCESS;
69
- case 2:
70
- case "PENDING_INBOUND_EXECUTION":
71
- return UniversalTxStatus.PENDING_INBOUND_EXECUTION;
72
- case 3:
73
- case "PC_EXECUTED_SUCCESS":
74
- return UniversalTxStatus.PC_EXECUTED_SUCCESS;
75
- case 4:
76
- case "PC_EXECUTED_FAILED":
77
- return UniversalTxStatus.PC_EXECUTED_FAILED;
78
- case 5:
79
- case "PC_PENDING_REVERT":
80
- return UniversalTxStatus.PC_PENDING_REVERT;
81
- case 6:
82
- case "OUTBOUND_PENDING":
83
- return UniversalTxStatus.OUTBOUND_PENDING;
84
- case 7:
85
- case "OUTBOUND_SUCCESS":
86
- return UniversalTxStatus.OUTBOUND_SUCCESS;
87
- case 8:
88
- case "OUTBOUND_FAILED":
89
- return UniversalTxStatus.OUTBOUND_FAILED;
90
- case 9:
91
- case "CANCELED":
92
- return UniversalTxStatus.CANCELED;
93
- case -1:
94
- case "UNRECOGNIZED":
95
- default:
96
- return UniversalTxStatus.UNRECOGNIZED;
97
- }
98
- }
99
- function universalTxStatusToJSON(object) {
100
- switch (object) {
101
- case UniversalTxStatus.UNIVERSAL_TX_STATUS_UNSPECIFIED:
102
- return "UNIVERSAL_TX_STATUS_UNSPECIFIED";
103
- case UniversalTxStatus.INBOUND_SUCCESS:
104
- return "INBOUND_SUCCESS";
105
- case UniversalTxStatus.PENDING_INBOUND_EXECUTION:
106
- return "PENDING_INBOUND_EXECUTION";
107
- case UniversalTxStatus.PC_EXECUTED_SUCCESS:
108
- return "PC_EXECUTED_SUCCESS";
109
- case UniversalTxStatus.PC_EXECUTED_FAILED:
110
- return "PC_EXECUTED_FAILED";
111
- case UniversalTxStatus.PC_PENDING_REVERT:
112
- return "PC_PENDING_REVERT";
113
- case UniversalTxStatus.OUTBOUND_PENDING:
114
- return "OUTBOUND_PENDING";
115
- case UniversalTxStatus.OUTBOUND_SUCCESS:
116
- return "OUTBOUND_SUCCESS";
117
- case UniversalTxStatus.OUTBOUND_FAILED:
118
- return "OUTBOUND_FAILED";
119
- case UniversalTxStatus.CANCELED:
120
- return "CANCELED";
121
- case UniversalTxStatus.UNRECOGNIZED:
122
- default:
123
- return "UNRECOGNIZED";
124
- }
125
- }
126
32
  function createBaseUniversalPayload() {
127
33
  return {
128
34
  to: "",
@@ -245,50 +151,6 @@ exports.UniversalPayload = {
245
151
  }
246
152
  return message;
247
153
  },
248
- fromJSON(object) {
249
- return {
250
- to: isSet(object.to) ? globalThis.String(object.to) : "",
251
- value: isSet(object.value) ? globalThis.String(object.value) : "",
252
- data: isSet(object.data) ? globalThis.String(object.data) : "",
253
- gasLimit: isSet(object.gasLimit) ? globalThis.String(object.gasLimit) : "",
254
- maxFeePerGas: isSet(object.maxFeePerGas) ? globalThis.String(object.maxFeePerGas) : "",
255
- maxPriorityFeePerGas: isSet(object.maxPriorityFeePerGas) ? globalThis.String(object.maxPriorityFeePerGas) : "",
256
- nonce: isSet(object.nonce) ? globalThis.String(object.nonce) : "",
257
- deadline: isSet(object.deadline) ? globalThis.String(object.deadline) : "",
258
- vType: isSet(object.vType) ? verificationTypeFromJSON(object.vType) : 0,
259
- };
260
- },
261
- toJSON(message) {
262
- const obj = {};
263
- if (message.to !== "") {
264
- obj.to = message.to;
265
- }
266
- if (message.value !== "") {
267
- obj.value = message.value;
268
- }
269
- if (message.data !== "") {
270
- obj.data = message.data;
271
- }
272
- if (message.gasLimit !== "") {
273
- obj.gasLimit = message.gasLimit;
274
- }
275
- if (message.maxFeePerGas !== "") {
276
- obj.maxFeePerGas = message.maxFeePerGas;
277
- }
278
- if (message.maxPriorityFeePerGas !== "") {
279
- obj.maxPriorityFeePerGas = message.maxPriorityFeePerGas;
280
- }
281
- if (message.nonce !== "") {
282
- obj.nonce = message.nonce;
283
- }
284
- if (message.deadline !== "") {
285
- obj.deadline = message.deadline;
286
- }
287
- if (message.vType !== 0) {
288
- obj.vType = verificationTypeToJSON(message.vType);
289
- }
290
- return obj;
291
- },
292
154
  create(base) {
293
155
  return exports.UniversalPayload.fromPartial(base !== null && base !== void 0 ? base : {});
294
156
  },
@@ -429,50 +291,6 @@ exports.Inbound = {
429
291
  }
430
292
  return message;
431
293
  },
432
- fromJSON(object) {
433
- return {
434
- sourceChain: isSet(object.sourceChain) ? globalThis.String(object.sourceChain) : "",
435
- txHash: isSet(object.txHash) ? globalThis.String(object.txHash) : "",
436
- sender: isSet(object.sender) ? globalThis.String(object.sender) : "",
437
- recipient: isSet(object.recipient) ? globalThis.String(object.recipient) : "",
438
- amount: isSet(object.amount) ? globalThis.String(object.amount) : "",
439
- assetAddr: isSet(object.assetAddr) ? globalThis.String(object.assetAddr) : "",
440
- txType: isSet(object.txType) ? globalThis.Number(object.txType) : 0,
441
- universalPayload: isSet(object.universalPayload) ? exports.UniversalPayload.fromJSON(object.universalPayload) : undefined,
442
- verificationData: isSet(object.verificationData) ? globalThis.String(object.verificationData) : "",
443
- };
444
- },
445
- toJSON(message) {
446
- const obj = {};
447
- if (message.sourceChain !== "") {
448
- obj.sourceChain = message.sourceChain;
449
- }
450
- if (message.txHash !== "") {
451
- obj.txHash = message.txHash;
452
- }
453
- if (message.sender !== "") {
454
- obj.sender = message.sender;
455
- }
456
- if (message.recipient !== "") {
457
- obj.recipient = message.recipient;
458
- }
459
- if (message.amount !== "") {
460
- obj.amount = message.amount;
461
- }
462
- if (message.assetAddr !== "") {
463
- obj.assetAddr = message.assetAddr;
464
- }
465
- if (message.txType !== 0) {
466
- obj.txType = Math.round(message.txType);
467
- }
468
- if (message.universalPayload !== undefined) {
469
- obj.universalPayload = exports.UniversalPayload.toJSON(message.universalPayload);
470
- }
471
- if (message.verificationData !== "") {
472
- obj.verificationData = message.verificationData;
473
- }
474
- return obj;
475
- },
476
294
  create(base) {
477
295
  return exports.Inbound.fromPartial(base !== null && base !== void 0 ? base : {});
478
296
  },
@@ -575,38 +393,6 @@ exports.PCTx = {
575
393
  }
576
394
  return message;
577
395
  },
578
- fromJSON(object) {
579
- return {
580
- txHash: isSet(object.txHash) ? globalThis.String(object.txHash) : "",
581
- sender: isSet(object.sender) ? globalThis.String(object.sender) : "",
582
- gasUsed: isSet(object.gasUsed) ? globalThis.Number(object.gasUsed) : 0,
583
- blockHeight: isSet(object.blockHeight) ? globalThis.Number(object.blockHeight) : 0,
584
- status: isSet(object.status) ? globalThis.String(object.status) : "",
585
- errorMsg: isSet(object.errorMsg) ? globalThis.String(object.errorMsg) : "",
586
- };
587
- },
588
- toJSON(message) {
589
- const obj = {};
590
- if (message.txHash !== "") {
591
- obj.txHash = message.txHash;
592
- }
593
- if (message.sender !== "") {
594
- obj.sender = message.sender;
595
- }
596
- if (message.gasUsed !== 0) {
597
- obj.gasUsed = Math.round(message.gasUsed);
598
- }
599
- if (message.blockHeight !== 0) {
600
- obj.blockHeight = Math.round(message.blockHeight);
601
- }
602
- if (message.status !== "") {
603
- obj.status = message.status;
604
- }
605
- if (message.errorMsg !== "") {
606
- obj.errorMsg = message.errorMsg;
607
- }
608
- return obj;
609
- },
610
396
  create(base) {
611
397
  return exports.PCTx.fromPartial(base !== null && base !== void 0 ? base : {});
612
398
  },
@@ -694,34 +480,6 @@ exports.OutboundTx = {
694
480
  }
695
481
  return message;
696
482
  },
697
- fromJSON(object) {
698
- return {
699
- destinationChain: isSet(object.destinationChain) ? globalThis.String(object.destinationChain) : "",
700
- txHash: isSet(object.txHash) ? globalThis.String(object.txHash) : "",
701
- recipient: isSet(object.recipient) ? globalThis.String(object.recipient) : "",
702
- amount: isSet(object.amount) ? globalThis.String(object.amount) : "",
703
- assetAddr: isSet(object.assetAddr) ? globalThis.String(object.assetAddr) : "",
704
- };
705
- },
706
- toJSON(message) {
707
- const obj = {};
708
- if (message.destinationChain !== "") {
709
- obj.destinationChain = message.destinationChain;
710
- }
711
- if (message.txHash !== "") {
712
- obj.txHash = message.txHash;
713
- }
714
- if (message.recipient !== "") {
715
- obj.recipient = message.recipient;
716
- }
717
- if (message.amount !== "") {
718
- obj.amount = message.amount;
719
- }
720
- if (message.assetAddr !== "") {
721
- obj.assetAddr = message.assetAddr;
722
- }
723
- return obj;
724
- },
725
483
  create(base) {
726
484
  return exports.OutboundTx.fromPartial(base !== null && base !== void 0 ? base : {});
727
485
  },
@@ -798,31 +556,6 @@ exports.UniversalTx = {
798
556
  }
799
557
  return message;
800
558
  },
801
- fromJSON(object) {
802
- return {
803
- inboundTx: isSet(object.inboundTx) ? exports.Inbound.fromJSON(object.inboundTx) : undefined,
804
- pcTx: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.pcTx) ? object.pcTx.map((e) => exports.PCTx.fromJSON(e)) : [],
805
- outboundTx: isSet(object.outboundTx) ? exports.OutboundTx.fromJSON(object.outboundTx) : undefined,
806
- universalStatus: isSet(object.universalStatus) ? universalTxStatusFromJSON(object.universalStatus) : 0,
807
- };
808
- },
809
- toJSON(message) {
810
- var _a;
811
- const obj = {};
812
- if (message.inboundTx !== undefined) {
813
- obj.inboundTx = exports.Inbound.toJSON(message.inboundTx);
814
- }
815
- if ((_a = message.pcTx) === null || _a === void 0 ? void 0 : _a.length) {
816
- obj.pcTx = message.pcTx.map((e) => exports.PCTx.toJSON(e));
817
- }
818
- if (message.outboundTx !== undefined) {
819
- obj.outboundTx = exports.OutboundTx.toJSON(message.outboundTx);
820
- }
821
- if (message.universalStatus !== 0) {
822
- obj.universalStatus = universalTxStatusToJSON(message.universalStatus);
823
- }
824
- return obj;
825
- },
826
559
  create(base) {
827
560
  return exports.UniversalTx.fromPartial(base !== null && base !== void 0 ? base : {});
828
561
  },
@@ -1,2 +1,2 @@
1
- export { protobufPackage, TxType, txTypeFromJSON, txTypeToJSON, OutboundStatus, outboundStatusFromJSON, outboundStatusToJSON, OriginatingPcTx, OutboundObservation, RevertInstructions, OutboundTxV2, UniversalTxV2, OutboundTxV2Codec, UniversalTxV2Codec, VerificationType, verificationTypeFromJSON, verificationTypeToJSON, UniversalTxStatus, universalTxStatusFromJSON, universalTxStatusToJSON, UniversalPayload, Inbound, PCTx, } from './types';
1
+ export { protobufPackage, TxType, OutboundStatus, OriginatingPcTx, OutboundObservation, RevertInstructions, OutboundTxV2, UniversalTxV2, OutboundTxV2Codec, UniversalTxV2Codec, VerificationType, UniversalTxStatus, UniversalPayload, Inbound, PCTx, } from './types';
2
2
  export { QueryGetUniversalTxRequestV2, QueryGetUniversalTxResponseV2, } from './query';
@@ -1,15 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QueryGetUniversalTxResponseV2 = exports.QueryGetUniversalTxRequestV2 = exports.PCTx = exports.Inbound = exports.UniversalPayload = exports.universalTxStatusToJSON = exports.universalTxStatusFromJSON = exports.UniversalTxStatus = exports.verificationTypeToJSON = exports.verificationTypeFromJSON = exports.VerificationType = exports.UniversalTxV2Codec = exports.OutboundTxV2Codec = exports.RevertInstructions = exports.OutboundObservation = exports.OriginatingPcTx = exports.outboundStatusToJSON = exports.outboundStatusFromJSON = exports.OutboundStatus = exports.txTypeToJSON = exports.txTypeFromJSON = exports.TxType = exports.protobufPackage = void 0;
3
+ exports.QueryGetUniversalTxResponseV2 = exports.QueryGetUniversalTxRequestV2 = exports.PCTx = exports.Inbound = exports.UniversalPayload = exports.UniversalTxStatus = exports.VerificationType = exports.UniversalTxV2Codec = exports.OutboundTxV2Codec = exports.RevertInstructions = exports.OutboundObservation = exports.OriginatingPcTx = exports.OutboundStatus = exports.TxType = exports.protobufPackage = void 0;
4
4
  // V2 uexecutor types with expanded OutboundTx
5
5
  var types_1 = require("./types");
6
6
  Object.defineProperty(exports, "protobufPackage", { enumerable: true, get: function () { return types_1.protobufPackage; } });
7
7
  Object.defineProperty(exports, "TxType", { enumerable: true, get: function () { return types_1.TxType; } });
8
- Object.defineProperty(exports, "txTypeFromJSON", { enumerable: true, get: function () { return types_1.txTypeFromJSON; } });
9
- Object.defineProperty(exports, "txTypeToJSON", { enumerable: true, get: function () { return types_1.txTypeToJSON; } });
10
8
  Object.defineProperty(exports, "OutboundStatus", { enumerable: true, get: function () { return types_1.OutboundStatus; } });
11
- Object.defineProperty(exports, "outboundStatusFromJSON", { enumerable: true, get: function () { return types_1.outboundStatusFromJSON; } });
12
- Object.defineProperty(exports, "outboundStatusToJSON", { enumerable: true, get: function () { return types_1.outboundStatusToJSON; } });
13
9
  Object.defineProperty(exports, "OriginatingPcTx", { enumerable: true, get: function () { return types_1.OriginatingPcTx; } });
14
10
  Object.defineProperty(exports, "OutboundObservation", { enumerable: true, get: function () { return types_1.OutboundObservation; } });
15
11
  Object.defineProperty(exports, "RevertInstructions", { enumerable: true, get: function () { return types_1.RevertInstructions; } });
@@ -17,11 +13,7 @@ Object.defineProperty(exports, "OutboundTxV2Codec", { enumerable: true, get: fun
17
13
  Object.defineProperty(exports, "UniversalTxV2Codec", { enumerable: true, get: function () { return types_1.UniversalTxV2Codec; } });
18
14
  // Re-exported from v1
19
15
  Object.defineProperty(exports, "VerificationType", { enumerable: true, get: function () { return types_1.VerificationType; } });
20
- Object.defineProperty(exports, "verificationTypeFromJSON", { enumerable: true, get: function () { return types_1.verificationTypeFromJSON; } });
21
- Object.defineProperty(exports, "verificationTypeToJSON", { enumerable: true, get: function () { return types_1.verificationTypeToJSON; } });
22
16
  Object.defineProperty(exports, "UniversalTxStatus", { enumerable: true, get: function () { return types_1.UniversalTxStatus; } });
23
- Object.defineProperty(exports, "universalTxStatusFromJSON", { enumerable: true, get: function () { return types_1.universalTxStatusFromJSON; } });
24
- Object.defineProperty(exports, "universalTxStatusToJSON", { enumerable: true, get: function () { return types_1.universalTxStatusToJSON; } });
25
17
  Object.defineProperty(exports, "UniversalPayload", { enumerable: true, get: function () { return types_1.UniversalPayload; } });
26
18
  Object.defineProperty(exports, "Inbound", { enumerable: true, get: function () { return types_1.Inbound; } });
27
19
  Object.defineProperty(exports, "PCTx", { enumerable: true, get: function () { return types_1.PCTx; } });
@@ -1,6 +1,6 @@
1
1
  import { BinaryReader, BinaryWriter } from '@bufbuild/protobuf/wire';
2
2
  export declare const protobufPackage = "uexecutor.v2";
3
- export { VerificationType, verificationTypeFromJSON, verificationTypeToJSON, UniversalTxStatus, universalTxStatusFromJSON, universalTxStatusToJSON, } from '../v1/types';
3
+ export { VerificationType, UniversalTxStatus } from '../v1/types';
4
4
  import { UniversalPayload, Inbound, PCTx, UniversalTxStatus } from '../v1/types';
5
5
  export { UniversalPayload, Inbound, PCTx };
6
6
  /**
@@ -17,8 +17,6 @@ export declare enum TxType {
17
17
  INBOUND_REVERT = 6,
18
18
  UNRECOGNIZED = -1
19
19
  }
20
- export declare function txTypeFromJSON(object: any): TxType;
21
- export declare function txTypeToJSON(object: TxType): string;
22
20
  /**
23
21
  * OutboundStatus enum for outbound transaction status
24
22
  */
@@ -29,8 +27,6 @@ export declare enum OutboundStatus {
29
27
  REVERTED = 3,
30
28
  UNRECOGNIZED = -1
31
29
  }
32
- export declare function outboundStatusFromJSON(object: any): OutboundStatus;
33
- export declare function outboundStatusToJSON(object: OutboundStatus): string;
34
30
  /**
35
31
  * OriginatingPcTx - Push Chain transaction that originated the outbound
36
32
  * Matches chain proto: field 1 = tx_hash (string), field 2 = log_index (string)
@@ -109,7 +105,5 @@ export declare const UniversalTxV2Codec: MessageFns<UniversalTxV2>;
109
105
  export interface MessageFns<T> {
110
106
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
111
107
  decode(input: BinaryReader | Uint8Array, length?: number): T;
112
- fromJSON(object: any): T;
113
- toJSON(message: T): unknown;
114
108
  fromPartial(object: Partial<T>): T;
115
109
  }