@privy-io/node 0.1.0-alpha.2

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 (579) hide show
  1. package/CHANGELOG.md +146 -0
  2. package/LICENSE +201 -0
  3. package/README.md +48 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +215 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +215 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +499 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +495 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/pagination.d.mts +54 -0
  37. package/core/pagination.d.mts.map +1 -0
  38. package/core/pagination.d.ts +54 -0
  39. package/core/pagination.d.ts.map +1 -0
  40. package/core/pagination.js +101 -0
  41. package/core/pagination.js.map +1 -0
  42. package/core/pagination.mjs +95 -0
  43. package/core/pagination.mjs.map +1 -0
  44. package/core/resource.d.mts +6 -0
  45. package/core/resource.d.mts.map +1 -0
  46. package/core/resource.d.ts +6 -0
  47. package/core/resource.d.ts.map +1 -0
  48. package/core/resource.js +11 -0
  49. package/core/resource.js.map +1 -0
  50. package/core/resource.mjs +7 -0
  51. package/core/resource.mjs.map +1 -0
  52. package/core/uploads.d.mts +3 -0
  53. package/core/uploads.d.mts.map +1 -0
  54. package/core/uploads.d.ts +3 -0
  55. package/core/uploads.d.ts.map +1 -0
  56. package/core/uploads.js +6 -0
  57. package/core/uploads.js.map +1 -0
  58. package/core/uploads.mjs +2 -0
  59. package/core/uploads.mjs.map +1 -0
  60. package/error.d.mts +2 -0
  61. package/error.d.mts.map +1 -0
  62. package/error.d.ts +2 -0
  63. package/error.d.ts.map +1 -0
  64. package/error.js +6 -0
  65. package/error.js.map +1 -0
  66. package/error.mjs +2 -0
  67. package/error.mjs.map +1 -0
  68. package/index.d.mts +13 -0
  69. package/index.d.mts.map +1 -0
  70. package/index.d.ts +13 -0
  71. package/index.d.ts.map +1 -0
  72. package/index.js +29 -0
  73. package/index.js.map +1 -0
  74. package/index.mjs +5 -0
  75. package/index.mjs.map +1 -0
  76. package/internal/builtin-types.d.mts +73 -0
  77. package/internal/builtin-types.d.mts.map +1 -0
  78. package/internal/builtin-types.d.ts +73 -0
  79. package/internal/builtin-types.d.ts.map +1 -0
  80. package/internal/builtin-types.js +4 -0
  81. package/internal/builtin-types.js.map +1 -0
  82. package/internal/builtin-types.mjs +3 -0
  83. package/internal/builtin-types.mjs.map +1 -0
  84. package/internal/detect-platform.d.mts +15 -0
  85. package/internal/detect-platform.d.mts.map +1 -0
  86. package/internal/detect-platform.d.ts +15 -0
  87. package/internal/detect-platform.d.ts.map +1 -0
  88. package/internal/detect-platform.js +162 -0
  89. package/internal/detect-platform.js.map +1 -0
  90. package/internal/detect-platform.mjs +157 -0
  91. package/internal/detect-platform.mjs.map +1 -0
  92. package/internal/errors.d.mts +3 -0
  93. package/internal/errors.d.mts.map +1 -0
  94. package/internal/errors.d.ts +3 -0
  95. package/internal/errors.d.ts.map +1 -0
  96. package/internal/errors.js +41 -0
  97. package/internal/errors.js.map +1 -0
  98. package/internal/errors.mjs +36 -0
  99. package/internal/errors.mjs.map +1 -0
  100. package/internal/headers.d.mts +6 -0
  101. package/internal/headers.d.mts.map +1 -0
  102. package/internal/headers.d.ts +6 -0
  103. package/internal/headers.d.ts.map +1 -0
  104. package/internal/headers.js +79 -0
  105. package/internal/headers.js.map +1 -0
  106. package/internal/headers.mjs +74 -0
  107. package/internal/headers.mjs.map +1 -0
  108. package/internal/parse.d.mts +12 -0
  109. package/internal/parse.d.mts.map +1 -0
  110. package/internal/parse.d.ts +12 -0
  111. package/internal/parse.d.ts.map +1 -0
  112. package/internal/parse.js +35 -0
  113. package/internal/parse.js.map +1 -0
  114. package/internal/parse.mjs +32 -0
  115. package/internal/parse.mjs.map +1 -0
  116. package/internal/qs/formats.d.mts +7 -0
  117. package/internal/qs/formats.d.mts.map +1 -0
  118. package/internal/qs/formats.d.ts +7 -0
  119. package/internal/qs/formats.d.ts.map +1 -0
  120. package/internal/qs/formats.js +13 -0
  121. package/internal/qs/formats.js.map +1 -0
  122. package/internal/qs/formats.mjs +9 -0
  123. package/internal/qs/formats.mjs.map +1 -0
  124. package/internal/qs/index.d.mts +10 -0
  125. package/internal/qs/index.d.mts.map +1 -0
  126. package/internal/qs/index.d.ts +10 -0
  127. package/internal/qs/index.d.ts.map +1 -0
  128. package/internal/qs/index.js +14 -0
  129. package/internal/qs/index.js.map +1 -0
  130. package/internal/qs/index.mjs +10 -0
  131. package/internal/qs/index.mjs.map +1 -0
  132. package/internal/qs/stringify.d.mts +3 -0
  133. package/internal/qs/stringify.d.mts.map +1 -0
  134. package/internal/qs/stringify.d.ts +3 -0
  135. package/internal/qs/stringify.d.ts.map +1 -0
  136. package/internal/qs/stringify.js +277 -0
  137. package/internal/qs/stringify.js.map +1 -0
  138. package/internal/qs/stringify.mjs +274 -0
  139. package/internal/qs/stringify.mjs.map +1 -0
  140. package/internal/qs/types.d.mts +57 -0
  141. package/internal/qs/types.d.mts.map +1 -0
  142. package/internal/qs/types.d.ts +57 -0
  143. package/internal/qs/types.d.ts.map +1 -0
  144. package/internal/qs/types.js +3 -0
  145. package/internal/qs/types.js.map +1 -0
  146. package/internal/qs/types.mjs +2 -0
  147. package/internal/qs/types.mjs.map +1 -0
  148. package/internal/qs/utils.d.mts +15 -0
  149. package/internal/qs/utils.d.mts.map +1 -0
  150. package/internal/qs/utils.d.ts +15 -0
  151. package/internal/qs/utils.d.ts.map +1 -0
  152. package/internal/qs/utils.js +230 -0
  153. package/internal/qs/utils.js.map +1 -0
  154. package/internal/qs/utils.mjs +217 -0
  155. package/internal/qs/utils.mjs.map +1 -0
  156. package/internal/request-options.d.mts +75 -0
  157. package/internal/request-options.d.mts.map +1 -0
  158. package/internal/request-options.d.ts +75 -0
  159. package/internal/request-options.d.ts.map +1 -0
  160. package/internal/request-options.js +14 -0
  161. package/internal/request-options.js.map +1 -0
  162. package/internal/request-options.mjs +10 -0
  163. package/internal/request-options.mjs.map +1 -0
  164. package/internal/shim-types.d.mts +17 -0
  165. package/internal/shim-types.d.mts.map +1 -0
  166. package/internal/shim-types.d.ts +17 -0
  167. package/internal/shim-types.d.ts.map +1 -0
  168. package/internal/shim-types.js +4 -0
  169. package/internal/shim-types.js.map +1 -0
  170. package/internal/shim-types.mjs +3 -0
  171. package/internal/shim-types.mjs.map +1 -0
  172. package/internal/shims.d.mts +20 -0
  173. package/internal/shims.d.mts.map +1 -0
  174. package/internal/shims.d.ts +20 -0
  175. package/internal/shims.d.ts.map +1 -0
  176. package/internal/shims.js +92 -0
  177. package/internal/shims.js.map +1 -0
  178. package/internal/shims.mjs +85 -0
  179. package/internal/shims.mjs.map +1 -0
  180. package/internal/to-file.d.mts +45 -0
  181. package/internal/to-file.d.mts.map +1 -0
  182. package/internal/to-file.d.ts +45 -0
  183. package/internal/to-file.d.ts.map +1 -0
  184. package/internal/to-file.js +91 -0
  185. package/internal/to-file.js.map +1 -0
  186. package/internal/to-file.mjs +88 -0
  187. package/internal/to-file.mjs.map +1 -0
  188. package/internal/tslib.js +85 -0
  189. package/internal/tslib.mjs +17 -0
  190. package/internal/types.d.mts +69 -0
  191. package/internal/types.d.mts.map +1 -0
  192. package/internal/types.d.ts +69 -0
  193. package/internal/types.d.ts.map +1 -0
  194. package/internal/types.js +4 -0
  195. package/internal/types.js.map +1 -0
  196. package/internal/types.mjs +3 -0
  197. package/internal/types.mjs.map +1 -0
  198. package/internal/uploads.d.mts +42 -0
  199. package/internal/uploads.d.mts.map +1 -0
  200. package/internal/uploads.d.ts +42 -0
  201. package/internal/uploads.d.ts.map +1 -0
  202. package/internal/uploads.js +141 -0
  203. package/internal/uploads.js.map +1 -0
  204. package/internal/uploads.mjs +131 -0
  205. package/internal/uploads.mjs.map +1 -0
  206. package/internal/utils/base64.d.mts +3 -0
  207. package/internal/utils/base64.d.mts.map +1 -0
  208. package/internal/utils/base64.d.ts +3 -0
  209. package/internal/utils/base64.d.ts.map +1 -0
  210. package/internal/utils/base64.js +38 -0
  211. package/internal/utils/base64.js.map +1 -0
  212. package/internal/utils/base64.mjs +33 -0
  213. package/internal/utils/base64.mjs.map +1 -0
  214. package/internal/utils/bytes.d.mts +4 -0
  215. package/internal/utils/bytes.d.mts.map +1 -0
  216. package/internal/utils/bytes.d.ts +4 -0
  217. package/internal/utils/bytes.d.ts.map +1 -0
  218. package/internal/utils/bytes.js +31 -0
  219. package/internal/utils/bytes.js.map +1 -0
  220. package/internal/utils/bytes.mjs +26 -0
  221. package/internal/utils/bytes.mjs.map +1 -0
  222. package/internal/utils/env.d.mts +9 -0
  223. package/internal/utils/env.d.mts.map +1 -0
  224. package/internal/utils/env.d.ts +9 -0
  225. package/internal/utils/env.d.ts.map +1 -0
  226. package/internal/utils/env.js +22 -0
  227. package/internal/utils/env.js.map +1 -0
  228. package/internal/utils/env.mjs +18 -0
  229. package/internal/utils/env.mjs.map +1 -0
  230. package/internal/utils/log.d.mts +37 -0
  231. package/internal/utils/log.d.mts.map +1 -0
  232. package/internal/utils/log.d.ts +37 -0
  233. package/internal/utils/log.d.ts.map +1 -0
  234. package/internal/utils/log.js +85 -0
  235. package/internal/utils/log.js.map +1 -0
  236. package/internal/utils/log.mjs +79 -0
  237. package/internal/utils/log.mjs.map +1 -0
  238. package/internal/utils/path.d.mts +15 -0
  239. package/internal/utils/path.d.mts.map +1 -0
  240. package/internal/utils/path.d.ts +15 -0
  241. package/internal/utils/path.d.ts.map +1 -0
  242. package/internal/utils/path.js +79 -0
  243. package/internal/utils/path.js.map +1 -0
  244. package/internal/utils/path.mjs +74 -0
  245. package/internal/utils/path.mjs.map +1 -0
  246. package/internal/utils/sleep.d.mts +2 -0
  247. package/internal/utils/sleep.d.mts.map +1 -0
  248. package/internal/utils/sleep.d.ts +2 -0
  249. package/internal/utils/sleep.d.ts.map +1 -0
  250. package/internal/utils/sleep.js +7 -0
  251. package/internal/utils/sleep.js.map +1 -0
  252. package/internal/utils/sleep.mjs +3 -0
  253. package/internal/utils/sleep.mjs.map +1 -0
  254. package/internal/utils/uuid.d.mts +5 -0
  255. package/internal/utils/uuid.d.mts.map +1 -0
  256. package/internal/utils/uuid.d.ts +5 -0
  257. package/internal/utils/uuid.d.ts.map +1 -0
  258. package/internal/utils/uuid.js +19 -0
  259. package/internal/utils/uuid.js.map +1 -0
  260. package/internal/utils/uuid.mjs +15 -0
  261. package/internal/utils/uuid.mjs.map +1 -0
  262. package/internal/utils/values.d.mts +18 -0
  263. package/internal/utils/values.d.mts.map +1 -0
  264. package/internal/utils/values.d.ts +18 -0
  265. package/internal/utils/values.d.ts.map +1 -0
  266. package/internal/utils/values.js +112 -0
  267. package/internal/utils/values.js.map +1 -0
  268. package/internal/utils/values.mjs +94 -0
  269. package/internal/utils/values.mjs.map +1 -0
  270. package/internal/utils.d.mts +7 -0
  271. package/internal/utils.d.mts.map +1 -0
  272. package/internal/utils.d.ts +7 -0
  273. package/internal/utils.d.ts.map +1 -0
  274. package/internal/utils.js +11 -0
  275. package/internal/utils.js.map +1 -0
  276. package/internal/utils.mjs +8 -0
  277. package/internal/utils.mjs.map +1 -0
  278. package/lib/authorization.d.mts +87 -0
  279. package/lib/authorization.d.mts.map +1 -0
  280. package/lib/authorization.d.ts +87 -0
  281. package/lib/authorization.d.ts.map +1 -0
  282. package/lib/authorization.js +73 -0
  283. package/lib/authorization.js.map +1 -0
  284. package/lib/authorization.mjs +67 -0
  285. package/lib/authorization.mjs.map +1 -0
  286. package/lib/cryptography.d.mts +8 -0
  287. package/lib/cryptography.d.mts.map +1 -0
  288. package/lib/cryptography.d.ts +8 -0
  289. package/lib/cryptography.d.ts.map +1 -0
  290. package/lib/cryptography.js +72 -0
  291. package/lib/cryptography.js.map +1 -0
  292. package/lib/cryptography.mjs +67 -0
  293. package/lib/cryptography.mjs.map +1 -0
  294. package/lib/jwt-exchange.d.mts +9 -0
  295. package/lib/jwt-exchange.d.mts.map +1 -0
  296. package/lib/jwt-exchange.d.ts +9 -0
  297. package/lib/jwt-exchange.d.ts.map +1 -0
  298. package/lib/jwt-exchange.js +55 -0
  299. package/lib/jwt-exchange.js.map +1 -0
  300. package/lib/jwt-exchange.mjs +51 -0
  301. package/lib/jwt-exchange.mjs.map +1 -0
  302. package/lib/wallet-entropy.d.mts +7 -0
  303. package/lib/wallet-entropy.d.mts.map +1 -0
  304. package/lib/wallet-entropy.d.ts +7 -0
  305. package/lib/wallet-entropy.d.ts.map +1 -0
  306. package/lib/wallet-entropy.js +44 -0
  307. package/lib/wallet-entropy.js.map +1 -0
  308. package/lib/wallet-entropy.mjs +41 -0
  309. package/lib/wallet-entropy.mjs.map +1 -0
  310. package/package.json +46 -0
  311. package/pagination.d.mts +2 -0
  312. package/pagination.d.mts.map +1 -0
  313. package/pagination.d.ts +2 -0
  314. package/pagination.d.ts.map +1 -0
  315. package/pagination.js +6 -0
  316. package/pagination.js.map +1 -0
  317. package/pagination.mjs +2 -0
  318. package/pagination.mjs.map +1 -0
  319. package/public-api/PrivyClient.d.mts +33 -0
  320. package/public-api/PrivyClient.d.mts.map +1 -0
  321. package/public-api/PrivyClient.d.ts +33 -0
  322. package/public-api/PrivyClient.d.ts.map +1 -0
  323. package/public-api/PrivyClient.js +59 -0
  324. package/public-api/PrivyClient.js.map +1 -0
  325. package/public-api/PrivyClient.mjs +55 -0
  326. package/public-api/PrivyClient.mjs.map +1 -0
  327. package/public-api/services/ethereum.d.mts +39 -0
  328. package/public-api/services/ethereum.d.mts.map +1 -0
  329. package/public-api/services/ethereum.d.ts +39 -0
  330. package/public-api/services/ethereum.d.ts.map +1 -0
  331. package/public-api/services/ethereum.js +77 -0
  332. package/public-api/services/ethereum.js.map +1 -0
  333. package/public-api/services/ethereum.mjs +73 -0
  334. package/public-api/services/ethereum.mjs.map +1 -0
  335. package/public-api/services/key-quorums.d.mts +18 -0
  336. package/public-api/services/key-quorums.d.mts.map +1 -0
  337. package/public-api/services/key-quorums.d.ts +18 -0
  338. package/public-api/services/key-quorums.d.ts.map +1 -0
  339. package/public-api/services/key-quorums.js +51 -0
  340. package/public-api/services/key-quorums.js.map +1 -0
  341. package/public-api/services/key-quorums.mjs +47 -0
  342. package/public-api/services/key-quorums.mjs.map +1 -0
  343. package/public-api/services/policies.d.mts +27 -0
  344. package/public-api/services/policies.d.mts.map +1 -0
  345. package/public-api/services/policies.d.ts +27 -0
  346. package/public-api/services/policies.d.ts.map +1 -0
  347. package/public-api/services/policies.js +110 -0
  348. package/public-api/services/policies.js.map +1 -0
  349. package/public-api/services/policies.mjs +106 -0
  350. package/public-api/services/policies.mjs.map +1 -0
  351. package/public-api/services/solana.d.mts +42 -0
  352. package/public-api/services/solana.d.mts.map +1 -0
  353. package/public-api/services/solana.d.ts +42 -0
  354. package/public-api/services/solana.d.ts.map +1 -0
  355. package/public-api/services/solana.js +67 -0
  356. package/public-api/services/solana.js.map +1 -0
  357. package/public-api/services/solana.mjs +63 -0
  358. package/public-api/services/solana.mjs.map +1 -0
  359. package/public-api/services/transactions.d.mts +4 -0
  360. package/public-api/services/transactions.d.mts.map +1 -0
  361. package/public-api/services/transactions.d.ts +4 -0
  362. package/public-api/services/transactions.d.ts.map +1 -0
  363. package/public-api/services/transactions.js +8 -0
  364. package/public-api/services/transactions.js.map +1 -0
  365. package/public-api/services/transactions.mjs +4 -0
  366. package/public-api/services/transactions.mjs.map +1 -0
  367. package/public-api/services/types.d.mts +54 -0
  368. package/public-api/services/types.d.mts.map +1 -0
  369. package/public-api/services/types.d.ts +54 -0
  370. package/public-api/services/types.d.ts.map +1 -0
  371. package/public-api/services/types.js +3 -0
  372. package/public-api/services/types.js.map +1 -0
  373. package/public-api/services/types.mjs +2 -0
  374. package/public-api/services/types.mjs.map +1 -0
  375. package/public-api/services/users.d.mts +4 -0
  376. package/public-api/services/users.d.mts.map +1 -0
  377. package/public-api/services/users.d.ts +4 -0
  378. package/public-api/services/users.d.ts.map +1 -0
  379. package/public-api/services/users.js +8 -0
  380. package/public-api/services/users.js.map +1 -0
  381. package/public-api/services/users.mjs +4 -0
  382. package/public-api/services/users.mjs.map +1 -0
  383. package/public-api/services/utils.d.mts +26 -0
  384. package/public-api/services/utils.d.mts.map +1 -0
  385. package/public-api/services/utils.d.ts +26 -0
  386. package/public-api/services/utils.d.ts.map +1 -0
  387. package/public-api/services/utils.js +18 -0
  388. package/public-api/services/utils.js.map +1 -0
  389. package/public-api/services/utils.mjs +14 -0
  390. package/public-api/services/utils.mjs.map +1 -0
  391. package/public-api/services/wallets.d.mts +70 -0
  392. package/public-api/services/wallets.d.mts.map +1 -0
  393. package/public-api/services/wallets.d.ts +70 -0
  394. package/public-api/services/wallets.d.ts.map +1 -0
  395. package/public-api/services/wallets.js +145 -0
  396. package/public-api/services/wallets.js.map +1 -0
  397. package/public-api/services/wallets.mjs +141 -0
  398. package/public-api/services/wallets.mjs.map +1 -0
  399. package/resource.d.mts +2 -0
  400. package/resource.d.mts.map +1 -0
  401. package/resource.d.ts +2 -0
  402. package/resource.d.ts.map +1 -0
  403. package/resource.js +6 -0
  404. package/resource.js.map +1 -0
  405. package/resource.mjs +2 -0
  406. package/resource.mjs.map +1 -0
  407. package/resources/index.d.mts +6 -0
  408. package/resources/index.d.mts.map +1 -0
  409. package/resources/index.d.ts +6 -0
  410. package/resources/index.d.ts.map +1 -0
  411. package/resources/index.js +15 -0
  412. package/resources/index.js.map +1 -0
  413. package/resources/index.mjs +7 -0
  414. package/resources/index.mjs.map +1 -0
  415. package/resources/key-quorums.d.mts +106 -0
  416. package/resources/key-quorums.d.mts.map +1 -0
  417. package/resources/key-quorums.d.ts +106 -0
  418. package/resources/key-quorums.d.ts.map +1 -0
  419. package/resources/key-quorums.js +84 -0
  420. package/resources/key-quorums.js.map +1 -0
  421. package/resources/key-quorums.mjs +80 -0
  422. package/resources/key-quorums.mjs.map +1 -0
  423. package/resources/policies.d.mts +1283 -0
  424. package/resources/policies.d.mts.map +1 -0
  425. package/resources/policies.d.ts +1283 -0
  426. package/resources/policies.d.ts.map +1 -0
  427. package/resources/policies.js +228 -0
  428. package/resources/policies.js.map +1 -0
  429. package/resources/policies.mjs +224 -0
  430. package/resources/policies.mjs.map +1 -0
  431. package/resources/transactions.d.mts +29 -0
  432. package/resources/transactions.d.mts.map +1 -0
  433. package/resources/transactions.d.ts +29 -0
  434. package/resources/transactions.d.ts.map +1 -0
  435. package/resources/transactions.js +23 -0
  436. package/resources/transactions.js.map +1 -0
  437. package/resources/transactions.mjs +19 -0
  438. package/resources/transactions.mjs.map +1 -0
  439. package/resources/users.d.mts +766 -0
  440. package/resources/users.d.mts.map +1 -0
  441. package/resources/users.d.ts +766 -0
  442. package/resources/users.d.ts.map +1 -0
  443. package/resources/users.js +278 -0
  444. package/resources/users.js.map +1 -0
  445. package/resources/users.mjs +274 -0
  446. package/resources/users.mjs.map +1 -0
  447. package/resources/wallets/balance.d.mts +40 -0
  448. package/resources/wallets/balance.d.mts.map +1 -0
  449. package/resources/wallets/balance.d.ts +40 -0
  450. package/resources/wallets/balance.d.ts.map +1 -0
  451. package/resources/wallets/balance.js +24 -0
  452. package/resources/wallets/balance.js.map +1 -0
  453. package/resources/wallets/balance.mjs +20 -0
  454. package/resources/wallets/balance.mjs.map +1 -0
  455. package/resources/wallets/index.d.mts +4 -0
  456. package/resources/wallets/index.d.mts.map +1 -0
  457. package/resources/wallets/index.d.ts +4 -0
  458. package/resources/wallets/index.d.ts.map +1 -0
  459. package/resources/wallets/index.js +11 -0
  460. package/resources/wallets/index.js.map +1 -0
  461. package/resources/wallets/index.mjs +5 -0
  462. package/resources/wallets/index.mjs.map +1 -0
  463. package/resources/wallets/transactions.d.mts +73 -0
  464. package/resources/wallets/transactions.d.mts.map +1 -0
  465. package/resources/wallets/transactions.d.ts +73 -0
  466. package/resources/wallets/transactions.d.ts.map +1 -0
  467. package/resources/wallets/transactions.js +24 -0
  468. package/resources/wallets/transactions.js.map +1 -0
  469. package/resources/wallets/transactions.mjs +20 -0
  470. package/resources/wallets/transactions.mjs.map +1 -0
  471. package/resources/wallets/wallets.d.mts +1122 -0
  472. package/resources/wallets/wallets.d.mts.map +1 -0
  473. package/resources/wallets/wallets.d.ts +1122 -0
  474. package/resources/wallets/wallets.d.ts.map +1 -0
  475. package/resources/wallets/wallets.js +235 -0
  476. package/resources/wallets/wallets.js.map +1 -0
  477. package/resources/wallets/wallets.mjs +230 -0
  478. package/resources/wallets/wallets.mjs.map +1 -0
  479. package/resources/wallets.d.mts +2 -0
  480. package/resources/wallets.d.mts.map +1 -0
  481. package/resources/wallets.d.ts +2 -0
  482. package/resources/wallets.d.ts.map +1 -0
  483. package/resources/wallets.js +6 -0
  484. package/resources/wallets.js.map +1 -0
  485. package/resources/wallets.mjs +3 -0
  486. package/resources/wallets.mjs.map +1 -0
  487. package/resources.d.mts +2 -0
  488. package/resources.d.mts.map +1 -0
  489. package/resources.d.ts +2 -0
  490. package/resources.d.ts.map +1 -0
  491. package/resources.js +5 -0
  492. package/resources.js.map +1 -0
  493. package/resources.mjs +2 -0
  494. package/resources.mjs.map +1 -0
  495. package/src/api-promise.ts +2 -0
  496. package/src/client.ts +942 -0
  497. package/src/core/README.md +3 -0
  498. package/src/core/api-promise.ts +92 -0
  499. package/src/core/error.ts +130 -0
  500. package/src/core/pagination.ts +157 -0
  501. package/src/core/resource.ts +11 -0
  502. package/src/core/uploads.ts +2 -0
  503. package/src/error.ts +2 -0
  504. package/src/index.ts +34 -0
  505. package/src/internal/README.md +3 -0
  506. package/src/internal/builtin-types.ts +93 -0
  507. package/src/internal/detect-platform.ts +196 -0
  508. package/src/internal/errors.ts +33 -0
  509. package/src/internal/headers.ts +97 -0
  510. package/src/internal/parse.ts +50 -0
  511. package/src/internal/qs/LICENSE.md +13 -0
  512. package/src/internal/qs/README.md +3 -0
  513. package/src/internal/qs/formats.ts +10 -0
  514. package/src/internal/qs/index.ts +13 -0
  515. package/src/internal/qs/stringify.ts +385 -0
  516. package/src/internal/qs/types.ts +71 -0
  517. package/src/internal/qs/utils.ts +265 -0
  518. package/src/internal/request-options.ts +91 -0
  519. package/src/internal/shim-types.ts +26 -0
  520. package/src/internal/shims.ts +107 -0
  521. package/src/internal/to-file.ts +154 -0
  522. package/src/internal/types.ts +95 -0
  523. package/src/internal/uploads.ts +187 -0
  524. package/src/internal/utils/base64.ts +40 -0
  525. package/src/internal/utils/bytes.ts +32 -0
  526. package/src/internal/utils/env.ts +18 -0
  527. package/src/internal/utils/log.ts +126 -0
  528. package/src/internal/utils/path.ts +88 -0
  529. package/src/internal/utils/sleep.ts +3 -0
  530. package/src/internal/utils/uuid.ts +17 -0
  531. package/src/internal/utils/values.ts +105 -0
  532. package/src/internal/utils.ts +8 -0
  533. package/src/lib/.keep +4 -0
  534. package/src/lib/authorization.ts +153 -0
  535. package/src/lib/cryptography.ts +109 -0
  536. package/src/lib/jwt-exchange.ts +65 -0
  537. package/src/lib/wallet-entropy.ts +48 -0
  538. package/src/pagination.ts +2 -0
  539. package/src/public-api/PrivyClient.ts +91 -0
  540. package/src/public-api/services/ethereum.ts +134 -0
  541. package/src/public-api/services/key-quorums.ts +77 -0
  542. package/src/public-api/services/policies.ts +175 -0
  543. package/src/public-api/services/solana.ts +111 -0
  544. package/src/public-api/services/transactions.ts +3 -0
  545. package/src/public-api/services/types.ts +50 -0
  546. package/src/public-api/services/users.ts +3 -0
  547. package/src/public-api/services/utils.ts +40 -0
  548. package/src/public-api/services/wallets.ts +270 -0
  549. package/src/resource.ts +2 -0
  550. package/src/resources/index.ts +71 -0
  551. package/src/resources/key-quorums.ts +177 -0
  552. package/src/resources/policies.ts +1992 -0
  553. package/src/resources/transactions.ts +42 -0
  554. package/src/resources/users.ts +1312 -0
  555. package/src/resources/wallets/balance.ts +62 -0
  556. package/src/resources/wallets/index.ts +25 -0
  557. package/src/resources/wallets/transactions.ts +116 -0
  558. package/src/resources/wallets/wallets.ts +1609 -0
  559. package/src/resources/wallets.ts +3 -0
  560. package/src/resources.ts +1 -0
  561. package/src/tsconfig.json +11 -0
  562. package/src/uploads.ts +2 -0
  563. package/src/version.ts +1 -0
  564. package/uploads.d.mts +2 -0
  565. package/uploads.d.mts.map +1 -0
  566. package/uploads.d.ts +2 -0
  567. package/uploads.d.ts.map +1 -0
  568. package/uploads.js +6 -0
  569. package/uploads.js.map +1 -0
  570. package/uploads.mjs +2 -0
  571. package/uploads.mjs.map +1 -0
  572. package/version.d.mts +2 -0
  573. package/version.d.mts.map +1 -0
  574. package/version.d.ts +2 -0
  575. package/version.d.ts.map +1 -0
  576. package/version.js +5 -0
  577. package/version.js.map +1 -0
  578. package/version.mjs +2 -0
  579. package/version.mjs.map +1 -0
@@ -0,0 +1,1609 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as WalletsAPI from './wallets';
5
+ import * as BalanceAPI from './balance';
6
+ import { Balance, BalanceGetParams, BalanceGetResponse } from './balance';
7
+ import * as TransactionsAPI from './transactions';
8
+ import { TransactionGetParams, TransactionGetResponse, Transactions } from './transactions';
9
+ import { APIPromise } from '../../core/api-promise';
10
+ import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
11
+ import { buildHeaders } from '../../internal/headers';
12
+ import { RequestOptions } from '../../internal/request-options';
13
+ import { path } from '../../internal/utils/path';
14
+
15
+ export class Wallets extends APIResource {
16
+ transactions: TransactionsAPI.Transactions = new TransactionsAPI.Transactions(this._client);
17
+ balance: BalanceAPI.Balance = new BalanceAPI.Balance(this._client);
18
+
19
+ /**
20
+ * Create a new wallet.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const wallet = await client.wallets.create({
25
+ * chain_type: 'ethereum',
26
+ * });
27
+ * ```
28
+ */
29
+ create(params: WalletCreateParams, options?: RequestOptions): APIPromise<Wallet> {
30
+ const { 'privy-idempotency-key': privyIdempotencyKey, ...body } = params;
31
+ return this._client.post('/v1/wallets', {
32
+ body,
33
+ ...options,
34
+ headers: buildHeaders([
35
+ { ...(privyIdempotencyKey != null ? { 'privy-idempotency-key': privyIdempotencyKey } : undefined) },
36
+ options?.headers,
37
+ ]),
38
+ });
39
+ }
40
+
41
+ /**
42
+ * Get all wallets in your app.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * // Automatically fetches more pages as needed.
47
+ * for await (const wallet of client.wallets.list()) {
48
+ * // ...
49
+ * }
50
+ * ```
51
+ */
52
+ list(
53
+ query: WalletListParams | null | undefined = {},
54
+ options?: RequestOptions,
55
+ ): PagePromise<WalletsCursor, Wallet> {
56
+ return this._client.getAPIList('/v1/wallets', Cursor<Wallet>, { query, ...options });
57
+ }
58
+
59
+ /**
60
+ * Export a wallet's private key
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * const response = await client.wallets._export('wallet_id', {
65
+ * encryption_type: 'HPKE',
66
+ * recipient_public_key:
67
+ * 'BDAZLOIdTaPycEYkgG0MvCzbIKJLli/yWkAV5yCa9yOsZ4JsrLweA5MnP8YIiY4k/RRzC+APhhO+P+Hoz/rt7Go=',
68
+ * });
69
+ * ```
70
+ */
71
+ _export(
72
+ walletID: string,
73
+ params: WalletExportParams,
74
+ options?: RequestOptions,
75
+ ): APIPromise<WalletExportResponse> {
76
+ const { 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
77
+ return this._client.post(path`/v1/wallets/${walletID}/export`, {
78
+ body,
79
+ ...options,
80
+ headers: buildHeaders([
81
+ {
82
+ ...(privyAuthorizationSignature != null ?
83
+ { 'privy-authorization-signature': privyAuthorizationSignature }
84
+ : undefined),
85
+ },
86
+ options?.headers,
87
+ ]),
88
+ });
89
+ }
90
+
91
+ /**
92
+ * Initialize a wallet import. Complete by submitting the import.
93
+ *
94
+ * @example
95
+ * ```ts
96
+ * const response = await client.wallets._initImport({
97
+ * address: 'address',
98
+ * chain_type: 'ethereum',
99
+ * encryption_type: 'HPKE',
100
+ * entropy_type: 'hd',
101
+ * index: 0,
102
+ * });
103
+ * ```
104
+ */
105
+ _initImport(body: WalletInitImportParams, options?: RequestOptions): APIPromise<WalletInitImportResponse> {
106
+ return this._client.post('/v1/wallets/import/init', { body, ...options });
107
+ }
108
+
109
+ /**
110
+ * Sign a message with a wallet by wallet ID.
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * const response = await client.wallets._rawSign(
115
+ * 'wallet_id',
116
+ * { params: {} },
117
+ * );
118
+ * ```
119
+ */
120
+ _rawSign(
121
+ walletID: string,
122
+ params: WalletRawSignParams,
123
+ options?: RequestOptions,
124
+ ): APIPromise<WalletRawSignResponse> {
125
+ const {
126
+ 'privy-authorization-signature': privyAuthorizationSignature,
127
+ 'privy-idempotency-key': privyIdempotencyKey,
128
+ ...body
129
+ } = params;
130
+ return this._client.post(path`/v1/wallets/${walletID}/raw_sign`, {
131
+ body,
132
+ ...options,
133
+ headers: buildHeaders([
134
+ {
135
+ ...(privyAuthorizationSignature != null ?
136
+ { 'privy-authorization-signature': privyAuthorizationSignature }
137
+ : undefined),
138
+ ...(privyIdempotencyKey != null ? { 'privy-idempotency-key': privyIdempotencyKey } : undefined),
139
+ },
140
+ options?.headers,
141
+ ]),
142
+ });
143
+ }
144
+
145
+ /**
146
+ * Sign a message or transaction with a wallet by wallet ID.
147
+ *
148
+ * @example
149
+ * ```ts
150
+ * const response = await client.wallets._rpc('wallet_id', {
151
+ * method: 'eth_signTransaction',
152
+ * params: { transaction: {} },
153
+ * });
154
+ * ```
155
+ */
156
+ _rpc(walletID: string, params: WalletRpcParams, options?: RequestOptions): APIPromise<WalletRpcResponse> {
157
+ const {
158
+ 'privy-authorization-signature': privyAuthorizationSignature,
159
+ 'privy-idempotency-key': privyIdempotencyKey,
160
+ ...body
161
+ } = params;
162
+ return this._client.post(path`/v1/wallets/${walletID}/rpc`, {
163
+ body,
164
+ ...options,
165
+ headers: buildHeaders([
166
+ {
167
+ ...(privyAuthorizationSignature != null ?
168
+ { 'privy-authorization-signature': privyAuthorizationSignature }
169
+ : undefined),
170
+ ...(privyIdempotencyKey != null ? { 'privy-idempotency-key': privyIdempotencyKey } : undefined),
171
+ },
172
+ options?.headers,
173
+ ]),
174
+ });
175
+ }
176
+
177
+ /**
178
+ * Submit a wallet import request.
179
+ *
180
+ * @example
181
+ * ```ts
182
+ * const wallet = await client.wallets._submitImport({
183
+ * wallet: {
184
+ * address: '0xF1DBff66C993EE895C8cb176c30b07A559d76496',
185
+ * chain_type: 'ethereum',
186
+ * ciphertext:
187
+ * 'PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9',
188
+ * encapsulated_key:
189
+ * 'BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=',
190
+ * encryption_type: 'HPKE',
191
+ * entropy_type: 'private-key',
192
+ * },
193
+ * });
194
+ * ```
195
+ */
196
+ _submitImport(body: WalletSubmitImportParams, options?: RequestOptions): APIPromise<Wallet> {
197
+ return this._client.post('/v1/wallets/import/submit', { body, ...options });
198
+ }
199
+
200
+ /**
201
+ * Update a wallet's policies or authorization key configuration.
202
+ *
203
+ * @example
204
+ * ```ts
205
+ * const wallet = await client.wallets._update('wallet_id');
206
+ * ```
207
+ */
208
+ _update(walletID: string, params: WalletUpdateParams, options?: RequestOptions): APIPromise<Wallet> {
209
+ const { 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
210
+ return this._client.patch(path`/v1/wallets/${walletID}`, {
211
+ body,
212
+ ...options,
213
+ headers: buildHeaders([
214
+ {
215
+ ...(privyAuthorizationSignature != null ?
216
+ { 'privy-authorization-signature': privyAuthorizationSignature }
217
+ : undefined),
218
+ },
219
+ options?.headers,
220
+ ]),
221
+ });
222
+ }
223
+
224
+ /**
225
+ * Obtain a session key to enable wallet access.
226
+ *
227
+ * @example
228
+ * ```ts
229
+ * const response = await client.wallets.authenticateWithJwt({
230
+ * user_jwt:
231
+ * 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30',
232
+ * });
233
+ * ```
234
+ */
235
+ authenticateWithJwt(
236
+ body: WalletAuthenticateWithJwtParams,
237
+ options?: RequestOptions,
238
+ ): APIPromise<WalletAuthenticateWithJwtResponse> {
239
+ return this._client.post('/v1/wallets/authenticate', { body, ...options });
240
+ }
241
+
242
+ /**
243
+ * Create wallets with an associated recovery user.
244
+ *
245
+ * @deprecated
246
+ */
247
+ createWalletsWithRecovery(
248
+ body: WalletCreateWalletsWithRecoveryParams,
249
+ options?: RequestOptions,
250
+ ): APIPromise<WalletCreateWalletsWithRecoveryResponse> {
251
+ return this._client.post('/v1/wallets_with_recovery', { body, ...options });
252
+ }
253
+
254
+ /**
255
+ * Get a wallet by wallet ID.
256
+ *
257
+ * @example
258
+ * ```ts
259
+ * const wallet = await client.wallets.get('wallet_id');
260
+ * ```
261
+ */
262
+ get(walletID: string, options?: RequestOptions): APIPromise<Wallet> {
263
+ return this._client.get(path`/v1/wallets/${walletID}`, options);
264
+ }
265
+ }
266
+
267
+ export type WalletsCursor = Cursor<Wallet>;
268
+
269
+ export interface Wallet {
270
+ /**
271
+ * Unique ID of the wallet. This will be the primary identifier when using the
272
+ * wallet in the future.
273
+ */
274
+ id: string;
275
+
276
+ /**
277
+ * Additional signers for the wallet.
278
+ */
279
+ additional_signers: Array<Wallet.AdditionalSigner>;
280
+
281
+ /**
282
+ * Address of the wallet.
283
+ */
284
+ address: string;
285
+
286
+ /**
287
+ * Chain type of the wallet
288
+ */
289
+ chain_type:
290
+ | 'solana'
291
+ | 'ethereum'
292
+ | 'cosmos'
293
+ | 'stellar'
294
+ | 'sui'
295
+ | 'tron'
296
+ | 'bitcoin-segwit'
297
+ | 'near'
298
+ | 'spark'
299
+ | 'ton'
300
+ | 'starknet';
301
+
302
+ /**
303
+ * Unix timestamp of when the wallet was created in milliseconds.
304
+ */
305
+ created_at: number;
306
+
307
+ /**
308
+ * Unix timestamp of when the wallet was exported in milliseconds, if the wallet
309
+ * was exported.
310
+ */
311
+ exported_at: number | null;
312
+
313
+ /**
314
+ * Unix timestamp of when the wallet was imported in milliseconds, if the wallet
315
+ * was imported.
316
+ */
317
+ imported_at: number | null;
318
+
319
+ /**
320
+ * List of policy IDs for policies that are enforced on the wallet.
321
+ */
322
+ policy_ids: Array<string>;
323
+
324
+ /**
325
+ * The key quorum ID of the owner of the wallet.
326
+ */
327
+ owner_id?: string;
328
+
329
+ /**
330
+ * The compressed, raw public key for the wallet along the chain cryptographic
331
+ * curve.
332
+ */
333
+ public_key?: string;
334
+ }
335
+
336
+ export namespace Wallet {
337
+ export interface AdditionalSigner {
338
+ override_policy_ids: Array<string>;
339
+
340
+ signer_id: string;
341
+ }
342
+ }
343
+
344
+ export interface WalletExportResponse {
345
+ /**
346
+ * The encrypted private key.
347
+ */
348
+ ciphertext: string;
349
+
350
+ /**
351
+ * The base64-encoded encapsulated key that was generated during encryption, for
352
+ * use during decryption.
353
+ */
354
+ encapsulated_key: string;
355
+
356
+ /**
357
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
358
+ */
359
+ encryption_type: 'HPKE';
360
+ }
361
+
362
+ export interface WalletInitImportResponse {
363
+ /**
364
+ * The base64-encoded encryption public key to encrypt the wallet entropy with.
365
+ */
366
+ encryption_public_key: string;
367
+
368
+ /**
369
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
370
+ */
371
+ encryption_type: 'HPKE';
372
+ }
373
+
374
+ export interface WalletRawSignResponse {
375
+ data: WalletRawSignResponse.Data;
376
+ }
377
+
378
+ export namespace WalletRawSignResponse {
379
+ export interface Data {
380
+ encoding: 'hex';
381
+
382
+ signature: string;
383
+ }
384
+ }
385
+
386
+ export type WalletRpcResponse =
387
+ | WalletRpcResponse.SolanaSignTransactionRpcResponse
388
+ | WalletRpcResponse.SolanaSignAndSendTransactionRpcResponse
389
+ | WalletRpcResponse.SolanaSignMessageRpcResponse
390
+ | WalletRpcResponse.EthereumSignTransactionRpcResponse
391
+ | WalletRpcResponse.EthereumSendTransactionRpcResponse
392
+ | WalletRpcResponse.EthereumPersonalSignRpcResponse
393
+ | WalletRpcResponse.EthereumSignTypedDataRpcResponse
394
+ | WalletRpcResponse.EthereumSign7702AuthorizationRpcResponse
395
+ | WalletRpcResponse.EthereumSecp256k1SignRpcResponse;
396
+
397
+ export namespace WalletRpcResponse {
398
+ export interface SolanaSignTransactionRpcResponse {
399
+ data: SolanaSignTransactionRpcResponse.Data;
400
+
401
+ method: 'signTransaction';
402
+ }
403
+
404
+ export namespace SolanaSignTransactionRpcResponse {
405
+ export interface Data {
406
+ encoding: 'base64';
407
+
408
+ signed_transaction: string;
409
+ }
410
+ }
411
+
412
+ export interface SolanaSignAndSendTransactionRpcResponse {
413
+ method: 'signAndSendTransaction';
414
+
415
+ data?: SolanaSignAndSendTransactionRpcResponse.Data;
416
+
417
+ error?: SolanaSignAndSendTransactionRpcResponse.Error;
418
+ }
419
+
420
+ export namespace SolanaSignAndSendTransactionRpcResponse {
421
+ export interface Data {
422
+ caip2: string;
423
+
424
+ hash: string;
425
+
426
+ transaction_id?: string;
427
+ }
428
+
429
+ export interface Error {
430
+ code: string;
431
+
432
+ message: string;
433
+ }
434
+ }
435
+
436
+ export interface SolanaSignMessageRpcResponse {
437
+ data: SolanaSignMessageRpcResponse.Data;
438
+
439
+ method: 'signMessage';
440
+ }
441
+
442
+ export namespace SolanaSignMessageRpcResponse {
443
+ export interface Data {
444
+ encoding: 'base64';
445
+
446
+ signature: string;
447
+ }
448
+ }
449
+
450
+ export interface EthereumSignTransactionRpcResponse {
451
+ data: EthereumSignTransactionRpcResponse.Data;
452
+
453
+ method: 'eth_signTransaction';
454
+ }
455
+
456
+ export namespace EthereumSignTransactionRpcResponse {
457
+ export interface Data {
458
+ encoding: 'rlp';
459
+
460
+ signed_transaction: string;
461
+ }
462
+ }
463
+
464
+ export interface EthereumSendTransactionRpcResponse {
465
+ method: 'eth_sendTransaction';
466
+
467
+ data?: EthereumSendTransactionRpcResponse.Data;
468
+
469
+ error?: EthereumSendTransactionRpcResponse.Error;
470
+ }
471
+
472
+ export namespace EthereumSendTransactionRpcResponse {
473
+ export interface Data {
474
+ caip2: string;
475
+
476
+ hash: string;
477
+
478
+ transaction_id?: string;
479
+
480
+ transaction_request?: Data.TransactionRequest;
481
+ }
482
+
483
+ export namespace Data {
484
+ export interface TransactionRequest {
485
+ chain_id?: string | number;
486
+
487
+ data?: string;
488
+
489
+ from?: string;
490
+
491
+ gas_limit?: string | number;
492
+
493
+ gas_price?: string | number;
494
+
495
+ max_fee_per_gas?: string | number;
496
+
497
+ max_priority_fee_per_gas?: string | number;
498
+
499
+ nonce?: string | number;
500
+
501
+ to?: string;
502
+
503
+ type?: 0 | 1 | 2;
504
+
505
+ value?: string | number;
506
+ }
507
+ }
508
+
509
+ export interface Error {
510
+ code: string;
511
+
512
+ message: string;
513
+ }
514
+ }
515
+
516
+ export interface EthereumPersonalSignRpcResponse {
517
+ data: EthereumPersonalSignRpcResponse.Data;
518
+
519
+ method: 'personal_sign';
520
+ }
521
+
522
+ export namespace EthereumPersonalSignRpcResponse {
523
+ export interface Data {
524
+ encoding: 'hex';
525
+
526
+ signature: string;
527
+ }
528
+ }
529
+
530
+ export interface EthereumSignTypedDataRpcResponse {
531
+ data: EthereumSignTypedDataRpcResponse.Data;
532
+
533
+ method: 'eth_signTypedData_v4';
534
+ }
535
+
536
+ export namespace EthereumSignTypedDataRpcResponse {
537
+ export interface Data {
538
+ encoding: 'hex';
539
+
540
+ signature: string;
541
+ }
542
+ }
543
+
544
+ export interface EthereumSign7702AuthorizationRpcResponse {
545
+ method: 'eth_sign7702Authorization';
546
+
547
+ data?: EthereumSign7702AuthorizationRpcResponse.Data;
548
+
549
+ error?: EthereumSign7702AuthorizationRpcResponse.Error;
550
+ }
551
+
552
+ export namespace EthereumSign7702AuthorizationRpcResponse {
553
+ export interface Data {
554
+ authorization: Data.Authorization;
555
+ }
556
+
557
+ export namespace Data {
558
+ export interface Authorization {
559
+ chain_id: string | number;
560
+
561
+ contract: string;
562
+
563
+ nonce: string | number;
564
+
565
+ r: string;
566
+
567
+ s: string;
568
+
569
+ y_parity: number;
570
+ }
571
+ }
572
+
573
+ export interface Error {
574
+ code: string;
575
+
576
+ message: string;
577
+ }
578
+ }
579
+
580
+ export interface EthereumSecp256k1SignRpcResponse {
581
+ data: EthereumSecp256k1SignRpcResponse.Data;
582
+
583
+ method: 'secp256k1_sign';
584
+ }
585
+
586
+ export namespace EthereumSecp256k1SignRpcResponse {
587
+ export interface Data {
588
+ encoding: 'hex';
589
+
590
+ signature: string;
591
+ }
592
+ }
593
+ }
594
+
595
+ export type WalletAuthenticateWithJwtResponse =
596
+ | WalletAuthenticateWithJwtResponse.WithEncryption
597
+ | WalletAuthenticateWithJwtResponse.WithoutEncryption;
598
+
599
+ export namespace WalletAuthenticateWithJwtResponse {
600
+ export interface WithEncryption {
601
+ /**
602
+ * The encrypted authorization key data.
603
+ */
604
+ encrypted_authorization_key: WithEncryption.EncryptedAuthorizationKey;
605
+
606
+ /**
607
+ * The expiration time of the authorization key in seconds since the epoch.
608
+ */
609
+ expires_at: number;
610
+
611
+ wallets: Array<WalletsAPI.Wallet>;
612
+ }
613
+
614
+ export namespace WithEncryption {
615
+ /**
616
+ * The encrypted authorization key data.
617
+ */
618
+ export interface EncryptedAuthorizationKey {
619
+ /**
620
+ * The encrypted authorization key corresponding to the user's current
621
+ * authentication session.
622
+ */
623
+ ciphertext: string;
624
+
625
+ /**
626
+ * Base64-encoded ephemeral public key used in the HPKE encryption process.
627
+ * Required for decryption.
628
+ */
629
+ encapsulated_key: string;
630
+
631
+ /**
632
+ * The encryption type used. Currently only supports HPKE.
633
+ */
634
+ encryption_type: 'HPKE';
635
+ }
636
+ }
637
+
638
+ export interface WithoutEncryption {
639
+ /**
640
+ * The raw authorization key data.
641
+ */
642
+ authorization_key: string;
643
+
644
+ /**
645
+ * The expiration time of the authorization key in seconds since the epoch.
646
+ */
647
+ expires_at: number;
648
+
649
+ wallets: Array<WalletsAPI.Wallet>;
650
+ }
651
+ }
652
+
653
+ export interface WalletCreateWalletsWithRecoveryResponse {
654
+ /**
655
+ * The ID of the created user.
656
+ */
657
+ recovery_user_id: string;
658
+
659
+ /**
660
+ * The wallets that were created.
661
+ */
662
+ wallets: Array<Wallet>;
663
+ }
664
+
665
+ export interface WalletCreateParams {
666
+ /**
667
+ * Body param: Chain type of the wallet
668
+ */
669
+ chain_type:
670
+ | 'solana'
671
+ | 'ethereum'
672
+ | 'cosmos'
673
+ | 'stellar'
674
+ | 'sui'
675
+ | 'tron'
676
+ | 'bitcoin-segwit'
677
+ | 'near'
678
+ | 'spark'
679
+ | 'ton'
680
+ | 'starknet';
681
+
682
+ /**
683
+ * Body param: Additional signers for the wallet.
684
+ */
685
+ additional_signers?: Array<WalletCreateParams.AdditionalSigner>;
686
+
687
+ /**
688
+ * Body param: The owner of the resource. If you provide this, do not specify an
689
+ * owner_id as it will be generated automatically. When updating a wallet, you can
690
+ * set the owner to null to remove the owner.
691
+ */
692
+ owner?: WalletCreateParams.PublicKeyOwner | WalletCreateParams.UserOwner | null;
693
+
694
+ /**
695
+ * Body param: The key quorum ID to set as the owner of the resource. If you
696
+ * provide this, do not specify an owner.
697
+ */
698
+ owner_id?: string;
699
+
700
+ /**
701
+ * Body param: List of policy IDs for policies that should be enforced on the
702
+ * wallet. Currently, only one policy is supported per wallet.
703
+ */
704
+ policy_ids?: Array<string>;
705
+
706
+ /**
707
+ * Header param: Idempotency keys ensure API requests are executed only once within
708
+ * a 24-hour window.
709
+ */
710
+ 'privy-idempotency-key'?: string;
711
+ }
712
+
713
+ export namespace WalletCreateParams {
714
+ export interface AdditionalSigner {
715
+ override_policy_ids: Array<string>;
716
+
717
+ signer_id: string;
718
+ }
719
+
720
+ /**
721
+ * The P-256 public key of the owner of the resource. If you provide this, do not
722
+ * specify an owner_id as it will be generated automatically.
723
+ */
724
+ export interface PublicKeyOwner {
725
+ public_key: string;
726
+ }
727
+
728
+ /**
729
+ * The user ID of the owner of the resource. The user must already exist, and this
730
+ * value must start with "did:privy:". If you provide this, do not specify an
731
+ * owner_id as it will be generated automatically.
732
+ */
733
+ export interface UserOwner {
734
+ user_id: string;
735
+ }
736
+ }
737
+
738
+ export interface WalletListParams extends CursorParams {
739
+ chain_type?:
740
+ | 'cosmos'
741
+ | 'stellar'
742
+ | 'sui'
743
+ | 'tron'
744
+ | 'bitcoin-segwit'
745
+ | 'near'
746
+ | 'ton'
747
+ | 'starknet'
748
+ | 'spark'
749
+ | 'solana'
750
+ | 'ethereum';
751
+
752
+ user_id?: string;
753
+ }
754
+
755
+ export interface WalletExportParams {
756
+ /**
757
+ * Body param: The encryption type of the wallet to import. Currently only supports
758
+ * `HPKE`.
759
+ */
760
+ encryption_type: 'HPKE';
761
+
762
+ /**
763
+ * Body param: The base64-encoded encryption public key to encrypt the wallet
764
+ * private key with.
765
+ */
766
+ recipient_public_key: string;
767
+
768
+ /**
769
+ * Header param: Request authorization signature. If multiple signatures are
770
+ * required, they should be comma separated.
771
+ */
772
+ 'privy-authorization-signature'?: string;
773
+ }
774
+
775
+ export type WalletInitImportParams =
776
+ | WalletInitImportParams.HDInitInput
777
+ | WalletInitImportParams.PrivateKeyInitInput;
778
+
779
+ export declare namespace WalletInitImportParams {
780
+ export interface HDInitInput {
781
+ /**
782
+ * The address of the wallet to import.
783
+ */
784
+ address: string;
785
+
786
+ /**
787
+ * The chain type of the wallet to import. Currently supports `ethereum` and
788
+ * `solana`.
789
+ */
790
+ chain_type: 'ethereum' | 'solana';
791
+
792
+ /**
793
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
794
+ */
795
+ encryption_type: 'HPKE';
796
+
797
+ /**
798
+ * The entropy type of the wallet to import.
799
+ */
800
+ entropy_type: 'hd';
801
+
802
+ /**
803
+ * The index of the wallet to import.
804
+ */
805
+ index: number;
806
+ }
807
+
808
+ export interface PrivateKeyInitInput {
809
+ /**
810
+ * The address of the wallet to import.
811
+ */
812
+ address: string;
813
+
814
+ /**
815
+ * The chain type of the wallet to import. Currently supports `ethereum` and
816
+ * `solana`.
817
+ */
818
+ chain_type: 'ethereum' | 'solana';
819
+
820
+ /**
821
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
822
+ */
823
+ encryption_type: 'HPKE';
824
+
825
+ entropy_type: 'private-key';
826
+ }
827
+ }
828
+
829
+ export interface WalletRawSignParams {
830
+ /**
831
+ * Body param:
832
+ */
833
+ params: WalletRawSignParams.Params;
834
+
835
+ /**
836
+ * Header param: Request authorization signature. If multiple signatures are
837
+ * required, they should be comma separated.
838
+ */
839
+ 'privy-authorization-signature'?: string;
840
+
841
+ /**
842
+ * Header param: Idempotency keys ensure API requests are executed only once within
843
+ * a 24-hour window.
844
+ */
845
+ 'privy-idempotency-key'?: string;
846
+ }
847
+
848
+ export namespace WalletRawSignParams {
849
+ export interface Params {
850
+ /**
851
+ * The hash to sign. Must start with `0x`.
852
+ */
853
+ hash?: string;
854
+ }
855
+ }
856
+
857
+ export type WalletRpcParams =
858
+ | WalletRpcParams.EthereumSignTransactionRpcInput
859
+ | WalletRpcParams.EthereumSendTransactionRpcInput
860
+ | WalletRpcParams.EthereumPersonalSignRpcInput
861
+ | WalletRpcParams.EthereumSignTypedDataRpcInput
862
+ | WalletRpcParams.EthereumSign7702AuthorizationRpcInput
863
+ | WalletRpcParams.EthereumSecp256k1SignRpcInput
864
+ | WalletRpcParams.SolanaSignTransactionRpcInput
865
+ | WalletRpcParams.SolanaSignAndSendTransactionRpcInput
866
+ | WalletRpcParams.SolanaSignMessageRpcInput;
867
+
868
+ export declare namespace WalletRpcParams {
869
+ export interface EthereumSignTransactionRpcInput {
870
+ /**
871
+ * Body param:
872
+ */
873
+ method: 'eth_signTransaction';
874
+
875
+ /**
876
+ * Body param:
877
+ */
878
+ params: EthereumSignTransactionRpcInput.Params;
879
+
880
+ /**
881
+ * Body param:
882
+ */
883
+ address?: string;
884
+
885
+ /**
886
+ * Body param:
887
+ */
888
+ chain_type?: 'ethereum';
889
+
890
+ /**
891
+ * Header param: Request authorization signature. If multiple signatures are
892
+ * required, they should be comma separated.
893
+ */
894
+ 'privy-authorization-signature'?: string;
895
+
896
+ /**
897
+ * Header param: Idempotency keys ensure API requests are executed only once within
898
+ * a 24-hour window.
899
+ */
900
+ 'privy-idempotency-key'?: string;
901
+ }
902
+
903
+ export namespace EthereumSignTransactionRpcInput {
904
+ export interface Params {
905
+ transaction: Params.Transaction;
906
+ }
907
+
908
+ export namespace Params {
909
+ export interface Transaction {
910
+ chain_id?: string | number;
911
+
912
+ data?: string;
913
+
914
+ from?: string;
915
+
916
+ gas_limit?: string | number;
917
+
918
+ gas_price?: string | number;
919
+
920
+ max_fee_per_gas?: string | number;
921
+
922
+ max_priority_fee_per_gas?: string | number;
923
+
924
+ nonce?: string | number;
925
+
926
+ to?: string;
927
+
928
+ type?: 0 | 1 | 2;
929
+
930
+ value?: string | number;
931
+ }
932
+ }
933
+ }
934
+
935
+ export interface EthereumSendTransactionRpcInput {
936
+ /**
937
+ * Body param:
938
+ */
939
+ caip2: string;
940
+
941
+ /**
942
+ * Body param:
943
+ */
944
+ method: 'eth_sendTransaction';
945
+
946
+ /**
947
+ * Body param:
948
+ */
949
+ params: EthereumSendTransactionRpcInput.Params;
950
+
951
+ /**
952
+ * Body param:
953
+ */
954
+ address?: string;
955
+
956
+ /**
957
+ * Body param:
958
+ */
959
+ chain_type?: 'ethereum';
960
+
961
+ /**
962
+ * Body param:
963
+ */
964
+ sponsor?: boolean;
965
+
966
+ /**
967
+ * Header param: Request authorization signature. If multiple signatures are
968
+ * required, they should be comma separated.
969
+ */
970
+ 'privy-authorization-signature'?: string;
971
+
972
+ /**
973
+ * Header param: Idempotency keys ensure API requests are executed only once within
974
+ * a 24-hour window.
975
+ */
976
+ 'privy-idempotency-key'?: string;
977
+ }
978
+
979
+ export namespace EthereumSendTransactionRpcInput {
980
+ export interface Params {
981
+ transaction: Params.Transaction;
982
+ }
983
+
984
+ export namespace Params {
985
+ export interface Transaction {
986
+ chain_id?: string | number;
987
+
988
+ data?: string;
989
+
990
+ from?: string;
991
+
992
+ gas_limit?: string | number;
993
+
994
+ gas_price?: string | number;
995
+
996
+ max_fee_per_gas?: string | number;
997
+
998
+ max_priority_fee_per_gas?: string | number;
999
+
1000
+ nonce?: string | number;
1001
+
1002
+ to?: string;
1003
+
1004
+ type?: 0 | 1 | 2;
1005
+
1006
+ value?: string | number;
1007
+ }
1008
+ }
1009
+ }
1010
+
1011
+ export interface EthereumPersonalSignRpcInput {
1012
+ /**
1013
+ * Body param:
1014
+ */
1015
+ method: 'personal_sign';
1016
+
1017
+ /**
1018
+ * Body param:
1019
+ */
1020
+ params: EthereumPersonalSignRpcInput.Params;
1021
+
1022
+ /**
1023
+ * Body param:
1024
+ */
1025
+ address?: string;
1026
+
1027
+ /**
1028
+ * Body param:
1029
+ */
1030
+ chain_type?: 'ethereum';
1031
+
1032
+ /**
1033
+ * Header param: Request authorization signature. If multiple signatures are
1034
+ * required, they should be comma separated.
1035
+ */
1036
+ 'privy-authorization-signature'?: string;
1037
+
1038
+ /**
1039
+ * Header param: Idempotency keys ensure API requests are executed only once within
1040
+ * a 24-hour window.
1041
+ */
1042
+ 'privy-idempotency-key'?: string;
1043
+ }
1044
+
1045
+ export namespace EthereumPersonalSignRpcInput {
1046
+ export interface Params {
1047
+ encoding: 'utf-8' | 'hex';
1048
+
1049
+ message: string;
1050
+ }
1051
+ }
1052
+
1053
+ export interface EthereumSignTypedDataRpcInput {
1054
+ /**
1055
+ * Body param:
1056
+ */
1057
+ method: 'eth_signTypedData_v4';
1058
+
1059
+ /**
1060
+ * Body param:
1061
+ */
1062
+ params: EthereumSignTypedDataRpcInput.Params;
1063
+
1064
+ /**
1065
+ * Body param:
1066
+ */
1067
+ address?: string;
1068
+
1069
+ /**
1070
+ * Body param:
1071
+ */
1072
+ chain_type?: 'ethereum';
1073
+
1074
+ /**
1075
+ * Header param: Request authorization signature. If multiple signatures are
1076
+ * required, they should be comma separated.
1077
+ */
1078
+ 'privy-authorization-signature'?: string;
1079
+
1080
+ /**
1081
+ * Header param: Idempotency keys ensure API requests are executed only once within
1082
+ * a 24-hour window.
1083
+ */
1084
+ 'privy-idempotency-key'?: string;
1085
+ }
1086
+
1087
+ export namespace EthereumSignTypedDataRpcInput {
1088
+ export interface Params {
1089
+ typed_data: Params.TypedData;
1090
+ }
1091
+
1092
+ export namespace Params {
1093
+ export interface TypedData {
1094
+ domain: { [key: string]: unknown };
1095
+
1096
+ message: { [key: string]: unknown };
1097
+
1098
+ primary_type: string;
1099
+
1100
+ types: { [key: string]: Array<TypedData.Type> };
1101
+ }
1102
+
1103
+ export namespace TypedData {
1104
+ export interface Type {
1105
+ name: string;
1106
+
1107
+ type: string;
1108
+ }
1109
+ }
1110
+ }
1111
+ }
1112
+
1113
+ export interface EthereumSign7702AuthorizationRpcInput {
1114
+ /**
1115
+ * Body param:
1116
+ */
1117
+ method: 'eth_sign7702Authorization';
1118
+
1119
+ /**
1120
+ * Body param:
1121
+ */
1122
+ params: EthereumSign7702AuthorizationRpcInput.Params;
1123
+
1124
+ /**
1125
+ * Body param:
1126
+ */
1127
+ address?: string;
1128
+
1129
+ /**
1130
+ * Body param:
1131
+ */
1132
+ chain_type?: 'ethereum';
1133
+
1134
+ /**
1135
+ * Header param: Request authorization signature. If multiple signatures are
1136
+ * required, they should be comma separated.
1137
+ */
1138
+ 'privy-authorization-signature'?: string;
1139
+
1140
+ /**
1141
+ * Header param: Idempotency keys ensure API requests are executed only once within
1142
+ * a 24-hour window.
1143
+ */
1144
+ 'privy-idempotency-key'?: string;
1145
+ }
1146
+
1147
+ export namespace EthereumSign7702AuthorizationRpcInput {
1148
+ export interface Params {
1149
+ chain_id: string | number;
1150
+
1151
+ contract: string;
1152
+
1153
+ nonce?: string | number;
1154
+ }
1155
+ }
1156
+
1157
+ export interface EthereumSecp256k1SignRpcInput {
1158
+ /**
1159
+ * Body param:
1160
+ */
1161
+ method: 'secp256k1_sign';
1162
+
1163
+ /**
1164
+ * Body param:
1165
+ */
1166
+ params: EthereumSecp256k1SignRpcInput.Params;
1167
+
1168
+ /**
1169
+ * Body param:
1170
+ */
1171
+ address?: string;
1172
+
1173
+ /**
1174
+ * Body param:
1175
+ */
1176
+ chain_type?: 'ethereum';
1177
+
1178
+ /**
1179
+ * Header param: Request authorization signature. If multiple signatures are
1180
+ * required, they should be comma separated.
1181
+ */
1182
+ 'privy-authorization-signature'?: string;
1183
+
1184
+ /**
1185
+ * Header param: Idempotency keys ensure API requests are executed only once within
1186
+ * a 24-hour window.
1187
+ */
1188
+ 'privy-idempotency-key'?: string;
1189
+ }
1190
+
1191
+ export namespace EthereumSecp256k1SignRpcInput {
1192
+ export interface Params {
1193
+ hash: string;
1194
+ }
1195
+ }
1196
+
1197
+ export interface SolanaSignTransactionRpcInput {
1198
+ /**
1199
+ * Body param:
1200
+ */
1201
+ method: 'signTransaction';
1202
+
1203
+ /**
1204
+ * Body param:
1205
+ */
1206
+ params: SolanaSignTransactionRpcInput.Params;
1207
+
1208
+ /**
1209
+ * Body param:
1210
+ */
1211
+ address?: string;
1212
+
1213
+ /**
1214
+ * Body param:
1215
+ */
1216
+ chain_type?: 'solana';
1217
+
1218
+ /**
1219
+ * Header param: Request authorization signature. If multiple signatures are
1220
+ * required, they should be comma separated.
1221
+ */
1222
+ 'privy-authorization-signature'?: string;
1223
+
1224
+ /**
1225
+ * Header param: Idempotency keys ensure API requests are executed only once within
1226
+ * a 24-hour window.
1227
+ */
1228
+ 'privy-idempotency-key'?: string;
1229
+ }
1230
+
1231
+ export namespace SolanaSignTransactionRpcInput {
1232
+ export interface Params {
1233
+ encoding: 'base64';
1234
+
1235
+ transaction: string;
1236
+ }
1237
+ }
1238
+
1239
+ export interface SolanaSignAndSendTransactionRpcInput {
1240
+ /**
1241
+ * Body param:
1242
+ */
1243
+ caip2: string;
1244
+
1245
+ /**
1246
+ * Body param:
1247
+ */
1248
+ method: 'signAndSendTransaction';
1249
+
1250
+ /**
1251
+ * Body param:
1252
+ */
1253
+ params: SolanaSignAndSendTransactionRpcInput.Params;
1254
+
1255
+ /**
1256
+ * Body param:
1257
+ */
1258
+ address?: string;
1259
+
1260
+ /**
1261
+ * Body param:
1262
+ */
1263
+ chain_type?: 'solana';
1264
+
1265
+ /**
1266
+ * Body param:
1267
+ */
1268
+ sponsor?: boolean;
1269
+
1270
+ /**
1271
+ * Header param: Request authorization signature. If multiple signatures are
1272
+ * required, they should be comma separated.
1273
+ */
1274
+ 'privy-authorization-signature'?: string;
1275
+
1276
+ /**
1277
+ * Header param: Idempotency keys ensure API requests are executed only once within
1278
+ * a 24-hour window.
1279
+ */
1280
+ 'privy-idempotency-key'?: string;
1281
+ }
1282
+
1283
+ export namespace SolanaSignAndSendTransactionRpcInput {
1284
+ export interface Params {
1285
+ encoding: 'base64';
1286
+
1287
+ transaction: string;
1288
+ }
1289
+ }
1290
+
1291
+ export interface SolanaSignMessageRpcInput {
1292
+ /**
1293
+ * Body param:
1294
+ */
1295
+ method: 'signMessage';
1296
+
1297
+ /**
1298
+ * Body param:
1299
+ */
1300
+ params: SolanaSignMessageRpcInput.Params;
1301
+
1302
+ /**
1303
+ * Body param:
1304
+ */
1305
+ address?: string;
1306
+
1307
+ /**
1308
+ * Body param:
1309
+ */
1310
+ chain_type?: 'solana';
1311
+
1312
+ /**
1313
+ * Header param: Request authorization signature. If multiple signatures are
1314
+ * required, they should be comma separated.
1315
+ */
1316
+ 'privy-authorization-signature'?: string;
1317
+
1318
+ /**
1319
+ * Header param: Idempotency keys ensure API requests are executed only once within
1320
+ * a 24-hour window.
1321
+ */
1322
+ 'privy-idempotency-key'?: string;
1323
+ }
1324
+
1325
+ export namespace SolanaSignMessageRpcInput {
1326
+ export interface Params {
1327
+ encoding: 'base64';
1328
+
1329
+ message: string;
1330
+ }
1331
+ }
1332
+ }
1333
+
1334
+ export interface WalletSubmitImportParams {
1335
+ wallet: WalletSubmitImportParams.HDSubmitInput | WalletSubmitImportParams.PrivateKeySubmitInput;
1336
+
1337
+ additional_signers?: Array<WalletSubmitImportParams.AdditionalSigner>;
1338
+
1339
+ owner?: WalletSubmitImportParams.UserID | WalletSubmitImportParams.PublicKey | null;
1340
+
1341
+ owner_id?: string | null;
1342
+
1343
+ policy_ids?: Array<string>;
1344
+ }
1345
+
1346
+ export namespace WalletSubmitImportParams {
1347
+ export interface HDSubmitInput {
1348
+ /**
1349
+ * The address of the wallet to import.
1350
+ */
1351
+ address: string;
1352
+
1353
+ /**
1354
+ * The chain type of the wallet to import. Currently supports `ethereum` and
1355
+ * `solana`.
1356
+ */
1357
+ chain_type: 'ethereum' | 'solana';
1358
+
1359
+ /**
1360
+ * The encrypted entropy of the wallet to import.
1361
+ */
1362
+ ciphertext: string;
1363
+
1364
+ /**
1365
+ * The base64-encoded encapsulated key that was generated during encryption, for
1366
+ * use during decryption inside the TEE.
1367
+ */
1368
+ encapsulated_key: string;
1369
+
1370
+ /**
1371
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
1372
+ */
1373
+ encryption_type: 'HPKE';
1374
+
1375
+ /**
1376
+ * The entropy type of the wallet to import.
1377
+ */
1378
+ entropy_type: 'hd';
1379
+
1380
+ /**
1381
+ * The index of the wallet to import.
1382
+ */
1383
+ index: number;
1384
+ }
1385
+
1386
+ export interface PrivateKeySubmitInput {
1387
+ /**
1388
+ * The address of the wallet to import.
1389
+ */
1390
+ address: string;
1391
+
1392
+ /**
1393
+ * The chain type of the wallet to import. Currently supports `ethereum` and
1394
+ * `solana`.
1395
+ */
1396
+ chain_type: 'ethereum' | 'solana';
1397
+
1398
+ /**
1399
+ * The encrypted entropy of the wallet to import.
1400
+ */
1401
+ ciphertext: string;
1402
+
1403
+ /**
1404
+ * The base64-encoded encapsulated key that was generated during encryption, for
1405
+ * use during decryption inside the TEE.
1406
+ */
1407
+ encapsulated_key: string;
1408
+
1409
+ /**
1410
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
1411
+ */
1412
+ encryption_type: 'HPKE';
1413
+
1414
+ entropy_type: 'private-key';
1415
+ }
1416
+
1417
+ export interface AdditionalSigner {
1418
+ signer_id: string;
1419
+
1420
+ override_policy_ids?: Array<string>;
1421
+ }
1422
+
1423
+ export interface UserID {
1424
+ user_id: string;
1425
+ }
1426
+
1427
+ export interface PublicKey {
1428
+ public_key: string;
1429
+ }
1430
+ }
1431
+
1432
+ export interface WalletUpdateParams {
1433
+ /**
1434
+ * Body param: Additional signers for the wallet.
1435
+ */
1436
+ additional_signers?: Array<WalletUpdateParams.AdditionalSigner>;
1437
+
1438
+ /**
1439
+ * Body param: The owner of the resource. If you provide this, do not specify an
1440
+ * owner_id as it will be generated automatically. When updating a wallet, you can
1441
+ * set the owner to null to remove the owner.
1442
+ */
1443
+ owner?: WalletUpdateParams.PublicKeyOwner | WalletUpdateParams.UserOwner | null;
1444
+
1445
+ /**
1446
+ * Body param: The key quorum ID to set as the owner of the resource. If you
1447
+ * provide this, do not specify an owner.
1448
+ */
1449
+ owner_id?: string | null;
1450
+
1451
+ /**
1452
+ * Body param: New policy IDs to enforce on the wallet. Currently, only one policy
1453
+ * is supported per wallet.
1454
+ */
1455
+ policy_ids?: Array<string>;
1456
+
1457
+ /**
1458
+ * Header param: Request authorization signature. If multiple signatures are
1459
+ * required, they should be comma separated.
1460
+ */
1461
+ 'privy-authorization-signature'?: string;
1462
+ }
1463
+
1464
+ export namespace WalletUpdateParams {
1465
+ export interface AdditionalSigner {
1466
+ override_policy_ids: Array<string>;
1467
+
1468
+ signer_id: string;
1469
+ }
1470
+
1471
+ /**
1472
+ * The P-256 public key of the owner of the resource. If you provide this, do not
1473
+ * specify an owner_id as it will be generated automatically.
1474
+ */
1475
+ export interface PublicKeyOwner {
1476
+ public_key: string;
1477
+ }
1478
+
1479
+ /**
1480
+ * The user ID of the owner of the resource. The user must already exist, and this
1481
+ * value must start with "did:privy:". If you provide this, do not specify an
1482
+ * owner_id as it will be generated automatically.
1483
+ */
1484
+ export interface UserOwner {
1485
+ user_id: string;
1486
+ }
1487
+ }
1488
+
1489
+ export interface WalletAuthenticateWithJwtParams {
1490
+ /**
1491
+ * The user's JWT, to be used to authenticate the user.
1492
+ */
1493
+ user_jwt: string;
1494
+
1495
+ /**
1496
+ * The encryption type for the authentication response. Currently only supports
1497
+ * HPKE.
1498
+ */
1499
+ encryption_type?: 'HPKE';
1500
+
1501
+ /**
1502
+ * The public key of your ECDH keypair, in base64-encoded, SPKI-format, whose
1503
+ * private key will be able to decrypt the session key.
1504
+ */
1505
+ recipient_public_key?: string;
1506
+ }
1507
+
1508
+ export interface WalletCreateWalletsWithRecoveryParams {
1509
+ primary_signer: WalletCreateWalletsWithRecoveryParams.PrimarySigner;
1510
+
1511
+ recovery_user: WalletCreateWalletsWithRecoveryParams.RecoveryUser;
1512
+
1513
+ wallets: Array<WalletCreateWalletsWithRecoveryParams.Wallet>;
1514
+ }
1515
+
1516
+ export namespace WalletCreateWalletsWithRecoveryParams {
1517
+ export interface PrimarySigner {
1518
+ /**
1519
+ * The JWT subject ID of the user.
1520
+ */
1521
+ subject_id: string;
1522
+ }
1523
+
1524
+ export interface RecoveryUser {
1525
+ linked_accounts: Array<RecoveryUser.UnionMember0 | RecoveryUser.UnionMember1>;
1526
+ }
1527
+
1528
+ export namespace RecoveryUser {
1529
+ export interface UnionMember0 {
1530
+ /**
1531
+ * The email address of the user.
1532
+ */
1533
+ address: string;
1534
+
1535
+ type: 'email';
1536
+ }
1537
+
1538
+ export interface UnionMember1 {
1539
+ /**
1540
+ * The JWT subject ID of the user.
1541
+ */
1542
+ custom_user_id: string;
1543
+
1544
+ type: 'custom_auth';
1545
+ }
1546
+ }
1547
+
1548
+ export interface Wallet {
1549
+ /**
1550
+ * Chain type of the wallet
1551
+ */
1552
+ chain_type:
1553
+ | 'solana'
1554
+ | 'ethereum'
1555
+ | 'cosmos'
1556
+ | 'stellar'
1557
+ | 'sui'
1558
+ | 'tron'
1559
+ | 'bitcoin-segwit'
1560
+ | 'near'
1561
+ | 'spark'
1562
+ | 'ton'
1563
+ | 'starknet';
1564
+
1565
+ /**
1566
+ * List of policy IDs for policies that should be enforced on the wallet.
1567
+ * Currently, only one policy is supported per wallet.
1568
+ */
1569
+ policy_ids?: Array<string>;
1570
+ }
1571
+ }
1572
+
1573
+ Wallets.Transactions = Transactions;
1574
+ Wallets.Balance = Balance;
1575
+
1576
+ export declare namespace Wallets {
1577
+ export {
1578
+ type Wallet as Wallet,
1579
+ type WalletExportResponse as WalletExportResponse,
1580
+ type WalletInitImportResponse as WalletInitImportResponse,
1581
+ type WalletRawSignResponse as WalletRawSignResponse,
1582
+ type WalletRpcResponse as WalletRpcResponse,
1583
+ type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse,
1584
+ type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse,
1585
+ type WalletsCursor as WalletsCursor,
1586
+ type WalletCreateParams as WalletCreateParams,
1587
+ type WalletListParams as WalletListParams,
1588
+ type WalletExportParams as WalletExportParams,
1589
+ type WalletInitImportParams as WalletInitImportParams,
1590
+ type WalletRawSignParams as WalletRawSignParams,
1591
+ type WalletRpcParams as WalletRpcParams,
1592
+ type WalletSubmitImportParams as WalletSubmitImportParams,
1593
+ type WalletUpdateParams as WalletUpdateParams,
1594
+ type WalletAuthenticateWithJwtParams as WalletAuthenticateWithJwtParams,
1595
+ type WalletCreateWalletsWithRecoveryParams as WalletCreateWalletsWithRecoveryParams,
1596
+ };
1597
+
1598
+ export {
1599
+ Transactions as Transactions,
1600
+ type TransactionGetResponse as TransactionGetResponse,
1601
+ type TransactionGetParams as TransactionGetParams,
1602
+ };
1603
+
1604
+ export {
1605
+ Balance as Balance,
1606
+ type BalanceGetResponse as BalanceGetResponse,
1607
+ type BalanceGetParams as BalanceGetParams,
1608
+ };
1609
+ }