@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,270 @@
1
+ import { PrivyAPI } from '../../client';
2
+ import { PrivyAPIError } from '../../core/error';
3
+ import { generateAuthorizationSignatures } from '../../lib/authorization';
4
+ import { setupHPKERecipient, setupHPKESender } from '../../lib/cryptography';
5
+ import { entropyToBytes } from '../../lib/wallet-entropy';
6
+ import {
7
+ Wallet,
8
+ WalletExportParams,
9
+ WalletRawSignParams,
10
+ WalletRawSignResponse,
11
+ WalletRpcParams,
12
+ WalletRpcResponse,
13
+ Wallets,
14
+ WalletSubmitImportParams,
15
+ WalletUpdateParams,
16
+ } from '../../resources';
17
+ import { PrivyClient } from '../PrivyClient';
18
+ import { PrivyEthereumService } from './ethereum';
19
+ import { PrivySolanaService } from './solana';
20
+ import { Prettify, WithAuthorization, WithIdempotency } from './types';
21
+
22
+ export class PrivyWalletsService extends Wallets {
23
+ private ethereumService: PrivyEthereumService;
24
+ private solanaService: PrivySolanaService;
25
+ private privyClient: PrivyClient;
26
+
27
+ constructor(privyApiClient: PrivyAPI, privyClient: PrivyClient) {
28
+ super(privyApiClient);
29
+ this.privyClient = privyClient;
30
+ this.ethereumService = new PrivyEthereumService(this);
31
+ this.solanaService = new PrivySolanaService(this);
32
+ }
33
+
34
+ public ethereum(): PrivyEthereumService {
35
+ return this.ethereumService;
36
+ }
37
+
38
+ public solana(): PrivySolanaService {
39
+ return this.solanaService;
40
+ }
41
+
42
+ public async rpc<Params extends PrivyWalletsService.RpcInput>(
43
+ walletId: string,
44
+ params: Params,
45
+ ): Promise<Extract<WalletRpcResponse, { method: Params['method'] }>>;
46
+ public async rpc(
47
+ walletId: string,
48
+ {
49
+ authorization_context: authorizationContext = {},
50
+ idempotency_key: idempotencyKey,
51
+ ...params
52
+ }: PrivyWalletsService.RpcInput,
53
+ ): Promise<WalletRpcResponse> {
54
+ const authorizationSignaturesHeader = await generateAuthorizationSignatures(this.privyClient, {
55
+ authorizationContext,
56
+ input: {
57
+ version: 1,
58
+ method: 'POST',
59
+ url: `${this._client.baseURL}/v1/wallets/${walletId}/rpc`,
60
+ body: params,
61
+ headers: {
62
+ 'privy-app-id': this._client.appID,
63
+ ...(idempotencyKey && { 'privy-idempotency-key': idempotencyKey }),
64
+ },
65
+ },
66
+ });
67
+
68
+ return await this._rpc(walletId, {
69
+ ...params,
70
+ 'privy-authorization-signature': authorizationSignaturesHeader.join(','),
71
+ ...(idempotencyKey && { 'privy-idempotency-key': idempotencyKey }),
72
+ });
73
+ }
74
+
75
+ public async rawSign(
76
+ walletId: string,
77
+ {
78
+ authorization_context: authorizationContext = {},
79
+ idempotency_key: idempotencyKey,
80
+ ...params
81
+ }: PrivyWalletsService.RawSignInput,
82
+ ): Promise<WalletRawSignResponse.Data> {
83
+ const authorizationSignaturesHeader = await generateAuthorizationSignatures(this.privyClient, {
84
+ authorizationContext,
85
+ input: {
86
+ version: 1,
87
+ method: 'POST',
88
+ url: `${this._client.baseURL}/v1/wallets/${walletId}/raw_sign`,
89
+ body: params,
90
+ headers: {
91
+ 'privy-app-id': this._client.appID,
92
+ ...(idempotencyKey && { 'privy-idempotency-key': idempotencyKey }),
93
+ },
94
+ },
95
+ });
96
+
97
+ const response = await this._rawSign(walletId, {
98
+ ...params,
99
+ 'privy-authorization-signature': authorizationSignaturesHeader.join(','),
100
+ ...(idempotencyKey && { 'privy-idempotency-key': idempotencyKey }),
101
+ });
102
+
103
+ return response.data;
104
+ }
105
+
106
+ public async update(
107
+ walletId: string,
108
+ { authorization_context: authorizationContext = {}, ...params }: PrivyWalletsService.UpdateInput,
109
+ ): Promise<Wallet> {
110
+ const authorizationSignaturesHeader = await generateAuthorizationSignatures(this.privyClient, {
111
+ authorizationContext,
112
+ input: {
113
+ version: 1,
114
+ method: 'PATCH',
115
+ url: `${this._client.baseURL}/v1/wallets/${walletId}`,
116
+ body: params,
117
+ headers: {
118
+ 'privy-app-id': this._client.appID,
119
+ },
120
+ },
121
+ });
122
+
123
+ const response = await this._update(walletId, {
124
+ ...params,
125
+ 'privy-authorization-signature': authorizationSignaturesHeader.join(','),
126
+ });
127
+
128
+ return response;
129
+ }
130
+
131
+ public async export(
132
+ walletId: string,
133
+ { authorization_context: authorizationContext = {}, ...outerParams }: PrivyWalletsService.ExportInput,
134
+ ): Promise<PrivyWalletsService.ExportResponse> {
135
+ const { publicKeySpki, decryptPayload } = await setupHPKERecipient();
136
+
137
+ const params: WalletExportParams = {
138
+ ...outerParams,
139
+ encryption_type: 'HPKE',
140
+ // We fall back to `Buffer` here as Uint8Array.toBase64 is not widely supported yet
141
+ recipient_public_key: Buffer.from(publicKeySpki).toString('base64'),
142
+ };
143
+
144
+ const authorizationSignaturesHeader = await generateAuthorizationSignatures(this.privyClient, {
145
+ authorizationContext,
146
+ input: {
147
+ version: 1,
148
+ method: 'POST',
149
+ url: `${this._client.baseURL}/v1/wallets/${walletId}/export`,
150
+ body: params,
151
+ headers: {
152
+ 'privy-app-id': this._client.appID,
153
+ },
154
+ },
155
+ });
156
+
157
+ const response = await this._export(walletId, {
158
+ ...params,
159
+ 'privy-authorization-signature': authorizationSignaturesHeader.join(','),
160
+ });
161
+ const decryptedPrivateKey = await decryptPayload(
162
+ // We fall back to `Buffer` here as Uint8Array.fromBase64 is not widely supported yet
163
+ Buffer.from(response.encapsulated_key, 'base64'),
164
+ Buffer.from(response.ciphertext, 'base64'),
165
+ );
166
+ const privateKey = new TextDecoder().decode(decryptedPrivateKey);
167
+
168
+ return { private_key: privateKey };
169
+ }
170
+
171
+ public async import({
172
+ wallet: { private_key, ...wallet },
173
+ ...params
174
+ }: PrivyWalletsService.ImportInput): Promise<Wallet> {
175
+ const hpkeSender = await setupHPKESender();
176
+
177
+ const privateKeyBytes = entropyToBytes({
178
+ entropy: private_key,
179
+ entropyType: wallet.entropy_type,
180
+ chainType: wallet.chain_type,
181
+ });
182
+
183
+ const initResponse = await this._initImport({
184
+ ...wallet,
185
+ encryption_type: 'HPKE',
186
+ });
187
+
188
+ if (initResponse.encryption_type !== 'HPKE') {
189
+ throw new PrivyAPIError(`Invalid encryption type: ${initResponse.encryption_type}`);
190
+ }
191
+
192
+ // We fall back to `Buffer` here as Uint8Array.fromBase64 is not widely supported yet
193
+ const encryptionPublicKey = Buffer.from(initResponse.encryption_public_key, 'base64');
194
+
195
+ const { encapsulatedKey, ciphertext } = await hpkeSender.encryptPayload(
196
+ encryptionPublicKey,
197
+ privateKeyBytes,
198
+ );
199
+
200
+ const submitResponse = await this._submitImport({
201
+ ...params,
202
+ wallet: {
203
+ ...wallet,
204
+ encryption_type: 'HPKE',
205
+ // We fall back to `Buffer` here as Uint8Array.toBase64 is not widely supported yet
206
+ encapsulated_key: Buffer.from(encapsulatedKey).toString('base64'),
207
+ ciphertext: Buffer.from(ciphertext).toString('base64'),
208
+ },
209
+ });
210
+
211
+ return submitResponse;
212
+ }
213
+ }
214
+
215
+ // prettier-ignore
216
+ /**
217
+ * The namespace for types related to the Wallets service class.
218
+ * @see {@link PrivyWalletsService} class.
219
+ */
220
+ export namespace PrivyWalletsService {
221
+ /** The input type for the {@link PrivyWalletsService.rpc} method. */
222
+ export type RpcInput = Prettify<WithIdempotency<WithAuthorization<WalletRpcParams>>>;
223
+ /** The input type for the {@link PrivyWalletsService.rawSign} method. */
224
+ export type RawSignInput = Prettify<WithIdempotency<WithAuthorization<WalletRawSignParams>>>;
225
+ /** The input type for the {@link PrivyWalletsService.update} method. */
226
+ export type UpdateInput = Prettify<WithAuthorization<WalletUpdateParams>>;
227
+ /** The input type for the {@link PrivyWalletsService.export} method. */
228
+ export type ExportInput = Prettify<WithAuthorization<Omit<WalletExportParams, 'encryption_type' | 'recipient_public_key'>>>;
229
+ /** The response type for the {@link PrivyWalletsService.export} method. */
230
+ export type ExportResponse = { private_key: string };
231
+ export type ImportInputWallet = Prettify<
232
+ (
233
+ | Omit<WalletSubmitImportParams.HDSubmitInput, 'encapsulated_key' | 'ciphertext' | 'encryption_type'>
234
+ | Omit<WalletSubmitImportParams.PrivateKeySubmitInput, 'encapsulated_key' | 'ciphertext' | 'encryption_type'>
235
+ ) & { private_key: Uint8Array | string }
236
+ >;
237
+ /** The input type for the {@link PrivyWalletsService.import} method. */
238
+ export type ImportInput = Prettify<
239
+ Omit<WalletSubmitImportParams, 'wallet'> & {wallet: ImportInputWallet; }
240
+ >;
241
+ }
242
+
243
+ // prettier-ignore
244
+ /**
245
+ * Helper type for the input to the RPC utility methods, such as `ethereum().signMessage()`.
246
+ * It modifies the raw input to the RPC method ({@link WalletRpcParams}) to:
247
+ * - Include the idempotency key string in place of the idempotency HTTP header via {@link WithIdempotency}
248
+ * - Include the authorization context over the authorization signature HTTP header via {@link WithAuthorization}
249
+ *
250
+ * Finally, it omits the `chain_type` and `method` properties from the input, as these will be
251
+ * internally set by the RPC utility method used.
252
+ * e.g. `ethereum().signMessage()` will set `chain_type=ethereum` and `method=personal_sign`.
253
+ */
254
+ export type PrivyWalletsRpcInput<Params extends WalletRpcParams> =
255
+ Prettify<WithIdempotency<WithAuthorization<Omit<Params, 'chain_type'|'method'>>>>;
256
+
257
+ // prettier-ignore
258
+ /**
259
+ * Helper type that takes a parameters object and an extension object and returns a new parameters
260
+ * object with the extension object merged in, and the `params` property omitted.
261
+ *
262
+ * This is used to turn Params objects that accept the raw `params` object into ones that accept a
263
+ * more ergonomic extension object instead that can be used internally by Privy's service methods to
264
+ * turn into the right value for `params`.
265
+ *
266
+ * e.g. `ethereum().signMessage()` will accept a `message` string or `Uint8Array` that is
267
+ * automatically converted to the right `{ message: '...', encoding: '...' }` object.
268
+ */
269
+ export type ReplaceParams<Params, Extension> =
270
+ Prettify<Omit<Params, 'params'> & Extension>;
@@ -0,0 +1,2 @@
1
+ /** @deprecated Import from ./core/resource instead */
2
+ export * from './core/resource';
@@ -0,0 +1,71 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ KeyQuorums,
5
+ type KeyQuorum,
6
+ type KeyQuorumDeleteResponse,
7
+ type KeyQuorumCreateParams,
8
+ type KeyQuorumDeleteParams,
9
+ type KeyQuorumUpdateParams,
10
+ } from './key-quorums';
11
+ export {
12
+ Policies,
13
+ type Policy,
14
+ type PolicyCreateRuleResponse,
15
+ type PolicyDeleteResponse,
16
+ type PolicyDeleteRuleResponse,
17
+ type PolicyUpdateRuleResponse,
18
+ type PolicyGetRuleResponse,
19
+ type PolicyCreateParams,
20
+ type PolicyCreateRuleParams,
21
+ type PolicyDeleteParams,
22
+ type PolicyDeleteRuleParams,
23
+ type PolicyUpdateParams,
24
+ type PolicyUpdateRuleParams,
25
+ type PolicyGetRuleParams,
26
+ } from './policies';
27
+ export { Transactions, type TransactionGetResponse } from './transactions';
28
+ export {
29
+ Users,
30
+ type User,
31
+ type UserCreateParams,
32
+ type UserListParams,
33
+ type UserCreateCustomMetadataParams,
34
+ type UserGetByCustomAuthIDParams,
35
+ type UserGetByDiscordUsernameParams,
36
+ type UserGetByEmailAddressParams,
37
+ type UserGetByFarcasterIDParams,
38
+ type UserGetByGitHubUsernameParams,
39
+ type UserGetByPhoneNumberParams,
40
+ type UserGetBySmartWalletAddressParams,
41
+ type UserGetByTelegramUserIDParams,
42
+ type UserGetByTelegramUsernameParams,
43
+ type UserGetByTwitterSubjectParams,
44
+ type UserGetByTwitterUsernameParams,
45
+ type UserGetByWalletAddressParams,
46
+ type UserPregenerateWalletsParams,
47
+ type UserSearchParams,
48
+ type UserUnlinkLinkedAccountParams,
49
+ type UsersCursor,
50
+ } from './users';
51
+ export {
52
+ Wallets,
53
+ type Wallet,
54
+ type WalletExportResponse,
55
+ type WalletInitImportResponse,
56
+ type WalletRawSignResponse,
57
+ type WalletRpcResponse,
58
+ type WalletAuthenticateWithJwtResponse,
59
+ type WalletCreateWalletsWithRecoveryResponse,
60
+ type WalletCreateParams,
61
+ type WalletListParams,
62
+ type WalletExportParams,
63
+ type WalletInitImportParams,
64
+ type WalletRawSignParams,
65
+ type WalletRpcParams,
66
+ type WalletSubmitImportParams,
67
+ type WalletUpdateParams,
68
+ type WalletAuthenticateWithJwtParams,
69
+ type WalletCreateWalletsWithRecoveryParams,
70
+ type WalletsCursor,
71
+ } from './wallets/wallets';
@@ -0,0 +1,177 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { buildHeaders } from '../internal/headers';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class KeyQuorums extends APIResource {
10
+ /**
11
+ * Create a new key quorum.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const keyQuorum = await client.keyQuorums.create();
16
+ * ```
17
+ */
18
+ create(body: KeyQuorumCreateParams, options?: RequestOptions): APIPromise<KeyQuorum> {
19
+ return this._client.post('/v1/key_quorums', { body, ...options });
20
+ }
21
+
22
+ /**
23
+ * Delete a key quorum by key quorum ID.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const response = await client.keyQuorums._delete(
28
+ * 'key_quorum_id',
29
+ * );
30
+ * ```
31
+ */
32
+ _delete(
33
+ keyQuorumID: string,
34
+ params: KeyQuorumDeleteParams | null | undefined = {},
35
+ options?: RequestOptions,
36
+ ): APIPromise<KeyQuorumDeleteResponse> {
37
+ const { 'privy-authorization-signature': privyAuthorizationSignature } = params ?? {};
38
+ return this._client.delete(path`/v1/key_quorums/${keyQuorumID}`, {
39
+ ...options,
40
+ headers: buildHeaders([
41
+ {
42
+ ...(privyAuthorizationSignature != null ?
43
+ { 'privy-authorization-signature': privyAuthorizationSignature }
44
+ : undefined),
45
+ },
46
+ options?.headers,
47
+ ]),
48
+ });
49
+ }
50
+
51
+ /**
52
+ * Update a key quorum by key quorum ID.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const keyQuorum = await client.keyQuorums._update(
57
+ * 'key_quorum_id',
58
+ * );
59
+ * ```
60
+ */
61
+ _update(
62
+ keyQuorumID: string,
63
+ params: KeyQuorumUpdateParams,
64
+ options?: RequestOptions,
65
+ ): APIPromise<KeyQuorum> {
66
+ const { 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
67
+ return this._client.patch(path`/v1/key_quorums/${keyQuorumID}`, {
68
+ body,
69
+ ...options,
70
+ headers: buildHeaders([
71
+ {
72
+ ...(privyAuthorizationSignature != null ?
73
+ { 'privy-authorization-signature': privyAuthorizationSignature }
74
+ : undefined),
75
+ },
76
+ options?.headers,
77
+ ]),
78
+ });
79
+ }
80
+
81
+ /**
82
+ * Get a key quorum by ID.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const keyQuorum = await client.keyQuorums.get(
87
+ * 'key_quorum_id',
88
+ * );
89
+ * ```
90
+ */
91
+ get(keyQuorumID: string, options?: RequestOptions): APIPromise<KeyQuorum> {
92
+ return this._client.get(path`/v1/key_quorums/${keyQuorumID}`, options);
93
+ }
94
+ }
95
+
96
+ export interface KeyQuorum {
97
+ id: string;
98
+
99
+ authorization_keys: Array<KeyQuorum.AuthorizationKey>;
100
+
101
+ authorization_threshold?: number;
102
+
103
+ display_name?: string;
104
+
105
+ user_ids?: Array<string>;
106
+ }
107
+
108
+ export namespace KeyQuorum {
109
+ export interface AuthorizationKey {
110
+ display_name: string | null;
111
+
112
+ public_key: string;
113
+ }
114
+ }
115
+
116
+ export interface KeyQuorumDeleteResponse {
117
+ /**
118
+ * Whether the key quorum was deleted successfully.
119
+ */
120
+ success: boolean;
121
+ }
122
+
123
+ export interface KeyQuorumCreateParams {
124
+ authorization_threshold?: number;
125
+
126
+ display_name?: string;
127
+
128
+ public_keys?: Array<string>;
129
+
130
+ user_ids?: Array<string>;
131
+ }
132
+
133
+ export interface KeyQuorumDeleteParams {
134
+ /**
135
+ * Request authorization signature. If multiple signatures are required, they
136
+ * should be comma separated.
137
+ */
138
+ 'privy-authorization-signature'?: string;
139
+ }
140
+
141
+ export interface KeyQuorumUpdateParams {
142
+ /**
143
+ * Body param:
144
+ */
145
+ authorization_threshold?: number;
146
+
147
+ /**
148
+ * Body param:
149
+ */
150
+ display_name?: string;
151
+
152
+ /**
153
+ * Body param:
154
+ */
155
+ public_keys?: Array<string>;
156
+
157
+ /**
158
+ * Body param:
159
+ */
160
+ user_ids?: Array<string>;
161
+
162
+ /**
163
+ * Header param: Request authorization signature. If multiple signatures are
164
+ * required, they should be comma separated.
165
+ */
166
+ 'privy-authorization-signature'?: string;
167
+ }
168
+
169
+ export declare namespace KeyQuorums {
170
+ export {
171
+ type KeyQuorum as KeyQuorum,
172
+ type KeyQuorumDeleteResponse as KeyQuorumDeleteResponse,
173
+ type KeyQuorumCreateParams as KeyQuorumCreateParams,
174
+ type KeyQuorumDeleteParams as KeyQuorumDeleteParams,
175
+ type KeyQuorumUpdateParams as KeyQuorumUpdateParams,
176
+ };
177
+ }