@monolythium/core-sdk 0.4.5 → 0.4.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/dist/index.cjs CHANGED
@@ -451,7 +451,13 @@ var NODE_REGISTRY_SELECTORS = {
451
451
  /** `getClusterJoinRequest(uint32,bytes32)` — CJ-1 request status view. */
452
452
  getClusterJoinRequest: "0x" + selectorHex("getClusterJoinRequest(uint32,bytes32)"),
453
453
  /** `formCluster(bytes,bytes,bytes)` — no-foundation cluster formation by roster consent. */
454
- formCluster: "0x" + selectorHex("formCluster(bytes,bytes,bytes)")
454
+ formCluster: "0x" + selectorHex("formCluster(bytes,bytes,bytes)"),
455
+ /** `setOperatorDisplay(bytes32,string,string)` — owner-callable public display metadata. */
456
+ setOperatorDisplay: "0x" + selectorHex("setOperatorDisplay(bytes32,string,string)"),
457
+ /** `publishOperatorSealKey(bytes32,bytes)` — owner-callable LythiumSeal EK publication. */
458
+ publishOperatorSealKey: "0x" + selectorHex("publishOperatorSealKey(bytes32,bytes)"),
459
+ /** `getOperatorSealKey(bytes32)` view — returns the operator's published LythiumSeal EK. */
460
+ getOperatorSealKey: "0x" + selectorHex("getOperatorSealKey(bytes32)")
455
461
  };
456
462
  var NODE_REGISTRY_CLUSTER_MEMBER_REF_BYTES = 48;
457
463
  var NODE_REGISTRY_LEGACY_CLUSTER_MEMBER_PUBKEY_BYTES = NODE_REGISTRY_CLUSTER_MEMBER_REF_BYTES;
@@ -459,6 +465,7 @@ var NODE_REGISTRY_BLS_PUBKEY_BYTES = NODE_REGISTRY_CLUSTER_MEMBER_REF_BYTES;
459
465
  var NODE_REGISTRY_CONSENSUS_PUBKEY_BYTES = 1952;
460
466
  var NODE_REGISTRY_CONSENSUS_SIGNATURE_BYTES = 3309;
461
467
  var NODE_REGISTRY_CONSENSUS_POP_BYTES = 3309;
468
+ var NODE_REGISTRY_OPERATOR_SEAL_EK_BYTES = 1184;
462
469
  var NODE_REGISTRY_DKG_ATTESTATION_SIG_BYTES = 96;
463
470
  var NODE_REGISTRY_DKG_THRESHOLD_SIG_BYTES = NODE_REGISTRY_DKG_ATTESTATION_SIG_BYTES;
464
471
  var NODE_REGISTRY_DKG_RESHARE_MIN_SIGNERS = 5;
@@ -469,6 +476,8 @@ var NODE_REGISTRY_FORM_CLUSTER_STANDBY_COUNT = 3;
469
476
  var NODE_REGISTRY_FORM_CLUSTER_MEMBER_COUNT = NODE_REGISTRY_FORM_CLUSTER_ACTIVE_COUNT + NODE_REGISTRY_FORM_CLUSTER_STANDBY_COUNT;
470
477
  var NODE_REGISTRY_FORM_CLUSTER_THRESHOLD = 7;
471
478
  var NODE_REGISTRY_FORM_CLUSTER_MESSAGE_DOMAIN = "PROTOCORE_NODE_REGISTRY_CLUSTER_FORM_V1\0";
479
+ var NODE_REGISTRY_OPERATOR_MONIKER_MAX_BYTES = 128;
480
+ var NODE_REGISTRY_OPERATOR_ALIAS_MAX_BYTES = 64;
472
481
  var PENDING_CHANGE_KIND_CODES = {
473
482
  add: 1,
474
483
  remove: 2,
@@ -677,6 +686,68 @@ function encodeVoteClusterAdmitCalldata(args) {
677
686
  )
678
687
  );
679
688
  }
689
+ function encodeSetOperatorDisplayCalldata(args) {
690
+ const peerId = expectLength2(toBytes(args.peerId), 32, "peerId");
691
+ const moniker = displayTextBytes(
692
+ args.moniker,
693
+ NODE_REGISTRY_OPERATOR_MONIKER_MAX_BYTES,
694
+ "moniker"
695
+ );
696
+ const alias = displayTextBytes(args.alias, NODE_REGISTRY_OPERATOR_ALIAS_MAX_BYTES, "alias");
697
+ const monikerPadded = padToWord(moniker);
698
+ const aliasPadded = padToWord(alias);
699
+ const monikerOffset = 3n * 32n;
700
+ const aliasOffset = monikerOffset + 32n + BigInt(monikerPadded.length);
701
+ return bytesToHex(
702
+ concatBytes(
703
+ hexToBytes(NODE_REGISTRY_SELECTORS.setOperatorDisplay),
704
+ peerId,
705
+ uint64Word(monikerOffset, "monikerOffset"),
706
+ uint64Word(aliasOffset, "aliasOffset"),
707
+ uint64Word(BigInt(moniker.length), "monikerLength"),
708
+ monikerPadded,
709
+ uint64Word(BigInt(alias.length), "aliasLength"),
710
+ aliasPadded
711
+ )
712
+ );
713
+ }
714
+ function encodePublishOperatorSealKeyCalldata(args) {
715
+ const peerId = expectLength2(toBytes(args.peerId), 32, "peerId");
716
+ const sealEk = expectNonZeroBytes(
717
+ expectLength2(toBytes(args.sealEk), NODE_REGISTRY_OPERATOR_SEAL_EK_BYTES, "sealEk"),
718
+ "sealEk"
719
+ );
720
+ const sealEkPadded = padToWord(sealEk);
721
+ return bytesToHex(
722
+ concatBytes(
723
+ hexToBytes(NODE_REGISTRY_SELECTORS.publishOperatorSealKey),
724
+ peerId,
725
+ uint64Word(2n * 32n, "sealEkOffset"),
726
+ uint64Word(BigInt(sealEk.length), "sealEkLength"),
727
+ sealEkPadded
728
+ )
729
+ );
730
+ }
731
+ function encodeGetOperatorSealKeyCalldata(args) {
732
+ return bytesToHex(
733
+ concatBytes(
734
+ hexToBytes(NODE_REGISTRY_SELECTORS.getOperatorSealKey),
735
+ expectLength2(toBytes(args.operatorId), 32, "operatorId")
736
+ )
737
+ );
738
+ }
739
+ function decodeOperatorSealKey(returnData) {
740
+ const bytes = toBytes(returnData);
741
+ if (bytes.length === NODE_REGISTRY_OPERATOR_SEAL_EK_BYTES) {
742
+ return bytesToHex(expectNonZeroBytes(bytes, "operatorSealKey"));
743
+ }
744
+ const sealEk = decodeDynamicBytesResult(
745
+ bytes,
746
+ NODE_REGISTRY_OPERATOR_SEAL_EK_BYTES,
747
+ "operatorSealKey"
748
+ );
749
+ return bytesToHex(expectNonZeroBytes(sealEk, "operatorSealKey"));
750
+ }
680
751
  function encodeCancelClusterJoinCalldata(args) {
681
752
  return bytesToHex(
682
753
  concatBytes(
@@ -1050,6 +1121,19 @@ function toBytes(value) {
1050
1121
  }
1051
1122
  return value instanceof Uint8Array ? value : Uint8Array.from(value);
1052
1123
  }
1124
+ function displayTextBytes(value, maxBytes, name) {
1125
+ for (const ch of value) {
1126
+ const code = ch.codePointAt(0);
1127
+ if (code !== void 0 && (code >= 0 && code <= 31 || code >= 127 && code <= 159)) {
1128
+ throw new NodeRegistryError(`${name} must not contain control characters`);
1129
+ }
1130
+ }
1131
+ const bytes = new TextEncoder().encode(value);
1132
+ if (bytes.length > maxBytes) {
1133
+ throw new NodeRegistryError(`${name} must be <= ${maxBytes} UTF-8 bytes`);
1134
+ }
1135
+ return bytes;
1136
+ }
1053
1137
  function hexToBytes(hex) {
1054
1138
  const body = hex.startsWith("0x") || hex.startsWith("0X") ? hex.slice(2) : hex;
1055
1139
  if (body.length % 2 !== 0 || !/^[0-9a-fA-F]*$/.test(body)) {
@@ -1079,6 +1163,30 @@ function expectLength2(value, len, name) {
1079
1163
  }
1080
1164
  return value;
1081
1165
  }
1166
+ function expectNonZeroBytes(value, name) {
1167
+ if (value.every((byte) => byte === 0)) {
1168
+ throw new NodeRegistryError(`${name} must not be all-zero`);
1169
+ }
1170
+ return value;
1171
+ }
1172
+ function decodeDynamicBytesResult(bytes, expectedLength, label) {
1173
+ if (bytes.length < 64) {
1174
+ throw new NodeRegistryError(`${label} return must be ABI-encoded dynamic bytes`);
1175
+ }
1176
+ const offset = uintFromWord(bytes.slice(0, 32));
1177
+ if (offset !== 32n) {
1178
+ throw new NodeRegistryError(`${label} return offset must be 0x20`);
1179
+ }
1180
+ const len = uintFromWord(bytes.slice(32, 64));
1181
+ if (len !== BigInt(expectedLength)) {
1182
+ throw new NodeRegistryError(`${label} must be ${expectedLength} bytes, got ${len}`);
1183
+ }
1184
+ const paddedLen = Math.ceil(expectedLength / 32) * 32;
1185
+ if (bytes.length < 64 + paddedLen) {
1186
+ throw new NodeRegistryError(`${label} body is truncated`);
1187
+ }
1188
+ return bytes.slice(64, 64 + expectedLength);
1189
+ }
1082
1190
 
1083
1191
  // src/crypto/bytes.ts
1084
1192
  function concatBytes2(...chunks) {
@@ -2706,8 +2814,8 @@ var TESTNET_69420 = {
2706
2814
  network: "testnet-69420",
2707
2815
  display_name: "Monolythium Testnet",
2708
2816
  description: "Public Monolythium testnet. Testnet state may reset without notice; do not store value on this network.",
2709
- genesis_hash: "0x6a2bb3c8a6701bedcddc0447583bb24f34b77310e3aa77c62ca303a453e9f7ba",
2710
- binary_sha: "c283c75d",
2817
+ genesis_hash: "0xb9bcc577fa7256664364518f2943fe298b50973b0e43831a081b4dca3d2d5a6a",
2818
+ binary_sha: "a5d5b299a0bf",
2711
2819
  rpc: [
2712
2820
  {
2713
2821
  url: "http://178.105.12.9:8545",
@@ -2765,13 +2873,6 @@ var TESTNET_69420 = {
2765
2873
  tier: "official",
2766
2874
  notes: "operator-8"
2767
2875
  },
2768
- {
2769
- url: "http://162.55.54.198:8545",
2770
- provider: "monolythium-foundation",
2771
- region: "nbg1",
2772
- tier: "official",
2773
- notes: "operator-9"
2774
- },
2775
2876
  {
2776
2877
  url: "http://95.217.156.190:8545",
2777
2878
  provider: "monolythium-foundation",
@@ -2784,78 +2885,93 @@ var TESTNET_69420 = {
2784
2885
  provider: "monolythium-foundation",
2785
2886
  region: "sin",
2786
2887
  tier: "official",
2787
- notes: "operator-11; APAC"
2888
+ notes: "operator-11"
2889
+ },
2890
+ {
2891
+ url: "http://162.55.54.198:8545",
2892
+ provider: "monolythium-foundation",
2893
+ region: "fsn1",
2894
+ tier: "official",
2895
+ notes: "operator-9 preview operator"
2788
2896
  },
2789
2897
  {
2790
2898
  url: "http://128.140.125.5:8545",
2791
2899
  provider: "monolythium-foundation",
2792
2900
  region: "fsn1",
2793
2901
  tier: "official",
2794
- notes: "operator-12"
2902
+ notes: "relay-1"
2795
2903
  },
2796
2904
  {
2797
2905
  url: "http://178.105.45.210:8545",
2798
2906
  provider: "monolythium-foundation",
2799
- region: "nbg1",
2907
+ region: "fsn1",
2800
2908
  tier: "official",
2801
- notes: "relay-1"
2909
+ notes: "relay-2"
2802
2910
  },
2803
2911
  {
2804
2912
  url: "http://65.21.252.34:8545",
2805
2913
  provider: "monolythium-foundation",
2806
2914
  region: "hel1",
2807
2915
  tier: "official",
2808
- notes: "relay-2"
2916
+ notes: "relay-3"
2809
2917
  }
2810
2918
  ],
2811
2919
  p2p: [
2812
2920
  {
2813
- multiaddr: "/ip4/178.105.12.9/tcp/29898/p2p/12D3KooWPv4ctqZX9faHicr8dJifyBwrpPA4oBev7w2WZStejMKa",
2921
+ multiaddr: "/ip4/178.105.12.9/tcp/29898/p2p/12D3KooWGgh9vYbNSqYbci8w7bg2AAaFWx7umN1ADjjcUoUTF2Za",
2814
2922
  region: "fsn1"
2815
2923
  },
2816
2924
  {
2817
- multiaddr: "/ip4/178.105.15.216/tcp/29898/p2p/12D3KooWFZqKgAbve2dsAm9kKomychF4dyhtJYHL13mzh3D62d1r",
2925
+ multiaddr: "/ip4/178.105.15.216/tcp/29898/p2p/12D3KooWPUMj4vt1ee1Ug2QMJQwbDHSJ936JVaqw3iLXtAqPrq7R",
2818
2926
  region: "fsn1"
2819
2927
  },
2820
2928
  {
2821
- multiaddr: "/ip4/178.104.233.182/tcp/29898/p2p/12D3KooWMG1tbP4hcvqdPP8QmnnPjaJCs4M1GUskzAJsL15ZFcVX",
2929
+ multiaddr: "/ip4/178.104.233.182/tcp/29898/p2p/12D3KooWLPNJFUZhXyc1S7YvjMiKXyrNKCN3eFegDFF5UZAio7NJ",
2822
2930
  region: "nbg1"
2823
2931
  },
2824
2932
  {
2825
- multiaddr: "/ip4/65.108.94.1/tcp/29898/p2p/12D3KooWR5cz3fR4YkDDoPmQ6Qe7fmsXA7zo5AqdHY5Enmk5bKyT",
2933
+ multiaddr: "/ip4/65.108.94.1/tcp/29898/p2p/12D3KooWRAuuQa5iEAzLUpLnyZ9VM53dvZMt3FPj7smDcwXn3oxz",
2826
2934
  region: "hel1"
2827
2935
  },
2828
2936
  {
2829
- multiaddr: "/ip4/95.216.154.155/tcp/29898/p2p/12D3KooWFJHH3zgAaPtSBXPkCEKeGNCWQTn1QYcm4YCr5VFT3GbC",
2937
+ multiaddr: "/ip4/95.216.154.155/tcp/29898/p2p/12D3KooWFc9sVuCAuLxFTVy8KN5KXhyDvPjKkU98ySK81dFyStN8",
2830
2938
  region: "hel1"
2831
2939
  },
2832
2940
  {
2833
- multiaddr: "/ip4/87.99.145.48/tcp/29898/p2p/12D3KooWSDQdjgoiEbvsLErphM52u8tETdBtgyr4mbHQC5pT6HQz",
2941
+ multiaddr: "/ip4/87.99.145.48/tcp/29898/p2p/12D3KooWL2KLRUHybGLd736nusDRTF2V1a9waeTsxKPwF78HDCmb",
2834
2942
  region: "ash"
2835
2943
  },
2836
2944
  {
2837
- multiaddr: "/ip4/5.223.85.76/tcp/29898/p2p/12D3KooWKHgMQnBtSfZqUknJdhGK8niKKbLXy81ifHV2khRgAYFX",
2945
+ multiaddr: "/ip4/5.223.85.76/tcp/29898/p2p/12D3KooWHvobdzzEAiKcFkgdkRfr8vWGyWYfBoWS3jnPycvfwGrK",
2838
2946
  region: "sin"
2839
2947
  },
2840
2948
  {
2841
- multiaddr: "/ip4/142.132.180.99/tcp/29898/p2p/12D3KooWBx29V8iNQL22jk2CSVbvhodtXy4uTXVG7AgobxNcUuyP",
2949
+ multiaddr: "/ip4/142.132.180.99/tcp/29898/p2p/12D3KooWBcAeWScYmDWPTjNM47CkKR4vEf44CNhDCcWuGpyY7Hko",
2842
2950
  region: "fsn1"
2843
2951
  },
2844
2952
  {
2845
- multiaddr: "/ip4/162.55.54.198/tcp/29898/p2p/12D3KooWJK2w6xzRFJMHWMxVuXpBHZE7PtDNGahEp9rq86AuhNRk",
2846
- region: "nbg1"
2847
- },
2848
- {
2849
- multiaddr: "/ip4/95.217.156.190/tcp/29898/p2p/12D3KooWLD8kzKHPVexZv2pMTvpjcEPTVZxr5qMxCeVB2QR6NNa6",
2953
+ multiaddr: "/ip4/95.217.156.190/tcp/29898/p2p/12D3KooWPBr8guuWoZT59AobZEBHDZqKgwHWAP3aKUzKWeGTa7Z6",
2850
2954
  region: "hel1"
2851
2955
  },
2852
2956
  {
2853
- multiaddr: "/ip4/5.223.65.201/tcp/29898/p2p/12D3KooWAHC1cCiVsyVqrg4ofS2EQmu6Pv6G9Rc1t5btmoW6YicJ",
2957
+ multiaddr: "/ip4/5.223.65.201/tcp/29898/p2p/12D3KooWGk3fQcDxD3uPKEe56G89X6m4ksrPKCfq6LMA952HVwbs",
2854
2958
  region: "sin"
2855
2959
  },
2856
2960
  {
2857
- multiaddr: "/ip4/128.140.125.5/tcp/29898/p2p/12D3KooWNAc4EWkWWprKvqoF5aiq1ByqsLQjSN7r9ZTwYgGW365r",
2961
+ multiaddr: "/ip4/162.55.54.198/tcp/29898/p2p/12D3KooWRBA5Wzs619GuMY2NrDD6fGoLYCK2tkXff2JAZyXn7RvR",
2962
+ region: "fsn1"
2963
+ },
2964
+ {
2965
+ multiaddr: "/ip4/128.140.125.5/tcp/29898/p2p/12D3KooWAxWQueEVut82vNNbi1ncBrcnPbbHNyp5RZs7KSJBmu19",
2858
2966
  region: "fsn1"
2967
+ },
2968
+ {
2969
+ multiaddr: "/ip4/178.105.45.210/tcp/29898/p2p/12D3KooWQRpCMLezJmvqqpbpEu8ixGHgonqianG1aVZjw6GiStbd",
2970
+ region: "fsn1"
2971
+ },
2972
+ {
2973
+ multiaddr: "/ip4/65.21.252.34/tcp/29898/p2p/12D3KooWRGzTwPX21Nee2c39RWuT2ayNWb6NMX19jCx8recrNeXL",
2974
+ region: "hel1"
2859
2975
  }
2860
2976
  ]
2861
2977
  };
@@ -3652,6 +3768,16 @@ var RpcClient = class _RpcClient {
3652
3768
  async ethGetCode(address, block = "latest") {
3653
3769
  return this.call("eth_getCode", [address, encodeBlockSelector(block)]);
3654
3770
  }
3771
+ /** `eth_call` — read-only execution against committed state. */
3772
+ async ethCall(request, block = "latest") {
3773
+ return this.call("eth_call", [request, encodeBlockSelector(block)]);
3774
+ }
3775
+ /** `eth_estimateGas` — read-only execution-unit estimate for a call object. */
3776
+ async ethEstimateGas(request, block = "latest") {
3777
+ return parseQuantityBig(
3778
+ await this.call("eth_estimateGas", [request, encodeBlockSelector(block)])
3779
+ );
3780
+ }
3655
3781
  /** Compatibility block-header read by height/tag. */
3656
3782
  async ethGetBlockByNumber(block = "latest") {
3657
3783
  return normalizeBlockHeader(await this.call(ethCompatMethod("getBlockByNumber"), [encodeBlockSelector(block)]));
@@ -8350,6 +8476,7 @@ function pqm1MnemonicToMlDsa65Backend(mnemonic) {
8350
8476
 
8351
8477
  // src/cluster-join.ts
8352
8478
  var DEFAULT_CLUSTER_JOIN_EXECUTION_UNIT_LIMIT = REGISTRY_DEFAULT_EXECUTION_UNIT_LIMIT;
8479
+ var DEFAULT_OPERATOR_SEAL_KEY_EXECUTION_UNIT_LIMIT = REGISTRY_DEFAULT_EXECUTION_UNIT_LIMIT;
8353
8480
  var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
8354
8481
  var MAX_UINT32 = (1n << 32n) - 1n;
8355
8482
  function deriveClusterJoinOperatorId(operatorPubkey) {
@@ -8457,6 +8584,24 @@ function buildVoteClusterAdmitTxFields(args) {
8457
8584
  })
8458
8585
  };
8459
8586
  }
8587
+ function buildPublishOperatorSealKeyTxFields(args) {
8588
+ return {
8589
+ chainId: args.chainId,
8590
+ nonce: args.nonce,
8591
+ maxFeePerGas: parseBigint(args.fee.maxFeePerGas, "maxFeePerGas"),
8592
+ maxPriorityFeePerGas: parseBigint(args.fee.maxPriorityFeePerGas, "maxPriorityFeePerGas"),
8593
+ gasLimit: parseBigint(
8594
+ args.fee.gasLimit ?? DEFAULT_OPERATOR_SEAL_KEY_EXECUTION_UNIT_LIMIT,
8595
+ "gasLimit"
8596
+ ),
8597
+ to: nodeRegistryAddressHex(),
8598
+ value: 0n,
8599
+ input: encodePublishOperatorSealKeyCalldata({
8600
+ peerId: normalizeOperatorId(args.peerId),
8601
+ sealEk: normalizeOperatorSealEk(args.sealEk)
8602
+ })
8603
+ };
8604
+ }
8460
8605
  async function submitRequestClusterJoin(args) {
8461
8606
  const clusterId = parseUint32(args.clusterId, "clusterId");
8462
8607
  const operatorPubkey = normalizeConsensusPubkey(args.operatorPubkey, "operatorPubkey");
@@ -8512,6 +8657,39 @@ async function submitVoteClusterAdmit(args) {
8512
8657
  });
8513
8658
  return submitClusterJoinTx(args.client, backend, tx, clusterId, operatorIdHex, args);
8514
8659
  }
8660
+ async function submitPublishOperatorSealKey(args) {
8661
+ const operatorIdHex = normalizeOperatorId(args.peerId);
8662
+ const sealEk = normalizeOperatorSealEk(args.sealEk);
8663
+ const backend = pqm1MnemonicToMlDsa65Backend(args.mnemonic);
8664
+ const senderAddress = addressToTypedBech32("user", backend.addressBytes());
8665
+ const [chainId, nonce, quote] = await Promise.all([
8666
+ args.client.ethChainId(),
8667
+ args.client.lythGetTransactionCount(senderAddress),
8668
+ args.client.lythExecutionUnitPrice()
8669
+ ]);
8670
+ const tx = buildPublishOperatorSealKeyTxFields({
8671
+ chainId,
8672
+ nonce,
8673
+ fee: resolveClusterJoinExecutionFee(quote, {
8674
+ ...args,
8675
+ executionUnitLimit: args.executionUnitLimit ?? DEFAULT_OPERATOR_SEAL_KEY_EXECUTION_UNIT_LIMIT
8676
+ }),
8677
+ peerId: operatorIdHex,
8678
+ sealEk
8679
+ });
8680
+ const plaintext = buildPlaintextSubmission({ backend, tx });
8681
+ const txHash = await submitPlaintextTransaction(
8682
+ args.client,
8683
+ plaintext.signedTxWireHex,
8684
+ plaintext.innerTxHashHex
8685
+ );
8686
+ return {
8687
+ txHash,
8688
+ operatorIdHex,
8689
+ innerSighashHex: plaintext.innerSighashHex,
8690
+ signedTxWireBytes: plaintext.innerWireBytes
8691
+ };
8692
+ }
8515
8693
  async function submitClusterJoinTx(client, backend, tx, clusterId, operatorIdHex, options) {
8516
8694
  if (options.private !== false) {
8517
8695
  const encrypted = await buildEncryptedSubmission({
@@ -8599,6 +8777,10 @@ function normalizeOperatorId(value) {
8599
8777
  const bytes = typeof value === "string" ? hexToBytes2(value, "operatorId") : value;
8600
8778
  return bytesToHex2(expectBytes(bytes, 32, "operatorId"));
8601
8779
  }
8780
+ function normalizeOperatorSealEk(value) {
8781
+ const bytes = typeof value === "string" ? hexToBytes2(value, "sealEk") : value;
8782
+ return expectBytes(bytes, NODE_REGISTRY_OPERATOR_SEAL_EK_BYTES, "sealEk").slice();
8783
+ }
8602
8784
  function parseUint32(value, label) {
8603
8785
  const parsed = parseBigint(value, label);
8604
8786
  if (parsed < 0n || parsed > MAX_UINT32) {
@@ -8813,15 +8995,405 @@ function expectLength4(value, len, name) {
8813
8995
  }
8814
8996
  return value;
8815
8997
  }
8998
+ var TokenFactoryError = class extends Error {
8999
+ constructor(message) {
9000
+ super(message);
9001
+ this.name = "TokenFactoryError";
9002
+ }
9003
+ };
9004
+ var TOKEN_FACTORY_CREATE_DEPOSIT_LYTHOSHI = 3000000000000000n;
9005
+ var TOKEN_FACTORY_NAME_MAX_BYTES = 256;
9006
+ var TOKEN_FACTORY_SYMBOL_MAX_BYTES = 256;
9007
+ var TOKEN_FACTORY_MAX_DECIMALS = 30;
9008
+ var TOKEN_FACTORY_MAX_CREATOR_FEE_BPS = 1e4;
9009
+ var TOKEN_FACTORY_TOKEN_ID_DOMAIN_TAG = 250;
9010
+ var TOKEN_FACTORY_FLAGS = {
9011
+ MINTABLE: 1 << 0,
9012
+ BURNABLE: 1 << 1,
9013
+ PAUSABLE: 1 << 2,
9014
+ FIXED_SUPPLY: 1 << 3,
9015
+ CREATOR_FEE_OPT_IN: 1 << 4,
9016
+ DESTRUCTIBLE: 1 << 5
9017
+ };
9018
+ var TOKEN_FACTORY_KNOWN_FLAG_MASK = TOKEN_FACTORY_FLAGS.MINTABLE | TOKEN_FACTORY_FLAGS.BURNABLE | TOKEN_FACTORY_FLAGS.PAUSABLE | TOKEN_FACTORY_FLAGS.FIXED_SUPPLY | TOKEN_FACTORY_FLAGS.CREATOR_FEE_OPT_IN | TOKEN_FACTORY_FLAGS.DESTRUCTIBLE;
9019
+ var TOKEN_FACTORY_SIGS = {
9020
+ createToken: "createToken(string,string,uint8,uint256,uint256,uint32,uint16)",
9021
+ transfer: "transfer(bytes32,address,uint256)",
9022
+ transferFrom: "transferFrom(bytes32,address,address,uint256)",
9023
+ approve: "approve(bytes32,address,uint256)",
9024
+ increaseAllowance: "increaseAllowance(bytes32,address,uint256)",
9025
+ decreaseAllowance: "decreaseAllowance(bytes32,address,uint256)",
9026
+ balanceOf: "balanceOf(bytes32,address)",
9027
+ allowance: "allowance(bytes32,address,address)",
9028
+ totalSupply: "totalSupply(bytes32)",
9029
+ metadata: "metadata(bytes32)",
9030
+ mint: "mint(bytes32,address,uint256)",
9031
+ burn: "burn(bytes32,uint256)",
9032
+ setPaused: "setPaused(bytes32,bool)",
9033
+ transferOwnership: "transferOwnership(bytes32,address)",
9034
+ destroyToken: "destroyToken(bytes32)"
9035
+ };
9036
+ var TOKEN_FACTORY_SELECTORS = {
9037
+ createToken: selectorHex3(TOKEN_FACTORY_SIGS.createToken),
9038
+ transfer: selectorHex3(TOKEN_FACTORY_SIGS.transfer),
9039
+ transferFrom: selectorHex3(TOKEN_FACTORY_SIGS.transferFrom),
9040
+ approve: selectorHex3(TOKEN_FACTORY_SIGS.approve),
9041
+ increaseAllowance: selectorHex3(TOKEN_FACTORY_SIGS.increaseAllowance),
9042
+ decreaseAllowance: selectorHex3(TOKEN_FACTORY_SIGS.decreaseAllowance),
9043
+ balanceOf: selectorHex3(TOKEN_FACTORY_SIGS.balanceOf),
9044
+ allowance: selectorHex3(TOKEN_FACTORY_SIGS.allowance),
9045
+ totalSupply: selectorHex3(TOKEN_FACTORY_SIGS.totalSupply),
9046
+ metadata: selectorHex3(TOKEN_FACTORY_SIGS.metadata),
9047
+ mint: selectorHex3(TOKEN_FACTORY_SIGS.mint),
9048
+ burn: selectorHex3(TOKEN_FACTORY_SIGS.burn),
9049
+ setPaused: selectorHex3(TOKEN_FACTORY_SIGS.setPaused),
9050
+ transferOwnership: selectorHex3(TOKEN_FACTORY_SIGS.transferOwnership),
9051
+ destroyToken: selectorHex3(TOKEN_FACTORY_SIGS.destroyToken)
9052
+ };
9053
+ function tokenFactoryAddressHex() {
9054
+ return PRECOMPILE_ADDRESSES.TOKEN_FACTORY.toLowerCase();
9055
+ }
9056
+ function deriveTokenFactoryTokenId(creator, creatorTokenNonce) {
9057
+ const nonce = parseUint(creatorTokenNonce, "creatorTokenNonce", 64);
9058
+ return bytesToHex2(
9059
+ sha3_js.keccak_256(
9060
+ concatBytes2(
9061
+ new Uint8Array([TOKEN_FACTORY_TOKEN_ID_DOMAIN_TAG]),
9062
+ addressBytes(creator, "creator"),
9063
+ uint64Be(nonce)
9064
+ )
9065
+ )
9066
+ );
9067
+ }
9068
+ function encodeCreateTokenCalldata(args) {
9069
+ const name = textBytes(args.name, "name", TOKEN_FACTORY_NAME_MAX_BYTES);
9070
+ const symbol = textBytes(args.symbol, "symbol", TOKEN_FACTORY_SYMBOL_MAX_BYTES);
9071
+ const decimals = parseSmallUint(args.decimals, "decimals", TOKEN_FACTORY_MAX_DECIMALS);
9072
+ const initialSupply = parseUint(args.initialSupply, "initialSupply");
9073
+ const maxSupply = parseUint(args.maxSupply, "maxSupply");
9074
+ const flags = args.flags ?? 0;
9075
+ validateTokenFactoryFlags(flags, args.creatorFeeBps ?? 0);
9076
+ const creatorFeeBps = parseSmallUint(
9077
+ args.creatorFeeBps ?? 0,
9078
+ "creatorFeeBps",
9079
+ TOKEN_FACTORY_MAX_CREATOR_FEE_BPS
9080
+ );
9081
+ const headLen = 7 * 32;
9082
+ const nameTail = dynamicBytesTail(name);
9083
+ const symbolOffset = BigInt(headLen + nameTail.length);
9084
+ return bytesToHex2(
9085
+ concatBytes2(
9086
+ hexToBytes2(TOKEN_FACTORY_SELECTORS.createToken, "createToken selector"),
9087
+ uint256Word2(BigInt(headLen), "nameOffset"),
9088
+ uint256Word2(symbolOffset, "symbolOffset"),
9089
+ uint256Word2(BigInt(decimals), "decimals"),
9090
+ uint256Word2(initialSupply, "initialSupply"),
9091
+ uint256Word2(maxSupply, "maxSupply"),
9092
+ uint256Word2(BigInt(flags), "flags"),
9093
+ uint256Word2(BigInt(creatorFeeBps), "creatorFeeBps"),
9094
+ nameTail,
9095
+ dynamicBytesTail(symbol)
9096
+ )
9097
+ );
9098
+ }
9099
+ function encodeCreateFixedSupplyMrc20Calldata(args) {
9100
+ let flags = TOKEN_FACTORY_FLAGS.FIXED_SUPPLY;
9101
+ if (args.burnable) flags |= TOKEN_FACTORY_FLAGS.BURNABLE;
9102
+ if (args.pausable) flags |= TOKEN_FACTORY_FLAGS.PAUSABLE;
9103
+ if (args.destructible) flags |= TOKEN_FACTORY_FLAGS.DESTRUCTIBLE;
9104
+ return encodeCreateTokenCalldata({
9105
+ name: args.name,
9106
+ symbol: args.symbol,
9107
+ decimals: args.decimals,
9108
+ initialSupply: args.supply,
9109
+ maxSupply: args.supply,
9110
+ flags,
9111
+ creatorFeeBps: 0
9112
+ });
9113
+ }
9114
+ function encodeTokenFactoryTransferCalldata(tokenId, to, amount) {
9115
+ return encodeBytes32AddressUint(TOKEN_FACTORY_SELECTORS.transfer, tokenId, to, amount);
9116
+ }
9117
+ function encodeTokenFactoryTransferFromCalldata(tokenId, from, to, amount) {
9118
+ return bytesToHex2(
9119
+ concatBytes2(
9120
+ hexToBytes2(TOKEN_FACTORY_SELECTORS.transferFrom, "transferFrom selector"),
9121
+ bytes32(tokenId, "tokenId"),
9122
+ addressWord3(from, "from"),
9123
+ addressWord3(to, "to"),
9124
+ uint256Word2(parseUint(amount, "amount"), "amount")
9125
+ )
9126
+ );
9127
+ }
9128
+ function encodeTokenFactoryApproveCalldata(tokenId, spender, amount) {
9129
+ return encodeBytes32AddressUint(TOKEN_FACTORY_SELECTORS.approve, tokenId, spender, amount);
9130
+ }
9131
+ function encodeTokenFactoryIncreaseAllowanceCalldata(tokenId, spender, delta) {
9132
+ return encodeBytes32AddressUint(TOKEN_FACTORY_SELECTORS.increaseAllowance, tokenId, spender, delta);
9133
+ }
9134
+ function encodeTokenFactoryDecreaseAllowanceCalldata(tokenId, spender, delta) {
9135
+ return encodeBytes32AddressUint(TOKEN_FACTORY_SELECTORS.decreaseAllowance, tokenId, spender, delta);
9136
+ }
9137
+ function encodeTokenFactoryBalanceOfCalldata(tokenId, holder) {
9138
+ return encodeBytes32Address(TOKEN_FACTORY_SELECTORS.balanceOf, tokenId, holder);
9139
+ }
9140
+ function encodeTokenFactoryAllowanceCalldata(tokenId, owner, spender) {
9141
+ return bytesToHex2(
9142
+ concatBytes2(
9143
+ hexToBytes2(TOKEN_FACTORY_SELECTORS.allowance, "allowance selector"),
9144
+ bytes32(tokenId, "tokenId"),
9145
+ addressWord3(owner, "owner"),
9146
+ addressWord3(spender, "spender")
9147
+ )
9148
+ );
9149
+ }
9150
+ function encodeTokenFactoryTotalSupplyCalldata(tokenId) {
9151
+ return encodeBytes32(TOKEN_FACTORY_SELECTORS.totalSupply, tokenId);
9152
+ }
9153
+ function encodeTokenFactoryMetadataCalldata(tokenId) {
9154
+ return encodeBytes32(TOKEN_FACTORY_SELECTORS.metadata, tokenId);
9155
+ }
9156
+ function encodeTokenFactoryMintCalldata(tokenId, to, amount) {
9157
+ return encodeBytes32AddressUint(TOKEN_FACTORY_SELECTORS.mint, tokenId, to, amount);
9158
+ }
9159
+ function encodeTokenFactoryBurnCalldata(tokenId, amount) {
9160
+ return encodeBytes32Uint(TOKEN_FACTORY_SELECTORS.burn, tokenId, amount);
9161
+ }
9162
+ function encodeTokenFactorySetPausedCalldata(tokenId, paused) {
9163
+ return bytesToHex2(
9164
+ concatBytes2(
9165
+ hexToBytes2(TOKEN_FACTORY_SELECTORS.setPaused, "setPaused selector"),
9166
+ bytes32(tokenId, "tokenId"),
9167
+ boolWord(paused)
9168
+ )
9169
+ );
9170
+ }
9171
+ function encodeTokenFactoryTransferOwnershipCalldata(tokenId, newOwner) {
9172
+ return encodeBytes32Address(TOKEN_FACTORY_SELECTORS.transferOwnership, tokenId, newOwner);
9173
+ }
9174
+ function encodeTokenFactoryDestroyCalldata(tokenId) {
9175
+ return encodeBytes32(TOKEN_FACTORY_SELECTORS.destroyToken, tokenId);
9176
+ }
9177
+ function decodeTokenFactoryTokenId(output) {
9178
+ return bytesToHex2(bytes32(output, "output"));
9179
+ }
9180
+ function validateTokenFactoryFlags(flags, creatorFeeBps = 0) {
9181
+ if (!Number.isInteger(flags) || flags < 0 || flags > 4294967295) {
9182
+ throw new TokenFactoryError("flags must be a uint32");
9183
+ }
9184
+ if ((flags & ~TOKEN_FACTORY_KNOWN_FLAG_MASK) !== 0) {
9185
+ throw new TokenFactoryError("flags contain an unknown bit");
9186
+ }
9187
+ if ((flags & TOKEN_FACTORY_FLAGS.MINTABLE) !== 0 && (flags & TOKEN_FACTORY_FLAGS.FIXED_SUPPLY) !== 0) {
9188
+ throw new TokenFactoryError("MINTABLE and FIXED_SUPPLY are mutually exclusive");
9189
+ }
9190
+ if ((flags & TOKEN_FACTORY_FLAGS.CREATOR_FEE_OPT_IN) !== 0) {
9191
+ if (creatorFeeBps <= 0) throw new TokenFactoryError("CREATOR_FEE_OPT_IN requires non-zero creatorFeeBps");
9192
+ } else if (creatorFeeBps !== 0) {
9193
+ throw new TokenFactoryError("creatorFeeBps must be 0 when CREATOR_FEE_OPT_IN is unset");
9194
+ }
9195
+ }
9196
+ function encodeBytes32(selector, value) {
9197
+ return bytesToHex2(concatBytes2(hexToBytes2(selector, "selector"), bytes32(value, "tokenId")));
9198
+ }
9199
+ function encodeBytes32Uint(selector, tokenId, amount) {
9200
+ return bytesToHex2(
9201
+ concatBytes2(
9202
+ hexToBytes2(selector, "selector"),
9203
+ bytes32(tokenId, "tokenId"),
9204
+ uint256Word2(parseUint(amount, "amount"), "amount")
9205
+ )
9206
+ );
9207
+ }
9208
+ function encodeBytes32Address(selector, tokenId, address) {
9209
+ return bytesToHex2(
9210
+ concatBytes2(
9211
+ hexToBytes2(selector, "selector"),
9212
+ bytes32(tokenId, "tokenId"),
9213
+ addressWord3(address, "address")
9214
+ )
9215
+ );
9216
+ }
9217
+ function encodeBytes32AddressUint(selector, tokenId, address, amount) {
9218
+ return bytesToHex2(
9219
+ concatBytes2(
9220
+ hexToBytes2(selector, "selector"),
9221
+ bytes32(tokenId, "tokenId"),
9222
+ addressWord3(address, "address"),
9223
+ uint256Word2(parseUint(amount, "amount"), "amount")
9224
+ )
9225
+ );
9226
+ }
9227
+ function selectorHex3(signature) {
9228
+ const sel = sha3_js.keccak_256(new TextEncoder().encode(signature)).slice(0, 4);
9229
+ return bytesToHex2(sel);
9230
+ }
9231
+ function textBytes(value, label, maxBytes) {
9232
+ const bytes = new TextEncoder().encode(value);
9233
+ if (bytes.length === 0 || bytes.length > maxBytes) {
9234
+ throw new TokenFactoryError(`${label} must be 1..=${maxBytes} UTF-8 bytes`);
9235
+ }
9236
+ return bytes;
9237
+ }
9238
+ function dynamicBytesTail(bytes) {
9239
+ return concatBytes2(uint256Word2(BigInt(bytes.length), "length"), padTo323(bytes));
9240
+ }
9241
+ function padTo323(bytes) {
9242
+ const padded = Math.ceil(bytes.length / 32) * 32;
9243
+ if (padded === bytes.length) return bytes;
9244
+ const out = new Uint8Array(padded);
9245
+ out.set(bytes);
9246
+ return out;
9247
+ }
9248
+ function addressWord3(value, label) {
9249
+ const out = new Uint8Array(32);
9250
+ out.set(addressBytes(value, label), 12);
9251
+ return out;
9252
+ }
9253
+ function addressBytes(value, label) {
9254
+ const bytes = toBytes5(value, label);
9255
+ if (bytes.length !== 20) {
9256
+ throw new TokenFactoryError(`${label} must be 20 bytes, got ${bytes.length}`);
9257
+ }
9258
+ return bytes;
9259
+ }
9260
+ function bytes32(value, label) {
9261
+ const bytes = toBytes5(value, label);
9262
+ if (bytes.length !== 32) {
9263
+ throw new TokenFactoryError(`${label} must be 32 bytes, got ${bytes.length}`);
9264
+ }
9265
+ return bytes;
9266
+ }
9267
+ function boolWord(value) {
9268
+ const out = new Uint8Array(32);
9269
+ out[31] = value ? 1 : 0;
9270
+ return out;
9271
+ }
9272
+ function uint256Word2(value, label) {
9273
+ if (value < 0n || value > (1n << 256n) - 1n) {
9274
+ throw new TokenFactoryError(`${label} out of uint256 range`);
9275
+ }
9276
+ const out = new Uint8Array(32);
9277
+ let rest = value;
9278
+ for (let i = 31; i >= 0 && rest > 0n; i--) {
9279
+ out[i] = Number(rest & 0xffn);
9280
+ rest >>= 8n;
9281
+ }
9282
+ return out;
9283
+ }
9284
+ function uint64Be(value) {
9285
+ const out = new Uint8Array(8);
9286
+ let rest = value;
9287
+ for (let i = 7; i >= 0; i--) {
9288
+ out[i] = Number(rest & 0xffn);
9289
+ rest >>= 8n;
9290
+ }
9291
+ return out;
9292
+ }
9293
+ function parseSmallUint(value, label, max) {
9294
+ if (!Number.isInteger(value) || value < 0 || value > max) {
9295
+ throw new TokenFactoryError(`${label} must be an integer in 0..=${max}`);
9296
+ }
9297
+ return value;
9298
+ }
9299
+ function parseUint(value, label, bits = 256) {
9300
+ let parsed;
9301
+ if (typeof value === "bigint") {
9302
+ parsed = value;
9303
+ } else if (typeof value === "number") {
9304
+ if (!Number.isSafeInteger(value)) throw new TokenFactoryError(`${label} must be a safe integer`);
9305
+ parsed = BigInt(value);
9306
+ } else if (value.startsWith("0x") || value.startsWith("0X")) {
9307
+ parsed = BigInt(value);
9308
+ } else {
9309
+ if (!/^[0-9]+$/.test(value)) throw new TokenFactoryError(`${label} must be a non-negative integer`);
9310
+ parsed = BigInt(value);
9311
+ }
9312
+ if (parsed < 0n || parsed > (1n << BigInt(bits)) - 1n) {
9313
+ throw new TokenFactoryError(`${label} out of uint${bits} range`);
9314
+ }
9315
+ return parsed;
9316
+ }
9317
+ function toBytes5(value, label) {
9318
+ if (typeof value === "string") return hexToBytes2(value, label);
9319
+ return value instanceof Uint8Array ? value : Uint8Array.from(value);
9320
+ }
9321
+
9322
+ // src/vrf.ts
9323
+ var VrfCallError = class extends Error {
9324
+ constructor(message) {
9325
+ super(message);
9326
+ this.name = "VrfCallError";
9327
+ }
9328
+ };
9329
+ var VRF_OUTPUT_BYTES = 32;
9330
+ var VRF_DOMAIN_TAG_MAX_BYTES = 256;
9331
+ var VRF_HEIGHT_NOT_FINALIZED_REVERT = "vrf: height not finalized";
9332
+ function vrfAddressHex() {
9333
+ return PRECOMPILE_ADDRESSES.VRF.toLowerCase();
9334
+ }
9335
+ function encodeVrfEvaluateCalldata(blockHeight, domainTag = new Uint8Array()) {
9336
+ const height = parseUint64(blockHeight, "blockHeight");
9337
+ const tag = normalizeDomainTag(domainTag);
9338
+ if (tag.length > VRF_DOMAIN_TAG_MAX_BYTES) {
9339
+ throw new VrfCallError(`domainTag exceeds ${VRF_DOMAIN_TAG_MAX_BYTES} bytes`);
9340
+ }
9341
+ return bytesToHex2(concatBytes2(uint256Word3(height), tag));
9342
+ }
9343
+ function decodeVrfOutput(output) {
9344
+ const bytes = toBytes6(output, "output");
9345
+ if (bytes.length !== VRF_OUTPUT_BYTES) {
9346
+ throw new VrfCallError(`VRF output must be ${VRF_OUTPUT_BYTES} bytes, got ${bytes.length}`);
9347
+ }
9348
+ return bytes;
9349
+ }
9350
+ function normalizeDomainTag(value) {
9351
+ if (typeof value === "string") {
9352
+ if (value.startsWith("0x") || value.startsWith("0X")) return hexToBytes2(value, "domainTag");
9353
+ return new TextEncoder().encode(value);
9354
+ }
9355
+ return value instanceof Uint8Array ? value : Uint8Array.from(value);
9356
+ }
9357
+ function parseUint64(value, label) {
9358
+ let parsed;
9359
+ if (typeof value === "bigint") {
9360
+ parsed = value;
9361
+ } else if (typeof value === "number") {
9362
+ if (!Number.isSafeInteger(value)) throw new VrfCallError(`${label} must be a safe integer`);
9363
+ parsed = BigInt(value);
9364
+ } else if (value.startsWith("0x") || value.startsWith("0X")) {
9365
+ parsed = BigInt(value);
9366
+ } else {
9367
+ if (!/^[0-9]+$/.test(value)) throw new VrfCallError(`${label} must be a non-negative integer`);
9368
+ parsed = BigInt(value);
9369
+ }
9370
+ if (parsed < 0n || parsed > (1n << 64n) - 1n) {
9371
+ throw new VrfCallError(`${label} out of uint64 range`);
9372
+ }
9373
+ return parsed;
9374
+ }
9375
+ function uint256Word3(value) {
9376
+ const out = new Uint8Array(32);
9377
+ let rest = value;
9378
+ for (let i = 31; i >= 0 && rest > 0n; i--) {
9379
+ out[i] = Number(rest & 0xffn);
9380
+ rest >>= 8n;
9381
+ }
9382
+ return out;
9383
+ }
9384
+ function toBytes6(value, label) {
9385
+ if (typeof value === "string") return hexToBytes2(value, label);
9386
+ return value instanceof Uint8Array ? value : Uint8Array.from(value);
9387
+ }
8816
9388
  var PROVER_MARKET_ADDRESS = PRECOMPILE_ADDRESSES.PROVER_MARKET;
8817
9389
  var SERVES_GPU_PROVE = 512;
8818
9390
  var PROVER_MARKET_SELECTORS = {
8819
- createRequest: "0x" + selectorHex3("createRequest(bytes)"),
8820
- submitBid: "0x" + selectorHex3("submitBid(bytes)"),
8821
- closeRequest: "0x" + selectorHex3("closeRequest(bytes)"),
8822
- submitProof: "0x" + selectorHex3("submitProof(bytes)"),
8823
- settle: "0x" + selectorHex3("settle(bytes)"),
8824
- slash: "0x" + selectorHex3("slash(bytes)")
9391
+ createRequest: "0x" + selectorHex4("createRequest(bytes)"),
9392
+ submitBid: "0x" + selectorHex4("submitBid(bytes)"),
9393
+ closeRequest: "0x" + selectorHex4("closeRequest(bytes)"),
9394
+ submitProof: "0x" + selectorHex4("submitProof(bytes)"),
9395
+ settle: "0x" + selectorHex4("settle(bytes)"),
9396
+ slash: "0x" + selectorHex4("slash(bytes)")
8825
9397
  };
8826
9398
  var PROVER_MARKET_EVENT_SIGS = {
8827
9399
  proofRequested: "ProofRequested(bytes32,address,bytes32,uint128,uint64)",
@@ -8863,8 +9435,8 @@ function requestSighash(vkeyHash, inputsHash, maxFee, deadline, nonce) {
8863
9435
  sha3_js.keccak_256(
8864
9436
  concatBytes7(
8865
9437
  new TextEncoder().encode(PROVER_MARKET_REQUEST_DOMAIN),
8866
- expectLength5(toBytes5(vkeyHash), 32, "vkeyHash"),
8867
- expectLength5(toBytes5(inputsHash), 32, "inputsHash"),
9438
+ expectLength5(toBytes7(vkeyHash), 32, "vkeyHash"),
9439
+ expectLength5(toBytes7(inputsHash), 32, "inputsHash"),
8868
9440
  u128Bytes(maxFee, "maxFee"),
8869
9441
  u64Bytes(deadline, "deadline"),
8870
9442
  u64Bytes(nonce, "nonce")
@@ -8877,7 +9449,7 @@ function bidSighash(requestId, fee) {
8877
9449
  sha3_js.keccak_256(
8878
9450
  concatBytes7(
8879
9451
  new TextEncoder().encode(PROVER_MARKET_BID_DOMAIN),
8880
- expectLength5(toBytes5(requestId), 32, "requestId"),
9452
+ expectLength5(toBytes7(requestId), 32, "requestId"),
8881
9453
  u128Bytes(fee, "fee")
8882
9454
  )
8883
9455
  )
@@ -8888,16 +9460,16 @@ function submitSighash(requestId, proofHash) {
8888
9460
  sha3_js.keccak_256(
8889
9461
  concatBytes7(
8890
9462
  new TextEncoder().encode(PROVER_MARKET_SUBMIT_DOMAIN),
8891
- expectLength5(toBytes5(requestId), 32, "requestId"),
8892
- expectLength5(toBytes5(proofHash), 32, "proofHash")
9463
+ expectLength5(toBytes7(requestId), 32, "requestId"),
9464
+ expectLength5(toBytes7(proofHash), 32, "proofHash")
8893
9465
  )
8894
9466
  )
8895
9467
  );
8896
9468
  }
8897
9469
  function encodeCreateRequestCanonical(args) {
8898
- const buyer = expectLength5(toBytes5(args.buyer), 20, "buyer");
8899
- const buyerPubkey = toBytes5(args.buyerPubkey);
8900
- const sig = toBytes5(args.sig);
9470
+ const buyer = expectLength5(toBytes7(args.buyer), 20, "buyer");
9471
+ const buyerPubkey = toBytes7(args.buyerPubkey);
9472
+ const sig = toBytes7(args.sig);
8901
9473
  if (buyerPubkey.length === 0 || buyerPubkey.length > 65535) {
8902
9474
  throw new ProverMarketError("buyerPubkey length out of range (1..=65535)");
8903
9475
  }
@@ -8909,8 +9481,8 @@ function encodeCreateRequestCanonical(args) {
8909
9481
  buyer,
8910
9482
  u16Bytes(buyerPubkey.length),
8911
9483
  buyerPubkey,
8912
- expectLength5(toBytes5(args.vkeyHash), 32, "vkeyHash"),
8913
- expectLength5(toBytes5(args.inputsHash), 32, "inputsHash"),
9484
+ expectLength5(toBytes7(args.vkeyHash), 32, "vkeyHash"),
9485
+ expectLength5(toBytes7(args.inputsHash), 32, "inputsHash"),
8914
9486
  u128Bytes(args.maxFee, "maxFee"),
8915
9487
  u64Bytes(args.deadline, "deadline"),
8916
9488
  u64Bytes(args.nonce, "nonce"),
@@ -8920,7 +9492,7 @@ function encodeCreateRequestCanonical(args) {
8920
9492
  );
8921
9493
  }
8922
9494
  function encodeCreateRequestCalldata(args) {
8923
- const canonical = toBytes5(encodeCreateRequestCanonical(args));
9495
+ const canonical = toBytes7(encodeCreateRequestCanonical(args));
8924
9496
  const offset = new Uint8Array(32);
8925
9497
  offset[31] = 32;
8926
9498
  const lenWord = new Uint8Array(32);
@@ -8934,10 +9506,10 @@ function encodeCreateRequestCalldata(args) {
8934
9506
  concatBytes7(hexToBytes7(PROVER_MARKET_SELECTORS.createRequest), offset, lenWord, canonical, new Uint8Array(pad))
8935
9507
  );
8936
9508
  }
8937
- function selectorHex3(sig) {
9509
+ function selectorHex4(sig) {
8938
9510
  return [...sha3_js.keccak_256(new TextEncoder().encode(sig)).slice(0, 4)].map((b) => b.toString(16).padStart(2, "0")).join("");
8939
9511
  }
8940
- function toBytes5(value) {
9512
+ function toBytes7(value) {
8941
9513
  if (typeof value === "string") return hexToBytes7(value);
8942
9514
  return value instanceof Uint8Array ? value : Uint8Array.from(value);
8943
9515
  }
@@ -9075,7 +9647,7 @@ function encodeSetAutoCompoundCalldata(enabled) {
9075
9647
  );
9076
9648
  }
9077
9649
  function isRedemptionPrincipalUnavailableRevert(data) {
9078
- return bytesToHex9(toBytes6(data)).toLowerCase() === DELEGATION_REVERT_TAGS.redemptionPrincipalUnavailable;
9650
+ return bytesToHex9(toBytes8(data)).toLowerCase() === DELEGATION_REVERT_TAGS.redemptionPrincipalUnavailable;
9079
9651
  }
9080
9652
  function uint64Word3(value, name) {
9081
9653
  const n = toBigint3(value, name);
@@ -9129,7 +9701,7 @@ function toBigint3(value, name) {
9129
9701
  }
9130
9702
  return BigInt(value);
9131
9703
  }
9132
- function toBytes6(value) {
9704
+ function toBytes8(value) {
9133
9705
  if (typeof value === "string") {
9134
9706
  return hexToBytes8(value);
9135
9707
  }
@@ -9243,8 +9815,8 @@ function encodeSetPolicyCalldata(args) {
9243
9815
  }
9244
9816
  function encodeSetPolicyClaimCalldata(args, subAccountPubkey, subAccountSig) {
9245
9817
  const normalized = normalizeArgs(args);
9246
- const pubkey = toBytes7(subAccountPubkey);
9247
- const sig = toBytes7(subAccountSig);
9818
+ const pubkey = toBytes9(subAccountPubkey);
9819
+ const sig = toBytes9(subAccountSig);
9248
9820
  if (pubkey.length !== ML_DSA_65_PUBLIC_KEY_LEN2) {
9249
9821
  throw new SpendingPolicyError(
9250
9822
  `subAccountPubkey must be ${ML_DSA_65_PUBLIC_KEY_LEN2} bytes, got ${pubkey.length}`
@@ -9266,7 +9838,7 @@ function encodeSetPolicyClaimCalldata(args, subAccountPubkey, subAccountSig) {
9266
9838
  }
9267
9839
  function encodeClaimPolicyByAddressCalldata(args, subAccountSig) {
9268
9840
  const normalized = normalizeArgs(args);
9269
- const sig = toBytes7(subAccountSig);
9841
+ const sig = toBytes9(subAccountSig);
9270
9842
  if (sig.length !== ML_DSA_65_SIGNATURE_LEN2) {
9271
9843
  throw new SpendingPolicyError(
9272
9844
  `subAccountSig must be ${ML_DSA_65_SIGNATURE_LEN2} bytes, got ${sig.length}`
@@ -9293,12 +9865,12 @@ function normalizeArgs(args) {
9293
9865
  principal: toUserAddressBytes(args.principal, "principal"),
9294
9866
  dailyCapLythoshi: toBigint4(args.dailyCapLythoshi, "dailyCapLythoshi"),
9295
9867
  perTxCapLythoshi: toBigint4(args.perTxCapLythoshi, "perTxCapLythoshi"),
9296
- allowRoot: expectLength6(toBytes7(args.allowRoot), 32, "allowRoot"),
9297
- denyRoot: expectLength6(toBytes7(args.denyRoot), 32, "denyRoot"),
9868
+ allowRoot: expectLength6(toBytes9(args.allowRoot), 32, "allowRoot"),
9869
+ denyRoot: expectLength6(toBytes9(args.denyRoot), 32, "denyRoot"),
9298
9870
  weeklyCapLythoshi: toBigint4(args.weeklyCapLythoshi ?? 0n, "weeklyCapLythoshi"),
9299
9871
  monthlyCapLythoshi: toBigint4(args.monthlyCapLythoshi ?? 0n, "monthlyCapLythoshi"),
9300
- categoryAllowRoot: args.categoryAllowRoot == null ? ZERO_WORD : expectLength6(toBytes7(args.categoryAllowRoot), 32, "categoryAllowRoot"),
9301
- timeWindow: args.timeWindow == null ? ZERO_WORD : expectLength6(toBytes7(args.timeWindow), 32, "timeWindow"),
9872
+ categoryAllowRoot: args.categoryAllowRoot == null ? ZERO_WORD : expectLength6(toBytes9(args.categoryAllowRoot), 32, "categoryAllowRoot"),
9873
+ timeWindow: args.timeWindow == null ? ZERO_WORD : expectLength6(toBytes9(args.timeWindow), 32, "timeWindow"),
9302
9874
  policyExpiry: toBigint4(args.policyExpiry ?? 0n, "policyExpiry")
9303
9875
  };
9304
9876
  }
@@ -9328,7 +9900,7 @@ function packTimeWindow(enabled, startHour, endHour) {
9328
9900
  return out;
9329
9901
  }
9330
9902
  function decodeTimeWindow(word) {
9331
- const bytes = expectLength6(toBytes7(word), 32, "timeWindow");
9903
+ const bytes = expectLength6(toBytes9(word), 32, "timeWindow");
9332
9904
  if (bytes.every((b) => b === 0)) return null;
9333
9905
  if (bytes[29] === 0) return null;
9334
9906
  return [Math.min(bytes[30], 23), Math.min(bytes[31], 23)];
@@ -9371,7 +9943,7 @@ function toRawAddressBytes(value) {
9371
9943
  }
9372
9944
  return expectLength6(value instanceof Uint8Array ? value : Uint8Array.from(value), 20, "address");
9373
9945
  }
9374
- function toBytes7(value) {
9946
+ function toBytes9(value) {
9375
9947
  if (typeof value === "string") {
9376
9948
  return hexToBytes9(value);
9377
9949
  }
@@ -9453,7 +10025,7 @@ function pubkeyRegistryAddressHex() {
9453
10025
  return PRECOMPILE_ADDRESSES.PUBKEY_REGISTRY.toLowerCase();
9454
10026
  }
9455
10027
  function encodeRegisterPubkeyCalldata(pubkey) {
9456
- const bytes = toBytes8(pubkey);
10028
+ const bytes = toBytes10(pubkey);
9457
10029
  if (bytes.length !== PUBKEY_REGISTRY_ML_DSA_65_PUBLIC_KEY_LEN) {
9458
10030
  throw new PubkeyRegistryError(
9459
10031
  `pubkey must be ${PUBKEY_REGISTRY_ML_DSA_65_PUBLIC_KEY_LEN} bytes, got ${bytes.length}`
@@ -9462,8 +10034,8 @@ function encodeRegisterPubkeyCalldata(pubkey) {
9462
10034
  return bytesToHex11(
9463
10035
  concatBytes10(
9464
10036
  hexToBytes10(PUBKEY_REGISTRY_SELECTORS.registerPubkey),
9465
- uint256Word2(32n),
9466
- uint256Word2(BigInt(bytes.length)),
10037
+ uint256Word4(32n),
10038
+ uint256Word4(BigInt(bytes.length)),
9467
10039
  bytes
9468
10040
  )
9469
10041
  );
@@ -9475,7 +10047,7 @@ function encodeHasPubkeyCalldata(address) {
9475
10047
  return encodeSingleAddressCall2(PUBKEY_REGISTRY_SELECTORS.hasPubkey, address);
9476
10048
  }
9477
10049
  function decodeLookupPubkeyReturn(data) {
9478
- const bytes = toBytes8(data);
10050
+ const bytes = toBytes10(data);
9479
10051
  if (bytes.length < 96) {
9480
10052
  throw new PubkeyRegistryError("lookup return must be at least 96 bytes");
9481
10053
  }
@@ -9500,7 +10072,7 @@ function decodeLookupPubkeyReturn(data) {
9500
10072
  };
9501
10073
  }
9502
10074
  function decodeHasPubkeyReturn(data) {
9503
- const bytes = toBytes8(data);
10075
+ const bytes = toBytes10(data);
9504
10076
  if (bytes.length !== 32) {
9505
10077
  throw new PubkeyRegistryError("hasPubkey return must be 32 bytes");
9506
10078
  }
@@ -9514,9 +10086,9 @@ function decodeHasPubkeyReturn(data) {
9514
10086
  throw new PubkeyRegistryError("hasPubkey bool must be 0 or 1");
9515
10087
  }
9516
10088
  function encodeSingleAddressCall2(selector, address) {
9517
- return bytesToHex11(concatBytes10(hexToBytes10(selector), addressWord3(toAddressBytes(address))));
10089
+ return bytesToHex11(concatBytes10(hexToBytes10(selector), addressWord4(toAddressBytes(address))));
9518
10090
  }
9519
- function addressWord3(address) {
10091
+ function addressWord4(address) {
9520
10092
  return concatBytes10(new Uint8Array(12), address);
9521
10093
  }
9522
10094
  function toAddressBytes(value) {
@@ -9533,7 +10105,7 @@ function toAddressBytes(value) {
9533
10105
  throw new PubkeyRegistryError(`address must be a typed mono bech32m address${detail}`);
9534
10106
  }
9535
10107
  }
9536
- function toBytes8(value) {
10108
+ function toBytes10(value) {
9537
10109
  if (typeof value === "string") {
9538
10110
  return hexToBytes10(value);
9539
10111
  }
@@ -9562,7 +10134,7 @@ function concatBytes10(...parts) {
9562
10134
  }
9563
10135
  return out;
9564
10136
  }
9565
- function uint256Word2(value) {
10137
+ function uint256Word4(value) {
9566
10138
  if (value < 0n || value > (1n << 256n) - 1n) {
9567
10139
  throw new PubkeyRegistryError("uint256 value out of range");
9568
10140
  }
@@ -9710,8 +10282,8 @@ function encodePlaceLimitOrderCalldata(args) {
9710
10282
  normalized.baseTokenId,
9711
10283
  normalized.quoteTokenId,
9712
10284
  uint8Word2(normalized.side),
9713
- uint256Word3(normalized.price, "price"),
9714
- uint256Word3(normalized.quantity, "quantity"),
10285
+ uint256Word5(normalized.price, "price"),
10286
+ uint256Word5(normalized.quantity, "quantity"),
9715
10287
  uint64Word4(normalized.expiryBlock, "expiryBlock")
9716
10288
  )
9717
10289
  );
@@ -9724,7 +10296,7 @@ function encodePlaceMarketOrderCalldata(args) {
9724
10296
  normalized.baseTokenId,
9725
10297
  normalized.quoteTokenId,
9726
10298
  uint8Word2(normalized.side),
9727
- uint256Word3(normalized.quantity, "quantity"),
10299
+ uint256Word5(normalized.quantity, "quantity"),
9728
10300
  uint16Word2(normalized.maxSlippageBps, "maxSlippageBps")
9729
10301
  )
9730
10302
  );
@@ -9737,7 +10309,7 @@ function encodePlaceMarketOrderExCalldata(args) {
9737
10309
  normalized.baseTokenId,
9738
10310
  normalized.quoteTokenId,
9739
10311
  uint8Word2(normalized.side),
9740
- uint256Word3(normalized.quantity, "quantity"),
10312
+ uint256Word5(normalized.quantity, "quantity"),
9741
10313
  uint16Word2(normalized.maxSlippageBps, "maxSlippageBps"),
9742
10314
  uint8Word2(normalized.mode)
9743
10315
  )
@@ -9757,7 +10329,7 @@ function encodeMarketGridTuneCalldata(selector, label, args) {
9757
10329
  hexToBytes2(selector, `${label} selector`),
9758
10330
  bytes32FromHex(args.baseTokenId, "baseTokenId"),
9759
10331
  bytes32FromHex(args.quoteTokenId, "quoteTokenId"),
9760
- uint256Word3(BigInt(args.newValue), "newValue")
10332
+ uint256Word5(BigInt(args.newValue), "newValue")
9761
10333
  )
9762
10334
  );
9763
10335
  }
@@ -10045,12 +10617,12 @@ function encodePlaceLimitOrderViaCalldata(args) {
10045
10617
  return bytesToHex2(
10046
10618
  concatBytes2(
10047
10619
  hexToBytes2(OPERATOR_ROUTER_SELECTORS.placeLimitOrderVia, "placeLimitOrderVia selector"),
10048
- addressWord4(operator.bytes),
10620
+ addressWord5(operator.bytes),
10049
10621
  bytes32FromHex(args.base, "base"),
10050
10622
  bytes32FromHex(args.quote, "quote"),
10051
10623
  uint8Word2(side),
10052
- uint256Word3(price, "price"),
10053
- uint256Word3(amount, "amount"),
10624
+ uint256Word5(price, "price"),
10625
+ uint256Word5(amount, "amount"),
10054
10626
  uint64Word4(expiresAtBlock, "expiresAtBlock")
10055
10627
  )
10056
10628
  );
@@ -10362,7 +10934,7 @@ function uint16Word2(value, name) {
10362
10934
  out[31] = Number(value & 0xffn);
10363
10935
  return out;
10364
10936
  }
10365
- function uint256Word3(value, name) {
10937
+ function uint256Word5(value, name) {
10366
10938
  if (value < 0n || value >= 1n << 256n) {
10367
10939
  throw new MarketActionError(`${name} must fit uint256`);
10368
10940
  }
@@ -10374,7 +10946,7 @@ function uint256Word3(value, name) {
10374
10946
  }
10375
10947
  return out;
10376
10948
  }
10377
- function addressWord4(addr) {
10949
+ function addressWord5(addr) {
10378
10950
  if (addr.length !== 20) {
10379
10951
  throw new MarketActionError("address must be 20 bytes");
10380
10952
  }
@@ -10914,7 +11486,7 @@ var MONOLYTHIUM_NETWORKS = {
10914
11486
  };
10915
11487
 
10916
11488
  // src/index.ts
10917
- var version = "0.4.4";
11489
+ var version = "0.4.8";
10918
11490
 
10919
11491
  exports.ADDRESS_HRP = ADDRESS_HRP;
10920
11492
  exports.ADDRESS_KIND_HRPS = ADDRESS_KIND_HRPS;
@@ -10935,6 +11507,7 @@ exports.CLOB_MARKET_ID_DOMAIN_TAG = CLOB_MARKET_ID_DOMAIN_TAG;
10935
11507
  exports.CLOB_SELECTORS = CLOB_SELECTORS;
10936
11508
  exports.CLUSTER_FORMED_EVENT_SIG = CLUSTER_FORMED_EVENT_SIG;
10937
11509
  exports.DEFAULT_CLUSTER_JOIN_EXECUTION_UNIT_LIMIT = DEFAULT_CLUSTER_JOIN_EXECUTION_UNIT_LIMIT;
11510
+ exports.DEFAULT_OPERATOR_SEAL_KEY_EXECUTION_UNIT_LIMIT = DEFAULT_OPERATOR_SEAL_KEY_EXECUTION_UNIT_LIMIT;
10938
11511
  exports.DELEGATION_REVERT_TAGS = DELEGATION_REVERT_TAGS;
10939
11512
  exports.DELEGATION_SELECTORS = DELEGATION_SELECTORS;
10940
11513
  exports.DIVERSITY_SCORE_MAX = DIVERSITY_SCORE_MAX;
@@ -11003,6 +11576,9 @@ exports.NODE_REGISTRY_FORM_CLUSTER_MESSAGE_DOMAIN = NODE_REGISTRY_FORM_CLUSTER_M
11003
11576
  exports.NODE_REGISTRY_FORM_CLUSTER_STANDBY_COUNT = NODE_REGISTRY_FORM_CLUSTER_STANDBY_COUNT;
11004
11577
  exports.NODE_REGISTRY_FORM_CLUSTER_THRESHOLD = NODE_REGISTRY_FORM_CLUSTER_THRESHOLD;
11005
11578
  exports.NODE_REGISTRY_LEGACY_CLUSTER_MEMBER_PUBKEY_BYTES = NODE_REGISTRY_LEGACY_CLUSTER_MEMBER_PUBKEY_BYTES;
11579
+ exports.NODE_REGISTRY_OPERATOR_ALIAS_MAX_BYTES = NODE_REGISTRY_OPERATOR_ALIAS_MAX_BYTES;
11580
+ exports.NODE_REGISTRY_OPERATOR_MONIKER_MAX_BYTES = NODE_REGISTRY_OPERATOR_MONIKER_MAX_BYTES;
11581
+ exports.NODE_REGISTRY_OPERATOR_SEAL_EK_BYTES = NODE_REGISTRY_OPERATOR_SEAL_EK_BYTES;
11006
11582
  exports.NODE_REGISTRY_PENDING_CHANGE_MAX_INTENT_ID = NODE_REGISTRY_PENDING_CHANGE_MAX_INTENT_ID;
11007
11583
  exports.NODE_REGISTRY_PUBLIC_SERVICE_MASK = NODE_REGISTRY_PUBLIC_SERVICE_MASK;
11008
11584
  exports.NODE_REGISTRY_SELECTORS = NODE_REGISTRY_SELECTORS;
@@ -11049,9 +11625,24 @@ exports.SPENDING_POLICY_SELECTORS = SPENDING_POLICY_SELECTORS;
11049
11625
  exports.SdkError = SdkError;
11050
11626
  exports.SpendingPolicyError = SpendingPolicyError;
11051
11627
  exports.TESTNET_69420 = TESTNET_69420;
11628
+ exports.TOKEN_FACTORY_CREATE_DEPOSIT_LYTHOSHI = TOKEN_FACTORY_CREATE_DEPOSIT_LYTHOSHI;
11629
+ exports.TOKEN_FACTORY_FLAGS = TOKEN_FACTORY_FLAGS;
11630
+ exports.TOKEN_FACTORY_KNOWN_FLAG_MASK = TOKEN_FACTORY_KNOWN_FLAG_MASK;
11631
+ exports.TOKEN_FACTORY_MAX_CREATOR_FEE_BPS = TOKEN_FACTORY_MAX_CREATOR_FEE_BPS;
11632
+ exports.TOKEN_FACTORY_MAX_DECIMALS = TOKEN_FACTORY_MAX_DECIMALS;
11633
+ exports.TOKEN_FACTORY_NAME_MAX_BYTES = TOKEN_FACTORY_NAME_MAX_BYTES;
11634
+ exports.TOKEN_FACTORY_SELECTORS = TOKEN_FACTORY_SELECTORS;
11635
+ exports.TOKEN_FACTORY_SIGS = TOKEN_FACTORY_SIGS;
11636
+ exports.TOKEN_FACTORY_SYMBOL_MAX_BYTES = TOKEN_FACTORY_SYMBOL_MAX_BYTES;
11637
+ exports.TOKEN_FACTORY_TOKEN_ID_DOMAIN_TAG = TOKEN_FACTORY_TOKEN_ID_DOMAIN_TAG;
11052
11638
  exports.TRANSFER_DEFAULT_EXECUTION_UNIT_LIMIT = TRANSFER_DEFAULT_EXECUTION_UNIT_LIMIT;
11639
+ exports.TokenFactoryError = TokenFactoryError;
11053
11640
  exports.V1_BRIDGE_ALLOWED_FEE_TOKEN = V1_BRIDGE_ALLOWED_FEE_TOKEN;
11054
11641
  exports.V1_BRIDGE_ALLOWED_PROTOCOL = V1_BRIDGE_ALLOWED_PROTOCOL;
11642
+ exports.VRF_DOMAIN_TAG_MAX_BYTES = VRF_DOMAIN_TAG_MAX_BYTES;
11643
+ exports.VRF_HEIGHT_NOT_FINALIZED_REVERT = VRF_HEIGHT_NOT_FINALIZED_REVERT;
11644
+ exports.VRF_OUTPUT_BYTES = VRF_OUTPUT_BYTES;
11645
+ exports.VrfCallError = VrfCallError;
11055
11646
  exports.addressBytesToHex = addressBytesToHex;
11056
11647
  exports.addressToBech32 = addressToBech32;
11057
11648
  exports.addressToTypedBech32 = addressToTypedBech32;
@@ -11120,6 +11711,7 @@ exports.buildPlaceLimitOrderViaPlan = buildPlaceLimitOrderViaPlan;
11120
11711
  exports.buildPlaceSpotLimitOrderPlan = buildPlaceSpotLimitOrderPlan;
11121
11712
  exports.buildPlaceSpotMarketOrderExPlan = buildPlaceSpotMarketOrderExPlan;
11122
11713
  exports.buildPlaceSpotMarketOrderPlan = buildPlaceSpotMarketOrderPlan;
11714
+ exports.buildPublishOperatorSealKeyTxFields = buildPublishOperatorSealKeyTxFields;
11123
11715
  exports.buildRequestClusterJoinTxFields = buildRequestClusterJoinTxFields;
11124
11716
  exports.buildVoteClusterAdmitTxFields = buildVoteClusterAdmitTxFields;
11125
11717
  exports.categoryRoot = categoryRoot;
@@ -11150,9 +11742,12 @@ exports.decodeNativeReceiptResponse = decodeNativeReceiptResponse;
11150
11742
  exports.decodeNoEvmReceiptTranscript = decodeNoEvmReceiptTranscript;
11151
11743
  exports.decodeOperatorFeeChargedEvent = decodeOperatorFeeChargedEvent;
11152
11744
  exports.decodeOperatorNetworkMetadata = decodeOperatorNetworkMetadata;
11745
+ exports.decodeOperatorSealKey = decodeOperatorSealKey;
11153
11746
  exports.decodeOracleEvent = decodeOracleEvent;
11154
11747
  exports.decodeTimeWindow = decodeTimeWindow;
11748
+ exports.decodeTokenFactoryTokenId = decodeTokenFactoryTokenId;
11155
11749
  exports.decodeTxFeedResponse = decodeTxFeedResponse;
11750
+ exports.decodeVrfOutput = decodeVrfOutput;
11156
11751
  exports.delegationAddressHex = delegationAddressHex;
11157
11752
  exports.denyRootFor = denyRootFor;
11158
11753
  exports.deriveClobMarketId = deriveClobMarketId;
@@ -11162,6 +11757,7 @@ exports.deriveFeedId = deriveFeedId;
11162
11757
  exports.deriveMrvContractAddress = deriveMrvContractAddress;
11163
11758
  exports.deriveNativeSpotMarketId = deriveNativeSpotMarketId;
11164
11759
  exports.deriveNativeSpotOrderId = deriveNativeSpotOrderId;
11760
+ exports.deriveTokenFactoryTokenId = deriveTokenFactoryTokenId;
11165
11761
  exports.destinationRoot = destinationRoot;
11166
11762
  exports.encodeAttestDkgReshareCalldata = encodeAttestDkgReshareCalldata;
11167
11763
  exports.encodeBlockSelector = encodeBlockSelector;
@@ -11173,14 +11769,17 @@ exports.encodeCancelPendingChangeCalldata = encodeCancelPendingChangeCalldata;
11173
11769
  exports.encodeClaimCalldata = encodeClaimCalldata;
11174
11770
  exports.encodeClaimPolicyByAddressCalldata = encodeClaimPolicyByAddressCalldata;
11175
11771
  exports.encodeCompleteRedemptionCalldata = encodeCompleteRedemptionCalldata;
11772
+ exports.encodeCreateFixedSupplyMrc20Calldata = encodeCreateFixedSupplyMrc20Calldata;
11176
11773
  exports.encodeCreateRequestCalldata = encodeCreateRequestCalldata;
11177
11774
  exports.encodeCreateRequestCanonical = encodeCreateRequestCanonical;
11775
+ exports.encodeCreateTokenCalldata = encodeCreateTokenCalldata;
11178
11776
  exports.encodeDelegateCalldata = encodeDelegateCalldata;
11179
11777
  exports.encodeDisableCalldata = encodeDisableCalldata;
11180
11778
  exports.encodeEnableCalldata = encodeEnableCalldata;
11181
11779
  exports.encodeExpireClusterJoinCalldata = encodeExpireClusterJoinCalldata;
11182
11780
  exports.encodeFormClusterCalldata = encodeFormClusterCalldata;
11183
11781
  exports.encodeGetClusterJoinRequestCalldata = encodeGetClusterJoinRequestCalldata;
11782
+ exports.encodeGetOperatorSealKeyCalldata = encodeGetOperatorSealKeyCalldata;
11184
11783
  exports.encodeHasPubkeyCalldata = encodeHasPubkeyCalldata;
11185
11784
  exports.encodeLockBridgeConfigCalldata = encodeLockBridgeConfigCalldata;
11186
11785
  exports.encodeLookupPubkeyCalldata = encodeLookupPubkeyCalldata;
@@ -11237,6 +11836,7 @@ exports.encodePlaceLimitOrderCalldata = encodePlaceLimitOrderCalldata;
11237
11836
  exports.encodePlaceLimitOrderViaCalldata = encodePlaceLimitOrderViaCalldata;
11238
11837
  exports.encodePlaceMarketOrderCalldata = encodePlaceMarketOrderCalldata;
11239
11838
  exports.encodePlaceMarketOrderExCalldata = encodePlaceMarketOrderExCalldata;
11839
+ exports.encodePublishOperatorSealKeyCalldata = encodePublishOperatorSealKeyCalldata;
11240
11840
  exports.encodeRecoverOperatorNodeCalldata = encodeRecoverOperatorNodeCalldata;
11241
11841
  exports.encodeRedelegateCalldata = encodeRedelegateCalldata;
11242
11842
  exports.encodeRegisterPubkeyCalldata = encodeRegisterPubkeyCalldata;
@@ -11247,13 +11847,29 @@ exports.encodeSetBridgeResumeCooldownCalldata = encodeSetBridgeResumeCooldownCal
11247
11847
  exports.encodeSetBridgeRouteFinalityCalldata = encodeSetBridgeRouteFinalityCalldata;
11248
11848
  exports.encodeSetLotSizeCalldata = encodeSetLotSizeCalldata;
11249
11849
  exports.encodeSetMinNotionalCalldata = encodeSetMinNotionalCalldata;
11850
+ exports.encodeSetOperatorDisplayCalldata = encodeSetOperatorDisplayCalldata;
11250
11851
  exports.encodeSetPolicyCalldata = encodeSetPolicyCalldata;
11251
11852
  exports.encodeSetPolicyClaimCalldata = encodeSetPolicyClaimCalldata;
11252
11853
  exports.encodeSetTickSizeCalldata = encodeSetTickSizeCalldata;
11253
11854
  exports.encodeSubmitBridgeProofCalldata = encodeSubmitBridgeProofCalldata;
11254
11855
  exports.encodeSubmitPendingChangeCalldata = encodeSubmitPendingChangeCalldata;
11856
+ exports.encodeTokenFactoryAllowanceCalldata = encodeTokenFactoryAllowanceCalldata;
11857
+ exports.encodeTokenFactoryApproveCalldata = encodeTokenFactoryApproveCalldata;
11858
+ exports.encodeTokenFactoryBalanceOfCalldata = encodeTokenFactoryBalanceOfCalldata;
11859
+ exports.encodeTokenFactoryBurnCalldata = encodeTokenFactoryBurnCalldata;
11860
+ exports.encodeTokenFactoryDecreaseAllowanceCalldata = encodeTokenFactoryDecreaseAllowanceCalldata;
11861
+ exports.encodeTokenFactoryDestroyCalldata = encodeTokenFactoryDestroyCalldata;
11862
+ exports.encodeTokenFactoryIncreaseAllowanceCalldata = encodeTokenFactoryIncreaseAllowanceCalldata;
11863
+ exports.encodeTokenFactoryMetadataCalldata = encodeTokenFactoryMetadataCalldata;
11864
+ exports.encodeTokenFactoryMintCalldata = encodeTokenFactoryMintCalldata;
11865
+ exports.encodeTokenFactorySetPausedCalldata = encodeTokenFactorySetPausedCalldata;
11866
+ exports.encodeTokenFactoryTotalSupplyCalldata = encodeTokenFactoryTotalSupplyCalldata;
11867
+ exports.encodeTokenFactoryTransferCalldata = encodeTokenFactoryTransferCalldata;
11868
+ exports.encodeTokenFactoryTransferFromCalldata = encodeTokenFactoryTransferFromCalldata;
11869
+ exports.encodeTokenFactoryTransferOwnershipCalldata = encodeTokenFactoryTransferOwnershipCalldata;
11255
11870
  exports.encodeUndelegateCalldata = encodeUndelegateCalldata;
11256
11871
  exports.encodeVoteClusterAdmitCalldata = encodeVoteClusterAdmitCalldata;
11872
+ exports.encodeVrfEvaluateCalldata = encodeVrfEvaluateCalldata;
11257
11873
  exports.exportBridgeRouteCatalogueJson = exportBridgeRouteCatalogueJson;
11258
11874
  exports.fetchChainInfoLatest = fetchChainInfoLatest;
11259
11875
  exports.fetchChainRegistryLatest = fetchChainRegistryLatest;
@@ -11339,9 +11955,11 @@ exports.spendingPolicyAddressHex = spendingPolicyAddressHex;
11339
11955
  exports.submitMrvCallNativeTx = submitMrvCallNativeTx;
11340
11956
  exports.submitMrvDeployNativeTx = submitMrvDeployNativeTx;
11341
11957
  exports.submitMrvDeployPayloadNativeTx = submitMrvDeployPayloadNativeTx;
11958
+ exports.submitPublishOperatorSealKey = submitPublishOperatorSealKey;
11342
11959
  exports.submitRequestClusterJoin = submitRequestClusterJoin;
11343
11960
  exports.submitSighash = submitSighash;
11344
11961
  exports.submitVoteClusterAdmit = submitVoteClusterAdmit;
11962
+ exports.tokenFactoryAddressHex = tokenFactoryAddressHex;
11345
11963
  exports.transactionFeeExposure = transactionFeeExposure;
11346
11964
  exports.typedBech32ToAddress = typedBech32ToAddress;
11347
11965
  exports.validateAddress = validateAddress;
@@ -11349,6 +11967,7 @@ exports.validateBridgeRouteCatalogue = validateBridgeRouteCatalogue;
11349
11967
  exports.validateMrvArtifactMetadata = validateMrvArtifactMetadata;
11350
11968
  exports.validateMrvCallRequest = validateMrvCallRequest;
11351
11969
  exports.validateMrvDeployRequest = validateMrvDeployRequest;
11970
+ exports.validateTokenFactoryFlags = validateTokenFactoryFlags;
11352
11971
  exports.verifyNoEvmArchiveProofSignatures = verifyNoEvmArchiveProofSignatures;
11353
11972
  exports.verifyNoEvmBlockFinalityEvidenceMultisig = verifyNoEvmBlockFinalityEvidenceMultisig;
11354
11973
  exports.verifyNoEvmBlockFinalityEvidenceThreshold = verifyNoEvmBlockFinalityEvidenceThreshold;
@@ -11357,5 +11976,6 @@ exports.verifyNoEvmFinalityEvidenceThreshold = verifyNoEvmFinalityEvidenceThresh
11357
11976
  exports.verifyNoEvmReceiptProof = verifyNoEvmReceiptProof;
11358
11977
  exports.verifyNoEvmReceiptProofTrust = verifyNoEvmReceiptProofTrust;
11359
11978
  exports.version = version;
11979
+ exports.vrfAddressHex = vrfAddressHex;
11360
11980
  //# sourceMappingURL=index.cjs.map
11361
11981
  //# sourceMappingURL=index.cjs.map