@cubist-labs/cubesigner-sdk 0.3.28 → 0.3.29
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 +1 -6
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/src/api.d.ts +2 -1
- package/dist/cjs/src/api.js +4 -2
- package/dist/cjs/src/client.d.ts +16 -11
- package/dist/cjs/src/client.js +4 -3
- package/dist/cjs/src/key.d.ts +3 -0
- package/dist/cjs/src/key.js +10 -1
- package/dist/cjs/src/org.d.ts +3 -3
- package/dist/cjs/src/schema.d.ts +970 -46
- package/dist/cjs/src/schema.js +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/src/api.d.ts +2 -1
- package/dist/esm/src/api.js +4 -2
- package/dist/esm/src/client.d.ts +16 -11
- package/dist/esm/src/client.js +4 -3
- package/dist/esm/src/key.d.ts +3 -0
- package/dist/esm/src/key.js +10 -1
- package/dist/esm/src/org.d.ts +3 -3
- package/dist/esm/src/schema.d.ts +970 -46
- package/dist/esm/src/schema.js +1 -1
- package/package.json +1 -1
- package/src/api.ts +7 -1
- package/src/client.ts +3 -2
- package/src/key.ts +9 -0
- package/src/schema.ts +1008 -44
- package/dist/cjs/src/org_event_processor.d.ts +0 -57
- package/dist/cjs/src/org_event_processor.js +0 -137
- package/dist/esm/src/org_event_processor.d.ts +0 -57
- package/dist/esm/src/org_event_processor.js +0 -133
- package/dist/package.json +0 -36
- package/dist/spec/env/beta.json +0 -9
- package/dist/spec/env/gamma.json +0 -9
- package/dist/spec/env/prod.json +0 -9
- package/dist/src/api.d.ts +0 -634
- package/dist/src/api.js +0 -1309
- package/dist/src/client.d.ts +0 -575
- package/dist/src/client.js +0 -381
- package/dist/src/env.d.ts +0 -15
- package/dist/src/env.js +0 -35
- package/dist/src/error.d.ts +0 -29
- package/dist/src/error.js +0 -36
- package/dist/src/events.d.ts +0 -84
- package/dist/src/events.js +0 -195
- package/dist/src/index.d.ts +0 -207
- package/dist/src/index.js +0 -308
- package/dist/src/key.d.ts +0 -152
- package/dist/src/key.js +0 -242
- package/dist/src/mfa.d.ts +0 -94
- package/dist/src/mfa.js +0 -169
- package/dist/src/org.d.ts +0 -99
- package/dist/src/org.js +0 -95
- package/dist/src/paginator.d.ts +0 -76
- package/dist/src/paginator.js +0 -99
- package/dist/src/response.d.ts +0 -101
- package/dist/src/response.js +0 -164
- package/dist/src/role.d.ts +0 -283
- package/dist/src/role.js +0 -253
- package/dist/src/schema.d.ts +0 -6209
- package/dist/src/schema.js +0 -7
- package/dist/src/schema_types.d.ts +0 -113
- package/dist/src/schema_types.js +0 -3
- package/dist/src/session/session_storage.d.ts +0 -47
- package/dist/src/session/session_storage.js +0 -76
- package/dist/src/session/signer_session_manager.d.ts +0 -125
- package/dist/src/session/signer_session_manager.js +0 -239
- package/dist/src/signer_session.d.ts +0 -41
- package/dist/src/signer_session.js +0 -77
- package/dist/src/user_export.d.ts +0 -52
- package/dist/src/user_export.js +0 -129
- package/dist/src/util.d.ts +0 -61
- package/dist/src/util.js +0 -97
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -769,9 +769,14 @@ export class CubeSignerApi {
|
|
|
769
769
|
* List all keys in the org.
|
|
770
770
|
* @param {KeyType?} type Optional key type to filter list for.
|
|
771
771
|
* @param {PageOpts?} page Pagination options. Defaults to fetching the entire result set.
|
|
772
|
+
* @param {string?} owner Optional key owner to filter list for.
|
|
772
773
|
* @return {Paginator<ListKeysResponse, KeyInfoApi>} Paginator for iterating over keys.
|
|
773
774
|
*/
|
|
774
|
-
keysList(
|
|
775
|
+
keysList(
|
|
776
|
+
type?: KeyType,
|
|
777
|
+
page?: PageOpts,
|
|
778
|
+
owner?: string,
|
|
779
|
+
): Paginator<ListKeysResponse, KeyInfoApi> {
|
|
775
780
|
const listFn = async (query: PageQueryArgs) => {
|
|
776
781
|
const client = await this.client("listKeysInOrg");
|
|
777
782
|
return await client.get("/v0/org/{org_id}/keys", {
|
|
@@ -779,6 +784,7 @@ export class CubeSignerApi {
|
|
|
779
784
|
path: { org_id: this.orgId },
|
|
780
785
|
query: {
|
|
781
786
|
key_type: type,
|
|
787
|
+
key_owner: owner,
|
|
782
788
|
...query,
|
|
783
789
|
},
|
|
784
790
|
},
|
package/src/client.ts
CHANGED
|
@@ -235,10 +235,11 @@ export class CubeSignerClient extends CubeSignerApi {
|
|
|
235
235
|
*
|
|
236
236
|
* @param {KeyType?} type Optional key type to filter list for.
|
|
237
237
|
* @param {PageOpts} page Pagination options. Defaults to fetching the entire result set.
|
|
238
|
+
* @param {string?} owner Optional key owner to filter list for.
|
|
238
239
|
* @return {Promise<Key[]>} The keys.
|
|
239
240
|
*/
|
|
240
|
-
async orgKeys(type?: KeyType, page?: PageOpts): Promise<Key[]> {
|
|
241
|
-
const paginator = this.keysList(type, page);
|
|
241
|
+
async orgKeys(type?: KeyType, page?: PageOpts, owner?: string): Promise<Key[]> {
|
|
242
|
+
const paginator = this.keysList(type, page, owner);
|
|
242
243
|
const keys = await paginator.fetch();
|
|
243
244
|
return keys.map((k) => new Key(this, k));
|
|
244
245
|
}
|
package/src/key.ts
CHANGED
|
@@ -15,6 +15,9 @@ export enum Secp256k1 {
|
|
|
15
15
|
Evm = "SecpEthAddr", // eslint-disable-line no-unused-vars
|
|
16
16
|
Btc = "SecpBtc", // eslint-disable-line no-unused-vars
|
|
17
17
|
BtcTest = "SecpBtcTest", // eslint-disable-line no-unused-vars
|
|
18
|
+
Taproot = "TaprootBtc",
|
|
19
|
+
TaprootTest = "TaprootBtcTest",
|
|
20
|
+
BabylonEots = "BabylonEots",
|
|
18
21
|
Ava = "SecpAvaAddr", // eslint-disable-line no-unused-vars
|
|
19
22
|
AvaTest = "SecpAvaTestAddr", // eslint-disable-line no-unused-vars
|
|
20
23
|
}
|
|
@@ -354,6 +357,12 @@ export function fromSchemaKeyType(ty: SchemaKeyType): KeyType {
|
|
|
354
357
|
return Secp256k1.Ava;
|
|
355
358
|
case "SecpAvaTestAddr":
|
|
356
359
|
return Secp256k1.AvaTest;
|
|
360
|
+
case "BabylonEots":
|
|
361
|
+
return Secp256k1.BabylonEots;
|
|
362
|
+
case "TaprootBtc":
|
|
363
|
+
return Secp256k1.Taproot;
|
|
364
|
+
case "TaprootBtcTest":
|
|
365
|
+
return Secp256k1.TaprootTest;
|
|
357
366
|
case "BlsPub":
|
|
358
367
|
return Bls.Eth2Deposited;
|
|
359
368
|
case "BlsInactive":
|