@monolythium/core-sdk 0.4.12 → 0.4.13

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/dist/index.cjs CHANGED
@@ -9745,14 +9745,12 @@ var DELEGATION_SELECTORS = {
9745
9745
  undelegate: "0x914f3ca8",
9746
9746
  redelegate: "0xa06ac18f",
9747
9747
  claim: "0x4e71d92d",
9748
- setAutoCompound: "0x86593454",
9749
- completeRedemption: "0x26169d0a"
9748
+ setAutoCompound: "0x86593454"
9750
9749
  };
9751
9750
  var DELEGATION_REVERT_TAGS = {
9752
- redemptionQueueFull: "0x020e",
9753
- redemptionTicketNotFound: "0x020f",
9754
- redemptionNotMature: "0x0210",
9755
- redemptionPrincipalUnavailable: "0x0211"
9751
+ /** `delegate(...)` carried native value — delegation is non-custodial and
9752
+ * must be sent with `value = 0`. */
9753
+ unexpectedValue: "0x020e"
9756
9754
  };
9757
9755
  var DelegationPrecompileError = class extends Error {
9758
9756
  constructor(message) {
@@ -9763,14 +9761,6 @@ var DelegationPrecompileError = class extends Error {
9763
9761
  function delegationAddressHex() {
9764
9762
  return PRECOMPILE_ADDRESSES.DELEGATION.toLowerCase();
9765
9763
  }
9766
- function encodeCompleteRedemptionCalldata(index) {
9767
- return bytesToHex9(
9768
- concatBytes8(
9769
- hexToBytes8(DELEGATION_SELECTORS.completeRedemption),
9770
- uint64Word3(index, "index")
9771
- )
9772
- );
9773
- }
9774
9764
  function encodeDelegateCalldata(cluster, weightBps) {
9775
9765
  return bytesToHex9(
9776
9766
  concatBytes8(
@@ -9808,21 +9798,8 @@ function encodeSetAutoCompoundCalldata(enabled) {
9808
9798
  concatBytes8(hexToBytes8(DELEGATION_SELECTORS.setAutoCompound), flag)
9809
9799
  );
9810
9800
  }
9811
- function isRedemptionPrincipalUnavailableRevert(data) {
9812
- return bytesToHex9(toBytes8(data)).toLowerCase() === DELEGATION_REVERT_TAGS.redemptionPrincipalUnavailable;
9813
- }
9814
- function uint64Word3(value, name) {
9815
- const n = toBigint3(value, name);
9816
- if (n < 0n || n > 0xffffffffffffffffn) {
9817
- throw new DelegationPrecompileError(`${name} must fit uint64`);
9818
- }
9819
- const out = new Uint8Array(32);
9820
- let rest = n;
9821
- for (let i = 31; i >= 24; i--) {
9822
- out[i] = Number(rest & 0xffn);
9823
- rest >>= 8n;
9824
- }
9825
- return out;
9801
+ function isUnexpectedValueRevert(data) {
9802
+ return bytesToHex9(toBytes8(data)).toLowerCase() === DELEGATION_REVERT_TAGS.unexpectedValue;
9826
9803
  }
9827
9804
  function uint32Word2(value, name) {
9828
9805
  const n = toBigint3(value, name);
@@ -10446,7 +10423,7 @@ function encodePlaceLimitOrderCalldata(args) {
10446
10423
  uint8Word2(normalized.side),
10447
10424
  uint256Word5(normalized.price, "price"),
10448
10425
  uint256Word5(normalized.quantity, "quantity"),
10449
- uint64Word4(normalized.expiryBlock, "expiryBlock")
10426
+ uint64Word3(normalized.expiryBlock, "expiryBlock")
10450
10427
  )
10451
10428
  );
10452
10429
  }
@@ -10785,7 +10762,7 @@ function encodePlaceLimitOrderViaCalldata(args) {
10785
10762
  uint8Word2(side),
10786
10763
  uint256Word5(price, "price"),
10787
10764
  uint256Word5(amount, "amount"),
10788
- uint64Word4(expiresAtBlock, "expiresAtBlock")
10765
+ uint64Word3(expiresAtBlock, "expiresAtBlock")
10789
10766
  )
10790
10767
  );
10791
10768
  }
@@ -11075,7 +11052,7 @@ function uint8Word2(value) {
11075
11052
  out[31] = value;
11076
11053
  return out;
11077
11054
  }
11078
- function uint64Word4(value, name) {
11055
+ function uint64Word3(value, name) {
11079
11056
  if (value < 0n || value > 0xffffffffffffffffn) {
11080
11057
  throw new MarketActionError(`${name} must fit uint64`);
11081
11058
  }
@@ -11941,7 +11918,6 @@ exports.encodeCancelOrderCalldata = encodeCancelOrderCalldata;
11941
11918
  exports.encodeCancelPendingChangeCalldata = encodeCancelPendingChangeCalldata;
11942
11919
  exports.encodeClaimCalldata = encodeClaimCalldata;
11943
11920
  exports.encodeClaimPolicyByAddressCalldata = encodeClaimPolicyByAddressCalldata;
11944
- exports.encodeCompleteRedemptionCalldata = encodeCompleteRedemptionCalldata;
11945
11921
  exports.encodeCreateFixedSupplyMrc20Calldata = encodeCreateFixedSupplyMrc20Calldata;
11946
11922
  exports.encodeCreateRequestCalldata = encodeCreateRequestCalldata;
11947
11923
  exports.encodeCreateRequestCanonical = encodeCreateRequestCanonical;
@@ -12065,8 +12041,8 @@ exports.isBridgeResumeCooldownActiveRevert = isBridgeResumeCooldownActiveRevert;
12065
12041
  exports.isConcreteServiceProbeStatus = isConcreteServiceProbeStatus;
12066
12042
  exports.isNativeDecodedEvent = isNativeDecodedEvent;
12067
12043
  exports.isNativeMarketOrderBookStreamPayload = isNativeMarketOrderBookStreamPayload;
12068
- exports.isRedemptionPrincipalUnavailableRevert = isRedemptionPrincipalUnavailableRevert;
12069
12044
  exports.isSinglePublicServiceProbeMask = isSinglePublicServiceProbeMask;
12045
+ exports.isUnexpectedValueRevert = isUnexpectedValueRevert;
12070
12046
  exports.isValidNodeRegistryCapabilities = isValidNodeRegistryCapabilities;
12071
12047
  exports.isValidPublicServiceProbeMask = isValidPublicServiceProbeMask;
12072
12048
  exports.mrvAddressToBech32 = mrvAddressToBech32;