@cubist-labs/cubesigner-sdk 0.4.250 → 0.4.254
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/dist/package.json +1 -1
- package/dist/spec/env/beta.json +6 -3
- package/dist/spec/env/gamma.json +4 -2
- package/dist/spec/env/prod.json +2 -1
- package/dist/src/audit_log.d.ts +5 -5
- package/dist/src/client/api_client.d.ts +24 -1
- package/dist/src/client/api_client.d.ts.map +1 -1
- package/dist/src/client/api_client.js +43 -2
- package/dist/src/env.d.ts +1 -0
- package/dist/src/env.d.ts.map +1 -1
- package/dist/src/env.js +1 -1
- package/dist/src/key.d.ts +6 -3
- package/dist/src/key.d.ts.map +1 -1
- package/dist/src/key.js +4 -1
- package/dist/src/schema.d.ts +443 -69
- package/dist/src/schema.d.ts.map +1 -1
- package/dist/src/schema.js +1 -1
- package/dist/src/schema_types.d.ts +4 -0
- package/dist/src/schema_types.d.ts.map +1 -1
- package/dist/src/schema_types.js +2 -1
- package/dist/src/scopes.d.ts +8 -0
- package/dist/src/scopes.d.ts.map +1 -1
- package/dist/src/scopes.js +11 -1
- package/package.json +1 -1
- package/src/client/api_client.ts +56 -1
- package/src/env.ts +1 -0
- package/src/key.ts +7 -1
- package/src/schema.ts +484 -68
- package/src/schema_types.ts +5 -0
- package/src/scopes.ts +10 -0
package/src/client/api_client.ts
CHANGED
|
@@ -145,6 +145,8 @@ import {
|
|
|
145
145
|
type RolePolicy,
|
|
146
146
|
type InvokePolicyResponse,
|
|
147
147
|
type InvokePolicyRequest,
|
|
148
|
+
type PolicySecretsInfo,
|
|
149
|
+
type SetPolicySecretRequest,
|
|
148
150
|
type UploadWasmPolicyRequest,
|
|
149
151
|
type UploadWasmPolicyResponse,
|
|
150
152
|
type LoginRequest,
|
|
@@ -1538,7 +1540,7 @@ export class ApiClient extends BaseClient {
|
|
|
1538
1540
|
|
|
1539
1541
|
// #endregion
|
|
1540
1542
|
|
|
1541
|
-
// #region POLICY: policy(Create|Get|List|Update|Delete|Invoke|
|
|
1543
|
+
// #region POLICY: policy(Create|Get|List|Update|Delete|Invoke), policySecret(Set|Delete), policySecretsGet
|
|
1542
1544
|
|
|
1543
1545
|
/**
|
|
1544
1546
|
* Create a new named policy.
|
|
@@ -1663,6 +1665,59 @@ export class ApiClient extends BaseClient {
|
|
|
1663
1665
|
});
|
|
1664
1666
|
}
|
|
1665
1667
|
|
|
1668
|
+
/**
|
|
1669
|
+
* Set or update an org-level policy secret.
|
|
1670
|
+
*
|
|
1671
|
+
* @param secretName The name of the secret to set.
|
|
1672
|
+
* @param request The set secret request.
|
|
1673
|
+
* @param mfaReceipt Optional MFA receipt(s).
|
|
1674
|
+
* @returns The updated policy secrets info.
|
|
1675
|
+
*/
|
|
1676
|
+
async policySecretSet(
|
|
1677
|
+
secretName: string,
|
|
1678
|
+
request: SetPolicySecretRequest,
|
|
1679
|
+
mfaReceipt?: MfaReceipts,
|
|
1680
|
+
): Promise<CubeSignerResponse<PolicySecretsInfo>> {
|
|
1681
|
+
const o = op("/v0/org/{org_id}/policy/secrets/{secret_name}", "put");
|
|
1682
|
+
const reqFn = async (headers?: HeadersInit) =>
|
|
1683
|
+
this.exec(o, {
|
|
1684
|
+
params: { path: { secret_name: secretName } },
|
|
1685
|
+
body: request,
|
|
1686
|
+
headers,
|
|
1687
|
+
});
|
|
1688
|
+
return await CubeSignerResponse.create(this.env, reqFn, mfaReceipt);
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
/**
|
|
1692
|
+
* Get org-level policy secrets.
|
|
1693
|
+
*
|
|
1694
|
+
* @returns The policy secrets info (names and ACLs only; values are not returned).
|
|
1695
|
+
*/
|
|
1696
|
+
async policySecretsGet(): Promise<PolicySecretsInfo> {
|
|
1697
|
+
const o = op("/v0/org/{org_id}/policy/secrets", "get");
|
|
1698
|
+
return this.exec(o, {});
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* Delete an org-level policy secret.
|
|
1703
|
+
*
|
|
1704
|
+
* @param secretName The name of the secret to delete.
|
|
1705
|
+
* @param mfaReceipt Optional MFA receipt(s).
|
|
1706
|
+
* @returns The updated policy secrets info.
|
|
1707
|
+
*/
|
|
1708
|
+
async policySecretDelete(
|
|
1709
|
+
secretName: string,
|
|
1710
|
+
mfaReceipt?: MfaReceipts,
|
|
1711
|
+
): Promise<CubeSignerResponse<PolicySecretsInfo>> {
|
|
1712
|
+
const o = op("/v0/org/{org_id}/policy/secrets/{secret_name}", "delete");
|
|
1713
|
+
const reqFn = async (headers?: HeadersInit) =>
|
|
1714
|
+
this.exec(o, {
|
|
1715
|
+
params: { path: { secret_name: secretName } },
|
|
1716
|
+
headers,
|
|
1717
|
+
});
|
|
1718
|
+
return await CubeSignerResponse.create(this.env, reqFn, mfaReceipt);
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1666
1721
|
// #endregion
|
|
1667
1722
|
|
|
1668
1723
|
// #region BUCKET: bucket(Get|List|Update)
|
package/src/env.ts
CHANGED
package/src/key.ts
CHANGED
|
@@ -30,6 +30,7 @@ import type {
|
|
|
30
30
|
KeyInfoJwt,
|
|
31
31
|
KeyAttestationQuery,
|
|
32
32
|
BinanceApiProperties,
|
|
33
|
+
CoinbaseApiProperties,
|
|
33
34
|
} from "./schema_types";
|
|
34
35
|
import type {
|
|
35
36
|
ApiClient,
|
|
@@ -101,6 +102,7 @@ export enum Ed25519 {
|
|
|
101
102
|
Substrate = "Ed25519SubstrateAddr",
|
|
102
103
|
Tendermint = "Ed25519TendermintAddr",
|
|
103
104
|
BinanceApi = "Ed25519BinanceApi",
|
|
105
|
+
CoinbaseApi = "Ed25519CoinbaseApi",
|
|
104
106
|
Ton = "Ed25519TonAddr",
|
|
105
107
|
Xrp = "Ed25519XrpAddr",
|
|
106
108
|
}
|
|
@@ -128,7 +130,9 @@ export type BabyJubjub = typeof BabyJubjub;
|
|
|
128
130
|
export type KeyType = Secp256k1 | Bls | Ed25519 | Mnemonic | Stark | P256 | BabyJubjub;
|
|
129
131
|
|
|
130
132
|
/** The type representing all different kinds of key properties. */
|
|
131
|
-
export type KeyPropertiesPatch =
|
|
133
|
+
export type KeyPropertiesPatch =
|
|
134
|
+
| ({ kind: "BinanceApi" } & BinanceApiProperties)
|
|
135
|
+
| ({ kind: "CoinbaseApi" } & CoinbaseApiProperties);
|
|
132
136
|
|
|
133
137
|
/**
|
|
134
138
|
* A representation of a signing key.
|
|
@@ -844,6 +848,8 @@ export function fromSchemaKeyType(ty: SchemaKeyType): KeyType {
|
|
|
844
848
|
return Ed25519.Ton;
|
|
845
849
|
case "Ed25519BinanceApi":
|
|
846
850
|
return Ed25519.BinanceApi;
|
|
851
|
+
case "Ed25519CoinbaseApi":
|
|
852
|
+
return Ed25519.CoinbaseApi;
|
|
847
853
|
case "Stark":
|
|
848
854
|
return Stark;
|
|
849
855
|
case "Mnemonic":
|