@privy-io/api-types 0.6.1 → 0.8.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/CHANGELOG.md +72 -0
- package/client.d.mts +53 -29
- package/client.d.mts.map +1 -1
- package/client.d.ts +53 -29
- package/client.d.ts.map +1 -1
- package/client.js +32 -7
- package/client.js.map +1 -1
- package/client.mjs +34 -9
- package/client.mjs.map +1 -1
- package/package.json +12 -1
- package/resources/accounts.d.mts +146 -4
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +146 -4
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs.map +1 -1
- package/resources/aggregations.d.mts +18 -392
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +18 -392
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/aggregations.js.map +1 -1
- package/resources/aggregations.mjs.map +1 -1
- package/resources/apps.d.mts +197 -70
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +197 -70
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs.map +1 -1
- package/resources/client-auth.d.mts +975 -463
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +975 -463
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/client-auth.js.map +1 -1
- package/resources/client-auth.mjs.map +1 -1
- package/resources/cross-app.d.mts +14 -13
- package/resources/cross-app.d.mts.map +1 -1
- package/resources/cross-app.d.ts +14 -13
- package/resources/cross-app.d.ts.map +1 -1
- package/resources/embedded-wallets.d.mts +165 -81
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +165 -81
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/embedded-wallets.js.map +1 -1
- package/resources/embedded-wallets.mjs.map +1 -1
- package/resources/funding.d.mts +150 -64
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +150 -64
- package/resources/funding.d.ts.map +1 -1
- package/resources/funding.js.map +1 -1
- package/resources/funding.mjs.map +1 -1
- package/resources/index.d.mts +18 -14
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +18 -14
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -2
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +446 -31
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +446 -31
- package/resources/intents.d.ts.map +1 -1
- package/resources/intents.js.map +1 -1
- package/resources/intents.mjs.map +1 -1
- package/resources/key-quorums.d.mts +108 -17
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +108 -17
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +26 -9
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +26 -9
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/kraken-embed.d.mts +62 -0
- package/resources/kraken-embed.d.mts.map +1 -0
- package/resources/kraken-embed.d.ts +62 -0
- package/resources/kraken-embed.d.ts.map +1 -0
- package/resources/kraken-embed.js +9 -0
- package/resources/kraken-embed.js.map +1 -0
- package/resources/kraken-embed.mjs +5 -0
- package/resources/kraken-embed.mjs.map +1 -0
- package/resources/policies.d.mts +342 -926
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +342 -926
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +51 -41
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +51 -41
- package/resources/policies.mjs.map +1 -1
- package/resources/shared.d.mts +59 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +59 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +9 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +5 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/swaps.d.mts +108 -0
- package/resources/swaps.d.mts.map +1 -0
- package/resources/swaps.d.ts +108 -0
- package/resources/swaps.d.ts.map +1 -0
- package/resources/swaps.js +9 -0
- package/resources/swaps.js.map +1 -0
- package/resources/swaps.mjs +5 -0
- package/resources/swaps.mjs.map +1 -0
- package/resources/transactions.d.mts +158 -93
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +158 -93
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +3 -0
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +3 -0
- package/resources/transactions.mjs.map +1 -1
- package/resources/users.d.mts +64 -94
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +64 -94
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +3 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +3 -0
- package/resources/users.mjs.map +1 -1
- package/resources/wallet-actions.d.mts +187 -0
- package/resources/wallet-actions.d.mts.map +1 -0
- package/resources/wallet-actions.d.ts +187 -0
- package/resources/wallet-actions.d.ts.map +1 -0
- package/resources/wallet-actions.js +9 -0
- package/resources/wallet-actions.js.map +1 -0
- package/resources/wallet-actions.mjs +5 -0
- package/resources/wallet-actions.mjs.map +1 -0
- package/resources/wallets/balance.d.mts +7 -4
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +7 -4
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js +3 -0
- package/resources/wallets/balance.js.map +1 -1
- package/resources/wallets/balance.mjs +3 -0
- package/resources/wallets/balance.mjs.map +1 -1
- package/resources/wallets/index.d.mts +1 -1
- package/resources/wallets/index.d.mts.map +1 -1
- package/resources/wallets/index.d.ts +1 -1
- package/resources/wallets/index.d.ts.map +1 -1
- package/resources/wallets/index.js.map +1 -1
- package/resources/wallets/index.mjs.map +1 -1
- package/resources/wallets/transactions.d.mts +10 -6
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +10 -6
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +3 -0
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs +3 -0
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +2399 -936
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +2399 -936
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +28 -10
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +28 -10
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +780 -339
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +780 -339
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources/yield.d.mts +50 -9
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +50 -9
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +884 -99
- package/src/resources/accounts.ts +179 -3
- package/src/resources/aggregations.ts +18 -702
- package/src/resources/apps.ts +250 -85
- package/src/resources/client-auth.ts +1453 -786
- package/src/resources/cross-app.ts +19 -15
- package/src/resources/embedded-wallets.ts +219 -123
- package/src/resources/funding.ts +263 -173
- package/src/resources/index.ts +444 -61
- package/src/resources/intents.ts +575 -37
- package/src/resources/key-quorums.ts +137 -21
- package/src/resources/kraken-embed.ts +85 -0
- package/src/resources/policies.ts +582 -1550
- package/src/resources/shared.ts +79 -0
- package/src/resources/swaps.ts +136 -0
- package/src/resources/transactions.ts +188 -91
- package/src/resources/users.ts +82 -132
- package/src/resources/wallet-actions.ts +251 -0
- package/src/resources/wallets/balance.ts +9 -2
- package/src/resources/wallets/index.ts +146 -16
- package/src/resources/wallets/transactions.ts +12 -4
- package/src/resources/wallets/wallets.ts +2922 -974
- package/src/resources/webhooks.ts +970 -454
- package/src/resources/yield.ts +68 -10
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as SharedAPI from "./shared.mjs";
|
|
2
3
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
4
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Operations related to key quorums
|
|
7
|
+
*/
|
|
4
8
|
export declare class KeyQuorums extends APIResource {
|
|
5
9
|
/**
|
|
6
10
|
* Create a new key quorum.
|
|
7
11
|
*
|
|
8
12
|
* @example
|
|
9
13
|
* ```ts
|
|
10
|
-
* const keyQuorum = await client.keyQuorums.create(
|
|
14
|
+
* const keyQuorum = await client.keyQuorums.create({
|
|
15
|
+
* authorization_threshold: 1,
|
|
16
|
+
* display_name: 'Prod key quorum',
|
|
17
|
+
* public_keys: [
|
|
18
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
19
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErzZtQr/bMIh3Y8f9ZqseB9i/AfjQ\nhu+agbNqXcJy/TfoNqvc/Y3Mh7gIZ8ZLXQEykycx4mYSpqrxp1lBKqsZDQ==',
|
|
20
|
+
* ],
|
|
21
|
+
* });
|
|
11
22
|
* ```
|
|
12
23
|
*/
|
|
13
24
|
create(body: KeyQuorumCreateParams, options?: RequestOptions): APIPromise<KeyQuorum>;
|
|
@@ -16,34 +27,39 @@ export declare class KeyQuorums extends APIResource {
|
|
|
16
27
|
*
|
|
17
28
|
* @example
|
|
18
29
|
* ```ts
|
|
19
|
-
* const
|
|
20
|
-
* '
|
|
30
|
+
* const successResponse = await client.keyQuorums._delete(
|
|
31
|
+
* 'string',
|
|
21
32
|
* );
|
|
22
33
|
* ```
|
|
23
34
|
*/
|
|
24
|
-
_delete(keyQuorumID:
|
|
35
|
+
_delete(keyQuorumID: SharedAPI.KeyQuorumID, params?: KeyQuorumDeleteParams | null | undefined, options?: RequestOptions): APIPromise<SharedAPI.SuccessResponse>;
|
|
25
36
|
/**
|
|
26
37
|
* Update a key quorum by key quorum ID.
|
|
27
38
|
*
|
|
28
39
|
* @example
|
|
29
40
|
* ```ts
|
|
30
41
|
* const keyQuorum = await client.keyQuorums._update(
|
|
31
|
-
* '
|
|
42
|
+
* 'string',
|
|
43
|
+
* {
|
|
44
|
+
* authorization_threshold: 1,
|
|
45
|
+
* display_name: 'Prod key quorum',
|
|
46
|
+
* public_keys: [
|
|
47
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
48
|
+
* ],
|
|
49
|
+
* },
|
|
32
50
|
* );
|
|
33
51
|
* ```
|
|
34
52
|
*/
|
|
35
|
-
_update(keyQuorumID:
|
|
53
|
+
_update(keyQuorumID: SharedAPI.KeyQuorumID, params: KeyQuorumUpdateParams, options?: RequestOptions): APIPromise<KeyQuorum>;
|
|
36
54
|
/**
|
|
37
55
|
* Get a key quorum by ID.
|
|
38
56
|
*
|
|
39
57
|
* @example
|
|
40
58
|
* ```ts
|
|
41
|
-
* const keyQuorum = await client.keyQuorums.get(
|
|
42
|
-
* 'key_quorum_id',
|
|
43
|
-
* );
|
|
59
|
+
* const keyQuorum = await client.keyQuorums.get('string');
|
|
44
60
|
* ```
|
|
45
61
|
*/
|
|
46
|
-
get(keyQuorumID:
|
|
62
|
+
get(keyQuorumID: SharedAPI.KeyQuorumID, options?: RequestOptions): APIPromise<KeyQuorum>;
|
|
47
63
|
}
|
|
48
64
|
/**
|
|
49
65
|
* A key quorum for authorizing wallet operations.
|
|
@@ -51,13 +67,13 @@ export declare class KeyQuorums extends APIResource {
|
|
|
51
67
|
export interface KeyQuorum {
|
|
52
68
|
id: string;
|
|
53
69
|
authorization_keys: Array<KeyQuorum.AuthorizationKey>;
|
|
54
|
-
authorization_threshold
|
|
55
|
-
display_name
|
|
70
|
+
authorization_threshold: number | null;
|
|
71
|
+
display_name: string | null;
|
|
72
|
+
user_ids: Array<string> | null;
|
|
56
73
|
/**
|
|
57
74
|
* List of nested key quorum IDs that are members of this key quorum.
|
|
58
75
|
*/
|
|
59
76
|
key_quorum_ids?: Array<string>;
|
|
60
|
-
user_ids?: Array<string>;
|
|
61
77
|
}
|
|
62
78
|
export declare namespace KeyQuorum {
|
|
63
79
|
interface AuthorizationKey {
|
|
@@ -65,11 +81,76 @@ export declare namespace KeyQuorum {
|
|
|
65
81
|
public_key: string;
|
|
66
82
|
}
|
|
67
83
|
}
|
|
68
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Request input for creating a key quorum.
|
|
86
|
+
*/
|
|
87
|
+
export interface KeyQuorumCreateRequestBody {
|
|
88
|
+
/**
|
|
89
|
+
* The number of keys that must sign for an action to be valid. Must be less than
|
|
90
|
+
* or equal to total number of key quorum members.
|
|
91
|
+
*/
|
|
92
|
+
authorization_threshold?: number;
|
|
93
|
+
display_name?: string;
|
|
94
|
+
/**
|
|
95
|
+
* List of key quorum IDs that should be members of this key quorum. Key quorums
|
|
96
|
+
* can only be nested 1 level deep.
|
|
97
|
+
*/
|
|
98
|
+
key_quorum_ids?: Array<string>;
|
|
69
99
|
/**
|
|
70
|
-
*
|
|
100
|
+
* List of P-256 public keys of the keys that should be authorized to sign on the
|
|
101
|
+
* key quorum, in base64-encoded DER format.
|
|
102
|
+
*/
|
|
103
|
+
public_keys?: Array<string>;
|
|
104
|
+
/**
|
|
105
|
+
* List of user IDs of the users that should be authorized to sign on the key
|
|
106
|
+
* quorum.
|
|
71
107
|
*/
|
|
72
|
-
|
|
108
|
+
user_ids?: Array<string>;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Request input for updating an existing key quorum.
|
|
112
|
+
*/
|
|
113
|
+
export interface KeyQuorumUpdateRequestBody {
|
|
114
|
+
/**
|
|
115
|
+
* The number of keys that must sign for an action to be valid. Must be less than
|
|
116
|
+
* or equal to total number of key quorum members.
|
|
117
|
+
*/
|
|
118
|
+
authorization_threshold?: number;
|
|
119
|
+
display_name?: string;
|
|
120
|
+
/**
|
|
121
|
+
* List of key quorum IDs that should be members of this key quorum. Key quorums
|
|
122
|
+
* can only be nested 1 level deep.
|
|
123
|
+
*/
|
|
124
|
+
key_quorum_ids?: Array<string>;
|
|
125
|
+
/**
|
|
126
|
+
* List of P-256 public keys of the keys that should be authorized to sign on the
|
|
127
|
+
* key quorum, in base64-encoded DER format.
|
|
128
|
+
*/
|
|
129
|
+
public_keys?: Array<string>;
|
|
130
|
+
/**
|
|
131
|
+
* List of user IDs of the users that should be authorized to sign on the key
|
|
132
|
+
* quorum.
|
|
133
|
+
*/
|
|
134
|
+
user_ids?: Array<string>;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Headers required to authorize modifications to key quorums.
|
|
138
|
+
*/
|
|
139
|
+
export interface KeyQuorumAuthorizationHeaders {
|
|
140
|
+
/**
|
|
141
|
+
* ID of your Privy app.
|
|
142
|
+
*/
|
|
143
|
+
'privy-app-id': string;
|
|
144
|
+
/**
|
|
145
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
146
|
+
* should be comma separated.
|
|
147
|
+
*/
|
|
148
|
+
'privy-authorization-signature'?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
151
|
+
* deadline by which the request must be processed.
|
|
152
|
+
*/
|
|
153
|
+
'privy-request-expiry'?: string;
|
|
73
154
|
}
|
|
74
155
|
export interface KeyQuorumCreateParams {
|
|
75
156
|
/**
|
|
@@ -100,6 +181,11 @@ export interface KeyQuorumDeleteParams {
|
|
|
100
181
|
* should be comma separated.
|
|
101
182
|
*/
|
|
102
183
|
'privy-authorization-signature'?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
186
|
+
* deadline by which the request must be processed.
|
|
187
|
+
*/
|
|
188
|
+
'privy-request-expiry'?: string;
|
|
103
189
|
}
|
|
104
190
|
export interface KeyQuorumUpdateParams {
|
|
105
191
|
/**
|
|
@@ -131,8 +217,13 @@ export interface KeyQuorumUpdateParams {
|
|
|
131
217
|
* required, they should be comma separated.
|
|
132
218
|
*/
|
|
133
219
|
'privy-authorization-signature'?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
222
|
+
* representing the deadline by which the request must be processed.
|
|
223
|
+
*/
|
|
224
|
+
'privy-request-expiry'?: string;
|
|
134
225
|
}
|
|
135
226
|
export declare namespace KeyQuorums {
|
|
136
|
-
export { type KeyQuorum as KeyQuorum, type
|
|
227
|
+
export { type KeyQuorum as KeyQuorum, type KeyQuorumCreateRequestBody as KeyQuorumCreateRequestBody, type KeyQuorumUpdateRequestBody as KeyQuorumUpdateRequestBody, type KeyQuorumAuthorizationHeaders as KeyQuorumAuthorizationHeaders, type KeyQuorumCreateParams as KeyQuorumCreateParams, type KeyQuorumDeleteParams as KeyQuorumDeleteParams, type KeyQuorumUpdateParams as KeyQuorumUpdateParams, };
|
|
137
228
|
}
|
|
138
229
|
//# sourceMappingURL=key-quorums.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-quorums.d.mts","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC
|
|
1
|
+
{"version":3,"file":"key-quorums.d.mts","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"m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BAAqB;IACpC;;;OAGG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAEzC;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE/B;;;OAGG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;;OAGG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAEzC;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as SharedAPI from "./shared.js";
|
|
2
3
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
4
|
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* Operations related to key quorums
|
|
7
|
+
*/
|
|
4
8
|
export declare class KeyQuorums extends APIResource {
|
|
5
9
|
/**
|
|
6
10
|
* Create a new key quorum.
|
|
7
11
|
*
|
|
8
12
|
* @example
|
|
9
13
|
* ```ts
|
|
10
|
-
* const keyQuorum = await client.keyQuorums.create(
|
|
14
|
+
* const keyQuorum = await client.keyQuorums.create({
|
|
15
|
+
* authorization_threshold: 1,
|
|
16
|
+
* display_name: 'Prod key quorum',
|
|
17
|
+
* public_keys: [
|
|
18
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
19
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErzZtQr/bMIh3Y8f9ZqseB9i/AfjQ\nhu+agbNqXcJy/TfoNqvc/Y3Mh7gIZ8ZLXQEykycx4mYSpqrxp1lBKqsZDQ==',
|
|
20
|
+
* ],
|
|
21
|
+
* });
|
|
11
22
|
* ```
|
|
12
23
|
*/
|
|
13
24
|
create(body: KeyQuorumCreateParams, options?: RequestOptions): APIPromise<KeyQuorum>;
|
|
@@ -16,34 +27,39 @@ export declare class KeyQuorums extends APIResource {
|
|
|
16
27
|
*
|
|
17
28
|
* @example
|
|
18
29
|
* ```ts
|
|
19
|
-
* const
|
|
20
|
-
* '
|
|
30
|
+
* const successResponse = await client.keyQuorums._delete(
|
|
31
|
+
* 'string',
|
|
21
32
|
* );
|
|
22
33
|
* ```
|
|
23
34
|
*/
|
|
24
|
-
_delete(keyQuorumID:
|
|
35
|
+
_delete(keyQuorumID: SharedAPI.KeyQuorumID, params?: KeyQuorumDeleteParams | null | undefined, options?: RequestOptions): APIPromise<SharedAPI.SuccessResponse>;
|
|
25
36
|
/**
|
|
26
37
|
* Update a key quorum by key quorum ID.
|
|
27
38
|
*
|
|
28
39
|
* @example
|
|
29
40
|
* ```ts
|
|
30
41
|
* const keyQuorum = await client.keyQuorums._update(
|
|
31
|
-
* '
|
|
42
|
+
* 'string',
|
|
43
|
+
* {
|
|
44
|
+
* authorization_threshold: 1,
|
|
45
|
+
* display_name: 'Prod key quorum',
|
|
46
|
+
* public_keys: [
|
|
47
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
48
|
+
* ],
|
|
49
|
+
* },
|
|
32
50
|
* );
|
|
33
51
|
* ```
|
|
34
52
|
*/
|
|
35
|
-
_update(keyQuorumID:
|
|
53
|
+
_update(keyQuorumID: SharedAPI.KeyQuorumID, params: KeyQuorumUpdateParams, options?: RequestOptions): APIPromise<KeyQuorum>;
|
|
36
54
|
/**
|
|
37
55
|
* Get a key quorum by ID.
|
|
38
56
|
*
|
|
39
57
|
* @example
|
|
40
58
|
* ```ts
|
|
41
|
-
* const keyQuorum = await client.keyQuorums.get(
|
|
42
|
-
* 'key_quorum_id',
|
|
43
|
-
* );
|
|
59
|
+
* const keyQuorum = await client.keyQuorums.get('string');
|
|
44
60
|
* ```
|
|
45
61
|
*/
|
|
46
|
-
get(keyQuorumID:
|
|
62
|
+
get(keyQuorumID: SharedAPI.KeyQuorumID, options?: RequestOptions): APIPromise<KeyQuorum>;
|
|
47
63
|
}
|
|
48
64
|
/**
|
|
49
65
|
* A key quorum for authorizing wallet operations.
|
|
@@ -51,13 +67,13 @@ export declare class KeyQuorums extends APIResource {
|
|
|
51
67
|
export interface KeyQuorum {
|
|
52
68
|
id: string;
|
|
53
69
|
authorization_keys: Array<KeyQuorum.AuthorizationKey>;
|
|
54
|
-
authorization_threshold
|
|
55
|
-
display_name
|
|
70
|
+
authorization_threshold: number | null;
|
|
71
|
+
display_name: string | null;
|
|
72
|
+
user_ids: Array<string> | null;
|
|
56
73
|
/**
|
|
57
74
|
* List of nested key quorum IDs that are members of this key quorum.
|
|
58
75
|
*/
|
|
59
76
|
key_quorum_ids?: Array<string>;
|
|
60
|
-
user_ids?: Array<string>;
|
|
61
77
|
}
|
|
62
78
|
export declare namespace KeyQuorum {
|
|
63
79
|
interface AuthorizationKey {
|
|
@@ -65,11 +81,76 @@ export declare namespace KeyQuorum {
|
|
|
65
81
|
public_key: string;
|
|
66
82
|
}
|
|
67
83
|
}
|
|
68
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Request input for creating a key quorum.
|
|
86
|
+
*/
|
|
87
|
+
export interface KeyQuorumCreateRequestBody {
|
|
88
|
+
/**
|
|
89
|
+
* The number of keys that must sign for an action to be valid. Must be less than
|
|
90
|
+
* or equal to total number of key quorum members.
|
|
91
|
+
*/
|
|
92
|
+
authorization_threshold?: number;
|
|
93
|
+
display_name?: string;
|
|
94
|
+
/**
|
|
95
|
+
* List of key quorum IDs that should be members of this key quorum. Key quorums
|
|
96
|
+
* can only be nested 1 level deep.
|
|
97
|
+
*/
|
|
98
|
+
key_quorum_ids?: Array<string>;
|
|
69
99
|
/**
|
|
70
|
-
*
|
|
100
|
+
* List of P-256 public keys of the keys that should be authorized to sign on the
|
|
101
|
+
* key quorum, in base64-encoded DER format.
|
|
102
|
+
*/
|
|
103
|
+
public_keys?: Array<string>;
|
|
104
|
+
/**
|
|
105
|
+
* List of user IDs of the users that should be authorized to sign on the key
|
|
106
|
+
* quorum.
|
|
71
107
|
*/
|
|
72
|
-
|
|
108
|
+
user_ids?: Array<string>;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Request input for updating an existing key quorum.
|
|
112
|
+
*/
|
|
113
|
+
export interface KeyQuorumUpdateRequestBody {
|
|
114
|
+
/**
|
|
115
|
+
* The number of keys that must sign for an action to be valid. Must be less than
|
|
116
|
+
* or equal to total number of key quorum members.
|
|
117
|
+
*/
|
|
118
|
+
authorization_threshold?: number;
|
|
119
|
+
display_name?: string;
|
|
120
|
+
/**
|
|
121
|
+
* List of key quorum IDs that should be members of this key quorum. Key quorums
|
|
122
|
+
* can only be nested 1 level deep.
|
|
123
|
+
*/
|
|
124
|
+
key_quorum_ids?: Array<string>;
|
|
125
|
+
/**
|
|
126
|
+
* List of P-256 public keys of the keys that should be authorized to sign on the
|
|
127
|
+
* key quorum, in base64-encoded DER format.
|
|
128
|
+
*/
|
|
129
|
+
public_keys?: Array<string>;
|
|
130
|
+
/**
|
|
131
|
+
* List of user IDs of the users that should be authorized to sign on the key
|
|
132
|
+
* quorum.
|
|
133
|
+
*/
|
|
134
|
+
user_ids?: Array<string>;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Headers required to authorize modifications to key quorums.
|
|
138
|
+
*/
|
|
139
|
+
export interface KeyQuorumAuthorizationHeaders {
|
|
140
|
+
/**
|
|
141
|
+
* ID of your Privy app.
|
|
142
|
+
*/
|
|
143
|
+
'privy-app-id': string;
|
|
144
|
+
/**
|
|
145
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
146
|
+
* should be comma separated.
|
|
147
|
+
*/
|
|
148
|
+
'privy-authorization-signature'?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
151
|
+
* deadline by which the request must be processed.
|
|
152
|
+
*/
|
|
153
|
+
'privy-request-expiry'?: string;
|
|
73
154
|
}
|
|
74
155
|
export interface KeyQuorumCreateParams {
|
|
75
156
|
/**
|
|
@@ -100,6 +181,11 @@ export interface KeyQuorumDeleteParams {
|
|
|
100
181
|
* should be comma separated.
|
|
101
182
|
*/
|
|
102
183
|
'privy-authorization-signature'?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
186
|
+
* deadline by which the request must be processed.
|
|
187
|
+
*/
|
|
188
|
+
'privy-request-expiry'?: string;
|
|
103
189
|
}
|
|
104
190
|
export interface KeyQuorumUpdateParams {
|
|
105
191
|
/**
|
|
@@ -131,8 +217,13 @@ export interface KeyQuorumUpdateParams {
|
|
|
131
217
|
* required, they should be comma separated.
|
|
132
218
|
*/
|
|
133
219
|
'privy-authorization-signature'?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
222
|
+
* representing the deadline by which the request must be processed.
|
|
223
|
+
*/
|
|
224
|
+
'privy-request-expiry'?: string;
|
|
134
225
|
}
|
|
135
226
|
export declare namespace KeyQuorums {
|
|
136
|
-
export { type KeyQuorum as KeyQuorum, type
|
|
227
|
+
export { type KeyQuorum as KeyQuorum, type KeyQuorumCreateRequestBody as KeyQuorumCreateRequestBody, type KeyQuorumUpdateRequestBody as KeyQuorumUpdateRequestBody, type KeyQuorumAuthorizationHeaders as KeyQuorumAuthorizationHeaders, type KeyQuorumCreateParams as KeyQuorumCreateParams, type KeyQuorumDeleteParams as KeyQuorumDeleteParams, type KeyQuorumUpdateParams as KeyQuorumUpdateParams, };
|
|
137
228
|
}
|
|
138
229
|
//# sourceMappingURL=key-quorums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-quorums.d.ts","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC
|
|
1
|
+
{"version":3,"file":"key-quorums.d.ts","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIpF;;;;;;;;;OASG;IACH,OAAO,CACL,WAAW,EAAE,SAAS,CAAC,WAAW,EAClC,MAAM,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,SAAS,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AM,CAAC,CAAC;IAEzB;;;OAGG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAEzC;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
package/resources/key-quorums.js
CHANGED
|
@@ -5,13 +5,23 @@ exports.KeyQuorums = void 0;
|
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const headers_1 = require("../internal/headers.js");
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Operations related to key quorums
|
|
10
|
+
*/
|
|
8
11
|
class KeyQuorums extends resource_1.APIResource {
|
|
9
12
|
/**
|
|
10
13
|
* Create a new key quorum.
|
|
11
14
|
*
|
|
12
15
|
* @example
|
|
13
16
|
* ```ts
|
|
14
|
-
* const keyQuorum = await client.keyQuorums.create(
|
|
17
|
+
* const keyQuorum = await client.keyQuorums.create({
|
|
18
|
+
* authorization_threshold: 1,
|
|
19
|
+
* display_name: 'Prod key quorum',
|
|
20
|
+
* public_keys: [
|
|
21
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
22
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErzZtQr/bMIh3Y8f9ZqseB9i/AfjQ\nhu+agbNqXcJy/TfoNqvc/Y3Mh7gIZ8ZLXQEykycx4mYSpqrxp1lBKqsZDQ==',
|
|
23
|
+
* ],
|
|
24
|
+
* });
|
|
15
25
|
* ```
|
|
16
26
|
*/
|
|
17
27
|
create(body, options) {
|
|
@@ -22,13 +32,13 @@ class KeyQuorums extends resource_1.APIResource {
|
|
|
22
32
|
*
|
|
23
33
|
* @example
|
|
24
34
|
* ```ts
|
|
25
|
-
* const
|
|
26
|
-
* '
|
|
35
|
+
* const successResponse = await client.keyQuorums._delete(
|
|
36
|
+
* 'string',
|
|
27
37
|
* );
|
|
28
38
|
* ```
|
|
29
39
|
*/
|
|
30
40
|
_delete(keyQuorumID, params = {}, options) {
|
|
31
|
-
const { 'privy-authorization-signature': privyAuthorizationSignature } = params ?? {};
|
|
41
|
+
const { 'privy-authorization-signature': privyAuthorizationSignature, 'privy-request-expiry': privyRequestExpiry, } = params ?? {};
|
|
32
42
|
return this._client.delete((0, path_1.path) `/v1/key_quorums/${keyQuorumID}`, {
|
|
33
43
|
...options,
|
|
34
44
|
headers: (0, headers_1.buildHeaders)([
|
|
@@ -36,6 +46,7 @@ class KeyQuorums extends resource_1.APIResource {
|
|
|
36
46
|
...(privyAuthorizationSignature != null ?
|
|
37
47
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
38
48
|
: undefined),
|
|
49
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
39
50
|
},
|
|
40
51
|
options?.headers,
|
|
41
52
|
]),
|
|
@@ -47,12 +58,19 @@ class KeyQuorums extends resource_1.APIResource {
|
|
|
47
58
|
* @example
|
|
48
59
|
* ```ts
|
|
49
60
|
* const keyQuorum = await client.keyQuorums._update(
|
|
50
|
-
* '
|
|
61
|
+
* 'string',
|
|
62
|
+
* {
|
|
63
|
+
* authorization_threshold: 1,
|
|
64
|
+
* display_name: 'Prod key quorum',
|
|
65
|
+
* public_keys: [
|
|
66
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
67
|
+
* ],
|
|
68
|
+
* },
|
|
51
69
|
* );
|
|
52
70
|
* ```
|
|
53
71
|
*/
|
|
54
72
|
_update(keyQuorumID, params, options) {
|
|
55
|
-
const { 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
|
|
73
|
+
const { 'privy-authorization-signature': privyAuthorizationSignature, 'privy-request-expiry': privyRequestExpiry, ...body } = params;
|
|
56
74
|
return this._client.patch((0, path_1.path) `/v1/key_quorums/${keyQuorumID}`, {
|
|
57
75
|
body,
|
|
58
76
|
...options,
|
|
@@ -61,6 +79,7 @@ class KeyQuorums extends resource_1.APIResource {
|
|
|
61
79
|
...(privyAuthorizationSignature != null ?
|
|
62
80
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
63
81
|
: undefined),
|
|
82
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
64
83
|
},
|
|
65
84
|
options?.headers,
|
|
66
85
|
]),
|
|
@@ -71,9 +90,7 @@ class KeyQuorums extends resource_1.APIResource {
|
|
|
71
90
|
*
|
|
72
91
|
* @example
|
|
73
92
|
* ```ts
|
|
74
|
-
* const keyQuorum = await client.keyQuorums.get(
|
|
75
|
-
* 'key_quorum_id',
|
|
76
|
-
* );
|
|
93
|
+
* const keyQuorum = await client.keyQuorums.get('string');
|
|
77
94
|
* ```
|
|
78
95
|
*/
|
|
79
96
|
get(keyQuorumID, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-quorums.js","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"key-quorums.js","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":";AAAA,sFAAsF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D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,2BAA2B,IAAI,IAAI,CAAC,CAAC;wBACvC,EAAE,+BAA+B,EAAE,2BAA2B,EAAE;wBAClE,CAAC,CAAC,SAAS,CAAC;oBACZ,GAAG,CAAC,kBAAkB,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBAC7F;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,WAAkC,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACF;AA1GD,gCA0GC"}
|
|
@@ -2,13 +2,23 @@
|
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Operations related to key quorums
|
|
7
|
+
*/
|
|
5
8
|
export class KeyQuorums extends APIResource {
|
|
6
9
|
/**
|
|
7
10
|
* Create a new key quorum.
|
|
8
11
|
*
|
|
9
12
|
* @example
|
|
10
13
|
* ```ts
|
|
11
|
-
* const keyQuorum = await client.keyQuorums.create(
|
|
14
|
+
* const keyQuorum = await client.keyQuorums.create({
|
|
15
|
+
* authorization_threshold: 1,
|
|
16
|
+
* display_name: 'Prod key quorum',
|
|
17
|
+
* public_keys: [
|
|
18
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
19
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErzZtQr/bMIh3Y8f9ZqseB9i/AfjQ\nhu+agbNqXcJy/TfoNqvc/Y3Mh7gIZ8ZLXQEykycx4mYSpqrxp1lBKqsZDQ==',
|
|
20
|
+
* ],
|
|
21
|
+
* });
|
|
12
22
|
* ```
|
|
13
23
|
*/
|
|
14
24
|
create(body, options) {
|
|
@@ -19,13 +29,13 @@ export class KeyQuorums extends APIResource {
|
|
|
19
29
|
*
|
|
20
30
|
* @example
|
|
21
31
|
* ```ts
|
|
22
|
-
* const
|
|
23
|
-
* '
|
|
32
|
+
* const successResponse = await client.keyQuorums._delete(
|
|
33
|
+
* 'string',
|
|
24
34
|
* );
|
|
25
35
|
* ```
|
|
26
36
|
*/
|
|
27
37
|
_delete(keyQuorumID, params = {}, options) {
|
|
28
|
-
const { 'privy-authorization-signature': privyAuthorizationSignature } = params ?? {};
|
|
38
|
+
const { 'privy-authorization-signature': privyAuthorizationSignature, 'privy-request-expiry': privyRequestExpiry, } = params ?? {};
|
|
29
39
|
return this._client.delete(path `/v1/key_quorums/${keyQuorumID}`, {
|
|
30
40
|
...options,
|
|
31
41
|
headers: buildHeaders([
|
|
@@ -33,6 +43,7 @@ export class KeyQuorums extends APIResource {
|
|
|
33
43
|
...(privyAuthorizationSignature != null ?
|
|
34
44
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
35
45
|
: undefined),
|
|
46
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
36
47
|
},
|
|
37
48
|
options?.headers,
|
|
38
49
|
]),
|
|
@@ -44,12 +55,19 @@ export class KeyQuorums extends APIResource {
|
|
|
44
55
|
* @example
|
|
45
56
|
* ```ts
|
|
46
57
|
* const keyQuorum = await client.keyQuorums._update(
|
|
47
|
-
* '
|
|
58
|
+
* 'string',
|
|
59
|
+
* {
|
|
60
|
+
* authorization_threshold: 1,
|
|
61
|
+
* display_name: 'Prod key quorum',
|
|
62
|
+
* public_keys: [
|
|
63
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
64
|
+
* ],
|
|
65
|
+
* },
|
|
48
66
|
* );
|
|
49
67
|
* ```
|
|
50
68
|
*/
|
|
51
69
|
_update(keyQuorumID, params, options) {
|
|
52
|
-
const { 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
|
|
70
|
+
const { 'privy-authorization-signature': privyAuthorizationSignature, 'privy-request-expiry': privyRequestExpiry, ...body } = params;
|
|
53
71
|
return this._client.patch(path `/v1/key_quorums/${keyQuorumID}`, {
|
|
54
72
|
body,
|
|
55
73
|
...options,
|
|
@@ -58,6 +76,7 @@ export class KeyQuorums extends APIResource {
|
|
|
58
76
|
...(privyAuthorizationSignature != null ?
|
|
59
77
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
60
78
|
: undefined),
|
|
79
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
61
80
|
},
|
|
62
81
|
options?.headers,
|
|
63
82
|
]),
|
|
@@ -68,9 +87,7 @@ export class KeyQuorums extends APIResource {
|
|
|
68
87
|
*
|
|
69
88
|
* @example
|
|
70
89
|
* ```ts
|
|
71
|
-
* const keyQuorum = await client.keyQuorums.get(
|
|
72
|
-
* 'key_quorum_id',
|
|
73
|
-
* );
|
|
90
|
+
* const keyQuorum = await client.keyQuorums.get('string');
|
|
74
91
|
* ```
|
|
75
92
|
*/
|
|
76
93
|
get(keyQuorumID, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-quorums.mjs","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"key-qu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