@monolythium/core-sdk 0.2.1 → 0.2.2

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,6 +1,6 @@
1
- import { a as MlDsa65Backend } from '../submission-BrsftNSl.cjs';
2
- export { A as ADDRESS_DERIVATION_DOMAIN, D as DKG_AEAD_TAG_LEN, b as DKG_NONCE_LEN, c as DecryptHint, d as ENUM_VARIANT_INDEX_ML_DSA_65, e as EncryptedEnvelope, f as EncryptedSubmission, E as EncryptionKey, g as ML_DSA_65_PUBLIC_KEY_LEN, h as ML_DSA_65_SEED_LEN, i as ML_DSA_65_SIGNATURE_LEN, j as ML_DSA_65_SIGNING_KEY_LEN, k as ML_KEM_768_CIPHERTEXT_LEN, l as ML_KEM_768_ENCAPSULATION_KEY_LEN, m as ML_KEM_768_SHARED_SECRET_LEN, M as MempoolClass, N as NativeEvmTxFields, n as NativeTxExtension, o as NativeTxExtensionDescriptor, p as NativeTxExtensionLike, q as NonceAad, S as STANDARD_ALGO_NUMBER_ML_DSA_65, r as bincodeDecryptHint, s as bincodeEncryptedEnvelope, t as bincodeNonceAad, u as bincodeSignedTransaction, v as buildEncryptedEnvelope, w as buildEncryptedSubmission, x as encodeMlDsa65Opaque, y as encodeTransactionForHash, z as encryptInnerTx, B as fetchEncryptionKey, C as mlDsa65AddressBytes, F as mlDsa65AddressFromPublicKey, G as outerSigDigest, H as submitEncryptedEnvelope } from '../submission-BrsftNSl.cjs';
3
- import '../native-events-BEkkGoak.cjs';
1
+ import { a as MlDsa65Backend } from '../submission-AOqfeSIS.cjs';
2
+ export { A as ADDRESS_DERIVATION_DOMAIN, D as DKG_AEAD_TAG_LEN, b as DKG_NONCE_LEN, c as DecryptHint, d as ENUM_VARIANT_INDEX_ML_DSA_65, e as EncryptedEnvelope, f as EncryptedSubmission, E as EncryptionKey, g as ML_DSA_65_PUBLIC_KEY_LEN, h as ML_DSA_65_SEED_LEN, i as ML_DSA_65_SIGNATURE_LEN, j as ML_DSA_65_SIGNING_KEY_LEN, k as ML_KEM_768_CIPHERTEXT_LEN, l as ML_KEM_768_ENCAPSULATION_KEY_LEN, m as ML_KEM_768_SHARED_SECRET_LEN, M as MempoolClass, N as NativeEvmTxFields, n as NativeTxExtension, o as NativeTxExtensionDescriptor, p as NativeTxExtensionLike, q as NonceAad, S as STANDARD_ALGO_NUMBER_ML_DSA_65, r as bincodeDecryptHint, s as bincodeEncryptedEnvelope, t as bincodeNonceAad, u as bincodeSignedTransaction, v as buildEncryptedEnvelope, w as buildEncryptedSubmission, x as encodeMlDsa65Opaque, y as encodeTransactionForHash, z as encryptInnerTx, B as fetchEncryptionKey, C as mlDsa65AddressBytes, F as mlDsa65AddressFromPublicKey, G as outerSigDigest, H as submitEncryptedEnvelope } from '../submission-AOqfeSIS.cjs';
3
+ import '../native-events-CA0yrnj-.cjs';
4
4
 
5
5
  declare class BincodeWriter {
6
6
  #private;
@@ -1,6 +1,6 @@
1
- import { a as MlDsa65Backend } from '../submission-CelGfDRQ.js';
2
- export { A as ADDRESS_DERIVATION_DOMAIN, D as DKG_AEAD_TAG_LEN, b as DKG_NONCE_LEN, c as DecryptHint, d as ENUM_VARIANT_INDEX_ML_DSA_65, e as EncryptedEnvelope, f as EncryptedSubmission, E as EncryptionKey, g as ML_DSA_65_PUBLIC_KEY_LEN, h as ML_DSA_65_SEED_LEN, i as ML_DSA_65_SIGNATURE_LEN, j as ML_DSA_65_SIGNING_KEY_LEN, k as ML_KEM_768_CIPHERTEXT_LEN, l as ML_KEM_768_ENCAPSULATION_KEY_LEN, m as ML_KEM_768_SHARED_SECRET_LEN, M as MempoolClass, N as NativeEvmTxFields, n as NativeTxExtension, o as NativeTxExtensionDescriptor, p as NativeTxExtensionLike, q as NonceAad, S as STANDARD_ALGO_NUMBER_ML_DSA_65, r as bincodeDecryptHint, s as bincodeEncryptedEnvelope, t as bincodeNonceAad, u as bincodeSignedTransaction, v as buildEncryptedEnvelope, w as buildEncryptedSubmission, x as encodeMlDsa65Opaque, y as encodeTransactionForHash, z as encryptInnerTx, B as fetchEncryptionKey, C as mlDsa65AddressBytes, F as mlDsa65AddressFromPublicKey, G as outerSigDigest, H as submitEncryptedEnvelope } from '../submission-CelGfDRQ.js';
3
- import '../native-events-BEkkGoak.js';
1
+ import { a as MlDsa65Backend } from '../submission-msoZzFIa.js';
2
+ export { A as ADDRESS_DERIVATION_DOMAIN, D as DKG_AEAD_TAG_LEN, b as DKG_NONCE_LEN, c as DecryptHint, d as ENUM_VARIANT_INDEX_ML_DSA_65, e as EncryptedEnvelope, f as EncryptedSubmission, E as EncryptionKey, g as ML_DSA_65_PUBLIC_KEY_LEN, h as ML_DSA_65_SEED_LEN, i as ML_DSA_65_SIGNATURE_LEN, j as ML_DSA_65_SIGNING_KEY_LEN, k as ML_KEM_768_CIPHERTEXT_LEN, l as ML_KEM_768_ENCAPSULATION_KEY_LEN, m as ML_KEM_768_SHARED_SECRET_LEN, M as MempoolClass, N as NativeEvmTxFields, n as NativeTxExtension, o as NativeTxExtensionDescriptor, p as NativeTxExtensionLike, q as NonceAad, S as STANDARD_ALGO_NUMBER_ML_DSA_65, r as bincodeDecryptHint, s as bincodeEncryptedEnvelope, t as bincodeNonceAad, u as bincodeSignedTransaction, v as buildEncryptedEnvelope, w as buildEncryptedSubmission, x as encodeMlDsa65Opaque, y as encodeTransactionForHash, z as encryptInnerTx, B as fetchEncryptionKey, C as mlDsa65AddressBytes, F as mlDsa65AddressFromPublicKey, G as outerSigDigest, H as submitEncryptedEnvelope } from '../submission-msoZzFIa.js';
3
+ import '../native-events-CA0yrnj-.js';
4
4
 
5
5
  declare class BincodeWriter {
6
6
  #private;
@@ -752,7 +752,7 @@ var RpcClient = class _RpcClient {
752
752
  async web3Sha3(data) {
753
753
  return this.call("web3_sha3", [data]);
754
754
  }
755
- // ---- lyth_* (Law §13.2 native namespace) --------------------------
755
+ // ---- lyth_* native namespace --------------------------------------
756
756
  /** `lyth_listProviders` — paged registry enumeration. */
757
757
  async lythListProviders(capabilityMask, cursor = null, limit = 100) {
758
758
  return this.call("lyth_listProviders", [capabilityMask, cursor, limit]);
@@ -984,14 +984,26 @@ var RpcClient = class _RpcClient {
984
984
  async lythCurrentRound() {
985
985
  return normalizeRoundInfo(await this.call("lyth_currentRound", []));
986
986
  }
987
+ /** `lyth_getTransactionCount` — native sender nonce. */
988
+ async lythGetTransactionCount(address) {
989
+ return parseRpcBigint(
990
+ await this.call("lyth_getTransactionCount", [
991
+ sdkTypedAddress(address, "user", "address")
992
+ ]),
993
+ "lyth_getTransactionCount"
994
+ );
995
+ }
996
+ /** `lyth_executionUnitPrice` — native execution-unit price in lythoshi. */
997
+ async lythExecutionUnitPrice() {
998
+ return normalizeExecutionUnitPriceResponse(
999
+ await this.call("lyth_executionUnitPrice", [])
1000
+ );
1001
+ }
987
1002
  /** `lyth_peerSummary` — public-safe aggregate peer-network diagnostics. */
988
1003
  async lythPeerSummary() {
989
1004
  return this.call("lyth_peerSummary", []);
990
1005
  }
991
- /**
992
- * `lyth_listActivePrecompiles` — milestone-gated precompile catalogue
993
- * (OI-0170 / ADR-0015 §5).
994
- */
1006
+ /** `lyth_listActivePrecompiles` — native precompile catalogue. */
995
1007
  async lythListActivePrecompiles(block = "latest") {
996
1008
  return this.call("lyth_listActivePrecompiles", [encodeBlockSelector(block)]);
997
1009
  }
@@ -1909,6 +1921,34 @@ function normalizeRoundInfo(value) {
1909
1921
  height: parseRpcBigint(row["height"], "round height")
1910
1922
  };
1911
1923
  }
1924
+ function normalizeExecutionUnitPriceResponse(value) {
1925
+ if (!value || typeof value !== "object") {
1926
+ throw SdkError.malformed("execution unit price response must be an object");
1927
+ }
1928
+ const row = value;
1929
+ return {
1930
+ executionUnitPriceLythoshi: parseRpcBigint(
1931
+ fieldAlias(row, ["executionUnitPriceLythoshi", "execution_unit_price_lythoshi"]),
1932
+ "executionUnitPriceLythoshi"
1933
+ ).toString(),
1934
+ basePricePerExecutionUnitLythoshi: parseRpcBigint(
1935
+ fieldAlias(row, [
1936
+ "basePricePerExecutionUnitLythoshi",
1937
+ "base_price_per_execution_unit_lythoshi"
1938
+ ]),
1939
+ "basePricePerExecutionUnitLythoshi"
1940
+ ).toString(),
1941
+ priorityTipLythoshi: parseRpcBigint(
1942
+ fieldAlias(row, ["priorityTipLythoshi", "priority_tip_lythoshi"]),
1943
+ "priorityTipLythoshi"
1944
+ ).toString(),
1945
+ blockNumber: parseRpcNumberNullable(
1946
+ fieldAlias(row, ["blockNumber", "block_number"]),
1947
+ "blockNumber"
1948
+ ),
1949
+ source: readStringField(row, ["source"], "execution unit price source")
1950
+ };
1951
+ }
1912
1952
  function normalizeMempoolSnapshot(value) {
1913
1953
  if (!value || typeof value !== "object") {
1914
1954
  throw SdkError.malformed("mempool snapshot must be an object");
@@ -1925,6 +1965,19 @@ function normalizeMempoolSnapshot(value) {
1925
1965
  bytes_by_class: bytesByClass.map((v, i) => parseRpcBigint(v, `mempool bytes_by_class[${i}]`))
1926
1966
  };
1927
1967
  }
1968
+ function fieldAlias(record, keys) {
1969
+ for (const key of keys) {
1970
+ if (Object.prototype.hasOwnProperty.call(record, key)) return record[key];
1971
+ }
1972
+ return void 0;
1973
+ }
1974
+ function readStringField(record, keys, label) {
1975
+ const value = fieldAlias(record, keys);
1976
+ if (typeof value !== "string" || value.trim().length === 0) {
1977
+ throw SdkError.malformed(`${label} must be a non-empty string`);
1978
+ }
1979
+ return value.trim();
1980
+ }
1928
1981
  function normalizeCapabilitiesResponse(value) {
1929
1982
  return {
1930
1983
  ...value,