@privy-io/node 0.10.1 → 0.11.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 (214) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/client.d.mts +37 -19
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +37 -19
  5. package/client.d.ts.map +1 -1
  6. package/client.js +29 -10
  7. package/client.js.map +1 -1
  8. package/client.mjs +30 -11
  9. package/client.mjs.map +1 -1
  10. package/index.d.mts +2 -0
  11. package/index.d.mts.map +1 -1
  12. package/index.d.ts +2 -0
  13. package/index.d.ts.map +1 -1
  14. package/index.js.map +1 -1
  15. package/index.mjs.map +1 -1
  16. package/package.json +12 -1
  17. package/public-api/PrivyClient.d.mts +3 -0
  18. package/public-api/PrivyClient.d.mts.map +1 -1
  19. package/public-api/PrivyClient.d.ts +3 -0
  20. package/public-api/PrivyClient.d.ts.map +1 -1
  21. package/public-api/PrivyClient.js +5 -0
  22. package/public-api/PrivyClient.js.map +1 -1
  23. package/public-api/PrivyClient.mjs +5 -0
  24. package/public-api/PrivyClient.mjs.map +1 -1
  25. package/public-api/services/apps.d.mts +25 -0
  26. package/public-api/services/apps.d.mts.map +1 -0
  27. package/public-api/services/apps.d.ts +25 -0
  28. package/public-api/services/apps.d.ts.map +1 -0
  29. package/public-api/services/apps.js +56 -0
  30. package/public-api/services/apps.js.map +1 -0
  31. package/public-api/services/apps.mjs +52 -0
  32. package/public-api/services/apps.mjs.map +1 -0
  33. package/public-api/services/policies.d.mts +6 -2
  34. package/public-api/services/policies.d.mts.map +1 -1
  35. package/public-api/services/policies.d.ts +6 -2
  36. package/public-api/services/policies.d.ts.map +1 -1
  37. package/public-api/services/policies.js +6 -0
  38. package/public-api/services/policies.js.map +1 -1
  39. package/public-api/services/policies.mjs +6 -0
  40. package/public-api/services/policies.mjs.map +1 -1
  41. package/public-api/services/wallets.d.mts +5 -1
  42. package/public-api/services/wallets.d.mts.map +1 -1
  43. package/public-api/services/wallets.d.ts +5 -1
  44. package/public-api/services/wallets.d.ts.map +1 -1
  45. package/public-api/services/wallets.js +6 -0
  46. package/public-api/services/wallets.js.map +1 -1
  47. package/public-api/services/wallets.mjs +6 -0
  48. package/public-api/services/wallets.mjs.map +1 -1
  49. package/resources/accounts.d.mts +182 -4
  50. package/resources/accounts.d.mts.map +1 -1
  51. package/resources/accounts.d.ts +182 -4
  52. package/resources/accounts.d.ts.map +1 -1
  53. package/resources/apps/allowlist.d.mts +81 -0
  54. package/resources/apps/allowlist.d.mts.map +1 -0
  55. package/resources/apps/allowlist.d.ts +81 -0
  56. package/resources/apps/allowlist.d.ts.map +1 -0
  57. package/resources/apps/allowlist.js +56 -0
  58. package/resources/apps/allowlist.js.map +1 -0
  59. package/resources/apps/allowlist.mjs +52 -0
  60. package/resources/apps/allowlist.mjs.map +1 -0
  61. package/resources/apps/apps.d.mts +238 -0
  62. package/resources/apps/apps.d.mts.map +1 -0
  63. package/resources/apps/apps.d.ts +238 -0
  64. package/resources/apps/apps.d.ts.map +1 -0
  65. package/resources/apps/apps.js +44 -0
  66. package/resources/apps/apps.js.map +1 -0
  67. package/resources/apps/apps.mjs +39 -0
  68. package/resources/apps/apps.mjs.map +1 -0
  69. package/resources/apps/index.d.mts +3 -0
  70. package/resources/apps/index.d.mts.map +1 -0
  71. package/resources/apps/index.d.ts +3 -0
  72. package/resources/apps/index.d.ts.map +1 -0
  73. package/resources/apps/index.js +9 -0
  74. package/resources/apps/index.js.map +1 -0
  75. package/resources/apps/index.mjs +4 -0
  76. package/resources/apps/index.mjs.map +1 -0
  77. package/resources/apps.d.mts +1 -151
  78. package/resources/apps.d.mts.map +1 -1
  79. package/resources/apps.d.ts +1 -151
  80. package/resources/apps.d.ts.map +1 -1
  81. package/resources/apps.js +2 -5
  82. package/resources/apps.js.map +1 -1
  83. package/resources/apps.mjs +1 -3
  84. package/resources/apps.mjs.map +1 -1
  85. package/resources/client-auth.d.mts +144 -1
  86. package/resources/client-auth.d.mts.map +1 -1
  87. package/resources/client-auth.d.ts +144 -1
  88. package/resources/client-auth.d.ts.map +1 -1
  89. package/resources/index.d.mts +11 -10
  90. package/resources/index.d.mts.map +1 -1
  91. package/resources/index.d.ts +11 -10
  92. package/resources/index.d.ts.map +1 -1
  93. package/resources/index.js +4 -2
  94. package/resources/index.js.map +1 -1
  95. package/resources/index.mjs +3 -2
  96. package/resources/index.mjs.map +1 -1
  97. package/resources/intents.d.mts +2815 -31
  98. package/resources/intents.d.mts.map +1 -1
  99. package/resources/intents.d.ts +2815 -31
  100. package/resources/intents.d.ts.map +1 -1
  101. package/resources/intents.js +156 -0
  102. package/resources/intents.js.map +1 -1
  103. package/resources/intents.mjs +156 -0
  104. package/resources/intents.mjs.map +1 -1
  105. package/resources/key-quorums.d.mts +45 -2
  106. package/resources/key-quorums.d.mts.map +1 -1
  107. package/resources/key-quorums.d.ts +45 -2
  108. package/resources/key-quorums.d.ts.map +1 -1
  109. package/resources/key-quorums.js +18 -1
  110. package/resources/key-quorums.js.map +1 -1
  111. package/resources/key-quorums.mjs +18 -1
  112. package/resources/key-quorums.mjs.map +1 -1
  113. package/resources/kraken-embed.d.mts +62 -0
  114. package/resources/kraken-embed.d.mts.map +1 -0
  115. package/resources/kraken-embed.d.ts +62 -0
  116. package/resources/kraken-embed.d.ts.map +1 -0
  117. package/resources/kraken-embed.js +9 -0
  118. package/resources/kraken-embed.js.map +1 -0
  119. package/resources/kraken-embed.mjs +5 -0
  120. package/resources/kraken-embed.mjs.map +1 -0
  121. package/resources/policies.d.mts +63 -56
  122. package/resources/policies.d.mts.map +1 -1
  123. package/resources/policies.d.ts +63 -56
  124. package/resources/policies.d.ts.map +1 -1
  125. package/resources/policies.js +3 -0
  126. package/resources/policies.js.map +1 -1
  127. package/resources/policies.mjs +3 -0
  128. package/resources/policies.mjs.map +1 -1
  129. package/resources/transactions.d.mts +3 -0
  130. package/resources/transactions.d.mts.map +1 -1
  131. package/resources/transactions.d.ts +3 -0
  132. package/resources/transactions.d.ts.map +1 -1
  133. package/resources/transactions.js +3 -0
  134. package/resources/transactions.js.map +1 -1
  135. package/resources/transactions.mjs +3 -0
  136. package/resources/transactions.mjs.map +1 -1
  137. package/resources/users.d.mts +50 -47
  138. package/resources/users.d.mts.map +1 -1
  139. package/resources/users.d.ts +50 -47
  140. package/resources/users.d.ts.map +1 -1
  141. package/resources/users.js +3 -0
  142. package/resources/users.js.map +1 -1
  143. package/resources/users.mjs +3 -0
  144. package/resources/users.mjs.map +1 -1
  145. package/resources/wallets/balance.d.mts +7 -4
  146. package/resources/wallets/balance.d.mts.map +1 -1
  147. package/resources/wallets/balance.d.ts +7 -4
  148. package/resources/wallets/balance.d.ts.map +1 -1
  149. package/resources/wallets/balance.js +3 -0
  150. package/resources/wallets/balance.js.map +1 -1
  151. package/resources/wallets/balance.mjs +3 -0
  152. package/resources/wallets/balance.mjs.map +1 -1
  153. package/resources/wallets/index.d.mts +1 -1
  154. package/resources/wallets/index.d.mts.map +1 -1
  155. package/resources/wallets/index.d.ts +1 -1
  156. package/resources/wallets/index.d.ts.map +1 -1
  157. package/resources/wallets/index.js.map +1 -1
  158. package/resources/wallets/index.mjs.map +1 -1
  159. package/resources/wallets/transactions.d.mts +9 -6
  160. package/resources/wallets/transactions.d.mts.map +1 -1
  161. package/resources/wallets/transactions.d.ts +9 -6
  162. package/resources/wallets/transactions.d.ts.map +1 -1
  163. package/resources/wallets/transactions.js +3 -0
  164. package/resources/wallets/transactions.js.map +1 -1
  165. package/resources/wallets/transactions.mjs +3 -0
  166. package/resources/wallets/transactions.mjs.map +1 -1
  167. package/resources/wallets/wallets.d.mts +126 -69
  168. package/resources/wallets/wallets.d.mts.map +1 -1
  169. package/resources/wallets/wallets.d.ts +126 -69
  170. package/resources/wallets/wallets.d.ts.map +1 -1
  171. package/resources/wallets/wallets.js +11 -5
  172. package/resources/wallets/wallets.js.map +1 -1
  173. package/resources/wallets/wallets.mjs +11 -5
  174. package/resources/wallets/wallets.mjs.map +1 -1
  175. package/resources/webhooks.d.mts +319 -283
  176. package/resources/webhooks.d.mts.map +1 -1
  177. package/resources/webhooks.d.ts +319 -283
  178. package/resources/webhooks.d.ts.map +1 -1
  179. package/resources/webhooks.js.map +1 -1
  180. package/resources/webhooks.mjs.map +1 -1
  181. package/resources/yield.d.mts +26 -9
  182. package/resources/yield.d.mts.map +1 -1
  183. package/resources/yield.d.ts +26 -9
  184. package/resources/yield.d.ts.map +1 -1
  185. package/src/client.ts +196 -37
  186. package/src/index.ts +10 -0
  187. package/src/public-api/PrivyClient.ts +7 -0
  188. package/src/public-api/services/apps.ts +85 -0
  189. package/src/public-api/services/policies.ts +15 -1
  190. package/src/public-api/services/wallets.ts +14 -0
  191. package/src/resources/accounts.ts +217 -3
  192. package/src/resources/apps/allowlist.ts +126 -0
  193. package/src/resources/apps/apps.ts +391 -0
  194. package/src/resources/apps/index.ts +20 -0
  195. package/src/resources/apps.ts +1 -257
  196. package/src/resources/client-auth.ts +202 -0
  197. package/src/resources/index.ts +93 -21
  198. package/src/resources/intents.ts +4579 -40
  199. package/src/resources/key-quorums.ts +50 -2
  200. package/src/resources/kraken-embed.ts +85 -0
  201. package/src/resources/policies.ts +83 -76
  202. package/src/resources/transactions.ts +3 -0
  203. package/src/resources/users.ts +66 -63
  204. package/src/resources/wallets/balance.ts +9 -2
  205. package/src/resources/wallets/index.ts +4 -2
  206. package/src/resources/wallets/transactions.ts +10 -4
  207. package/src/resources/wallets/wallets.ts +171 -93
  208. package/src/resources/webhooks.ts +454 -438
  209. package/src/resources/yield.ts +39 -10
  210. package/src/version.ts +1 -1
  211. package/version.d.mts +1 -1
  212. package/version.d.ts +1 -1
  213. package/version.js +1 -1
  214. package/version.mjs +1 -1
@@ -53,18 +53,39 @@ export interface AccountWalletConfigurationItem {
53
53
  */
54
54
  custody?: WalletsAPI.WalletCustodian;
55
55
  }
56
+ /**
57
+ * An optional display name for the account.
58
+ */
59
+ export type AccountDisplayName = string;
60
+ /**
61
+ * Configuration for the wallets on this account.
62
+ */
63
+ export type AccountWalletsConfiguration = Array<AccountWalletConfigurationItem>;
56
64
  /**
57
65
  * Input for creating a digital asset account.
58
66
  */
59
67
  export interface CreateAccountInput {
60
68
  /**
61
- * Configuration for wallets to create.
69
+ * Configuration for the wallets on this account.
62
70
  */
63
- wallets_configuration: Array<AccountWalletConfigurationItem>;
71
+ wallets_configuration: AccountWalletsConfiguration;
64
72
  /**
65
73
  * An optional display name for the account.
66
74
  */
67
- display_name?: string;
75
+ display_name?: AccountDisplayName;
76
+ }
77
+ /**
78
+ * Input for updating a digital asset account.
79
+ */
80
+ export interface UpdateAccountInput {
81
+ /**
82
+ * An optional display name for the account.
83
+ */
84
+ display_name?: AccountDisplayName;
85
+ /**
86
+ * Configuration for the wallets on this account.
87
+ */
88
+ wallets_configuration?: AccountWalletsConfiguration;
68
89
  }
69
90
  /**
70
91
  * Paginated list of digital asset accounts.
@@ -79,7 +100,164 @@ export interface AccountsListResponse {
79
100
  */
80
101
  next_cursor: string | null;
81
102
  }
103
+ /**
104
+ * A digital asset account with its aggregated balance across all wallets and
105
+ * chains.
106
+ */
107
+ export interface AssetAccountWithBalance {
108
+ /**
109
+ * The account ID.
110
+ */
111
+ id: string;
112
+ balance: AssetAccountWithBalance.Balance;
113
+ /**
114
+ * An optional display name for the account.
115
+ */
116
+ display_name: string | null;
117
+ /**
118
+ * The wallets belonging to this account.
119
+ */
120
+ wallets: Array<AccountWallet>;
121
+ }
122
+ export declare namespace AssetAccountWithBalance {
123
+ interface Balance {
124
+ /**
125
+ * The individual asset balances, each computed across all supported chains.
126
+ */
127
+ assets: Array<Balance.Asset>;
128
+ /**
129
+ * The total balance across all assets.
130
+ */
131
+ total: Balance.Total;
132
+ }
133
+ namespace Balance {
134
+ interface Asset {
135
+ /**
136
+ * The amount of the asset held, denominated in the unit of the asset itself, with
137
+ * 1 decimal of precision.
138
+ */
139
+ amount: string;
140
+ /**
141
+ * The price of the asset in the provided currency.
142
+ */
143
+ price: Asset.Price;
144
+ /**
145
+ * The symbol of the asset (e.g. USDC, ETH).
146
+ */
147
+ symbol: string;
148
+ }
149
+ namespace Asset {
150
+ /**
151
+ * The price of the asset in the provided currency.
152
+ */
153
+ interface Price {
154
+ /**
155
+ * The currency code.
156
+ */
157
+ currency: 'usd';
158
+ /**
159
+ * The monetary value as a string.
160
+ */
161
+ value: string;
162
+ }
163
+ }
164
+ /**
165
+ * The total balance across all assets.
166
+ */
167
+ interface Total {
168
+ /**
169
+ * The currency code.
170
+ */
171
+ currency: 'usd';
172
+ /**
173
+ * The monetary value as a string.
174
+ */
175
+ value: string;
176
+ }
177
+ }
178
+ }
179
+ /**
180
+ * Paginated list of digital asset accounts for the dashboard.
181
+ */
182
+ export interface AccountsDashboardListResponse {
183
+ /**
184
+ * The list of accounts, with balances included for dashboard display.
185
+ */
186
+ data: Array<AssetAccountWithBalance>;
187
+ /**
188
+ * Cursor for fetching the next page of results, or null if no more results.
189
+ */
190
+ next_cursor: string | null;
191
+ }
192
+ /**
193
+ * The balance of a digital asset account, aggregated across all wallets and
194
+ * supported chains.
195
+ */
196
+ export interface AccountBalanceResponse {
197
+ /**
198
+ * The individual asset balances, each computed across all supported chains.
199
+ */
200
+ assets: Array<AccountBalanceResponse.Asset>;
201
+ /**
202
+ * The total balance across all assets.
203
+ */
204
+ total: AccountBalanceResponse.Total;
205
+ }
206
+ export declare namespace AccountBalanceResponse {
207
+ interface Asset {
208
+ /**
209
+ * The amount of the asset held, denominated in the unit of the asset itself, with
210
+ * 1 decimal of precision.
211
+ */
212
+ amount: string;
213
+ /**
214
+ * The price of the asset in the provided currency.
215
+ */
216
+ price: Asset.Price;
217
+ /**
218
+ * The symbol of the asset (e.g. USDC, ETH).
219
+ */
220
+ symbol: string;
221
+ }
222
+ namespace Asset {
223
+ /**
224
+ * The price of the asset in the provided currency.
225
+ */
226
+ interface Price {
227
+ /**
228
+ * The currency code.
229
+ */
230
+ currency: 'usd';
231
+ /**
232
+ * The monetary value as a string.
233
+ */
234
+ value: string;
235
+ }
236
+ }
237
+ /**
238
+ * The total balance across all assets.
239
+ */
240
+ interface Total {
241
+ /**
242
+ * The currency code.
243
+ */
244
+ currency: 'usd';
245
+ /**
246
+ * The monetary value as a string.
247
+ */
248
+ value: string;
249
+ }
250
+ }
251
+ /**
252
+ * Query parameters for the account balance endpoint.
253
+ */
254
+ export interface AccountBalanceParams {
255
+ /**
256
+ * When set to true, returns balances from testnet chains instead of mainnets.
257
+ */
258
+ testnet_mode?: 'true' | 'false';
259
+ }
82
260
  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, };
261
+ export { 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
262
  }
85
263
  //# sourceMappingURL=accounts.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accounts.d.mts","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,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M,EAAE,MAAM,CAAC;KAChB;IAED,UAAiB,KAAK,CAAC;QACrB;;WAEG;QACH,UAAiB,KAAK;YACpB;;eAEG;YACH,QAAQ,EAAE,KAAK,CAAC;YAEhB;;eAEG;YACH,KAAK,EAAE,MAAM,CAAC;SACf;KACF;IAED;;OAEG;IACH,UAAiB,KAAK;QACpB;;WAEG;QACH,QAAQ,EAAE,KAAK,CAAC;QAEhB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -53,18 +53,39 @@ export interface AccountWalletConfigurationItem {
53
53
  */
54
54
  custody?: WalletsAPI.WalletCustodian;
55
55
  }
56
+ /**
57
+ * An optional display name for the account.
58
+ */
59
+ export type AccountDisplayName = string;
60
+ /**
61
+ * Configuration for the wallets on this account.
62
+ */
63
+ export type AccountWalletsConfiguration = Array<AccountWalletConfigurationItem>;
56
64
  /**
57
65
  * Input for creating a digital asset account.
58
66
  */
59
67
  export interface CreateAccountInput {
60
68
  /**
61
- * Configuration for wallets to create.
69
+ * Configuration for the wallets on this account.
62
70
  */
63
- wallets_configuration: Array<AccountWalletConfigurationItem>;
71
+ wallets_configuration: AccountWalletsConfiguration;
64
72
  /**
65
73
  * An optional display name for the account.
66
74
  */
67
- display_name?: string;
75
+ display_name?: AccountDisplayName;
76
+ }
77
+ /**
78
+ * Input for updating a digital asset account.
79
+ */
80
+ export interface UpdateAccountInput {
81
+ /**
82
+ * An optional display name for the account.
83
+ */
84
+ display_name?: AccountDisplayName;
85
+ /**
86
+ * Configuration for the wallets on this account.
87
+ */
88
+ wallets_configuration?: AccountWalletsConfiguration;
68
89
  }
69
90
  /**
70
91
  * Paginated list of digital asset accounts.
@@ -79,7 +100,164 @@ export interface AccountsListResponse {
79
100
  */
80
101
  next_cursor: string | null;
81
102
  }
103
+ /**
104
+ * A digital asset account with its aggregated balance across all wallets and
105
+ * chains.
106
+ */
107
+ export interface AssetAccountWithBalance {
108
+ /**
109
+ * The account ID.
110
+ */
111
+ id: string;
112
+ balance: AssetAccountWithBalance.Balance;
113
+ /**
114
+ * An optional display name for the account.
115
+ */
116
+ display_name: string | null;
117
+ /**
118
+ * The wallets belonging to this account.
119
+ */
120
+ wallets: Array<AccountWallet>;
121
+ }
122
+ export declare namespace AssetAccountWithBalance {
123
+ interface Balance {
124
+ /**
125
+ * The individual asset balances, each computed across all supported chains.
126
+ */
127
+ assets: Array<Balance.Asset>;
128
+ /**
129
+ * The total balance across all assets.
130
+ */
131
+ total: Balance.Total;
132
+ }
133
+ namespace Balance {
134
+ interface Asset {
135
+ /**
136
+ * The amount of the asset held, denominated in the unit of the asset itself, with
137
+ * 1 decimal of precision.
138
+ */
139
+ amount: string;
140
+ /**
141
+ * The price of the asset in the provided currency.
142
+ */
143
+ price: Asset.Price;
144
+ /**
145
+ * The symbol of the asset (e.g. USDC, ETH).
146
+ */
147
+ symbol: string;
148
+ }
149
+ namespace Asset {
150
+ /**
151
+ * The price of the asset in the provided currency.
152
+ */
153
+ interface Price {
154
+ /**
155
+ * The currency code.
156
+ */
157
+ currency: 'usd';
158
+ /**
159
+ * The monetary value as a string.
160
+ */
161
+ value: string;
162
+ }
163
+ }
164
+ /**
165
+ * The total balance across all assets.
166
+ */
167
+ interface Total {
168
+ /**
169
+ * The currency code.
170
+ */
171
+ currency: 'usd';
172
+ /**
173
+ * The monetary value as a string.
174
+ */
175
+ value: string;
176
+ }
177
+ }
178
+ }
179
+ /**
180
+ * Paginated list of digital asset accounts for the dashboard.
181
+ */
182
+ export interface AccountsDashboardListResponse {
183
+ /**
184
+ * The list of accounts, with balances included for dashboard display.
185
+ */
186
+ data: Array<AssetAccountWithBalance>;
187
+ /**
188
+ * Cursor for fetching the next page of results, or null if no more results.
189
+ */
190
+ next_cursor: string | null;
191
+ }
192
+ /**
193
+ * The balance of a digital asset account, aggregated across all wallets and
194
+ * supported chains.
195
+ */
196
+ export interface AccountBalanceResponse {
197
+ /**
198
+ * The individual asset balances, each computed across all supported chains.
199
+ */
200
+ assets: Array<AccountBalanceResponse.Asset>;
201
+ /**
202
+ * The total balance across all assets.
203
+ */
204
+ total: AccountBalanceResponse.Total;
205
+ }
206
+ export declare namespace AccountBalanceResponse {
207
+ interface Asset {
208
+ /**
209
+ * The amount of the asset held, denominated in the unit of the asset itself, with
210
+ * 1 decimal of precision.
211
+ */
212
+ amount: string;
213
+ /**
214
+ * The price of the asset in the provided currency.
215
+ */
216
+ price: Asset.Price;
217
+ /**
218
+ * The symbol of the asset (e.g. USDC, ETH).
219
+ */
220
+ symbol: string;
221
+ }
222
+ namespace Asset {
223
+ /**
224
+ * The price of the asset in the provided currency.
225
+ */
226
+ interface Price {
227
+ /**
228
+ * The currency code.
229
+ */
230
+ currency: 'usd';
231
+ /**
232
+ * The monetary value as a string.
233
+ */
234
+ value: string;
235
+ }
236
+ }
237
+ /**
238
+ * The total balance across all assets.
239
+ */
240
+ interface Total {
241
+ /**
242
+ * The currency code.
243
+ */
244
+ currency: 'usd';
245
+ /**
246
+ * The monetary value as a string.
247
+ */
248
+ value: string;
249
+ }
250
+ }
251
+ /**
252
+ * Query parameters for the account balance endpoint.
253
+ */
254
+ export interface AccountBalanceParams {
255
+ /**
256
+ * When set to true, returns balances from testnet chains instead of mainnets.
257
+ */
258
+ testnet_mode?: 'true' | 'false';
259
+ }
82
260
  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, };
261
+ export { 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
262
  }
85
263
  //# 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,EA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;KACF;IAED;;OAEG;IACH,UAAiB,KAAK;QACpB;;WAEG;QACH,QAAQ,EAAE,KAAK,CAAC;QAEhB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -0,0 +1,81 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as AppsAPI from "./apps.mjs";
3
+ import { APIPromise } from "../../core/api-promise.mjs";
4
+ import { RequestOptions } from "../../internal/request-options.mjs";
5
+ /**
6
+ * Operations related to app settings and allowlist management
7
+ */
8
+ export declare class Allowlist extends APIResource {
9
+ /**
10
+ * Add a new entry to the allowlist for an app. The allowlist must be enabled.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const allowlistEntry = await client.apps.allowlist.create(
15
+ * 'app_id',
16
+ * { type: 'email', value: 'batman@privy.io' },
17
+ * );
18
+ * ```
19
+ */
20
+ create(appID: string, body: AllowlistCreateParams, options?: RequestOptions): APIPromise<AppsAPI.AllowlistEntry>;
21
+ /**
22
+ * Get all allowlist entries for an app. Returns the list of users allowed to
23
+ * access the app when the allowlist is enabled.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const allowlistEntries = await client.apps.allowlist.list(
28
+ * 'app_id',
29
+ * );
30
+ * ```
31
+ */
32
+ list(appID: string, options?: RequestOptions): APIPromise<AllowlistListResponse>;
33
+ /**
34
+ * Remove an entry from the allowlist for an app. The allowlist must be enabled.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const allowlistDeletionResponse =
39
+ * await client.apps.allowlist.delete('app_id', {
40
+ * type: 'email',
41
+ * value: 'batman@privy.io',
42
+ * });
43
+ * ```
44
+ */
45
+ delete(appID: string, body: AllowlistDeleteParams, options?: RequestOptions): APIPromise<AppsAPI.AllowlistDeletionResponse>;
46
+ }
47
+ export type AllowlistListResponse = Array<AppsAPI.AllowlistEntry>;
48
+ export type AllowlistCreateParams = AllowlistCreateParams.EmailInviteInput | AllowlistCreateParams.WalletInviteInput | AllowlistCreateParams.PhoneInviteInput;
49
+ export declare namespace AllowlistCreateParams {
50
+ interface EmailInviteInput {
51
+ type: 'email';
52
+ value: string;
53
+ }
54
+ interface WalletInviteInput {
55
+ type: 'wallet';
56
+ value: string;
57
+ }
58
+ interface PhoneInviteInput {
59
+ type: 'phone';
60
+ value: string;
61
+ }
62
+ }
63
+ export type AllowlistDeleteParams = AllowlistDeleteParams.EmailInviteInput | AllowlistDeleteParams.WalletInviteInput | AllowlistDeleteParams.PhoneInviteInput;
64
+ export declare namespace AllowlistDeleteParams {
65
+ interface EmailInviteInput {
66
+ type: 'email';
67
+ value: string;
68
+ }
69
+ interface WalletInviteInput {
70
+ type: 'wallet';
71
+ value: string;
72
+ }
73
+ interface PhoneInviteInput {
74
+ type: 'phone';
75
+ value: string;
76
+ }
77
+ }
78
+ export declare namespace Allowlist {
79
+ export { type AllowlistListResponse as AllowlistListResponse, type AllowlistCreateParams as AllowlistCreateParams, type AllowlistDeleteParams as AllowlistDeleteParams, };
80
+ }
81
+ //# sourceMappingURL=allowlist.d.mts.map
@@ -0,0 +1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,qBAAqB,CAAC,iBAAiB,GACvC,qBAAqB,CAAC,gBAAgB,CAAC;AAE3C,MAAM,CAAC,OAAO,WAAW,qBAAqB,CAAC;IAC7C,UAAiB,gBAAgB;QAC/B,IAAI,EAAE,OAAO,CAAC;QAEd,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,iBAAiB;QAChC,IAAI,EAAE,QAAQ,CAAC;QAEf,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,gBAAgB;QAC/B,IAAI,EAAE,OAAO,CAAC;QAEd,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -0,0 +1,81 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as AppsAPI from "./apps.js";
3
+ import { APIPromise } from "../../core/api-promise.js";
4
+ import { RequestOptions } from "../../internal/request-options.js";
5
+ /**
6
+ * Operations related to app settings and allowlist management
7
+ */
8
+ export declare class Allowlist extends APIResource {
9
+ /**
10
+ * Add a new entry to the allowlist for an app. The allowlist must be enabled.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const allowlistEntry = await client.apps.allowlist.create(
15
+ * 'app_id',
16
+ * { type: 'email', value: 'batman@privy.io' },
17
+ * );
18
+ * ```
19
+ */
20
+ create(appID: string, body: AllowlistCreateParams, options?: RequestOptions): APIPromise<AppsAPI.AllowlistEntry>;
21
+ /**
22
+ * Get all allowlist entries for an app. Returns the list of users allowed to
23
+ * access the app when the allowlist is enabled.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const allowlistEntries = await client.apps.allowlist.list(
28
+ * 'app_id',
29
+ * );
30
+ * ```
31
+ */
32
+ list(appID: string, options?: RequestOptions): APIPromise<AllowlistListResponse>;
33
+ /**
34
+ * Remove an entry from the allowlist for an app. The allowlist must be enabled.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const allowlistDeletionResponse =
39
+ * await client.apps.allowlist.delete('app_id', {
40
+ * type: 'email',
41
+ * value: 'batman@privy.io',
42
+ * });
43
+ * ```
44
+ */
45
+ delete(appID: string, body: AllowlistDeleteParams, options?: RequestOptions): APIPromise<AppsAPI.AllowlistDeletionResponse>;
46
+ }
47
+ export type AllowlistListResponse = Array<AppsAPI.AllowlistEntry>;
48
+ export type AllowlistCreateParams = AllowlistCreateParams.EmailInviteInput | AllowlistCreateParams.WalletInviteInput | AllowlistCreateParams.PhoneInviteInput;
49
+ export declare namespace AllowlistCreateParams {
50
+ interface EmailInviteInput {
51
+ type: 'email';
52
+ value: string;
53
+ }
54
+ interface WalletInviteInput {
55
+ type: 'wallet';
56
+ value: string;
57
+ }
58
+ interface PhoneInviteInput {
59
+ type: 'phone';
60
+ value: string;
61
+ }
62
+ }
63
+ export type AllowlistDeleteParams = AllowlistDeleteParams.EmailInviteInput | AllowlistDeleteParams.WalletInviteInput | AllowlistDeleteParams.PhoneInviteInput;
64
+ export declare namespace AllowlistDeleteParams {
65
+ interface EmailInviteInput {
66
+ type: 'email';
67
+ value: string;
68
+ }
69
+ interface WalletInviteInput {
70
+ type: 'wallet';
71
+ value: string;
72
+ }
73
+ interface PhoneInviteInput {
74
+ type: 'phone';
75
+ value: string;
76
+ }
77
+ }
78
+ export declare namespace Allowlist {
79
+ export { type AllowlistListResponse as AllowlistListResponse, type AllowlistCreateParams as AllowlistCreateParams, type AllowlistDeleteParams as AllowlistDeleteParams, };
80
+ }
81
+ //# sourceMappingURL=allowlist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allowlist.d.ts","sourceRoot":"","sources":["../../src/resources/apps/allowlist.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GA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AAC;KACf;IAED,UAAiB,iBAAiB;QAChC,IAAI,EAAE,QAAQ,CAAC;QAEf,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,gBAAgB;QAC/B,IAAI,EAAE,OAAO,CAAC;QAEd,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Allowlist = void 0;
5
+ const resource_1 = require("../../core/resource.js");
6
+ const path_1 = require("../../internal/utils/path.js");
7
+ /**
8
+ * Operations related to app settings and allowlist management
9
+ */
10
+ class Allowlist extends resource_1.APIResource {
11
+ /**
12
+ * Add a new entry to the allowlist for an app. The allowlist must be enabled.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const allowlistEntry = await client.apps.allowlist.create(
17
+ * 'app_id',
18
+ * { type: 'email', value: 'batman@privy.io' },
19
+ * );
20
+ * ```
21
+ */
22
+ create(appID, body, options) {
23
+ return this._client.post((0, path_1.path) `/v1/apps/${appID}/allowlist`, { body, ...options });
24
+ }
25
+ /**
26
+ * Get all allowlist entries for an app. Returns the list of users allowed to
27
+ * access the app when the allowlist is enabled.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const allowlistEntries = await client.apps.allowlist.list(
32
+ * 'app_id',
33
+ * );
34
+ * ```
35
+ */
36
+ list(appID, options) {
37
+ return this._client.get((0, path_1.path) `/v1/apps/${appID}/allowlist`, options);
38
+ }
39
+ /**
40
+ * Remove an entry from the allowlist for an app. The allowlist must be enabled.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * const allowlistDeletionResponse =
45
+ * await client.apps.allowlist.delete('app_id', {
46
+ * type: 'email',
47
+ * value: 'batman@privy.io',
48
+ * });
49
+ * ```
50
+ */
51
+ delete(appID, body, options) {
52
+ return this._client.delete((0, path_1.path) `/v1/apps/${appID}/allowlist`, { body, ...options });
53
+ }
54
+ }
55
+ exports.Allowlist = Allowlist;
56
+ //# sourceMappingURL=allowlist.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allowlist.js","sourceRoot":"","sources":["../../src/resources/apps/allowlist.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,KAAa,EACb,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,YAAY,KAAK,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CAAC,KAAa,EAAE,OAAwB;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,KAAK,YAAY,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,KAAa,EACb,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,YAAY,KAAK,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;CACF;AAtDD,8BAsDC"}