@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,1122 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as WalletsAPI from "./wallets.mjs";
3
+ import * as BalanceAPI from "./balance.mjs";
4
+ import { Balance, BalanceGetParams, BalanceGetResponse } from "./balance.mjs";
5
+ import * as TransactionsAPI from "./transactions.mjs";
6
+ import { TransactionGetParams, TransactionGetResponse, Transactions } from "./transactions.mjs";
7
+ import { APIPromise } from "../../core/api-promise.mjs";
8
+ import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.mjs";
9
+ import { RequestOptions } from "../../internal/request-options.mjs";
10
+ export declare class Wallets extends APIResource {
11
+ transactions: TransactionsAPI.Transactions;
12
+ balance: BalanceAPI.Balance;
13
+ /**
14
+ * Create a new wallet.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const wallet = await client.wallets.create({
19
+ * chain_type: 'ethereum',
20
+ * });
21
+ * ```
22
+ */
23
+ create(params: WalletCreateParams, options?: RequestOptions): APIPromise<Wallet>;
24
+ /**
25
+ * Get all wallets in your app.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * // Automatically fetches more pages as needed.
30
+ * for await (const wallet of client.wallets.list()) {
31
+ * // ...
32
+ * }
33
+ * ```
34
+ */
35
+ list(query?: WalletListParams | null | undefined, options?: RequestOptions): PagePromise<WalletsCursor, Wallet>;
36
+ /**
37
+ * Export a wallet's private key
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const response = await client.wallets._export('wallet_id', {
42
+ * encryption_type: 'HPKE',
43
+ * recipient_public_key:
44
+ * 'BDAZLOIdTaPycEYkgG0MvCzbIKJLli/yWkAV5yCa9yOsZ4JsrLweA5MnP8YIiY4k/RRzC+APhhO+P+Hoz/rt7Go=',
45
+ * });
46
+ * ```
47
+ */
48
+ _export(walletID: string, params: WalletExportParams, options?: RequestOptions): APIPromise<WalletExportResponse>;
49
+ /**
50
+ * Initialize a wallet import. Complete by submitting the import.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const response = await client.wallets._initImport({
55
+ * address: 'address',
56
+ * chain_type: 'ethereum',
57
+ * encryption_type: 'HPKE',
58
+ * entropy_type: 'hd',
59
+ * index: 0,
60
+ * });
61
+ * ```
62
+ */
63
+ _initImport(body: WalletInitImportParams, options?: RequestOptions): APIPromise<WalletInitImportResponse>;
64
+ /**
65
+ * Sign a message with a wallet by wallet ID.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const response = await client.wallets._rawSign(
70
+ * 'wallet_id',
71
+ * { params: {} },
72
+ * );
73
+ * ```
74
+ */
75
+ _rawSign(walletID: string, params: WalletRawSignParams, options?: RequestOptions): APIPromise<WalletRawSignResponse>;
76
+ /**
77
+ * Sign a message or transaction with a wallet by wallet ID.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const response = await client.wallets._rpc('wallet_id', {
82
+ * method: 'eth_signTransaction',
83
+ * params: { transaction: {} },
84
+ * });
85
+ * ```
86
+ */
87
+ _rpc(walletID: string, params: WalletRpcParams, options?: RequestOptions): APIPromise<WalletRpcResponse>;
88
+ /**
89
+ * Submit a wallet import request.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * const wallet = await client.wallets._submitImport({
94
+ * wallet: {
95
+ * address: '0xF1DBff66C993EE895C8cb176c30b07A559d76496',
96
+ * chain_type: 'ethereum',
97
+ * ciphertext:
98
+ * 'PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9',
99
+ * encapsulated_key:
100
+ * 'BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=',
101
+ * encryption_type: 'HPKE',
102
+ * entropy_type: 'private-key',
103
+ * },
104
+ * });
105
+ * ```
106
+ */
107
+ _submitImport(body: WalletSubmitImportParams, options?: RequestOptions): APIPromise<Wallet>;
108
+ /**
109
+ * Update a wallet's policies or authorization key configuration.
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * const wallet = await client.wallets._update('wallet_id');
114
+ * ```
115
+ */
116
+ _update(walletID: string, params: WalletUpdateParams, options?: RequestOptions): APIPromise<Wallet>;
117
+ /**
118
+ * Obtain a session key to enable wallet access.
119
+ *
120
+ * @example
121
+ * ```ts
122
+ * const response = await client.wallets.authenticateWithJwt({
123
+ * user_jwt:
124
+ * 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30',
125
+ * });
126
+ * ```
127
+ */
128
+ authenticateWithJwt(body: WalletAuthenticateWithJwtParams, options?: RequestOptions): APIPromise<WalletAuthenticateWithJwtResponse>;
129
+ /**
130
+ * Create wallets with an associated recovery user.
131
+ *
132
+ * @deprecated
133
+ */
134
+ createWalletsWithRecovery(body: WalletCreateWalletsWithRecoveryParams, options?: RequestOptions): APIPromise<WalletCreateWalletsWithRecoveryResponse>;
135
+ /**
136
+ * Get a wallet by wallet ID.
137
+ *
138
+ * @example
139
+ * ```ts
140
+ * const wallet = await client.wallets.get('wallet_id');
141
+ * ```
142
+ */
143
+ get(walletID: string, options?: RequestOptions): APIPromise<Wallet>;
144
+ }
145
+ export type WalletsCursor = Cursor<Wallet>;
146
+ export interface Wallet {
147
+ /**
148
+ * Unique ID of the wallet. This will be the primary identifier when using the
149
+ * wallet in the future.
150
+ */
151
+ id: string;
152
+ /**
153
+ * Additional signers for the wallet.
154
+ */
155
+ additional_signers: Array<Wallet.AdditionalSigner>;
156
+ /**
157
+ * Address of the wallet.
158
+ */
159
+ address: string;
160
+ /**
161
+ * Chain type of the wallet
162
+ */
163
+ chain_type: 'solana' | 'ethereum' | 'cosmos' | 'stellar' | 'sui' | 'tron' | 'bitcoin-segwit' | 'near' | 'spark' | 'ton' | 'starknet';
164
+ /**
165
+ * Unix timestamp of when the wallet was created in milliseconds.
166
+ */
167
+ created_at: number;
168
+ /**
169
+ * Unix timestamp of when the wallet was exported in milliseconds, if the wallet
170
+ * was exported.
171
+ */
172
+ exported_at: number | null;
173
+ /**
174
+ * Unix timestamp of when the wallet was imported in milliseconds, if the wallet
175
+ * was imported.
176
+ */
177
+ imported_at: number | null;
178
+ /**
179
+ * List of policy IDs for policies that are enforced on the wallet.
180
+ */
181
+ policy_ids: Array<string>;
182
+ /**
183
+ * The key quorum ID of the owner of the wallet.
184
+ */
185
+ owner_id?: string;
186
+ /**
187
+ * The compressed, raw public key for the wallet along the chain cryptographic
188
+ * curve.
189
+ */
190
+ public_key?: string;
191
+ }
192
+ export declare namespace Wallet {
193
+ interface AdditionalSigner {
194
+ override_policy_ids: Array<string>;
195
+ signer_id: string;
196
+ }
197
+ }
198
+ export interface WalletExportResponse {
199
+ /**
200
+ * The encrypted private key.
201
+ */
202
+ ciphertext: string;
203
+ /**
204
+ * The base64-encoded encapsulated key that was generated during encryption, for
205
+ * use during decryption.
206
+ */
207
+ encapsulated_key: string;
208
+ /**
209
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
210
+ */
211
+ encryption_type: 'HPKE';
212
+ }
213
+ export interface WalletInitImportResponse {
214
+ /**
215
+ * The base64-encoded encryption public key to encrypt the wallet entropy with.
216
+ */
217
+ encryption_public_key: string;
218
+ /**
219
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
220
+ */
221
+ encryption_type: 'HPKE';
222
+ }
223
+ export interface WalletRawSignResponse {
224
+ data: WalletRawSignResponse.Data;
225
+ }
226
+ export declare namespace WalletRawSignResponse {
227
+ interface Data {
228
+ encoding: 'hex';
229
+ signature: string;
230
+ }
231
+ }
232
+ export type WalletRpcResponse = WalletRpcResponse.SolanaSignTransactionRpcResponse | WalletRpcResponse.SolanaSignAndSendTransactionRpcResponse | WalletRpcResponse.SolanaSignMessageRpcResponse | WalletRpcResponse.EthereumSignTransactionRpcResponse | WalletRpcResponse.EthereumSendTransactionRpcResponse | WalletRpcResponse.EthereumPersonalSignRpcResponse | WalletRpcResponse.EthereumSignTypedDataRpcResponse | WalletRpcResponse.EthereumSign7702AuthorizationRpcResponse | WalletRpcResponse.EthereumSecp256k1SignRpcResponse;
233
+ export declare namespace WalletRpcResponse {
234
+ interface SolanaSignTransactionRpcResponse {
235
+ data: SolanaSignTransactionRpcResponse.Data;
236
+ method: 'signTransaction';
237
+ }
238
+ namespace SolanaSignTransactionRpcResponse {
239
+ interface Data {
240
+ encoding: 'base64';
241
+ signed_transaction: string;
242
+ }
243
+ }
244
+ interface SolanaSignAndSendTransactionRpcResponse {
245
+ method: 'signAndSendTransaction';
246
+ data?: SolanaSignAndSendTransactionRpcResponse.Data;
247
+ error?: SolanaSignAndSendTransactionRpcResponse.Error;
248
+ }
249
+ namespace SolanaSignAndSendTransactionRpcResponse {
250
+ interface Data {
251
+ caip2: string;
252
+ hash: string;
253
+ transaction_id?: string;
254
+ }
255
+ interface Error {
256
+ code: string;
257
+ message: string;
258
+ }
259
+ }
260
+ interface SolanaSignMessageRpcResponse {
261
+ data: SolanaSignMessageRpcResponse.Data;
262
+ method: 'signMessage';
263
+ }
264
+ namespace SolanaSignMessageRpcResponse {
265
+ interface Data {
266
+ encoding: 'base64';
267
+ signature: string;
268
+ }
269
+ }
270
+ interface EthereumSignTransactionRpcResponse {
271
+ data: EthereumSignTransactionRpcResponse.Data;
272
+ method: 'eth_signTransaction';
273
+ }
274
+ namespace EthereumSignTransactionRpcResponse {
275
+ interface Data {
276
+ encoding: 'rlp';
277
+ signed_transaction: string;
278
+ }
279
+ }
280
+ interface EthereumSendTransactionRpcResponse {
281
+ method: 'eth_sendTransaction';
282
+ data?: EthereumSendTransactionRpcResponse.Data;
283
+ error?: EthereumSendTransactionRpcResponse.Error;
284
+ }
285
+ namespace EthereumSendTransactionRpcResponse {
286
+ interface Data {
287
+ caip2: string;
288
+ hash: string;
289
+ transaction_id?: string;
290
+ transaction_request?: Data.TransactionRequest;
291
+ }
292
+ namespace Data {
293
+ interface TransactionRequest {
294
+ chain_id?: string | number;
295
+ data?: string;
296
+ from?: string;
297
+ gas_limit?: string | number;
298
+ gas_price?: string | number;
299
+ max_fee_per_gas?: string | number;
300
+ max_priority_fee_per_gas?: string | number;
301
+ nonce?: string | number;
302
+ to?: string;
303
+ type?: 0 | 1 | 2;
304
+ value?: string | number;
305
+ }
306
+ }
307
+ interface Error {
308
+ code: string;
309
+ message: string;
310
+ }
311
+ }
312
+ interface EthereumPersonalSignRpcResponse {
313
+ data: EthereumPersonalSignRpcResponse.Data;
314
+ method: 'personal_sign';
315
+ }
316
+ namespace EthereumPersonalSignRpcResponse {
317
+ interface Data {
318
+ encoding: 'hex';
319
+ signature: string;
320
+ }
321
+ }
322
+ interface EthereumSignTypedDataRpcResponse {
323
+ data: EthereumSignTypedDataRpcResponse.Data;
324
+ method: 'eth_signTypedData_v4';
325
+ }
326
+ namespace EthereumSignTypedDataRpcResponse {
327
+ interface Data {
328
+ encoding: 'hex';
329
+ signature: string;
330
+ }
331
+ }
332
+ interface EthereumSign7702AuthorizationRpcResponse {
333
+ method: 'eth_sign7702Authorization';
334
+ data?: EthereumSign7702AuthorizationRpcResponse.Data;
335
+ error?: EthereumSign7702AuthorizationRpcResponse.Error;
336
+ }
337
+ namespace EthereumSign7702AuthorizationRpcResponse {
338
+ interface Data {
339
+ authorization: Data.Authorization;
340
+ }
341
+ namespace Data {
342
+ interface Authorization {
343
+ chain_id: string | number;
344
+ contract: string;
345
+ nonce: string | number;
346
+ r: string;
347
+ s: string;
348
+ y_parity: number;
349
+ }
350
+ }
351
+ interface Error {
352
+ code: string;
353
+ message: string;
354
+ }
355
+ }
356
+ interface EthereumSecp256k1SignRpcResponse {
357
+ data: EthereumSecp256k1SignRpcResponse.Data;
358
+ method: 'secp256k1_sign';
359
+ }
360
+ namespace EthereumSecp256k1SignRpcResponse {
361
+ interface Data {
362
+ encoding: 'hex';
363
+ signature: string;
364
+ }
365
+ }
366
+ }
367
+ export type WalletAuthenticateWithJwtResponse = WalletAuthenticateWithJwtResponse.WithEncryption | WalletAuthenticateWithJwtResponse.WithoutEncryption;
368
+ export declare namespace WalletAuthenticateWithJwtResponse {
369
+ interface WithEncryption {
370
+ /**
371
+ * The encrypted authorization key data.
372
+ */
373
+ encrypted_authorization_key: WithEncryption.EncryptedAuthorizationKey;
374
+ /**
375
+ * The expiration time of the authorization key in seconds since the epoch.
376
+ */
377
+ expires_at: number;
378
+ wallets: Array<WalletsAPI.Wallet>;
379
+ }
380
+ namespace WithEncryption {
381
+ /**
382
+ * The encrypted authorization key data.
383
+ */
384
+ interface EncryptedAuthorizationKey {
385
+ /**
386
+ * The encrypted authorization key corresponding to the user's current
387
+ * authentication session.
388
+ */
389
+ ciphertext: string;
390
+ /**
391
+ * Base64-encoded ephemeral public key used in the HPKE encryption process.
392
+ * Required for decryption.
393
+ */
394
+ encapsulated_key: string;
395
+ /**
396
+ * The encryption type used. Currently only supports HPKE.
397
+ */
398
+ encryption_type: 'HPKE';
399
+ }
400
+ }
401
+ interface WithoutEncryption {
402
+ /**
403
+ * The raw authorization key data.
404
+ */
405
+ authorization_key: string;
406
+ /**
407
+ * The expiration time of the authorization key in seconds since the epoch.
408
+ */
409
+ expires_at: number;
410
+ wallets: Array<WalletsAPI.Wallet>;
411
+ }
412
+ }
413
+ export interface WalletCreateWalletsWithRecoveryResponse {
414
+ /**
415
+ * The ID of the created user.
416
+ */
417
+ recovery_user_id: string;
418
+ /**
419
+ * The wallets that were created.
420
+ */
421
+ wallets: Array<Wallet>;
422
+ }
423
+ export interface WalletCreateParams {
424
+ /**
425
+ * Body param: Chain type of the wallet
426
+ */
427
+ chain_type: 'solana' | 'ethereum' | 'cosmos' | 'stellar' | 'sui' | 'tron' | 'bitcoin-segwit' | 'near' | 'spark' | 'ton' | 'starknet';
428
+ /**
429
+ * Body param: Additional signers for the wallet.
430
+ */
431
+ additional_signers?: Array<WalletCreateParams.AdditionalSigner>;
432
+ /**
433
+ * Body param: The owner of the resource. If you provide this, do not specify an
434
+ * owner_id as it will be generated automatically. When updating a wallet, you can
435
+ * set the owner to null to remove the owner.
436
+ */
437
+ owner?: WalletCreateParams.PublicKeyOwner | WalletCreateParams.UserOwner | null;
438
+ /**
439
+ * Body param: The key quorum ID to set as the owner of the resource. If you
440
+ * provide this, do not specify an owner.
441
+ */
442
+ owner_id?: string;
443
+ /**
444
+ * Body param: List of policy IDs for policies that should be enforced on the
445
+ * wallet. Currently, only one policy is supported per wallet.
446
+ */
447
+ policy_ids?: Array<string>;
448
+ /**
449
+ * Header param: Idempotency keys ensure API requests are executed only once within
450
+ * a 24-hour window.
451
+ */
452
+ 'privy-idempotency-key'?: string;
453
+ }
454
+ export declare namespace WalletCreateParams {
455
+ interface AdditionalSigner {
456
+ override_policy_ids: Array<string>;
457
+ signer_id: string;
458
+ }
459
+ /**
460
+ * The P-256 public key of the owner of the resource. If you provide this, do not
461
+ * specify an owner_id as it will be generated automatically.
462
+ */
463
+ interface PublicKeyOwner {
464
+ public_key: string;
465
+ }
466
+ /**
467
+ * The user ID of the owner of the resource. The user must already exist, and this
468
+ * value must start with "did:privy:". If you provide this, do not specify an
469
+ * owner_id as it will be generated automatically.
470
+ */
471
+ interface UserOwner {
472
+ user_id: string;
473
+ }
474
+ }
475
+ export interface WalletListParams extends CursorParams {
476
+ chain_type?: 'cosmos' | 'stellar' | 'sui' | 'tron' | 'bitcoin-segwit' | 'near' | 'ton' | 'starknet' | 'spark' | 'solana' | 'ethereum';
477
+ user_id?: string;
478
+ }
479
+ export interface WalletExportParams {
480
+ /**
481
+ * Body param: The encryption type of the wallet to import. Currently only supports
482
+ * `HPKE`.
483
+ */
484
+ encryption_type: 'HPKE';
485
+ /**
486
+ * Body param: The base64-encoded encryption public key to encrypt the wallet
487
+ * private key with.
488
+ */
489
+ recipient_public_key: string;
490
+ /**
491
+ * Header param: Request authorization signature. If multiple signatures are
492
+ * required, they should be comma separated.
493
+ */
494
+ 'privy-authorization-signature'?: string;
495
+ }
496
+ export type WalletInitImportParams = WalletInitImportParams.HDInitInput | WalletInitImportParams.PrivateKeyInitInput;
497
+ export declare namespace WalletInitImportParams {
498
+ interface HDInitInput {
499
+ /**
500
+ * The address of the wallet to import.
501
+ */
502
+ address: string;
503
+ /**
504
+ * The chain type of the wallet to import. Currently supports `ethereum` and
505
+ * `solana`.
506
+ */
507
+ chain_type: 'ethereum' | 'solana';
508
+ /**
509
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
510
+ */
511
+ encryption_type: 'HPKE';
512
+ /**
513
+ * The entropy type of the wallet to import.
514
+ */
515
+ entropy_type: 'hd';
516
+ /**
517
+ * The index of the wallet to import.
518
+ */
519
+ index: number;
520
+ }
521
+ interface PrivateKeyInitInput {
522
+ /**
523
+ * The address of the wallet to import.
524
+ */
525
+ address: string;
526
+ /**
527
+ * The chain type of the wallet to import. Currently supports `ethereum` and
528
+ * `solana`.
529
+ */
530
+ chain_type: 'ethereum' | 'solana';
531
+ /**
532
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
533
+ */
534
+ encryption_type: 'HPKE';
535
+ entropy_type: 'private-key';
536
+ }
537
+ }
538
+ export interface WalletRawSignParams {
539
+ /**
540
+ * Body param:
541
+ */
542
+ params: WalletRawSignParams.Params;
543
+ /**
544
+ * Header param: Request authorization signature. If multiple signatures are
545
+ * required, they should be comma separated.
546
+ */
547
+ 'privy-authorization-signature'?: string;
548
+ /**
549
+ * Header param: Idempotency keys ensure API requests are executed only once within
550
+ * a 24-hour window.
551
+ */
552
+ 'privy-idempotency-key'?: string;
553
+ }
554
+ export declare namespace WalletRawSignParams {
555
+ interface Params {
556
+ /**
557
+ * The hash to sign. Must start with `0x`.
558
+ */
559
+ hash?: string;
560
+ }
561
+ }
562
+ export type WalletRpcParams = WalletRpcParams.EthereumSignTransactionRpcInput | WalletRpcParams.EthereumSendTransactionRpcInput | WalletRpcParams.EthereumPersonalSignRpcInput | WalletRpcParams.EthereumSignTypedDataRpcInput | WalletRpcParams.EthereumSign7702AuthorizationRpcInput | WalletRpcParams.EthereumSecp256k1SignRpcInput | WalletRpcParams.SolanaSignTransactionRpcInput | WalletRpcParams.SolanaSignAndSendTransactionRpcInput | WalletRpcParams.SolanaSignMessageRpcInput;
563
+ export declare namespace WalletRpcParams {
564
+ interface EthereumSignTransactionRpcInput {
565
+ /**
566
+ * Body param:
567
+ */
568
+ method: 'eth_signTransaction';
569
+ /**
570
+ * Body param:
571
+ */
572
+ params: EthereumSignTransactionRpcInput.Params;
573
+ /**
574
+ * Body param:
575
+ */
576
+ address?: string;
577
+ /**
578
+ * Body param:
579
+ */
580
+ chain_type?: 'ethereum';
581
+ /**
582
+ * Header param: Request authorization signature. If multiple signatures are
583
+ * required, they should be comma separated.
584
+ */
585
+ 'privy-authorization-signature'?: string;
586
+ /**
587
+ * Header param: Idempotency keys ensure API requests are executed only once within
588
+ * a 24-hour window.
589
+ */
590
+ 'privy-idempotency-key'?: string;
591
+ }
592
+ namespace EthereumSignTransactionRpcInput {
593
+ interface Params {
594
+ transaction: Params.Transaction;
595
+ }
596
+ namespace Params {
597
+ interface Transaction {
598
+ chain_id?: string | number;
599
+ data?: string;
600
+ from?: string;
601
+ gas_limit?: string | number;
602
+ gas_price?: string | number;
603
+ max_fee_per_gas?: string | number;
604
+ max_priority_fee_per_gas?: string | number;
605
+ nonce?: string | number;
606
+ to?: string;
607
+ type?: 0 | 1 | 2;
608
+ value?: string | number;
609
+ }
610
+ }
611
+ }
612
+ interface EthereumSendTransactionRpcInput {
613
+ /**
614
+ * Body param:
615
+ */
616
+ caip2: string;
617
+ /**
618
+ * Body param:
619
+ */
620
+ method: 'eth_sendTransaction';
621
+ /**
622
+ * Body param:
623
+ */
624
+ params: EthereumSendTransactionRpcInput.Params;
625
+ /**
626
+ * Body param:
627
+ */
628
+ address?: string;
629
+ /**
630
+ * Body param:
631
+ */
632
+ chain_type?: 'ethereum';
633
+ /**
634
+ * Body param:
635
+ */
636
+ sponsor?: boolean;
637
+ /**
638
+ * Header param: Request authorization signature. If multiple signatures are
639
+ * required, they should be comma separated.
640
+ */
641
+ 'privy-authorization-signature'?: string;
642
+ /**
643
+ * Header param: Idempotency keys ensure API requests are executed only once within
644
+ * a 24-hour window.
645
+ */
646
+ 'privy-idempotency-key'?: string;
647
+ }
648
+ namespace EthereumSendTransactionRpcInput {
649
+ interface Params {
650
+ transaction: Params.Transaction;
651
+ }
652
+ namespace Params {
653
+ interface Transaction {
654
+ chain_id?: string | number;
655
+ data?: string;
656
+ from?: string;
657
+ gas_limit?: string | number;
658
+ gas_price?: string | number;
659
+ max_fee_per_gas?: string | number;
660
+ max_priority_fee_per_gas?: string | number;
661
+ nonce?: string | number;
662
+ to?: string;
663
+ type?: 0 | 1 | 2;
664
+ value?: string | number;
665
+ }
666
+ }
667
+ }
668
+ interface EthereumPersonalSignRpcInput {
669
+ /**
670
+ * Body param:
671
+ */
672
+ method: 'personal_sign';
673
+ /**
674
+ * Body param:
675
+ */
676
+ params: EthereumPersonalSignRpcInput.Params;
677
+ /**
678
+ * Body param:
679
+ */
680
+ address?: string;
681
+ /**
682
+ * Body param:
683
+ */
684
+ chain_type?: 'ethereum';
685
+ /**
686
+ * Header param: Request authorization signature. If multiple signatures are
687
+ * required, they should be comma separated.
688
+ */
689
+ 'privy-authorization-signature'?: string;
690
+ /**
691
+ * Header param: Idempotency keys ensure API requests are executed only once within
692
+ * a 24-hour window.
693
+ */
694
+ 'privy-idempotency-key'?: string;
695
+ }
696
+ namespace EthereumPersonalSignRpcInput {
697
+ interface Params {
698
+ encoding: 'utf-8' | 'hex';
699
+ message: string;
700
+ }
701
+ }
702
+ interface EthereumSignTypedDataRpcInput {
703
+ /**
704
+ * Body param:
705
+ */
706
+ method: 'eth_signTypedData_v4';
707
+ /**
708
+ * Body param:
709
+ */
710
+ params: EthereumSignTypedDataRpcInput.Params;
711
+ /**
712
+ * Body param:
713
+ */
714
+ address?: string;
715
+ /**
716
+ * Body param:
717
+ */
718
+ chain_type?: 'ethereum';
719
+ /**
720
+ * Header param: Request authorization signature. If multiple signatures are
721
+ * required, they should be comma separated.
722
+ */
723
+ 'privy-authorization-signature'?: string;
724
+ /**
725
+ * Header param: Idempotency keys ensure API requests are executed only once within
726
+ * a 24-hour window.
727
+ */
728
+ 'privy-idempotency-key'?: string;
729
+ }
730
+ namespace EthereumSignTypedDataRpcInput {
731
+ interface Params {
732
+ typed_data: Params.TypedData;
733
+ }
734
+ namespace Params {
735
+ interface TypedData {
736
+ domain: {
737
+ [key: string]: unknown;
738
+ };
739
+ message: {
740
+ [key: string]: unknown;
741
+ };
742
+ primary_type: string;
743
+ types: {
744
+ [key: string]: Array<TypedData.Type>;
745
+ };
746
+ }
747
+ namespace TypedData {
748
+ interface Type {
749
+ name: string;
750
+ type: string;
751
+ }
752
+ }
753
+ }
754
+ }
755
+ interface EthereumSign7702AuthorizationRpcInput {
756
+ /**
757
+ * Body param:
758
+ */
759
+ method: 'eth_sign7702Authorization';
760
+ /**
761
+ * Body param:
762
+ */
763
+ params: EthereumSign7702AuthorizationRpcInput.Params;
764
+ /**
765
+ * Body param:
766
+ */
767
+ address?: string;
768
+ /**
769
+ * Body param:
770
+ */
771
+ chain_type?: 'ethereum';
772
+ /**
773
+ * Header param: Request authorization signature. If multiple signatures are
774
+ * required, they should be comma separated.
775
+ */
776
+ 'privy-authorization-signature'?: string;
777
+ /**
778
+ * Header param: Idempotency keys ensure API requests are executed only once within
779
+ * a 24-hour window.
780
+ */
781
+ 'privy-idempotency-key'?: string;
782
+ }
783
+ namespace EthereumSign7702AuthorizationRpcInput {
784
+ interface Params {
785
+ chain_id: string | number;
786
+ contract: string;
787
+ nonce?: string | number;
788
+ }
789
+ }
790
+ interface EthereumSecp256k1SignRpcInput {
791
+ /**
792
+ * Body param:
793
+ */
794
+ method: 'secp256k1_sign';
795
+ /**
796
+ * Body param:
797
+ */
798
+ params: EthereumSecp256k1SignRpcInput.Params;
799
+ /**
800
+ * Body param:
801
+ */
802
+ address?: string;
803
+ /**
804
+ * Body param:
805
+ */
806
+ chain_type?: 'ethereum';
807
+ /**
808
+ * Header param: Request authorization signature. If multiple signatures are
809
+ * required, they should be comma separated.
810
+ */
811
+ 'privy-authorization-signature'?: string;
812
+ /**
813
+ * Header param: Idempotency keys ensure API requests are executed only once within
814
+ * a 24-hour window.
815
+ */
816
+ 'privy-idempotency-key'?: string;
817
+ }
818
+ namespace EthereumSecp256k1SignRpcInput {
819
+ interface Params {
820
+ hash: string;
821
+ }
822
+ }
823
+ interface SolanaSignTransactionRpcInput {
824
+ /**
825
+ * Body param:
826
+ */
827
+ method: 'signTransaction';
828
+ /**
829
+ * Body param:
830
+ */
831
+ params: SolanaSignTransactionRpcInput.Params;
832
+ /**
833
+ * Body param:
834
+ */
835
+ address?: string;
836
+ /**
837
+ * Body param:
838
+ */
839
+ chain_type?: 'solana';
840
+ /**
841
+ * Header param: Request authorization signature. If multiple signatures are
842
+ * required, they should be comma separated.
843
+ */
844
+ 'privy-authorization-signature'?: string;
845
+ /**
846
+ * Header param: Idempotency keys ensure API requests are executed only once within
847
+ * a 24-hour window.
848
+ */
849
+ 'privy-idempotency-key'?: string;
850
+ }
851
+ namespace SolanaSignTransactionRpcInput {
852
+ interface Params {
853
+ encoding: 'base64';
854
+ transaction: string;
855
+ }
856
+ }
857
+ interface SolanaSignAndSendTransactionRpcInput {
858
+ /**
859
+ * Body param:
860
+ */
861
+ caip2: string;
862
+ /**
863
+ * Body param:
864
+ */
865
+ method: 'signAndSendTransaction';
866
+ /**
867
+ * Body param:
868
+ */
869
+ params: SolanaSignAndSendTransactionRpcInput.Params;
870
+ /**
871
+ * Body param:
872
+ */
873
+ address?: string;
874
+ /**
875
+ * Body param:
876
+ */
877
+ chain_type?: 'solana';
878
+ /**
879
+ * Body param:
880
+ */
881
+ sponsor?: boolean;
882
+ /**
883
+ * Header param: Request authorization signature. If multiple signatures are
884
+ * required, they should be comma separated.
885
+ */
886
+ 'privy-authorization-signature'?: string;
887
+ /**
888
+ * Header param: Idempotency keys ensure API requests are executed only once within
889
+ * a 24-hour window.
890
+ */
891
+ 'privy-idempotency-key'?: string;
892
+ }
893
+ namespace SolanaSignAndSendTransactionRpcInput {
894
+ interface Params {
895
+ encoding: 'base64';
896
+ transaction: string;
897
+ }
898
+ }
899
+ interface SolanaSignMessageRpcInput {
900
+ /**
901
+ * Body param:
902
+ */
903
+ method: 'signMessage';
904
+ /**
905
+ * Body param:
906
+ */
907
+ params: SolanaSignMessageRpcInput.Params;
908
+ /**
909
+ * Body param:
910
+ */
911
+ address?: string;
912
+ /**
913
+ * Body param:
914
+ */
915
+ chain_type?: 'solana';
916
+ /**
917
+ * Header param: Request authorization signature. If multiple signatures are
918
+ * required, they should be comma separated.
919
+ */
920
+ 'privy-authorization-signature'?: string;
921
+ /**
922
+ * Header param: Idempotency keys ensure API requests are executed only once within
923
+ * a 24-hour window.
924
+ */
925
+ 'privy-idempotency-key'?: string;
926
+ }
927
+ namespace SolanaSignMessageRpcInput {
928
+ interface Params {
929
+ encoding: 'base64';
930
+ message: string;
931
+ }
932
+ }
933
+ }
934
+ export interface WalletSubmitImportParams {
935
+ wallet: WalletSubmitImportParams.HDSubmitInput | WalletSubmitImportParams.PrivateKeySubmitInput;
936
+ additional_signers?: Array<WalletSubmitImportParams.AdditionalSigner>;
937
+ owner?: WalletSubmitImportParams.UserID | WalletSubmitImportParams.PublicKey | null;
938
+ owner_id?: string | null;
939
+ policy_ids?: Array<string>;
940
+ }
941
+ export declare namespace WalletSubmitImportParams {
942
+ interface HDSubmitInput {
943
+ /**
944
+ * The address of the wallet to import.
945
+ */
946
+ address: string;
947
+ /**
948
+ * The chain type of the wallet to import. Currently supports `ethereum` and
949
+ * `solana`.
950
+ */
951
+ chain_type: 'ethereum' | 'solana';
952
+ /**
953
+ * The encrypted entropy of the wallet to import.
954
+ */
955
+ ciphertext: string;
956
+ /**
957
+ * The base64-encoded encapsulated key that was generated during encryption, for
958
+ * use during decryption inside the TEE.
959
+ */
960
+ encapsulated_key: string;
961
+ /**
962
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
963
+ */
964
+ encryption_type: 'HPKE';
965
+ /**
966
+ * The entropy type of the wallet to import.
967
+ */
968
+ entropy_type: 'hd';
969
+ /**
970
+ * The index of the wallet to import.
971
+ */
972
+ index: number;
973
+ }
974
+ interface PrivateKeySubmitInput {
975
+ /**
976
+ * The address of the wallet to import.
977
+ */
978
+ address: string;
979
+ /**
980
+ * The chain type of the wallet to import. Currently supports `ethereum` and
981
+ * `solana`.
982
+ */
983
+ chain_type: 'ethereum' | 'solana';
984
+ /**
985
+ * The encrypted entropy of the wallet to import.
986
+ */
987
+ ciphertext: string;
988
+ /**
989
+ * The base64-encoded encapsulated key that was generated during encryption, for
990
+ * use during decryption inside the TEE.
991
+ */
992
+ encapsulated_key: string;
993
+ /**
994
+ * The encryption type of the wallet to import. Currently only supports `HPKE`.
995
+ */
996
+ encryption_type: 'HPKE';
997
+ entropy_type: 'private-key';
998
+ }
999
+ interface AdditionalSigner {
1000
+ signer_id: string;
1001
+ override_policy_ids?: Array<string>;
1002
+ }
1003
+ interface UserID {
1004
+ user_id: string;
1005
+ }
1006
+ interface PublicKey {
1007
+ public_key: string;
1008
+ }
1009
+ }
1010
+ export interface WalletUpdateParams {
1011
+ /**
1012
+ * Body param: Additional signers for the wallet.
1013
+ */
1014
+ additional_signers?: Array<WalletUpdateParams.AdditionalSigner>;
1015
+ /**
1016
+ * Body param: The owner of the resource. If you provide this, do not specify an
1017
+ * owner_id as it will be generated automatically. When updating a wallet, you can
1018
+ * set the owner to null to remove the owner.
1019
+ */
1020
+ owner?: WalletUpdateParams.PublicKeyOwner | WalletUpdateParams.UserOwner | null;
1021
+ /**
1022
+ * Body param: The key quorum ID to set as the owner of the resource. If you
1023
+ * provide this, do not specify an owner.
1024
+ */
1025
+ owner_id?: string | null;
1026
+ /**
1027
+ * Body param: New policy IDs to enforce on the wallet. Currently, only one policy
1028
+ * is supported per wallet.
1029
+ */
1030
+ policy_ids?: Array<string>;
1031
+ /**
1032
+ * Header param: Request authorization signature. If multiple signatures are
1033
+ * required, they should be comma separated.
1034
+ */
1035
+ 'privy-authorization-signature'?: string;
1036
+ }
1037
+ export declare namespace WalletUpdateParams {
1038
+ interface AdditionalSigner {
1039
+ override_policy_ids: Array<string>;
1040
+ signer_id: string;
1041
+ }
1042
+ /**
1043
+ * The P-256 public key of the owner of the resource. If you provide this, do not
1044
+ * specify an owner_id as it will be generated automatically.
1045
+ */
1046
+ interface PublicKeyOwner {
1047
+ public_key: string;
1048
+ }
1049
+ /**
1050
+ * The user ID of the owner of the resource. The user must already exist, and this
1051
+ * value must start with "did:privy:". If you provide this, do not specify an
1052
+ * owner_id as it will be generated automatically.
1053
+ */
1054
+ interface UserOwner {
1055
+ user_id: string;
1056
+ }
1057
+ }
1058
+ export interface WalletAuthenticateWithJwtParams {
1059
+ /**
1060
+ * The user's JWT, to be used to authenticate the user.
1061
+ */
1062
+ user_jwt: string;
1063
+ /**
1064
+ * The encryption type for the authentication response. Currently only supports
1065
+ * HPKE.
1066
+ */
1067
+ encryption_type?: 'HPKE';
1068
+ /**
1069
+ * The public key of your ECDH keypair, in base64-encoded, SPKI-format, whose
1070
+ * private key will be able to decrypt the session key.
1071
+ */
1072
+ recipient_public_key?: string;
1073
+ }
1074
+ export interface WalletCreateWalletsWithRecoveryParams {
1075
+ primary_signer: WalletCreateWalletsWithRecoveryParams.PrimarySigner;
1076
+ recovery_user: WalletCreateWalletsWithRecoveryParams.RecoveryUser;
1077
+ wallets: Array<WalletCreateWalletsWithRecoveryParams.Wallet>;
1078
+ }
1079
+ export declare namespace WalletCreateWalletsWithRecoveryParams {
1080
+ interface PrimarySigner {
1081
+ /**
1082
+ * The JWT subject ID of the user.
1083
+ */
1084
+ subject_id: string;
1085
+ }
1086
+ interface RecoveryUser {
1087
+ linked_accounts: Array<RecoveryUser.UnionMember0 | RecoveryUser.UnionMember1>;
1088
+ }
1089
+ namespace RecoveryUser {
1090
+ interface UnionMember0 {
1091
+ /**
1092
+ * The email address of the user.
1093
+ */
1094
+ address: string;
1095
+ type: 'email';
1096
+ }
1097
+ interface UnionMember1 {
1098
+ /**
1099
+ * The JWT subject ID of the user.
1100
+ */
1101
+ custom_user_id: string;
1102
+ type: 'custom_auth';
1103
+ }
1104
+ }
1105
+ interface Wallet {
1106
+ /**
1107
+ * Chain type of the wallet
1108
+ */
1109
+ chain_type: 'solana' | 'ethereum' | 'cosmos' | 'stellar' | 'sui' | 'tron' | 'bitcoin-segwit' | 'near' | 'spark' | 'ton' | 'starknet';
1110
+ /**
1111
+ * List of policy IDs for policies that should be enforced on the wallet.
1112
+ * Currently, only one policy is supported per wallet.
1113
+ */
1114
+ policy_ids?: Array<string>;
1115
+ }
1116
+ }
1117
+ export declare namespace Wallets {
1118
+ export { type Wallet as Wallet, type WalletExportResponse as WalletExportResponse, type WalletInitImportResponse as WalletInitImportResponse, type WalletRawSignResponse as WalletRawSignResponse, type WalletRpcResponse as WalletRpcResponse, type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse, type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse, type WalletsCursor as WalletsCursor, type WalletCreateParams as WalletCreateParams, type WalletListParams as WalletListParams, type WalletExportParams as WalletExportParams, type WalletInitImportParams as WalletInitImportParams, type WalletRawSignParams as WalletRawSignParams, type WalletRpcParams as WalletRpcParams, type WalletSubmitImportParams as WalletSubmitImportParams, type WalletUpdateParams as WalletUpdateParams, type WalletAuthenticateWithJwtParams as WalletAuthenticateWithJwtParams, type WalletCreateWalletsWithRecoveryParams as WalletCreateWalletsWithRecoveryParams, };
1119
+ export { Transactions as Transactions, type TransactionGetResponse as TransactionGetResponse, type TransactionGetParams as TransactionGetParams, };
1120
+ export { Balance as Balance, type BalanceGetResponse as BalanceGetResponse, type BalanceGetParams as BalanceGetParams, };
1121
+ }
1122
+ //# sourceMappingURL=wallets.d.mts.map