@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,1992 @@
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 Policies extends APIResource {
10
+ /**
11
+ * Create a new policy.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const policy = await client.policies.create({
16
+ * chain_type: 'ethereum',
17
+ * name: 'name',
18
+ * rules: [
19
+ * {
20
+ * action: 'ALLOW',
21
+ * conditions: [
22
+ * {
23
+ * field: 'to',
24
+ * field_source: 'ethereum_transaction',
25
+ * operator: 'eq',
26
+ * value: 'string',
27
+ * },
28
+ * ],
29
+ * method: 'eth_sendTransaction',
30
+ * name: 'name',
31
+ * },
32
+ * ],
33
+ * version: '1.0',
34
+ * });
35
+ * ```
36
+ */
37
+ create(params: PolicyCreateParams, options?: RequestOptions): APIPromise<Policy> {
38
+ const { 'privy-idempotency-key': privyIdempotencyKey, ...body } = params;
39
+ return this._client.post('/v1/policies', {
40
+ body,
41
+ ...options,
42
+ headers: buildHeaders([
43
+ { ...(privyIdempotencyKey != null ? { 'privy-idempotency-key': privyIdempotencyKey } : undefined) },
44
+ options?.headers,
45
+ ]),
46
+ });
47
+ }
48
+
49
+ /**
50
+ * Create a new rule for a policy.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const response = await client.policies._createRule(
55
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
56
+ * {
57
+ * action: 'ALLOW',
58
+ * conditions: [
59
+ * {
60
+ * field: 'to',
61
+ * field_source: 'ethereum_transaction',
62
+ * operator: 'eq',
63
+ * value: 'string',
64
+ * },
65
+ * ],
66
+ * method: 'eth_sendTransaction',
67
+ * name: 'name',
68
+ * },
69
+ * );
70
+ * ```
71
+ */
72
+ _createRule(
73
+ policyID: string,
74
+ params: PolicyCreateRuleParams,
75
+ options?: RequestOptions,
76
+ ): APIPromise<PolicyCreateRuleResponse> {
77
+ const { 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
78
+ return this._client.post(path`/v1/policies/${policyID}/rules`, {
79
+ body,
80
+ ...options,
81
+ headers: buildHeaders([
82
+ {
83
+ ...(privyAuthorizationSignature != null ?
84
+ { 'privy-authorization-signature': privyAuthorizationSignature }
85
+ : undefined),
86
+ },
87
+ options?.headers,
88
+ ]),
89
+ });
90
+ }
91
+
92
+ /**
93
+ * Delete a policy by policy ID.
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * const response = await client.policies._delete(
98
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
99
+ * );
100
+ * ```
101
+ */
102
+ _delete(
103
+ policyID: string,
104
+ params: PolicyDeleteParams | null | undefined = {},
105
+ options?: RequestOptions,
106
+ ): APIPromise<PolicyDeleteResponse> {
107
+ const { 'privy-authorization-signature': privyAuthorizationSignature } = params ?? {};
108
+ return this._client.delete(path`/v1/policies/${policyID}`, {
109
+ ...options,
110
+ headers: buildHeaders([
111
+ {
112
+ ...(privyAuthorizationSignature != null ?
113
+ { 'privy-authorization-signature': privyAuthorizationSignature }
114
+ : undefined),
115
+ },
116
+ options?.headers,
117
+ ]),
118
+ });
119
+ }
120
+
121
+ /**
122
+ * Delete a rule by policy ID and rule ID.
123
+ *
124
+ * @example
125
+ * ```ts
126
+ * const response = await client.policies._deleteRule(
127
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
128
+ * { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
129
+ * );
130
+ * ```
131
+ */
132
+ _deleteRule(
133
+ ruleID: string,
134
+ params: PolicyDeleteRuleParams,
135
+ options?: RequestOptions,
136
+ ): APIPromise<PolicyDeleteRuleResponse> {
137
+ const { policy_id, 'privy-authorization-signature': privyAuthorizationSignature } = params;
138
+ return this._client.delete(path`/v1/policies/${policy_id}/rules/${ruleID}`, {
139
+ ...options,
140
+ headers: buildHeaders([
141
+ {
142
+ ...(privyAuthorizationSignature != null ?
143
+ { 'privy-authorization-signature': privyAuthorizationSignature }
144
+ : undefined),
145
+ },
146
+ options?.headers,
147
+ ]),
148
+ });
149
+ }
150
+
151
+ /**
152
+ * Update a policy by policy ID.
153
+ *
154
+ * @example
155
+ * ```ts
156
+ * const policy = await client.policies._update(
157
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
158
+ * );
159
+ * ```
160
+ */
161
+ _update(policyID: string, params: PolicyUpdateParams, options?: RequestOptions): APIPromise<Policy> {
162
+ const { 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
163
+ return this._client.patch(path`/v1/policies/${policyID}`, {
164
+ body,
165
+ ...options,
166
+ headers: buildHeaders([
167
+ {
168
+ ...(privyAuthorizationSignature != null ?
169
+ { 'privy-authorization-signature': privyAuthorizationSignature }
170
+ : undefined),
171
+ },
172
+ options?.headers,
173
+ ]),
174
+ });
175
+ }
176
+
177
+ /**
178
+ * Update a rule by policy ID and rule ID.
179
+ *
180
+ * @example
181
+ * ```ts
182
+ * const response = await client.policies._updateRule(
183
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
184
+ * {
185
+ * policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
186
+ * action: 'ALLOW',
187
+ * conditions: [
188
+ * {
189
+ * field: 'to',
190
+ * field_source: 'ethereum_transaction',
191
+ * operator: 'eq',
192
+ * value: 'string',
193
+ * },
194
+ * ],
195
+ * method: 'eth_sendTransaction',
196
+ * name: 'name',
197
+ * },
198
+ * );
199
+ * ```
200
+ */
201
+ _updateRule(
202
+ ruleID: string,
203
+ params: PolicyUpdateRuleParams,
204
+ options?: RequestOptions,
205
+ ): APIPromise<PolicyUpdateRuleResponse> {
206
+ const { policy_id, 'privy-authorization-signature': privyAuthorizationSignature, ...body } = params;
207
+ return this._client.patch(path`/v1/policies/${policy_id}/rules/${ruleID}`, {
208
+ body,
209
+ ...options,
210
+ headers: buildHeaders([
211
+ {
212
+ ...(privyAuthorizationSignature != null ?
213
+ { 'privy-authorization-signature': privyAuthorizationSignature }
214
+ : undefined),
215
+ },
216
+ options?.headers,
217
+ ]),
218
+ });
219
+ }
220
+
221
+ /**
222
+ * Get a policy by policy ID.
223
+ *
224
+ * @example
225
+ * ```ts
226
+ * const policy = await client.policies.get(
227
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
228
+ * );
229
+ * ```
230
+ */
231
+ get(policyID: string, options?: RequestOptions): APIPromise<Policy> {
232
+ return this._client.get(path`/v1/policies/${policyID}`, options);
233
+ }
234
+
235
+ /**
236
+ * Get a rule by policy ID and rule ID.
237
+ *
238
+ * @example
239
+ * ```ts
240
+ * const response = await client.policies.getRule(
241
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
242
+ * { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
243
+ * );
244
+ * ```
245
+ */
246
+ getRule(
247
+ ruleID: string,
248
+ params: PolicyGetRuleParams,
249
+ options?: RequestOptions,
250
+ ): APIPromise<PolicyGetRuleResponse> {
251
+ const { policy_id } = params;
252
+ return this._client.get(path`/v1/policies/${policy_id}/rules/${ruleID}`, options);
253
+ }
254
+ }
255
+
256
+ export interface Policy {
257
+ /**
258
+ * Unique ID of the created policy. This will be the primary identifier when using
259
+ * the policy in the future.
260
+ */
261
+ id: string;
262
+
263
+ /**
264
+ * The chain type the policy applies to.
265
+ */
266
+ chain_type: 'ethereum' | 'solana';
267
+
268
+ /**
269
+ * Unix timestamp of when the policy was created in milliseconds.
270
+ */
271
+ created_at: number;
272
+
273
+ /**
274
+ * Name to assign to policy.
275
+ */
276
+ name: string;
277
+
278
+ /**
279
+ * The key quorum ID of the owner of the policy.
280
+ */
281
+ owner_id: string | null;
282
+
283
+ rules: Array<Policy.Rule>;
284
+
285
+ /**
286
+ * Version of the policy. Currently, 1.0 is the only version.
287
+ */
288
+ version: '1.0';
289
+ }
290
+
291
+ export namespace Policy {
292
+ /**
293
+ * The rules that apply to each method the policy covers.
294
+ */
295
+ export interface Rule {
296
+ id: string;
297
+
298
+ /**
299
+ * Action to take if the conditions are true.
300
+ */
301
+ action: 'ALLOW' | 'DENY';
302
+
303
+ conditions: Array<
304
+ | Rule.EthereumTransactionCondition
305
+ | Rule.EthereumCalldataCondition
306
+ | Rule.EthereumTypedDataDomainCondition
307
+ | Rule.EthereumTypedDataMessageCondition
308
+ | Rule.Ethereum7702AuthorizationCondition
309
+ | Rule.SolanaProgramInstructionCondition
310
+ | Rule.SolanaSystemProgramInstructionCondition
311
+ | Rule.SolanaTokenProgramInstructionCondition
312
+ | Rule.SystemCondition
313
+ >;
314
+
315
+ /**
316
+ * Method the rule applies to.
317
+ */
318
+ method:
319
+ | 'eth_sendTransaction'
320
+ | 'eth_signTransaction'
321
+ | 'eth_signTypedData_v4'
322
+ | 'eth_sign7702Authorization'
323
+ | 'signTransaction'
324
+ | 'signAndSendTransaction'
325
+ | 'exportPrivateKey'
326
+ | '*';
327
+
328
+ name: string;
329
+ }
330
+
331
+ export namespace Rule {
332
+ /**
333
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
334
+ * eth_sendTransaction request.
335
+ */
336
+ export interface EthereumTransactionCondition {
337
+ field: 'to' | 'value';
338
+
339
+ field_source: 'ethereum_transaction';
340
+
341
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
342
+
343
+ value: string | Array<string>;
344
+ }
345
+
346
+ /**
347
+ * The decoded calldata in a smart contract interaction as the smart contract
348
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
349
+ * an abi parameter with the JSON ABI of the smart contract.
350
+ */
351
+ export interface EthereumCalldataCondition {
352
+ abi: unknown;
353
+
354
+ field: string;
355
+
356
+ field_source: 'ethereum_calldata';
357
+
358
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
359
+
360
+ value: string | Array<string>;
361
+ }
362
+
363
+ /**
364
+ * Attributes from the signing domain that will verify the signature.
365
+ */
366
+ export interface EthereumTypedDataDomainCondition {
367
+ field: 'chainId' | 'verifyingContract';
368
+
369
+ field_source: 'ethereum_typed_data_domain';
370
+
371
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
372
+
373
+ value: string | Array<string>;
374
+ }
375
+
376
+ /**
377
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
378
+ * EIP-712.
379
+ */
380
+ export interface EthereumTypedDataMessageCondition {
381
+ field: string;
382
+
383
+ field_source: 'ethereum_typed_data_message';
384
+
385
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
386
+
387
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
388
+
389
+ value: string | Array<string>;
390
+ }
391
+
392
+ export namespace EthereumTypedDataMessageCondition {
393
+ export interface TypedData {
394
+ primary_type: string;
395
+
396
+ types: { [key: string]: Array<TypedData.Type> };
397
+ }
398
+
399
+ export namespace TypedData {
400
+ export interface Type {
401
+ name: string;
402
+
403
+ type: string;
404
+ }
405
+ }
406
+ }
407
+
408
+ /**
409
+ * Allowed contract addresses for eth_signAuthorization requests.
410
+ */
411
+ export interface Ethereum7702AuthorizationCondition {
412
+ field: 'contract';
413
+
414
+ field_source: 'ethereum_7702_authorization';
415
+
416
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
417
+
418
+ value: string | Array<string>;
419
+ }
420
+
421
+ /**
422
+ * Solana Program attributes, enables allowlisting Solana Programs.
423
+ */
424
+ export interface SolanaProgramInstructionCondition {
425
+ field: 'programId';
426
+
427
+ field_source: 'solana_program_instruction';
428
+
429
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
430
+
431
+ value: string | Array<string>;
432
+ }
433
+
434
+ /**
435
+ * Solana System Program attributes, including more granular Transfer instruction
436
+ * fields.
437
+ */
438
+ export interface SolanaSystemProgramInstructionCondition {
439
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
440
+
441
+ field_source: 'solana_system_program_instruction';
442
+
443
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
444
+
445
+ value: string | Array<string>;
446
+ }
447
+
448
+ /**
449
+ * Solana Token Program attributes, including more granular TransferChecked
450
+ * instruction fields.
451
+ */
452
+ export interface SolanaTokenProgramInstructionCondition {
453
+ field:
454
+ | 'instructionName'
455
+ | 'TransferChecked.source'
456
+ | 'TransferChecked.destination'
457
+ | 'TransferChecked.authority'
458
+ | 'TransferChecked.amount'
459
+ | 'TransferChecked.mint';
460
+
461
+ field_source: 'solana_token_program_instruction';
462
+
463
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
464
+
465
+ value: string | Array<string>;
466
+ }
467
+
468
+ /**
469
+ * System attributes, including current unix timestamp (in seconds).
470
+ */
471
+ export interface SystemCondition {
472
+ field: 'current_unix_timestamp';
473
+
474
+ field_source: 'system';
475
+
476
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
477
+
478
+ value: string | Array<string>;
479
+ }
480
+ }
481
+ }
482
+
483
+ /**
484
+ * A rule that defines the conditions and action to take if the conditions are
485
+ * true.
486
+ */
487
+ export interface PolicyCreateRuleResponse {
488
+ id: string;
489
+
490
+ /**
491
+ * Action to take if the conditions are true.
492
+ */
493
+ action: 'ALLOW' | 'DENY';
494
+
495
+ conditions: Array<
496
+ | PolicyCreateRuleResponse.EthereumTransactionCondition
497
+ | PolicyCreateRuleResponse.EthereumCalldataCondition
498
+ | PolicyCreateRuleResponse.EthereumTypedDataDomainCondition
499
+ | PolicyCreateRuleResponse.EthereumTypedDataMessageCondition
500
+ | PolicyCreateRuleResponse.Ethereum7702AuthorizationCondition
501
+ | PolicyCreateRuleResponse.SolanaProgramInstructionCondition
502
+ | PolicyCreateRuleResponse.SolanaSystemProgramInstructionCondition
503
+ | PolicyCreateRuleResponse.SolanaTokenProgramInstructionCondition
504
+ | PolicyCreateRuleResponse.SystemCondition
505
+ >;
506
+
507
+ /**
508
+ * Method the rule applies to.
509
+ */
510
+ method:
511
+ | 'eth_sendTransaction'
512
+ | 'eth_signTransaction'
513
+ | 'eth_signTypedData_v4'
514
+ | 'eth_sign7702Authorization'
515
+ | 'signTransaction'
516
+ | 'signAndSendTransaction'
517
+ | 'exportPrivateKey'
518
+ | '*';
519
+
520
+ name: string;
521
+ }
522
+
523
+ export namespace PolicyCreateRuleResponse {
524
+ /**
525
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
526
+ * eth_sendTransaction request.
527
+ */
528
+ export interface EthereumTransactionCondition {
529
+ field: 'to' | 'value';
530
+
531
+ field_source: 'ethereum_transaction';
532
+
533
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
534
+
535
+ value: string | Array<string>;
536
+ }
537
+
538
+ /**
539
+ * The decoded calldata in a smart contract interaction as the smart contract
540
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
541
+ * an abi parameter with the JSON ABI of the smart contract.
542
+ */
543
+ export interface EthereumCalldataCondition {
544
+ abi: unknown;
545
+
546
+ field: string;
547
+
548
+ field_source: 'ethereum_calldata';
549
+
550
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
551
+
552
+ value: string | Array<string>;
553
+ }
554
+
555
+ /**
556
+ * Attributes from the signing domain that will verify the signature.
557
+ */
558
+ export interface EthereumTypedDataDomainCondition {
559
+ field: 'chainId' | 'verifyingContract';
560
+
561
+ field_source: 'ethereum_typed_data_domain';
562
+
563
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
564
+
565
+ value: string | Array<string>;
566
+ }
567
+
568
+ /**
569
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
570
+ * EIP-712.
571
+ */
572
+ export interface EthereumTypedDataMessageCondition {
573
+ field: string;
574
+
575
+ field_source: 'ethereum_typed_data_message';
576
+
577
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
578
+
579
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
580
+
581
+ value: string | Array<string>;
582
+ }
583
+
584
+ export namespace EthereumTypedDataMessageCondition {
585
+ export interface TypedData {
586
+ primary_type: string;
587
+
588
+ types: { [key: string]: Array<TypedData.Type> };
589
+ }
590
+
591
+ export namespace TypedData {
592
+ export interface Type {
593
+ name: string;
594
+
595
+ type: string;
596
+ }
597
+ }
598
+ }
599
+
600
+ /**
601
+ * Allowed contract addresses for eth_signAuthorization requests.
602
+ */
603
+ export interface Ethereum7702AuthorizationCondition {
604
+ field: 'contract';
605
+
606
+ field_source: 'ethereum_7702_authorization';
607
+
608
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
609
+
610
+ value: string | Array<string>;
611
+ }
612
+
613
+ /**
614
+ * Solana Program attributes, enables allowlisting Solana Programs.
615
+ */
616
+ export interface SolanaProgramInstructionCondition {
617
+ field: 'programId';
618
+
619
+ field_source: 'solana_program_instruction';
620
+
621
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
622
+
623
+ value: string | Array<string>;
624
+ }
625
+
626
+ /**
627
+ * Solana System Program attributes, including more granular Transfer instruction
628
+ * fields.
629
+ */
630
+ export interface SolanaSystemProgramInstructionCondition {
631
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
632
+
633
+ field_source: 'solana_system_program_instruction';
634
+
635
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
636
+
637
+ value: string | Array<string>;
638
+ }
639
+
640
+ /**
641
+ * Solana Token Program attributes, including more granular TransferChecked
642
+ * instruction fields.
643
+ */
644
+ export interface SolanaTokenProgramInstructionCondition {
645
+ field:
646
+ | 'instructionName'
647
+ | 'TransferChecked.source'
648
+ | 'TransferChecked.destination'
649
+ | 'TransferChecked.authority'
650
+ | 'TransferChecked.amount'
651
+ | 'TransferChecked.mint';
652
+
653
+ field_source: 'solana_token_program_instruction';
654
+
655
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
656
+
657
+ value: string | Array<string>;
658
+ }
659
+
660
+ /**
661
+ * System attributes, including current unix timestamp (in seconds).
662
+ */
663
+ export interface SystemCondition {
664
+ field: 'current_unix_timestamp';
665
+
666
+ field_source: 'system';
667
+
668
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
669
+
670
+ value: string | Array<string>;
671
+ }
672
+ }
673
+
674
+ export interface PolicyDeleteResponse {
675
+ /**
676
+ * Whether the policy was deleted successfully.
677
+ */
678
+ success: boolean;
679
+ }
680
+
681
+ export interface PolicyDeleteRuleResponse {
682
+ /**
683
+ * Whether the rule was deleted successfully.
684
+ */
685
+ success: boolean;
686
+ }
687
+
688
+ export interface PolicyUpdateRuleResponse {
689
+ id: string;
690
+
691
+ /**
692
+ * Action to take if the conditions are true.
693
+ */
694
+ action: 'ALLOW' | 'DENY';
695
+
696
+ conditions: Array<
697
+ | PolicyUpdateRuleResponse.EthereumTransactionCondition
698
+ | PolicyUpdateRuleResponse.EthereumCalldataCondition
699
+ | PolicyUpdateRuleResponse.EthereumTypedDataDomainCondition
700
+ | PolicyUpdateRuleResponse.EthereumTypedDataMessageCondition
701
+ | PolicyUpdateRuleResponse.Ethereum7702AuthorizationCondition
702
+ | PolicyUpdateRuleResponse.SolanaProgramInstructionCondition
703
+ | PolicyUpdateRuleResponse.SolanaSystemProgramInstructionCondition
704
+ | PolicyUpdateRuleResponse.SolanaTokenProgramInstructionCondition
705
+ | PolicyUpdateRuleResponse.SystemCondition
706
+ >;
707
+
708
+ /**
709
+ * Method the rule applies to.
710
+ */
711
+ method:
712
+ | 'eth_sendTransaction'
713
+ | 'eth_signTransaction'
714
+ | 'eth_signTypedData_v4'
715
+ | 'eth_sign7702Authorization'
716
+ | 'signTransaction'
717
+ | 'signAndSendTransaction'
718
+ | 'exportPrivateKey'
719
+ | '*';
720
+
721
+ name: string;
722
+ }
723
+
724
+ export namespace PolicyUpdateRuleResponse {
725
+ /**
726
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
727
+ * eth_sendTransaction request.
728
+ */
729
+ export interface EthereumTransactionCondition {
730
+ field: 'to' | 'value';
731
+
732
+ field_source: 'ethereum_transaction';
733
+
734
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
735
+
736
+ value: string | Array<string>;
737
+ }
738
+
739
+ /**
740
+ * The decoded calldata in a smart contract interaction as the smart contract
741
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
742
+ * an abi parameter with the JSON ABI of the smart contract.
743
+ */
744
+ export interface EthereumCalldataCondition {
745
+ abi: unknown;
746
+
747
+ field: string;
748
+
749
+ field_source: 'ethereum_calldata';
750
+
751
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
752
+
753
+ value: string | Array<string>;
754
+ }
755
+
756
+ /**
757
+ * Attributes from the signing domain that will verify the signature.
758
+ */
759
+ export interface EthereumTypedDataDomainCondition {
760
+ field: 'chainId' | 'verifyingContract';
761
+
762
+ field_source: 'ethereum_typed_data_domain';
763
+
764
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
765
+
766
+ value: string | Array<string>;
767
+ }
768
+
769
+ /**
770
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
771
+ * EIP-712.
772
+ */
773
+ export interface EthereumTypedDataMessageCondition {
774
+ field: string;
775
+
776
+ field_source: 'ethereum_typed_data_message';
777
+
778
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
779
+
780
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
781
+
782
+ value: string | Array<string>;
783
+ }
784
+
785
+ export namespace EthereumTypedDataMessageCondition {
786
+ export interface TypedData {
787
+ primary_type: string;
788
+
789
+ types: { [key: string]: Array<TypedData.Type> };
790
+ }
791
+
792
+ export namespace TypedData {
793
+ export interface Type {
794
+ name: string;
795
+
796
+ type: string;
797
+ }
798
+ }
799
+ }
800
+
801
+ /**
802
+ * Allowed contract addresses for eth_signAuthorization requests.
803
+ */
804
+ export interface Ethereum7702AuthorizationCondition {
805
+ field: 'contract';
806
+
807
+ field_source: 'ethereum_7702_authorization';
808
+
809
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
810
+
811
+ value: string | Array<string>;
812
+ }
813
+
814
+ /**
815
+ * Solana Program attributes, enables allowlisting Solana Programs.
816
+ */
817
+ export interface SolanaProgramInstructionCondition {
818
+ field: 'programId';
819
+
820
+ field_source: 'solana_program_instruction';
821
+
822
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
823
+
824
+ value: string | Array<string>;
825
+ }
826
+
827
+ /**
828
+ * Solana System Program attributes, including more granular Transfer instruction
829
+ * fields.
830
+ */
831
+ export interface SolanaSystemProgramInstructionCondition {
832
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
833
+
834
+ field_source: 'solana_system_program_instruction';
835
+
836
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
837
+
838
+ value: string | Array<string>;
839
+ }
840
+
841
+ /**
842
+ * Solana Token Program attributes, including more granular TransferChecked
843
+ * instruction fields.
844
+ */
845
+ export interface SolanaTokenProgramInstructionCondition {
846
+ field:
847
+ | 'instructionName'
848
+ | 'TransferChecked.source'
849
+ | 'TransferChecked.destination'
850
+ | 'TransferChecked.authority'
851
+ | 'TransferChecked.amount'
852
+ | 'TransferChecked.mint';
853
+
854
+ field_source: 'solana_token_program_instruction';
855
+
856
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
857
+
858
+ value: string | Array<string>;
859
+ }
860
+
861
+ /**
862
+ * System attributes, including current unix timestamp (in seconds).
863
+ */
864
+ export interface SystemCondition {
865
+ field: 'current_unix_timestamp';
866
+
867
+ field_source: 'system';
868
+
869
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
870
+
871
+ value: string | Array<string>;
872
+ }
873
+ }
874
+
875
+ /**
876
+ * A rule that defines the conditions and action to take if the conditions are
877
+ * true.
878
+ */
879
+ export interface PolicyGetRuleResponse {
880
+ id: string;
881
+
882
+ /**
883
+ * Action to take if the conditions are true.
884
+ */
885
+ action: 'ALLOW' | 'DENY';
886
+
887
+ conditions: Array<
888
+ | PolicyGetRuleResponse.EthereumTransactionCondition
889
+ | PolicyGetRuleResponse.EthereumCalldataCondition
890
+ | PolicyGetRuleResponse.EthereumTypedDataDomainCondition
891
+ | PolicyGetRuleResponse.EthereumTypedDataMessageCondition
892
+ | PolicyGetRuleResponse.Ethereum7702AuthorizationCondition
893
+ | PolicyGetRuleResponse.SolanaProgramInstructionCondition
894
+ | PolicyGetRuleResponse.SolanaSystemProgramInstructionCondition
895
+ | PolicyGetRuleResponse.SolanaTokenProgramInstructionCondition
896
+ | PolicyGetRuleResponse.SystemCondition
897
+ >;
898
+
899
+ /**
900
+ * Method the rule applies to.
901
+ */
902
+ method:
903
+ | 'eth_sendTransaction'
904
+ | 'eth_signTransaction'
905
+ | 'eth_signTypedData_v4'
906
+ | 'eth_sign7702Authorization'
907
+ | 'signTransaction'
908
+ | 'signAndSendTransaction'
909
+ | 'exportPrivateKey'
910
+ | '*';
911
+
912
+ name: string;
913
+ }
914
+
915
+ export namespace PolicyGetRuleResponse {
916
+ /**
917
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
918
+ * eth_sendTransaction request.
919
+ */
920
+ export interface EthereumTransactionCondition {
921
+ field: 'to' | 'value';
922
+
923
+ field_source: 'ethereum_transaction';
924
+
925
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
926
+
927
+ value: string | Array<string>;
928
+ }
929
+
930
+ /**
931
+ * The decoded calldata in a smart contract interaction as the smart contract
932
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
933
+ * an abi parameter with the JSON ABI of the smart contract.
934
+ */
935
+ export interface EthereumCalldataCondition {
936
+ abi: unknown;
937
+
938
+ field: string;
939
+
940
+ field_source: 'ethereum_calldata';
941
+
942
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
943
+
944
+ value: string | Array<string>;
945
+ }
946
+
947
+ /**
948
+ * Attributes from the signing domain that will verify the signature.
949
+ */
950
+ export interface EthereumTypedDataDomainCondition {
951
+ field: 'chainId' | 'verifyingContract';
952
+
953
+ field_source: 'ethereum_typed_data_domain';
954
+
955
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
956
+
957
+ value: string | Array<string>;
958
+ }
959
+
960
+ /**
961
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
962
+ * EIP-712.
963
+ */
964
+ export interface EthereumTypedDataMessageCondition {
965
+ field: string;
966
+
967
+ field_source: 'ethereum_typed_data_message';
968
+
969
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
970
+
971
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
972
+
973
+ value: string | Array<string>;
974
+ }
975
+
976
+ export namespace EthereumTypedDataMessageCondition {
977
+ export interface TypedData {
978
+ primary_type: string;
979
+
980
+ types: { [key: string]: Array<TypedData.Type> };
981
+ }
982
+
983
+ export namespace TypedData {
984
+ export interface Type {
985
+ name: string;
986
+
987
+ type: string;
988
+ }
989
+ }
990
+ }
991
+
992
+ /**
993
+ * Allowed contract addresses for eth_signAuthorization requests.
994
+ */
995
+ export interface Ethereum7702AuthorizationCondition {
996
+ field: 'contract';
997
+
998
+ field_source: 'ethereum_7702_authorization';
999
+
1000
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1001
+
1002
+ value: string | Array<string>;
1003
+ }
1004
+
1005
+ /**
1006
+ * Solana Program attributes, enables allowlisting Solana Programs.
1007
+ */
1008
+ export interface SolanaProgramInstructionCondition {
1009
+ field: 'programId';
1010
+
1011
+ field_source: 'solana_program_instruction';
1012
+
1013
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1014
+
1015
+ value: string | Array<string>;
1016
+ }
1017
+
1018
+ /**
1019
+ * Solana System Program attributes, including more granular Transfer instruction
1020
+ * fields.
1021
+ */
1022
+ export interface SolanaSystemProgramInstructionCondition {
1023
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1024
+
1025
+ field_source: 'solana_system_program_instruction';
1026
+
1027
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1028
+
1029
+ value: string | Array<string>;
1030
+ }
1031
+
1032
+ /**
1033
+ * Solana Token Program attributes, including more granular TransferChecked
1034
+ * instruction fields.
1035
+ */
1036
+ export interface SolanaTokenProgramInstructionCondition {
1037
+ field:
1038
+ | 'instructionName'
1039
+ | 'TransferChecked.source'
1040
+ | 'TransferChecked.destination'
1041
+ | 'TransferChecked.authority'
1042
+ | 'TransferChecked.amount'
1043
+ | 'TransferChecked.mint';
1044
+
1045
+ field_source: 'solana_token_program_instruction';
1046
+
1047
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1048
+
1049
+ value: string | Array<string>;
1050
+ }
1051
+
1052
+ /**
1053
+ * System attributes, including current unix timestamp (in seconds).
1054
+ */
1055
+ export interface SystemCondition {
1056
+ field: 'current_unix_timestamp';
1057
+
1058
+ field_source: 'system';
1059
+
1060
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1061
+
1062
+ value: string | Array<string>;
1063
+ }
1064
+ }
1065
+
1066
+ export interface PolicyCreateParams {
1067
+ /**
1068
+ * Body param: The chain type the policy applies to.
1069
+ */
1070
+ chain_type: 'ethereum' | 'solana';
1071
+
1072
+ /**
1073
+ * Body param: Name to assign to policy.
1074
+ */
1075
+ name: string;
1076
+
1077
+ /**
1078
+ * Body param:
1079
+ */
1080
+ rules: Array<PolicyCreateParams.Rule>;
1081
+
1082
+ /**
1083
+ * Body param: Version of the policy. Currently, 1.0 is the only version.
1084
+ */
1085
+ version: '1.0';
1086
+
1087
+ /**
1088
+ * Body param: The owner of the resource. If you provide this, do not specify an
1089
+ * owner_id as it will be generated automatically. When updating a wallet, you can
1090
+ * set the owner to null to remove the owner.
1091
+ */
1092
+ owner?: PolicyCreateParams.PublicKeyOwner | PolicyCreateParams.UserOwner | null;
1093
+
1094
+ /**
1095
+ * Body param: The key quorum ID to set as the owner of the resource. If you
1096
+ * provide this, do not specify an owner.
1097
+ */
1098
+ owner_id?: string | null;
1099
+
1100
+ /**
1101
+ * Header param: Idempotency keys ensure API requests are executed only once within
1102
+ * a 24-hour window.
1103
+ */
1104
+ 'privy-idempotency-key'?: string;
1105
+ }
1106
+
1107
+ export namespace PolicyCreateParams {
1108
+ /**
1109
+ * The rules that apply to each method the policy covers.
1110
+ */
1111
+ export interface Rule {
1112
+ /**
1113
+ * Action to take if the conditions are true.
1114
+ */
1115
+ action: 'ALLOW' | 'DENY';
1116
+
1117
+ conditions: Array<
1118
+ | Rule.EthereumTransactionCondition
1119
+ | Rule.EthereumCalldataCondition
1120
+ | Rule.EthereumTypedDataDomainCondition
1121
+ | Rule.EthereumTypedDataMessageCondition
1122
+ | Rule.Ethereum7702AuthorizationCondition
1123
+ | Rule.SolanaProgramInstructionCondition
1124
+ | Rule.SolanaSystemProgramInstructionCondition
1125
+ | Rule.SolanaTokenProgramInstructionCondition
1126
+ | Rule.SystemCondition
1127
+ >;
1128
+
1129
+ /**
1130
+ * Method the rule applies to.
1131
+ */
1132
+ method:
1133
+ | 'eth_sendTransaction'
1134
+ | 'eth_signTransaction'
1135
+ | 'eth_signTypedData_v4'
1136
+ | 'eth_sign7702Authorization'
1137
+ | 'signTransaction'
1138
+ | 'signAndSendTransaction'
1139
+ | 'exportPrivateKey'
1140
+ | '*';
1141
+
1142
+ name: string;
1143
+ }
1144
+
1145
+ export namespace Rule {
1146
+ /**
1147
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
1148
+ * eth_sendTransaction request.
1149
+ */
1150
+ export interface EthereumTransactionCondition {
1151
+ field: 'to' | 'value';
1152
+
1153
+ field_source: 'ethereum_transaction';
1154
+
1155
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1156
+
1157
+ value: string | Array<string>;
1158
+ }
1159
+
1160
+ /**
1161
+ * The decoded calldata in a smart contract interaction as the smart contract
1162
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1163
+ * an abi parameter with the JSON ABI of the smart contract.
1164
+ */
1165
+ export interface EthereumCalldataCondition {
1166
+ abi: unknown;
1167
+
1168
+ field: string;
1169
+
1170
+ field_source: 'ethereum_calldata';
1171
+
1172
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1173
+
1174
+ value: string | Array<string>;
1175
+ }
1176
+
1177
+ /**
1178
+ * Attributes from the signing domain that will verify the signature.
1179
+ */
1180
+ export interface EthereumTypedDataDomainCondition {
1181
+ field: 'chainId' | 'verifyingContract';
1182
+
1183
+ field_source: 'ethereum_typed_data_domain';
1184
+
1185
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1186
+
1187
+ value: string | Array<string>;
1188
+ }
1189
+
1190
+ /**
1191
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1192
+ * EIP-712.
1193
+ */
1194
+ export interface EthereumTypedDataMessageCondition {
1195
+ field: string;
1196
+
1197
+ field_source: 'ethereum_typed_data_message';
1198
+
1199
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1200
+
1201
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
1202
+
1203
+ value: string | Array<string>;
1204
+ }
1205
+
1206
+ export namespace EthereumTypedDataMessageCondition {
1207
+ export interface TypedData {
1208
+ primary_type: string;
1209
+
1210
+ types: { [key: string]: Array<TypedData.Type> };
1211
+ }
1212
+
1213
+ export namespace TypedData {
1214
+ export interface Type {
1215
+ name: string;
1216
+
1217
+ type: string;
1218
+ }
1219
+ }
1220
+ }
1221
+
1222
+ /**
1223
+ * Allowed contract addresses for eth_signAuthorization requests.
1224
+ */
1225
+ export interface Ethereum7702AuthorizationCondition {
1226
+ field: 'contract';
1227
+
1228
+ field_source: 'ethereum_7702_authorization';
1229
+
1230
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1231
+
1232
+ value: string | Array<string>;
1233
+ }
1234
+
1235
+ /**
1236
+ * Solana Program attributes, enables allowlisting Solana Programs.
1237
+ */
1238
+ export interface SolanaProgramInstructionCondition {
1239
+ field: 'programId';
1240
+
1241
+ field_source: 'solana_program_instruction';
1242
+
1243
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1244
+
1245
+ value: string | Array<string>;
1246
+ }
1247
+
1248
+ /**
1249
+ * Solana System Program attributes, including more granular Transfer instruction
1250
+ * fields.
1251
+ */
1252
+ export interface SolanaSystemProgramInstructionCondition {
1253
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1254
+
1255
+ field_source: 'solana_system_program_instruction';
1256
+
1257
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1258
+
1259
+ value: string | Array<string>;
1260
+ }
1261
+
1262
+ /**
1263
+ * Solana Token Program attributes, including more granular TransferChecked
1264
+ * instruction fields.
1265
+ */
1266
+ export interface SolanaTokenProgramInstructionCondition {
1267
+ field:
1268
+ | 'instructionName'
1269
+ | 'TransferChecked.source'
1270
+ | 'TransferChecked.destination'
1271
+ | 'TransferChecked.authority'
1272
+ | 'TransferChecked.amount'
1273
+ | 'TransferChecked.mint';
1274
+
1275
+ field_source: 'solana_token_program_instruction';
1276
+
1277
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1278
+
1279
+ value: string | Array<string>;
1280
+ }
1281
+
1282
+ /**
1283
+ * System attributes, including current unix timestamp (in seconds).
1284
+ */
1285
+ export interface SystemCondition {
1286
+ field: 'current_unix_timestamp';
1287
+
1288
+ field_source: 'system';
1289
+
1290
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1291
+
1292
+ value: string | Array<string>;
1293
+ }
1294
+ }
1295
+
1296
+ /**
1297
+ * The P-256 public key of the owner of the resource. If you provide this, do not
1298
+ * specify an owner_id as it will be generated automatically.
1299
+ */
1300
+ export interface PublicKeyOwner {
1301
+ public_key: string;
1302
+ }
1303
+
1304
+ /**
1305
+ * The user ID of the owner of the resource. The user must already exist, and this
1306
+ * value must start with "did:privy:". If you provide this, do not specify an
1307
+ * owner_id as it will be generated automatically.
1308
+ */
1309
+ export interface UserOwner {
1310
+ user_id: string;
1311
+ }
1312
+ }
1313
+
1314
+ export interface PolicyCreateRuleParams {
1315
+ /**
1316
+ * Body param: Action to take if the conditions are true.
1317
+ */
1318
+ action: 'ALLOW' | 'DENY';
1319
+
1320
+ /**
1321
+ * Body param:
1322
+ */
1323
+ conditions: Array<
1324
+ | PolicyCreateRuleParams.EthereumTransactionCondition
1325
+ | PolicyCreateRuleParams.EthereumCalldataCondition
1326
+ | PolicyCreateRuleParams.EthereumTypedDataDomainCondition
1327
+ | PolicyCreateRuleParams.EthereumTypedDataMessageCondition
1328
+ | PolicyCreateRuleParams.Ethereum7702AuthorizationCondition
1329
+ | PolicyCreateRuleParams.SolanaProgramInstructionCondition
1330
+ | PolicyCreateRuleParams.SolanaSystemProgramInstructionCondition
1331
+ | PolicyCreateRuleParams.SolanaTokenProgramInstructionCondition
1332
+ | PolicyCreateRuleParams.SystemCondition
1333
+ >;
1334
+
1335
+ /**
1336
+ * Body param: Method the rule applies to.
1337
+ */
1338
+ method:
1339
+ | 'eth_sendTransaction'
1340
+ | 'eth_signTransaction'
1341
+ | 'eth_signTypedData_v4'
1342
+ | 'eth_sign7702Authorization'
1343
+ | 'signTransaction'
1344
+ | 'signAndSendTransaction'
1345
+ | 'exportPrivateKey'
1346
+ | '*';
1347
+
1348
+ /**
1349
+ * Body param:
1350
+ */
1351
+ name: string;
1352
+
1353
+ /**
1354
+ * Header param: Request authorization signature. If multiple signatures are
1355
+ * required, they should be comma separated.
1356
+ */
1357
+ 'privy-authorization-signature'?: string;
1358
+ }
1359
+
1360
+ export namespace PolicyCreateRuleParams {
1361
+ /**
1362
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
1363
+ * eth_sendTransaction request.
1364
+ */
1365
+ export interface EthereumTransactionCondition {
1366
+ field: 'to' | 'value';
1367
+
1368
+ field_source: 'ethereum_transaction';
1369
+
1370
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1371
+
1372
+ value: string | Array<string>;
1373
+ }
1374
+
1375
+ /**
1376
+ * The decoded calldata in a smart contract interaction as the smart contract
1377
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1378
+ * an abi parameter with the JSON ABI of the smart contract.
1379
+ */
1380
+ export interface EthereumCalldataCondition {
1381
+ abi: unknown;
1382
+
1383
+ field: string;
1384
+
1385
+ field_source: 'ethereum_calldata';
1386
+
1387
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1388
+
1389
+ value: string | Array<string>;
1390
+ }
1391
+
1392
+ /**
1393
+ * Attributes from the signing domain that will verify the signature.
1394
+ */
1395
+ export interface EthereumTypedDataDomainCondition {
1396
+ field: 'chainId' | 'verifyingContract';
1397
+
1398
+ field_source: 'ethereum_typed_data_domain';
1399
+
1400
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1401
+
1402
+ value: string | Array<string>;
1403
+ }
1404
+
1405
+ /**
1406
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1407
+ * EIP-712.
1408
+ */
1409
+ export interface EthereumTypedDataMessageCondition {
1410
+ field: string;
1411
+
1412
+ field_source: 'ethereum_typed_data_message';
1413
+
1414
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1415
+
1416
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
1417
+
1418
+ value: string | Array<string>;
1419
+ }
1420
+
1421
+ export namespace EthereumTypedDataMessageCondition {
1422
+ export interface TypedData {
1423
+ primary_type: string;
1424
+
1425
+ types: { [key: string]: Array<TypedData.Type> };
1426
+ }
1427
+
1428
+ export namespace TypedData {
1429
+ export interface Type {
1430
+ name: string;
1431
+
1432
+ type: string;
1433
+ }
1434
+ }
1435
+ }
1436
+
1437
+ /**
1438
+ * Allowed contract addresses for eth_signAuthorization requests.
1439
+ */
1440
+ export interface Ethereum7702AuthorizationCondition {
1441
+ field: 'contract';
1442
+
1443
+ field_source: 'ethereum_7702_authorization';
1444
+
1445
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1446
+
1447
+ value: string | Array<string>;
1448
+ }
1449
+
1450
+ /**
1451
+ * Solana Program attributes, enables allowlisting Solana Programs.
1452
+ */
1453
+ export interface SolanaProgramInstructionCondition {
1454
+ field: 'programId';
1455
+
1456
+ field_source: 'solana_program_instruction';
1457
+
1458
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1459
+
1460
+ value: string | Array<string>;
1461
+ }
1462
+
1463
+ /**
1464
+ * Solana System Program attributes, including more granular Transfer instruction
1465
+ * fields.
1466
+ */
1467
+ export interface SolanaSystemProgramInstructionCondition {
1468
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1469
+
1470
+ field_source: 'solana_system_program_instruction';
1471
+
1472
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1473
+
1474
+ value: string | Array<string>;
1475
+ }
1476
+
1477
+ /**
1478
+ * Solana Token Program attributes, including more granular TransferChecked
1479
+ * instruction fields.
1480
+ */
1481
+ export interface SolanaTokenProgramInstructionCondition {
1482
+ field:
1483
+ | 'instructionName'
1484
+ | 'TransferChecked.source'
1485
+ | 'TransferChecked.destination'
1486
+ | 'TransferChecked.authority'
1487
+ | 'TransferChecked.amount'
1488
+ | 'TransferChecked.mint';
1489
+
1490
+ field_source: 'solana_token_program_instruction';
1491
+
1492
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1493
+
1494
+ value: string | Array<string>;
1495
+ }
1496
+
1497
+ /**
1498
+ * System attributes, including current unix timestamp (in seconds).
1499
+ */
1500
+ export interface SystemCondition {
1501
+ field: 'current_unix_timestamp';
1502
+
1503
+ field_source: 'system';
1504
+
1505
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1506
+
1507
+ value: string | Array<string>;
1508
+ }
1509
+ }
1510
+
1511
+ export interface PolicyDeleteParams {
1512
+ /**
1513
+ * Request authorization signature. If multiple signatures are required, they
1514
+ * should be comma separated.
1515
+ */
1516
+ 'privy-authorization-signature'?: string;
1517
+ }
1518
+
1519
+ export interface PolicyDeleteRuleParams {
1520
+ /**
1521
+ * Path param:
1522
+ */
1523
+ policy_id: string;
1524
+
1525
+ /**
1526
+ * Header param: Request authorization signature. If multiple signatures are
1527
+ * required, they should be comma separated.
1528
+ */
1529
+ 'privy-authorization-signature'?: string;
1530
+ }
1531
+
1532
+ export interface PolicyUpdateParams {
1533
+ /**
1534
+ * Body param: Name to assign to policy.
1535
+ */
1536
+ name?: string;
1537
+
1538
+ /**
1539
+ * Body param: The owner of the resource. If you provide this, do not specify an
1540
+ * owner_id as it will be generated automatically. When updating a wallet, you can
1541
+ * set the owner to null to remove the owner.
1542
+ */
1543
+ owner?: PolicyUpdateParams.PublicKeyOwner | PolicyUpdateParams.UserOwner | null;
1544
+
1545
+ /**
1546
+ * Body param: The key quorum ID to set as the owner of the resource. If you
1547
+ * provide this, do not specify an owner.
1548
+ */
1549
+ owner_id?: string | null;
1550
+
1551
+ /**
1552
+ * Body param:
1553
+ */
1554
+ rules?: Array<PolicyUpdateParams.Rule>;
1555
+
1556
+ /**
1557
+ * Header param: Request authorization signature. If multiple signatures are
1558
+ * required, they should be comma separated.
1559
+ */
1560
+ 'privy-authorization-signature'?: string;
1561
+ }
1562
+
1563
+ export namespace PolicyUpdateParams {
1564
+ /**
1565
+ * The P-256 public key of the owner of the resource. If you provide this, do not
1566
+ * specify an owner_id as it will be generated automatically.
1567
+ */
1568
+ export interface PublicKeyOwner {
1569
+ public_key: string;
1570
+ }
1571
+
1572
+ /**
1573
+ * The user ID of the owner of the resource. The user must already exist, and this
1574
+ * value must start with "did:privy:". If you provide this, do not specify an
1575
+ * owner_id as it will be generated automatically.
1576
+ */
1577
+ export interface UserOwner {
1578
+ user_id: string;
1579
+ }
1580
+
1581
+ /**
1582
+ * The rules that apply to each method the policy covers.
1583
+ */
1584
+ export interface Rule {
1585
+ /**
1586
+ * Action to take if the conditions are true.
1587
+ */
1588
+ action: 'ALLOW' | 'DENY';
1589
+
1590
+ conditions: Array<
1591
+ | Rule.EthereumTransactionCondition
1592
+ | Rule.EthereumCalldataCondition
1593
+ | Rule.EthereumTypedDataDomainCondition
1594
+ | Rule.EthereumTypedDataMessageCondition
1595
+ | Rule.Ethereum7702AuthorizationCondition
1596
+ | Rule.SolanaProgramInstructionCondition
1597
+ | Rule.SolanaSystemProgramInstructionCondition
1598
+ | Rule.SolanaTokenProgramInstructionCondition
1599
+ | Rule.SystemCondition
1600
+ >;
1601
+
1602
+ /**
1603
+ * Method the rule applies to.
1604
+ */
1605
+ method:
1606
+ | 'eth_sendTransaction'
1607
+ | 'eth_signTransaction'
1608
+ | 'eth_signTypedData_v4'
1609
+ | 'eth_sign7702Authorization'
1610
+ | 'signTransaction'
1611
+ | 'signAndSendTransaction'
1612
+ | 'exportPrivateKey'
1613
+ | '*';
1614
+
1615
+ name: string;
1616
+ }
1617
+
1618
+ export namespace Rule {
1619
+ /**
1620
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
1621
+ * eth_sendTransaction request.
1622
+ */
1623
+ export interface EthereumTransactionCondition {
1624
+ field: 'to' | 'value';
1625
+
1626
+ field_source: 'ethereum_transaction';
1627
+
1628
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1629
+
1630
+ value: string | Array<string>;
1631
+ }
1632
+
1633
+ /**
1634
+ * The decoded calldata in a smart contract interaction as the smart contract
1635
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1636
+ * an abi parameter with the JSON ABI of the smart contract.
1637
+ */
1638
+ export interface EthereumCalldataCondition {
1639
+ abi: unknown;
1640
+
1641
+ field: string;
1642
+
1643
+ field_source: 'ethereum_calldata';
1644
+
1645
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1646
+
1647
+ value: string | Array<string>;
1648
+ }
1649
+
1650
+ /**
1651
+ * Attributes from the signing domain that will verify the signature.
1652
+ */
1653
+ export interface EthereumTypedDataDomainCondition {
1654
+ field: 'chainId' | 'verifyingContract';
1655
+
1656
+ field_source: 'ethereum_typed_data_domain';
1657
+
1658
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1659
+
1660
+ value: string | Array<string>;
1661
+ }
1662
+
1663
+ /**
1664
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1665
+ * EIP-712.
1666
+ */
1667
+ export interface EthereumTypedDataMessageCondition {
1668
+ field: string;
1669
+
1670
+ field_source: 'ethereum_typed_data_message';
1671
+
1672
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1673
+
1674
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
1675
+
1676
+ value: string | Array<string>;
1677
+ }
1678
+
1679
+ export namespace EthereumTypedDataMessageCondition {
1680
+ export interface TypedData {
1681
+ primary_type: string;
1682
+
1683
+ types: { [key: string]: Array<TypedData.Type> };
1684
+ }
1685
+
1686
+ export namespace TypedData {
1687
+ export interface Type {
1688
+ name: string;
1689
+
1690
+ type: string;
1691
+ }
1692
+ }
1693
+ }
1694
+
1695
+ /**
1696
+ * Allowed contract addresses for eth_signAuthorization requests.
1697
+ */
1698
+ export interface Ethereum7702AuthorizationCondition {
1699
+ field: 'contract';
1700
+
1701
+ field_source: 'ethereum_7702_authorization';
1702
+
1703
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1704
+
1705
+ value: string | Array<string>;
1706
+ }
1707
+
1708
+ /**
1709
+ * Solana Program attributes, enables allowlisting Solana Programs.
1710
+ */
1711
+ export interface SolanaProgramInstructionCondition {
1712
+ field: 'programId';
1713
+
1714
+ field_source: 'solana_program_instruction';
1715
+
1716
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1717
+
1718
+ value: string | Array<string>;
1719
+ }
1720
+
1721
+ /**
1722
+ * Solana System Program attributes, including more granular Transfer instruction
1723
+ * fields.
1724
+ */
1725
+ export interface SolanaSystemProgramInstructionCondition {
1726
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1727
+
1728
+ field_source: 'solana_system_program_instruction';
1729
+
1730
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1731
+
1732
+ value: string | Array<string>;
1733
+ }
1734
+
1735
+ /**
1736
+ * Solana Token Program attributes, including more granular TransferChecked
1737
+ * instruction fields.
1738
+ */
1739
+ export interface SolanaTokenProgramInstructionCondition {
1740
+ field:
1741
+ | 'instructionName'
1742
+ | 'TransferChecked.source'
1743
+ | 'TransferChecked.destination'
1744
+ | 'TransferChecked.authority'
1745
+ | 'TransferChecked.amount'
1746
+ | 'TransferChecked.mint';
1747
+
1748
+ field_source: 'solana_token_program_instruction';
1749
+
1750
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1751
+
1752
+ value: string | Array<string>;
1753
+ }
1754
+
1755
+ /**
1756
+ * System attributes, including current unix timestamp (in seconds).
1757
+ */
1758
+ export interface SystemCondition {
1759
+ field: 'current_unix_timestamp';
1760
+
1761
+ field_source: 'system';
1762
+
1763
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1764
+
1765
+ value: string | Array<string>;
1766
+ }
1767
+ }
1768
+ }
1769
+
1770
+ export interface PolicyUpdateRuleParams {
1771
+ /**
1772
+ * Path param:
1773
+ */
1774
+ policy_id: string;
1775
+
1776
+ /**
1777
+ * Body param: Action to take if the conditions are true.
1778
+ */
1779
+ action: 'ALLOW' | 'DENY';
1780
+
1781
+ /**
1782
+ * Body param:
1783
+ */
1784
+ conditions: Array<
1785
+ | PolicyUpdateRuleParams.EthereumTransactionCondition
1786
+ | PolicyUpdateRuleParams.EthereumCalldataCondition
1787
+ | PolicyUpdateRuleParams.EthereumTypedDataDomainCondition
1788
+ | PolicyUpdateRuleParams.EthereumTypedDataMessageCondition
1789
+ | PolicyUpdateRuleParams.Ethereum7702AuthorizationCondition
1790
+ | PolicyUpdateRuleParams.SolanaProgramInstructionCondition
1791
+ | PolicyUpdateRuleParams.SolanaSystemProgramInstructionCondition
1792
+ | PolicyUpdateRuleParams.SolanaTokenProgramInstructionCondition
1793
+ | PolicyUpdateRuleParams.SystemCondition
1794
+ >;
1795
+
1796
+ /**
1797
+ * Body param: Method the rule applies to.
1798
+ */
1799
+ method:
1800
+ | 'eth_sendTransaction'
1801
+ | 'eth_signTransaction'
1802
+ | 'eth_signTypedData_v4'
1803
+ | 'eth_sign7702Authorization'
1804
+ | 'signTransaction'
1805
+ | 'signAndSendTransaction'
1806
+ | 'exportPrivateKey'
1807
+ | '*';
1808
+
1809
+ /**
1810
+ * Body param:
1811
+ */
1812
+ name: string;
1813
+
1814
+ /**
1815
+ * Header param: Request authorization signature. If multiple signatures are
1816
+ * required, they should be comma separated.
1817
+ */
1818
+ 'privy-authorization-signature'?: string;
1819
+ }
1820
+
1821
+ export namespace PolicyUpdateRuleParams {
1822
+ /**
1823
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
1824
+ * eth_sendTransaction request.
1825
+ */
1826
+ export interface EthereumTransactionCondition {
1827
+ field: 'to' | 'value';
1828
+
1829
+ field_source: 'ethereum_transaction';
1830
+
1831
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1832
+
1833
+ value: string | Array<string>;
1834
+ }
1835
+
1836
+ /**
1837
+ * The decoded calldata in a smart contract interaction as the smart contract
1838
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1839
+ * an abi parameter with the JSON ABI of the smart contract.
1840
+ */
1841
+ export interface EthereumCalldataCondition {
1842
+ abi: unknown;
1843
+
1844
+ field: string;
1845
+
1846
+ field_source: 'ethereum_calldata';
1847
+
1848
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1849
+
1850
+ value: string | Array<string>;
1851
+ }
1852
+
1853
+ /**
1854
+ * Attributes from the signing domain that will verify the signature.
1855
+ */
1856
+ export interface EthereumTypedDataDomainCondition {
1857
+ field: 'chainId' | 'verifyingContract';
1858
+
1859
+ field_source: 'ethereum_typed_data_domain';
1860
+
1861
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1862
+
1863
+ value: string | Array<string>;
1864
+ }
1865
+
1866
+ /**
1867
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1868
+ * EIP-712.
1869
+ */
1870
+ export interface EthereumTypedDataMessageCondition {
1871
+ field: string;
1872
+
1873
+ field_source: 'ethereum_typed_data_message';
1874
+
1875
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1876
+
1877
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
1878
+
1879
+ value: string | Array<string>;
1880
+ }
1881
+
1882
+ export namespace EthereumTypedDataMessageCondition {
1883
+ export interface TypedData {
1884
+ primary_type: string;
1885
+
1886
+ types: { [key: string]: Array<TypedData.Type> };
1887
+ }
1888
+
1889
+ export namespace TypedData {
1890
+ export interface Type {
1891
+ name: string;
1892
+
1893
+ type: string;
1894
+ }
1895
+ }
1896
+ }
1897
+
1898
+ /**
1899
+ * Allowed contract addresses for eth_signAuthorization requests.
1900
+ */
1901
+ export interface Ethereum7702AuthorizationCondition {
1902
+ field: 'contract';
1903
+
1904
+ field_source: 'ethereum_7702_authorization';
1905
+
1906
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1907
+
1908
+ value: string | Array<string>;
1909
+ }
1910
+
1911
+ /**
1912
+ * Solana Program attributes, enables allowlisting Solana Programs.
1913
+ */
1914
+ export interface SolanaProgramInstructionCondition {
1915
+ field: 'programId';
1916
+
1917
+ field_source: 'solana_program_instruction';
1918
+
1919
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1920
+
1921
+ value: string | Array<string>;
1922
+ }
1923
+
1924
+ /**
1925
+ * Solana System Program attributes, including more granular Transfer instruction
1926
+ * fields.
1927
+ */
1928
+ export interface SolanaSystemProgramInstructionCondition {
1929
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1930
+
1931
+ field_source: 'solana_system_program_instruction';
1932
+
1933
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1934
+
1935
+ value: string | Array<string>;
1936
+ }
1937
+
1938
+ /**
1939
+ * Solana Token Program attributes, including more granular TransferChecked
1940
+ * instruction fields.
1941
+ */
1942
+ export interface SolanaTokenProgramInstructionCondition {
1943
+ field:
1944
+ | 'instructionName'
1945
+ | 'TransferChecked.source'
1946
+ | 'TransferChecked.destination'
1947
+ | 'TransferChecked.authority'
1948
+ | 'TransferChecked.amount'
1949
+ | 'TransferChecked.mint';
1950
+
1951
+ field_source: 'solana_token_program_instruction';
1952
+
1953
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1954
+
1955
+ value: string | Array<string>;
1956
+ }
1957
+
1958
+ /**
1959
+ * System attributes, including current unix timestamp (in seconds).
1960
+ */
1961
+ export interface SystemCondition {
1962
+ field: 'current_unix_timestamp';
1963
+
1964
+ field_source: 'system';
1965
+
1966
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in';
1967
+
1968
+ value: string | Array<string>;
1969
+ }
1970
+ }
1971
+
1972
+ export interface PolicyGetRuleParams {
1973
+ policy_id: string;
1974
+ }
1975
+
1976
+ export declare namespace Policies {
1977
+ export {
1978
+ type Policy as Policy,
1979
+ type PolicyCreateRuleResponse as PolicyCreateRuleResponse,
1980
+ type PolicyDeleteResponse as PolicyDeleteResponse,
1981
+ type PolicyDeleteRuleResponse as PolicyDeleteRuleResponse,
1982
+ type PolicyUpdateRuleResponse as PolicyUpdateRuleResponse,
1983
+ type PolicyGetRuleResponse as PolicyGetRuleResponse,
1984
+ type PolicyCreateParams as PolicyCreateParams,
1985
+ type PolicyCreateRuleParams as PolicyCreateRuleParams,
1986
+ type PolicyDeleteParams as PolicyDeleteParams,
1987
+ type PolicyDeleteRuleParams as PolicyDeleteRuleParams,
1988
+ type PolicyUpdateParams as PolicyUpdateParams,
1989
+ type PolicyUpdateRuleParams as PolicyUpdateRuleParams,
1990
+ type PolicyGetRuleParams as PolicyGetRuleParams,
1991
+ };
1992
+ }