@waaskey/sdk 0.1.0 → 0.2.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 +106 -17
- package/dist/index.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -559,12 +559,12 @@ declare class WasmMpcCore implements MpcCore {
|
|
|
559
559
|
* lockstep with the `@waaskey/client-wasm` entry in `package.json` and with
|
|
560
560
|
* {@link CLIENT_WASM_SHA384}.
|
|
561
561
|
*
|
|
562
|
-
* **`0.2.
|
|
563
|
-
* ed25519 wallet path drives. It is **published on npm** (`client-wasm-v0.2.
|
|
562
|
+
* **`0.2.x` adds the ed25519 (FROST) exports** (`keygenEddsa` / `signEddsa`, waas-core #110) the SDK's
|
|
563
|
+
* ed25519 wallet path drives. It is **published on npm** (`client-wasm-v0.2.1`) and pinned as the SDK's
|
|
564
564
|
* exact, optional peer dependency in `package.json` — so an app that installs `@waaskey/client-wasm`
|
|
565
565
|
* alongside the SDK runs the real ed25519 create/send path end to end.
|
|
566
566
|
*/
|
|
567
|
-
declare const CLIENT_WASM_VERSION = "0.2.
|
|
567
|
+
declare const CLIENT_WASM_VERSION = "0.2.1";
|
|
568
568
|
/**
|
|
569
569
|
* Verify the integrity of raw wasm bytes against an expected **SHA-384** hash, in
|
|
570
570
|
* Subresource-Integrity (`sha384-<base64>`) form (issue #40).
|
|
@@ -880,6 +880,12 @@ interface WaaskeyOptions {
|
|
|
880
880
|
* `EncryptedShareStore.browser(secret)`). Required to create a wallet.
|
|
881
881
|
*/
|
|
882
882
|
shareStore?: ShareStore;
|
|
883
|
+
/**
|
|
884
|
+
* Optional pool of pre-generated Paillier primes (`new PrimePool(mpc)`). When set,
|
|
885
|
+
* `wallets.prewarm(chain)` fills it off the hot path and `wallets.create` claims from
|
|
886
|
+
* it instead of generating inline — turning minutes of keygen into seconds.
|
|
887
|
+
*/
|
|
888
|
+
primePool?: PrimePool;
|
|
883
889
|
/**
|
|
884
890
|
* Per-chain provider config for client-side balance reads (RPC URL or a custom
|
|
885
891
|
* provider). EVM chains have built-in public-RPC defaults; override them here.
|
|
@@ -2193,6 +2199,13 @@ declare class Wallets {
|
|
|
2193
2199
|
* No-op when no prime pool is configured.
|
|
2194
2200
|
*/
|
|
2195
2201
|
prewarm(chain: CreateWalletParams['chain']): Promise<void>;
|
|
2202
|
+
/**
|
|
2203
|
+
* List the tenant's wallets, newest first (paginated). Returns plain {@link WalletData}
|
|
2204
|
+
* rows — pass an `id` to {@link get} to obtain a signing-capable {@link Wallet}.
|
|
2205
|
+
*/
|
|
2206
|
+
list(query?: PageQuery, options?: {
|
|
2207
|
+
signal?: AbortSignal;
|
|
2208
|
+
}): Promise<Page<WalletData>>;
|
|
2196
2209
|
/** Load an existing wallet by id. */
|
|
2197
2210
|
get(id: string, options?: {
|
|
2198
2211
|
signal?: AbortSignal;
|
package/dist/index.d.ts
CHANGED
|
@@ -559,12 +559,12 @@ declare class WasmMpcCore implements MpcCore {
|
|
|
559
559
|
* lockstep with the `@waaskey/client-wasm` entry in `package.json` and with
|
|
560
560
|
* {@link CLIENT_WASM_SHA384}.
|
|
561
561
|
*
|
|
562
|
-
* **`0.2.
|
|
563
|
-
* ed25519 wallet path drives. It is **published on npm** (`client-wasm-v0.2.
|
|
562
|
+
* **`0.2.x` adds the ed25519 (FROST) exports** (`keygenEddsa` / `signEddsa`, waas-core #110) the SDK's
|
|
563
|
+
* ed25519 wallet path drives. It is **published on npm** (`client-wasm-v0.2.1`) and pinned as the SDK's
|
|
564
564
|
* exact, optional peer dependency in `package.json` — so an app that installs `@waaskey/client-wasm`
|
|
565
565
|
* alongside the SDK runs the real ed25519 create/send path end to end.
|
|
566
566
|
*/
|
|
567
|
-
declare const CLIENT_WASM_VERSION = "0.2.
|
|
567
|
+
declare const CLIENT_WASM_VERSION = "0.2.1";
|
|
568
568
|
/**
|
|
569
569
|
* Verify the integrity of raw wasm bytes against an expected **SHA-384** hash, in
|
|
570
570
|
* Subresource-Integrity (`sha384-<base64>`) form (issue #40).
|
|
@@ -880,6 +880,12 @@ interface WaaskeyOptions {
|
|
|
880
880
|
* `EncryptedShareStore.browser(secret)`). Required to create a wallet.
|
|
881
881
|
*/
|
|
882
882
|
shareStore?: ShareStore;
|
|
883
|
+
/**
|
|
884
|
+
* Optional pool of pre-generated Paillier primes (`new PrimePool(mpc)`). When set,
|
|
885
|
+
* `wallets.prewarm(chain)` fills it off the hot path and `wallets.create` claims from
|
|
886
|
+
* it instead of generating inline — turning minutes of keygen into seconds.
|
|
887
|
+
*/
|
|
888
|
+
primePool?: PrimePool;
|
|
883
889
|
/**
|
|
884
890
|
* Per-chain provider config for client-side balance reads (RPC URL or a custom
|
|
885
891
|
* provider). EVM chains have built-in public-RPC defaults; override them here.
|
|
@@ -2193,6 +2199,13 @@ declare class Wallets {
|
|
|
2193
2199
|
* No-op when no prime pool is configured.
|
|
2194
2200
|
*/
|
|
2195
2201
|
prewarm(chain: CreateWalletParams['chain']): Promise<void>;
|
|
2202
|
+
/**
|
|
2203
|
+
* List the tenant's wallets, newest first (paginated). Returns plain {@link WalletData}
|
|
2204
|
+
* rows — pass an `id` to {@link get} to obtain a signing-capable {@link Wallet}.
|
|
2205
|
+
*/
|
|
2206
|
+
list(query?: PageQuery, options?: {
|
|
2207
|
+
signal?: AbortSignal;
|
|
2208
|
+
}): Promise<Page<WalletData>>;
|
|
2196
2209
|
/** Load an existing wallet by id. */
|
|
2197
2210
|
get(id: string, options?: {
|
|
2198
2211
|
signal?: AbortSignal;
|
package/dist/index.js
CHANGED
|
@@ -1284,6 +1284,17 @@ var Wallets = class {
|
|
|
1284
1284
|
if (curve === "ed25519") return;
|
|
1285
1285
|
await this.deps.primePool?.ensure(curve);
|
|
1286
1286
|
}
|
|
1287
|
+
/**
|
|
1288
|
+
* List the tenant's wallets, newest first (paginated). Returns plain {@link WalletData}
|
|
1289
|
+
* rows — pass an `id` to {@link get} to obtain a signing-capable {@link Wallet}.
|
|
1290
|
+
*/
|
|
1291
|
+
async list(query = {}, options = {}) {
|
|
1292
|
+
const qs = new URLSearchParams();
|
|
1293
|
+
if (query.page !== void 0) qs.set("page", String(query.page));
|
|
1294
|
+
if (query.limit !== void 0) qs.set("limit", String(query.limit));
|
|
1295
|
+
const suffix = qs.toString() ? `?${qs}` : "";
|
|
1296
|
+
return this.http.request("GET", `/v1/wallets${suffix}`, void 0, options.signal);
|
|
1297
|
+
}
|
|
1287
1298
|
/** Load an existing wallet by id. */
|
|
1288
1299
|
async get(id, options = {}) {
|
|
1289
1300
|
const data = await this.http.request("GET", `/v1/wallets/${id}`, void 0, options.signal);
|
|
@@ -1866,7 +1877,7 @@ var Waaskey = class {
|
|
|
1866
1877
|
this.auth = new Auth(http);
|
|
1867
1878
|
this.members = new Members(http);
|
|
1868
1879
|
http.useMemberAccessToken(() => this.members.accessToken);
|
|
1869
|
-
this.wallets = new Wallets(http, { mpc: options.mpc, shareStore: options.shareStore, analytics });
|
|
1880
|
+
this.wallets = new Wallets(http, { mpc: options.mpc, shareStore: options.shareStore, primePool: options.primePool, analytics });
|
|
1870
1881
|
this.recovery = new Recovery(http, { shareStore: options.shareStore, analytics });
|
|
1871
1882
|
this.reshare = new Reshare(http, { mpc: options.mpc, shareStore: options.shareStore, analytics });
|
|
1872
1883
|
this.balances = new Balances(options.chains, options.fetch);
|
|
@@ -2204,7 +2215,7 @@ function decodePublicKey(sharedPublicKeyJson) {
|
|
|
2204
2215
|
|
|
2205
2216
|
// src/mpc/load-wasm.ts
|
|
2206
2217
|
var CLIENT_WASM_PACKAGE = "@waaskey/client-wasm";
|
|
2207
|
-
var CLIENT_WASM_VERSION = "0.2.
|
|
2218
|
+
var CLIENT_WASM_VERSION = "0.2.1";
|
|
2208
2219
|
async function verifyWasmIntegrity(bytes, expectedSha384) {
|
|
2209
2220
|
if (!expectedSha384 || !expectedSha384.startsWith("sha384-")) {
|
|
2210
2221
|
throw new Error("Waaskey: an expected SHA-384 integrity hash (sha384-<base64>) is required to load the wasm MPC core.");
|