@privy-io/api-types 0.7.0 → 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 +43 -0
- package/client.d.mts +37 -28
- package/client.d.mts.map +1 -1
- package/client.d.ts +37 -28
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +79 -106
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +79 -106
- 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 +139 -70
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +139 -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 +796 -427
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +796 -427
- 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 +17 -14
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +17 -14
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +224 -1757
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +224 -1757
- 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 +74 -26
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +74 -26
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +8 -8
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +8 -8
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/policies.d.mts +335 -926
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +335 -926
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +48 -41
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +48 -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 +155 -93
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +155 -93
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +61 -94
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +61 -94
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js.map +1 -1
- 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/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 +1 -0
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +1 -0
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/wallets.d.mts +2377 -971
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +2377 -971
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +18 -6
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +18 -6
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +438 -33
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +438 -33
- 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 +25 -1
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +25 -1
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +721 -72
- package/src/resources/accounts.ts +93 -120
- package/src/resources/aggregations.ts +18 -702
- package/src/resources/apps.ts +187 -110
- package/src/resources/client-auth.ts +1358 -893
- 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 +368 -47
- package/src/resources/intents.ts +370 -3100
- package/src/resources/key-quorums.ts +100 -32
- package/src/resources/policies.ts +583 -1558
- package/src/resources/shared.ts +79 -0
- package/src/resources/swaps.ts +136 -0
- package/src/resources/transactions.ts +185 -91
- package/src/resources/users.ts +79 -132
- package/src/resources/wallet-actions.ts +251 -0
- package/src/resources/wallets/index.ts +144 -16
- package/src/resources/wallets/transactions.ts +2 -0
- package/src/resources/wallets/wallets.ts +2893 -1023
- package/src/resources/webhooks.ts +547 -47
- package/src/resources/yield.ts +29 -0
- 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,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as SharedAPI from './shared';
|
|
4
5
|
import { APIPromise } from '../core/api-promise';
|
|
5
6
|
import { buildHeaders } from '../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../internal/request-options';
|
|
@@ -34,17 +35,20 @@ export class KeyQuorums extends APIResource {
|
|
|
34
35
|
*
|
|
35
36
|
* @example
|
|
36
37
|
* ```ts
|
|
37
|
-
* const
|
|
38
|
-
* '
|
|
38
|
+
* const successResponse = await client.keyQuorums._delete(
|
|
39
|
+
* 'string',
|
|
39
40
|
* );
|
|
40
41
|
* ```
|
|
41
42
|
*/
|
|
42
43
|
_delete(
|
|
43
|
-
keyQuorumID:
|
|
44
|
+
keyQuorumID: SharedAPI.KeyQuorumID,
|
|
44
45
|
params: KeyQuorumDeleteParams | null | undefined = {},
|
|
45
46
|
options?: RequestOptions,
|
|
46
|
-
): APIPromise<
|
|
47
|
-
const {
|
|
47
|
+
): APIPromise<SharedAPI.SuccessResponse> {
|
|
48
|
+
const {
|
|
49
|
+
'privy-authorization-signature': privyAuthorizationSignature,
|
|
50
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
51
|
+
} = params ?? {};
|
|
48
52
|
return this._client.delete(path`/v1/key_quorums/${keyQuorumID}`, {
|
|
49
53
|
...options,
|
|
50
54
|
headers: buildHeaders([
|
|
@@ -52,6 +56,7 @@ export class KeyQuorums extends APIResource {
|
|
|
52
56
|
...(privyAuthorizationSignature != null ?
|
|
53
57
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
54
58
|
: undefined),
|
|
59
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
55
60
|
},
|
|
56
61
|
options?.headers,
|
|
57
62
|
]),
|
|
@@ -64,7 +69,7 @@ export class KeyQuorums extends APIResource {
|
|
|
64
69
|
* @example
|
|
65
70
|
* ```ts
|
|
66
71
|
* const keyQuorum = await client.keyQuorums._update(
|
|
67
|
-
* '
|
|
72
|
+
* 'string',
|
|
68
73
|
* {
|
|
69
74
|
* authorization_threshold: 1,
|
|
70
75
|
* display_name: 'Prod key quorum',
|
|
@@ -76,11 +81,15 @@ export class KeyQuorums extends APIResource {
|
|
|
76
81
|
* ```
|
|
77
82
|
*/
|
|
78
83
|
_update(
|
|
79
|
-
keyQuorumID:
|
|
84
|
+
keyQuorumID: SharedAPI.KeyQuorumID,
|
|
80
85
|
params: KeyQuorumUpdateParams,
|
|
81
86
|
options?: RequestOptions,
|
|
82
87
|
): APIPromise<KeyQuorum> {
|
|
83
|
-
const {
|
|
88
|
+
const {
|
|
89
|
+
'privy-authorization-signature': privyAuthorizationSignature,
|
|
90
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
91
|
+
...body
|
|
92
|
+
} = params;
|
|
84
93
|
return this._client.patch(path`/v1/key_quorums/${keyQuorumID}`, {
|
|
85
94
|
body,
|
|
86
95
|
...options,
|
|
@@ -89,6 +98,7 @@ export class KeyQuorums extends APIResource {
|
|
|
89
98
|
...(privyAuthorizationSignature != null ?
|
|
90
99
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
91
100
|
: undefined),
|
|
101
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
92
102
|
},
|
|
93
103
|
options?.headers,
|
|
94
104
|
]),
|
|
@@ -100,20 +110,46 @@ export class KeyQuorums extends APIResource {
|
|
|
100
110
|
*
|
|
101
111
|
* @example
|
|
102
112
|
* ```ts
|
|
103
|
-
* const keyQuorum = await client.keyQuorums.get(
|
|
104
|
-
* 'key_quorum_id',
|
|
105
|
-
* );
|
|
113
|
+
* const keyQuorum = await client.keyQuorums.get('string');
|
|
106
114
|
* ```
|
|
107
115
|
*/
|
|
108
|
-
get(keyQuorumID:
|
|
116
|
+
get(keyQuorumID: SharedAPI.KeyQuorumID, options?: RequestOptions): APIPromise<KeyQuorum> {
|
|
109
117
|
return this._client.get(path`/v1/key_quorums/${keyQuorumID}`, options);
|
|
110
118
|
}
|
|
111
119
|
}
|
|
112
120
|
|
|
113
121
|
/**
|
|
114
|
-
*
|
|
122
|
+
* A key quorum for authorizing wallet operations.
|
|
115
123
|
*/
|
|
116
|
-
export interface
|
|
124
|
+
export interface KeyQuorum {
|
|
125
|
+
id: string;
|
|
126
|
+
|
|
127
|
+
authorization_keys: Array<KeyQuorum.AuthorizationKey>;
|
|
128
|
+
|
|
129
|
+
authorization_threshold: number | null;
|
|
130
|
+
|
|
131
|
+
display_name: string | null;
|
|
132
|
+
|
|
133
|
+
user_ids: Array<string> | null;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* List of nested key quorum IDs that are members of this key quorum.
|
|
137
|
+
*/
|
|
138
|
+
key_quorum_ids?: Array<string>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export namespace KeyQuorum {
|
|
142
|
+
export interface AuthorizationKey {
|
|
143
|
+
display_name: string | null;
|
|
144
|
+
|
|
145
|
+
public_key: string;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Request input for creating a key quorum.
|
|
151
|
+
*/
|
|
152
|
+
export interface KeyQuorumCreateRequestBody {
|
|
117
153
|
/**
|
|
118
154
|
* The number of keys that must sign for an action to be valid. Must be less than
|
|
119
155
|
* or equal to total number of key quorum members.
|
|
@@ -142,38 +178,56 @@ export interface KeyQuorumCreateParams {
|
|
|
142
178
|
}
|
|
143
179
|
|
|
144
180
|
/**
|
|
145
|
-
*
|
|
181
|
+
* Request input for updating an existing key quorum.
|
|
146
182
|
*/
|
|
147
|
-
export interface
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
183
|
+
export interface KeyQuorumUpdateRequestBody {
|
|
184
|
+
/**
|
|
185
|
+
* The number of keys that must sign for an action to be valid. Must be less than
|
|
186
|
+
* or equal to total number of key quorum members.
|
|
187
|
+
*/
|
|
152
188
|
authorization_threshold?: number;
|
|
153
189
|
|
|
154
190
|
display_name?: string;
|
|
155
191
|
|
|
156
192
|
/**
|
|
157
|
-
* List of
|
|
193
|
+
* List of key quorum IDs that should be members of this key quorum. Key quorums
|
|
194
|
+
* can only be nested 1 level deep.
|
|
158
195
|
*/
|
|
159
196
|
key_quorum_ids?: Array<string>;
|
|
160
197
|
|
|
198
|
+
/**
|
|
199
|
+
* List of P-256 public keys of the keys that should be authorized to sign on the
|
|
200
|
+
* key quorum, in base64-encoded DER format.
|
|
201
|
+
*/
|
|
202
|
+
public_keys?: Array<string>;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* List of user IDs of the users that should be authorized to sign on the key
|
|
206
|
+
* quorum.
|
|
207
|
+
*/
|
|
161
208
|
user_ids?: Array<string>;
|
|
162
209
|
}
|
|
163
210
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Headers required to authorize modifications to key quorums.
|
|
213
|
+
*/
|
|
214
|
+
export interface KeyQuorumAuthorizationHeaders {
|
|
215
|
+
/**
|
|
216
|
+
* ID of your Privy app.
|
|
217
|
+
*/
|
|
218
|
+
'privy-app-id': string;
|
|
167
219
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
220
|
+
/**
|
|
221
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
222
|
+
* should be comma separated.
|
|
223
|
+
*/
|
|
224
|
+
'privy-authorization-signature'?: string;
|
|
171
225
|
|
|
172
|
-
export interface KeyQuorumDeleteResponse {
|
|
173
226
|
/**
|
|
174
|
-
*
|
|
227
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
228
|
+
* deadline by which the request must be processed.
|
|
175
229
|
*/
|
|
176
|
-
|
|
230
|
+
'privy-request-expiry'?: string;
|
|
177
231
|
}
|
|
178
232
|
|
|
179
233
|
export interface KeyQuorumCreateParams {
|
|
@@ -210,6 +264,12 @@ export interface KeyQuorumDeleteParams {
|
|
|
210
264
|
* should be comma separated.
|
|
211
265
|
*/
|
|
212
266
|
'privy-authorization-signature'?: string;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
270
|
+
* deadline by which the request must be processed.
|
|
271
|
+
*/
|
|
272
|
+
'privy-request-expiry'?: string;
|
|
213
273
|
}
|
|
214
274
|
|
|
215
275
|
export interface KeyQuorumUpdateParams {
|
|
@@ -247,13 +307,21 @@ export interface KeyQuorumUpdateParams {
|
|
|
247
307
|
* required, they should be comma separated.
|
|
248
308
|
*/
|
|
249
309
|
'privy-authorization-signature'?: string;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
313
|
+
* representing the deadline by which the request must be processed.
|
|
314
|
+
*/
|
|
315
|
+
'privy-request-expiry'?: string;
|
|
250
316
|
}
|
|
251
317
|
|
|
252
318
|
export declare namespace KeyQuorums {
|
|
253
319
|
export {
|
|
254
|
-
type KeyQuorumCreateParams as KeyQuorumCreateParams,
|
|
255
320
|
type KeyQuorum as KeyQuorum,
|
|
256
|
-
type
|
|
321
|
+
type KeyQuorumCreateRequestBody as KeyQuorumCreateRequestBody,
|
|
322
|
+
type KeyQuorumUpdateRequestBody as KeyQuorumUpdateRequestBody,
|
|
323
|
+
type KeyQuorumAuthorizationHeaders as KeyQuorumAuthorizationHeaders,
|
|
324
|
+
type KeyQuorumCreateParams as KeyQuorumCreateParams,
|
|
257
325
|
type KeyQuorumDeleteParams as KeyQuorumDeleteParams,
|
|
258
326
|
type KeyQuorumUpdateParams as KeyQuorumUpdateParams,
|
|
259
327
|
};
|