@waaskey/sdk 0.3.1 → 0.4.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 +3 -1
- package/dist/index.cjs +508 -135
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +538 -119
- package/dist/index.d.ts +538 -119
- package/dist/index.js +505 -136
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +60 -2
- package/dist/node.js +24 -1
- package/dist/node.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -29,6 +29,7 @@ const sessionSecret = await deriveUserSessionSecret();
|
|
|
29
29
|
|
|
30
30
|
const waaskey = new Waaskey({
|
|
31
31
|
apiKey: process.env.WAASKEY_PUBLISHABLE_KEY!,
|
|
32
|
+
baseUrl: process.env.WAASKEY_API_URL!, // required — there is no default
|
|
32
33
|
// Non-custodial: the device runs its half of the ceremony and seals its key share.
|
|
33
34
|
mpc: new WasmMpcCore(loadClientWasm), // dynamic-imports @waaskey/client-wasm
|
|
34
35
|
shareStore: EncryptedShareStore.browser(sessionSecret), // sealed in IndexedDB
|
|
@@ -76,6 +77,7 @@ async function loadClientWasmNode() {
|
|
|
76
77
|
const mpc = new WasmMpcCore(loadClientWasmNode);
|
|
77
78
|
const waaskey = new Waaskey({
|
|
78
79
|
apiKey: process.env.WAASKEY_API_KEY!,
|
|
80
|
+
baseUrl: process.env.WAASKEY_API_URL!,
|
|
79
81
|
mpc,
|
|
80
82
|
shareStore: new EncryptedShareStore(new MemoryKeyValueStore(), process.env.SHARE_SECRET!),
|
|
81
83
|
primePool: new PrimePool(mpc),
|
|
@@ -158,7 +160,7 @@ const { items } = await wallet.signatures({ page: 1, limit: 20 });
|
|
|
158
160
|
|
|
159
161
|
| Method | Description |
|
|
160
162
|
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
161
|
-
| `new Waaskey({ apiKey, mpc, shareStore,
|
|
163
|
+
| `new Waaskey({ apiKey, baseUrl, mpc, shareStore, fetch? })` | Create a client. `mpc` + `shareStore` are required to create wallets. |
|
|
162
164
|
| `waaskey.wallets.create({ chain, label?, threshold?, parties?, custodyKinds?, custodyType? }, options?)` | Create (keygen + sealed share). Optional custody policy (default: non-custodial 2-of-3 `[device, server, user_backup]`). Returns a `Wallet`. |
|
|
163
165
|
| `waaskey.wallets.list(query?, options?)` | List the tenant's wallets, newest first (paginated `WalletData` rows). |
|
|
164
166
|
| `waaskey.wallets.get(id, options?)` | Load an existing wallet. |
|