@cubist-labs/cubesigner-sdk 0.4.269 → 0.4.272
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/src/audit_log.d.ts +3 -3
- package/dist/src/client/api_client.d.ts +40 -3
- package/dist/src/client/api_client.d.ts.map +1 -1
- package/dist/src/client/api_client.js +63 -5
- package/dist/src/client.d.ts +9 -0
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/client.js +12 -1
- package/dist/src/key.d.ts +11 -1
- package/dist/src/key.d.ts.map +1 -1
- package/dist/src/key.js +13 -1
- package/dist/src/org.d.ts +11 -1
- package/dist/src/org.d.ts.map +1 -1
- package/dist/src/org.js +16 -3
- package/dist/src/role.d.ts +4 -1
- package/dist/src/role.d.ts.map +1 -1
- package/dist/src/role.js +3 -1
- package/dist/src/schema.d.ts +159 -40
- 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.map +1 -1
- package/dist/src/scopes.js +3 -2
- package/package.json +1 -1
- package/src/client/api_client.ts +88 -6
- package/src/client.ts +14 -0
- package/src/key.ts +18 -0
- package/src/org.ts +16 -2
- package/src/role.ts +5 -0
- package/src/schema.ts +160 -34
- package/src/schema_types.ts +5 -0
- package/src/scopes.ts +2 -1
package/src/client/api_client.ts
CHANGED
|
@@ -74,6 +74,8 @@ import type {
|
|
|
74
74
|
PolicyInfo,
|
|
75
75
|
JsonRpcRequest,
|
|
76
76
|
JsonRpcResult,
|
|
77
|
+
Eip7702SignRequest,
|
|
78
|
+
SignResponse,
|
|
77
79
|
} from "../schema_types.ts";
|
|
78
80
|
import { encodeToBase64 } from "../util.ts";
|
|
79
81
|
import { auditLogEntrySchema } from "../audit_log.ts";
|
|
@@ -723,7 +725,7 @@ export class ApiClient extends BaseClient {
|
|
|
723
725
|
|
|
724
726
|
// #endregion
|
|
725
727
|
|
|
726
|
-
// #region ORG USERS: orgUserInvite, orgUserDelete, orgUsersList, orgUserGet, orgUserGetByEmail, orgUserCreateOidc, orgUserDeleteOidc
|
|
728
|
+
// #region ORG USERS: orgUserInvite, orgUserDelete, orgUsersList, orgUserGet, orgUserGetByEmail, orgUserCreateOidc, orgUserDeleteOidc, resetUserMfaInit, resetUserMfaComplete
|
|
727
729
|
|
|
728
730
|
/**
|
|
729
731
|
* Create a new (first-party) user in the organization and send an email invitation to that user.
|
|
@@ -923,6 +925,55 @@ export class ApiClient extends BaseClient {
|
|
|
923
925
|
});
|
|
924
926
|
}
|
|
925
927
|
|
|
928
|
+
/**
|
|
929
|
+
* Initiate an MFA reset for a user in the org (then the user must call {@link resetUserMfaComplete}).
|
|
930
|
+
*
|
|
931
|
+
* Can only be called by an org owner. The target may be any org user with an
|
|
932
|
+
* email configured; the backend emails them a short-lived reset token, which
|
|
933
|
+
* the user can use to complete the reset.
|
|
934
|
+
*
|
|
935
|
+
* @param userId The id of the user whose MFA should be reset.
|
|
936
|
+
* @returns An empty response
|
|
937
|
+
*/
|
|
938
|
+
async resetUserMfaInit(userId: string): Promise<Empty> {
|
|
939
|
+
const o = op("/v0/org/{org_id}/users/reset_mfa", "post");
|
|
940
|
+
|
|
941
|
+
return this.exec(o, {
|
|
942
|
+
body: { user_id: userId },
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Complete an MFA reset for a user in the org (after an org owner initiates
|
|
948
|
+
* with {@link resetUserMfaInit}).
|
|
949
|
+
*
|
|
950
|
+
* Clears all of the calling user's MFA factors. Authenticated via an OIDC
|
|
951
|
+
* token, since an MFA-locked user cannot complete a session login.
|
|
952
|
+
*
|
|
953
|
+
* @param env The environment to use
|
|
954
|
+
* @param orgId The org the user belongs to
|
|
955
|
+
* @param oidcToken An OIDC token identifying the user whose MFA is being reset
|
|
956
|
+
* @param resetToken The reset token emailed to the user by {@link resetUserMfaInit}
|
|
957
|
+
* @param headers Optional headers to set
|
|
958
|
+
*/
|
|
959
|
+
static async resetUserMfaComplete(
|
|
960
|
+
env: EnvInterface,
|
|
961
|
+
orgId: string,
|
|
962
|
+
oidcToken: string,
|
|
963
|
+
resetToken: string,
|
|
964
|
+
headers?: HeadersInit,
|
|
965
|
+
): Promise<void> {
|
|
966
|
+
const o = op("/v0/org/{org_id}/users/reset_mfa", "patch");
|
|
967
|
+
await retryOn5XX(() =>
|
|
968
|
+
o({
|
|
969
|
+
baseUrl: env.SignerApiRoot,
|
|
970
|
+
params: { path: { org_id: orgId } },
|
|
971
|
+
body: { token: resetToken },
|
|
972
|
+
headers: mergeHeaders(headers, authHeader(oidcToken)),
|
|
973
|
+
}),
|
|
974
|
+
).then(assertOk);
|
|
975
|
+
}
|
|
976
|
+
|
|
926
977
|
// #endregion
|
|
927
978
|
|
|
928
979
|
// #region KEYS: keyGet, keyAttest, keyUpdate, keyDelete, keysCreate, keysDerive, keysList, keyHistory
|
|
@@ -2144,13 +2195,17 @@ export class ApiClient extends BaseClient {
|
|
|
2144
2195
|
/**
|
|
2145
2196
|
* List pending MFA requests accessible to the current user.
|
|
2146
2197
|
*
|
|
2147
|
-
* @
|
|
2198
|
+
* @param page Pagination options. Defaults to fetching the entire result set.
|
|
2199
|
+
* @returns Paginator for iterating over the MFA requests.
|
|
2148
2200
|
*/
|
|
2149
|
-
|
|
2201
|
+
mfaList(page?: PageOpts): Paginator<schemas["PaginatedListMfaResponse"], MfaRequestInfo[]> {
|
|
2150
2202
|
const o = op("/v0/org/{org_id}/mfa", "get");
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2203
|
+
return Paginator.items(
|
|
2204
|
+
page ?? Page.default(),
|
|
2205
|
+
(query) => this.exec(o, { params: { query } }),
|
|
2206
|
+
(r) => r.mfa_requests,
|
|
2207
|
+
(r) => r.last_evaluated_key,
|
|
2208
|
+
);
|
|
2154
2209
|
}
|
|
2155
2210
|
|
|
2156
2211
|
/**
|
|
@@ -2350,6 +2405,33 @@ export class ApiClient extends BaseClient {
|
|
|
2350
2405
|
return await CubeSignerResponse.create(this.env, signFn, mfaReceipt);
|
|
2351
2406
|
}
|
|
2352
2407
|
|
|
2408
|
+
/**
|
|
2409
|
+
* Sign EIP-7702 authorization request.
|
|
2410
|
+
*
|
|
2411
|
+
* This requires the key to have a '"AllowEip7702Signing"' {@link KeyPolicy}.
|
|
2412
|
+
*
|
|
2413
|
+
* @param key The key to sign with (either {@link Key} or its material ID).
|
|
2414
|
+
* @param req What to sign
|
|
2415
|
+
* @param mfaReceipt Optional MFA receipt(s)
|
|
2416
|
+
* @returns Signature (or MFA approval request).
|
|
2417
|
+
*/
|
|
2418
|
+
async signEip7702(
|
|
2419
|
+
key: Key | string,
|
|
2420
|
+
req: Eip7702SignRequest,
|
|
2421
|
+
mfaReceipt?: MfaReceipts,
|
|
2422
|
+
): Promise<CubeSignerResponse<SignResponse>> {
|
|
2423
|
+
const o = op("/v0/org/{org_id}/evm/eip7702/sign/{pubkey}", "post");
|
|
2424
|
+
|
|
2425
|
+
const pubkey = typeof key === "string" ? (key as string) : key.materialId;
|
|
2426
|
+
const signFn = async (headers?: HeadersInit) =>
|
|
2427
|
+
this.exec(o, {
|
|
2428
|
+
params: { path: { pubkey } },
|
|
2429
|
+
body: req,
|
|
2430
|
+
headers,
|
|
2431
|
+
});
|
|
2432
|
+
return await CubeSignerResponse.create(this.env, signFn, mfaReceipt);
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2353
2435
|
/**
|
|
2354
2436
|
* Sign an Eth2/Beacon-chain validation message.
|
|
2355
2437
|
*
|
package/src/client.ts
CHANGED
|
@@ -160,6 +160,20 @@ export class CubeSignerClient {
|
|
|
160
160
|
return await ApiClient.identityProveOidc(...args);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Complete an MFA reset for a user in the org. The reset must first be
|
|
165
|
+
* initiated by an org owner via {@link Org.resetUserMfaInit}.
|
|
166
|
+
*
|
|
167
|
+
* Same as {@link ApiClient.resetUserMfaComplete}, see its documentation for more details.
|
|
168
|
+
*
|
|
169
|
+
* @param args Request arguments
|
|
170
|
+
*/
|
|
171
|
+
static async resetUserMfaComplete(
|
|
172
|
+
...args: Parameters<typeof ApiClient.resetUserMfaComplete>
|
|
173
|
+
): Promise<void> {
|
|
174
|
+
await ApiClient.resetUserMfaComplete(...args);
|
|
175
|
+
}
|
|
176
|
+
|
|
163
177
|
/**
|
|
164
178
|
* Initialize email OTP authentication.
|
|
165
179
|
*
|
package/src/key.ts
CHANGED
|
@@ -30,6 +30,8 @@ import type {
|
|
|
30
30
|
KeyInfoJwt,
|
|
31
31
|
KeyAttestationQuery,
|
|
32
32
|
KeyPropertiesPatch,
|
|
33
|
+
Eip7702SignRequest,
|
|
34
|
+
SignResponse,
|
|
33
35
|
} from "./schema_types.ts";
|
|
34
36
|
import type {
|
|
35
37
|
ApiClient,
|
|
@@ -553,6 +555,22 @@ export class Key {
|
|
|
553
555
|
return await this.#apiClient.signEip712(this, req, mfaReceipt);
|
|
554
556
|
}
|
|
555
557
|
|
|
558
|
+
/**
|
|
559
|
+
* Sign EIP-7702 authorization request.
|
|
560
|
+
*
|
|
561
|
+
* This requires the key to have a '"AllowEip7702Signing"' {@link KeyPolicy}.
|
|
562
|
+
*
|
|
563
|
+
* @param req What to sign
|
|
564
|
+
* @param mfaReceipt Optional MFA receipt(s)
|
|
565
|
+
* @returns Signature (or MFA approval request).
|
|
566
|
+
*/
|
|
567
|
+
async signEip7702(
|
|
568
|
+
req: Eip7702SignRequest,
|
|
569
|
+
mfaReceipt?: MfaReceipts,
|
|
570
|
+
): Promise<CubeSignerResponse<SignResponse>> {
|
|
571
|
+
return await this.#apiClient.signEip7702(this, req, mfaReceipt);
|
|
572
|
+
}
|
|
573
|
+
|
|
556
574
|
/**
|
|
557
575
|
* Sign an Eth2/Beacon-chain validation message.
|
|
558
576
|
*
|
package/src/org.ts
CHANGED
|
@@ -569,6 +569,18 @@ export class Org {
|
|
|
569
569
|
return this.#apiClient.orgUserDeleteOidc.bind(this.#apiClient);
|
|
570
570
|
}
|
|
571
571
|
|
|
572
|
+
/**
|
|
573
|
+
* Initiate an MFA reset for a user in the org. The reset is completed by
|
|
574
|
+
* the user via {@link CubeSignerClient.resetUserMfaComplete}.
|
|
575
|
+
*
|
|
576
|
+
* Same as {@link ApiClient.resetUserMfaInit}, see its documentation for more information.
|
|
577
|
+
*
|
|
578
|
+
* @returns A function that initiates an MFA reset for a user
|
|
579
|
+
*/
|
|
580
|
+
get resetUserMfaInit() {
|
|
581
|
+
return this.#apiClient.resetUserMfaInit.bind(this.#apiClient);
|
|
582
|
+
}
|
|
583
|
+
|
|
572
584
|
/**
|
|
573
585
|
* List all users in the organization.
|
|
574
586
|
*
|
|
@@ -997,11 +1009,13 @@ export class Org {
|
|
|
997
1009
|
/**
|
|
998
1010
|
* List pending MFA requests accessible to the current user.
|
|
999
1011
|
*
|
|
1012
|
+
* @param page Pagination options. Defaults to fetching the entire result set.
|
|
1000
1013
|
* @returns The MFA requests.
|
|
1001
1014
|
*/
|
|
1002
|
-
async mfaRequests(): Promise<MfaRequest[]> {
|
|
1015
|
+
async mfaRequests(page?: PageOpts): Promise<MfaRequest[]> {
|
|
1003
1016
|
return await this.#apiClient
|
|
1004
|
-
.mfaList()
|
|
1017
|
+
.mfaList(page)
|
|
1018
|
+
.fetch()
|
|
1005
1019
|
.then((mfaInfos) => mfaInfos.map((mfaInfo) => new MfaRequest(this.#apiClient, mfaInfo)));
|
|
1006
1020
|
}
|
|
1007
1021
|
|
package/src/role.ts
CHANGED
|
@@ -462,6 +462,10 @@ export type AllowEip191Signing = typeof AllowEip191Signing;
|
|
|
462
462
|
export const AllowEip712Signing = "AllowEip712Signing" as const;
|
|
463
463
|
export type AllowEip712Signing = typeof AllowEip712Signing;
|
|
464
464
|
|
|
465
|
+
/** Allow EIP-7702 signing */
|
|
466
|
+
export const AllowEip7702Signing = "AllowEip7702Signing" as const;
|
|
467
|
+
export type AllowEip7702Signing = typeof AllowEip7702Signing;
|
|
468
|
+
|
|
465
469
|
/** Allow BTC message signing */
|
|
466
470
|
export const AllowBtcMessageSigning = "AllowBtcMessageSigning" as const;
|
|
467
471
|
export type AllowBtcMessageSigning = typeof AllowBtcMessageSigning;
|
|
@@ -471,6 +475,7 @@ export type AllowPolicy =
|
|
|
471
475
|
| AllowDiffieHellmanExchange
|
|
472
476
|
| AllowEip191Signing
|
|
473
477
|
| AllowEip712Signing
|
|
478
|
+
| AllowEip7702Signing
|
|
474
479
|
| AllowBtcMessageSigning;
|
|
475
480
|
|
|
476
481
|
/** A reference to an org-level named policy, using its name/id and its version */
|
package/src/schema.ts
CHANGED
|
@@ -439,6 +439,17 @@ export interface paths {
|
|
|
439
439
|
*/
|
|
440
440
|
post: operations["eip712Sign"];
|
|
441
441
|
};
|
|
442
|
+
"/v0/org/{org_id}/evm/eip7702/sign/{pubkey}": {
|
|
443
|
+
/**
|
|
444
|
+
* Sign an EIP-7702 Authorization
|
|
445
|
+
* @description Sign an EIP-7702 Authorization
|
|
446
|
+
*
|
|
447
|
+
* Signs an EIP-7702 authorization tuple `(chain_id, address, nonce)` with a given
|
|
448
|
+
* Secp256k1 key. The resulting 65-byte signature (`r || s || y_parity`) can be used to
|
|
449
|
+
* assemble a `SignedAuthorization` for an EIP-7702 set-code transaction.
|
|
450
|
+
*/
|
|
451
|
+
post: operations["eip7702Sign"];
|
|
452
|
+
};
|
|
442
453
|
"/v0/org/{org_id}/export/{key_id}": {
|
|
443
454
|
/**
|
|
444
455
|
* Get an Org-Export Ciphertext
|
|
@@ -740,6 +751,9 @@ export interface paths {
|
|
|
740
751
|
* Retrieves and returns all pending MFA requests that are accessible to the current session,
|
|
741
752
|
* i.e., those created by the current session identity plus those in which the current user
|
|
742
753
|
* is listed as an approver
|
|
754
|
+
*
|
|
755
|
+
* NOTE that if pagination is used and a page limit is set, the returned result
|
|
756
|
+
* set may contain either FEWER or MORE elements than the requested page limit.
|
|
743
757
|
*/
|
|
744
758
|
get: operations["mfaList"];
|
|
745
759
|
};
|
|
@@ -2965,6 +2979,7 @@ export interface components {
|
|
|
2965
2979
|
| "InvalidDiffieHellmanRequest"
|
|
2966
2980
|
| "InvalidSolanaSignRequest"
|
|
2967
2981
|
| "InvalidEip712SignRequest"
|
|
2982
|
+
| "InvalidEip7702SignRequest"
|
|
2968
2983
|
| "OnlySpecifyOne"
|
|
2969
2984
|
| "IncompatibleParams"
|
|
2970
2985
|
| "NoOidcDataInProof"
|
|
@@ -3239,6 +3254,7 @@ export interface components {
|
|
|
3239
3254
|
| "TaprootSign"
|
|
3240
3255
|
| "Eip712Sign"
|
|
3241
3256
|
| "Eip191Sign"
|
|
3257
|
+
| "Eip7702Sign"
|
|
3242
3258
|
| "Eth1Sign"
|
|
3243
3259
|
| "Eth2Sign"
|
|
3244
3260
|
| "SolanaSign"
|
|
@@ -5657,6 +5673,51 @@ export interface components {
|
|
|
5657
5673
|
tweak?: string | null;
|
|
5658
5674
|
typed_data: components["schemas"]["TypedData"];
|
|
5659
5675
|
};
|
|
5676
|
+
Eip7702SignRequest: {
|
|
5677
|
+
/** @description Do not produce a valid signature, just evaluate attached policies. */
|
|
5678
|
+
dry_run?: boolean;
|
|
5679
|
+
/**
|
|
5680
|
+
* @description Request additional information to be included in the response, explaining
|
|
5681
|
+
* the outcome (i.e., permitted vs. denied vs. MFA required) of the sign request.
|
|
5682
|
+
* Defaults to false.
|
|
5683
|
+
*/
|
|
5684
|
+
explain?: boolean;
|
|
5685
|
+
/**
|
|
5686
|
+
* @description If MFA is required, fail the request instead of returning 202 and creating
|
|
5687
|
+
* pending MFA request. Defaults to false.
|
|
5688
|
+
*/
|
|
5689
|
+
fail_on_mfa?: boolean;
|
|
5690
|
+
/**
|
|
5691
|
+
* @description Optional metadata. Passing additional information as metadata can be used to make reviewing
|
|
5692
|
+
* of pending MFA requests and/or historical key transactions more transparent. It can also be used e.g., to carry additional data to WebHook policies.
|
|
5693
|
+
*/
|
|
5694
|
+
metadata?: unknown;
|
|
5695
|
+
} & {
|
|
5696
|
+
/**
|
|
5697
|
+
* @description The address to delegate to (the target of the authorization), as
|
|
5698
|
+
* hex-encoded bytes. Must be exactly 20 bytes.
|
|
5699
|
+
* @example 0x1100000000000000000000000000000000000011
|
|
5700
|
+
*/
|
|
5701
|
+
address: string;
|
|
5702
|
+
/**
|
|
5703
|
+
* Format: int64
|
|
5704
|
+
* @description The chain id for which this authorization is valid. A value of `0` means
|
|
5705
|
+
* the authorization is valid on any chain that supports EIP-7702.
|
|
5706
|
+
*/
|
|
5707
|
+
chain_id: number;
|
|
5708
|
+
/**
|
|
5709
|
+
* Format: int64
|
|
5710
|
+
* @description The nonce of the authorizing account.
|
|
5711
|
+
*/
|
|
5712
|
+
nonce: number;
|
|
5713
|
+
/**
|
|
5714
|
+
* @description An optional tweak value that will be applied to the secret key before signing.
|
|
5715
|
+
* This field must contain a base-64 string encoding a vector of exactly 32 bytes.
|
|
5716
|
+
* See the CubeSigner documentation for more information on the tweaking procedure.
|
|
5717
|
+
* @example F41HAy2q5Gn8laF2CuMsZbRAQTmD+4Ob3VUMZ7TBGK4=
|
|
5718
|
+
*/
|
|
5719
|
+
tweak?: string | null;
|
|
5720
|
+
};
|
|
5660
5721
|
Email: string;
|
|
5661
5722
|
/** @description An answer to the challenge returned by the `mfa_email_init` endpoint. */
|
|
5662
5723
|
EmailOtpAnswer: {
|
|
@@ -6222,6 +6283,7 @@ export interface components {
|
|
|
6222
6283
|
| "sign:evm:tx"
|
|
6223
6284
|
| "sign:evm:eip191"
|
|
6224
6285
|
| "sign:evm:eip712"
|
|
6286
|
+
| "sign:evm:eip7702"
|
|
6225
6287
|
| "sign:eth2:*"
|
|
6226
6288
|
| "sign:eth2:validate"
|
|
6227
6289
|
| "sign:eth2:stake"
|
|
@@ -6507,6 +6569,7 @@ export interface components {
|
|
|
6507
6569
|
| "SessionForWrongOrg"
|
|
6508
6570
|
| "SelfDelete"
|
|
6509
6571
|
| "SelfDisable"
|
|
6572
|
+
| "SelfMfaReset"
|
|
6510
6573
|
| "InvalidOrgMembershipRoleChange"
|
|
6511
6574
|
| "UserDisabled"
|
|
6512
6575
|
| "OrgDisabled"
|
|
@@ -7399,10 +7462,6 @@ export interface components {
|
|
|
7399
7462
|
/** @description Pending invitations */
|
|
7400
7463
|
invitations: components["schemas"]["InvitationInfo"][];
|
|
7401
7464
|
};
|
|
7402
|
-
ListMfaResponse: {
|
|
7403
|
-
/** @description All pending MFA requests */
|
|
7404
|
-
mfa_requests: components["schemas"]["MfaRequestInfo"][];
|
|
7405
|
-
};
|
|
7406
7465
|
/** @description All pending MMI requests created by the current user. */
|
|
7407
7466
|
ListPendingMessagesResponse: {
|
|
7408
7467
|
/** @description All pending messages for a user. */
|
|
@@ -7881,6 +7940,7 @@ export interface components {
|
|
|
7881
7940
|
| "TaprootSign"
|
|
7882
7941
|
| "Eip191Sign"
|
|
7883
7942
|
| "Eip712Sign"
|
|
7943
|
+
| "Eip7702Sign"
|
|
7884
7944
|
| "EotsNonces"
|
|
7885
7945
|
| "EotsSign"
|
|
7886
7946
|
| "Eth1Sign"
|
|
@@ -8531,6 +8591,21 @@ export interface components {
|
|
|
8531
8591
|
*/
|
|
8532
8592
|
last_evaluated_key?: string | null;
|
|
8533
8593
|
};
|
|
8594
|
+
/**
|
|
8595
|
+
* @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
|
|
8596
|
+
* value (which can the user pass back to use as a url query parameter to continue pagination).
|
|
8597
|
+
*/
|
|
8598
|
+
PaginatedListMfaResponse: {
|
|
8599
|
+
/** @description All pending MFA requests */
|
|
8600
|
+
mfa_requests: components["schemas"]["MfaRequestInfo"][];
|
|
8601
|
+
} & {
|
|
8602
|
+
/**
|
|
8603
|
+
* @description If set, the content of `response` does not contain the entire result set.
|
|
8604
|
+
* To fetch the next page of the result set, call the same endpoint
|
|
8605
|
+
* but specify this value as the 'page.start' query parameter.
|
|
8606
|
+
*/
|
|
8607
|
+
last_evaluated_key?: string | null;
|
|
8608
|
+
};
|
|
8534
8609
|
/**
|
|
8535
8610
|
* @description Response type that wraps another type and adds base64url-encoded encrypted `last_evaluated_key`
|
|
8536
8611
|
* value (which can the user pass back to use as a url query parameter to continue pagination).
|
|
@@ -8860,6 +8935,7 @@ export interface components {
|
|
|
8860
8935
|
| "BtcSignatureExceededValue"
|
|
8861
8936
|
| "BtcValueOverflow"
|
|
8862
8937
|
| "BtcSighashTypeDisallowed"
|
|
8938
|
+
| "Eip7702AddressMismatch"
|
|
8863
8939
|
| "EvmTxReceiverMismatch"
|
|
8864
8940
|
| "EvmTxChainIdMismatch"
|
|
8865
8941
|
| "EvmTxSenderMismatch"
|
|
@@ -8900,6 +8976,7 @@ export interface components {
|
|
|
8900
8976
|
| "RequireRoleSessionKeyAccessError"
|
|
8901
8977
|
| "BtcMessageSigningNotAllowed"
|
|
8902
8978
|
| "Eip191SigningNotAllowed"
|
|
8979
|
+
| "Eip7702SigningNotAllowed"
|
|
8903
8980
|
| "TaprootSigningDisallowed"
|
|
8904
8981
|
| "SegwitSigningDisallowed"
|
|
8905
8982
|
| "PsbtSigningDisallowed"
|
|
@@ -9836,7 +9913,7 @@ export interface components {
|
|
|
9836
9913
|
* Can be `None` if the request is creating a secret without ACL or updating an
|
|
9837
9914
|
* existing secret's value.
|
|
9838
9915
|
*/
|
|
9839
|
-
acl?: unknown
|
|
9916
|
+
acl?: unknown;
|
|
9840
9917
|
import_key?: components["schemas"]["KeyImportKey"] | null;
|
|
9841
9918
|
value?: components["schemas"]["SecretValue"] | null;
|
|
9842
9919
|
};
|
|
@@ -11285,26 +11362,8 @@ export interface components {
|
|
|
11285
11362
|
};
|
|
11286
11363
|
/** @description Request body for updating a named policy. */
|
|
11287
11364
|
UpdatePolicyRequest: {
|
|
11288
|
-
/**
|
|
11289
|
-
|
|
11290
|
-
* @example [
|
|
11291
|
-
* {
|
|
11292
|
-
* "action": "attach",
|
|
11293
|
-
* "resources": [
|
|
11294
|
-
* {
|
|
11295
|
-
* "key_id": "*",
|
|
11296
|
-
* "role_id": "Role#e427c28a-9c5b-49cc-a257-878aea58a22c"
|
|
11297
|
-
* }
|
|
11298
|
-
* ],
|
|
11299
|
-
* "subjects": "*"
|
|
11300
|
-
* },
|
|
11301
|
-
* {
|
|
11302
|
-
* "action": "sign",
|
|
11303
|
-
* "subjects": "Role#e427c28a-9c5b-49cc-a257-878aea58a22c"
|
|
11304
|
-
* }
|
|
11305
|
-
* ]
|
|
11306
|
-
*/
|
|
11307
|
-
acl?: unknown[] | null;
|
|
11365
|
+
/** @description New Access-control entries. */
|
|
11366
|
+
acl?: unknown;
|
|
11308
11367
|
edit_policy?: components["schemas"]["EditPolicy"] | null;
|
|
11309
11368
|
/** @description A new metadata. */
|
|
11310
11369
|
metadata?: unknown;
|
|
@@ -12529,14 +12588,6 @@ export interface components {
|
|
|
12529
12588
|
};
|
|
12530
12589
|
};
|
|
12531
12590
|
};
|
|
12532
|
-
ListMfaResponse: {
|
|
12533
|
-
content: {
|
|
12534
|
-
"application/json": {
|
|
12535
|
-
/** @description All pending MFA requests */
|
|
12536
|
-
mfa_requests: components["schemas"]["MfaRequestInfo"][];
|
|
12537
|
-
};
|
|
12538
|
-
};
|
|
12539
|
-
};
|
|
12540
12591
|
/** @description All pending MMI requests created by the current user. */
|
|
12541
12592
|
ListPendingMessagesResponse: {
|
|
12542
12593
|
content: {
|
|
@@ -12875,6 +12926,21 @@ export interface components {
|
|
|
12875
12926
|
};
|
|
12876
12927
|
};
|
|
12877
12928
|
};
|
|
12929
|
+
PaginatedListMfaResponse: {
|
|
12930
|
+
content: {
|
|
12931
|
+
"application/json": {
|
|
12932
|
+
/** @description All pending MFA requests */
|
|
12933
|
+
mfa_requests: components["schemas"]["MfaRequestInfo"][];
|
|
12934
|
+
} & {
|
|
12935
|
+
/**
|
|
12936
|
+
* @description If set, the content of `response` does not contain the entire result set.
|
|
12937
|
+
* To fetch the next page of the result set, call the same endpoint
|
|
12938
|
+
* but specify this value as the 'page.start' query parameter.
|
|
12939
|
+
*/
|
|
12940
|
+
last_evaluated_key?: string | null;
|
|
12941
|
+
};
|
|
12942
|
+
};
|
|
12943
|
+
};
|
|
12878
12944
|
PaginatedListPoliciesResponse: {
|
|
12879
12945
|
content: {
|
|
12880
12946
|
"application/json": {
|
|
@@ -15128,6 +15194,48 @@ export interface operations {
|
|
|
15128
15194
|
};
|
|
15129
15195
|
};
|
|
15130
15196
|
};
|
|
15197
|
+
/**
|
|
15198
|
+
* Sign an EIP-7702 Authorization
|
|
15199
|
+
* @description Sign an EIP-7702 Authorization
|
|
15200
|
+
*
|
|
15201
|
+
* Signs an EIP-7702 authorization tuple `(chain_id, address, nonce)` with a given
|
|
15202
|
+
* Secp256k1 key. The resulting 65-byte signature (`r || s || y_parity`) can be used to
|
|
15203
|
+
* assemble a `SignedAuthorization` for an EIP-7702 set-code transaction.
|
|
15204
|
+
*/
|
|
15205
|
+
eip7702Sign: {
|
|
15206
|
+
parameters: {
|
|
15207
|
+
path: {
|
|
15208
|
+
/**
|
|
15209
|
+
* @description Name or ID of the desired Org
|
|
15210
|
+
* @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
|
|
15211
|
+
*/
|
|
15212
|
+
org_id: string;
|
|
15213
|
+
/**
|
|
15214
|
+
* @description Hex-encoded EVM address of the Secp256k1 key
|
|
15215
|
+
* @example 0x49011adbCC3bC9c0307BB07F37Dda1a1a9c69d2E
|
|
15216
|
+
*/
|
|
15217
|
+
pubkey: string;
|
|
15218
|
+
};
|
|
15219
|
+
};
|
|
15220
|
+
requestBody: {
|
|
15221
|
+
content: {
|
|
15222
|
+
"application/json": components["schemas"]["Eip7702SignRequest"];
|
|
15223
|
+
};
|
|
15224
|
+
};
|
|
15225
|
+
responses: {
|
|
15226
|
+
200: components["responses"]["SignResponse"];
|
|
15227
|
+
202: {
|
|
15228
|
+
content: {
|
|
15229
|
+
"application/json": components["schemas"]["AcceptedResponse"];
|
|
15230
|
+
};
|
|
15231
|
+
};
|
|
15232
|
+
default: {
|
|
15233
|
+
content: {
|
|
15234
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
15235
|
+
};
|
|
15236
|
+
};
|
|
15237
|
+
};
|
|
15238
|
+
};
|
|
15131
15239
|
/**
|
|
15132
15240
|
* Get an Org-Export Ciphertext
|
|
15133
15241
|
* @description Get an Org-Export Ciphertext
|
|
@@ -16142,9 +16250,27 @@ export interface operations {
|
|
|
16142
16250
|
* Retrieves and returns all pending MFA requests that are accessible to the current session,
|
|
16143
16251
|
* i.e., those created by the current session identity plus those in which the current user
|
|
16144
16252
|
* is listed as an approver
|
|
16253
|
+
*
|
|
16254
|
+
* NOTE that if pagination is used and a page limit is set, the returned result
|
|
16255
|
+
* set may contain either FEWER or MORE elements than the requested page limit.
|
|
16145
16256
|
*/
|
|
16146
16257
|
mfaList: {
|
|
16147
16258
|
parameters: {
|
|
16259
|
+
query?: {
|
|
16260
|
+
/**
|
|
16261
|
+
* @description Max number of items to return per page.
|
|
16262
|
+
*
|
|
16263
|
+
* If the actual number of returned items may be less that this, even if there exist more
|
|
16264
|
+
* data in the result set. To reliably determine if more data is left in the result set,
|
|
16265
|
+
* inspect the [UnencryptedLastEvalKey] value in the response object.
|
|
16266
|
+
*/
|
|
16267
|
+
"page.size"?: number;
|
|
16268
|
+
/**
|
|
16269
|
+
* @description The start of the page. Omit to start from the beginning; otherwise, only specify a
|
|
16270
|
+
* the exact value previously returned as 'last_evaluated_key' from the same endpoint.
|
|
16271
|
+
*/
|
|
16272
|
+
"page.start"?: string | null;
|
|
16273
|
+
};
|
|
16148
16274
|
path: {
|
|
16149
16275
|
/**
|
|
16150
16276
|
* @description Name or ID of the desired Org
|
|
@@ -16154,7 +16280,7 @@ export interface operations {
|
|
|
16154
16280
|
};
|
|
16155
16281
|
};
|
|
16156
16282
|
responses: {
|
|
16157
|
-
200: components["responses"]["
|
|
16283
|
+
200: components["responses"]["PaginatedListMfaResponse"];
|
|
16158
16284
|
default: {
|
|
16159
16285
|
content: {
|
|
16160
16286
|
"application/json": components["schemas"]["ErrorResponse"];
|
package/src/schema_types.ts
CHANGED
|
@@ -33,6 +33,8 @@ export type UpdateOrgRequest = schemas["UpdateOrgRequest"];
|
|
|
33
33
|
export type OrgExtProps = NonNullable<UpdateOrgRequest["ext_props"]>;
|
|
34
34
|
export type UpdateOrgResponse = schemas["UpdateOrgResponse"];
|
|
35
35
|
export type UpdateUserMembershipRequest = schemas["UpdateUserMembershipRequest"];
|
|
36
|
+
export type MfaResetRequest = schemas["MfaResetRequest"];
|
|
37
|
+
export type CompleteMfaResetRequest = schemas["CompleteMfaResetRequest"];
|
|
36
38
|
export type NotificationEndpointConfiguration = schemas["NotificationEndpointConfiguration"];
|
|
37
39
|
export type OrgEvents = schemas["OrgEventDiscriminants"];
|
|
38
40
|
export type BillingEvent = schemas["BillingEvent"];
|
|
@@ -78,6 +80,7 @@ const AllOperationKinds: Record<OperationKind, true> = {
|
|
|
78
80
|
TaprootSign: true,
|
|
79
81
|
Eip191Sign: true,
|
|
80
82
|
Eip712Sign: true,
|
|
83
|
+
Eip7702Sign: true,
|
|
81
84
|
EotsNonces: true,
|
|
82
85
|
EotsSign: true,
|
|
83
86
|
Eth1Sign: true,
|
|
@@ -165,7 +168,9 @@ export type EvmSignRequest = schemas["Eth1SignRequest"];
|
|
|
165
168
|
export type EvmSignResponse = schemas["Eth1SignResponse"];
|
|
166
169
|
export type Eip191SignRequest = schemas["Eip191SignRequest"];
|
|
167
170
|
export type Eip712SignRequest = schemas["Eip712SignRequest"];
|
|
171
|
+
export type Eip7702SignRequest = schemas["Eip7702SignRequest"];
|
|
168
172
|
export type Eip191Or712SignResponse = schemas["SignResponse"];
|
|
173
|
+
export type SignResponse = schemas["SignResponse"];
|
|
169
174
|
export type Eth2SignRequest = schemas["Eth2SignRequest"];
|
|
170
175
|
export type Eth2SignResponse = schemas["SignResponse"];
|
|
171
176
|
export type Eth2StakeRequest = schemas["StakeRequest"];
|
package/src/scopes.ts
CHANGED
|
@@ -70,7 +70,8 @@ export const AllScopes: Record<ExplicitScope, string> =
|
|
|
70
70
|
"sign:evm:*" : "Allows access to all sign 'evm' endpoints",
|
|
71
71
|
"sign:evm:tx" : "Allows access to the signing endpoint for evm transactions",
|
|
72
72
|
"sign:evm:eip191" : "Allows access to the signing endpoint for EIP-191 personal_message data",
|
|
73
|
-
"sign:evm:eip712" : "Allows
|
|
73
|
+
"sign:evm:eip712" : "Allows access to the signing endpoint for EIP-712 typed data",
|
|
74
|
+
"sign:evm:eip7702" : "Allows access to the signing endpoint for EIP-7702 authorization requests",
|
|
74
75
|
"sign:eth2:*" : "Allows access to all sign 'eth2' endpoints",
|
|
75
76
|
"sign:eth2:validate" : "Allows access to the sign eth2 'validate' endpoint",
|
|
76
77
|
"sign:eth2:stake" : "Allows access to the sign eth2 'stake' endpoint",
|