@privy-io/api-types 0.1.1 → 0.2.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/client-auth.d.mts +1 -1
  10. package/resources/client-auth.d.mts.map +1 -1
  11. package/resources/client-auth.d.ts +1 -1
  12. package/resources/client-auth.d.ts.map +1 -1
  13. package/resources/embedded-wallets.d.mts +2 -2
  14. package/resources/embedded-wallets.d.mts.map +1 -1
  15. package/resources/embedded-wallets.d.ts +2 -2
  16. package/resources/embedded-wallets.d.ts.map +1 -1
  17. package/resources/index.d.mts +1 -1
  18. package/resources/index.d.mts.map +1 -1
  19. package/resources/index.d.ts +1 -1
  20. package/resources/index.d.ts.map +1 -1
  21. package/resources/index.js.map +1 -1
  22. package/resources/index.mjs.map +1 -1
  23. package/resources/key-quorums.d.mts +18 -3
  24. package/resources/key-quorums.d.mts.map +1 -1
  25. package/resources/key-quorums.d.ts +18 -3
  26. package/resources/key-quorums.d.ts.map +1 -1
  27. package/resources/policies.d.mts +6 -4
  28. package/resources/policies.d.mts.map +1 -1
  29. package/resources/policies.d.ts +6 -4
  30. package/resources/policies.d.ts.map +1 -1
  31. package/resources/users.d.mts +3 -3
  32. package/resources/users.d.mts.map +1 -1
  33. package/resources/users.d.ts +3 -3
  34. package/resources/users.d.ts.map +1 -1
  35. package/resources/users.js +1 -1
  36. package/resources/users.mjs +1 -1
  37. package/resources/wallets/index.d.mts +1 -1
  38. package/resources/wallets/index.d.mts.map +1 -1
  39. package/resources/wallets/index.d.ts +1 -1
  40. package/resources/wallets/index.d.ts.map +1 -1
  41. package/resources/wallets/index.js.map +1 -1
  42. package/resources/wallets/index.mjs.map +1 -1
  43. package/resources/wallets/transactions.d.mts +1 -0
  44. package/resources/wallets/transactions.d.mts.map +1 -1
  45. package/resources/wallets/transactions.d.ts +1 -0
  46. package/resources/wallets/transactions.d.ts.map +1 -1
  47. package/resources/wallets/wallets.d.mts +545 -211
  48. package/resources/wallets/wallets.d.mts.map +1 -1
  49. package/resources/wallets/wallets.d.ts +545 -211
  50. package/resources/wallets/wallets.d.ts.map +1 -1
  51. package/resources/wallets/wallets.js +7 -3
  52. package/resources/wallets/wallets.js.map +1 -1
  53. package/resources/wallets/wallets.mjs +7 -3
  54. package/resources/wallets/wallets.mjs.map +1 -1
  55. package/src/client.ts +40 -0
  56. package/src/resources/client-auth.ts +1 -1
  57. package/src/resources/embedded-wallets.ts +2 -2
  58. package/src/resources/index.ts +20 -0
  59. package/src/resources/key-quorums.ts +18 -3
  60. package/src/resources/policies.ts +6 -4
  61. package/src/resources/users.ts +3 -3
  62. package/src/resources/wallets/index.ts +20 -0
  63. package/src/resources/wallets/transactions.ts +2 -0
  64. package/src/resources/wallets/wallets.ts +709 -230
  65. package/src/version.ts +1 -1
  66. package/version.d.mts +1 -1
  67. package/version.d.ts +1 -1
  68. package/version.js +1 -1
  69. package/version.mjs +1 -1
@@ -68,7 +68,11 @@ export declare class Wallets extends APIResource {
68
68
  * ```ts
69
69
  * const response = await client.wallets._rawSign(
70
70
  * 'wallet_id',
71
- * { params: {} },
71
+ * {
72
+ * params: {
73
+ * hash: '0x0775aeed9c9ce6e0fbc4db25c5e4e6368029651c905c286f813126a09025a21e',
74
+ * },
75
+ * },
72
76
  * );
73
77
  * ```
74
78
  */
@@ -79,8 +83,8 @@ export declare class Wallets extends APIResource {
79
83
  * @example
80
84
  * ```ts
81
85
  * const response = await client.wallets._rpc('wallet_id', {
82
- * method: 'eth_signTransaction',
83
- * params: { transaction: {} },
86
+ * method: 'personal_sign',
87
+ * params: { encoding: 'utf-8', message: 'message' },
84
88
  * });
85
89
  * ```
86
90
  */
@@ -217,6 +221,383 @@ export type WalletChainType = 'solana' | 'ethereum' | 'cosmos' | 'stellar' | 'su
217
221
  export interface WalletRevokeResponse {
218
222
  message: string;
219
223
  }
224
+ /**
225
+ * Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
226
+ */
227
+ export interface EthereumPersonalSignRpcInput {
228
+ method: 'personal_sign';
229
+ params: EthereumPersonalSignRpcInput.Params;
230
+ address?: string;
231
+ chain_type?: 'ethereum';
232
+ }
233
+ export declare namespace EthereumPersonalSignRpcInput {
234
+ interface Params {
235
+ encoding: 'utf-8' | 'hex';
236
+ message: string;
237
+ }
238
+ }
239
+ /**
240
+ * Executes the EVM `eth_signTransaction` RPC to sign a transaction.
241
+ */
242
+ export interface EthereumSignTransactionRpcInput {
243
+ method: 'eth_signTransaction';
244
+ params: EthereumSignTransactionRpcInput.Params;
245
+ address?: string;
246
+ chain_type?: 'ethereum';
247
+ }
248
+ export declare namespace EthereumSignTransactionRpcInput {
249
+ interface Params {
250
+ transaction: Params.Transaction;
251
+ }
252
+ namespace Params {
253
+ interface Transaction {
254
+ chain_id?: string | number;
255
+ data?: string;
256
+ from?: string;
257
+ gas_limit?: string | number;
258
+ gas_price?: string | number;
259
+ max_fee_per_gas?: string | number;
260
+ max_priority_fee_per_gas?: string | number;
261
+ nonce?: string | number;
262
+ to?: string;
263
+ type?: 0 | 1 | 2;
264
+ value?: string | number;
265
+ }
266
+ }
267
+ }
268
+ /**
269
+ * Executes the EVM `eth_sendTransaction` RPC to sign and broadcast a transaction.
270
+ */
271
+ export interface EthereumSendTransactionRpcInput {
272
+ caip2: string;
273
+ method: 'eth_sendTransaction';
274
+ params: EthereumSendTransactionRpcInput.Params;
275
+ address?: string;
276
+ chain_type?: 'ethereum';
277
+ sponsor?: boolean;
278
+ }
279
+ export declare namespace EthereumSendTransactionRpcInput {
280
+ interface Params {
281
+ transaction: Params.Transaction;
282
+ }
283
+ namespace Params {
284
+ interface Transaction {
285
+ chain_id?: string | number;
286
+ data?: string;
287
+ from?: string;
288
+ gas_limit?: string | number;
289
+ gas_price?: string | number;
290
+ max_fee_per_gas?: string | number;
291
+ max_priority_fee_per_gas?: string | number;
292
+ nonce?: string | number;
293
+ to?: string;
294
+ type?: 0 | 1 | 2;
295
+ value?: string | number;
296
+ }
297
+ }
298
+ }
299
+ /**
300
+ * Executes the EVM `eth_signTypedData_v4` RPC (EIP-712) to sign a typed data
301
+ * object.
302
+ */
303
+ export interface EthereumSignTypedDataRpcInput {
304
+ method: 'eth_signTypedData_v4';
305
+ params: EthereumSignTypedDataRpcInput.Params;
306
+ address?: string;
307
+ chain_type?: 'ethereum';
308
+ }
309
+ export declare namespace EthereumSignTypedDataRpcInput {
310
+ interface Params {
311
+ typed_data: Params.TypedData;
312
+ }
313
+ namespace Params {
314
+ interface TypedData {
315
+ domain: {
316
+ [key: string]: unknown;
317
+ };
318
+ message: {
319
+ [key: string]: unknown;
320
+ };
321
+ primary_type: string;
322
+ types: {
323
+ [key: string]: Array<TypedData.Type>;
324
+ };
325
+ }
326
+ namespace TypedData {
327
+ interface Type {
328
+ name: string;
329
+ type: string;
330
+ }
331
+ }
332
+ }
333
+ }
334
+ /**
335
+ * Executes an RPC method to hash and sign a UserOperation.
336
+ */
337
+ export interface EthereumSignUserOperationRpcInput {
338
+ method: 'eth_signUserOperation';
339
+ params: EthereumSignUserOperationRpcInput.Params;
340
+ address?: string;
341
+ chain_type?: 'ethereum';
342
+ }
343
+ export declare namespace EthereumSignUserOperationRpcInput {
344
+ interface Params {
345
+ chain_id: string | number;
346
+ contract: string;
347
+ user_operation: Params.UserOperation;
348
+ }
349
+ namespace Params {
350
+ interface UserOperation {
351
+ call_data: string;
352
+ call_gas_limit: string;
353
+ max_fee_per_gas: string;
354
+ max_priority_fee_per_gas: string;
355
+ nonce: string;
356
+ paymaster: string;
357
+ paymaster_data: string;
358
+ paymaster_post_op_gas_limit: string;
359
+ paymaster_verification_gas_limit: string;
360
+ pre_verification_gas: string;
361
+ sender: string;
362
+ verification_gas_limit: string;
363
+ }
364
+ }
365
+ }
366
+ /**
367
+ * Signs an EIP-7702 authorization.
368
+ */
369
+ export interface EthereumSign7702AuthorizationRpcInput {
370
+ method: 'eth_sign7702Authorization';
371
+ params: EthereumSign7702AuthorizationRpcInput.Params;
372
+ address?: string;
373
+ chain_type?: 'ethereum';
374
+ }
375
+ export declare namespace EthereumSign7702AuthorizationRpcInput {
376
+ interface Params {
377
+ chain_id: string | number;
378
+ contract: string;
379
+ nonce?: string | number;
380
+ }
381
+ }
382
+ /**
383
+ * Signs a raw hash on the secp256k1 curve.
384
+ */
385
+ export interface EthereumSecp256k1SignRpcInput {
386
+ method: 'secp256k1_sign';
387
+ params: EthereumSecp256k1SignRpcInput.Params;
388
+ address?: string;
389
+ chain_type?: 'ethereum';
390
+ }
391
+ export declare namespace EthereumSecp256k1SignRpcInput {
392
+ interface Params {
393
+ hash: string;
394
+ }
395
+ }
396
+ /**
397
+ * Executes the SVM `signTransaction` RPC to sign a transaction.
398
+ */
399
+ export interface SolanaSignTransactionRpcInput {
400
+ method: 'signTransaction';
401
+ params: SolanaSignTransactionRpcInput.Params;
402
+ address?: string;
403
+ chain_type?: 'solana';
404
+ }
405
+ export declare namespace SolanaSignTransactionRpcInput {
406
+ interface Params {
407
+ encoding: 'base64';
408
+ transaction: string;
409
+ }
410
+ }
411
+ /**
412
+ * Executes the SVM `signAndSendTransaction` RPC to sign and broadcast a
413
+ * transaction.
414
+ */
415
+ export interface SolanaSignAndSendTransactionRpcInput {
416
+ caip2: string;
417
+ method: 'signAndSendTransaction';
418
+ params: SolanaSignAndSendTransactionRpcInput.Params;
419
+ address?: string;
420
+ chain_type?: 'solana';
421
+ sponsor?: boolean;
422
+ }
423
+ export declare namespace SolanaSignAndSendTransactionRpcInput {
424
+ interface Params {
425
+ encoding: 'base64';
426
+ transaction: string;
427
+ }
428
+ }
429
+ /**
430
+ * Executes the SVM `signMessage` RPC to sign a message.
431
+ */
432
+ export interface SolanaSignMessageRpcInput {
433
+ method: 'signMessage';
434
+ params: SolanaSignMessageRpcInput.Params;
435
+ address?: string;
436
+ chain_type?: 'solana';
437
+ }
438
+ export declare namespace SolanaSignMessageRpcInput {
439
+ interface Params {
440
+ encoding: 'base64';
441
+ message: string;
442
+ }
443
+ }
444
+ /**
445
+ * Response to the EVM `eth_signTransaction` RPC.
446
+ */
447
+ export interface EthereumSignTransactionRpcResponse {
448
+ data: EthereumSignTransactionRpcResponse.Data;
449
+ method: 'eth_signTransaction';
450
+ }
451
+ export declare namespace EthereumSignTransactionRpcResponse {
452
+ interface Data {
453
+ encoding: 'rlp';
454
+ signed_transaction: string;
455
+ }
456
+ }
457
+ /**
458
+ * Response to the EVM `eth_sendTransaction` RPC.
459
+ */
460
+ export interface EthereumSendTransactionRpcResponse {
461
+ data: EthereumSendTransactionRpcResponse.Data;
462
+ method: 'eth_sendTransaction';
463
+ }
464
+ export declare namespace EthereumSendTransactionRpcResponse {
465
+ interface Data {
466
+ caip2: string;
467
+ hash: string;
468
+ transaction_id?: string;
469
+ transaction_request?: Data.TransactionRequest;
470
+ }
471
+ namespace Data {
472
+ interface TransactionRequest {
473
+ chain_id?: string | number;
474
+ data?: string;
475
+ from?: string;
476
+ gas_limit?: string | number;
477
+ gas_price?: string | number;
478
+ max_fee_per_gas?: string | number;
479
+ max_priority_fee_per_gas?: string | number;
480
+ nonce?: string | number;
481
+ to?: string;
482
+ type?: 0 | 1 | 2;
483
+ value?: string | number;
484
+ }
485
+ }
486
+ }
487
+ /**
488
+ * Response to the EVM `personal_sign` RPC.
489
+ */
490
+ export interface EthereumPersonalSignRpcResponse {
491
+ data: EthereumPersonalSignRpcResponse.Data;
492
+ method: 'personal_sign';
493
+ }
494
+ export declare namespace EthereumPersonalSignRpcResponse {
495
+ interface Data {
496
+ encoding: 'hex';
497
+ signature: string;
498
+ }
499
+ }
500
+ /**
501
+ * Response to the EVM `eth_signTypedData_v4` RPC.
502
+ */
503
+ export interface EthereumSignTypedDataRpcResponse {
504
+ data: EthereumSignTypedDataRpcResponse.Data;
505
+ method: 'eth_signTypedData_v4';
506
+ }
507
+ export declare namespace EthereumSignTypedDataRpcResponse {
508
+ interface Data {
509
+ encoding: 'hex';
510
+ signature: string;
511
+ }
512
+ }
513
+ /**
514
+ * Response to the EVM `eth_signUserOperation` RPC.
515
+ */
516
+ export interface EthereumSignUserOperationRpcResponse {
517
+ data: EthereumSignUserOperationRpcResponse.Data;
518
+ method: 'eth_signUserOperation';
519
+ }
520
+ export declare namespace EthereumSignUserOperationRpcResponse {
521
+ interface Data {
522
+ encoding: 'hex';
523
+ signature: string;
524
+ }
525
+ }
526
+ /**
527
+ * Response to the EVM `eth_sign7702Authorization` RPC.
528
+ */
529
+ export interface EthereumSign7702AuthorizationRpcResponse {
530
+ data: EthereumSign7702AuthorizationRpcResponse.Data;
531
+ method: 'eth_sign7702Authorization';
532
+ }
533
+ export declare namespace EthereumSign7702AuthorizationRpcResponse {
534
+ interface Data {
535
+ authorization: Data.Authorization;
536
+ }
537
+ namespace Data {
538
+ interface Authorization {
539
+ chain_id: string | number;
540
+ contract: string;
541
+ nonce: string | number;
542
+ r: string;
543
+ s: string;
544
+ y_parity: number;
545
+ }
546
+ }
547
+ }
548
+ /**
549
+ * Response to the EVM `secp256k1_sign` RPC.
550
+ */
551
+ export interface EthereumSecp256k1SignRpcResponse {
552
+ data: EthereumSecp256k1SignRpcResponse.Data;
553
+ method: 'secp256k1_sign';
554
+ }
555
+ export declare namespace EthereumSecp256k1SignRpcResponse {
556
+ interface Data {
557
+ encoding: 'hex';
558
+ signature: string;
559
+ }
560
+ }
561
+ /**
562
+ * Response to the SVM `signTransaction` RPC.
563
+ */
564
+ export interface SolanaSignTransactionRpcResponse {
565
+ data: SolanaSignTransactionRpcResponse.Data;
566
+ method: 'signTransaction';
567
+ }
568
+ export declare namespace SolanaSignTransactionRpcResponse {
569
+ interface Data {
570
+ encoding: 'base64';
571
+ signed_transaction: string;
572
+ }
573
+ }
574
+ /**
575
+ * Response to the SVM `signAndSendTransaction` RPC.
576
+ */
577
+ export interface SolanaSignAndSendTransactionRpcResponse {
578
+ data: SolanaSignAndSendTransactionRpcResponse.Data;
579
+ method: 'signAndSendTransaction';
580
+ }
581
+ export declare namespace SolanaSignAndSendTransactionRpcResponse {
582
+ interface Data {
583
+ caip2: string;
584
+ hash: string;
585
+ transaction_id?: string;
586
+ }
587
+ }
588
+ /**
589
+ * Response to the SVM `signMessage` RPC.
590
+ */
591
+ export interface SolanaSignMessageRpcResponse {
592
+ data: SolanaSignMessageRpcResponse.Data;
593
+ method: 'signMessage';
594
+ }
595
+ export declare namespace SolanaSignMessageRpcResponse {
596
+ interface Data {
597
+ encoding: 'base64';
598
+ signature: string;
599
+ }
600
+ }
220
601
  export interface WalletExportResponse {
221
602
  /**
222
603
  * The encrypted private key.
@@ -251,126 +632,10 @@ export declare namespace WalletRawSignResponse {
251
632
  signature: string;
252
633
  }
253
634
  }
254
- export type WalletRpcResponse = WalletRpcResponse.SolanaSignTransactionRpcResponse | WalletRpcResponse.SolanaSignAndSendTransactionRpcResponse | WalletRpcResponse.SolanaSignMessageRpcResponse | WalletRpcResponse.EthereumSignTransactionRpcResponse | WalletRpcResponse.EthereumSendTransactionRpcResponse | WalletRpcResponse.EthereumPersonalSignRpcResponse | WalletRpcResponse.EthereumSignTypedDataRpcResponse | WalletRpcResponse.EthereumSign7702AuthorizationRpcResponse | WalletRpcResponse.EthereumSecp256k1SignRpcResponse;
255
- export declare namespace WalletRpcResponse {
256
- interface SolanaSignTransactionRpcResponse {
257
- data: SolanaSignTransactionRpcResponse.Data;
258
- method: 'signTransaction';
259
- }
260
- namespace SolanaSignTransactionRpcResponse {
261
- interface Data {
262
- encoding: 'base64';
263
- signed_transaction: string;
264
- }
265
- }
266
- interface SolanaSignAndSendTransactionRpcResponse {
267
- data: SolanaSignAndSendTransactionRpcResponse.Data;
268
- method: 'signAndSendTransaction';
269
- }
270
- namespace SolanaSignAndSendTransactionRpcResponse {
271
- interface Data {
272
- caip2: string;
273
- hash: string;
274
- transaction_id?: string;
275
- }
276
- }
277
- interface SolanaSignMessageRpcResponse {
278
- data: SolanaSignMessageRpcResponse.Data;
279
- method: 'signMessage';
280
- }
281
- namespace SolanaSignMessageRpcResponse {
282
- interface Data {
283
- encoding: 'base64';
284
- signature: string;
285
- }
286
- }
287
- interface EthereumSignTransactionRpcResponse {
288
- data: EthereumSignTransactionRpcResponse.Data;
289
- method: 'eth_signTransaction';
290
- }
291
- namespace EthereumSignTransactionRpcResponse {
292
- interface Data {
293
- encoding: 'rlp';
294
- signed_transaction: string;
295
- }
296
- }
297
- interface EthereumSendTransactionRpcResponse {
298
- data: EthereumSendTransactionRpcResponse.Data;
299
- method: 'eth_sendTransaction';
300
- }
301
- namespace EthereumSendTransactionRpcResponse {
302
- interface Data {
303
- caip2: string;
304
- hash: string;
305
- transaction_id?: string;
306
- transaction_request?: Data.TransactionRequest;
307
- }
308
- namespace Data {
309
- interface TransactionRequest {
310
- chain_id?: string | number;
311
- data?: string;
312
- from?: string;
313
- gas_limit?: string | number;
314
- gas_price?: string | number;
315
- max_fee_per_gas?: string | number;
316
- max_priority_fee_per_gas?: string | number;
317
- nonce?: string | number;
318
- to?: string;
319
- type?: 0 | 1 | 2;
320
- value?: string | number;
321
- }
322
- }
323
- }
324
- interface EthereumPersonalSignRpcResponse {
325
- data: EthereumPersonalSignRpcResponse.Data;
326
- method: 'personal_sign';
327
- }
328
- namespace EthereumPersonalSignRpcResponse {
329
- interface Data {
330
- encoding: 'hex';
331
- signature: string;
332
- }
333
- }
334
- interface EthereumSignTypedDataRpcResponse {
335
- data: EthereumSignTypedDataRpcResponse.Data;
336
- method: 'eth_signTypedData_v4';
337
- }
338
- namespace EthereumSignTypedDataRpcResponse {
339
- interface Data {
340
- encoding: 'hex';
341
- signature: string;
342
- }
343
- }
344
- interface EthereumSign7702AuthorizationRpcResponse {
345
- data: EthereumSign7702AuthorizationRpcResponse.Data;
346
- method: 'eth_sign7702Authorization';
347
- }
348
- namespace EthereumSign7702AuthorizationRpcResponse {
349
- interface Data {
350
- authorization: Data.Authorization;
351
- }
352
- namespace Data {
353
- interface Authorization {
354
- chain_id: string | number;
355
- contract: string;
356
- nonce: string | number;
357
- r: string;
358
- s: string;
359
- y_parity: number;
360
- }
361
- }
362
- }
363
- interface EthereumSecp256k1SignRpcResponse {
364
- data: EthereumSecp256k1SignRpcResponse.Data;
365
- method: 'secp256k1_sign';
366
- }
367
- namespace EthereumSecp256k1SignRpcResponse {
368
- interface Data {
369
- encoding: 'hex';
370
- signature: string;
371
- }
372
- }
373
- }
635
+ /**
636
+ * Response to the EVM `personal_sign` RPC.
637
+ */
638
+ export type WalletRpcResponse = EthereumPersonalSignRpcResponse | EthereumSignTypedDataRpcResponse | EthereumSignTransactionRpcResponse | EthereumSendTransactionRpcResponse | EthereumSignUserOperationRpcResponse | EthereumSign7702AuthorizationRpcResponse | EthereumSecp256k1SignRpcResponse | SolanaSignMessageRpcResponse | SolanaSignTransactionRpcResponse | SolanaSignAndSendTransactionRpcResponse;
374
639
  export type WalletAuthenticateWithJwtResponse = WalletAuthenticateWithJwtResponse.WithEncryption | WalletAuthenticateWithJwtResponse.WithoutEncryption;
375
640
  export declare namespace WalletAuthenticateWithJwtResponse {
376
641
  interface WithEncryption {
@@ -468,8 +733,9 @@ export declare namespace WalletCreateParams {
468
733
  override_policy_ids?: Array<string>;
469
734
  }
470
735
  /**
471
- * The P-256 public key of the owner of the resource. If you provide this, do not
472
- * specify an owner_id as it will be generated automatically.
736
+ * The P-256 public key of the owner of the resource, in base64-encoded DER format.
737
+ * If you provide this, do not specify an owner_id as it will be generated
738
+ * automatically.
473
739
  */
474
740
  interface PublicKeyOwner {
475
741
  public_key: string;
@@ -548,9 +814,9 @@ export declare namespace WalletInitImportParams {
548
814
  }
549
815
  export interface WalletRawSignParams {
550
816
  /**
551
- * Body param:
817
+ * Body param: Sign a pre-computed hash
552
818
  */
553
- params: WalletRawSignParams.Params;
819
+ params: WalletRawSignParams.Hash | WalletRawSignParams.Bytes;
554
820
  /**
555
821
  * Header param: Request authorization signature. If multiple signatures are
556
822
  * required, they should be comma separated.
@@ -563,24 +829,40 @@ export interface WalletRawSignParams {
563
829
  'privy-idempotency-key'?: string;
564
830
  }
565
831
  export declare namespace WalletRawSignParams {
566
- interface Params {
832
+ /**
833
+ * Sign a pre-computed hash
834
+ */
835
+ interface Hash {
567
836
  /**
568
837
  * The hash to sign. Must start with `0x`.
569
838
  */
570
- hash?: string;
839
+ hash: string;
840
+ }
841
+ /**
842
+ * Hash and sign bytes (Tron only)
843
+ */
844
+ interface Bytes {
845
+ /**
846
+ * The bytes to hash and sign.
847
+ */
848
+ bytes: string;
849
+ /**
850
+ * Encoding scheme. Currently only utf-8 is supported.
851
+ */
852
+ encoding: 'utf-8';
571
853
  }
572
854
  }
573
- export type WalletRpcParams = WalletRpcParams.EthereumSignTransactionRpcInput | WalletRpcParams.EthereumSendTransactionRpcInput | WalletRpcParams.EthereumPersonalSignRpcInput | WalletRpcParams.EthereumSignTypedDataRpcInput | WalletRpcParams.EthereumSign7702AuthorizationRpcInput | WalletRpcParams.EthereumSecp256k1SignRpcInput | WalletRpcParams.SolanaSignTransactionRpcInput | WalletRpcParams.SolanaSignAndSendTransactionRpcInput | WalletRpcParams.SolanaSignMessageRpcInput;
855
+ export type WalletRpcParams = WalletRpcParams.EthereumPersonalSignRpcInput | WalletRpcParams.EthereumSignTypedDataRpcInput | WalletRpcParams.EthereumSignTransactionRpcInput | WalletRpcParams.EthereumSignUserOperationRpcInput | WalletRpcParams.EthereumSendTransactionRpcInput | WalletRpcParams.EthereumSign7702AuthorizationRpcInput | WalletRpcParams.EthereumSecp256k1SignRpcInput | WalletRpcParams.SolanaSignMessageRpcInput | WalletRpcParams.SolanaSignTransactionRpcInput | WalletRpcParams.SolanaSignAndSendTransactionRpcInput;
574
856
  export declare namespace WalletRpcParams {
575
- interface EthereumSignTransactionRpcInput {
857
+ interface EthereumPersonalSignRpcInput {
576
858
  /**
577
859
  * Body param:
578
860
  */
579
- method: 'eth_signTransaction';
861
+ method: 'personal_sign';
580
862
  /**
581
863
  * Body param:
582
864
  */
583
- params: EthereumSignTransactionRpcInput.Params;
865
+ params: EthereumPersonalSignRpcInput.Params;
584
866
  /**
585
867
  * Body param:
586
868
  */
@@ -600,51 +882,82 @@ export declare namespace WalletRpcParams {
600
882
  */
601
883
  'privy-idempotency-key'?: string;
602
884
  }
603
- namespace EthereumSignTransactionRpcInput {
885
+ namespace EthereumPersonalSignRpcInput {
604
886
  interface Params {
605
- transaction: Params.Transaction;
606
- }
607
- namespace Params {
608
- interface Transaction {
609
- chain_id?: string | number;
610
- data?: string;
611
- from?: string;
612
- gas_limit?: string | number;
613
- gas_price?: string | number;
614
- max_fee_per_gas?: string | number;
615
- max_priority_fee_per_gas?: string | number;
616
- nonce?: string | number;
617
- to?: string;
618
- type?: 0 | 1 | 2;
619
- value?: string | number;
620
- }
887
+ encoding: 'utf-8' | 'hex';
888
+ message: string;
621
889
  }
622
890
  }
623
- interface EthereumSendTransactionRpcInput {
891
+ interface EthereumSignTypedDataRpcInput {
624
892
  /**
625
893
  * Body param:
626
894
  */
627
- caip2: string;
895
+ method: 'eth_signTypedData_v4';
628
896
  /**
629
897
  * Body param:
630
898
  */
631
- method: 'eth_sendTransaction';
899
+ params: EthereumSignTypedDataRpcInput.Params;
632
900
  /**
633
901
  * Body param:
634
902
  */
635
- params: EthereumSendTransactionRpcInput.Params;
903
+ address?: string;
636
904
  /**
637
905
  * Body param:
638
906
  */
639
- address?: string;
907
+ chain_type?: 'ethereum';
908
+ /**
909
+ * Header param: Request authorization signature. If multiple signatures are
910
+ * required, they should be comma separated.
911
+ */
912
+ 'privy-authorization-signature'?: string;
913
+ /**
914
+ * Header param: Idempotency keys ensure API requests are executed only once within
915
+ * a 24-hour window.
916
+ */
917
+ 'privy-idempotency-key'?: string;
918
+ }
919
+ namespace EthereumSignTypedDataRpcInput {
920
+ interface Params {
921
+ typed_data: Params.TypedData;
922
+ }
923
+ namespace Params {
924
+ interface TypedData {
925
+ domain: {
926
+ [key: string]: unknown;
927
+ };
928
+ message: {
929
+ [key: string]: unknown;
930
+ };
931
+ primary_type: string;
932
+ types: {
933
+ [key: string]: Array<TypedData.Type>;
934
+ };
935
+ }
936
+ namespace TypedData {
937
+ interface Type {
938
+ name: string;
939
+ type: string;
940
+ }
941
+ }
942
+ }
943
+ }
944
+ interface EthereumSignTransactionRpcInput {
640
945
  /**
641
946
  * Body param:
642
947
  */
643
- chain_type?: 'ethereum';
948
+ method: 'eth_signTransaction';
644
949
  /**
645
950
  * Body param:
646
951
  */
647
- sponsor?: boolean;
952
+ params: EthereumSignTransactionRpcInput.Params;
953
+ /**
954
+ * Body param:
955
+ */
956
+ address?: string;
957
+ /**
958
+ * Body param:
959
+ */
960
+ chain_type?: 'ethereum';
648
961
  /**
649
962
  * Header param: Request authorization signature. If multiple signatures are
650
963
  * required, they should be comma separated.
@@ -656,7 +969,7 @@ export declare namespace WalletRpcParams {
656
969
  */
657
970
  'privy-idempotency-key'?: string;
658
971
  }
659
- namespace EthereumSendTransactionRpcInput {
972
+ namespace EthereumSignTransactionRpcInput {
660
973
  interface Params {
661
974
  transaction: Params.Transaction;
662
975
  }
@@ -676,15 +989,15 @@ export declare namespace WalletRpcParams {
676
989
  }
677
990
  }
678
991
  }
679
- interface EthereumPersonalSignRpcInput {
992
+ interface EthereumSignUserOperationRpcInput {
680
993
  /**
681
994
  * Body param:
682
995
  */
683
- method: 'personal_sign';
996
+ method: 'eth_signUserOperation';
684
997
  /**
685
998
  * Body param:
686
999
  */
687
- params: EthereumPersonalSignRpcInput.Params;
1000
+ params: EthereumSignUserOperationRpcInput.Params;
688
1001
  /**
689
1002
  * Body param:
690
1003
  */
@@ -704,21 +1017,42 @@ export declare namespace WalletRpcParams {
704
1017
  */
705
1018
  'privy-idempotency-key'?: string;
706
1019
  }
707
- namespace EthereumPersonalSignRpcInput {
1020
+ namespace EthereumSignUserOperationRpcInput {
708
1021
  interface Params {
709
- encoding: 'utf-8' | 'hex';
710
- message: string;
1022
+ chain_id: string | number;
1023
+ contract: string;
1024
+ user_operation: Params.UserOperation;
1025
+ }
1026
+ namespace Params {
1027
+ interface UserOperation {
1028
+ call_data: string;
1029
+ call_gas_limit: string;
1030
+ max_fee_per_gas: string;
1031
+ max_priority_fee_per_gas: string;
1032
+ nonce: string;
1033
+ paymaster: string;
1034
+ paymaster_data: string;
1035
+ paymaster_post_op_gas_limit: string;
1036
+ paymaster_verification_gas_limit: string;
1037
+ pre_verification_gas: string;
1038
+ sender: string;
1039
+ verification_gas_limit: string;
1040
+ }
711
1041
  }
712
1042
  }
713
- interface EthereumSignTypedDataRpcInput {
1043
+ interface EthereumSendTransactionRpcInput {
714
1044
  /**
715
1045
  * Body param:
716
1046
  */
717
- method: 'eth_signTypedData_v4';
1047
+ caip2: string;
718
1048
  /**
719
1049
  * Body param:
720
1050
  */
721
- params: EthereumSignTypedDataRpcInput.Params;
1051
+ method: 'eth_sendTransaction';
1052
+ /**
1053
+ * Body param:
1054
+ */
1055
+ params: EthereumSendTransactionRpcInput.Params;
722
1056
  /**
723
1057
  * Body param:
724
1058
  */
@@ -727,6 +1061,10 @@ export declare namespace WalletRpcParams {
727
1061
  * Body param:
728
1062
  */
729
1063
  chain_type?: 'ethereum';
1064
+ /**
1065
+ * Body param:
1066
+ */
1067
+ sponsor?: boolean;
730
1068
  /**
731
1069
  * Header param: Request authorization signature. If multiple signatures are
732
1070
  * required, they should be comma separated.
@@ -738,28 +1076,23 @@ export declare namespace WalletRpcParams {
738
1076
  */
739
1077
  'privy-idempotency-key'?: string;
740
1078
  }
741
- namespace EthereumSignTypedDataRpcInput {
1079
+ namespace EthereumSendTransactionRpcInput {
742
1080
  interface Params {
743
- typed_data: Params.TypedData;
1081
+ transaction: Params.Transaction;
744
1082
  }
745
1083
  namespace Params {
746
- interface TypedData {
747
- domain: {
748
- [key: string]: unknown;
749
- };
750
- message: {
751
- [key: string]: unknown;
752
- };
753
- primary_type: string;
754
- types: {
755
- [key: string]: Array<TypedData.Type>;
756
- };
757
- }
758
- namespace TypedData {
759
- interface Type {
760
- name: string;
761
- type: string;
762
- }
1084
+ interface Transaction {
1085
+ chain_id?: string | number;
1086
+ data?: string;
1087
+ from?: string;
1088
+ gas_limit?: string | number;
1089
+ gas_price?: string | number;
1090
+ max_fee_per_gas?: string | number;
1091
+ max_priority_fee_per_gas?: string | number;
1092
+ nonce?: string | number;
1093
+ to?: string;
1094
+ type?: 0 | 1 | 2;
1095
+ value?: string | number;
763
1096
  }
764
1097
  }
765
1098
  }
@@ -831,15 +1164,15 @@ export declare namespace WalletRpcParams {
831
1164
  hash: string;
832
1165
  }
833
1166
  }
834
- interface SolanaSignTransactionRpcInput {
1167
+ interface SolanaSignMessageRpcInput {
835
1168
  /**
836
1169
  * Body param:
837
1170
  */
838
- method: 'signTransaction';
1171
+ method: 'signMessage';
839
1172
  /**
840
1173
  * Body param:
841
1174
  */
842
- params: SolanaSignTransactionRpcInput.Params;
1175
+ params: SolanaSignMessageRpcInput.Params;
843
1176
  /**
844
1177
  * Body param:
845
1178
  */
@@ -859,25 +1192,21 @@ export declare namespace WalletRpcParams {
859
1192
  */
860
1193
  'privy-idempotency-key'?: string;
861
1194
  }
862
- namespace SolanaSignTransactionRpcInput {
1195
+ namespace SolanaSignMessageRpcInput {
863
1196
  interface Params {
864
1197
  encoding: 'base64';
865
- transaction: string;
1198
+ message: string;
866
1199
  }
867
1200
  }
868
- interface SolanaSignAndSendTransactionRpcInput {
869
- /**
870
- * Body param:
871
- */
872
- caip2: string;
1201
+ interface SolanaSignTransactionRpcInput {
873
1202
  /**
874
1203
  * Body param:
875
1204
  */
876
- method: 'signAndSendTransaction';
1205
+ method: 'signTransaction';
877
1206
  /**
878
1207
  * Body param:
879
1208
  */
880
- params: SolanaSignAndSendTransactionRpcInput.Params;
1209
+ params: SolanaSignTransactionRpcInput.Params;
881
1210
  /**
882
1211
  * Body param:
883
1212
  */
@@ -886,10 +1215,6 @@ export declare namespace WalletRpcParams {
886
1215
  * Body param:
887
1216
  */
888
1217
  chain_type?: 'solana';
889
- /**
890
- * Body param:
891
- */
892
- sponsor?: boolean;
893
1218
  /**
894
1219
  * Header param: Request authorization signature. If multiple signatures are
895
1220
  * required, they should be comma separated.
@@ -901,21 +1226,25 @@ export declare namespace WalletRpcParams {
901
1226
  */
902
1227
  'privy-idempotency-key'?: string;
903
1228
  }
904
- namespace SolanaSignAndSendTransactionRpcInput {
1229
+ namespace SolanaSignTransactionRpcInput {
905
1230
  interface Params {
906
1231
  encoding: 'base64';
907
1232
  transaction: string;
908
1233
  }
909
1234
  }
910
- interface SolanaSignMessageRpcInput {
1235
+ interface SolanaSignAndSendTransactionRpcInput {
911
1236
  /**
912
1237
  * Body param:
913
1238
  */
914
- method: 'signMessage';
1239
+ caip2: string;
915
1240
  /**
916
1241
  * Body param:
917
1242
  */
918
- params: SolanaSignMessageRpcInput.Params;
1243
+ method: 'signAndSendTransaction';
1244
+ /**
1245
+ * Body param:
1246
+ */
1247
+ params: SolanaSignAndSendTransactionRpcInput.Params;
919
1248
  /**
920
1249
  * Body param:
921
1250
  */
@@ -924,6 +1253,10 @@ export declare namespace WalletRpcParams {
924
1253
  * Body param:
925
1254
  */
926
1255
  chain_type?: 'solana';
1256
+ /**
1257
+ * Body param:
1258
+ */
1259
+ sponsor?: boolean;
927
1260
  /**
928
1261
  * Header param: Request authorization signature. If multiple signatures are
929
1262
  * required, they should be comma separated.
@@ -935,10 +1268,10 @@ export declare namespace WalletRpcParams {
935
1268
  */
936
1269
  'privy-idempotency-key'?: string;
937
1270
  }
938
- namespace SolanaSignMessageRpcInput {
1271
+ namespace SolanaSignAndSendTransactionRpcInput {
939
1272
  interface Params {
940
1273
  encoding: 'base64';
941
- message: string;
1274
+ transaction: string;
942
1275
  }
943
1276
  }
944
1277
  }
@@ -1055,8 +1388,9 @@ export declare namespace WalletUpdateParams {
1055
1388
  override_policy_ids?: Array<string>;
1056
1389
  }
1057
1390
  /**
1058
- * The P-256 public key of the owner of the resource. If you provide this, do not
1059
- * specify an owner_id as it will be generated automatically.
1391
+ * The P-256 public key of the owner of the resource, in base64-encoded DER format.
1392
+ * If you provide this, do not specify an owner_id as it will be generated
1393
+ * automatically.
1060
1394
  */
1061
1395
  interface PublicKeyOwner {
1062
1396
  public_key: string;
@@ -1130,7 +1464,7 @@ export declare namespace WalletCreateWalletsWithRecoveryParams {
1130
1464
  }
1131
1465
  }
1132
1466
  export declare namespace Wallets {
1133
- export { type CurveSigningChainType as CurveSigningChainType, type FirstClassChainType as FirstClassChainType, type Wallet as Wallet, type WalletChainType as WalletChainType, type WalletRevokeResponse as WalletRevokeResponse, 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, };
1467
+ export { type CurveSigningChainType as CurveSigningChainType, type FirstClassChainType as FirstClassChainType, type Wallet as Wallet, type WalletChainType as WalletChainType, type WalletRevokeResponse as WalletRevokeResponse, type EthereumPersonalSignRpcInput as EthereumPersonalSignRpcInput, type EthereumSignTransactionRpcInput as EthereumSignTransactionRpcInput, type EthereumSendTransactionRpcInput as EthereumSendTransactionRpcInput, type EthereumSignTypedDataRpcInput as EthereumSignTypedDataRpcInput, type EthereumSignUserOperationRpcInput as EthereumSignUserOperationRpcInput, 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 EthereumSignUserOperationRpcResponse as EthereumSignUserOperationRpcResponse, 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, };
1134
1468
  export { Transactions as Transactions, type TransactionGetResponse as TransactionGetResponse, type TransactionGetParams as TransactionGetParams, };
1135
1469
  export { Balance as Balance, type BalanceGetResponse as BalanceGetResponse, type BalanceGetParams as BalanceGetParams, };
1136
1470
  }