@monolythium/core-sdk 0.4.16 → 0.4.17

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.
@@ -1,5 +1,5 @@
1
- import { I as MlDsa65Backend } from '../submission-BdBhOdg7.cjs';
2
- export { k3 as ADDRESS_DERIVATION_DOMAIN, k4 as CLUSTER_MLKEM_SHAMIR, k5 as CLUSTER_MLKEM_SHAMIR_ALGO, k6 as ClusterSealKeyEntryInput, K as ClusterSealKeys, L as ClusterSealKeysSource, k7 as DKG_AEAD_TAG_LEN, k8 as DKG_NONCE_LEN, k9 as DecryptHint, ka as ENCRYPTED_SUBMISSION_UNAVAILABLE_MESSAGE, kb as ENUM_VARIANT_INDEX_ML_DSA_65, kc as EncryptedEnvelope, kd as EncryptedSubmission, E as EncryptionKey, ke as JsonRpcCallClient, kf as LythiumSealEnvelope, kg as ML_DSA_65_PUBLIC_KEY_LEN, kh as ML_DSA_65_SEED_LEN, ki as ML_DSA_65_SIGNATURE_LEN, kj as ML_DSA_65_SIGNING_KEY_LEN, kk as ML_KEM_768_CIPHERTEXT_LEN, kl as ML_KEM_768_ENCAPSULATION_KEY_LEN, km as ML_KEM_768_SHARED_SECRET_LEN, F as MempoolClass, D as NativeEvmTxFields, kn as NativeTxExtension, ko as NativeTxExtensionDescriptor, kp as NativeTxExtensionLike, kq as NonceAad, kr as OperatorSealKeypair, ks as PlaintextSubmission, kt as SEAL_COMMIT_LEN, ku as SEAL_DK_LEN, kv as SEAL_EK_LEN, kw as SEAL_KEM_CT_LEN, kx as SEAL_KEM_SEED_LEN, ky as SEAL_KEY_LEN, kz as SEAL_NONCE_LEN, kA as SEAL_SHARE_LEN, kB as SEAL_TAG_LEN, kC as STANDARD_ALGO_NUMBER_ML_DSA_65, kD as SealRandomSource, kE as SealRecipient, kF as SealedSubmission, kG as bincodeDecryptHint, kH as bincodeEncryptedEnvelope, kI as bincodeNonceAad, kJ as bincodeSignedTransaction, kK as buildEncryptedEnvelope, kL as buildEncryptedSubmission, kM as buildPlaintextSubmission, kN as cryptoRandomSource, kO as encodeMlDsa65Opaque, kP as encodeSealEnvelope, kQ as encodeTransactionForHash, kR as encryptInnerTx, kS as fetchEncryptionKey, kT as generateOperatorSealKeypair, kU as getClusterSealKeys, kV as mlDsa65AddressBytes, kW as mlDsa65AddressFromPublicKey, kX as outerSigDigest, kY as parseClusterSealKeys, kZ as sealRosterHash, k_ as sealToCluster, k$ as sealTransaction, l0 as submitEncryptedEnvelope, l1 as submitPlaintextTransaction, l2 as submitSealedTransaction, l3 as submitTransactionWithPrivacy } from '../submission-BdBhOdg7.cjs';
1
+ import { I as MlDsa65Backend } from '../submission-DwcVARLM.cjs';
2
+ export { kb as ADDRESS_DERIVATION_DOMAIN, kc as CLUSTER_MLKEM_SHAMIR, kd as CLUSTER_MLKEM_SHAMIR_ALGO, ke as ClusterSealKeyEntryInput, K as ClusterSealKeys, L as ClusterSealKeysSource, kf as DKG_AEAD_TAG_LEN, kg as DKG_NONCE_LEN, kh as DecryptHint, ki as ENCRYPTED_SUBMISSION_UNAVAILABLE_MESSAGE, kj as ENUM_VARIANT_INDEX_ML_DSA_65, kk as EncryptedEnvelope, kl as EncryptedSubmission, E as EncryptionKey, km as JsonRpcCallClient, kn as LythiumSealEnvelope, ko as ML_DSA_65_PUBLIC_KEY_LEN, kp as ML_DSA_65_SEED_LEN, kq as ML_DSA_65_SIGNATURE_LEN, kr as ML_DSA_65_SIGNING_KEY_LEN, ks as ML_KEM_768_CIPHERTEXT_LEN, kt as ML_KEM_768_ENCAPSULATION_KEY_LEN, ku as ML_KEM_768_SHARED_SECRET_LEN, F as MempoolClass, D as NativeEvmTxFields, kv as NativeTxExtension, kw as NativeTxExtensionDescriptor, kx as NativeTxExtensionLike, ky as NonceAad, kz as OperatorSealKeypair, kA as PlaintextSubmission, kB as SEAL_COMMIT_LEN, kC as SEAL_DK_LEN, kD as SEAL_EK_LEN, kE as SEAL_KEM_CT_LEN, kF as SEAL_KEM_SEED_LEN, kG as SEAL_KEY_LEN, kH as SEAL_NONCE_LEN, kI as SEAL_SHARE_LEN, kJ as SEAL_TAG_LEN, kK as STANDARD_ALGO_NUMBER_ML_DSA_65, kL as SealRandomSource, kM as SealRecipient, kN as SealedSubmission, kO as bincodeDecryptHint, kP as bincodeEncryptedEnvelope, kQ as bincodeNonceAad, kR as bincodeSignedTransaction, kS as buildEncryptedEnvelope, kT as buildEncryptedSubmission, kU as buildPlaintextSubmission, kV as cryptoRandomSource, kW as encodeMlDsa65Opaque, kX as encodeSealEnvelope, kY as encodeTransactionForHash, kZ as encryptInnerTx, k_ as fetchEncryptionKey, k$ as generateOperatorSealKeypair, l0 as getClusterSealKeys, l1 as mlDsa65AddressBytes, l2 as mlDsa65AddressFromPublicKey, l3 as outerSigDigest, l4 as parseClusterSealKeys, l5 as sealRosterHash, l6 as sealToCluster, l7 as sealTransaction, l8 as submitEncryptedEnvelope, l9 as submitPlaintextTransaction, la as submitSealedTransaction, lb as submitTransactionWithPrivacy } from '../submission-DwcVARLM.cjs';
3
3
 
4
4
  declare class BincodeWriter {
5
5
  #private;
@@ -1,5 +1,5 @@
1
- import { I as MlDsa65Backend } from '../submission-BdBhOdg7.js';
2
- export { k3 as ADDRESS_DERIVATION_DOMAIN, k4 as CLUSTER_MLKEM_SHAMIR, k5 as CLUSTER_MLKEM_SHAMIR_ALGO, k6 as ClusterSealKeyEntryInput, K as ClusterSealKeys, L as ClusterSealKeysSource, k7 as DKG_AEAD_TAG_LEN, k8 as DKG_NONCE_LEN, k9 as DecryptHint, ka as ENCRYPTED_SUBMISSION_UNAVAILABLE_MESSAGE, kb as ENUM_VARIANT_INDEX_ML_DSA_65, kc as EncryptedEnvelope, kd as EncryptedSubmission, E as EncryptionKey, ke as JsonRpcCallClient, kf as LythiumSealEnvelope, kg as ML_DSA_65_PUBLIC_KEY_LEN, kh as ML_DSA_65_SEED_LEN, ki as ML_DSA_65_SIGNATURE_LEN, kj as ML_DSA_65_SIGNING_KEY_LEN, kk as ML_KEM_768_CIPHERTEXT_LEN, kl as ML_KEM_768_ENCAPSULATION_KEY_LEN, km as ML_KEM_768_SHARED_SECRET_LEN, F as MempoolClass, D as NativeEvmTxFields, kn as NativeTxExtension, ko as NativeTxExtensionDescriptor, kp as NativeTxExtensionLike, kq as NonceAad, kr as OperatorSealKeypair, ks as PlaintextSubmission, kt as SEAL_COMMIT_LEN, ku as SEAL_DK_LEN, kv as SEAL_EK_LEN, kw as SEAL_KEM_CT_LEN, kx as SEAL_KEM_SEED_LEN, ky as SEAL_KEY_LEN, kz as SEAL_NONCE_LEN, kA as SEAL_SHARE_LEN, kB as SEAL_TAG_LEN, kC as STANDARD_ALGO_NUMBER_ML_DSA_65, kD as SealRandomSource, kE as SealRecipient, kF as SealedSubmission, kG as bincodeDecryptHint, kH as bincodeEncryptedEnvelope, kI as bincodeNonceAad, kJ as bincodeSignedTransaction, kK as buildEncryptedEnvelope, kL as buildEncryptedSubmission, kM as buildPlaintextSubmission, kN as cryptoRandomSource, kO as encodeMlDsa65Opaque, kP as encodeSealEnvelope, kQ as encodeTransactionForHash, kR as encryptInnerTx, kS as fetchEncryptionKey, kT as generateOperatorSealKeypair, kU as getClusterSealKeys, kV as mlDsa65AddressBytes, kW as mlDsa65AddressFromPublicKey, kX as outerSigDigest, kY as parseClusterSealKeys, kZ as sealRosterHash, k_ as sealToCluster, k$ as sealTransaction, l0 as submitEncryptedEnvelope, l1 as submitPlaintextTransaction, l2 as submitSealedTransaction, l3 as submitTransactionWithPrivacy } from '../submission-BdBhOdg7.js';
1
+ import { I as MlDsa65Backend } from '../submission-DwcVARLM.js';
2
+ export { kb as ADDRESS_DERIVATION_DOMAIN, kc as CLUSTER_MLKEM_SHAMIR, kd as CLUSTER_MLKEM_SHAMIR_ALGO, ke as ClusterSealKeyEntryInput, K as ClusterSealKeys, L as ClusterSealKeysSource, kf as DKG_AEAD_TAG_LEN, kg as DKG_NONCE_LEN, kh as DecryptHint, ki as ENCRYPTED_SUBMISSION_UNAVAILABLE_MESSAGE, kj as ENUM_VARIANT_INDEX_ML_DSA_65, kk as EncryptedEnvelope, kl as EncryptedSubmission, E as EncryptionKey, km as JsonRpcCallClient, kn as LythiumSealEnvelope, ko as ML_DSA_65_PUBLIC_KEY_LEN, kp as ML_DSA_65_SEED_LEN, kq as ML_DSA_65_SIGNATURE_LEN, kr as ML_DSA_65_SIGNING_KEY_LEN, ks as ML_KEM_768_CIPHERTEXT_LEN, kt as ML_KEM_768_ENCAPSULATION_KEY_LEN, ku as ML_KEM_768_SHARED_SECRET_LEN, F as MempoolClass, D as NativeEvmTxFields, kv as NativeTxExtension, kw as NativeTxExtensionDescriptor, kx as NativeTxExtensionLike, ky as NonceAad, kz as OperatorSealKeypair, kA as PlaintextSubmission, kB as SEAL_COMMIT_LEN, kC as SEAL_DK_LEN, kD as SEAL_EK_LEN, kE as SEAL_KEM_CT_LEN, kF as SEAL_KEM_SEED_LEN, kG as SEAL_KEY_LEN, kH as SEAL_NONCE_LEN, kI as SEAL_SHARE_LEN, kJ as SEAL_TAG_LEN, kK as STANDARD_ALGO_NUMBER_ML_DSA_65, kL as SealRandomSource, kM as SealRecipient, kN as SealedSubmission, kO as bincodeDecryptHint, kP as bincodeEncryptedEnvelope, kQ as bincodeNonceAad, kR as bincodeSignedTransaction, kS as buildEncryptedEnvelope, kT as buildEncryptedSubmission, kU as buildPlaintextSubmission, kV as cryptoRandomSource, kW as encodeMlDsa65Opaque, kX as encodeSealEnvelope, kY as encodeTransactionForHash, kZ as encryptInnerTx, k_ as fetchEncryptionKey, k$ as generateOperatorSealKeypair, l0 as getClusterSealKeys, l1 as mlDsa65AddressBytes, l2 as mlDsa65AddressFromPublicKey, l3 as outerSigDigest, l4 as parseClusterSealKeys, l5 as sealRosterHash, l6 as sealToCluster, l7 as sealTransaction, l8 as submitEncryptedEnvelope, l9 as submitPlaintextTransaction, la as submitSealedTransaction, lb as submitTransactionWithPrivacy } from '../submission-DwcVARLM.js';
3
3
 
4
4
  declare class BincodeWriter {
5
5
  #private;
package/dist/index.cjs CHANGED
@@ -266,84 +266,6 @@ function expectLength(value, len, name) {
266
266
  return value instanceof Uint8Array ? value : Uint8Array.from(value);
267
267
  }
268
268
 
269
- // src/native-events.ts
270
- var NATIVE_MARKET_EVENT_FAMILY = "market";
271
- function nativeMarketEventFilter(filter = {}) {
272
- return { ...filter, family: NATIVE_MARKET_EVENT_FAMILY };
273
- }
274
- function isNativeDecodedEvent(value) {
275
- const row = asRecord(value);
276
- return row !== null && typeof row["block_height"] === "number" && typeof row["tx_index"] === "number" && typeof row["sequence"] === "number" && typeof row["family"] === "string" && typeof row["event_name"] === "string" && typeof row["payload_hash"] === "string";
277
- }
278
- function parseNativeDecodedEvent(event) {
279
- if (isNativeDecodedEvent(event.decoded)) {
280
- return event.decoded;
281
- }
282
- try {
283
- const parsed = JSON.parse(event.decodedJson);
284
- if (isNativeDecodedEvent(parsed)) {
285
- return parsed;
286
- }
287
- } catch {
288
- }
289
- throw SdkError.malformed(
290
- `native event ${event.eventTopic} at logIndex ${event.logIndex} is missing a typed decoded payload`
291
- );
292
- }
293
- function nativeEventMatches(event, filter = {}) {
294
- if (filter.address !== void 0 && event.address !== filter.address) return false;
295
- if (filter.eventTopic !== void 0 && event.eventTopic !== filter.eventTopic) return false;
296
- if (filter.family === void 0 && filter.eventName === void 0) return true;
297
- let decoded;
298
- try {
299
- decoded = parseNativeDecodedEvent(event);
300
- } catch {
301
- return false;
302
- }
303
- if (filter.family !== void 0 && decoded.family !== filter.family) return false;
304
- if (filter.eventName !== void 0 && decoded.event_name !== filter.eventName) return false;
305
- return true;
306
- }
307
- function nativeEventsFromReceipt(receipt, filter = {}) {
308
- return receipt.events.filter((event) => nativeEventMatches(event, filter)).map((event) => ({
309
- ...event,
310
- decoded: parseNativeDecodedEvent(event)
311
- }));
312
- }
313
- function nativeMarketEventsFromReceipt(receipt, filter = {}) {
314
- return nativeEventsFromReceipt(receipt, nativeMarketEventFilter(filter));
315
- }
316
- function nativeEventsFromHistory(response) {
317
- return {
318
- ...response,
319
- events: response.events.map((event) => ({
320
- ...event,
321
- decoded: parseNativeDecodedEvent(event)
322
- }))
323
- };
324
- }
325
- function nativeMarketEventsFromHistory(response) {
326
- return {
327
- ...response,
328
- filters: { ...response.filters, family: NATIVE_MARKET_EVENT_FAMILY },
329
- events: response.events.filter((event) => nativeEventMatches(event, { family: NATIVE_MARKET_EVENT_FAMILY })).map((event) => ({
330
- ...event,
331
- decoded: parseNativeDecodedEvent(event)
332
- }))
333
- };
334
- }
335
- async function consumeNativeEvents(receipt, consumer, filter = {}) {
336
- const events = nativeEventsFromReceipt(receipt, filter);
337
- for (const event of events) {
338
- await consumer(event);
339
- }
340
- return events.length;
341
- }
342
- function asRecord(value) {
343
- if (value === null || typeof value !== "object" || Array.isArray(value)) return null;
344
- return value;
345
- }
346
-
347
269
  // src/consts.ts
348
270
  var BURN_ADDR = "0x0000000000000000000000000000000000000000";
349
271
  var PRECOMPILE_ADDRESSES = {
@@ -528,6 +450,9 @@ var NODE_REGISTRY_ARCHIVE_KIND_EPOCH_SEED = 3;
528
450
  var NODE_REGISTRY_TAG_ARCHIVE_CHALLENGE = 50;
529
451
  var NODE_REGISTRY_TAG_SERVICE_SCORE = 36;
530
452
  var NODE_REGISTRY_TAG_TREASURY = 31;
453
+ var NODE_REGISTRY_TAG_CLUSTER_CHARTER = 49;
454
+ var NODE_REGISTRY_SUBKIND_CHARTER_DELEGATOR_BPS = 0;
455
+ var NODE_REGISTRY_SUBKIND_CHARTER_MEMBER_SHARES = 1;
531
456
  var PENDING_CHANGE_KIND_CODES = {
532
457
  add: 1,
533
458
  remove: 2,
@@ -1321,6 +1246,40 @@ function slotProbeAuthority() {
1321
1246
  buf[33] = 10;
1322
1247
  return bytesToHex(sha3_js.keccak_256(buf));
1323
1248
  }
1249
+ function slotClusterCharter(clusterId, subkind) {
1250
+ if (!Number.isInteger(subkind) || subkind < 0 || subkind > 255) {
1251
+ throw new NodeRegistryError("charter subkind must be a u8");
1252
+ }
1253
+ const buf = new Uint8Array(1 + 4 + 1);
1254
+ buf[0] = NODE_REGISTRY_TAG_CLUSTER_CHARTER;
1255
+ buf.set(u32BeBytes(toUint32(clusterId, "clusterId")), 1);
1256
+ buf[5] = subkind;
1257
+ return bytesToHex(sha3_js.keccak_256(buf));
1258
+ }
1259
+ function slotClusterCharterDelegator(clusterId) {
1260
+ return slotClusterCharter(clusterId, NODE_REGISTRY_SUBKIND_CHARTER_DELEGATOR_BPS);
1261
+ }
1262
+ function slotClusterCharterMembers(clusterId) {
1263
+ return slotClusterCharter(clusterId, NODE_REGISTRY_SUBKIND_CHARTER_MEMBER_SHARES);
1264
+ }
1265
+ function decodeActiveCharter(delegatorWord, membersWord) {
1266
+ const presence = expectLength2(toBytes(delegatorWord), 32, "charterDelegatorWord");
1267
+ let raw = 0n;
1268
+ for (const b of presence) {
1269
+ raw = raw << 8n | BigInt(b);
1270
+ }
1271
+ if (raw === 0n) {
1272
+ return { present: false, delegatorShareBps: 0, memberShareBps: [] };
1273
+ }
1274
+ const delegatorShareBps = Number(raw - 1n > 0xffffn ? 0xffffn : raw - 1n);
1275
+ const packed = expectLength2(toBytes(membersWord), 32, "charterMembersWord");
1276
+ const memberShareBps = [];
1277
+ for (let i = 0; i < NODE_REGISTRY_FORM_CLUSTER_MEMBER_COUNT; i += 1) {
1278
+ const at = 12 + 2 * i;
1279
+ memberShareBps.push(packed[at] << 8 | packed[at + 1]);
1280
+ }
1281
+ return { present: true, delegatorShareBps, memberShareBps };
1282
+ }
1324
1283
  function decodeClusterJoinRequest(returnData) {
1325
1284
  const bytes = expectLength2(toBytes(returnData), 8 * 32, "clusterJoinRequest");
1326
1285
  const word = (i) => bytes.slice(i * 32, (i + 1) * 32);
@@ -1707,6 +1666,84 @@ function decodeDynamicBytesResult(bytes, expectedLength, label) {
1707
1666
  return bytes.slice(64, 64 + expectedLength);
1708
1667
  }
1709
1668
 
1669
+ // src/native-events.ts
1670
+ var NATIVE_MARKET_EVENT_FAMILY = "market";
1671
+ function nativeMarketEventFilter(filter = {}) {
1672
+ return { ...filter, family: NATIVE_MARKET_EVENT_FAMILY };
1673
+ }
1674
+ function isNativeDecodedEvent(value) {
1675
+ const row = asRecord(value);
1676
+ return row !== null && typeof row["block_height"] === "number" && typeof row["tx_index"] === "number" && typeof row["sequence"] === "number" && typeof row["family"] === "string" && typeof row["event_name"] === "string" && typeof row["payload_hash"] === "string";
1677
+ }
1678
+ function parseNativeDecodedEvent(event) {
1679
+ if (isNativeDecodedEvent(event.decoded)) {
1680
+ return event.decoded;
1681
+ }
1682
+ try {
1683
+ const parsed = JSON.parse(event.decodedJson);
1684
+ if (isNativeDecodedEvent(parsed)) {
1685
+ return parsed;
1686
+ }
1687
+ } catch {
1688
+ }
1689
+ throw SdkError.malformed(
1690
+ `native event ${event.eventTopic} at logIndex ${event.logIndex} is missing a typed decoded payload`
1691
+ );
1692
+ }
1693
+ function nativeEventMatches(event, filter = {}) {
1694
+ if (filter.address !== void 0 && event.address !== filter.address) return false;
1695
+ if (filter.eventTopic !== void 0 && event.eventTopic !== filter.eventTopic) return false;
1696
+ if (filter.family === void 0 && filter.eventName === void 0) return true;
1697
+ let decoded;
1698
+ try {
1699
+ decoded = parseNativeDecodedEvent(event);
1700
+ } catch {
1701
+ return false;
1702
+ }
1703
+ if (filter.family !== void 0 && decoded.family !== filter.family) return false;
1704
+ if (filter.eventName !== void 0 && decoded.event_name !== filter.eventName) return false;
1705
+ return true;
1706
+ }
1707
+ function nativeEventsFromReceipt(receipt, filter = {}) {
1708
+ return receipt.events.filter((event) => nativeEventMatches(event, filter)).map((event) => ({
1709
+ ...event,
1710
+ decoded: parseNativeDecodedEvent(event)
1711
+ }));
1712
+ }
1713
+ function nativeMarketEventsFromReceipt(receipt, filter = {}) {
1714
+ return nativeEventsFromReceipt(receipt, nativeMarketEventFilter(filter));
1715
+ }
1716
+ function nativeEventsFromHistory(response) {
1717
+ return {
1718
+ ...response,
1719
+ events: response.events.map((event) => ({
1720
+ ...event,
1721
+ decoded: parseNativeDecodedEvent(event)
1722
+ }))
1723
+ };
1724
+ }
1725
+ function nativeMarketEventsFromHistory(response) {
1726
+ return {
1727
+ ...response,
1728
+ filters: { ...response.filters, family: NATIVE_MARKET_EVENT_FAMILY },
1729
+ events: response.events.filter((event) => nativeEventMatches(event, { family: NATIVE_MARKET_EVENT_FAMILY })).map((event) => ({
1730
+ ...event,
1731
+ decoded: parseNativeDecodedEvent(event)
1732
+ }))
1733
+ };
1734
+ }
1735
+ async function consumeNativeEvents(receipt, consumer, filter = {}) {
1736
+ const events = nativeEventsFromReceipt(receipt, filter);
1737
+ for (const event of events) {
1738
+ await consumer(event);
1739
+ }
1740
+ return events.length;
1741
+ }
1742
+ function asRecord(value) {
1743
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return null;
1744
+ return value;
1745
+ }
1746
+
1710
1747
  // src/crypto/bytes.ts
1711
1748
  function concatBytes2(...chunks) {
1712
1749
  const len = chunks.reduce((n, c) => n + c.length, 0);
@@ -3361,8 +3398,8 @@ var TESTNET_69420 = {
3361
3398
  network: "testnet-69420",
3362
3399
  display_name: "Monolythium Testnet",
3363
3400
  description: "Public Monolythium testnet. Testnet state may reset without notice; do not store value on this network.",
3364
- genesis_hash: "0x0d2903aeac5aa127b3fb75cd1405c2c193896981e8897671792d3817a6fdf689",
3365
- binary_sha: "52f1694c5a6d",
3401
+ genesis_hash: "0x11774775b5c3bfc36ecb9c37e7252b49898caaacdb55668de3913fe60c660258",
3402
+ binary_sha: "b4257f14",
3366
3403
  rpc: [
3367
3404
  {
3368
3405
  url: "http://178.105.12.9:8545",
@@ -3421,18 +3458,18 @@ var TESTNET_69420 = {
3421
3458
  notes: "operator-8"
3422
3459
  },
3423
3460
  {
3424
- url: "http://162.55.54.198:8545",
3461
+ url: "http://95.217.156.190:8545",
3425
3462
  provider: "monolythium-foundation",
3426
- region: "fsn1",
3463
+ region: "hel1",
3427
3464
  tier: "official",
3428
- notes: "operator-9"
3465
+ notes: "operator-10"
3429
3466
  },
3430
3467
  {
3431
- url: "http://95.217.156.190:8545",
3468
+ url: "http://162.55.54.198:8545",
3432
3469
  provider: "monolythium-foundation",
3433
- region: "hel1",
3470
+ region: "fsn1",
3434
3471
  tier: "official",
3435
- notes: "operator-10"
3472
+ notes: "operator-9"
3436
3473
  },
3437
3474
  {
3438
3475
  url: "http://178.105.45.210:8545",
@@ -4765,6 +4802,55 @@ var RpcClient = class _RpcClient {
4765
4802
  async lythGetClusterDiversity(clusterId) {
4766
4803
  return this.call("lyth_getClusterDiversity", [clusterId]);
4767
4804
  }
4805
+ /**
4806
+ * Component H — read a cluster's ACTIVE economics charter (Law §6.8).
4807
+ *
4808
+ * There is no `lyth_*` / view-selector for the active charter, so this
4809
+ * SLOADs the two `TAG_CLUSTER_CHARTER` (`0x31`) storage words from the
4810
+ * node-registry account `0x1005` via `eth_getStorageAt` and decodes them
4811
+ * with {@link decodeActiveCharter}. Returns `{ present: false }` (zeroed
4812
+ * shares) for genesis / 3-arg-formCluster clusters that never adopted a
4813
+ * charter. The active record carries no `effectiveEpoch` — that lives on
4814
+ * the pending amendment ({@link lythGetPendingCharter}).
4815
+ */
4816
+ async lythGetClusterCharter(clusterId, block = "latest") {
4817
+ const registry = nodeRegistryAddressHex();
4818
+ const [delegator, members] = await Promise.all([
4819
+ this.ethGetStorageAt(registry, slotClusterCharterDelegator(clusterId), block),
4820
+ this.ethGetStorageAt(registry, slotClusterCharterMembers(clusterId), block)
4821
+ ]);
4822
+ return decodeActiveCharter(delegator.value, members.value);
4823
+ }
4824
+ /**
4825
+ * Component H — read a cluster's PENDING charter amendment (Law §6.8).
4826
+ *
4827
+ * Calls the `getPendingCharter(uint32)` view on the node-registry account
4828
+ * `0x1005` over `eth_call` and decodes the return with
4829
+ * {@link decodePendingCharter}. Returns `{ present: false }` when no
4830
+ * amendment is posted; otherwise carries the proposed shares plus the
4831
+ * `effectiveEpoch` at which the delegator-protective cooldown lands.
4832
+ */
4833
+ async lythGetPendingCharter(clusterId, block = "latest") {
4834
+ const data = await this.ethCall(
4835
+ { to: nodeRegistryAddressHex(), data: encodeGetPendingCharterCalldata(clusterId) },
4836
+ block
4837
+ );
4838
+ return decodePendingCharter(data);
4839
+ }
4840
+ /**
4841
+ * Component A — read a cluster's settled per-cluster ServiceScore (the
4842
+ * `u64` the reward path reads each block). SLOADs the `TAG_SERVICE_SCORE`
4843
+ * (`0x24`) score slot from `0x1005` via `eth_getStorageAt`; `0n` means the
4844
+ * cluster has never been scored.
4845
+ */
4846
+ async lythGetClusterServiceScore(clusterId, block = "latest") {
4847
+ const word = await this.ethGetStorageAt(
4848
+ nodeRegistryAddressHex(),
4849
+ slotClusterServiceScore(clusterId),
4850
+ block
4851
+ );
4852
+ return parseQuantityBig(word.value);
4853
+ }
4768
4854
  /**
4769
4855
  * PF-6 — `lyth_getOperatorNetworkMetadata`: ASN/geo/hosting-class/IP/PCR
4770
4856
  * for a peer. `operatorId` is the 32-byte operator/peer id as `0x…` hex
@@ -12144,7 +12230,7 @@ var MONOLYTHIUM_NETWORKS = {
12144
12230
  };
12145
12231
 
12146
12232
  // src/index.ts
12147
- var version = "0.4.8";
12233
+ var version = "0.4.17";
12148
12234
 
12149
12235
  exports.ADDRESS_HRP = ADDRESS_HRP;
12150
12236
  exports.ADDRESS_KIND_HRPS = ADDRESS_KIND_HRPS;
@@ -12258,7 +12344,10 @@ exports.NODE_REGISTRY_OPERATOR_SEAL_EK_BYTES = NODE_REGISTRY_OPERATOR_SEAL_EK_BY
12258
12344
  exports.NODE_REGISTRY_PENDING_CHANGE_MAX_INTENT_ID = NODE_REGISTRY_PENDING_CHANGE_MAX_INTENT_ID;
12259
12345
  exports.NODE_REGISTRY_PUBLIC_SERVICE_MASK = NODE_REGISTRY_PUBLIC_SERVICE_MASK;
12260
12346
  exports.NODE_REGISTRY_SELECTORS = NODE_REGISTRY_SELECTORS;
12347
+ exports.NODE_REGISTRY_SUBKIND_CHARTER_DELEGATOR_BPS = NODE_REGISTRY_SUBKIND_CHARTER_DELEGATOR_BPS;
12348
+ exports.NODE_REGISTRY_SUBKIND_CHARTER_MEMBER_SHARES = NODE_REGISTRY_SUBKIND_CHARTER_MEMBER_SHARES;
12261
12349
  exports.NODE_REGISTRY_TAG_ARCHIVE_CHALLENGE = NODE_REGISTRY_TAG_ARCHIVE_CHALLENGE;
12350
+ exports.NODE_REGISTRY_TAG_CLUSTER_CHARTER = NODE_REGISTRY_TAG_CLUSTER_CHARTER;
12262
12351
  exports.NODE_REGISTRY_TAG_SERVICE_SCORE = NODE_REGISTRY_TAG_SERVICE_SCORE;
12263
12352
  exports.NODE_REGISTRY_TAG_TREASURY = NODE_REGISTRY_TAG_TREASURY;
12264
12353
  exports.NODE_REGISTRY_UPDATE_CHARTER_MESSAGE_DOMAIN = NODE_REGISTRY_UPDATE_CHARTER_MESSAGE_DOMAIN;
@@ -12418,6 +12507,7 @@ exports.computeNoEvmRoundFinalityMessage = computeNoEvmRoundFinalityMessage;
12418
12507
  exports.computeNoEvmTargetReceiptHash = computeNoEvmTargetReceiptHash;
12419
12508
  exports.computeQuoteLiquidity = computeQuoteLiquidity;
12420
12509
  exports.consumeNativeEvents = consumeNativeEvents;
12510
+ exports.decodeActiveCharter = decodeActiveCharter;
12421
12511
  exports.decodeClusterCharter = decodeClusterCharter;
12422
12512
  exports.decodeClusterDiversity = decodeClusterDiversity;
12423
12513
  exports.decodeClusterFormedEvent = decodeClusterFormedEvent;
@@ -12661,6 +12751,9 @@ exports.serviceMaskToBitIndex = serviceMaskToBitIndex;
12661
12751
  exports.serviceProbeStatusLabel = serviceProbeStatusLabel;
12662
12752
  exports.setDestinationRoot = setDestinationRoot;
12663
12753
  exports.slotArchiveChallengePass = slotArchiveChallengePass;
12754
+ exports.slotClusterCharter = slotClusterCharter;
12755
+ exports.slotClusterCharterDelegator = slotClusterCharterDelegator;
12756
+ exports.slotClusterCharterMembers = slotClusterCharterMembers;
12664
12757
  exports.slotClusterServiceScore = slotClusterServiceScore;
12665
12758
  exports.slotEpochChallengeSeed = slotEpochChallengeSeed;
12666
12759
  exports.slotProbeAuthority = slotProbeAuthority;