@monolythium/core-sdk 0.2.2 → 0.3.1

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/README.md CHANGED
@@ -240,32 +240,18 @@ const backend = pqm1MnemonicToMlDsa65Backend(mnemonic);
240
240
  const signature = backend.sign(new Uint8Array([1, 2, 3]));
241
241
  ```
242
242
 
243
- ### Legacy ethers.js v6 compat
244
-
245
- The package still ships an ethers v6 compat shim for legacy migration tooling:
246
- a `MonolythiumProvider` and `MonolythiumSigner` that drop in wherever ethers'
247
- `Provider` and `Signer` are expected. It is not the v4.1 no-EVM deployment path;
248
- new app work should use the MRV/RISC-V builders and `lyth_*` read surfaces.
249
- `ethers` is a peer dependency for this compatibility path.
250
-
251
- ```ts
252
- import { Wallet } from "ethers";
253
- import {
254
- MonolythiumProvider,
255
- MonolythiumSigner,
256
- } from "@monolythium/core-sdk/ethers";
257
-
258
- const provider = new MonolythiumProvider("https://rpc.testnet.monolythium.com");
259
- const wallet = new Wallet(process.env.PRIVATE_KEY!);
260
- const signer = MonolythiumSigner.fromEthersWallet(wallet, provider);
261
-
262
- // Legacy-only adapter setup. Do not use this path for new v4.1 MRV deployments.
263
- console.log(await signer.getAddress());
264
- ```
265
-
266
- For non-secp256k1 signing sources (OS keychain, hardware wallet, future
267
- ML-DSA-65 backends), implement `MonolythiumSignerBackend` and pass it to
268
- `new MonolythiumSigner(backend, provider)`.
243
+ ### ethers / viem compatibility
244
+
245
+ The SDK does not ship an ethers-style provider or signer. The chain
246
+ does not accept Ethereum-style ECDSA signatures at transaction
247
+ admission, and there is no `eth_call` / `eth_estimateGas` /
248
+ `eth_sendRawTransaction` on the dispatcher to translate to. Tooling
249
+ that wants to read EVM-shaped block, balance, receipt, or log fields
250
+ can keep using the curated `eth_*` read methods exposed by `RpcClient`
251
+ directly (`ethBlockNumber`, `ethGetBalance`, `ethGetBlockByNumber`,
252
+ `ethGetTransactionReceipt`, `ethGetLogs`, …). Submitting and signing
253
+ transactions go through the native builders (`mesh_buildUnsignedTx` +
254
+ ML-DSA-65 signer + `mesh_submitTx`, or `lyth_submitEncrypted`).
269
255
 
270
256
  ## Development
271
257
 
@@ -1,6 +1,5 @@
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';
1
+ import { H as MlDsa65Backend } from '../submission-D8xzCLNl.cjs';
2
+ export { ej as ADDRESS_DERIVATION_DOMAIN, ek as DKG_AEAD_TAG_LEN, el as DKG_NONCE_LEN, em as DecryptHint, en as ENUM_VARIANT_INDEX_ML_DSA_65, eo as EncryptedEnvelope, ep as EncryptedSubmission, E as EncryptionKey, eq as ML_DSA_65_PUBLIC_KEY_LEN, er as ML_DSA_65_SEED_LEN, es as ML_DSA_65_SIGNATURE_LEN, et as ML_DSA_65_SIGNING_KEY_LEN, eu as ML_KEM_768_CIPHERTEXT_LEN, ev as ML_KEM_768_ENCAPSULATION_KEY_LEN, ew as ML_KEM_768_SHARED_SECRET_LEN, F as MempoolClass, D as NativeEvmTxFields, ex as NativeTxExtension, ey as NativeTxExtensionDescriptor, ez as NativeTxExtensionLike, eA as NonceAad, eB as STANDARD_ALGO_NUMBER_ML_DSA_65, eC as bincodeDecryptHint, eD as bincodeEncryptedEnvelope, eE as bincodeNonceAad, eF as bincodeSignedTransaction, eG as buildEncryptedEnvelope, eH as buildEncryptedSubmission, eI as encodeMlDsa65Opaque, eJ as encodeTransactionForHash, eK as encryptInnerTx, eL as fetchEncryptionKey, eM as mlDsa65AddressBytes, eN as mlDsa65AddressFromPublicKey, eO as outerSigDigest, eP as submitEncryptedEnvelope } from '../submission-D8xzCLNl.cjs';
4
3
 
5
4
  declare class BincodeWriter {
6
5
  #private;
@@ -1,6 +1,5 @@
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';
1
+ import { H as MlDsa65Backend } from '../submission-D8xzCLNl.js';
2
+ export { ej as ADDRESS_DERIVATION_DOMAIN, ek as DKG_AEAD_TAG_LEN, el as DKG_NONCE_LEN, em as DecryptHint, en as ENUM_VARIANT_INDEX_ML_DSA_65, eo as EncryptedEnvelope, ep as EncryptedSubmission, E as EncryptionKey, eq as ML_DSA_65_PUBLIC_KEY_LEN, er as ML_DSA_65_SEED_LEN, es as ML_DSA_65_SIGNATURE_LEN, et as ML_DSA_65_SIGNING_KEY_LEN, eu as ML_KEM_768_CIPHERTEXT_LEN, ev as ML_KEM_768_ENCAPSULATION_KEY_LEN, ew as ML_KEM_768_SHARED_SECRET_LEN, F as MempoolClass, D as NativeEvmTxFields, ex as NativeTxExtension, ey as NativeTxExtensionDescriptor, ez as NativeTxExtensionLike, eA as NonceAad, eB as STANDARD_ALGO_NUMBER_ML_DSA_65, eC as bincodeDecryptHint, eD as bincodeEncryptedEnvelope, eE as bincodeNonceAad, eF as bincodeSignedTransaction, eG as buildEncryptedEnvelope, eH as buildEncryptedSubmission, eI as encodeMlDsa65Opaque, eJ as encodeTransactionForHash, eK as encryptInnerTx, eL as fetchEncryptionKey, eM as mlDsa65AddressBytes, eN as mlDsa65AddressFromPublicKey, eO as outerSigDigest, eP as submitEncryptedEnvelope } from '../submission-D8xzCLNl.js';
4
3
 
5
4
  declare class BincodeWriter {
6
5
  #private;
package/dist/index.cjs CHANGED
@@ -2333,23 +2333,9 @@ var RpcClient = class _RpcClient {
2333
2333
  async ethGetTransactionReceipt(txHash) {
2334
2334
  return normalizeTransactionReceipt(await this.call("eth_getTransactionReceipt", [txHash]));
2335
2335
  }
2336
- /** `eth_sendRawTransaction` — submit a signed raw tx. */
2337
- async ethSendRawTransaction(rawTx) {
2338
- return this.call("eth_sendRawTransaction", [rawTx]);
2339
- }
2340
- /** `eth_call` — dry-run a transaction. */
2341
- async ethCall(request, block = "latest") {
2342
- return this.call("eth_call", [request, encodeBlockSelector(block)]);
2343
- }
2344
- /** `eth_estimateGas` — gas estimate for a dry-run. */
2345
- async ethEstimateGas(request, block = "latest") {
2346
- return parseQuantityBig(
2347
- await this.call("eth_estimateGas", [request, encodeBlockSelector(block)])
2348
- );
2349
- }
2350
2336
  /**
2351
- * `eth_gasPrice` — legacy compatibility fee quote for ethers/viem shims.
2352
- * Native v4.1 surfaces should use execution-unit and lythoshi fee fields.
2337
+ * `eth_gasPrice` — passive compatibility fee quote for EVM-shaped read
2338
+ * tooling. Native callers should prefer `lythExecutionUnitPrice`.
2353
2339
  */
2354
2340
  async ethGasPrice() {
2355
2341
  return parseQuantityBig(await this.call("eth_gasPrice", []));
@@ -2867,14 +2853,6 @@ var RpcClient = class _RpcClient {
2867
2853
  async debugTraceTransaction(txHash) {
2868
2854
  return this.call("debug_traceTransaction", [txHash]);
2869
2855
  }
2870
- /** `debug_traceCall` — legacy compatibility trace for a dry-run. */
2871
- async debugTraceCall(request, block = "latest") {
2872
- return this.call("debug_traceCall", [request, encodeBlockSelector(block)]);
2873
- }
2874
- /** `debug_traceBlockByNumber` — legacy compatibility traces for an entire block. */
2875
- async debugTraceBlockByNumber(block) {
2876
- return this.call("debug_traceBlockByNumber", [encodeBlockSelector(block)]);
2877
- }
2878
2856
  /** `debug_mempoolDump` — full mempool snapshot. */
2879
2857
  async debugMempoolDump() {
2880
2858
  return normalizeMempoolSnapshot(await this.call("debug_mempoolDump", []));
@@ -7997,9 +7975,15 @@ function normalizeNativeAgentAddressString(address, expectedKind, name) {
7997
7975
  }
7998
7976
  }
7999
7977
 
8000
- // src/ethers/network.ts
7978
+ // src/network.ts
8001
7979
  var MONOLYTHIUM_TESTNET_CHAIN_ID = 69420n;
8002
7980
  var MONOLYTHIUM_TESTNET_NETWORK_NAME = "monolythium-testnet";
7981
+ var MONOLYTHIUM_NETWORKS = {
7982
+ testnet: {
7983
+ chainId: MONOLYTHIUM_TESTNET_CHAIN_ID,
7984
+ name: MONOLYTHIUM_TESTNET_NETWORK_NAME
7985
+ }
7986
+ };
8003
7987
 
8004
7988
  // src/index.ts
8005
7989
  var version = "0.2.2";
@@ -8030,6 +8014,7 @@ exports.MAX_NATIVE_CALL_FORWARDER_REQUEST_BYTES = MAX_NATIVE_CALL_FORWARDER_REQU
8030
8014
  exports.MAX_NATIVE_RECEIPT_EVENTS = MAX_NATIVE_RECEIPT_EVENTS;
8031
8015
  exports.ML_DSA_65_PUBLIC_KEY_LEN = ML_DSA_65_PUBLIC_KEY_LEN2;
8032
8016
  exports.ML_DSA_65_SIGNATURE_LEN = ML_DSA_65_SIGNATURE_LEN2;
8017
+ exports.MONOLYTHIUM_NETWORKS = MONOLYTHIUM_NETWORKS;
8033
8018
  exports.MONOLYTHIUM_TESTNET_CHAIN_ID = MONOLYTHIUM_TESTNET_CHAIN_ID;
8034
8019
  exports.MONOLYTHIUM_TESTNET_NETWORK_NAME = MONOLYTHIUM_TESTNET_NETWORK_NAME;
8035
8020
  exports.MRV_DEPLOY_PAYLOAD_VERSION = MRV_DEPLOY_PAYLOAD_VERSION;