@privy-io/api-types 0.21.0 → 0.22.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 (72) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/client.d.mts +10 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +10 -10
  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/cards.d.mts +22 -9
  10. package/resources/cards.d.mts.map +1 -1
  11. package/resources/cards.d.ts +22 -9
  12. package/resources/cards.d.ts.map +1 -1
  13. package/resources/index.d.mts +5 -5
  14. package/resources/index.d.mts.map +1 -1
  15. package/resources/index.d.ts +5 -5
  16. package/resources/index.d.ts.map +1 -1
  17. package/resources/index.js.map +1 -1
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/shared.d.mts +23 -1
  20. package/resources/shared.d.mts.map +1 -1
  21. package/resources/shared.d.ts +23 -1
  22. package/resources/shared.d.ts.map +1 -1
  23. package/resources/swaps.d.mts +2 -1
  24. package/resources/swaps.d.mts.map +1 -1
  25. package/resources/swaps.d.ts +2 -1
  26. package/resources/swaps.d.ts.map +1 -1
  27. package/resources/wallet-automations.d.mts +95 -3
  28. package/resources/wallet-automations.d.mts.map +1 -1
  29. package/resources/wallet-automations.d.ts +95 -3
  30. package/resources/wallet-automations.d.ts.map +1 -1
  31. package/resources/wallet-automations.js.map +1 -1
  32. package/resources/wallet-automations.mjs.map +1 -1
  33. package/resources/wallets/actions.d.mts +37 -4
  34. package/resources/wallets/actions.d.mts.map +1 -1
  35. package/resources/wallets/actions.d.ts +37 -4
  36. package/resources/wallets/actions.d.ts.map +1 -1
  37. package/resources/wallets/balance.d.mts +1 -1
  38. package/resources/wallets/balance.d.mts.map +1 -1
  39. package/resources/wallets/balance.d.ts +1 -1
  40. package/resources/wallets/balance.d.ts.map +1 -1
  41. package/resources/wallets/index.d.mts +2 -2
  42. package/resources/wallets/index.d.mts.map +1 -1
  43. package/resources/wallets/index.d.ts +2 -2
  44. package/resources/wallets/index.d.ts.map +1 -1
  45. package/resources/wallets/index.js.map +1 -1
  46. package/resources/wallets/index.mjs.map +1 -1
  47. package/resources/wallets/wallets.d.mts +150 -15
  48. package/resources/wallets/wallets.d.mts.map +1 -1
  49. package/resources/wallets/wallets.d.ts +150 -15
  50. package/resources/wallets/wallets.d.ts.map +1 -1
  51. package/resources/wallets/wallets.js.map +1 -1
  52. package/resources/wallets/wallets.mjs.map +1 -1
  53. package/resources/webhooks.d.mts +9 -2
  54. package/resources/webhooks.d.mts.map +1 -1
  55. package/resources/webhooks.d.ts +9 -2
  56. package/resources/webhooks.d.ts.map +1 -1
  57. package/src/client.ts +44 -0
  58. package/src/resources/cards.ts +24 -8
  59. package/src/resources/index.ts +22 -0
  60. package/src/resources/shared.ts +32 -0
  61. package/src/resources/swaps.ts +2 -1
  62. package/src/resources/wallet-automations.ts +114 -2
  63. package/src/resources/wallets/actions.ts +45 -3
  64. package/src/resources/wallets/balance.ts +9 -0
  65. package/src/resources/wallets/index.ts +12 -0
  66. package/src/resources/wallets/wallets.ts +195 -11
  67. package/src/resources/webhooks.ts +12 -1
  68. package/src/version.ts +1 -1
  69. package/version.d.mts +1 -1
  70. package/version.d.ts +1 -1
  71. package/version.js +1 -1
  72. package/version.mjs +1 -1
@@ -22,6 +22,8 @@ import {
22
22
  EarnIncentiveRewardsQuery,
23
23
  EarnIncentiveRewardsResponse,
24
24
  EarnIncetiveClaimRewardEntry,
25
+ EarnPositionApyAllocation,
26
+ EarnPositionApyType,
25
27
  EarnWithdrawActionResponse,
26
28
  EarnWithdrawRequestBody,
27
29
  EthereumEarnPositionQuery,
@@ -571,6 +573,22 @@ export interface AttachWalletAutomationRequestBody {
571
573
  params?: WalletAutomationsAPI.SwapAttachmentParams;
572
574
  }
573
575
 
576
+ /**
577
+ * A summary of an automation attached to a wallet.
578
+ */
579
+ export interface AttachedWalletAutomation {
580
+ /**
581
+ * ID of the automation.
582
+ */
583
+ id: string;
584
+
585
+ /**
586
+ * Whether this attachment is currently active — true only if both the attachment
587
+ * and the underlying automation are enabled.
588
+ */
589
+ enabled: boolean;
590
+ }
591
+
574
592
  /**
575
593
  * Dashboard response for a wallet authorization key (includes role, which is an
576
594
  * internal-only concept).
@@ -638,7 +656,7 @@ export interface CreateCryptoDepositAccountWithConfigRequestBody {
638
656
  */
639
657
  export interface CreateCryptoDepositAccountWithRouteRequestBody {
640
658
  /**
641
- * An asset on a chain. Uses a human-readable alias (usdc, base) when one is on
659
+ * An asset on a chain. Uses a human-readable alias (usdc, tempo) when one is on
642
660
  * file, otherwise the raw asset address and CAIP-2.
643
661
  */
644
662
  destination: CryptoDepositAsset;
@@ -652,6 +670,88 @@ export interface CreateCryptoDepositAccountWithRouteRequestBody {
652
670
  type: 'inline_route';
653
671
  }
654
672
 
673
+ /**
674
+ * EVM CAIP-2 chain identifier (e.g. "eip155:4217" for Tempo, "eip155:1" for
675
+ * Ethereum).
676
+ */
677
+ export type CryptoDepositAccountCaip2 = string;
678
+
679
+ /**
680
+ * Chain metadata for rendering the crypto deposit-account source picker.
681
+ */
682
+ export interface CryptoDepositAccountChain {
683
+ /**
684
+ * EVM CAIP-2 chain identifier (e.g. "eip155:4217" for Tempo, "eip155:1" for
685
+ * Ethereum).
686
+ */
687
+ caip2: CryptoDepositAccountCaip2;
688
+
689
+ /**
690
+ * Numeric chain id used by some clients as an alias.
691
+ */
692
+ chain_id: number;
693
+
694
+ display_name: string;
695
+
696
+ /**
697
+ * URL of the chain icon.
698
+ */
699
+ icon_url: string;
700
+
701
+ /**
702
+ * Execution VM, e.g. evm or svm.
703
+ */
704
+ vm_type: string;
705
+ }
706
+
707
+ /**
708
+ * Source-token catalog for crypto deposit accounts. Only automation-sweepable,
709
+ * gas-sponsored mainnets.
710
+ */
711
+ export interface CryptoDepositAccountConfigResponse {
712
+ chains: { [key: string]: CryptoDepositAccountChain };
713
+
714
+ currencies: Array<CryptoDepositAccountSourceCurrency>;
715
+ }
716
+
717
+ /**
718
+ * A token contract on one source chain in the crypto deposit-account catalog.
719
+ */
720
+ export interface CryptoDepositAccountSourceChain {
721
+ /**
722
+ * Token contract or native asset address on this chain.
723
+ */
724
+ address: string;
725
+
726
+ /**
727
+ * EVM CAIP-2 chain identifier (e.g. "eip155:4217" for Tempo, "eip155:1" for
728
+ * Ethereum).
729
+ */
730
+ caip2: CryptoDepositAccountCaip2;
731
+
732
+ /**
733
+ * Token decimals on this chain.
734
+ */
735
+ decimals: number;
736
+ }
737
+
738
+ /**
739
+ * A source token in the crypto deposit-account catalog, with the chains it can be
740
+ * sent from.
741
+ */
742
+ export interface CryptoDepositAccountSourceCurrency {
743
+ chains: Array<CryptoDepositAccountSourceChain>;
744
+
745
+ /**
746
+ * URL of the token logo.
747
+ */
748
+ logo_uri: string;
749
+
750
+ name: string;
751
+
752
+ symbol: string;
753
+ }
754
+
655
755
  /**
656
756
  * One deposit address and the source/destination route it accepts.
657
757
  */
@@ -659,7 +759,7 @@ export interface CryptoDepositAddressRoute {
659
759
  deposit_address: string;
660
760
 
661
761
  /**
662
- * An asset on a chain. Uses a human-readable alias (usdc, base) when one is on
762
+ * An asset on a chain. Uses a human-readable alias (usdc, tempo) when one is on
663
763
  * file, otherwise the raw asset address and CAIP-2.
664
764
  */
665
765
  destination: CryptoDepositAsset;
@@ -674,7 +774,7 @@ export interface CryptoDepositAddressRoute {
674
774
  }
675
775
 
676
776
  /**
677
- * An asset on a chain. Uses a human-readable alias (usdc, base) when one is on
777
+ * An asset on a chain. Uses a human-readable alias (usdc, tempo) when one is on
678
778
  * file, otherwise the raw asset address and CAIP-2.
679
779
  */
680
780
  export interface CryptoDepositAsset {
@@ -757,9 +857,9 @@ export interface CustodialWallet {
757
857
  address: string;
758
858
 
759
859
  /**
760
- * The chain type of the custodial wallet.
860
+ * The chain of the custodial wallet.
761
861
  */
762
- chain_type: CustodialWalletChainType;
862
+ chain: CustodialWalletChain;
763
863
 
764
864
  /**
765
865
  * Information about the custodian managing this wallet.
@@ -776,11 +876,21 @@ export interface CustodialWallet {
776
876
  */
777
877
  additional_signers?: WalletAdditionalSigner;
778
878
 
879
+ /**
880
+ * @deprecated The chain type of the custodial wallet (deprecated).
881
+ */
882
+ chain_type?: CustodialWalletChainType;
883
+
779
884
  policy_ids?: Array<string>;
780
885
  }
781
886
 
782
887
  /**
783
- * The chain type of the custodial wallet.
888
+ * The chain of the custodial wallet.
889
+ */
890
+ export type CustodialWalletChain = 'base' | 'solana' | 'tempo';
891
+
892
+ /**
893
+ * The chain type of the custodial wallet (deprecated).
784
894
  */
785
895
  export type CustodialWalletChainType = 'ethereum' | 'solana';
786
896
 
@@ -788,11 +898,6 @@ export type CustodialWalletChainType = 'ethereum' | 'solana';
788
898
  * The input for creating a custodial wallet.
789
899
  */
790
900
  export interface CustodialWalletCreateInput {
791
- /**
792
- * The chain type of the custodial wallet.
793
- */
794
- chain_type: CustodialWalletChainType;
795
-
796
901
  /**
797
902
  * The provider of the custodial wallet.
798
903
  */
@@ -809,6 +914,16 @@ export interface CustodialWalletCreateInput {
809
914
  */
810
915
  additional_signers?: AdditionalSignerInput;
811
916
 
917
+ /**
918
+ * The chain of the custodial wallet.
919
+ */
920
+ chain?: CustodialWalletChain;
921
+
922
+ /**
923
+ * @deprecated The chain type of the custodial wallet (deprecated).
924
+ */
925
+ chain_type?: CustodialWalletChainType;
926
+
812
927
  /**
813
928
  * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
814
929
  * null to remove the current owner.
@@ -1679,6 +1794,34 @@ export interface GetByWalletAddressRequestBody {
1679
1794
  include_archived?: boolean;
1680
1795
  }
1681
1796
 
1797
+ /**
1798
+ * The next crypto deposit-account sweep into the path wallet after `after`, or
1799
+ * null if none. The order object matches GET order.
1800
+ */
1801
+ export interface GetCryptoDepositAccountNextOrderResponse {
1802
+ /**
1803
+ * A crypto deposit-account sweep identified by its wallet action ID. Status is the
1804
+ * wallet-action status.
1805
+ */
1806
+ order: GetCryptoDepositAccountOrderResponse | null;
1807
+ }
1808
+
1809
+ /**
1810
+ * A crypto deposit-account sweep identified by its wallet action ID. Status is the
1811
+ * wallet-action status.
1812
+ */
1813
+ export interface GetCryptoDepositAccountOrderResponse {
1814
+ /**
1815
+ * Wallet action ID of the deposit sweep.
1816
+ */
1817
+ id: string;
1818
+
1819
+ /**
1820
+ * Status of a wallet action.
1821
+ */
1822
+ status: ActionsAPI.WalletActionStatus;
1823
+ }
1824
+
1682
1825
  /**
1683
1826
  * The input for HD wallets.
1684
1827
  */
@@ -1813,6 +1956,15 @@ export interface IntentBinding {
1813
1956
  type: 'intent';
1814
1957
  }
1815
1958
 
1959
+ /**
1960
+ * A page of active crypto deposit accounts for a destination wallet.
1961
+ */
1962
+ export interface ListCryptoDepositAccountsResponse {
1963
+ data: Array<CryptoDepositAddressRoute>;
1964
+
1965
+ next_cursor: string | null;
1966
+ }
1967
+
1816
1968
  /**
1817
1969
  * Source for a transfer identified by a named asset (e.g. "usdc", "eth"). Use this
1818
1970
  * variant for first-class assets maintained by Privy.
@@ -3436,6 +3588,7 @@ export type TransactionChainNameInput =
3436
3588
  | 'polygon'
3437
3589
  | 'solana'
3438
3590
  | 'sepolia'
3591
+ | 'arc'
3439
3592
  | (string & {});
3440
3593
 
3441
3594
  /**
@@ -4190,6 +4343,16 @@ export interface Wallet {
4190
4343
  */
4191
4344
  authorization_threshold?: number;
4192
4345
 
4346
+ /**
4347
+ * Automations attached to the wallet, including disabled ones.
4348
+ */
4349
+ automations?: Array<AttachedWalletAutomation>;
4350
+
4351
+ /**
4352
+ * The chain of the custodial wallet.
4353
+ */
4354
+ chain?: CustodialWalletChain;
4355
+
4193
4356
  /**
4194
4357
  * Information about the custodian managing this wallet.
4195
4358
  */
@@ -4303,6 +4466,14 @@ export type WalletAssetChainNameInput =
4303
4466
  | 'tron'
4304
4467
  | 'zksync_era'
4305
4468
  | 'robinhood'
4469
+ | 'unichain'
4470
+ | 'worldchain'
4471
+ | 'ink'
4472
+ | 'soneium'
4473
+ | 'megaeth'
4474
+ | 'hyperevm'
4475
+ | 'hypercore'
4476
+ | 'arc'
4306
4477
  | 'tempo_testnet'
4307
4478
  | 'hoodi'
4308
4479
  | 'sepolia'
@@ -4317,6 +4488,7 @@ export type WalletAssetChainNameInput =
4317
4488
  | 'solana_testnet'
4318
4489
  | 'tron_nile'
4319
4490
  | 'robinhood_testnet'
4491
+ | 'ink_sepolia'
4320
4492
  | (string & {});
4321
4493
 
4322
4494
  /**
@@ -6438,6 +6610,7 @@ export declare namespace Wallets {
6438
6610
  type AptosSignTransactionRpcResponseData as AptosSignTransactionRpcResponseData,
6439
6611
  type AptosSignedTransactionBcsHex as AptosSignedTransactionBcsHex,
6440
6612
  type AttachWalletAutomationRequestBody as AttachWalletAutomationRequestBody,
6613
+ type AttachedWalletAutomation as AttachedWalletAutomation,
6441
6614
  type AuthorizationKeyDashboardResponse as AuthorizationKeyDashboardResponse,
6442
6615
  type AuthorizationKeyResponse as AuthorizationKeyResponse,
6443
6616
  type AuthorizationKeyRole as AuthorizationKeyRole,
@@ -6445,6 +6618,11 @@ export declare namespace Wallets {
6445
6618
  type CreateCryptoDepositAccountResponse as CreateCryptoDepositAccountResponse,
6446
6619
  type CreateCryptoDepositAccountWithConfigRequestBody as CreateCryptoDepositAccountWithConfigRequestBody,
6447
6620
  type CreateCryptoDepositAccountWithRouteRequestBody as CreateCryptoDepositAccountWithRouteRequestBody,
6621
+ type CryptoDepositAccountCaip2 as CryptoDepositAccountCaip2,
6622
+ type CryptoDepositAccountChain as CryptoDepositAccountChain,
6623
+ type CryptoDepositAccountConfigResponse as CryptoDepositAccountConfigResponse,
6624
+ type CryptoDepositAccountSourceChain as CryptoDepositAccountSourceChain,
6625
+ type CryptoDepositAccountSourceCurrency as CryptoDepositAccountSourceCurrency,
6448
6626
  type CryptoDepositAddressRoute as CryptoDepositAddressRoute,
6449
6627
  type CryptoDepositAsset as CryptoDepositAsset,
6450
6628
  type CryptoDepositAssetFilter as CryptoDepositAssetFilter,
@@ -6454,6 +6632,7 @@ export declare namespace Wallets {
6454
6632
  type CurveSigningChainType as CurveSigningChainType,
6455
6633
  type CurveType as CurveType,
6456
6634
  type CustodialWallet as CustodialWallet,
6635
+ type CustodialWalletChain as CustodialWalletChain,
6457
6636
  type CustodialWalletChainType as CustodialWalletChainType,
6458
6637
  type CustodialWalletCreateInput as CustodialWalletCreateInput,
6459
6638
  type CustodialWalletProvider as CustodialWalletProvider,
@@ -6512,6 +6691,8 @@ export declare namespace Wallets {
6512
6691
  type FirstClassChainType as FirstClassChainType,
6513
6692
  type Gas as Gas,
6514
6693
  type GetByWalletAddressRequestBody as GetByWalletAddressRequestBody,
6694
+ type GetCryptoDepositAccountNextOrderResponse as GetCryptoDepositAccountNextOrderResponse,
6695
+ type GetCryptoDepositAccountOrderResponse as GetCryptoDepositAccountOrderResponse,
6515
6696
  type HDInitInput as HDInitInput,
6516
6697
  type HDPath as HDPath,
6517
6698
  type HDSubmitInput as HDSubmitInput,
@@ -6520,6 +6701,7 @@ export declare namespace Wallets {
6520
6701
  type HpkeImportConfig as HpkeImportConfig,
6521
6702
  type Hex as Hex,
6522
6703
  type IntentBinding as IntentBinding,
6704
+ type ListCryptoDepositAccountsResponse as ListCryptoDepositAccountsResponse,
6523
6705
  type NamedTokenTransferSource as NamedTokenTransferSource,
6524
6706
  type NearRpcRequestBody as NearRpcRequestBody,
6525
6707
  type NearRpcResponse as NearRpcResponse,
@@ -6754,6 +6936,8 @@ export declare namespace Wallets {
6754
6936
  type EarnIncentiveRewardsQuery as EarnIncentiveRewardsQuery,
6755
6937
  type EarnIncentiveRewardsResponse as EarnIncentiveRewardsResponse,
6756
6938
  type EarnIncetiveClaimRewardEntry as EarnIncetiveClaimRewardEntry,
6939
+ type EarnPositionApyAllocation as EarnPositionApyAllocation,
6940
+ type EarnPositionApyType as EarnPositionApyType,
6757
6941
  type EarnWithdrawActionResponse as EarnWithdrawActionResponse,
6758
6942
  type EarnWithdrawRequestBody as EarnWithdrawRequestBody,
6759
6943
  type EthereumEarnPositionQuery as EthereumEarnPositionQuery,
@@ -4048,7 +4048,17 @@ export type WalletFundsAsset =
4048
4048
  | WalletFundsErc20Asset
4049
4049
  | WalletFundsSplAsset
4050
4050
  | WalletFundsSacAsset
4051
- | WalletFundsTrc20Asset;
4051
+ | WalletFundsTrc20Asset
4052
+ | WalletFundsBtknAsset;
4053
+
4054
+ /**
4055
+ * A token issued on Spark, identified by its BTKN identifier.
4056
+ */
4057
+ export interface WalletFundsBtknAsset {
4058
+ identifier: string;
4059
+
4060
+ type: 'btkn';
4061
+ }
4052
4062
 
4053
4063
  /**
4054
4064
  * An ERC-20 token asset.
@@ -4426,6 +4436,7 @@ export declare namespace Webhooks {
4426
4436
  type WalletArchivedWebhookPayload as WalletArchivedWebhookPayload,
4427
4437
  type WalletAutomationSubmittedWebhookPayload as WalletAutomationSubmittedWebhookPayload,
4428
4438
  type WalletFundsAsset as WalletFundsAsset,
4439
+ type WalletFundsBtknAsset as WalletFundsBtknAsset,
4429
4440
  type WalletFundsErc20Asset as WalletFundsErc20Asset,
4430
4441
  type WalletFundsNativeTokenAsset as WalletFundsNativeTokenAsset,
4431
4442
  type WalletFundsSacAsset as WalletFundsSacAsset,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.21.0'; // x-release-please-version
1
+ export const VERSION = '0.22.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.21.0";
1
+ export declare const VERSION = "0.22.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.21.0";
1
+ export declare const VERSION = "0.22.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.21.0'; // x-release-please-version
4
+ exports.VERSION = '0.22.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.21.0'; // x-release-please-version
1
+ export const VERSION = '0.22.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map