@privy-io/api-types 0.10.0 → 0.11.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 +8 -0
- package/client.d.mts +18 -24
- package/client.d.mts.map +1 -1
- package/client.d.ts +18 -24
- package/client.d.ts.map +1 -1
- package/client.js +6 -12
- package/client.js.map +1 -1
- package/client.mjs +6 -12
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/client-auth.d.mts +496 -514
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +496 -514
- 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/embedded-wallets.d.mts +9 -9
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +9 -9
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/fiat.d.mts +110 -0
- package/resources/fiat.d.mts.map +1 -0
- package/resources/fiat.d.ts +110 -0
- package/resources/fiat.d.ts.map +1 -0
- package/resources/fiat.js +9 -0
- package/resources/fiat.js.map +1 -0
- package/resources/fiat.mjs +5 -0
- package/resources/fiat.mjs.map +1 -0
- package/resources/funding.d.mts +46 -46
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +46 -46
- package/resources/funding.d.ts.map +1 -1
- package/resources/index.d.mts +9 -8
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/key-quorums.d.mts +1 -132
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +1 -132
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +0 -92
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +0 -92
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/policies.d.mts +1 -311
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +1 -311
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +0 -229
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +0 -229
- package/resources/policies.mjs.map +1 -1
- package/resources/transactions.d.mts +28 -44
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +28 -44
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +0 -17
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +0 -17
- package/resources/transactions.mjs.map +1 -1
- package/resources/users.d.mts +1 -345
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +1 -345
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +0 -272
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +0 -272
- package/resources/users.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/wallets.d.mts +130 -315
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +130 -315
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +41 -102
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +41 -102
- package/resources/wallets/wallets.mjs.map +1 -1
- package/src/client.ts +106 -152
- package/src/resources/client-auth.ts +743 -787
- package/src/resources/embedded-wallets.ts +14 -14
- package/src/resources/fiat.ts +177 -0
- package/src/resources/funding.ts +65 -65
- package/src/resources/index.ts +86 -106
- package/src/resources/key-quorums.ts +1 -203
- package/src/resources/policies.ts +1 -493
- package/src/resources/transactions.ts +35 -55
- package/src/resources/users.ts +1 -479
- package/src/resources/wallets/index.ts +4 -9
- package/src/resources/wallets/wallets.ts +182 -423
- 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
|
@@ -4,7 +4,6 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
import * as WalletsAPI from './wallets';
|
|
5
5
|
import * as AppsAPI from '../apps';
|
|
6
6
|
import * as SharedAPI from '../shared';
|
|
7
|
-
import * as UsersAPI from '../users';
|
|
8
7
|
import * as BalanceAPI from './balance';
|
|
9
8
|
import { Balance, BalanceGetParams, BalanceGetResponse } from './balance';
|
|
10
9
|
import * as TransactionsAPI from './transactions';
|
|
@@ -15,9 +14,12 @@ import { buildHeaders } from '../../internal/headers';
|
|
|
15
14
|
import { RequestOptions } from '../../internal/request-options';
|
|
16
15
|
import { path } from '../../internal/utils/path';
|
|
17
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Operations related to wallets
|
|
19
|
+
*/
|
|
18
20
|
export class Wallets extends APIResource {
|
|
19
|
-
transactions: TransactionsAPI.Transactions = new TransactionsAPI.Transactions(this._client);
|
|
20
21
|
balance: BalanceAPI.Balance = new BalanceAPI.Balance(this._client);
|
|
22
|
+
transactions: TransactionsAPI.Transactions = new TransactionsAPI.Transactions(this._client);
|
|
21
23
|
|
|
22
24
|
/**
|
|
23
25
|
* Creates a new wallet on the requested chain and for the requested owner.
|
|
@@ -41,6 +43,37 @@ export class Wallets extends APIResource {
|
|
|
41
43
|
});
|
|
42
44
|
}
|
|
43
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Update a wallet's policies or authorization key configuration.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const wallet = await client.wallets.update('wallet_id', {
|
|
52
|
+
* policy_ids: ['tb54eps4z44ed0jepousxi4n'],
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
update(walletID: string, params: WalletUpdateParams, options?: RequestOptions): APIPromise<Wallet> {
|
|
57
|
+
const {
|
|
58
|
+
'privy-authorization-signature': privyAuthorizationSignature,
|
|
59
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
60
|
+
...body
|
|
61
|
+
} = params;
|
|
62
|
+
return this._client.patch(path`/v1/wallets/${walletID}`, {
|
|
63
|
+
body,
|
|
64
|
+
...options,
|
|
65
|
+
headers: buildHeaders([
|
|
66
|
+
{
|
|
67
|
+
...(privyAuthorizationSignature != null ?
|
|
68
|
+
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
69
|
+
: undefined),
|
|
70
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
71
|
+
},
|
|
72
|
+
options?.headers,
|
|
73
|
+
]),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
44
77
|
/**
|
|
45
78
|
* Get all wallets in your app.
|
|
46
79
|
*
|
|
@@ -65,14 +98,14 @@ export class Wallets extends APIResource {
|
|
|
65
98
|
* @example
|
|
66
99
|
* ```ts
|
|
67
100
|
* const walletExportResponseBody =
|
|
68
|
-
* await client.wallets.
|
|
101
|
+
* await client.wallets.export('wallet_id', {
|
|
69
102
|
* encryption_type: 'HPKE',
|
|
70
103
|
* recipient_public_key:
|
|
71
104
|
* 'BDAZLOIdTaPycEYkgG0MvCzbIKJLli/yWkAV5yCa9yOsZ4JsrLweA5MnP8YIiY4k/RRzC+APhhO+P+Hoz/rt7Go=',
|
|
72
105
|
* });
|
|
73
106
|
* ```
|
|
74
107
|
*/
|
|
75
|
-
|
|
108
|
+
export(
|
|
76
109
|
walletID: string,
|
|
77
110
|
params: WalletExportParams,
|
|
78
111
|
options?: RequestOptions,
|
|
@@ -98,21 +131,15 @@ export class Wallets extends APIResource {
|
|
|
98
131
|
}
|
|
99
132
|
|
|
100
133
|
/**
|
|
101
|
-
*
|
|
134
|
+
* Get a wallet by wallet ID.
|
|
102
135
|
*
|
|
103
136
|
* @example
|
|
104
137
|
* ```ts
|
|
105
|
-
* const
|
|
106
|
-
* address: 'address',
|
|
107
|
-
* chain_type: 'ethereum',
|
|
108
|
-
* encryption_type: 'HPKE',
|
|
109
|
-
* entropy_type: 'hd',
|
|
110
|
-
* index: 0,
|
|
111
|
-
* });
|
|
138
|
+
* const wallet = await client.wallets.get('wallet_id');
|
|
112
139
|
* ```
|
|
113
140
|
*/
|
|
114
|
-
|
|
115
|
-
return this._client.
|
|
141
|
+
get(walletID: string, options?: RequestOptions): APIPromise<Wallet> {
|
|
142
|
+
return this._client.get(path`/v1/wallets/${walletID}`, options);
|
|
116
143
|
}
|
|
117
144
|
|
|
118
145
|
/**
|
|
@@ -120,7 +147,7 @@ export class Wallets extends APIResource {
|
|
|
120
147
|
*
|
|
121
148
|
* @example
|
|
122
149
|
* ```ts
|
|
123
|
-
* const rawSignResponse = await client.wallets.
|
|
150
|
+
* const rawSignResponse = await client.wallets.rawSign(
|
|
124
151
|
* 'wallet_id',
|
|
125
152
|
* {
|
|
126
153
|
* params: {
|
|
@@ -133,7 +160,7 @@ export class Wallets extends APIResource {
|
|
|
133
160
|
* );
|
|
134
161
|
* ```
|
|
135
162
|
*/
|
|
136
|
-
|
|
163
|
+
rawSign(
|
|
137
164
|
walletID: string,
|
|
138
165
|
params: WalletRawSignParams,
|
|
139
166
|
options?: RequestOptions,
|
|
@@ -165,7 +192,7 @@ export class Wallets extends APIResource {
|
|
|
165
192
|
*
|
|
166
193
|
* @example
|
|
167
194
|
* ```ts
|
|
168
|
-
* const walletRpcResponse = await client.wallets.
|
|
195
|
+
* const walletRpcResponse = await client.wallets.rpc(
|
|
169
196
|
* 'wallet_id',
|
|
170
197
|
* {
|
|
171
198
|
* method: 'eth_sendTransaction',
|
|
@@ -180,7 +207,7 @@ export class Wallets extends APIResource {
|
|
|
180
207
|
* );
|
|
181
208
|
* ```
|
|
182
209
|
*/
|
|
183
|
-
|
|
210
|
+
rpc(walletID: string, params: WalletRpcParams, options?: RequestOptions): APIPromise<WalletRpcResponse> {
|
|
184
211
|
const {
|
|
185
212
|
'privy-authorization-signature': privyAuthorizationSignature,
|
|
186
213
|
'privy-idempotency-key': privyIdempotencyKey,
|
|
@@ -202,116 +229,10 @@ export class Wallets extends APIResource {
|
|
|
202
229
|
]),
|
|
203
230
|
});
|
|
204
231
|
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Submit a wallet import request.
|
|
208
|
-
*
|
|
209
|
-
* @example
|
|
210
|
-
* ```ts
|
|
211
|
-
* const wallet = await client.wallets._submitImport({
|
|
212
|
-
* wallet: {
|
|
213
|
-
* address: '0xF1DBff66C993EE895C8cb176c30b07A559d76496',
|
|
214
|
-
* chain_type: 'ethereum',
|
|
215
|
-
* ciphertext:
|
|
216
|
-
* 'PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9',
|
|
217
|
-
* encapsulated_key:
|
|
218
|
-
* 'BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=',
|
|
219
|
-
* encryption_type: 'HPKE',
|
|
220
|
-
* entropy_type: 'private-key',
|
|
221
|
-
* },
|
|
222
|
-
* });
|
|
223
|
-
* ```
|
|
224
|
-
*/
|
|
225
|
-
_submitImport(body: WalletSubmitImportParams, options?: RequestOptions): APIPromise<Wallet> {
|
|
226
|
-
return this._client.post('/v1/wallets/import/submit', { body, ...options });
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Update a wallet's policies or authorization key configuration.
|
|
231
|
-
*
|
|
232
|
-
* @example
|
|
233
|
-
* ```ts
|
|
234
|
-
* const wallet = await client.wallets._update('wallet_id', {
|
|
235
|
-
* policy_ids: ['tb54eps4z44ed0jepousxi4n'],
|
|
236
|
-
* });
|
|
237
|
-
* ```
|
|
238
|
-
*/
|
|
239
|
-
_update(walletID: string, params: WalletUpdateParams, options?: RequestOptions): APIPromise<Wallet> {
|
|
240
|
-
const {
|
|
241
|
-
'privy-authorization-signature': privyAuthorizationSignature,
|
|
242
|
-
'privy-request-expiry': privyRequestExpiry,
|
|
243
|
-
...body
|
|
244
|
-
} = params;
|
|
245
|
-
return this._client.patch(path`/v1/wallets/${walletID}`, {
|
|
246
|
-
body,
|
|
247
|
-
...options,
|
|
248
|
-
headers: buildHeaders([
|
|
249
|
-
{
|
|
250
|
-
...(privyAuthorizationSignature != null ?
|
|
251
|
-
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
252
|
-
: undefined),
|
|
253
|
-
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
254
|
-
},
|
|
255
|
-
options?.headers,
|
|
256
|
-
]),
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Obtain a session key to enable wallet access.
|
|
262
|
-
*
|
|
263
|
-
* @example
|
|
264
|
-
* ```ts
|
|
265
|
-
* const response = await client.wallets.authenticateWithJwt({
|
|
266
|
-
* encryption_type: 'HPKE',
|
|
267
|
-
* recipient_public_key:
|
|
268
|
-
* 'DAQcDQgAEx4aoeD72yykviK+fckqE2CItVIGn1rCnvCXZ1HgpOcMEMialRmTrqIK4oZlYd1',
|
|
269
|
-
* user_jwt:
|
|
270
|
-
* 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30',
|
|
271
|
-
* });
|
|
272
|
-
* ```
|
|
273
|
-
*/
|
|
274
|
-
authenticateWithJwt(
|
|
275
|
-
body: WalletAuthenticateWithJwtParams,
|
|
276
|
-
options?: RequestOptions,
|
|
277
|
-
): APIPromise<WalletAuthenticateWithJwtResponse> {
|
|
278
|
-
return this._client.post('/v1/wallets/authenticate', { body, ...options });
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Create wallets with an associated recovery user.
|
|
283
|
-
*
|
|
284
|
-
* @deprecated
|
|
285
|
-
*/
|
|
286
|
-
createWalletsWithRecovery(
|
|
287
|
-
body: WalletCreateWalletsWithRecoveryParams,
|
|
288
|
-
options?: RequestOptions,
|
|
289
|
-
): APIPromise<WalletCreateWalletsWithRecoveryResponse> {
|
|
290
|
-
return this._client.post('/v1/wallets_with_recovery', { body, ...options });
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Get a wallet by wallet ID.
|
|
295
|
-
*
|
|
296
|
-
* @example
|
|
297
|
-
* ```ts
|
|
298
|
-
* const wallet = await client.wallets.get('wallet_id');
|
|
299
|
-
* ```
|
|
300
|
-
*/
|
|
301
|
-
get(walletID: string, options?: RequestOptions): APIPromise<Wallet> {
|
|
302
|
-
return this._client.get(path`/v1/wallets/${walletID}`, options);
|
|
303
|
-
}
|
|
304
232
|
}
|
|
305
233
|
|
|
306
234
|
export type WalletsCursor = Cursor<Wallet>;
|
|
307
235
|
|
|
308
|
-
/**
|
|
309
|
-
* The response body from revoking a wallet delegation.
|
|
310
|
-
*/
|
|
311
|
-
export interface WalletRevokeResponse {
|
|
312
|
-
message: string;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
236
|
/**
|
|
316
237
|
* Additional signers for the wallet.
|
|
317
238
|
*/
|
|
@@ -2962,6 +2883,68 @@ export interface WalletAuthenticateRequestBody {
|
|
|
2962
2883
|
user_jwt: string;
|
|
2963
2884
|
}
|
|
2964
2885
|
|
|
2886
|
+
/**
|
|
2887
|
+
* The response from authenticating a wallet, containing an authorization key and
|
|
2888
|
+
* wallet data.
|
|
2889
|
+
*/
|
|
2890
|
+
export type WalletAuthenticateWithJwtResponse =
|
|
2891
|
+
| WalletAuthenticateWithJwtResponse.WithEncryption
|
|
2892
|
+
| WalletAuthenticateWithJwtResponse.WithoutEncryption;
|
|
2893
|
+
|
|
2894
|
+
export namespace WalletAuthenticateWithJwtResponse {
|
|
2895
|
+
export interface WithEncryption {
|
|
2896
|
+
/**
|
|
2897
|
+
* The encrypted authorization key data.
|
|
2898
|
+
*/
|
|
2899
|
+
encrypted_authorization_key: WithEncryption.EncryptedAuthorizationKey;
|
|
2900
|
+
|
|
2901
|
+
/**
|
|
2902
|
+
* The expiration time of the authorization key in milliseconds since the epoch.
|
|
2903
|
+
*/
|
|
2904
|
+
expires_at: number;
|
|
2905
|
+
|
|
2906
|
+
wallets: Array<WalletsAPI.Wallet>;
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
export namespace WithEncryption {
|
|
2910
|
+
/**
|
|
2911
|
+
* The encrypted authorization key data.
|
|
2912
|
+
*/
|
|
2913
|
+
export interface EncryptedAuthorizationKey {
|
|
2914
|
+
/**
|
|
2915
|
+
* The encrypted authorization key corresponding to the user's current
|
|
2916
|
+
* authentication session.
|
|
2917
|
+
*/
|
|
2918
|
+
ciphertext: string;
|
|
2919
|
+
|
|
2920
|
+
/**
|
|
2921
|
+
* Base64-encoded ephemeral public key used in the HPKE encryption process.
|
|
2922
|
+
* Required for decryption.
|
|
2923
|
+
*/
|
|
2924
|
+
encapsulated_key: string;
|
|
2925
|
+
|
|
2926
|
+
/**
|
|
2927
|
+
* The encryption type used. Currently only supports HPKE.
|
|
2928
|
+
*/
|
|
2929
|
+
encryption_type: 'HPKE';
|
|
2930
|
+
}
|
|
2931
|
+
}
|
|
2932
|
+
|
|
2933
|
+
export interface WithoutEncryption {
|
|
2934
|
+
/**
|
|
2935
|
+
* The raw authorization key data.
|
|
2936
|
+
*/
|
|
2937
|
+
authorization_key: string;
|
|
2938
|
+
|
|
2939
|
+
/**
|
|
2940
|
+
* The expiration time of the authorization key in milliseconds since the epoch.
|
|
2941
|
+
*/
|
|
2942
|
+
expires_at: number;
|
|
2943
|
+
|
|
2944
|
+
wallets: Array<WalletsAPI.Wallet>;
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2965
2948
|
/**
|
|
2966
2949
|
* Headers required to authorize wallet operations.
|
|
2967
2950
|
*/
|
|
@@ -3118,6 +3101,21 @@ export type WalletChainType =
|
|
|
3118
3101
|
| 'starknet'
|
|
3119
3102
|
| 'spark';
|
|
3120
3103
|
|
|
3104
|
+
/**
|
|
3105
|
+
* The response from creating wallets with an associated recovery user.
|
|
3106
|
+
*/
|
|
3107
|
+
export interface WalletCreateWalletsWithRecoveryResponse {
|
|
3108
|
+
/**
|
|
3109
|
+
* The ID of the created user.
|
|
3110
|
+
*/
|
|
3111
|
+
recovery_user_id: string;
|
|
3112
|
+
|
|
3113
|
+
/**
|
|
3114
|
+
* The wallets that were created.
|
|
3115
|
+
*/
|
|
3116
|
+
wallets: Array<Wallet>;
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3121
3119
|
/**
|
|
3122
3120
|
* Information about the custodian managing this wallet.
|
|
3123
3121
|
*/
|
|
@@ -3208,6 +3206,13 @@ export type WalletImportSupportedChains = 'ethereum' | 'solana';
|
|
|
3208
3206
|
*/
|
|
3209
3207
|
export type WalletImportSupportedEntropyTypes = 'private-key' | 'hd';
|
|
3210
3208
|
|
|
3209
|
+
/**
|
|
3210
|
+
* The response body from revoking a wallet delegation.
|
|
3211
|
+
*/
|
|
3212
|
+
export interface WalletRevokeResponse {
|
|
3213
|
+
message: string;
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3211
3216
|
/**
|
|
3212
3217
|
* Request body for wallet RPC operations, discriminated by method.
|
|
3213
3218
|
*/
|
|
@@ -3300,88 +3305,6 @@ export interface WalletUpdateRequestBody {
|
|
|
3300
3305
|
policy_ids?: Array<string>;
|
|
3301
3306
|
}
|
|
3302
3307
|
|
|
3303
|
-
export interface WalletInitImportResponse {
|
|
3304
|
-
/**
|
|
3305
|
-
* The base64-encoded encryption public key to encrypt the wallet entropy with.
|
|
3306
|
-
*/
|
|
3307
|
-
encryption_public_key: string;
|
|
3308
|
-
|
|
3309
|
-
/**
|
|
3310
|
-
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
3311
|
-
*/
|
|
3312
|
-
encryption_type: HpkeEncryption;
|
|
3313
|
-
}
|
|
3314
|
-
|
|
3315
|
-
export type WalletAuthenticateWithJwtResponse =
|
|
3316
|
-
| WalletAuthenticateWithJwtResponse.WithEncryption
|
|
3317
|
-
| WalletAuthenticateWithJwtResponse.WithoutEncryption;
|
|
3318
|
-
|
|
3319
|
-
export namespace WalletAuthenticateWithJwtResponse {
|
|
3320
|
-
export interface WithEncryption {
|
|
3321
|
-
/**
|
|
3322
|
-
* The encrypted authorization key data.
|
|
3323
|
-
*/
|
|
3324
|
-
encrypted_authorization_key: WithEncryption.EncryptedAuthorizationKey;
|
|
3325
|
-
|
|
3326
|
-
/**
|
|
3327
|
-
* The expiration time of the authorization key in milliseconds since the epoch.
|
|
3328
|
-
*/
|
|
3329
|
-
expires_at: number;
|
|
3330
|
-
|
|
3331
|
-
wallets: Array<WalletsAPI.Wallet>;
|
|
3332
|
-
}
|
|
3333
|
-
|
|
3334
|
-
export namespace WithEncryption {
|
|
3335
|
-
/**
|
|
3336
|
-
* The encrypted authorization key data.
|
|
3337
|
-
*/
|
|
3338
|
-
export interface EncryptedAuthorizationKey {
|
|
3339
|
-
/**
|
|
3340
|
-
* The encrypted authorization key corresponding to the user's current
|
|
3341
|
-
* authentication session.
|
|
3342
|
-
*/
|
|
3343
|
-
ciphertext: string;
|
|
3344
|
-
|
|
3345
|
-
/**
|
|
3346
|
-
* Base64-encoded ephemeral public key used in the HPKE encryption process.
|
|
3347
|
-
* Required for decryption.
|
|
3348
|
-
*/
|
|
3349
|
-
encapsulated_key: string;
|
|
3350
|
-
|
|
3351
|
-
/**
|
|
3352
|
-
* The encryption type used. Currently only supports HPKE.
|
|
3353
|
-
*/
|
|
3354
|
-
encryption_type: 'HPKE';
|
|
3355
|
-
}
|
|
3356
|
-
}
|
|
3357
|
-
|
|
3358
|
-
export interface WithoutEncryption {
|
|
3359
|
-
/**
|
|
3360
|
-
* The raw authorization key data.
|
|
3361
|
-
*/
|
|
3362
|
-
authorization_key: string;
|
|
3363
|
-
|
|
3364
|
-
/**
|
|
3365
|
-
* The expiration time of the authorization key in milliseconds since the epoch.
|
|
3366
|
-
*/
|
|
3367
|
-
expires_at: number;
|
|
3368
|
-
|
|
3369
|
-
wallets: Array<WalletsAPI.Wallet>;
|
|
3370
|
-
}
|
|
3371
|
-
}
|
|
3372
|
-
|
|
3373
|
-
export interface WalletCreateWalletsWithRecoveryResponse {
|
|
3374
|
-
/**
|
|
3375
|
-
* The ID of the created user.
|
|
3376
|
-
*/
|
|
3377
|
-
recovery_user_id: string;
|
|
3378
|
-
|
|
3379
|
-
/**
|
|
3380
|
-
* The wallets that were created.
|
|
3381
|
-
*/
|
|
3382
|
-
wallets: Array<Wallet>;
|
|
3383
|
-
}
|
|
3384
|
-
|
|
3385
3308
|
export interface WalletCreateParams {
|
|
3386
3309
|
/**
|
|
3387
3310
|
* Body param: The wallet chain types.
|
|
@@ -3429,6 +3352,48 @@ export interface WalletCreateParams {
|
|
|
3429
3352
|
'privy-idempotency-key'?: string;
|
|
3430
3353
|
}
|
|
3431
3354
|
|
|
3355
|
+
export interface WalletUpdateParams {
|
|
3356
|
+
/**
|
|
3357
|
+
* Body param: Additional signers for the wallet.
|
|
3358
|
+
*/
|
|
3359
|
+
additional_signers?: AdditionalSignerInput;
|
|
3360
|
+
|
|
3361
|
+
/**
|
|
3362
|
+
* Body param: A human-readable label for the wallet. Set to null to clear.
|
|
3363
|
+
*/
|
|
3364
|
+
display_name?: string | null;
|
|
3365
|
+
|
|
3366
|
+
/**
|
|
3367
|
+
* Body param: The owner of the resource, specified as a Privy user ID, a P-256
|
|
3368
|
+
* public key, or null to remove the current owner.
|
|
3369
|
+
*/
|
|
3370
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
3371
|
+
|
|
3372
|
+
/**
|
|
3373
|
+
* Body param: The key quorum ID to set as the owner of the resource. If you
|
|
3374
|
+
* provide this, do not specify an owner.
|
|
3375
|
+
*/
|
|
3376
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
3377
|
+
|
|
3378
|
+
/**
|
|
3379
|
+
* Body param: New policy IDs to enforce on the wallet. Currently, only one policy
|
|
3380
|
+
* is supported per wallet.
|
|
3381
|
+
*/
|
|
3382
|
+
policy_ids?: Array<string>;
|
|
3383
|
+
|
|
3384
|
+
/**
|
|
3385
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
3386
|
+
* required, they should be comma separated.
|
|
3387
|
+
*/
|
|
3388
|
+
'privy-authorization-signature'?: string;
|
|
3389
|
+
|
|
3390
|
+
/**
|
|
3391
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
3392
|
+
* representing the deadline by which the request must be processed.
|
|
3393
|
+
*/
|
|
3394
|
+
'privy-request-expiry'?: string;
|
|
3395
|
+
}
|
|
3396
|
+
|
|
3432
3397
|
export interface WalletListParams extends CursorParams {
|
|
3433
3398
|
/**
|
|
3434
3399
|
* Filter wallets by authorization public key. Returns wallets owned by key quorums
|
|
@@ -3484,60 +3449,6 @@ export interface WalletExportParams {
|
|
|
3484
3449
|
'privy-request-expiry'?: string;
|
|
3485
3450
|
}
|
|
3486
3451
|
|
|
3487
|
-
export type WalletInitImportParams =
|
|
3488
|
-
| WalletInitImportParams.HDInitInput
|
|
3489
|
-
| WalletInitImportParams.PrivateKeyInitInput;
|
|
3490
|
-
|
|
3491
|
-
export declare namespace WalletInitImportParams {
|
|
3492
|
-
export interface HDInitInput {
|
|
3493
|
-
/**
|
|
3494
|
-
* The address of the wallet to import.
|
|
3495
|
-
*/
|
|
3496
|
-
address: string;
|
|
3497
|
-
|
|
3498
|
-
/**
|
|
3499
|
-
* The chain type of the wallet to import. Currently supports `ethereum` and
|
|
3500
|
-
* `solana`.
|
|
3501
|
-
*/
|
|
3502
|
-
chain_type: WalletImportSupportedChains;
|
|
3503
|
-
|
|
3504
|
-
/**
|
|
3505
|
-
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
3506
|
-
*/
|
|
3507
|
-
encryption_type: HpkeEncryption;
|
|
3508
|
-
|
|
3509
|
-
/**
|
|
3510
|
-
* The entropy type of the wallet to import.
|
|
3511
|
-
*/
|
|
3512
|
-
entropy_type: 'hd';
|
|
3513
|
-
|
|
3514
|
-
/**
|
|
3515
|
-
* The index of the wallet to import.
|
|
3516
|
-
*/
|
|
3517
|
-
index: number;
|
|
3518
|
-
}
|
|
3519
|
-
|
|
3520
|
-
export interface PrivateKeyInitInput {
|
|
3521
|
-
/**
|
|
3522
|
-
* The address of the wallet to import.
|
|
3523
|
-
*/
|
|
3524
|
-
address: string;
|
|
3525
|
-
|
|
3526
|
-
/**
|
|
3527
|
-
* The chain type of the wallet to import. Currently supports `ethereum` and
|
|
3528
|
-
* `solana`.
|
|
3529
|
-
*/
|
|
3530
|
-
chain_type: WalletImportSupportedChains;
|
|
3531
|
-
|
|
3532
|
-
/**
|
|
3533
|
-
* The encryption type of the wallet to import. Currently only supports `HPKE`.
|
|
3534
|
-
*/
|
|
3535
|
-
encryption_type: HpkeEncryption;
|
|
3536
|
-
|
|
3537
|
-
entropy_type: 'private-key';
|
|
3538
|
-
}
|
|
3539
|
-
}
|
|
3540
|
-
|
|
3541
3452
|
export interface WalletRawSignParams {
|
|
3542
3453
|
/**
|
|
3543
3454
|
* Body param: Parameters for the `raw_sign` RPC.
|
|
@@ -4511,159 +4422,11 @@ export declare namespace WalletRpcParams {
|
|
|
4511
4422
|
}
|
|
4512
4423
|
}
|
|
4513
4424
|
|
|
4514
|
-
export interface WalletSubmitImportParams {
|
|
4515
|
-
/**
|
|
4516
|
-
* The submission input for importing an HD wallet.
|
|
4517
|
-
*/
|
|
4518
|
-
wallet: HDSubmitInput | PrivateKeySubmitInput;
|
|
4519
|
-
|
|
4520
|
-
/**
|
|
4521
|
-
* Additional signers for the wallet.
|
|
4522
|
-
*/
|
|
4523
|
-
additional_signers?: AdditionalSignerInput;
|
|
4524
|
-
|
|
4525
|
-
/**
|
|
4526
|
-
* A human-readable label for the wallet.
|
|
4527
|
-
*/
|
|
4528
|
-
display_name?: string;
|
|
4529
|
-
|
|
4530
|
-
/**
|
|
4531
|
-
* A customer-provided identifier for mapping to external systems. URL-safe
|
|
4532
|
-
* characters only ([a-zA-Z0-9_-]), max 64 chars. Write-once: cannot be changed
|
|
4533
|
-
* after creation.
|
|
4534
|
-
*/
|
|
4535
|
-
external_id?: string;
|
|
4536
|
-
|
|
4537
|
-
/**
|
|
4538
|
-
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
4539
|
-
* null to remove the current owner.
|
|
4540
|
-
*/
|
|
4541
|
-
owner?: SharedAPI.OwnerInput | null;
|
|
4542
|
-
|
|
4543
|
-
/**
|
|
4544
|
-
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
4545
|
-
* not specify an owner.
|
|
4546
|
-
*/
|
|
4547
|
-
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
4548
|
-
|
|
4549
|
-
/**
|
|
4550
|
-
* An optional list of up to one policy ID to enforce on the wallet.
|
|
4551
|
-
*/
|
|
4552
|
-
policy_ids?: PolicyInput;
|
|
4553
|
-
}
|
|
4554
|
-
|
|
4555
|
-
export interface WalletUpdateParams {
|
|
4556
|
-
/**
|
|
4557
|
-
* Body param: Additional signers for the wallet.
|
|
4558
|
-
*/
|
|
4559
|
-
additional_signers?: AdditionalSignerInput;
|
|
4560
|
-
|
|
4561
|
-
/**
|
|
4562
|
-
* Body param: A human-readable label for the wallet. Set to null to clear.
|
|
4563
|
-
*/
|
|
4564
|
-
display_name?: string | null;
|
|
4565
|
-
|
|
4566
|
-
/**
|
|
4567
|
-
* Body param: The owner of the resource, specified as a Privy user ID, a P-256
|
|
4568
|
-
* public key, or null to remove the current owner.
|
|
4569
|
-
*/
|
|
4570
|
-
owner?: SharedAPI.OwnerInput | null;
|
|
4571
|
-
|
|
4572
|
-
/**
|
|
4573
|
-
* Body param: The key quorum ID to set as the owner of the resource. If you
|
|
4574
|
-
* provide this, do not specify an owner.
|
|
4575
|
-
*/
|
|
4576
|
-
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
4577
|
-
|
|
4578
|
-
/**
|
|
4579
|
-
* Body param: New policy IDs to enforce on the wallet. Currently, only one policy
|
|
4580
|
-
* is supported per wallet.
|
|
4581
|
-
*/
|
|
4582
|
-
policy_ids?: Array<string>;
|
|
4583
|
-
|
|
4584
|
-
/**
|
|
4585
|
-
* Header param: Request authorization signature. If multiple signatures are
|
|
4586
|
-
* required, they should be comma separated.
|
|
4587
|
-
*/
|
|
4588
|
-
'privy-authorization-signature'?: string;
|
|
4589
|
-
|
|
4590
|
-
/**
|
|
4591
|
-
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
4592
|
-
* representing the deadline by which the request must be processed.
|
|
4593
|
-
*/
|
|
4594
|
-
'privy-request-expiry'?: string;
|
|
4595
|
-
}
|
|
4596
|
-
|
|
4597
|
-
export interface WalletAuthenticateWithJwtParams {
|
|
4598
|
-
/**
|
|
4599
|
-
* The encryption type for the authentication response. Currently only supports
|
|
4600
|
-
* HPKE.
|
|
4601
|
-
*/
|
|
4602
|
-
encryption_type: 'HPKE';
|
|
4603
|
-
|
|
4604
|
-
/**
|
|
4605
|
-
* The public key of your ECDH keypair, in base64-encoded, SPKI-format, whose
|
|
4606
|
-
* private key will be able to decrypt the session key.
|
|
4607
|
-
*/
|
|
4608
|
-
recipient_public_key: string;
|
|
4609
|
-
|
|
4610
|
-
/**
|
|
4611
|
-
* The user's JWT, to be used to authenticate the user.
|
|
4612
|
-
*/
|
|
4613
|
-
user_jwt: string;
|
|
4614
|
-
}
|
|
4615
|
-
|
|
4616
|
-
export interface WalletCreateWalletsWithRecoveryParams {
|
|
4617
|
-
primary_signer: WalletCreateWalletsWithRecoveryParams.PrimarySigner;
|
|
4618
|
-
|
|
4619
|
-
recovery_user: WalletCreateWalletsWithRecoveryParams.RecoveryUser;
|
|
4620
|
-
|
|
4621
|
-
wallets: Array<WalletCreateWalletsWithRecoveryParams.Wallet>;
|
|
4622
|
-
}
|
|
4623
|
-
|
|
4624
|
-
export namespace WalletCreateWalletsWithRecoveryParams {
|
|
4625
|
-
export interface PrimarySigner {
|
|
4626
|
-
/**
|
|
4627
|
-
* The JWT subject ID of the user.
|
|
4628
|
-
*/
|
|
4629
|
-
subject_id: string;
|
|
4630
|
-
}
|
|
4631
|
-
|
|
4632
|
-
export interface RecoveryUser {
|
|
4633
|
-
linked_accounts: Array<UsersAPI.LinkedAccountEmailInput | UsersAPI.LinkedAccountCustomJwtInput>;
|
|
4634
|
-
}
|
|
4635
|
-
|
|
4636
|
-
export interface Wallet {
|
|
4637
|
-
/**
|
|
4638
|
-
* The wallet chain types.
|
|
4639
|
-
*/
|
|
4640
|
-
chain_type: WalletsAPI.WalletChainType;
|
|
4641
|
-
|
|
4642
|
-
/**
|
|
4643
|
-
* A human-readable label for the wallet.
|
|
4644
|
-
*/
|
|
4645
|
-
display_name?: string;
|
|
4646
|
-
|
|
4647
|
-
/**
|
|
4648
|
-
* A customer-provided identifier for mapping to external systems. URL-safe
|
|
4649
|
-
* characters only ([a-zA-Z0-9_-]), max 64 chars. Write-once: cannot be changed
|
|
4650
|
-
* after creation.
|
|
4651
|
-
*/
|
|
4652
|
-
external_id?: string;
|
|
4653
|
-
|
|
4654
|
-
/**
|
|
4655
|
-
* An optional list of up to one policy ID to enforce on the wallet.
|
|
4656
|
-
*/
|
|
4657
|
-
policy_ids?: WalletsAPI.PolicyInput;
|
|
4658
|
-
}
|
|
4659
|
-
}
|
|
4660
|
-
|
|
4661
|
-
Wallets.Transactions = Transactions;
|
|
4662
4425
|
Wallets.Balance = Balance;
|
|
4426
|
+
Wallets.Transactions = Transactions;
|
|
4663
4427
|
|
|
4664
4428
|
export declare namespace Wallets {
|
|
4665
4429
|
export {
|
|
4666
|
-
type WalletRevokeResponse as WalletRevokeResponse,
|
|
4667
4430
|
type AdditionalSignerInput as AdditionalSignerInput,
|
|
4668
4431
|
type AdditionalSignerItemInput as AdditionalSignerItemInput,
|
|
4669
4432
|
type Address as Address,
|
|
@@ -4835,12 +4598,14 @@ export declare namespace Wallets {
|
|
|
4835
4598
|
type WalletAPIRevokeAuthorizationKeyInput as WalletAPIRevokeAuthorizationKeyInput,
|
|
4836
4599
|
type WalletAsset as WalletAsset,
|
|
4837
4600
|
type WalletAuthenticateRequestBody as WalletAuthenticateRequestBody,
|
|
4601
|
+
type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse,
|
|
4838
4602
|
type WalletAuthorizationHeaders as WalletAuthorizationHeaders,
|
|
4839
4603
|
type WalletBatchCreateInput as WalletBatchCreateInput,
|
|
4840
4604
|
type WalletBatchCreateResponse as WalletBatchCreateResponse,
|
|
4841
4605
|
type WalletBatchCreateResult as WalletBatchCreateResult,
|
|
4842
4606
|
type WalletBatchItemInput as WalletBatchItemInput,
|
|
4843
4607
|
type WalletChainType as WalletChainType,
|
|
4608
|
+
type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse,
|
|
4844
4609
|
type WalletCustodian as WalletCustodian,
|
|
4845
4610
|
type WalletEntropyType as WalletEntropyType,
|
|
4846
4611
|
type WalletEthereumAsset as WalletEthereumAsset,
|
|
@@ -4849,30 +4614,18 @@ export declare namespace Wallets {
|
|
|
4849
4614
|
type WalletImportInitResponse as WalletImportInitResponse,
|
|
4850
4615
|
type WalletImportSupportedChains as WalletImportSupportedChains,
|
|
4851
4616
|
type WalletImportSupportedEntropyTypes as WalletImportSupportedEntropyTypes,
|
|
4617
|
+
type WalletRevokeResponse as WalletRevokeResponse,
|
|
4852
4618
|
type WalletRpcRequestBody as WalletRpcRequestBody,
|
|
4853
4619
|
type WalletRpcResponse as WalletRpcResponse,
|
|
4854
4620
|
type WalletSolanaAsset as WalletSolanaAsset,
|
|
4855
4621
|
type WalletUpdateRequestBody as WalletUpdateRequestBody,
|
|
4856
|
-
type WalletInitImportResponse as WalletInitImportResponse,
|
|
4857
|
-
type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse,
|
|
4858
|
-
type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse,
|
|
4859
4622
|
type WalletsCursor as WalletsCursor,
|
|
4860
4623
|
type WalletCreateParams as WalletCreateParams,
|
|
4624
|
+
type WalletUpdateParams as WalletUpdateParams,
|
|
4861
4625
|
type WalletListParams as WalletListParams,
|
|
4862
4626
|
type WalletExportParams as WalletExportParams,
|
|
4863
|
-
type WalletInitImportParams as WalletInitImportParams,
|
|
4864
4627
|
type WalletRawSignParams as WalletRawSignParams,
|
|
4865
4628
|
type WalletRpcParams as WalletRpcParams,
|
|
4866
|
-
type WalletSubmitImportParams as WalletSubmitImportParams,
|
|
4867
|
-
type WalletUpdateParams as WalletUpdateParams,
|
|
4868
|
-
type WalletAuthenticateWithJwtParams as WalletAuthenticateWithJwtParams,
|
|
4869
|
-
type WalletCreateWalletsWithRecoveryParams as WalletCreateWalletsWithRecoveryParams,
|
|
4870
|
-
};
|
|
4871
|
-
|
|
4872
|
-
export {
|
|
4873
|
-
Transactions as Transactions,
|
|
4874
|
-
type TransactionGetResponse as TransactionGetResponse,
|
|
4875
|
-
type TransactionGetParams as TransactionGetParams,
|
|
4876
4629
|
};
|
|
4877
4630
|
|
|
4878
4631
|
export {
|
|
@@ -4880,4 +4633,10 @@ export declare namespace Wallets {
|
|
|
4880
4633
|
type BalanceGetResponse as BalanceGetResponse,
|
|
4881
4634
|
type BalanceGetParams as BalanceGetParams,
|
|
4882
4635
|
};
|
|
4636
|
+
|
|
4637
|
+
export {
|
|
4638
|
+
Transactions as Transactions,
|
|
4639
|
+
type TransactionGetResponse as TransactionGetResponse,
|
|
4640
|
+
type TransactionGetParams as TransactionGetParams,
|
|
4641
|
+
};
|
|
4883
4642
|
}
|