@monolythium/core-sdk 0.2.2 → 0.3.0
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 +12 -26
- package/dist/crypto/index.d.cts +2 -3
- package/dist/crypto/index.d.ts +2 -3
- package/dist/index.cjs +10 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -5
- package/dist/index.d.ts +69 -5
- package/dist/index.js +10 -26
- package/dist/index.js.map +1 -1
- package/dist/{native-events-CA0yrnj-.d.cts → submission-D8xzCLNl.d.cts} +131 -51
- package/dist/{native-events-CA0yrnj-.d.ts → submission-D8xzCLNl.d.ts} +131 -51
- package/package.json +2 -16
- package/dist/ethers/index.cjs +0 -2169
- package/dist/ethers/index.cjs.map +0 -1
- package/dist/ethers/index.d.cts +0 -300
- package/dist/ethers/index.d.ts +0 -300
- package/dist/ethers/index.js +0 -2160
- package/dist/ethers/index.js.map +0 -1
- package/dist/network-BK2u9br2.d.cts +0 -31
- package/dist/network-BK2u9br2.d.ts +0 -31
- package/dist/submission-AOqfeSIS.d.cts +0 -131
- package/dist/submission-msoZzFIa.d.ts +0 -131
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
|
-
###
|
|
244
|
-
|
|
245
|
-
The
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
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
|
|
package/dist/crypto/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
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;
|
package/dist/crypto/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
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` —
|
|
2352
|
-
* Native
|
|
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/
|
|
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;
|