@qorechain/sdk 0.5.1 → 0.6.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 CHANGED
@@ -8,7 +8,7 @@ network — a quantum-safe, triple-VM Layer 1 with native, EVM, and SVM accounts
8
8
  - **Full message coverage** — typed composers for every chain message (bank,
9
9
  staking, distribution, gov, authz, feegrant, IBC, and the QoreChain custom
10
10
  modules), resolved through a message registry.
11
- - **Browser wallets** — Keplr/Leap (Cosmos); MetaMask/EIP-1193 and
11
+ - **Browser wallets** — Keplr/Leap (Native); MetaMask/EIP-1193 and
12
12
  Phantom/Wallet-Standard via the `@qorechain/evm` and `@qorechain/svm` adapters.
13
13
  - **Auto-gas** — simulation-based fee estimation, with EVM EIP-1559 and SVM
14
14
  compute-budget helpers in the adapters.
@@ -49,7 +49,7 @@ const client = createClient(); // testnet, localhost defaults
49
49
 
50
50
  const remote = createClient({
51
51
  endpoints: {
52
- rest: "https://api-testnet.qore.host", // Cosmos REST (LCD)
52
+ rest: "https://api-testnet.qore.host", // Native REST (LCD)
53
53
  rpc: "https://rpc-testnet.qore.host", // consensus RPC (for signing)
54
54
  evmRpc: "https://evm-testnet.qore.host", // EVM + qor_ JSON-RPC
55
55
  },
@@ -206,6 +206,10 @@ const rollups = await query.rdk.rollups({});
206
206
  const bridgeChains = await query.bridge.chainConfigs({});
207
207
  ```
208
208
 
209
+ New in chain v3.1.83: `amm`, `license`, and `abstractaccount` typed query clients;
210
+ the `multilayer` `anchor` / `anchors` state-anchor queries; and abstractaccount
211
+ `registerAuthenticator` / `revokeAuthenticator` message composers.
212
+
209
213
  See the [multilayer](../../docs/docs/guides/multilayer.md) and
210
214
  [rollups](../../docs/docs/guides/rollups.md) guides.
211
215
 
@@ -313,6 +317,53 @@ await migratePqcKey({ tx, /* new key material … */ });
313
317
 
314
318
  See the [quantum-safe](../../docs/docs/guides/quantum-safe.md) guide.
315
319
 
320
+ ### Unified eth-native wallet (v0.6.0)
321
+
322
+ One `eth_secp256k1` key = ONE 20-byte identity rendered three ways — `qor1…`
323
+ (bech32), `0x…` (EIP-55), and SVM base58 (the 20 bytes right-padded with 12 zero
324
+ bytes to 32). A deposit to any of the three lands in the **same** balance, and the
325
+ key spends on **all** lanes. `deriveUnifiedAccount` uses the Ethereum HD path
326
+ (`m/44'/60'/0'/0/{index}`); `unifiedAccountFromSeed` builds one directly from a
327
+ 32-byte secret. `addressesFrom20` / `qoreAddresses` convert between the three
328
+ encodings. The legacy coin-type-118 `deriveNativeAccount` still works (additive).
329
+
330
+ Native-lane signing over the eth key: `signClassicalEth` is a classical secp256k1
331
+ signature over `keccak256(SignDoc)` with pubkey type
332
+ `/cosmos.evm.crypto.v1.ethsecp256k1.PubKey`; `signHybridEth` adds the ML-DSA-87
333
+ post-quantum signature. The account parser (`parseEthPubkeyAny`) reads
334
+ account number / sequence from an eth_secp256k1 on-chain pubkey.
335
+
336
+ ```ts
337
+ import {
338
+ deriveUnifiedAccount,
339
+ unifiedAccountFromPhantomSignature,
340
+ signHybridEth,
341
+ } from "@qorechain/sdk";
342
+
343
+ const account = await deriveUnifiedAccount(mnemonic);
344
+ account.cosmos; // "qor1…" — QoreChain Native lane
345
+ account.evm; // "0x…" — EIP-55 checksummed
346
+ account.svm; // "<base58>" — 20 bytes + 12 zero pad
347
+
348
+ // Sign a QoreChain Native tx from the unified eth key (hybrid PQC path).
349
+ const signed = signHybridEth({
350
+ signingKey: { privateKey: account.privateKey, publicKey: account.publicKey },
351
+ pqc: account.pqc,
352
+ messages: [msg.cosmos.send(/* … */)],
353
+ chainId: "qorechain-vladi",
354
+ accountNumber,
355
+ sequence,
356
+ fee,
357
+ });
358
+
359
+ // Phantom P1a: derive a canonical, non-custodial unified account from a
360
+ // deterministic Phantom signature (shake256(signature, 32)).
361
+ const fromPhantom = unifiedAccountFromPhantomSignature(phantomSignature);
362
+ // or connectPhantomUnified(provider) to run the connect → sign → derive flow.
363
+ ```
364
+
365
+ See the [unified-wallet](../../docs/docs/guides/unified-wallet.md) guide.
366
+
316
367
  ### Cross-VM message reads
317
368
 
318
369
  You can also read cross-VM message state without the client above: