@pushchain/core 5.1.13 → 5.1.14

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushchain/core",
3
- "version": "5.1.13",
3
+ "version": "5.1.14",
4
4
  "homepage": "https://push.org",
5
5
  "keywords": [
6
6
  "pushchain",
@@ -53,6 +53,28 @@ function encodePayloadForOrigin(ctx, payload) {
53
53
  }
54
54
  return (0, signing_1.encodeUniversalPayload)(payload);
55
55
  }
56
+ /**
57
+ * Lazy variant of `encodePayloadForOrigin`. The encoded bytes only ride to
58
+ * the chain on the fee-locking branch (consumed by `lockFee` → origin
59
+ * gateway → relayer → `DecodeUniversalPayloadSolana`). On the non-fee-
60
+ * locking branch the bytes are placed into `req` but `req` is never sent —
61
+ * `sendUniversalTx` ships the proto-struct UniversalPayload via
62
+ * `MsgExecutePayload` instead.
63
+ *
64
+ * Skipping the encode on the non-fee-locking branch sidesteps the SVM
65
+ * encoder's u64 ceiling for the R2 SVM outbound recursive seam (Slack
66
+ * 2026-04-23 regression), which sets `execute.value = multicallNativeValue`
67
+ * — a wei-scale UPC budget that routinely exceeds 2^64 on thin pSOL/WPC
68
+ * pools. The chain decoder is u64-only, so we can't widen the wire format
69
+ * without coordinated chain work; this skip is the SDK-only fix that
70
+ * unblocks Riyanshu's case without changing the wire format.
71
+ */
72
+ function encodePayloadForOriginIfNeeded(ctx, payload, feeLockingRequired) {
73
+ if (!feeLockingRequired) {
74
+ return '0x';
75
+ }
76
+ return encodePayloadForOrigin(ctx, payload);
77
+ }
56
78
  function executeStandardPayload(ctx, execute, eventBuffer, getResponseCallbacks) {
57
79
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
58
80
  var _a, _b, _c;
@@ -167,7 +189,7 @@ function executeStandardPayload(ctx, execute, eventBuffer, getResponseCallbacks)
167
189
  }, helpers_1.bigintReplacer));
168
190
  req = (0, payload_builder_1.buildUniversalTxRequest)(ctx.universalSigner.account.address, {
169
191
  recipient: viem_1.zeroAddress, token: viem_1.zeroAddress, amount: BigInt(0),
170
- payload: encodePayloadForOrigin(ctx, universalPayloadForReq),
192
+ payload: encodePayloadForOriginIfNeeded(ctx, universalPayloadForReq, feeLockingRequired),
171
193
  });
172
194
  }
173
195
  else {
@@ -196,7 +218,7 @@ function executeStandardPayload(ctx, execute, eventBuffer, getResponseCallbacks)
196
218
  }, helpers_1.bigintReplacer));
197
219
  req = (0, payload_builder_1.buildUniversalTxRequest)(ctx.universalSigner.account.address, {
198
220
  recipient: viem_1.zeroAddress, token: viem_1.zeroAddress, amount: BigInt(0),
199
- payload: encodePayloadForOrigin(ctx, universalPayloadOther),
221
+ payload: encodePayloadForOriginIfNeeded(ctx, universalPayloadOther, feeLockingRequired),
200
222
  });
201
223
  }
202
224
  }
@@ -217,7 +239,7 @@ function executeStandardPayload(ctx, execute, eventBuffer, getResponseCallbacks)
217
239
  }, helpers_1.bigintReplacer));
218
240
  req = (0, payload_builder_1.buildUniversalTxRequest)(ctx.universalSigner.account.address, {
219
241
  recipient: viem_1.zeroAddress, token: viem_1.zeroAddress, amount: BigInt(0),
220
- payload: encodePayloadForOrigin(ctx, universalPayloadSelf),
242
+ payload: encodePayloadForOriginIfNeeded(ctx, universalPayloadSelf, feeLockingRequired),
221
243
  });
222
244
  }
223
245
  }