@privy-io/node 0.4.1 → 0.5.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 +15 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/lib/identity-token.d.mts.map +1 -1
- package/lib/identity-token.d.ts.map +1 -1
- package/lib/identity-token.js +10 -0
- package/lib/identity-token.js.map +1 -1
- package/lib/identity-token.mjs +10 -0
- package/lib/identity-token.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api/services/ethereum.d.mts +7 -7
- package/public-api/services/ethereum.d.mts.map +1 -1
- package/public-api/services/ethereum.d.ts +7 -7
- package/public-api/services/ethereum.d.ts.map +1 -1
- package/public-api/services/ethereum.js.map +1 -1
- package/public-api/services/ethereum.mjs.map +1 -1
- package/public-api/services/solana.d.mts +4 -4
- package/public-api/services/solana.d.mts.map +1 -1
- package/public-api/services/solana.d.ts +4 -4
- package/public-api/services/solana.d.ts.map +1 -1
- package/public-api/services/solana.js.map +1 -1
- package/public-api/services/solana.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/users.d.mts +2 -2
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +2 -2
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +1 -1
- package/resources/users.mjs +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 +437 -221
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +437 -221
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +2 -2
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +2 -2
- package/resources/wallets/wallets.mjs.map +1 -1
- package/src/client.ts +36 -0
- package/src/lib/identity-token.ts +11 -0
- package/src/public-api/services/ethereum.ts +15 -7
- package/src/public-api/services/solana.ts +9 -4
- package/src/resources/index.ts +18 -0
- package/src/resources/users.ts +2 -2
- package/src/resources/wallets/index.ts +18 -0
- package/src/resources/wallets/wallets.ts +563 -252
- 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
|
@@ -83,8 +83,8 @@ export declare class Wallets extends APIResource {
|
|
|
83
83
|
* @example
|
|
84
84
|
* ```ts
|
|
85
85
|
* const response = await client.wallets._rpc('wallet_id', {
|
|
86
|
-
* method: '
|
|
87
|
-
* params: {
|
|
86
|
+
* method: 'personal_sign',
|
|
87
|
+
* params: { encoding: 'utf-8', message: 'message' },
|
|
88
88
|
* });
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
@@ -215,6 +215,338 @@ export declare namespace Wallet {
|
|
|
215
215
|
* The wallet chain types.
|
|
216
216
|
*/
|
|
217
217
|
export type WalletChainType = 'solana' | 'ethereum' | 'cosmos' | 'stellar' | 'sui' | 'aptos' | 'movement' | 'tron' | 'bitcoin-segwit' | 'near' | 'ton' | 'starknet' | 'spark';
|
|
218
|
+
/**
|
|
219
|
+
* Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
|
|
220
|
+
*/
|
|
221
|
+
export interface EthereumPersonalSignRpcInput {
|
|
222
|
+
method: 'personal_sign';
|
|
223
|
+
params: EthereumPersonalSignRpcInput.Params;
|
|
224
|
+
address?: string;
|
|
225
|
+
chain_type?: 'ethereum';
|
|
226
|
+
}
|
|
227
|
+
export declare namespace EthereumPersonalSignRpcInput {
|
|
228
|
+
interface Params {
|
|
229
|
+
encoding: 'utf-8' | 'hex';
|
|
230
|
+
message: string;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Executes the EVM `eth_signTransaction` RPC to sign a transaction.
|
|
235
|
+
*/
|
|
236
|
+
export interface EthereumSignTransactionRpcInput {
|
|
237
|
+
method: 'eth_signTransaction';
|
|
238
|
+
params: EthereumSignTransactionRpcInput.Params;
|
|
239
|
+
address?: string;
|
|
240
|
+
chain_type?: 'ethereum';
|
|
241
|
+
}
|
|
242
|
+
export declare namespace EthereumSignTransactionRpcInput {
|
|
243
|
+
interface Params {
|
|
244
|
+
transaction: Params.Transaction;
|
|
245
|
+
}
|
|
246
|
+
namespace Params {
|
|
247
|
+
interface Transaction {
|
|
248
|
+
chain_id?: string | number;
|
|
249
|
+
data?: string;
|
|
250
|
+
from?: string;
|
|
251
|
+
gas_limit?: string | number;
|
|
252
|
+
gas_price?: string | number;
|
|
253
|
+
max_fee_per_gas?: string | number;
|
|
254
|
+
max_priority_fee_per_gas?: string | number;
|
|
255
|
+
nonce?: string | number;
|
|
256
|
+
to?: string;
|
|
257
|
+
type?: 0 | 1 | 2;
|
|
258
|
+
value?: string | number;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Executes the EVM `eth_sendTransaction` RPC to sign and broadcast a transaction.
|
|
264
|
+
*/
|
|
265
|
+
export interface EthereumSendTransactionRpcInput {
|
|
266
|
+
caip2: string;
|
|
267
|
+
method: 'eth_sendTransaction';
|
|
268
|
+
params: EthereumSendTransactionRpcInput.Params;
|
|
269
|
+
address?: string;
|
|
270
|
+
chain_type?: 'ethereum';
|
|
271
|
+
sponsor?: boolean;
|
|
272
|
+
}
|
|
273
|
+
export declare namespace EthereumSendTransactionRpcInput {
|
|
274
|
+
interface Params {
|
|
275
|
+
transaction: Params.Transaction;
|
|
276
|
+
}
|
|
277
|
+
namespace Params {
|
|
278
|
+
interface Transaction {
|
|
279
|
+
chain_id?: string | number;
|
|
280
|
+
data?: string;
|
|
281
|
+
from?: string;
|
|
282
|
+
gas_limit?: string | number;
|
|
283
|
+
gas_price?: string | number;
|
|
284
|
+
max_fee_per_gas?: string | number;
|
|
285
|
+
max_priority_fee_per_gas?: string | number;
|
|
286
|
+
nonce?: string | number;
|
|
287
|
+
to?: string;
|
|
288
|
+
type?: 0 | 1 | 2;
|
|
289
|
+
value?: string | number;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Executes the EVM `eth_signTypedData_v4` RPC (EIP-712) to sign a typed data
|
|
295
|
+
* object.
|
|
296
|
+
*/
|
|
297
|
+
export interface EthereumSignTypedDataRpcInput {
|
|
298
|
+
method: 'eth_signTypedData_v4';
|
|
299
|
+
params: EthereumSignTypedDataRpcInput.Params;
|
|
300
|
+
address?: string;
|
|
301
|
+
chain_type?: 'ethereum';
|
|
302
|
+
}
|
|
303
|
+
export declare namespace EthereumSignTypedDataRpcInput {
|
|
304
|
+
interface Params {
|
|
305
|
+
typed_data: Params.TypedData;
|
|
306
|
+
}
|
|
307
|
+
namespace Params {
|
|
308
|
+
interface TypedData {
|
|
309
|
+
domain: {
|
|
310
|
+
[key: string]: unknown;
|
|
311
|
+
};
|
|
312
|
+
message: {
|
|
313
|
+
[key: string]: unknown;
|
|
314
|
+
};
|
|
315
|
+
primary_type: string;
|
|
316
|
+
types: {
|
|
317
|
+
[key: string]: Array<TypedData.Type>;
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
namespace TypedData {
|
|
321
|
+
interface Type {
|
|
322
|
+
name: string;
|
|
323
|
+
type: string;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Signs an EIP-7702 authorization.
|
|
330
|
+
*/
|
|
331
|
+
export interface EthereumSign7702AuthorizationRpcInput {
|
|
332
|
+
method: 'eth_sign7702Authorization';
|
|
333
|
+
params: EthereumSign7702AuthorizationRpcInput.Params;
|
|
334
|
+
address?: string;
|
|
335
|
+
chain_type?: 'ethereum';
|
|
336
|
+
}
|
|
337
|
+
export declare namespace EthereumSign7702AuthorizationRpcInput {
|
|
338
|
+
interface Params {
|
|
339
|
+
chain_id: string | number;
|
|
340
|
+
contract: string;
|
|
341
|
+
nonce?: string | number;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Signs a raw hash on the secp256k1 curve.
|
|
346
|
+
*/
|
|
347
|
+
export interface EthereumSecp256k1SignRpcInput {
|
|
348
|
+
method: 'secp256k1_sign';
|
|
349
|
+
params: EthereumSecp256k1SignRpcInput.Params;
|
|
350
|
+
address?: string;
|
|
351
|
+
chain_type?: 'ethereum';
|
|
352
|
+
}
|
|
353
|
+
export declare namespace EthereumSecp256k1SignRpcInput {
|
|
354
|
+
interface Params {
|
|
355
|
+
hash: string;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Executes the SVM `signTransaction` RPC to sign a transaction.
|
|
360
|
+
*/
|
|
361
|
+
export interface SolanaSignTransactionRpcInput {
|
|
362
|
+
method: 'signTransaction';
|
|
363
|
+
params: SolanaSignTransactionRpcInput.Params;
|
|
364
|
+
address?: string;
|
|
365
|
+
chain_type?: 'solana';
|
|
366
|
+
}
|
|
367
|
+
export declare namespace SolanaSignTransactionRpcInput {
|
|
368
|
+
interface Params {
|
|
369
|
+
encoding: 'base64';
|
|
370
|
+
transaction: string;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Executes the SVM `signAndSendTransaction` RPC to sign and broadcast a
|
|
375
|
+
* transaction.
|
|
376
|
+
*/
|
|
377
|
+
export interface SolanaSignAndSendTransactionRpcInput {
|
|
378
|
+
caip2: string;
|
|
379
|
+
method: 'signAndSendTransaction';
|
|
380
|
+
params: SolanaSignAndSendTransactionRpcInput.Params;
|
|
381
|
+
address?: string;
|
|
382
|
+
chain_type?: 'solana';
|
|
383
|
+
sponsor?: boolean;
|
|
384
|
+
}
|
|
385
|
+
export declare namespace SolanaSignAndSendTransactionRpcInput {
|
|
386
|
+
interface Params {
|
|
387
|
+
encoding: 'base64';
|
|
388
|
+
transaction: string;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Executes the SVM `signMessage` RPC to sign a message.
|
|
393
|
+
*/
|
|
394
|
+
export interface SolanaSignMessageRpcInput {
|
|
395
|
+
method: 'signMessage';
|
|
396
|
+
params: SolanaSignMessageRpcInput.Params;
|
|
397
|
+
address?: string;
|
|
398
|
+
chain_type?: 'solana';
|
|
399
|
+
}
|
|
400
|
+
export declare namespace SolanaSignMessageRpcInput {
|
|
401
|
+
interface Params {
|
|
402
|
+
encoding: 'base64';
|
|
403
|
+
message: string;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Response to the EVM `eth_signTransaction` RPC.
|
|
408
|
+
*/
|
|
409
|
+
export interface EthereumSignTransactionRpcResponse {
|
|
410
|
+
data: EthereumSignTransactionRpcResponse.Data;
|
|
411
|
+
method: 'eth_signTransaction';
|
|
412
|
+
}
|
|
413
|
+
export declare namespace EthereumSignTransactionRpcResponse {
|
|
414
|
+
interface Data {
|
|
415
|
+
encoding: 'rlp';
|
|
416
|
+
signed_transaction: string;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Response to the EVM `eth_sendTransaction` RPC.
|
|
421
|
+
*/
|
|
422
|
+
export interface EthereumSendTransactionRpcResponse {
|
|
423
|
+
data: EthereumSendTransactionRpcResponse.Data;
|
|
424
|
+
method: 'eth_sendTransaction';
|
|
425
|
+
}
|
|
426
|
+
export declare namespace EthereumSendTransactionRpcResponse {
|
|
427
|
+
interface Data {
|
|
428
|
+
caip2: string;
|
|
429
|
+
hash: string;
|
|
430
|
+
transaction_id?: string;
|
|
431
|
+
transaction_request?: Data.TransactionRequest;
|
|
432
|
+
}
|
|
433
|
+
namespace Data {
|
|
434
|
+
interface TransactionRequest {
|
|
435
|
+
chain_id?: string | number;
|
|
436
|
+
data?: string;
|
|
437
|
+
from?: string;
|
|
438
|
+
gas_limit?: string | number;
|
|
439
|
+
gas_price?: string | number;
|
|
440
|
+
max_fee_per_gas?: string | number;
|
|
441
|
+
max_priority_fee_per_gas?: string | number;
|
|
442
|
+
nonce?: string | number;
|
|
443
|
+
to?: string;
|
|
444
|
+
type?: 0 | 1 | 2;
|
|
445
|
+
value?: string | number;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Response to the EVM `personal_sign` RPC.
|
|
451
|
+
*/
|
|
452
|
+
export interface EthereumPersonalSignRpcResponse {
|
|
453
|
+
data: EthereumPersonalSignRpcResponse.Data;
|
|
454
|
+
method: 'personal_sign';
|
|
455
|
+
}
|
|
456
|
+
export declare namespace EthereumPersonalSignRpcResponse {
|
|
457
|
+
interface Data {
|
|
458
|
+
encoding: 'hex';
|
|
459
|
+
signature: string;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Response to the EVM `eth_signTypedData_v4` RPC.
|
|
464
|
+
*/
|
|
465
|
+
export interface EthereumSignTypedDataRpcResponse {
|
|
466
|
+
data: EthereumSignTypedDataRpcResponse.Data;
|
|
467
|
+
method: 'eth_signTypedData_v4';
|
|
468
|
+
}
|
|
469
|
+
export declare namespace EthereumSignTypedDataRpcResponse {
|
|
470
|
+
interface Data {
|
|
471
|
+
encoding: 'hex';
|
|
472
|
+
signature: string;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Response to the EVM `eth_sign7702Authorization` RPC.
|
|
477
|
+
*/
|
|
478
|
+
export interface EthereumSign7702AuthorizationRpcResponse {
|
|
479
|
+
data: EthereumSign7702AuthorizationRpcResponse.Data;
|
|
480
|
+
method: 'eth_sign7702Authorization';
|
|
481
|
+
}
|
|
482
|
+
export declare namespace EthereumSign7702AuthorizationRpcResponse {
|
|
483
|
+
interface Data {
|
|
484
|
+
authorization: Data.Authorization;
|
|
485
|
+
}
|
|
486
|
+
namespace Data {
|
|
487
|
+
interface Authorization {
|
|
488
|
+
chain_id: string | number;
|
|
489
|
+
contract: string;
|
|
490
|
+
nonce: string | number;
|
|
491
|
+
r: string;
|
|
492
|
+
s: string;
|
|
493
|
+
y_parity: number;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Response to the EVM `secp256k1_sign` RPC.
|
|
499
|
+
*/
|
|
500
|
+
export interface EthereumSecp256k1SignRpcResponse {
|
|
501
|
+
data: EthereumSecp256k1SignRpcResponse.Data;
|
|
502
|
+
method: 'secp256k1_sign';
|
|
503
|
+
}
|
|
504
|
+
export declare namespace EthereumSecp256k1SignRpcResponse {
|
|
505
|
+
interface Data {
|
|
506
|
+
encoding: 'hex';
|
|
507
|
+
signature: string;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Response to the SVM `signTransaction` RPC.
|
|
512
|
+
*/
|
|
513
|
+
export interface SolanaSignTransactionRpcResponse {
|
|
514
|
+
data: SolanaSignTransactionRpcResponse.Data;
|
|
515
|
+
method: 'signTransaction';
|
|
516
|
+
}
|
|
517
|
+
export declare namespace SolanaSignTransactionRpcResponse {
|
|
518
|
+
interface Data {
|
|
519
|
+
encoding: 'base64';
|
|
520
|
+
signed_transaction: string;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Response to the SVM `signAndSendTransaction` RPC.
|
|
525
|
+
*/
|
|
526
|
+
export interface SolanaSignAndSendTransactionRpcResponse {
|
|
527
|
+
data: SolanaSignAndSendTransactionRpcResponse.Data;
|
|
528
|
+
method: 'signAndSendTransaction';
|
|
529
|
+
}
|
|
530
|
+
export declare namespace SolanaSignAndSendTransactionRpcResponse {
|
|
531
|
+
interface Data {
|
|
532
|
+
caip2: string;
|
|
533
|
+
hash: string;
|
|
534
|
+
transaction_id?: string;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Response to the SVM `signMessage` RPC.
|
|
539
|
+
*/
|
|
540
|
+
export interface SolanaSignMessageRpcResponse {
|
|
541
|
+
data: SolanaSignMessageRpcResponse.Data;
|
|
542
|
+
method: 'signMessage';
|
|
543
|
+
}
|
|
544
|
+
export declare namespace SolanaSignMessageRpcResponse {
|
|
545
|
+
interface Data {
|
|
546
|
+
encoding: 'base64';
|
|
547
|
+
signature: string;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
218
550
|
export interface WalletExportResponse {
|
|
219
551
|
/**
|
|
220
552
|
* The encrypted private key.
|
|
@@ -249,126 +581,10 @@ export declare namespace WalletRawSignResponse {
|
|
|
249
581
|
signature: string;
|
|
250
582
|
}
|
|
251
583
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
method: 'signTransaction';
|
|
257
|
-
}
|
|
258
|
-
namespace SolanaSignTransactionRpcResponse {
|
|
259
|
-
interface Data {
|
|
260
|
-
encoding: 'base64';
|
|
261
|
-
signed_transaction: string;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
interface SolanaSignAndSendTransactionRpcResponse {
|
|
265
|
-
data: SolanaSignAndSendTransactionRpcResponse.Data;
|
|
266
|
-
method: 'signAndSendTransaction';
|
|
267
|
-
}
|
|
268
|
-
namespace SolanaSignAndSendTransactionRpcResponse {
|
|
269
|
-
interface Data {
|
|
270
|
-
caip2: string;
|
|
271
|
-
hash: string;
|
|
272
|
-
transaction_id?: string;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
interface SolanaSignMessageRpcResponse {
|
|
276
|
-
data: SolanaSignMessageRpcResponse.Data;
|
|
277
|
-
method: 'signMessage';
|
|
278
|
-
}
|
|
279
|
-
namespace SolanaSignMessageRpcResponse {
|
|
280
|
-
interface Data {
|
|
281
|
-
encoding: 'base64';
|
|
282
|
-
signature: string;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
interface EthereumSignTransactionRpcResponse {
|
|
286
|
-
data: EthereumSignTransactionRpcResponse.Data;
|
|
287
|
-
method: 'eth_signTransaction';
|
|
288
|
-
}
|
|
289
|
-
namespace EthereumSignTransactionRpcResponse {
|
|
290
|
-
interface Data {
|
|
291
|
-
encoding: 'rlp';
|
|
292
|
-
signed_transaction: string;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
interface EthereumSendTransactionRpcResponse {
|
|
296
|
-
data: EthereumSendTransactionRpcResponse.Data;
|
|
297
|
-
method: 'eth_sendTransaction';
|
|
298
|
-
}
|
|
299
|
-
namespace EthereumSendTransactionRpcResponse {
|
|
300
|
-
interface Data {
|
|
301
|
-
caip2: string;
|
|
302
|
-
hash: string;
|
|
303
|
-
transaction_id?: string;
|
|
304
|
-
transaction_request?: Data.TransactionRequest;
|
|
305
|
-
}
|
|
306
|
-
namespace Data {
|
|
307
|
-
interface TransactionRequest {
|
|
308
|
-
chain_id?: string | number;
|
|
309
|
-
data?: string;
|
|
310
|
-
from?: string;
|
|
311
|
-
gas_limit?: string | number;
|
|
312
|
-
gas_price?: string | number;
|
|
313
|
-
max_fee_per_gas?: string | number;
|
|
314
|
-
max_priority_fee_per_gas?: string | number;
|
|
315
|
-
nonce?: string | number;
|
|
316
|
-
to?: string;
|
|
317
|
-
type?: 0 | 1 | 2;
|
|
318
|
-
value?: string | number;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
interface EthereumPersonalSignRpcResponse {
|
|
323
|
-
data: EthereumPersonalSignRpcResponse.Data;
|
|
324
|
-
method: 'personal_sign';
|
|
325
|
-
}
|
|
326
|
-
namespace EthereumPersonalSignRpcResponse {
|
|
327
|
-
interface Data {
|
|
328
|
-
encoding: 'hex';
|
|
329
|
-
signature: string;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
interface EthereumSignTypedDataRpcResponse {
|
|
333
|
-
data: EthereumSignTypedDataRpcResponse.Data;
|
|
334
|
-
method: 'eth_signTypedData_v4';
|
|
335
|
-
}
|
|
336
|
-
namespace EthereumSignTypedDataRpcResponse {
|
|
337
|
-
interface Data {
|
|
338
|
-
encoding: 'hex';
|
|
339
|
-
signature: string;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
interface EthereumSign7702AuthorizationRpcResponse {
|
|
343
|
-
data: EthereumSign7702AuthorizationRpcResponse.Data;
|
|
344
|
-
method: 'eth_sign7702Authorization';
|
|
345
|
-
}
|
|
346
|
-
namespace EthereumSign7702AuthorizationRpcResponse {
|
|
347
|
-
interface Data {
|
|
348
|
-
authorization: Data.Authorization;
|
|
349
|
-
}
|
|
350
|
-
namespace Data {
|
|
351
|
-
interface Authorization {
|
|
352
|
-
chain_id: string | number;
|
|
353
|
-
contract: string;
|
|
354
|
-
nonce: string | number;
|
|
355
|
-
r: string;
|
|
356
|
-
s: string;
|
|
357
|
-
y_parity: number;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
interface EthereumSecp256k1SignRpcResponse {
|
|
362
|
-
data: EthereumSecp256k1SignRpcResponse.Data;
|
|
363
|
-
method: 'secp256k1_sign';
|
|
364
|
-
}
|
|
365
|
-
namespace EthereumSecp256k1SignRpcResponse {
|
|
366
|
-
interface Data {
|
|
367
|
-
encoding: 'hex';
|
|
368
|
-
signature: string;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
}
|
|
584
|
+
/**
|
|
585
|
+
* Response to the EVM `personal_sign` RPC.
|
|
586
|
+
*/
|
|
587
|
+
export type WalletRpcResponse = EthereumPersonalSignRpcResponse | EthereumSignTypedDataRpcResponse | EthereumSignTransactionRpcResponse | EthereumSendTransactionRpcResponse | EthereumSign7702AuthorizationRpcResponse | EthereumSecp256k1SignRpcResponse | SolanaSignMessageRpcResponse | SolanaSignTransactionRpcResponse | SolanaSignAndSendTransactionRpcResponse;
|
|
372
588
|
export type WalletAuthenticateWithJwtResponse = WalletAuthenticateWithJwtResponse.WithEncryption | WalletAuthenticateWithJwtResponse.WithoutEncryption;
|
|
373
589
|
export declare namespace WalletAuthenticateWithJwtResponse {
|
|
374
590
|
interface WithEncryption {
|
|
@@ -549,7 +765,7 @@ export interface WalletRawSignParams {
|
|
|
549
765
|
/**
|
|
550
766
|
* Body param: Sign a pre-computed hash
|
|
551
767
|
*/
|
|
552
|
-
params: WalletRawSignParams.Hash | WalletRawSignParams.
|
|
768
|
+
params: WalletRawSignParams.Hash | WalletRawSignParams.Bytes;
|
|
553
769
|
/**
|
|
554
770
|
* Header param: Request authorization signature. If multiple signatures are
|
|
555
771
|
* required, they should be comma separated.
|
|
@@ -574,7 +790,7 @@ export declare namespace WalletRawSignParams {
|
|
|
574
790
|
/**
|
|
575
791
|
* Hash and sign bytes (Tron only)
|
|
576
792
|
*/
|
|
577
|
-
interface
|
|
793
|
+
interface Bytes {
|
|
578
794
|
/**
|
|
579
795
|
* The bytes to hash and sign.
|
|
580
796
|
*/
|
|
@@ -585,17 +801,17 @@ export declare namespace WalletRawSignParams {
|
|
|
585
801
|
encoding: 'utf-8';
|
|
586
802
|
}
|
|
587
803
|
}
|
|
588
|
-
export type WalletRpcParams = WalletRpcParams.
|
|
804
|
+
export type WalletRpcParams = WalletRpcParams.EthereumPersonalSignRpcInput | WalletRpcParams.EthereumSignTypedDataRpcInput | WalletRpcParams.EthereumSignTransactionRpcInput | WalletRpcParams.EthereumSendTransactionRpcInput | WalletRpcParams.EthereumSign7702AuthorizationRpcInput | WalletRpcParams.EthereumSecp256k1SignRpcInput | WalletRpcParams.SolanaSignMessageRpcInput | WalletRpcParams.SolanaSignTransactionRpcInput | WalletRpcParams.SolanaSignAndSendTransactionRpcInput;
|
|
589
805
|
export declare namespace WalletRpcParams {
|
|
590
|
-
interface
|
|
806
|
+
interface EthereumPersonalSignRpcInput {
|
|
591
807
|
/**
|
|
592
808
|
* Body param:
|
|
593
809
|
*/
|
|
594
|
-
method: '
|
|
810
|
+
method: 'personal_sign';
|
|
595
811
|
/**
|
|
596
812
|
* Body param:
|
|
597
813
|
*/
|
|
598
|
-
params:
|
|
814
|
+
params: EthereumPersonalSignRpcInput.Params;
|
|
599
815
|
/**
|
|
600
816
|
* Body param:
|
|
601
817
|
*/
|
|
@@ -615,39 +831,21 @@ export declare namespace WalletRpcParams {
|
|
|
615
831
|
*/
|
|
616
832
|
'privy-idempotency-key'?: string;
|
|
617
833
|
}
|
|
618
|
-
namespace
|
|
834
|
+
namespace EthereumPersonalSignRpcInput {
|
|
619
835
|
interface Params {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
namespace Params {
|
|
623
|
-
interface Transaction {
|
|
624
|
-
chain_id?: string | number;
|
|
625
|
-
data?: string;
|
|
626
|
-
from?: string;
|
|
627
|
-
gas_limit?: string | number;
|
|
628
|
-
gas_price?: string | number;
|
|
629
|
-
max_fee_per_gas?: string | number;
|
|
630
|
-
max_priority_fee_per_gas?: string | number;
|
|
631
|
-
nonce?: string | number;
|
|
632
|
-
to?: string;
|
|
633
|
-
type?: 0 | 1 | 2;
|
|
634
|
-
value?: string | number;
|
|
635
|
-
}
|
|
836
|
+
encoding: 'utf-8' | 'hex';
|
|
837
|
+
message: string;
|
|
636
838
|
}
|
|
637
839
|
}
|
|
638
|
-
interface
|
|
639
|
-
/**
|
|
640
|
-
* Body param:
|
|
641
|
-
*/
|
|
642
|
-
caip2: string;
|
|
840
|
+
interface EthereumSignTypedDataRpcInput {
|
|
643
841
|
/**
|
|
644
842
|
* Body param:
|
|
645
843
|
*/
|
|
646
|
-
method: '
|
|
844
|
+
method: 'eth_signTypedData_v4';
|
|
647
845
|
/**
|
|
648
846
|
* Body param:
|
|
649
847
|
*/
|
|
650
|
-
params:
|
|
848
|
+
params: EthereumSignTypedDataRpcInput.Params;
|
|
651
849
|
/**
|
|
652
850
|
* Body param:
|
|
653
851
|
*/
|
|
@@ -656,10 +854,6 @@ export declare namespace WalletRpcParams {
|
|
|
656
854
|
* Body param:
|
|
657
855
|
*/
|
|
658
856
|
chain_type?: 'ethereum';
|
|
659
|
-
/**
|
|
660
|
-
* Body param:
|
|
661
|
-
*/
|
|
662
|
-
sponsor?: boolean;
|
|
663
857
|
/**
|
|
664
858
|
* Header param: Request authorization signature. If multiple signatures are
|
|
665
859
|
* required, they should be comma separated.
|
|
@@ -671,35 +865,40 @@ export declare namespace WalletRpcParams {
|
|
|
671
865
|
*/
|
|
672
866
|
'privy-idempotency-key'?: string;
|
|
673
867
|
}
|
|
674
|
-
namespace
|
|
868
|
+
namespace EthereumSignTypedDataRpcInput {
|
|
675
869
|
interface Params {
|
|
676
|
-
|
|
870
|
+
typed_data: Params.TypedData;
|
|
677
871
|
}
|
|
678
872
|
namespace Params {
|
|
679
|
-
interface
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
873
|
+
interface TypedData {
|
|
874
|
+
domain: {
|
|
875
|
+
[key: string]: unknown;
|
|
876
|
+
};
|
|
877
|
+
message: {
|
|
878
|
+
[key: string]: unknown;
|
|
879
|
+
};
|
|
880
|
+
primary_type: string;
|
|
881
|
+
types: {
|
|
882
|
+
[key: string]: Array<TypedData.Type>;
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
namespace TypedData {
|
|
886
|
+
interface Type {
|
|
887
|
+
name: string;
|
|
888
|
+
type: string;
|
|
889
|
+
}
|
|
691
890
|
}
|
|
692
891
|
}
|
|
693
892
|
}
|
|
694
|
-
interface
|
|
893
|
+
interface EthereumSignTransactionRpcInput {
|
|
695
894
|
/**
|
|
696
895
|
* Body param:
|
|
697
896
|
*/
|
|
698
|
-
method: '
|
|
897
|
+
method: 'eth_signTransaction';
|
|
699
898
|
/**
|
|
700
899
|
* Body param:
|
|
701
900
|
*/
|
|
702
|
-
params:
|
|
901
|
+
params: EthereumSignTransactionRpcInput.Params;
|
|
703
902
|
/**
|
|
704
903
|
* Body param:
|
|
705
904
|
*/
|
|
@@ -719,21 +918,39 @@ export declare namespace WalletRpcParams {
|
|
|
719
918
|
*/
|
|
720
919
|
'privy-idempotency-key'?: string;
|
|
721
920
|
}
|
|
722
|
-
namespace
|
|
921
|
+
namespace EthereumSignTransactionRpcInput {
|
|
723
922
|
interface Params {
|
|
724
|
-
|
|
725
|
-
|
|
923
|
+
transaction: Params.Transaction;
|
|
924
|
+
}
|
|
925
|
+
namespace Params {
|
|
926
|
+
interface Transaction {
|
|
927
|
+
chain_id?: string | number;
|
|
928
|
+
data?: string;
|
|
929
|
+
from?: string;
|
|
930
|
+
gas_limit?: string | number;
|
|
931
|
+
gas_price?: string | number;
|
|
932
|
+
max_fee_per_gas?: string | number;
|
|
933
|
+
max_priority_fee_per_gas?: string | number;
|
|
934
|
+
nonce?: string | number;
|
|
935
|
+
to?: string;
|
|
936
|
+
type?: 0 | 1 | 2;
|
|
937
|
+
value?: string | number;
|
|
938
|
+
}
|
|
726
939
|
}
|
|
727
940
|
}
|
|
728
|
-
interface
|
|
941
|
+
interface EthereumSendTransactionRpcInput {
|
|
729
942
|
/**
|
|
730
943
|
* Body param:
|
|
731
944
|
*/
|
|
732
|
-
|
|
945
|
+
caip2: string;
|
|
733
946
|
/**
|
|
734
947
|
* Body param:
|
|
735
948
|
*/
|
|
736
|
-
|
|
949
|
+
method: 'eth_sendTransaction';
|
|
950
|
+
/**
|
|
951
|
+
* Body param:
|
|
952
|
+
*/
|
|
953
|
+
params: EthereumSendTransactionRpcInput.Params;
|
|
737
954
|
/**
|
|
738
955
|
* Body param:
|
|
739
956
|
*/
|
|
@@ -742,6 +959,10 @@ export declare namespace WalletRpcParams {
|
|
|
742
959
|
* Body param:
|
|
743
960
|
*/
|
|
744
961
|
chain_type?: 'ethereum';
|
|
962
|
+
/**
|
|
963
|
+
* Body param:
|
|
964
|
+
*/
|
|
965
|
+
sponsor?: boolean;
|
|
745
966
|
/**
|
|
746
967
|
* Header param: Request authorization signature. If multiple signatures are
|
|
747
968
|
* required, they should be comma separated.
|
|
@@ -753,28 +974,23 @@ export declare namespace WalletRpcParams {
|
|
|
753
974
|
*/
|
|
754
975
|
'privy-idempotency-key'?: string;
|
|
755
976
|
}
|
|
756
|
-
namespace
|
|
977
|
+
namespace EthereumSendTransactionRpcInput {
|
|
757
978
|
interface Params {
|
|
758
|
-
|
|
979
|
+
transaction: Params.Transaction;
|
|
759
980
|
}
|
|
760
981
|
namespace Params {
|
|
761
|
-
interface
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
namespace TypedData {
|
|
774
|
-
interface Type {
|
|
775
|
-
name: string;
|
|
776
|
-
type: string;
|
|
777
|
-
}
|
|
982
|
+
interface Transaction {
|
|
983
|
+
chain_id?: string | number;
|
|
984
|
+
data?: string;
|
|
985
|
+
from?: string;
|
|
986
|
+
gas_limit?: string | number;
|
|
987
|
+
gas_price?: string | number;
|
|
988
|
+
max_fee_per_gas?: string | number;
|
|
989
|
+
max_priority_fee_per_gas?: string | number;
|
|
990
|
+
nonce?: string | number;
|
|
991
|
+
to?: string;
|
|
992
|
+
type?: 0 | 1 | 2;
|
|
993
|
+
value?: string | number;
|
|
778
994
|
}
|
|
779
995
|
}
|
|
780
996
|
}
|
|
@@ -846,15 +1062,15 @@ export declare namespace WalletRpcParams {
|
|
|
846
1062
|
hash: string;
|
|
847
1063
|
}
|
|
848
1064
|
}
|
|
849
|
-
interface
|
|
1065
|
+
interface SolanaSignMessageRpcInput {
|
|
850
1066
|
/**
|
|
851
1067
|
* Body param:
|
|
852
1068
|
*/
|
|
853
|
-
method: '
|
|
1069
|
+
method: 'signMessage';
|
|
854
1070
|
/**
|
|
855
1071
|
* Body param:
|
|
856
1072
|
*/
|
|
857
|
-
params:
|
|
1073
|
+
params: SolanaSignMessageRpcInput.Params;
|
|
858
1074
|
/**
|
|
859
1075
|
* Body param:
|
|
860
1076
|
*/
|
|
@@ -874,25 +1090,21 @@ export declare namespace WalletRpcParams {
|
|
|
874
1090
|
*/
|
|
875
1091
|
'privy-idempotency-key'?: string;
|
|
876
1092
|
}
|
|
877
|
-
namespace
|
|
1093
|
+
namespace SolanaSignMessageRpcInput {
|
|
878
1094
|
interface Params {
|
|
879
1095
|
encoding: 'base64';
|
|
880
|
-
|
|
1096
|
+
message: string;
|
|
881
1097
|
}
|
|
882
1098
|
}
|
|
883
|
-
interface
|
|
884
|
-
/**
|
|
885
|
-
* Body param:
|
|
886
|
-
*/
|
|
887
|
-
caip2: string;
|
|
1099
|
+
interface SolanaSignTransactionRpcInput {
|
|
888
1100
|
/**
|
|
889
1101
|
* Body param:
|
|
890
1102
|
*/
|
|
891
|
-
method: '
|
|
1103
|
+
method: 'signTransaction';
|
|
892
1104
|
/**
|
|
893
1105
|
* Body param:
|
|
894
1106
|
*/
|
|
895
|
-
params:
|
|
1107
|
+
params: SolanaSignTransactionRpcInput.Params;
|
|
896
1108
|
/**
|
|
897
1109
|
* Body param:
|
|
898
1110
|
*/
|
|
@@ -901,10 +1113,6 @@ export declare namespace WalletRpcParams {
|
|
|
901
1113
|
* Body param:
|
|
902
1114
|
*/
|
|
903
1115
|
chain_type?: 'solana';
|
|
904
|
-
/**
|
|
905
|
-
* Body param:
|
|
906
|
-
*/
|
|
907
|
-
sponsor?: boolean;
|
|
908
1116
|
/**
|
|
909
1117
|
* Header param: Request authorization signature. If multiple signatures are
|
|
910
1118
|
* required, they should be comma separated.
|
|
@@ -916,21 +1124,25 @@ export declare namespace WalletRpcParams {
|
|
|
916
1124
|
*/
|
|
917
1125
|
'privy-idempotency-key'?: string;
|
|
918
1126
|
}
|
|
919
|
-
namespace
|
|
1127
|
+
namespace SolanaSignTransactionRpcInput {
|
|
920
1128
|
interface Params {
|
|
921
1129
|
encoding: 'base64';
|
|
922
1130
|
transaction: string;
|
|
923
1131
|
}
|
|
924
1132
|
}
|
|
925
|
-
interface
|
|
1133
|
+
interface SolanaSignAndSendTransactionRpcInput {
|
|
926
1134
|
/**
|
|
927
1135
|
* Body param:
|
|
928
1136
|
*/
|
|
929
|
-
|
|
1137
|
+
caip2: string;
|
|
930
1138
|
/**
|
|
931
1139
|
* Body param:
|
|
932
1140
|
*/
|
|
933
|
-
|
|
1141
|
+
method: 'signAndSendTransaction';
|
|
1142
|
+
/**
|
|
1143
|
+
* Body param:
|
|
1144
|
+
*/
|
|
1145
|
+
params: SolanaSignAndSendTransactionRpcInput.Params;
|
|
934
1146
|
/**
|
|
935
1147
|
* Body param:
|
|
936
1148
|
*/
|
|
@@ -939,6 +1151,10 @@ export declare namespace WalletRpcParams {
|
|
|
939
1151
|
* Body param:
|
|
940
1152
|
*/
|
|
941
1153
|
chain_type?: 'solana';
|
|
1154
|
+
/**
|
|
1155
|
+
* Body param:
|
|
1156
|
+
*/
|
|
1157
|
+
sponsor?: boolean;
|
|
942
1158
|
/**
|
|
943
1159
|
* Header param: Request authorization signature. If multiple signatures are
|
|
944
1160
|
* required, they should be comma separated.
|
|
@@ -950,10 +1166,10 @@ export declare namespace WalletRpcParams {
|
|
|
950
1166
|
*/
|
|
951
1167
|
'privy-idempotency-key'?: string;
|
|
952
1168
|
}
|
|
953
|
-
namespace
|
|
1169
|
+
namespace SolanaSignAndSendTransactionRpcInput {
|
|
954
1170
|
interface Params {
|
|
955
1171
|
encoding: 'base64';
|
|
956
|
-
|
|
1172
|
+
transaction: string;
|
|
957
1173
|
}
|
|
958
1174
|
}
|
|
959
1175
|
}
|
|
@@ -1146,7 +1362,7 @@ export declare namespace WalletCreateWalletsWithRecoveryParams {
|
|
|
1146
1362
|
}
|
|
1147
1363
|
}
|
|
1148
1364
|
export declare namespace Wallets {
|
|
1149
|
-
export { type CurveSigningChainType as CurveSigningChainType, type FirstClassChainType as FirstClassChainType, type Wallet as Wallet, type WalletChainType as WalletChainType, type WalletExportResponse as WalletExportResponse, type WalletInitImportResponse as WalletInitImportResponse, type WalletRawSignResponse as WalletRawSignResponse, type WalletRpcResponse as WalletRpcResponse, type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse, type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse, type WalletsCursor as WalletsCursor, type WalletCreateParams as WalletCreateParams, type WalletListParams as WalletListParams, type WalletExportParams as WalletExportParams, type WalletInitImportParams as WalletInitImportParams, type WalletRawSignParams as WalletRawSignParams, type WalletRpcParams as WalletRpcParams, type WalletSubmitImportParams as WalletSubmitImportParams, type WalletUpdateParams as WalletUpdateParams, type WalletAuthenticateWithJwtParams as WalletAuthenticateWithJwtParams, type WalletCreateWalletsWithRecoveryParams as WalletCreateWalletsWithRecoveryParams, };
|
|
1365
|
+
export { type CurveSigningChainType as CurveSigningChainType, type FirstClassChainType as FirstClassChainType, type Wallet as Wallet, type WalletChainType as WalletChainType, type EthereumPersonalSignRpcInput as EthereumPersonalSignRpcInput, type EthereumSignTransactionRpcInput as EthereumSignTransactionRpcInput, type EthereumSendTransactionRpcInput as EthereumSendTransactionRpcInput, type EthereumSignTypedDataRpcInput as EthereumSignTypedDataRpcInput, type EthereumSign7702AuthorizationRpcInput as EthereumSign7702AuthorizationRpcInput, type EthereumSecp256k1SignRpcInput as EthereumSecp256k1SignRpcInput, type SolanaSignTransactionRpcInput as SolanaSignTransactionRpcInput, type SolanaSignAndSendTransactionRpcInput as SolanaSignAndSendTransactionRpcInput, type SolanaSignMessageRpcInput as SolanaSignMessageRpcInput, type EthereumSignTransactionRpcResponse as EthereumSignTransactionRpcResponse, type EthereumSendTransactionRpcResponse as EthereumSendTransactionRpcResponse, type EthereumPersonalSignRpcResponse as EthereumPersonalSignRpcResponse, type EthereumSignTypedDataRpcResponse as EthereumSignTypedDataRpcResponse, type EthereumSign7702AuthorizationRpcResponse as EthereumSign7702AuthorizationRpcResponse, type EthereumSecp256k1SignRpcResponse as EthereumSecp256k1SignRpcResponse, type SolanaSignTransactionRpcResponse as SolanaSignTransactionRpcResponse, type SolanaSignAndSendTransactionRpcResponse as SolanaSignAndSendTransactionRpcResponse, type SolanaSignMessageRpcResponse as SolanaSignMessageRpcResponse, type WalletExportResponse as WalletExportResponse, type WalletInitImportResponse as WalletInitImportResponse, type WalletRawSignResponse as WalletRawSignResponse, type WalletRpcResponse as WalletRpcResponse, type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse, type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse, type WalletsCursor as WalletsCursor, type WalletCreateParams as WalletCreateParams, type WalletListParams as WalletListParams, type WalletExportParams as WalletExportParams, type WalletInitImportParams as WalletInitImportParams, type WalletRawSignParams as WalletRawSignParams, type WalletRpcParams as WalletRpcParams, type WalletSubmitImportParams as WalletSubmitImportParams, type WalletUpdateParams as WalletUpdateParams, type WalletAuthenticateWithJwtParams as WalletAuthenticateWithJwtParams, type WalletCreateWalletsWithRecoveryParams as WalletCreateWalletsWithRecoveryParams, };
|
|
1150
1366
|
export { Transactions as Transactions, type TransactionGetResponse as TransactionGetResponse, type TransactionGetParams as TransactionGetParams, };
|
|
1151
1367
|
export { Balance as Balance, type BalanceGetResponse as BalanceGetResponse, type BalanceGetParams as BalanceGetParams, };
|
|
1152
1368
|
}
|