@privy-io/api-types 0.6.1 → 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 (197) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/client.d.mts +53 -29
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +53 -29
  5. package/client.d.ts.map +1 -1
  6. package/client.js +32 -7
  7. package/client.js.map +1 -1
  8. package/client.mjs +34 -9
  9. package/client.mjs.map +1 -1
  10. package/package.json +12 -1
  11. package/resources/accounts.d.mts +146 -4
  12. package/resources/accounts.d.mts.map +1 -1
  13. package/resources/accounts.d.ts +146 -4
  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 +197 -70
  24. package/resources/apps.d.mts.map +1 -1
  25. package/resources/apps.d.ts +197 -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 +975 -463
  30. package/resources/client-auth.d.mts.map +1 -1
  31. package/resources/client-auth.d.ts +975 -463
  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 +18 -14
  52. package/resources/index.d.mts.map +1 -1
  53. package/resources/index.d.ts +18 -14
  54. package/resources/index.d.ts.map +1 -1
  55. package/resources/index.js +9 -1
  56. package/resources/index.js.map +1 -1
  57. package/resources/index.mjs +6 -2
  58. package/resources/index.mjs.map +1 -1
  59. package/resources/intents.d.mts +446 -31
  60. package/resources/intents.d.mts.map +1 -1
  61. package/resources/intents.d.ts +446 -31
  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 +108 -17
  66. package/resources/key-quorums.d.mts.map +1 -1
  67. package/resources/key-quorums.d.ts +108 -17
  68. package/resources/key-quorums.d.ts.map +1 -1
  69. package/resources/key-quorums.js +26 -9
  70. package/resources/key-quorums.js.map +1 -1
  71. package/resources/key-quorums.mjs +26 -9
  72. package/resources/key-quorums.mjs.map +1 -1
  73. package/resources/kraken-embed.d.mts +62 -0
  74. package/resources/kraken-embed.d.mts.map +1 -0
  75. package/resources/kraken-embed.d.ts +62 -0
  76. package/resources/kraken-embed.d.ts.map +1 -0
  77. package/resources/kraken-embed.js +9 -0
  78. package/resources/kraken-embed.js.map +1 -0
  79. package/resources/kraken-embed.mjs +5 -0
  80. package/resources/kraken-embed.mjs.map +1 -0
  81. package/resources/policies.d.mts +342 -926
  82. package/resources/policies.d.mts.map +1 -1
  83. package/resources/policies.d.ts +342 -926
  84. package/resources/policies.d.ts.map +1 -1
  85. package/resources/policies.js +51 -41
  86. package/resources/policies.js.map +1 -1
  87. package/resources/policies.mjs +51 -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 +158 -93
  106. package/resources/transactions.d.mts.map +1 -1
  107. package/resources/transactions.d.ts +158 -93
  108. package/resources/transactions.d.ts.map +1 -1
  109. package/resources/transactions.js +3 -0
  110. package/resources/transactions.js.map +1 -1
  111. package/resources/transactions.mjs +3 -0
  112. package/resources/transactions.mjs.map +1 -1
  113. package/resources/users.d.mts +64 -94
  114. package/resources/users.d.mts.map +1 -1
  115. package/resources/users.d.ts +64 -94
  116. package/resources/users.d.ts.map +1 -1
  117. package/resources/users.js +3 -0
  118. package/resources/users.js.map +1 -1
  119. package/resources/users.mjs +3 -0
  120. package/resources/users.mjs.map +1 -1
  121. package/resources/wallet-actions.d.mts +187 -0
  122. package/resources/wallet-actions.d.mts.map +1 -0
  123. package/resources/wallet-actions.d.ts +187 -0
  124. package/resources/wallet-actions.d.ts.map +1 -0
  125. package/resources/wallet-actions.js +9 -0
  126. package/resources/wallet-actions.js.map +1 -0
  127. package/resources/wallet-actions.mjs +5 -0
  128. package/resources/wallet-actions.mjs.map +1 -0
  129. package/resources/wallets/balance.d.mts +7 -4
  130. package/resources/wallets/balance.d.mts.map +1 -1
  131. package/resources/wallets/balance.d.ts +7 -4
  132. package/resources/wallets/balance.d.ts.map +1 -1
  133. package/resources/wallets/balance.js +3 -0
  134. package/resources/wallets/balance.js.map +1 -1
  135. package/resources/wallets/balance.mjs +3 -0
  136. package/resources/wallets/balance.mjs.map +1 -1
  137. package/resources/wallets/index.d.mts +1 -1
  138. package/resources/wallets/index.d.mts.map +1 -1
  139. package/resources/wallets/index.d.ts +1 -1
  140. package/resources/wallets/index.d.ts.map +1 -1
  141. package/resources/wallets/index.js.map +1 -1
  142. package/resources/wallets/index.mjs.map +1 -1
  143. package/resources/wallets/transactions.d.mts +10 -6
  144. package/resources/wallets/transactions.d.mts.map +1 -1
  145. package/resources/wallets/transactions.d.ts +10 -6
  146. package/resources/wallets/transactions.d.ts.map +1 -1
  147. package/resources/wallets/transactions.js +3 -0
  148. package/resources/wallets/transactions.js.map +1 -1
  149. package/resources/wallets/transactions.mjs +3 -0
  150. package/resources/wallets/transactions.mjs.map +1 -1
  151. package/resources/wallets/wallets.d.mts +2399 -936
  152. package/resources/wallets/wallets.d.mts.map +1 -1
  153. package/resources/wallets/wallets.d.ts +2399 -936
  154. package/resources/wallets/wallets.d.ts.map +1 -1
  155. package/resources/wallets/wallets.js +28 -10
  156. package/resources/wallets/wallets.js.map +1 -1
  157. package/resources/wallets/wallets.mjs +28 -10
  158. package/resources/wallets/wallets.mjs.map +1 -1
  159. package/resources/webhooks.d.mts +780 -339
  160. package/resources/webhooks.d.mts.map +1 -1
  161. package/resources/webhooks.d.ts +780 -339
  162. package/resources/webhooks.d.ts.map +1 -1
  163. package/resources/webhooks.js.map +1 -1
  164. package/resources/webhooks.mjs.map +1 -1
  165. package/resources/yield.d.mts +50 -9
  166. package/resources/yield.d.mts.map +1 -1
  167. package/resources/yield.d.ts +50 -9
  168. package/resources/yield.d.ts.map +1 -1
  169. package/src/client.ts +884 -99
  170. package/src/resources/accounts.ts +179 -3
  171. package/src/resources/aggregations.ts +18 -702
  172. package/src/resources/apps.ts +250 -85
  173. package/src/resources/client-auth.ts +1453 -786
  174. package/src/resources/cross-app.ts +19 -15
  175. package/src/resources/embedded-wallets.ts +219 -123
  176. package/src/resources/funding.ts +263 -173
  177. package/src/resources/index.ts +444 -61
  178. package/src/resources/intents.ts +575 -37
  179. package/src/resources/key-quorums.ts +137 -21
  180. package/src/resources/kraken-embed.ts +85 -0
  181. package/src/resources/policies.ts +582 -1550
  182. package/src/resources/shared.ts +79 -0
  183. package/src/resources/swaps.ts +136 -0
  184. package/src/resources/transactions.ts +188 -91
  185. package/src/resources/users.ts +82 -132
  186. package/src/resources/wallet-actions.ts +251 -0
  187. package/src/resources/wallets/balance.ts +9 -2
  188. package/src/resources/wallets/index.ts +146 -16
  189. package/src/resources/wallets/transactions.ts +12 -4
  190. package/src/resources/wallets/wallets.ts +2922 -974
  191. package/src/resources/webhooks.ts +970 -454
  192. package/src/resources/yield.ts +68 -10
  193. package/src/version.ts +1 -1
  194. package/version.d.mts +1 -1
  195. package/version.d.ts +1 -1
  196. package/version.js +1 -1
  197. package/version.mjs +1 -1
@@ -1,7 +1,66 @@
1
1
  import { APIResource } from "../core/resource.js";
2
+ import * as SharedAPI from "./shared.js";
2
3
  import * as WalletsAPI from "./wallets/wallets.js";
3
4
  export declare class Accounts extends APIResource {
4
5
  }
6
+ /**
7
+ * A single asset entry in a balance, representing holdings across all supported
8
+ * chains.
9
+ */
10
+ export interface BalanceAsset {
11
+ /**
12
+ * The amount of the asset held, denominated in the unit of the asset itself, with
13
+ * 1 decimal of precision.
14
+ */
15
+ amount: string;
16
+ /**
17
+ * A monetary value with its currency denomination.
18
+ */
19
+ price: SharedAPI.CurrencyAmount;
20
+ /**
21
+ * The symbol of the asset (e.g. USDC, ETH).
22
+ */
23
+ symbol: string;
24
+ }
25
+ /**
26
+ * A single asset entry scoped to a specific chain.
27
+ */
28
+ export interface BalanceAssetByChain {
29
+ /**
30
+ * The amount of the asset held on this chain, denominated in the unit of the asset
31
+ * itself.
32
+ */
33
+ amount: string;
34
+ /**
35
+ * The CAIP-2 chain identifier (e.g. eip155:8453).
36
+ */
37
+ chain_id: string;
38
+ /**
39
+ * A monetary value with its currency denomination.
40
+ */
41
+ price: SharedAPI.CurrencyAmount;
42
+ /**
43
+ * The symbol of the asset (e.g. USDC, ETH).
44
+ */
45
+ symbol: string;
46
+ }
47
+ /**
48
+ * Balances for an asset account or wallet
49
+ */
50
+ export interface BalanceResponse {
51
+ /**
52
+ * The individual asset balances, each computed across all supported chains.
53
+ */
54
+ assets: Array<BalanceAsset>;
55
+ /**
56
+ * A monetary value with its currency denomination.
57
+ */
58
+ total: SharedAPI.CurrencyAmount;
59
+ /**
60
+ * Individual asset balances per chain.
61
+ */
62
+ assets_by_chain?: Array<BalanceAssetByChain>;
63
+ }
5
64
  /**
6
65
  * A wallet belonging to a digital asset account.
7
66
  */
@@ -53,18 +112,39 @@ export interface AccountWalletConfigurationItem {
53
112
  */
54
113
  custody?: WalletsAPI.WalletCustodian;
55
114
  }
115
+ /**
116
+ * An optional display name for the account.
117
+ */
118
+ export type AccountDisplayName = string;
119
+ /**
120
+ * Configuration for the wallets on this account.
121
+ */
122
+ export type AccountWalletsConfiguration = Array<AccountWalletConfigurationItem>;
56
123
  /**
57
124
  * Input for creating a digital asset account.
58
125
  */
59
126
  export interface CreateAccountInput {
60
127
  /**
61
- * Configuration for wallets to create.
128
+ * Configuration for the wallets on this account.
129
+ */
130
+ wallets_configuration: AccountWalletsConfiguration;
131
+ /**
132
+ * An optional display name for the account.
62
133
  */
63
- wallets_configuration: Array<AccountWalletConfigurationItem>;
134
+ display_name?: AccountDisplayName;
135
+ }
136
+ /**
137
+ * Input for updating a digital asset account.
138
+ */
139
+ export interface UpdateAccountInput {
64
140
  /**
65
141
  * An optional display name for the account.
66
142
  */
67
- display_name?: string;
143
+ display_name?: AccountDisplayName;
144
+ /**
145
+ * Configuration for the wallets on this account.
146
+ */
147
+ wallets_configuration?: AccountWalletsConfiguration;
68
148
  }
69
149
  /**
70
150
  * Paginated list of digital asset accounts.
@@ -79,7 +159,69 @@ export interface AccountsListResponse {
79
159
  */
80
160
  next_cursor: string | null;
81
161
  }
162
+ /**
163
+ * A digital asset account with its aggregated balance across all wallets and
164
+ * chains.
165
+ */
166
+ export interface AssetAccountWithBalance {
167
+ /**
168
+ * The account ID.
169
+ */
170
+ id: string;
171
+ /**
172
+ * Balances for an asset account or wallet
173
+ */
174
+ balance: BalanceResponse;
175
+ /**
176
+ * An optional display name for the account.
177
+ */
178
+ display_name: string | null;
179
+ /**
180
+ * The wallets belonging to this account.
181
+ */
182
+ wallets: Array<AccountWallet>;
183
+ }
184
+ /**
185
+ * Paginated list of digital asset accounts for the dashboard.
186
+ */
187
+ export interface AccountsDashboardListResponse {
188
+ /**
189
+ * The list of accounts, with balances included for dashboard display.
190
+ */
191
+ data: Array<AssetAccountWithBalance>;
192
+ /**
193
+ * Cursor for fetching the next page of results, or null if no more results.
194
+ */
195
+ next_cursor: string | null;
196
+ }
197
+ /**
198
+ * The balance of a digital asset account, aggregated across all wallets and
199
+ * supported chains.
200
+ */
201
+ export interface AccountBalanceResponse {
202
+ /**
203
+ * The individual asset balances, each computed across all supported chains.
204
+ */
205
+ assets: Array<BalanceAsset>;
206
+ /**
207
+ * A monetary value with its currency denomination.
208
+ */
209
+ total: SharedAPI.CurrencyAmount;
210
+ /**
211
+ * Individual asset balances per chain.
212
+ */
213
+ assets_by_chain?: Array<BalanceAssetByChain>;
214
+ }
215
+ /**
216
+ * Query parameters for the account balance endpoint.
217
+ */
218
+ export interface AccountBalanceParams {
219
+ /**
220
+ * When set to true, returns balances from testnet chains instead of mainnets.
221
+ */
222
+ testnet_mode?: 'true' | 'false';
223
+ }
82
224
  export declare namespace Accounts {
83
- export { type AccountWallet as AccountWallet, type AccountResponse as AccountResponse, type AccountWalletConfigurationItem as AccountWalletConfigurationItem, type CreateAccountInput as CreateAccountInput, type AccountsListResponse as AccountsListResponse, };
225
+ export { type BalanceAsset as BalanceAsset, type BalanceAssetByChain as BalanceAssetByChain, type BalanceResponse as BalanceResponse, type AccountWallet as AccountWallet, type AccountResponse as AccountResponse, type AccountWalletConfigurationItem as AccountWalletConfigurationItem, type AccountDisplayName as AccountDisplayName, type AccountWalletsConfiguration as AccountWalletsConfiguration, type CreateAccountInput as CreateAccountInput, type UpdateAccountInput as UpdateAccountInput, type AccountsListResponse as AccountsListResponse, type AssetAccountWithBalance as AssetAccountWithBalance, type AccountsDashboardListResponse as AccountsDashboardListResponse, type AccountBalanceResponse as AccountBalanceResponse, type AccountBalanceParams as AccountBalanceParams, };
84
226
  }
85
227
  //# sourceMappingURL=accounts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/resources/accounts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;AAEtB,qBAAa,QAAS,SAAQ,WAAW;CAAG;AAE5C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC,mBAAmB,CAAC;IAE3C;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC,mBAAmB,CAAC;IAE3C;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,qBAAqB,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAE7D;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;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I,oBAAoB,GAClD,CAAC;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"accounts.js","sourceRoot":"","sources":["../src/resources/accounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,MAAa,QAAS,SAAQ,sBAAW;CAAG;AAA5C,4BAA4C"}
1
+ {"version":3,"file":"accounts.js","sourceRoot":"","sources":["../src/resources/accounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,QAAS,SAAQ,sBAAW;CAAG;AAA5C,4BAA4C"}
@@ -1 +1 @@
1
- {"version":3,"file":"accounts.mjs","sourceRoot":"","sources":["../src/resources/accounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,QAAS,SAAQ,WAAW;CAAG"}
1
+ {"version":3,"file":"accounts.mjs","sourceRoot":"","sources":["../src/resources/accounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,QAAS,SAAQ,WAAW;CAAG"}
@@ -1,5 +1,6 @@
1
1
  import { APIResource } from "../core/resource.mjs";
2
- import * as WalletsAPI from "./wallets/wallets.mjs";
2
+ import * as PoliciesAPI from "./policies.mjs";
3
+ import * as SharedAPI from "./shared.mjs";
3
4
  export declare class Aggregations extends APIResource {
4
5
  }
5
6
  /**
@@ -17,33 +18,10 @@ export interface AggregationMetric {
17
18
  * The aggregation function to apply.
18
19
  */
19
20
  function: 'sum';
20
- abi?: Array<AggregationMetric.Abi>;
21
- }
22
- export declare namespace AggregationMetric {
23
- interface Abi {
24
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
25
- anonymous?: boolean;
26
- inputs?: Array<Abi.Input>;
27
- name?: string;
28
- outputs?: Array<Abi.Output>;
29
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
30
- }
31
- namespace Abi {
32
- interface Input {
33
- type: string;
34
- components?: Array<unknown>;
35
- indexed?: boolean;
36
- internalType?: string;
37
- name?: string;
38
- }
39
- interface Output {
40
- type: string;
41
- components?: Array<unknown>;
42
- indexed?: boolean;
43
- internalType?: string;
44
- name?: string;
45
- }
46
- }
21
+ /**
22
+ * A Solidity ABI definition for decoding smart contract calldata.
23
+ */
24
+ abi?: PoliciesAPI.AbiSchema;
47
25
  }
48
26
  /**
49
27
  * The time window configuration for an aggregation.
@@ -62,33 +40,10 @@ export interface AggregationWindow {
62
40
  export interface AggregationGroupBy {
63
41
  field: string;
64
42
  field_source: string;
65
- abi?: Array<AggregationGroupBy.Abi>;
66
- }
67
- export declare namespace AggregationGroupBy {
68
- interface Abi {
69
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
70
- anonymous?: boolean;
71
- inputs?: Array<Abi.Input>;
72
- name?: string;
73
- outputs?: Array<Abi.Output>;
74
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
75
- }
76
- namespace Abi {
77
- interface Input {
78
- type: string;
79
- components?: Array<unknown>;
80
- indexed?: boolean;
81
- internalType?: string;
82
- name?: string;
83
- }
84
- interface Output {
85
- type: string;
86
- components?: Array<unknown>;
87
- indexed?: boolean;
88
- internalType?: string;
89
- name?: string;
90
- }
91
- }
43
+ /**
44
+ * A Solidity ABI definition for decoding smart contract calldata.
45
+ */
46
+ abi?: PoliciesAPI.AbiSchema;
92
47
  }
93
48
  /**
94
49
  * An aggregation that measures and tracks metrics over a period of time.
@@ -126,170 +81,12 @@ export interface Aggregation {
126
81
  /**
127
82
  * Optional conditions to filter events before aggregation.
128
83
  */
129
- conditions?: Array<Aggregation.UnionMember0 | Aggregation.UnionMember1 | Aggregation.UnionMember2 | Aggregation.UnionMember3 | Aggregation.UnionMember4 | Aggregation.UnionMember5 | Aggregation.UnionMember6 | Aggregation.UnionMember7 | Aggregation.UnionMember8 | Aggregation.UnionMember9 | Aggregation.UnionMember10 | Aggregation.UnionMember11 | Aggregation.UnionMember12 | Aggregation.UnionMember13>;
84
+ conditions?: Array<PoliciesAPI.PolicyCondition>;
130
85
  /**
131
86
  * Optional grouping configuration for bucketing metrics.
132
87
  */
133
88
  group_by?: Array<AggregationGroupBy>;
134
89
  }
135
- export declare namespace Aggregation {
136
- interface UnionMember0 {
137
- field: 'to' | 'value' | 'chain_id';
138
- field_source: 'ethereum_transaction';
139
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
140
- value: string | Array<string>;
141
- }
142
- interface UnionMember1 {
143
- abi: Array<UnionMember1.Abi>;
144
- field: string;
145
- field_source: 'ethereum_calldata';
146
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
147
- value: string | Array<string>;
148
- }
149
- namespace UnionMember1 {
150
- interface Abi {
151
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
152
- anonymous?: boolean;
153
- inputs?: Array<Abi.Input>;
154
- name?: string;
155
- outputs?: Array<Abi.Output>;
156
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
157
- }
158
- namespace Abi {
159
- interface Input {
160
- type: string;
161
- components?: Array<unknown>;
162
- indexed?: boolean;
163
- internalType?: string;
164
- name?: string;
165
- }
166
- interface Output {
167
- type: string;
168
- components?: Array<unknown>;
169
- indexed?: boolean;
170
- internalType?: string;
171
- name?: string;
172
- }
173
- }
174
- }
175
- interface UnionMember2 {
176
- field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
177
- field_source: 'ethereum_typed_data_domain';
178
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
179
- value: string | Array<string>;
180
- }
181
- interface UnionMember3 {
182
- field: string;
183
- field_source: 'ethereum_typed_data_message';
184
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
185
- typed_data: UnionMember3.TypedData;
186
- value: string | Array<string>;
187
- }
188
- namespace UnionMember3 {
189
- interface TypedData {
190
- primary_type: string;
191
- types: {
192
- [key: string]: Array<TypedData.Type>;
193
- };
194
- }
195
- namespace TypedData {
196
- interface Type {
197
- name: string;
198
- type: string;
199
- }
200
- }
201
- }
202
- interface UnionMember4 {
203
- field: 'contract';
204
- field_source: 'ethereum_7702_authorization';
205
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
206
- value: string | Array<string>;
207
- }
208
- interface UnionMember5 {
209
- field: 'programId';
210
- field_source: 'solana_program_instruction';
211
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
212
- value: string | Array<string>;
213
- }
214
- interface UnionMember6 {
215
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
216
- field_source: 'solana_system_program_instruction';
217
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
218
- value: string | Array<string>;
219
- }
220
- interface UnionMember7 {
221
- field: 'instructionName' | 'Transfer.source' | 'Transfer.destination' | 'Transfer.authority' | 'Transfer.amount' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint' | 'Burn.account' | 'Burn.mint' | 'Burn.authority' | 'Burn.amount' | 'MintTo.mint' | 'MintTo.account' | 'MintTo.authority' | 'MintTo.amount' | 'CloseAccount.account' | 'CloseAccount.destination' | 'CloseAccount.authority' | 'InitializeAccount3.account' | 'InitializeAccount3.mint' | 'InitializeAccount3.owner';
222
- field_source: 'solana_token_program_instruction';
223
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
224
- value: string | Array<string>;
225
- }
226
- interface UnionMember8 {
227
- field: 'TransferContract.to_address' | 'TransferContract.amount' | 'TriggerSmartContract.contract_address' | 'TriggerSmartContract.call_value' | 'TriggerSmartContract.token_id' | 'TriggerSmartContract.call_token_value';
228
- field_source: 'tron_transaction';
229
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
230
- value: string | Array<string>;
231
- }
232
- interface UnionMember9 {
233
- field: 'current_unix_timestamp';
234
- field_source: 'system';
235
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
236
- value: string | Array<string>;
237
- }
238
- interface UnionMember10 {
239
- field: string;
240
- field_source: 'reference';
241
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
242
- value: string | Array<string>;
243
- }
244
- interface UnionMember11 {
245
- abi: Array<UnionMember11.Abi>;
246
- field: string;
247
- field_source: 'tron_trigger_smart_contract_data';
248
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
249
- value: string | Array<string>;
250
- }
251
- namespace UnionMember11 {
252
- interface Abi {
253
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
254
- anonymous?: boolean;
255
- inputs?: Array<Abi.Input>;
256
- name?: string;
257
- outputs?: Array<Abi.Output>;
258
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
259
- }
260
- namespace Abi {
261
- interface Input {
262
- type: string;
263
- components?: Array<unknown>;
264
- indexed?: boolean;
265
- internalType?: string;
266
- name?: string;
267
- }
268
- interface Output {
269
- type: string;
270
- components?: Array<unknown>;
271
- indexed?: boolean;
272
- internalType?: string;
273
- name?: string;
274
- }
275
- }
276
- }
277
- interface UnionMember12 {
278
- field: 'commandName';
279
- field_source: 'sui_transaction_command';
280
- operator: 'eq' | 'in';
281
- /**
282
- * SUI transaction commands allowlist for raw_sign endpoint policy evaluation
283
- */
284
- value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
285
- }
286
- interface UnionMember13 {
287
- field: 'recipient' | 'amount';
288
- field_source: 'sui_transfer_objects_command';
289
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
290
- value: string | Array<string>;
291
- }
292
- }
293
90
  /**
294
91
  * Input for creating an aggregation.
295
92
  */
@@ -314,192 +111,21 @@ export interface AggregationInput {
314
111
  /**
315
112
  * Optional conditions to filter events before aggregation.
316
113
  */
317
- conditions?: Array<AggregationInput.UnionMember0 | AggregationInput.UnionMember1 | AggregationInput.UnionMember2 | AggregationInput.UnionMember3 | AggregationInput.UnionMember4 | AggregationInput.UnionMember5 | AggregationInput.UnionMember6 | AggregationInput.UnionMember7 | AggregationInput.UnionMember8 | AggregationInput.UnionMember9 | AggregationInput.UnionMember10 | AggregationInput.UnionMember11 | AggregationInput.UnionMember12 | AggregationInput.UnionMember13>;
114
+ conditions?: Array<PoliciesAPI.PolicyCondition>;
318
115
  /**
319
116
  * Optional grouping configuration for bucketing metrics.
320
117
  */
321
118
  group_by?: Array<AggregationGroupBy>;
322
119
  /**
323
- * The owner of the resource. If you provide this, do not specify an owner_id as it
324
- * will be generated automatically. When updating a wallet, you can set the owner
325
- * to null to remove the owner.
326
- */
327
- owner?: AggregationInput.PublicKeyOwner | AggregationInput.UserOwner | null;
328
- owner_id?: string | null;
329
- }
330
- export declare namespace AggregationInput {
331
- interface UnionMember0 {
332
- field: 'to' | 'value' | 'chain_id';
333
- field_source: 'ethereum_transaction';
334
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
335
- value: string | Array<string>;
336
- }
337
- interface UnionMember1 {
338
- abi: Array<UnionMember1.Abi>;
339
- field: string;
340
- field_source: 'ethereum_calldata';
341
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
342
- value: string | Array<string>;
343
- }
344
- namespace UnionMember1 {
345
- interface Abi {
346
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
347
- anonymous?: boolean;
348
- inputs?: Array<Abi.Input>;
349
- name?: string;
350
- outputs?: Array<Abi.Output>;
351
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
352
- }
353
- namespace Abi {
354
- interface Input {
355
- type: string;
356
- components?: Array<unknown>;
357
- indexed?: boolean;
358
- internalType?: string;
359
- name?: string;
360
- }
361
- interface Output {
362
- type: string;
363
- components?: Array<unknown>;
364
- indexed?: boolean;
365
- internalType?: string;
366
- name?: string;
367
- }
368
- }
369
- }
370
- interface UnionMember2 {
371
- field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
372
- field_source: 'ethereum_typed_data_domain';
373
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
374
- value: string | Array<string>;
375
- }
376
- interface UnionMember3 {
377
- field: string;
378
- field_source: 'ethereum_typed_data_message';
379
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
380
- typed_data: UnionMember3.TypedData;
381
- value: string | Array<string>;
382
- }
383
- namespace UnionMember3 {
384
- interface TypedData {
385
- primary_type: string;
386
- types: {
387
- [key: string]: Array<TypedData.Type>;
388
- };
389
- }
390
- namespace TypedData {
391
- interface Type {
392
- name: string;
393
- type: string;
394
- }
395
- }
396
- }
397
- interface UnionMember4 {
398
- field: 'contract';
399
- field_source: 'ethereum_7702_authorization';
400
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
401
- value: string | Array<string>;
402
- }
403
- interface UnionMember5 {
404
- field: 'programId';
405
- field_source: 'solana_program_instruction';
406
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
407
- value: string | Array<string>;
408
- }
409
- interface UnionMember6 {
410
- field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
411
- field_source: 'solana_system_program_instruction';
412
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
413
- value: string | Array<string>;
414
- }
415
- interface UnionMember7 {
416
- field: 'instructionName' | 'Transfer.source' | 'Transfer.destination' | 'Transfer.authority' | 'Transfer.amount' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint' | 'Burn.account' | 'Burn.mint' | 'Burn.authority' | 'Burn.amount' | 'MintTo.mint' | 'MintTo.account' | 'MintTo.authority' | 'MintTo.amount' | 'CloseAccount.account' | 'CloseAccount.destination' | 'CloseAccount.authority' | 'InitializeAccount3.account' | 'InitializeAccount3.mint' | 'InitializeAccount3.owner';
417
- field_source: 'solana_token_program_instruction';
418
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
419
- value: string | Array<string>;
420
- }
421
- interface UnionMember8 {
422
- field: 'TransferContract.to_address' | 'TransferContract.amount' | 'TriggerSmartContract.contract_address' | 'TriggerSmartContract.call_value' | 'TriggerSmartContract.token_id' | 'TriggerSmartContract.call_token_value';
423
- field_source: 'tron_transaction';
424
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
425
- value: string | Array<string>;
426
- }
427
- interface UnionMember9 {
428
- field: 'current_unix_timestamp';
429
- field_source: 'system';
430
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
431
- value: string | Array<string>;
432
- }
433
- interface UnionMember10 {
434
- field: string;
435
- field_source: 'reference';
436
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
437
- value: string | Array<string>;
438
- }
439
- interface UnionMember11 {
440
- abi: Array<UnionMember11.Abi>;
441
- field: string;
442
- field_source: 'tron_trigger_smart_contract_data';
443
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
444
- value: string | Array<string>;
445
- }
446
- namespace UnionMember11 {
447
- interface Abi {
448
- type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
449
- anonymous?: boolean;
450
- inputs?: Array<Abi.Input>;
451
- name?: string;
452
- outputs?: Array<Abi.Output>;
453
- stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
454
- }
455
- namespace Abi {
456
- interface Input {
457
- type: string;
458
- components?: Array<unknown>;
459
- indexed?: boolean;
460
- internalType?: string;
461
- name?: string;
462
- }
463
- interface Output {
464
- type: string;
465
- components?: Array<unknown>;
466
- indexed?: boolean;
467
- internalType?: string;
468
- name?: string;
469
- }
470
- }
471
- }
472
- interface UnionMember12 {
473
- field: 'commandName';
474
- field_source: 'sui_transaction_command';
475
- operator: 'eq' | 'in';
476
- /**
477
- * SUI transaction commands allowlist for raw_sign endpoint policy evaluation
478
- */
479
- value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
480
- }
481
- interface UnionMember13 {
482
- field: 'recipient' | 'amount';
483
- field_source: 'sui_transfer_objects_command';
484
- operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
485
- value: string | Array<string>;
486
- }
487
- /**
488
- * The P-256 public key of the owner of the resource, in base64-encoded DER format.
489
- * If you provide this, do not specify an owner_id as it will be generated
490
- * automatically.
120
+ * The owner of the resource, specified as a Privy user ID, a P-256 public key, or
121
+ * null to remove the current owner.
491
122
  */
492
- interface PublicKeyOwner {
493
- public_key: string;
494
- }
123
+ owner?: SharedAPI.OwnerInput | null;
495
124
  /**
496
- * The user ID of the owner of the resource. The user must already exist, and this
497
- * value must start with "did:privy:". If you provide this, do not specify an
498
- * owner_id as it will be generated automatically.
125
+ * The key quorum ID to set as the owner of the resource. If you provide this, do
126
+ * not specify an owner.
499
127
  */
500
- interface UserOwner {
501
- user_id: string;
502
- }
128
+ owner_id?: SharedAPI.OwnerIDInput | null;
503
129
  }
504
130
  export declare namespace Aggregations {
505
131
  export { type AggregationMethod as AggregationMethod, type AggregationMetric as AggregationMetric, type AggregationWindow as AggregationWindow, type AggregationGroupBy as AggregationGroupBy, type Aggregation as Aggregation, type AggregationInput as AggregationInput, };