@privy-io/api-types 0.7.0 → 0.9.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 (188) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/client.d.mts +39 -30
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +39 -30
  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/internal/utils/env.js +2 -2
  11. package/internal/utils/env.js.map +1 -1
  12. package/internal/utils/env.mjs +2 -2
  13. package/internal/utils/env.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/accounts.d.mts +79 -106
  16. package/resources/accounts.d.mts.map +1 -1
  17. package/resources/accounts.d.ts +79 -106
  18. package/resources/accounts.d.ts.map +1 -1
  19. package/resources/accounts.js.map +1 -1
  20. package/resources/accounts.mjs.map +1 -1
  21. package/resources/aggregations.d.mts +18 -392
  22. package/resources/aggregations.d.mts.map +1 -1
  23. package/resources/aggregations.d.ts +18 -392
  24. package/resources/aggregations.d.ts.map +1 -1
  25. package/resources/aggregations.js.map +1 -1
  26. package/resources/aggregations.mjs.map +1 -1
  27. package/resources/apps.d.mts +154 -71
  28. package/resources/apps.d.mts.map +1 -1
  29. package/resources/apps.d.ts +154 -71
  30. package/resources/apps.d.ts.map +1 -1
  31. package/resources/apps.js.map +1 -1
  32. package/resources/apps.mjs.map +1 -1
  33. package/resources/client-auth.d.mts +796 -427
  34. package/resources/client-auth.d.mts.map +1 -1
  35. package/resources/client-auth.d.ts +796 -427
  36. package/resources/client-auth.d.ts.map +1 -1
  37. package/resources/client-auth.js.map +1 -1
  38. package/resources/client-auth.mjs.map +1 -1
  39. package/resources/cross-app.d.mts +14 -13
  40. package/resources/cross-app.d.mts.map +1 -1
  41. package/resources/cross-app.d.ts +14 -13
  42. package/resources/cross-app.d.ts.map +1 -1
  43. package/resources/embedded-wallets.d.mts +167 -83
  44. package/resources/embedded-wallets.d.mts.map +1 -1
  45. package/resources/embedded-wallets.d.ts +167 -83
  46. package/resources/embedded-wallets.d.ts.map +1 -1
  47. package/resources/embedded-wallets.js.map +1 -1
  48. package/resources/embedded-wallets.mjs.map +1 -1
  49. package/resources/funding.d.mts +150 -64
  50. package/resources/funding.d.mts.map +1 -1
  51. package/resources/funding.d.ts +150 -64
  52. package/resources/funding.d.ts.map +1 -1
  53. package/resources/funding.js.map +1 -1
  54. package/resources/funding.mjs.map +1 -1
  55. package/resources/index.d.mts +18 -15
  56. package/resources/index.d.mts.map +1 -1
  57. package/resources/index.d.ts +18 -15
  58. package/resources/index.d.ts.map +1 -1
  59. package/resources/index.js +7 -1
  60. package/resources/index.js.map +1 -1
  61. package/resources/index.mjs +3 -0
  62. package/resources/index.mjs.map +1 -1
  63. package/resources/intents.d.mts +224 -1757
  64. package/resources/intents.d.mts.map +1 -1
  65. package/resources/intents.d.ts +224 -1757
  66. package/resources/intents.d.ts.map +1 -1
  67. package/resources/intents.js.map +1 -1
  68. package/resources/intents.mjs.map +1 -1
  69. package/resources/key-quorums.d.mts +74 -26
  70. package/resources/key-quorums.d.mts.map +1 -1
  71. package/resources/key-quorums.d.ts +74 -26
  72. package/resources/key-quorums.d.ts.map +1 -1
  73. package/resources/key-quorums.js +8 -8
  74. package/resources/key-quorums.js.map +1 -1
  75. package/resources/key-quorums.mjs +8 -8
  76. package/resources/key-quorums.mjs.map +1 -1
  77. package/resources/kraken-embed.d.mts +52 -1
  78. package/resources/kraken-embed.d.mts.map +1 -1
  79. package/resources/kraken-embed.d.ts +52 -1
  80. package/resources/kraken-embed.d.ts.map +1 -1
  81. package/resources/policies.d.mts +512 -992
  82. package/resources/policies.d.mts.map +1 -1
  83. package/resources/policies.d.ts +512 -992
  84. package/resources/policies.d.ts.map +1 -1
  85. package/resources/policies.js +48 -41
  86. package/resources/policies.js.map +1 -1
  87. package/resources/policies.mjs +48 -41
  88. package/resources/policies.mjs.map +1 -1
  89. package/resources/shared.d.mts +59 -0
  90. package/resources/shared.d.mts.map +1 -0
  91. package/resources/shared.d.ts +59 -0
  92. package/resources/shared.d.ts.map +1 -0
  93. package/resources/shared.js +9 -0
  94. package/resources/shared.js.map +1 -0
  95. package/resources/shared.mjs +5 -0
  96. package/resources/shared.mjs.map +1 -0
  97. package/resources/swaps.d.mts +108 -0
  98. package/resources/swaps.d.mts.map +1 -0
  99. package/resources/swaps.d.ts +108 -0
  100. package/resources/swaps.d.ts.map +1 -0
  101. package/resources/swaps.js +9 -0
  102. package/resources/swaps.js.map +1 -0
  103. package/resources/swaps.mjs +5 -0
  104. package/resources/swaps.mjs.map +1 -0
  105. package/resources/transactions.d.mts +150 -98
  106. package/resources/transactions.d.mts.map +1 -1
  107. package/resources/transactions.d.ts +150 -98
  108. package/resources/transactions.d.ts.map +1 -1
  109. package/resources/users.d.mts +207 -240
  110. package/resources/users.d.mts.map +1 -1
  111. package/resources/users.d.ts +207 -240
  112. package/resources/users.d.ts.map +1 -1
  113. package/resources/users.js.map +1 -1
  114. package/resources/users.mjs.map +1 -1
  115. package/resources/wallet-actions.d.mts +439 -0
  116. package/resources/wallet-actions.d.mts.map +1 -0
  117. package/resources/wallet-actions.d.ts +439 -0
  118. package/resources/wallet-actions.d.ts.map +1 -0
  119. package/resources/wallet-actions.js +9 -0
  120. package/resources/wallet-actions.js.map +1 -0
  121. package/resources/wallet-actions.mjs +5 -0
  122. package/resources/wallet-actions.mjs.map +1 -0
  123. package/resources/wallets/balance.d.mts +2 -1
  124. package/resources/wallets/balance.d.mts.map +1 -1
  125. package/resources/wallets/balance.d.ts +2 -1
  126. package/resources/wallets/balance.d.ts.map +1 -1
  127. package/resources/wallets/balance.js.map +1 -1
  128. package/resources/wallets/balance.mjs.map +1 -1
  129. package/resources/wallets/index.d.mts +1 -1
  130. package/resources/wallets/index.d.mts.map +1 -1
  131. package/resources/wallets/index.d.ts +1 -1
  132. package/resources/wallets/index.d.ts.map +1 -1
  133. package/resources/wallets/index.js.map +1 -1
  134. package/resources/wallets/index.mjs.map +1 -1
  135. package/resources/wallets/transactions.d.mts +11 -30
  136. package/resources/wallets/transactions.d.mts.map +1 -1
  137. package/resources/wallets/transactions.d.ts +11 -30
  138. package/resources/wallets/transactions.d.ts.map +1 -1
  139. package/resources/wallets/transactions.js.map +1 -1
  140. package/resources/wallets/transactions.mjs.map +1 -1
  141. package/resources/wallets/wallets.d.mts +2435 -923
  142. package/resources/wallets/wallets.d.mts.map +1 -1
  143. package/resources/wallets/wallets.d.ts +2435 -923
  144. package/resources/wallets/wallets.d.ts.map +1 -1
  145. package/resources/wallets/wallets.js +24 -11
  146. package/resources/wallets/wallets.js.map +1 -1
  147. package/resources/wallets/wallets.mjs +24 -11
  148. package/resources/wallets/wallets.mjs.map +1 -1
  149. package/resources/webhooks.d.mts +1296 -186
  150. package/resources/webhooks.d.mts.map +1 -1
  151. package/resources/webhooks.d.ts +1296 -186
  152. package/resources/webhooks.d.ts.map +1 -1
  153. package/resources/webhooks.js.map +1 -1
  154. package/resources/webhooks.mjs.map +1 -1
  155. package/resources/yield.d.mts +25 -1
  156. package/resources/yield.d.mts.map +1 -1
  157. package/resources/yield.d.ts +25 -1
  158. package/resources/yield.d.ts.map +1 -1
  159. package/src/client.ts +869 -92
  160. package/src/internal/utils/env.ts +2 -2
  161. package/src/resources/accounts.ts +93 -120
  162. package/src/resources/aggregations.ts +18 -702
  163. package/src/resources/apps.ts +211 -111
  164. package/src/resources/client-auth.ts +1361 -896
  165. package/src/resources/cross-app.ts +19 -15
  166. package/src/resources/embedded-wallets.ts +219 -123
  167. package/src/resources/funding.ts +263 -173
  168. package/src/resources/index.ts +447 -65
  169. package/src/resources/intents.ts +370 -3100
  170. package/src/resources/key-quorums.ts +100 -32
  171. package/src/resources/kraken-embed.ts +105 -0
  172. package/src/resources/policies.ts +648 -1494
  173. package/src/resources/shared.ts +79 -0
  174. package/src/resources/swaps.ts +136 -0
  175. package/src/resources/transactions.ts +169 -102
  176. package/src/resources/users.ts +676 -729
  177. package/src/resources/wallet-actions.ts +573 -0
  178. package/src/resources/wallets/balance.ts +2 -1
  179. package/src/resources/wallets/index.ts +156 -17
  180. package/src/resources/wallets/transactions.ts +12 -88
  181. package/src/resources/wallets/wallets.ts +3162 -1109
  182. package/src/resources/webhooks.ts +1609 -229
  183. package/src/resources/yield.ts +29 -0
  184. package/src/version.ts +1 -1
  185. package/version.d.mts +1 -1
  186. package/version.d.ts +1 -1
  187. package/version.js +1 -1
  188. package/version.mjs +1 -1
@@ -0,0 +1,79 @@
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 Shared extends APIResource {}
6
+
7
+ /**
8
+ * A simple success response.
9
+ */
10
+ export interface SuccessResponse {
11
+ success: boolean;
12
+ }
13
+
14
+ /**
15
+ * A P-256 (secp256r1) public key.
16
+ */
17
+ export type P256PublicKey = string;
18
+
19
+ /**
20
+ * A unique identifier for a key quorum.
21
+ */
22
+ export type KeyQuorumID = string;
23
+
24
+ /**
25
+ * Owner input specifying a Privy user ID.
26
+ */
27
+ export interface OwnerInputUser {
28
+ user_id: string;
29
+ }
30
+
31
+ /**
32
+ * Owner input specifying a P-256 public key.
33
+ */
34
+ export interface OwnerInputPublicKey {
35
+ /**
36
+ * A P-256 (secp256r1) public key.
37
+ */
38
+ public_key: P256PublicKey;
39
+ }
40
+
41
+ /**
42
+ * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
43
+ * null to remove the current owner.
44
+ */
45
+ export type OwnerInput = OwnerInputUser | OwnerInputPublicKey;
46
+
47
+ /**
48
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
49
+ * not specify an owner.
50
+ */
51
+ export type OwnerIDInput = string | null;
52
+
53
+ /**
54
+ * A monetary value with its currency denomination.
55
+ */
56
+ export interface CurrencyAmount {
57
+ /**
58
+ * Currency code
59
+ */
60
+ currency: 'usd';
61
+
62
+ /**
63
+ * The monetary value as a string.
64
+ */
65
+ value: string;
66
+ }
67
+
68
+ export declare namespace Shared {
69
+ export {
70
+ type SuccessResponse as SuccessResponse,
71
+ type P256PublicKey as P256PublicKey,
72
+ type KeyQuorumID as KeyQuorumID,
73
+ type OwnerInputUser as OwnerInputUser,
74
+ type OwnerInputPublicKey as OwnerInputPublicKey,
75
+ type OwnerInput as OwnerInput,
76
+ type OwnerIDInput as OwnerIDInput,
77
+ type CurrencyAmount as CurrencyAmount,
78
+ };
79
+ }
@@ -0,0 +1,136 @@
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 Swaps extends APIResource {}
6
+
7
+ /**
8
+ * Whether the swap amount refers to the input token or output token.
9
+ */
10
+ export type SwapAmountType = 'exact_input' | 'exact_output';
11
+
12
+ /**
13
+ * Input for requesting a token swap quote.
14
+ */
15
+ export interface SwapQuoteRequestBody {
16
+ /**
17
+ * Amount in base units (e.g., wei for ETH).
18
+ */
19
+ amount: string;
20
+
21
+ /**
22
+ * Chain identifier (e.g., "eip155:1" for Ethereum mainnet).
23
+ */
24
+ caip2: string;
25
+
26
+ /**
27
+ * Token address to sell, or "native" for the chain's native token.
28
+ */
29
+ input_token: string;
30
+
31
+ /**
32
+ * Token address to buy, or "native" for the chain's native token.
33
+ */
34
+ output_token: string;
35
+
36
+ /**
37
+ * Whether the swap amount refers to the input token or output token.
38
+ */
39
+ amount_type?: SwapAmountType;
40
+
41
+ /**
42
+ * Maximum slippage tolerance in basis points (e.g., 50 for 0.5%). If omitted,
43
+ * auto-slippage is used.
44
+ */
45
+ slippage_bps?: number;
46
+ }
47
+
48
+ /**
49
+ * Pricing data for a token swap.
50
+ */
51
+ export interface SwapQuoteResponse {
52
+ /**
53
+ * Chain identifier.
54
+ */
55
+ caip2: string;
56
+
57
+ /**
58
+ * Estimated amount of output token in base units.
59
+ */
60
+ est_output_amount: string;
61
+
62
+ /**
63
+ * Estimated gas cost in base units of the native token.
64
+ */
65
+ gas_estimate: string;
66
+
67
+ /**
68
+ * Amount of input token in base units.
69
+ */
70
+ input_amount: string;
71
+
72
+ /**
73
+ * Token address being sold.
74
+ */
75
+ input_token: string;
76
+
77
+ /**
78
+ * Minimum output amount accounting for slippage, in base units.
79
+ */
80
+ minimum_output_amount: string;
81
+
82
+ /**
83
+ * Token address being bought.
84
+ */
85
+ output_token: string;
86
+ }
87
+
88
+ /**
89
+ * Input for executing a token swap.
90
+ */
91
+ export interface SwapRequestBody {
92
+ /**
93
+ * Amount in base units (e.g., wei for ETH).
94
+ */
95
+ amount: string;
96
+
97
+ /**
98
+ * Chain identifier (e.g., "eip155:1" for Ethereum mainnet).
99
+ */
100
+ caip2: string;
101
+
102
+ /**
103
+ * Token address to sell, or "native" for the chain's native token.
104
+ */
105
+ input_token: string;
106
+
107
+ /**
108
+ * Token address to buy, or "native" for the chain's native token.
109
+ */
110
+ output_token: string;
111
+
112
+ /**
113
+ * Whether the swap amount refers to the input token or output token.
114
+ */
115
+ amount_type?: SwapAmountType;
116
+
117
+ /**
118
+ * Address to receive the output tokens. Defaults to the wallet address if not
119
+ * specified.
120
+ */
121
+ recipient?: string;
122
+
123
+ /**
124
+ * Maximum slippage tolerance in basis points (e.g., 50 for 0.5%).
125
+ */
126
+ slippage_bps?: number;
127
+ }
128
+
129
+ export declare namespace Swaps {
130
+ export {
131
+ type SwapAmountType as SwapAmountType,
132
+ type SwapQuoteRequestBody as SwapQuoteRequestBody,
133
+ type SwapQuoteResponse as SwapQuoteResponse,
134
+ type SwapRequestBody as SwapRequestBody,
135
+ };
136
+ }
@@ -19,7 +19,7 @@ export class Transactions extends APIResource {
19
19
  * );
20
20
  * ```
21
21
  */
22
- get(transactionID: string, options?: RequestOptions): APIPromise<TransactionGetResponse> {
22
+ get(transactionID: string, options?: RequestOptions): APIPromise<Transaction> {
23
23
  return this._client.get(path`/v1/transactions/${transactionID}`, options);
24
24
  }
25
25
  }
@@ -30,155 +30,196 @@ export class Transactions extends APIResource {
30
30
  export interface TransactionScanningRequestBody {
31
31
  chain_id: string;
32
32
 
33
- metadata: TransactionScanningRequestBody.Metadata;
34
-
35
- request: TransactionScanningRequestBody.Request;
36
- }
37
-
38
- export namespace TransactionScanningRequestBody {
39
- export interface Metadata {
40
- domain: string;
41
- }
42
-
43
- export interface Request {
44
- method: string;
33
+ /**
34
+ * Additional information for Blockaid to validate against.
35
+ */
36
+ metadata: TransactionScanningMetadata;
45
37
 
46
- params: Array<unknown>;
47
- }
38
+ /**
39
+ * Raw RPC request to execute with the wallet.
40
+ */
41
+ request: TransactionScanningRpcRequest;
48
42
  }
49
43
 
50
44
  /**
51
45
  * The response from scanning a transaction.
52
46
  */
53
47
  export interface TransactionScanningResponseBody {
54
- simulation: TransactionScanningResponseBody.UnionMember0 | TransactionScanningResponseBody.UnionMember1;
48
+ /**
49
+ * The simulation result from a transaction scan.
50
+ */
51
+ simulation: TransactionScanningSimulationResult;
55
52
 
56
- validation: TransactionScanningResponseBody.UnionMember0 | TransactionScanningResponseBody.UnionMember1;
53
+ /**
54
+ * The validation result from a transaction scan.
55
+ */
56
+ validation: TransactionScanningValidationResult;
57
57
  }
58
58
 
59
- export namespace TransactionScanningResponseBody {
60
- export interface UnionMember0 {
61
- error: string;
62
-
63
- status: 'Error';
64
- }
65
-
66
- export interface UnionMember1 {
67
- assets_diffs: Array<UnionMember1.AssetsDiff>;
68
-
69
- exposures: Array<UnionMember1.Exposure>;
70
-
71
- status: 'Success';
72
-
73
- params?: UnionMember1.Params;
74
- }
59
+ /**
60
+ * Additional information for Blockaid to validate against.
61
+ */
62
+ export interface TransactionScanningMetadata {
63
+ domain: string;
64
+ }
75
65
 
76
- export namespace UnionMember1 {
77
- export interface AssetsDiff {
78
- asset: AssetsDiff.Asset;
66
+ /**
67
+ * Raw RPC request to execute with the wallet.
68
+ */
69
+ export interface TransactionScanningRpcRequest {
70
+ method: string;
79
71
 
80
- in: Array<AssetsDiff.In>;
72
+ params: Array<unknown>;
73
+ }
81
74
 
82
- out: Array<AssetsDiff.Out>;
83
- }
75
+ /**
76
+ * A failed validation result from a transaction scan.
77
+ */
78
+ export interface TransactionScanningValidationErrorResult {
79
+ error: string;
84
80
 
85
- export namespace AssetsDiff {
86
- export interface Asset {
87
- decimals?: number;
81
+ status: 'Error';
82
+ }
88
83
 
89
- logo_url?: string;
84
+ /**
85
+ * A successful validation result from a transaction scan.
86
+ */
87
+ export interface TransactionScanningValidationSuccessResult {
88
+ result_type: string;
90
89
 
91
- name?: string;
90
+ status: 'Success';
91
+ }
92
92
 
93
- symbol?: string;
93
+ /**
94
+ * The validation result from a transaction scan.
95
+ */
96
+ export type TransactionScanningValidationResult =
97
+ | TransactionScanningValidationErrorResult
98
+ | TransactionScanningValidationSuccessResult;
94
99
 
95
- type?: string;
96
- }
100
+ /**
101
+ * Information about the moving asset in a transaction scan.
102
+ */
103
+ export interface TransactionScanningAssetInfo {
104
+ decimals?: number;
97
105
 
98
- export interface In {
99
- usd_price?: string;
106
+ logo_url?: string;
100
107
 
101
- value?: string;
102
- }
108
+ name?: string;
103
109
 
104
- export interface Out {
105
- usd_price?: string;
110
+ symbol?: string;
106
111
 
107
- value?: string;
108
- }
109
- }
112
+ type?: string;
113
+ }
110
114
 
111
- export interface Exposure {
112
- asset: Exposure.Asset;
115
+ /**
116
+ * The value of an asset in a transaction scan result.
117
+ */
118
+ export interface TransactionScanningAssetValue {
119
+ usd_price?: string;
113
120
 
114
- spenders: { [key: string]: Exposure.Spenders };
115
- }
121
+ value?: string;
122
+ }
116
123
 
117
- export namespace Exposure {
118
- export interface Asset {
119
- decimals?: number;
124
+ /**
125
+ * An asset diff representing assets entering/leaving a wallet.
126
+ */
127
+ export interface TransactionScanningAssetDiff {
128
+ /**
129
+ * Information about the moving asset in a transaction scan.
130
+ */
131
+ asset: TransactionScanningAssetInfo;
120
132
 
121
- logo_url?: string;
133
+ in: Array<TransactionScanningAssetValue>;
122
134
 
123
- name?: string;
135
+ out: Array<TransactionScanningAssetValue>;
136
+ }
124
137
 
125
- symbol?: string;
138
+ /**
139
+ * An exposure representing assets approved to spend.
140
+ */
141
+ export interface TransactionScanningExposure {
142
+ /**
143
+ * Information about the moving asset in a transaction scan.
144
+ */
145
+ asset: TransactionScanningAssetInfo;
126
146
 
127
- type?: string;
128
- }
147
+ spenders: { [key: string]: TransactionScanningAssetValue };
148
+ }
129
149
 
130
- export interface Spenders {
131
- usd_price?: string;
150
+ /**
151
+ * Decoded calldata from a scanned transaction.
152
+ */
153
+ export interface TransactionScanningCalldata {
154
+ function_selector: string;
132
155
 
133
- value?: string;
134
- }
135
- }
156
+ function_declaration?: string;
136
157
 
137
- export interface Params {
138
- block_tag?: string;
158
+ function_signature?: string;
159
+ }
139
160
 
140
- calldata?: Params.Calldata;
161
+ /**
162
+ * The parameters of the scanned transaction.
163
+ */
164
+ export interface TransactionScanningParams {
165
+ block_tag?: string;
141
166
 
142
- chain?: string;
167
+ /**
168
+ * Decoded calldata from a scanned transaction.
169
+ */
170
+ calldata?: TransactionScanningCalldata;
143
171
 
144
- data?: string;
172
+ chain?: string;
145
173
 
146
- from?: string;
174
+ data?: string;
147
175
 
148
- gas?: string;
176
+ from?: string;
149
177
 
150
- gas_price?: string;
178
+ gas?: string;
151
179
 
152
- to?: string;
180
+ gas_price?: string;
153
181
 
154
- value?: string;
155
- }
182
+ to?: string;
156
183
 
157
- export namespace Params {
158
- export interface Calldata {
159
- function_selector: string;
184
+ value?: string;
185
+ }
160
186
 
161
- function_declaration?: string;
187
+ /**
188
+ * A failed simulation result from a transaction scan.
189
+ */
190
+ export interface TransactionScanningSimulationErrorResult {
191
+ error: string;
162
192
 
163
- function_signature?: string;
164
- }
165
- }
166
- }
193
+ status: 'Error';
194
+ }
167
195
 
168
- export interface UnionMember0 {
169
- error: string;
196
+ /**
197
+ * A successful simulation result from a transaction scan.
198
+ */
199
+ export interface TransactionScanningSimulationSuccessResult {
200
+ assets_diffs: Array<TransactionScanningAssetDiff>;
170
201
 
171
- status: 'Error';
172
- }
202
+ exposures: Array<TransactionScanningExposure>;
173
203
 
174
- export interface UnionMember1 {
175
- result_type: string;
204
+ status: 'Success';
176
205
 
177
- status: 'Success';
178
- }
206
+ /**
207
+ * The parameters of the scanned transaction.
208
+ */
209
+ params?: TransactionScanningParams;
179
210
  }
180
211
 
181
- export interface TransactionGetResponse {
212
+ /**
213
+ * The simulation result from a transaction scan.
214
+ */
215
+ export type TransactionScanningSimulationResult =
216
+ | TransactionScanningSimulationErrorResult
217
+ | TransactionScanningSimulationSuccessResult;
218
+
219
+ /**
220
+ * A transaction from a Privy wallet.
221
+ */
222
+ export interface Transaction {
182
223
  id: string;
183
224
 
184
225
  caip2: string;
@@ -199,13 +240,39 @@ export interface TransactionGetResponse {
199
240
 
200
241
  wallet_id: string;
201
242
 
243
+ reference_id?: string | null;
244
+
202
245
  sponsored?: boolean;
246
+
247
+ user_operation_hash?: string;
248
+ }
249
+
250
+ /**
251
+ * A list of transactions.
252
+ */
253
+ export interface TransactionList {
254
+ transactions: Array<Transaction>;
203
255
  }
204
256
 
205
257
  export declare namespace Transactions {
206
258
  export {
207
259
  type TransactionScanningRequestBody as TransactionScanningRequestBody,
208
260
  type TransactionScanningResponseBody as TransactionScanningResponseBody,
209
- type TransactionGetResponse as TransactionGetResponse,
261
+ type TransactionScanningMetadata as TransactionScanningMetadata,
262
+ type TransactionScanningRpcRequest as TransactionScanningRpcRequest,
263
+ type TransactionScanningValidationErrorResult as TransactionScanningValidationErrorResult,
264
+ type TransactionScanningValidationSuccessResult as TransactionScanningValidationSuccessResult,
265
+ type TransactionScanningValidationResult as TransactionScanningValidationResult,
266
+ type TransactionScanningAssetInfo as TransactionScanningAssetInfo,
267
+ type TransactionScanningAssetValue as TransactionScanningAssetValue,
268
+ type TransactionScanningAssetDiff as TransactionScanningAssetDiff,
269
+ type TransactionScanningExposure as TransactionScanningExposure,
270
+ type TransactionScanningCalldata as TransactionScanningCalldata,
271
+ type TransactionScanningParams as TransactionScanningParams,
272
+ type TransactionScanningSimulationErrorResult as TransactionScanningSimulationErrorResult,
273
+ type TransactionScanningSimulationSuccessResult as TransactionScanningSimulationSuccessResult,
274
+ type TransactionScanningSimulationResult as TransactionScanningSimulationResult,
275
+ type Transaction as Transaction,
276
+ type TransactionList as TransactionList,
210
277
  };
211
278
  }