@privy-io/api-types 0.1.1

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