@privy-io/api-types 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/client.d.mts +37 -28
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +37 -28
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/accounts.d.mts +79 -106
  12. package/resources/accounts.d.mts.map +1 -1
  13. package/resources/accounts.d.ts +79 -106
  14. package/resources/accounts.d.ts.map +1 -1
  15. package/resources/accounts.js.map +1 -1
  16. package/resources/accounts.mjs.map +1 -1
  17. package/resources/aggregations.d.mts +18 -392
  18. package/resources/aggregations.d.mts.map +1 -1
  19. package/resources/aggregations.d.ts +18 -392
  20. package/resources/aggregations.d.ts.map +1 -1
  21. package/resources/aggregations.js.map +1 -1
  22. package/resources/aggregations.mjs.map +1 -1
  23. package/resources/apps.d.mts +139 -70
  24. package/resources/apps.d.mts.map +1 -1
  25. package/resources/apps.d.ts +139 -70
  26. package/resources/apps.d.ts.map +1 -1
  27. package/resources/apps.js.map +1 -1
  28. package/resources/apps.mjs.map +1 -1
  29. package/resources/client-auth.d.mts +796 -427
  30. package/resources/client-auth.d.mts.map +1 -1
  31. package/resources/client-auth.d.ts +796 -427
  32. package/resources/client-auth.d.ts.map +1 -1
  33. package/resources/client-auth.js.map +1 -1
  34. package/resources/client-auth.mjs.map +1 -1
  35. package/resources/cross-app.d.mts +14 -13
  36. package/resources/cross-app.d.mts.map +1 -1
  37. package/resources/cross-app.d.ts +14 -13
  38. package/resources/cross-app.d.ts.map +1 -1
  39. package/resources/embedded-wallets.d.mts +165 -81
  40. package/resources/embedded-wallets.d.mts.map +1 -1
  41. package/resources/embedded-wallets.d.ts +165 -81
  42. package/resources/embedded-wallets.d.ts.map +1 -1
  43. package/resources/embedded-wallets.js.map +1 -1
  44. package/resources/embedded-wallets.mjs.map +1 -1
  45. package/resources/funding.d.mts +150 -64
  46. package/resources/funding.d.mts.map +1 -1
  47. package/resources/funding.d.ts +150 -64
  48. package/resources/funding.d.ts.map +1 -1
  49. package/resources/funding.js.map +1 -1
  50. package/resources/funding.mjs.map +1 -1
  51. package/resources/index.d.mts +17 -14
  52. package/resources/index.d.mts.map +1 -1
  53. package/resources/index.d.ts +17 -14
  54. package/resources/index.d.ts.map +1 -1
  55. package/resources/index.js +7 -1
  56. package/resources/index.js.map +1 -1
  57. package/resources/index.mjs +3 -0
  58. package/resources/index.mjs.map +1 -1
  59. package/resources/intents.d.mts +224 -1757
  60. package/resources/intents.d.mts.map +1 -1
  61. package/resources/intents.d.ts +224 -1757
  62. package/resources/intents.d.ts.map +1 -1
  63. package/resources/intents.js.map +1 -1
  64. package/resources/intents.mjs.map +1 -1
  65. package/resources/key-quorums.d.mts +74 -26
  66. package/resources/key-quorums.d.mts.map +1 -1
  67. package/resources/key-quorums.d.ts +74 -26
  68. package/resources/key-quorums.d.ts.map +1 -1
  69. package/resources/key-quorums.js +8 -8
  70. package/resources/key-quorums.js.map +1 -1
  71. package/resources/key-quorums.mjs +8 -8
  72. package/resources/key-quorums.mjs.map +1 -1
  73. package/resources/policies.d.mts +335 -926
  74. package/resources/policies.d.mts.map +1 -1
  75. package/resources/policies.d.ts +335 -926
  76. package/resources/policies.d.ts.map +1 -1
  77. package/resources/policies.js +48 -41
  78. package/resources/policies.js.map +1 -1
  79. package/resources/policies.mjs +48 -41
  80. package/resources/policies.mjs.map +1 -1
  81. package/resources/shared.d.mts +59 -0
  82. package/resources/shared.d.mts.map +1 -0
  83. package/resources/shared.d.ts +59 -0
  84. package/resources/shared.d.ts.map +1 -0
  85. package/resources/shared.js +9 -0
  86. package/resources/shared.js.map +1 -0
  87. package/resources/shared.mjs +5 -0
  88. package/resources/shared.mjs.map +1 -0
  89. package/resources/swaps.d.mts +108 -0
  90. package/resources/swaps.d.mts.map +1 -0
  91. package/resources/swaps.d.ts +108 -0
  92. package/resources/swaps.d.ts.map +1 -0
  93. package/resources/swaps.js +9 -0
  94. package/resources/swaps.js.map +1 -0
  95. package/resources/swaps.mjs +5 -0
  96. package/resources/swaps.mjs.map +1 -0
  97. package/resources/transactions.d.mts +155 -93
  98. package/resources/transactions.d.mts.map +1 -1
  99. package/resources/transactions.d.ts +155 -93
  100. package/resources/transactions.d.ts.map +1 -1
  101. package/resources/users.d.mts +61 -94
  102. package/resources/users.d.mts.map +1 -1
  103. package/resources/users.d.ts +61 -94
  104. package/resources/users.d.ts.map +1 -1
  105. package/resources/users.js.map +1 -1
  106. package/resources/users.mjs.map +1 -1
  107. package/resources/wallet-actions.d.mts +187 -0
  108. package/resources/wallet-actions.d.mts.map +1 -0
  109. package/resources/wallet-actions.d.ts +187 -0
  110. package/resources/wallet-actions.d.ts.map +1 -0
  111. package/resources/wallet-actions.js +9 -0
  112. package/resources/wallet-actions.js.map +1 -0
  113. package/resources/wallet-actions.mjs +5 -0
  114. package/resources/wallet-actions.mjs.map +1 -0
  115. package/resources/wallets/index.d.mts +1 -1
  116. package/resources/wallets/index.d.mts.map +1 -1
  117. package/resources/wallets/index.d.ts +1 -1
  118. package/resources/wallets/index.d.ts.map +1 -1
  119. package/resources/wallets/index.js.map +1 -1
  120. package/resources/wallets/index.mjs.map +1 -1
  121. package/resources/wallets/transactions.d.mts +1 -0
  122. package/resources/wallets/transactions.d.mts.map +1 -1
  123. package/resources/wallets/transactions.d.ts +1 -0
  124. package/resources/wallets/transactions.d.ts.map +1 -1
  125. package/resources/wallets/wallets.d.mts +2377 -971
  126. package/resources/wallets/wallets.d.mts.map +1 -1
  127. package/resources/wallets/wallets.d.ts +2377 -971
  128. package/resources/wallets/wallets.d.ts.map +1 -1
  129. package/resources/wallets/wallets.js +18 -6
  130. package/resources/wallets/wallets.js.map +1 -1
  131. package/resources/wallets/wallets.mjs +18 -6
  132. package/resources/wallets/wallets.mjs.map +1 -1
  133. package/resources/webhooks.d.mts +438 -33
  134. package/resources/webhooks.d.mts.map +1 -1
  135. package/resources/webhooks.d.ts +438 -33
  136. package/resources/webhooks.d.ts.map +1 -1
  137. package/resources/webhooks.js.map +1 -1
  138. package/resources/webhooks.mjs.map +1 -1
  139. package/resources/yield.d.mts +25 -1
  140. package/resources/yield.d.mts.map +1 -1
  141. package/resources/yield.d.ts +25 -1
  142. package/resources/yield.d.ts.map +1 -1
  143. package/src/client.ts +721 -72
  144. package/src/resources/accounts.ts +93 -120
  145. package/src/resources/aggregations.ts +18 -702
  146. package/src/resources/apps.ts +187 -110
  147. package/src/resources/client-auth.ts +1358 -893
  148. package/src/resources/cross-app.ts +19 -15
  149. package/src/resources/embedded-wallets.ts +219 -123
  150. package/src/resources/funding.ts +263 -173
  151. package/src/resources/index.ts +368 -47
  152. package/src/resources/intents.ts +370 -3100
  153. package/src/resources/key-quorums.ts +100 -32
  154. package/src/resources/policies.ts +583 -1558
  155. package/src/resources/shared.ts +79 -0
  156. package/src/resources/swaps.ts +136 -0
  157. package/src/resources/transactions.ts +185 -91
  158. package/src/resources/users.ts +79 -132
  159. package/src/resources/wallet-actions.ts +251 -0
  160. package/src/resources/wallets/index.ts +144 -16
  161. package/src/resources/wallets/transactions.ts +2 -0
  162. package/src/resources/wallets/wallets.ts +2893 -1023
  163. package/src/resources/webhooks.ts +547 -47
  164. package/src/resources/yield.ts +29 -0
  165. package/src/version.ts +1 -1
  166. package/version.d.mts +1 -1
  167. package/version.d.ts +1 -1
  168. package/version.js +1 -1
  169. package/version.mjs +1 -1
@@ -3,6 +3,8 @@
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as UsersAPI from './users';
5
5
  import * as ClientAuthAPI from './client-auth';
6
+ import * as EmbeddedWalletsAPI from './embedded-wallets';
7
+ import * as SharedAPI from './shared';
6
8
  import * as WalletsAPI from './wallets/wallets';
7
9
  import { APIPromise } from '../core/api-promise';
8
10
  import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
@@ -389,17 +391,6 @@ export interface LinkedAccountEthereum {
389
391
  wallet_client_type?: string;
390
392
  }
391
393
 
392
- /**
393
- * The provider for a smart wallet.
394
- */
395
- export type SmartWalletType =
396
- | 'safe'
397
- | 'kernel'
398
- | 'light_account'
399
- | 'biconomy'
400
- | 'coinbase_smart_wallet'
401
- | 'thirdweb';
402
-
403
394
  /**
404
395
  * A smart wallet account linked to the user.
405
396
  */
@@ -411,9 +402,9 @@ export interface LinkedAccountSmartWallet {
411
402
  latest_verified_at: number | null;
412
403
 
413
404
  /**
414
- * The provider for a smart wallet.
405
+ * The supported smart wallet providers.
415
406
  */
416
- smart_wallet_type: SmartWalletType;
407
+ smart_wallet_type: EmbeddedWalletsAPI.SmartWalletType;
417
408
 
418
409
  type: 'smart_wallet';
419
410
 
@@ -1170,11 +1161,74 @@ export type LinkedAccountType =
1170
1161
  | 'authorization_key'
1171
1162
  | ClientAuthAPI.CustomOAuthProviderID;
1172
1163
 
1164
+ /**
1165
+ * A SMS MFA method.
1166
+ */
1167
+ export interface SMSMfaMethod {
1168
+ type: 'sms';
1169
+
1170
+ verified_at: number;
1171
+ }
1172
+
1173
+ /**
1174
+ * A TOTP MFA method.
1175
+ */
1176
+ export interface TotpMfaMethod {
1177
+ type: 'totp';
1178
+
1179
+ verified_at: number;
1180
+ }
1181
+
1182
+ /**
1183
+ * A Passkey MFA method.
1184
+ */
1185
+ export interface PasskeyMfaMethod {
1186
+ type: 'passkey';
1187
+
1188
+ verified_at: number;
1189
+ }
1190
+
1191
+ /**
1192
+ * A multi-factor authentication method linked to the user.
1193
+ */
1194
+ export type LinkedMfaMethod = SMSMfaMethod | TotpMfaMethod | PasskeyMfaMethod;
1195
+
1173
1196
  /**
1174
1197
  * Custom metadata associated with the user.
1175
1198
  */
1176
1199
  export type CustomMetadata = { [key: string]: string | number | boolean };
1177
1200
 
1201
+ /**
1202
+ * A Privy user object.
1203
+ */
1204
+ export interface User {
1205
+ id: string;
1206
+
1207
+ /**
1208
+ * Unix timestamp of when the user was created in seconds.
1209
+ */
1210
+ created_at: number;
1211
+
1212
+ /**
1213
+ * Indicates if the user has accepted the terms of service.
1214
+ */
1215
+ has_accepted_terms: boolean;
1216
+
1217
+ /**
1218
+ * Indicates if the user is a guest account user.
1219
+ */
1220
+ is_guest: boolean;
1221
+
1222
+ linked_accounts: Array<LinkedAccount>;
1223
+
1224
+ mfa_methods: Array<LinkedMfaMethod>;
1225
+
1226
+ /**
1227
+ * Custom metadata associated with the user.
1228
+ */
1229
+ custom_metadata?: CustomMetadata;
1230
+ }
1231
+
1178
1232
  /**
1179
1233
  * The payload for importing a wallet account.
1180
1234
  */
@@ -1462,96 +1516,13 @@ export namespace UserBatchCreateInput {
1462
1516
  */
1463
1517
  custom_metadata?: UsersAPI.CustomMetadata;
1464
1518
 
1465
- wallets?: Array<User.Wallet>;
1466
- }
1467
-
1468
- export namespace User {
1469
- export interface Wallet {
1470
- /**
1471
- * The wallet chain types.
1472
- */
1473
- chain_type: WalletsAPI.WalletChainType;
1474
-
1475
- additional_signers?: Array<Wallet.AdditionalSigner>;
1476
-
1477
- create_smart_wallet?: boolean;
1478
-
1479
- policy_ids?: Array<string>;
1480
- }
1481
-
1482
- export namespace Wallet {
1483
- export interface AdditionalSigner {
1484
- signer_id: string;
1485
-
1486
- override_policy_ids?: Array<string>;
1487
- }
1488
- }
1519
+ /**
1520
+ * Wallets to create.
1521
+ */
1522
+ wallets?: Array<EmbeddedWalletsAPI.WalletCreationInput>;
1489
1523
  }
1490
1524
  }
1491
1525
 
1492
- /**
1493
- * A SMS MFA method.
1494
- */
1495
- export interface SMSMfaMethod {
1496
- type: 'sms';
1497
-
1498
- verified_at: number;
1499
- }
1500
-
1501
- /**
1502
- * A TOTP MFA method.
1503
- */
1504
- export interface TotpMfaMethod {
1505
- type: 'totp';
1506
-
1507
- verified_at: number;
1508
- }
1509
-
1510
- /**
1511
- * A Passkey MFA method.
1512
- */
1513
- export interface PasskeyMfaMethod {
1514
- type: 'passkey';
1515
-
1516
- verified_at: number;
1517
- }
1518
-
1519
- /**
1520
- * A multi-factor authentication method linked to the user.
1521
- */
1522
- export type LinkedMfaMethod = SMSMfaMethod | TotpMfaMethod | PasskeyMfaMethod;
1523
-
1524
- /**
1525
- * A Privy user object.
1526
- */
1527
- export interface User {
1528
- id: string;
1529
-
1530
- /**
1531
- * Unix timestamp of when the user was created in milliseconds.
1532
- */
1533
- created_at: number;
1534
-
1535
- /**
1536
- * Indicates if the user has accepted the terms of service.
1537
- */
1538
- has_accepted_terms: boolean;
1539
-
1540
- /**
1541
- * Indicates if the user is a guest account user.
1542
- */
1543
- is_guest: boolean;
1544
-
1545
- linked_accounts: Array<LinkedAccount>;
1546
-
1547
- mfa_methods: Array<LinkedMfaMethod>;
1548
-
1549
- /**
1550
- * Custom metadata associated with the user.
1551
- */
1552
- custom_metadata?: CustomMetadata;
1553
- }
1554
-
1555
1526
  /**
1556
1527
  * OAuth tokens associated with the user.
1557
1528
  */
@@ -1653,9 +1624,9 @@ export namespace UserCreateParams {
1653
1624
  export namespace Wallet {
1654
1625
  export interface AdditionalSigner {
1655
1626
  /**
1656
- * The key quorum ID for the signer.
1627
+ * A unique identifier for a key quorum.
1657
1628
  */
1658
- signer_id: string;
1629
+ signer_id: SharedAPI.KeyQuorumID;
1659
1630
 
1660
1631
  /**
1661
1632
  * The array of policy IDs that will be applied to wallet requests. If specified,
@@ -1718,30 +1689,7 @@ export interface UserGetByWalletAddressParams {
1718
1689
  }
1719
1690
 
1720
1691
  export interface UserPregenerateWalletsParams {
1721
- wallets: Array<UserPregenerateWalletsParams.Wallet>;
1722
- }
1723
-
1724
- export namespace UserPregenerateWalletsParams {
1725
- export interface Wallet {
1726
- /**
1727
- * The wallet chain types.
1728
- */
1729
- chain_type: WalletsAPI.WalletChainType;
1730
-
1731
- additional_signers?: Array<Wallet.AdditionalSigner>;
1732
-
1733
- create_smart_wallet?: boolean;
1734
-
1735
- policy_ids?: Array<string>;
1736
- }
1737
-
1738
- export namespace Wallet {
1739
- export interface AdditionalSigner {
1740
- signer_id: string;
1741
-
1742
- override_policy_ids?: Array<string>;
1743
- }
1744
- }
1692
+ wallets: Array<EmbeddedWalletsAPI.WalletCreationInput>;
1745
1693
  }
1746
1694
 
1747
1695
  export type UserSearchParams = UserSearchParams.Variant0 | UserSearchParams.Variant1;
@@ -1784,7 +1732,6 @@ export declare namespace Users {
1784
1732
  type LinkedAccountPhone as LinkedAccountPhone,
1785
1733
  type LinkedAccountBaseWallet as LinkedAccountBaseWallet,
1786
1734
  type LinkedAccountEthereum as LinkedAccountEthereum,
1787
- type SmartWalletType as SmartWalletType,
1788
1735
  type LinkedAccountSmartWallet as LinkedAccountSmartWallet,
1789
1736
  type LinkedAccountSolana as LinkedAccountSolana,
1790
1737
  type LinkedAccountFarcaster as LinkedAccountFarcaster,
@@ -1817,7 +1764,12 @@ export declare namespace Users {
1817
1764
  type LinkedAccountAuthorizationKey as LinkedAccountAuthorizationKey,
1818
1765
  type LinkedAccount as LinkedAccount,
1819
1766
  type LinkedAccountType as LinkedAccountType,
1767
+ type SMSMfaMethod as SMSMfaMethod,
1768
+ type TotpMfaMethod as TotpMfaMethod,
1769
+ type PasskeyMfaMethod as PasskeyMfaMethod,
1770
+ type LinkedMfaMethod as LinkedMfaMethod,
1820
1771
  type CustomMetadata as CustomMetadata,
1772
+ type User as User,
1821
1773
  type LinkedAccountWalletInput as LinkedAccountWalletInput,
1822
1774
  type LinkedAccountEmailInput as LinkedAccountEmailInput,
1823
1775
  type LinkedAccountPhoneInput as LinkedAccountPhoneInput,
@@ -1838,11 +1790,6 @@ export declare namespace Users {
1838
1790
  type LinkedAccountPasskeyInput as LinkedAccountPasskeyInput,
1839
1791
  type LinkedAccountInput as LinkedAccountInput,
1840
1792
  type UserBatchCreateInput as UserBatchCreateInput,
1841
- type SMSMfaMethod as SMSMfaMethod,
1842
- type TotpMfaMethod as TotpMfaMethod,
1843
- type PasskeyMfaMethod as PasskeyMfaMethod,
1844
- type LinkedMfaMethod as LinkedMfaMethod,
1845
- type User as User,
1846
1793
  type OAuthTokens as OAuthTokens,
1847
1794
  type UserWithIdentityToken as UserWithIdentityToken,
1848
1795
  type AuthenticatedUser as AuthenticatedUser,
@@ -0,0 +1,251 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+
5
+ export class WalletActions extends APIResource {}
6
+
7
+ /**
8
+ * Type of wallet action
9
+ */
10
+ export type WalletActionType = 'swap' | 'transfer';
11
+
12
+ /**
13
+ * Status of a wallet action.
14
+ */
15
+ export type WalletActionStatus = 'pending' | 'succeeded' | 'rejected' | 'failed';
16
+
17
+ /**
18
+ * Type of a wallet action step.
19
+ */
20
+ export type WalletActionStepType = 'evm_transaction' | 'evm_user_operation';
21
+
22
+ /**
23
+ * Status of an EVM step in a wallet action.
24
+ */
25
+ export type EvmWalletActionStepStatus =
26
+ | 'preparing'
27
+ | 'queued'
28
+ | 'pending'
29
+ | 'retrying'
30
+ | 'confirmed'
31
+ | 'rejected'
32
+ | 'reverted'
33
+ | 'replaced'
34
+ | 'abandoned';
35
+
36
+ /**
37
+ * A description of why a wallet action (or a step within a wallet action) failed.
38
+ */
39
+ export interface FailureReason {
40
+ /**
41
+ * Human-readable failure message.
42
+ */
43
+ message: string;
44
+
45
+ /**
46
+ * Additional error details, if available.
47
+ */
48
+ details?: unknown;
49
+ }
50
+
51
+ /**
52
+ * A wallet action step consisting of an EVM transaction.
53
+ */
54
+ export interface EvmTransactionWalletActionStep {
55
+ /**
56
+ * CAIP-2 chain identifier of the transaction, containing the chain ID.
57
+ */
58
+ caip2: string;
59
+
60
+ /**
61
+ * Status of an EVM step in a wallet action.
62
+ */
63
+ status: EvmWalletActionStepStatus;
64
+
65
+ /**
66
+ * The transaction hash for this step. May change while the step status is
67
+ * non-terminal.
68
+ */
69
+ transaction_hash: string | null;
70
+
71
+ type: 'evm_transaction';
72
+
73
+ /**
74
+ * A description of why a wallet action (or a step within a wallet action) failed.
75
+ */
76
+ failure_reason?: FailureReason;
77
+ }
78
+
79
+ /**
80
+ * A wallet action step consisting of an EVM user operation.
81
+ */
82
+ export interface EvmUserOperationWalletActionStep {
83
+ /**
84
+ * Transaction hash of the bundle in which this user operation was included. Null
85
+ * until included by a bundler.
86
+ */
87
+ bundle_transaction_hash: string | null;
88
+
89
+ /**
90
+ * CAIP-2 network identifier, containing the chain ID of the user operation.
91
+ */
92
+ caip2: string;
93
+
94
+ /**
95
+ * The entrypoint version of the user operation.
96
+ */
97
+ entrypoint_version: '0.6' | '0.7' | '0.8' | '0.9';
98
+
99
+ /**
100
+ * Status of an EVM step in a wallet action.
101
+ */
102
+ status: EvmWalletActionStepStatus;
103
+
104
+ type: 'evm_user_operation';
105
+
106
+ /**
107
+ * The user operation hash for this step. May change while the step status is
108
+ * non-terminal.
109
+ */
110
+ user_operation_hash: string | null;
111
+
112
+ /**
113
+ * A description of why a wallet action (or a step within a wallet action) failed.
114
+ */
115
+ failure_reason?: FailureReason;
116
+ }
117
+
118
+ /**
119
+ * A step within a wallet action, representing a single onchain action.
120
+ */
121
+ export type WalletActionStep = EvmTransactionWalletActionStep | EvmUserOperationWalletActionStep;
122
+
123
+ /**
124
+ * Response for a swap action.
125
+ */
126
+ export interface SwapActionResponse {
127
+ /**
128
+ * The ID of the wallet action.
129
+ */
130
+ id: string;
131
+
132
+ /**
133
+ * CAIP-2 chain identifier for the swap.
134
+ */
135
+ caip2: string;
136
+
137
+ /**
138
+ * ISO 8601 timestamp of when the wallet action was created.
139
+ */
140
+ created_at: string;
141
+
142
+ /**
143
+ * Exact base-unit amount of input token. Populated after on-chain confirmation.
144
+ */
145
+ input_amount: string | null;
146
+
147
+ /**
148
+ * Token address or "native" for the token being sold.
149
+ */
150
+ input_token: string;
151
+
152
+ /**
153
+ * Exact base-unit amount of output token. Populated after on-chain confirmation.
154
+ */
155
+ output_amount: string | null;
156
+
157
+ /**
158
+ * Token address or "native" for the token being bought.
159
+ */
160
+ output_token: string;
161
+
162
+ /**
163
+ * Status of a wallet action.
164
+ */
165
+ status: WalletActionStatus;
166
+
167
+ type: 'swap';
168
+
169
+ /**
170
+ * The ID of the wallet involved in the action.
171
+ */
172
+ wallet_id: string;
173
+
174
+ /**
175
+ * The steps of the wallet action. Only returned if `?include=steps` is provided.
176
+ */
177
+ steps?: Array<WalletActionStep>;
178
+ }
179
+
180
+ /**
181
+ * Response for a transfer action.
182
+ */
183
+ export interface TransferActionResponse {
184
+ /**
185
+ * The ID of the wallet action.
186
+ */
187
+ id: string;
188
+
189
+ /**
190
+ * ISO 8601 timestamp of when the wallet action was created.
191
+ */
192
+ created_at: string;
193
+
194
+ /**
195
+ * Recipient address.
196
+ */
197
+ destination_address: string;
198
+
199
+ /**
200
+ * Decimal amount as the user provided (e.g. "1.5").
201
+ */
202
+ source_amount: string;
203
+
204
+ /**
205
+ * Asset identifier (e.g. "usdc", "eth").
206
+ */
207
+ source_asset: string;
208
+
209
+ /**
210
+ * Chain name (e.g. "base", "ethereum").
211
+ */
212
+ source_chain: string;
213
+
214
+ /**
215
+ * Status of a wallet action.
216
+ */
217
+ status: WalletActionStatus;
218
+
219
+ type: 'transfer';
220
+
221
+ /**
222
+ * The ID of the wallet involved in the action.
223
+ */
224
+ wallet_id: string;
225
+
226
+ /**
227
+ * The steps of the wallet action. Only returned if `?include=steps` is provided.
228
+ */
229
+ steps?: Array<WalletActionStep>;
230
+ }
231
+
232
+ /**
233
+ * Response for a wallet action, discriminated on type.
234
+ */
235
+ export type WalletActionResponse = SwapActionResponse | TransferActionResponse;
236
+
237
+ export declare namespace WalletActions {
238
+ export {
239
+ type WalletActionType as WalletActionType,
240
+ type WalletActionStatus as WalletActionStatus,
241
+ type WalletActionStepType as WalletActionStepType,
242
+ type EvmWalletActionStepStatus as EvmWalletActionStepStatus,
243
+ type FailureReason as FailureReason,
244
+ type EvmTransactionWalletActionStep as EvmTransactionWalletActionStep,
245
+ type EvmUserOperationWalletActionStep as EvmUserOperationWalletActionStep,
246
+ type WalletActionStep as WalletActionStep,
247
+ type SwapActionResponse as SwapActionResponse,
248
+ type TransferActionResponse as TransferActionResponse,
249
+ type WalletActionResponse as WalletActionResponse,
250
+ };
251
+ }