@miden-sdk/miden-para 0.10.10 → 0.13.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
@@ -18,13 +18,13 @@ This project uses Yarn 1.22.22. The version is locked in `package.json` and will
18
18
 
19
19
  `@miden-sdk/miden-para` expects these packages to be provided by the consuming app. Install matching versions alongside this package to avoid duplicate copies:
20
20
 
21
- - `@demox-labs/miden-sdk@^0.12.5`
21
+ - `@miden-sdk/miden-sdk@^0.13.0`
22
22
  - `@getpara/web-sdk@2.0.0-alpha.73`
23
23
 
24
24
  Example install:
25
25
 
26
26
  ```bash
27
- yarn add @miden-sdk/miden-para @demox-labs/miden-sdk@^0.12.5 @getpara/web-sdk@2.0.0-alpha.73
27
+ yarn add @miden-sdk/miden-para @miden-sdk/miden-sdk@^0.13.0 @getpara/web-sdk@2.0.0-alpha.73
28
28
  ```
29
29
 
30
30
  When creating a client with `storageMode` set to `private`, supply an `accountSeed`; the initializer will throw if it is missing so that private accounts remain recoverable.
@@ -38,7 +38,7 @@ var import_utils2 = require("@noble/hashes/utils.js");
38
38
  var import_modalClient = require("./modalClient.js");
39
39
  const signCb = (para, wallet, showSigningModal, customSignConfirmStep) => {
40
40
  return async (_, signingInputs) => {
41
- const { SigningInputs } = await import("@demox-labs/miden-sdk");
41
+ const { SigningInputs } = await import("@miden-sdk/miden-sdk");
42
42
  const inputs = SigningInputs.deserialize(signingInputs);
43
43
  let commitment = inputs.toCommitment().toHex().slice(2);
44
44
  const hashed = (0, import_utils2.bytesToHex)((0, import_sha3.keccak_256)((0, import_utils2.hexToBytes)(commitment)));
@@ -64,7 +64,7 @@ const signCb = (para, wallet, showSigningModal, customSignConfirmStep) => {
64
64
  };
65
65
  };
66
66
  async function createAccount(midenClient, publicKey, opts) {
67
- const { AccountBuilder, AccountComponent, AccountStorageMode } = await import("@demox-labs/miden-sdk");
67
+ const { AccountBuilder, AccountComponent, AccountStorageMode } = await import("@miden-sdk/miden-sdk");
68
68
  await midenClient.syncState();
69
69
  let pkc = await (0, import_utils.evmPkToCommitment)(publicKey);
70
70
  const accountBuilder = new AccountBuilder(
@@ -105,7 +105,7 @@ async function createParaMidenClient(para, wallets, opts, showSigningModal = tru
105
105
  const selectedIndex = await (0, import_modalClient.accountSelectionModal)(accountKeys);
106
106
  const wallet = evmWallets[selectedIndex] ?? evmWallets[0];
107
107
  const publicKey = accountKeys[selectedIndex] ?? accountKeys[0];
108
- const { WebClient } = await import("@demox-labs/miden-sdk");
108
+ const { WebClient } = await import("@miden-sdk/miden-sdk");
109
109
  const createClientWithExternalKeystore = WebClient.createClientWithExternalKeystore;
110
110
  if (opts.storageMode === "private" && !opts.accountSeed) {
111
111
  throw new Error("accountSeed is required when using private storage mode");
package/dist/cjs/utils.js CHANGED
@@ -54,7 +54,7 @@ const accountSeedFromStr = (str) => {
54
54
  return buffer;
55
55
  };
56
56
  const evmPkToCommitment = async (uncompressedPublicKey) => {
57
- const { Felt, Rpo256, FeltArray } = await import("@demox-labs/miden-sdk");
57
+ const { Felt, Rpo256, FeltArray } = await import("@miden-sdk/miden-sdk");
58
58
  const withoutPrefix = uncompressedPublicKey.slice(4);
59
59
  const x = withoutPrefix.slice(0, 64);
60
60
  const y = withoutPrefix.slice(64);
@@ -13,7 +13,7 @@ import { bytesToHex, hexToBytes } from "@noble/hashes/utils.js";
13
13
  import { accountSelectionModal, signingModal } from "./modalClient.js";
14
14
  const signCb = (para, wallet, showSigningModal, customSignConfirmStep) => {
15
15
  return async (_, signingInputs) => {
16
- const { SigningInputs } = await import("@demox-labs/miden-sdk");
16
+ const { SigningInputs } = await import("@miden-sdk/miden-sdk");
17
17
  const inputs = SigningInputs.deserialize(signingInputs);
18
18
  let commitment = inputs.toCommitment().toHex().slice(2);
19
19
  const hashed = bytesToHex(keccak256(hexToBytes(commitment)));
@@ -39,7 +39,7 @@ const signCb = (para, wallet, showSigningModal, customSignConfirmStep) => {
39
39
  };
40
40
  };
41
41
  async function createAccount(midenClient, publicKey, opts) {
42
- const { AccountBuilder, AccountComponent, AccountStorageMode } = await import("@demox-labs/miden-sdk");
42
+ const { AccountBuilder, AccountComponent, AccountStorageMode } = await import("@miden-sdk/miden-sdk");
43
43
  await midenClient.syncState();
44
44
  let pkc = await evmPkToCommitment(publicKey);
45
45
  const accountBuilder = new AccountBuilder(
@@ -80,7 +80,7 @@ async function createParaMidenClient(para, wallets, opts, showSigningModal = tru
80
80
  const selectedIndex = await accountSelectionModal(accountKeys);
81
81
  const wallet = evmWallets[selectedIndex] ?? evmWallets[0];
82
82
  const publicKey = accountKeys[selectedIndex] ?? accountKeys[0];
83
- const { WebClient } = await import("@demox-labs/miden-sdk");
83
+ const { WebClient } = await import("@miden-sdk/miden-sdk");
84
84
  const createClientWithExternalKeystore = WebClient.createClientWithExternalKeystore;
85
85
  if (opts.storageMode === "private" && !opts.accountSeed) {
86
86
  throw new Error("accountSeed is required when using private storage mode");
package/dist/esm/utils.js CHANGED
@@ -17,7 +17,7 @@ const accountSeedFromStr = (str) => {
17
17
  return buffer;
18
18
  };
19
19
  const evmPkToCommitment = async (uncompressedPublicKey) => {
20
- const { Felt, Rpo256, FeltArray } = await import("@demox-labs/miden-sdk");
20
+ const { Felt, Rpo256, FeltArray } = await import("@miden-sdk/miden-sdk");
21
21
  const withoutPrefix = uncompressedPublicKey.slice(4);
22
22
  const x = withoutPrefix.slice(0, 64);
23
23
  const y = withoutPrefix.slice(64);
@@ -10,7 +10,7 @@ export interface MidenClientOpts {
10
10
  export type MidenAccountStorageMode = 'public' | 'private' | 'network';
11
11
  export interface MidenAccountOpts {
12
12
  accountSeed?: string;
13
- type: import('@demox-labs/miden-sdk').AccountType;
13
+ type: import('@miden-sdk/miden-sdk').AccountType;
14
14
  storageMode: MidenAccountStorageMode;
15
15
  }
16
16
  export type Opts = MidenClientOpts & MidenAccountOpts;
@@ -15,9 +15,9 @@ export declare const accountSeedFromStr: (str?: string) => Uint8Array<ArrayBuffe
15
15
  * Converts an uncompressed EVM public key into a Miden commitment (RPO hash of tagged X coord).
16
16
  * Assumes input format `0x04${x}${y}` where x and y are 64-char hex strings.
17
17
  */
18
- export declare const evmPkToCommitment: (uncompressedPublicKey: string) => Promise<import("@demox-labs/miden-sdk").Word>;
18
+ export declare const evmPkToCommitment: (uncompressedPublicKey: string) => Promise<import("@miden-sdk/miden-sdk").Word>;
19
19
  /**
20
20
  * Retrieves the uncompressed public key for a Para wallet, falling back to JWT data when absent.
21
21
  */
22
22
  export declare const getUncompressedPublicKeyFromWallet: (para: ParaWeb, wallet: Wallet) => Promise<string>;
23
- export declare const txSummaryToJosn: (txSummary: import("@demox-labs/miden-sdk").TransactionSummary) => TxSummaryJson;
23
+ export declare const txSummaryToJosn: (txSummary: import("@miden-sdk/miden-sdk").TransactionSummary) => TxSummaryJson;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miden-sdk/miden-para",
3
- "version": "0.10.10",
3
+ "version": "0.13.0",
4
4
  "description": "Miden x Para Integration",
5
5
  "packageManager": "yarn@1.22.22",
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "@noble/hashes": "^2.0.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@demox-labs/miden-sdk": "^0.12.5",
21
+ "@miden-sdk/miden-sdk": "^0.13.0",
22
22
  "@getpara/web-sdk": "2.0.0-alpha.73",
23
23
  "@typescript-eslint/parser": "^8.48.0",
24
24
  "esbuild": "^0.24.0",
@@ -31,7 +31,7 @@
31
31
  "typescript": "^5.8.3"
32
32
  },
33
33
  "peerDependencies": {
34
- "@demox-labs/miden-sdk": "^0.12.5",
34
+ "@miden-sdk/miden-sdk": "^0.13.0",
35
35
  "@getpara/web-sdk": "2.0.0-alpha.73"
36
36
  },
37
37
  "exports": {