@privy-io/api-types 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (507) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/LICENSE +201 -0
  3. package/README.md +364 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +233 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +233 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +517 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +513 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/pagination.d.mts +54 -0
  37. package/core/pagination.d.mts.map +1 -0
  38. package/core/pagination.d.ts +54 -0
  39. package/core/pagination.d.ts.map +1 -0
  40. package/core/pagination.js +101 -0
  41. package/core/pagination.js.map +1 -0
  42. package/core/pagination.mjs +95 -0
  43. package/core/pagination.mjs.map +1 -0
  44. package/core/resource.d.mts +6 -0
  45. package/core/resource.d.mts.map +1 -0
  46. package/core/resource.d.ts +6 -0
  47. package/core/resource.d.ts.map +1 -0
  48. package/core/resource.js +11 -0
  49. package/core/resource.js.map +1 -0
  50. package/core/resource.mjs +7 -0
  51. package/core/resource.mjs.map +1 -0
  52. package/core/uploads.d.mts +3 -0
  53. package/core/uploads.d.mts.map +1 -0
  54. package/core/uploads.d.ts +3 -0
  55. package/core/uploads.d.ts.map +1 -0
  56. package/core/uploads.js +6 -0
  57. package/core/uploads.js.map +1 -0
  58. package/core/uploads.mjs +2 -0
  59. package/core/uploads.mjs.map +1 -0
  60. package/error.d.mts +2 -0
  61. package/error.d.mts.map +1 -0
  62. package/error.d.ts +2 -0
  63. package/error.d.ts.map +1 -0
  64. package/error.js +6 -0
  65. package/error.js.map +1 -0
  66. package/error.mjs +2 -0
  67. package/error.mjs.map +1 -0
  68. package/index.d.mts +2 -0
  69. package/index.d.mts.map +1 -0
  70. package/index.d.ts +2 -0
  71. package/index.d.ts.map +1 -0
  72. package/index.js +9 -0
  73. package/index.js.map +1 -0
  74. package/index.mjs +3 -0
  75. package/index.mjs.map +1 -0
  76. package/internal/builtin-types.d.mts +73 -0
  77. package/internal/builtin-types.d.mts.map +1 -0
  78. package/internal/builtin-types.d.ts +73 -0
  79. package/internal/builtin-types.d.ts.map +1 -0
  80. package/internal/builtin-types.js +4 -0
  81. package/internal/builtin-types.js.map +1 -0
  82. package/internal/builtin-types.mjs +3 -0
  83. package/internal/builtin-types.mjs.map +1 -0
  84. package/internal/detect-platform.d.mts +15 -0
  85. package/internal/detect-platform.d.mts.map +1 -0
  86. package/internal/detect-platform.d.ts +15 -0
  87. package/internal/detect-platform.d.ts.map +1 -0
  88. package/internal/detect-platform.js +162 -0
  89. package/internal/detect-platform.js.map +1 -0
  90. package/internal/detect-platform.mjs +157 -0
  91. package/internal/detect-platform.mjs.map +1 -0
  92. package/internal/errors.d.mts +3 -0
  93. package/internal/errors.d.mts.map +1 -0
  94. package/internal/errors.d.ts +3 -0
  95. package/internal/errors.d.ts.map +1 -0
  96. package/internal/errors.js +41 -0
  97. package/internal/errors.js.map +1 -0
  98. package/internal/errors.mjs +36 -0
  99. package/internal/errors.mjs.map +1 -0
  100. package/internal/headers.d.mts +20 -0
  101. package/internal/headers.d.mts.map +1 -0
  102. package/internal/headers.d.ts +20 -0
  103. package/internal/headers.d.ts.map +1 -0
  104. package/internal/headers.js +79 -0
  105. package/internal/headers.js.map +1 -0
  106. package/internal/headers.mjs +74 -0
  107. package/internal/headers.mjs.map +1 -0
  108. package/internal/parse.d.mts +12 -0
  109. package/internal/parse.d.mts.map +1 -0
  110. package/internal/parse.d.ts +12 -0
  111. package/internal/parse.d.ts.map +1 -0
  112. package/internal/parse.js +35 -0
  113. package/internal/parse.js.map +1 -0
  114. package/internal/parse.mjs +32 -0
  115. package/internal/parse.mjs.map +1 -0
  116. package/internal/qs/formats.d.mts +7 -0
  117. package/internal/qs/formats.d.mts.map +1 -0
  118. package/internal/qs/formats.d.ts +7 -0
  119. package/internal/qs/formats.d.ts.map +1 -0
  120. package/internal/qs/formats.js +13 -0
  121. package/internal/qs/formats.js.map +1 -0
  122. package/internal/qs/formats.mjs +9 -0
  123. package/internal/qs/formats.mjs.map +1 -0
  124. package/internal/qs/index.d.mts +10 -0
  125. package/internal/qs/index.d.mts.map +1 -0
  126. package/internal/qs/index.d.ts +10 -0
  127. package/internal/qs/index.d.ts.map +1 -0
  128. package/internal/qs/index.js +14 -0
  129. package/internal/qs/index.js.map +1 -0
  130. package/internal/qs/index.mjs +10 -0
  131. package/internal/qs/index.mjs.map +1 -0
  132. package/internal/qs/stringify.d.mts +3 -0
  133. package/internal/qs/stringify.d.mts.map +1 -0
  134. package/internal/qs/stringify.d.ts +3 -0
  135. package/internal/qs/stringify.d.ts.map +1 -0
  136. package/internal/qs/stringify.js +277 -0
  137. package/internal/qs/stringify.js.map +1 -0
  138. package/internal/qs/stringify.mjs +274 -0
  139. package/internal/qs/stringify.mjs.map +1 -0
  140. package/internal/qs/types.d.mts +57 -0
  141. package/internal/qs/types.d.mts.map +1 -0
  142. package/internal/qs/types.d.ts +57 -0
  143. package/internal/qs/types.d.ts.map +1 -0
  144. package/internal/qs/types.js +3 -0
  145. package/internal/qs/types.js.map +1 -0
  146. package/internal/qs/types.mjs +2 -0
  147. package/internal/qs/types.mjs.map +1 -0
  148. package/internal/qs/utils.d.mts +15 -0
  149. package/internal/qs/utils.d.mts.map +1 -0
  150. package/internal/qs/utils.d.ts +15 -0
  151. package/internal/qs/utils.d.ts.map +1 -0
  152. package/internal/qs/utils.js +230 -0
  153. package/internal/qs/utils.js.map +1 -0
  154. package/internal/qs/utils.mjs +217 -0
  155. package/internal/qs/utils.mjs.map +1 -0
  156. package/internal/request-options.d.mts +75 -0
  157. package/internal/request-options.d.mts.map +1 -0
  158. package/internal/request-options.d.ts +75 -0
  159. package/internal/request-options.d.ts.map +1 -0
  160. package/internal/request-options.js +14 -0
  161. package/internal/request-options.js.map +1 -0
  162. package/internal/request-options.mjs +10 -0
  163. package/internal/request-options.mjs.map +1 -0
  164. package/internal/shim-types.d.mts +17 -0
  165. package/internal/shim-types.d.mts.map +1 -0
  166. package/internal/shim-types.d.ts +17 -0
  167. package/internal/shim-types.d.ts.map +1 -0
  168. package/internal/shim-types.js +4 -0
  169. package/internal/shim-types.js.map +1 -0
  170. package/internal/shim-types.mjs +3 -0
  171. package/internal/shim-types.mjs.map +1 -0
  172. package/internal/shims.d.mts +20 -0
  173. package/internal/shims.d.mts.map +1 -0
  174. package/internal/shims.d.ts +20 -0
  175. package/internal/shims.d.ts.map +1 -0
  176. package/internal/shims.js +92 -0
  177. package/internal/shims.js.map +1 -0
  178. package/internal/shims.mjs +85 -0
  179. package/internal/shims.mjs.map +1 -0
  180. package/internal/to-file.d.mts +45 -0
  181. package/internal/to-file.d.mts.map +1 -0
  182. package/internal/to-file.d.ts +45 -0
  183. package/internal/to-file.d.ts.map +1 -0
  184. package/internal/to-file.js +91 -0
  185. package/internal/to-file.js.map +1 -0
  186. package/internal/to-file.mjs +88 -0
  187. package/internal/to-file.mjs.map +1 -0
  188. package/internal/tslib.js +81 -0
  189. package/internal/tslib.mjs +17 -0
  190. package/internal/types.d.mts +69 -0
  191. package/internal/types.d.mts.map +1 -0
  192. package/internal/types.d.ts +69 -0
  193. package/internal/types.d.ts.map +1 -0
  194. package/internal/types.js +4 -0
  195. package/internal/types.js.map +1 -0
  196. package/internal/types.mjs +3 -0
  197. package/internal/types.mjs.map +1 -0
  198. package/internal/uploads.d.mts +42 -0
  199. package/internal/uploads.d.mts.map +1 -0
  200. package/internal/uploads.d.ts +42 -0
  201. package/internal/uploads.d.ts.map +1 -0
  202. package/internal/uploads.js +141 -0
  203. package/internal/uploads.js.map +1 -0
  204. package/internal/uploads.mjs +131 -0
  205. package/internal/uploads.mjs.map +1 -0
  206. package/internal/utils/base64.d.mts +3 -0
  207. package/internal/utils/base64.d.mts.map +1 -0
  208. package/internal/utils/base64.d.ts +3 -0
  209. package/internal/utils/base64.d.ts.map +1 -0
  210. package/internal/utils/base64.js +38 -0
  211. package/internal/utils/base64.js.map +1 -0
  212. package/internal/utils/base64.mjs +33 -0
  213. package/internal/utils/base64.mjs.map +1 -0
  214. package/internal/utils/bytes.d.mts +4 -0
  215. package/internal/utils/bytes.d.mts.map +1 -0
  216. package/internal/utils/bytes.d.ts +4 -0
  217. package/internal/utils/bytes.d.ts.map +1 -0
  218. package/internal/utils/bytes.js +31 -0
  219. package/internal/utils/bytes.js.map +1 -0
  220. package/internal/utils/bytes.mjs +26 -0
  221. package/internal/utils/bytes.mjs.map +1 -0
  222. package/internal/utils/env.d.mts +9 -0
  223. package/internal/utils/env.d.mts.map +1 -0
  224. package/internal/utils/env.d.ts +9 -0
  225. package/internal/utils/env.d.ts.map +1 -0
  226. package/internal/utils/env.js +22 -0
  227. package/internal/utils/env.js.map +1 -0
  228. package/internal/utils/env.mjs +18 -0
  229. package/internal/utils/env.mjs.map +1 -0
  230. package/internal/utils/log.d.mts +37 -0
  231. package/internal/utils/log.d.mts.map +1 -0
  232. package/internal/utils/log.d.ts +37 -0
  233. package/internal/utils/log.d.ts.map +1 -0
  234. package/internal/utils/log.js +85 -0
  235. package/internal/utils/log.js.map +1 -0
  236. package/internal/utils/log.mjs +79 -0
  237. package/internal/utils/log.mjs.map +1 -0
  238. package/internal/utils/path.d.mts +15 -0
  239. package/internal/utils/path.d.mts.map +1 -0
  240. package/internal/utils/path.d.ts +15 -0
  241. package/internal/utils/path.d.ts.map +1 -0
  242. package/internal/utils/path.js +79 -0
  243. package/internal/utils/path.js.map +1 -0
  244. package/internal/utils/path.mjs +74 -0
  245. package/internal/utils/path.mjs.map +1 -0
  246. package/internal/utils/sleep.d.mts +2 -0
  247. package/internal/utils/sleep.d.mts.map +1 -0
  248. package/internal/utils/sleep.d.ts +2 -0
  249. package/internal/utils/sleep.d.ts.map +1 -0
  250. package/internal/utils/sleep.js +7 -0
  251. package/internal/utils/sleep.js.map +1 -0
  252. package/internal/utils/sleep.mjs +3 -0
  253. package/internal/utils/sleep.mjs.map +1 -0
  254. package/internal/utils/uuid.d.mts +5 -0
  255. package/internal/utils/uuid.d.mts.map +1 -0
  256. package/internal/utils/uuid.d.ts +5 -0
  257. package/internal/utils/uuid.d.ts.map +1 -0
  258. package/internal/utils/uuid.js +19 -0
  259. package/internal/utils/uuid.js.map +1 -0
  260. package/internal/utils/uuid.mjs +15 -0
  261. package/internal/utils/uuid.mjs.map +1 -0
  262. package/internal/utils/values.d.mts +18 -0
  263. package/internal/utils/values.d.mts.map +1 -0
  264. package/internal/utils/values.d.ts +18 -0
  265. package/internal/utils/values.d.ts.map +1 -0
  266. package/internal/utils/values.js +112 -0
  267. package/internal/utils/values.js.map +1 -0
  268. package/internal/utils/values.mjs +94 -0
  269. package/internal/utils/values.mjs.map +1 -0
  270. package/internal/utils.d.mts +7 -0
  271. package/internal/utils.d.mts.map +1 -0
  272. package/internal/utils.d.ts +7 -0
  273. package/internal/utils.d.ts.map +1 -0
  274. package/internal/utils.js +11 -0
  275. package/internal/utils.js.map +1 -0
  276. package/internal/utils.mjs +8 -0
  277. package/internal/utils.mjs.map +1 -0
  278. package/package.json +148 -0
  279. package/pagination.d.mts +2 -0
  280. package/pagination.d.mts.map +1 -0
  281. package/pagination.d.ts +2 -0
  282. package/pagination.d.ts.map +1 -0
  283. package/pagination.js +6 -0
  284. package/pagination.js.map +1 -0
  285. package/pagination.mjs +2 -0
  286. package/pagination.mjs.map +1 -0
  287. package/resource.d.mts +2 -0
  288. package/resource.d.mts.map +1 -0
  289. package/resource.d.ts +2 -0
  290. package/resource.d.ts.map +1 -0
  291. package/resource.js +6 -0
  292. package/resource.js.map +1 -0
  293. package/resource.mjs +2 -0
  294. package/resource.mjs.map +1 -0
  295. package/resources/analytics.d.mts +17 -0
  296. package/resources/analytics.d.mts.map +1 -0
  297. package/resources/analytics.d.ts +17 -0
  298. package/resources/analytics.d.ts.map +1 -0
  299. package/resources/analytics.js +9 -0
  300. package/resources/analytics.js.map +1 -0
  301. package/resources/analytics.mjs +5 -0
  302. package/resources/analytics.mjs.map +1 -0
  303. package/resources/apps.d.mts +126 -0
  304. package/resources/apps.d.mts.map +1 -0
  305. package/resources/apps.d.ts +126 -0
  306. package/resources/apps.d.ts.map +1 -0
  307. package/resources/apps.js +9 -0
  308. package/resources/apps.js.map +1 -0
  309. package/resources/apps.mjs +5 -0
  310. package/resources/apps.mjs.map +1 -0
  311. package/resources/client-auth.d.mts +874 -0
  312. package/resources/client-auth.d.mts.map +1 -0
  313. package/resources/client-auth.d.ts +874 -0
  314. package/resources/client-auth.d.ts.map +1 -0
  315. package/resources/client-auth.js +9 -0
  316. package/resources/client-auth.js.map +1 -0
  317. package/resources/client-auth.mjs +5 -0
  318. package/resources/client-auth.mjs.map +1 -0
  319. package/resources/cross-app.d.mts +24 -0
  320. package/resources/cross-app.d.mts.map +1 -0
  321. package/resources/cross-app.d.ts +24 -0
  322. package/resources/cross-app.d.ts.map +1 -0
  323. package/resources/cross-app.js +9 -0
  324. package/resources/cross-app.js.map +1 -0
  325. package/resources/cross-app.mjs +5 -0
  326. package/resources/cross-app.mjs.map +1 -0
  327. package/resources/embedded-wallets.d.mts +125 -0
  328. package/resources/embedded-wallets.d.mts.map +1 -0
  329. package/resources/embedded-wallets.d.ts +125 -0
  330. package/resources/embedded-wallets.d.ts.map +1 -0
  331. package/resources/embedded-wallets.js +9 -0
  332. package/resources/embedded-wallets.js.map +1 -0
  333. package/resources/embedded-wallets.mjs +5 -0
  334. package/resources/embedded-wallets.mjs.map +1 -0
  335. package/resources/funding.d.mts +101 -0
  336. package/resources/funding.d.mts.map +1 -0
  337. package/resources/funding.d.ts +101 -0
  338. package/resources/funding.d.ts.map +1 -0
  339. package/resources/funding.js +9 -0
  340. package/resources/funding.js.map +1 -0
  341. package/resources/funding.mjs +5 -0
  342. package/resources/funding.mjs.map +1 -0
  343. package/resources/index.d.mts +12 -0
  344. package/resources/index.d.mts.map +1 -0
  345. package/resources/index.d.ts +12 -0
  346. package/resources/index.d.ts.map +1 -0
  347. package/resources/index.js +27 -0
  348. package/resources/index.js.map +1 -0
  349. package/resources/index.mjs +13 -0
  350. package/resources/index.mjs.map +1 -0
  351. package/resources/key-quorums.d.mts +106 -0
  352. package/resources/key-quorums.d.mts.map +1 -0
  353. package/resources/key-quorums.d.ts +106 -0
  354. package/resources/key-quorums.d.ts.map +1 -0
  355. package/resources/key-quorums.js +84 -0
  356. package/resources/key-quorums.js.map +1 -0
  357. package/resources/key-quorums.mjs +80 -0
  358. package/resources/key-quorums.mjs.map +1 -0
  359. package/resources/policies.d.mts +1284 -0
  360. package/resources/policies.d.mts.map +1 -0
  361. package/resources/policies.d.ts +1284 -0
  362. package/resources/policies.d.ts.map +1 -0
  363. package/resources/policies.js +228 -0
  364. package/resources/policies.js.map +1 -0
  365. package/resources/policies.mjs +224 -0
  366. package/resources/policies.mjs.map +1 -0
  367. package/resources/transactions.d.mts +134 -0
  368. package/resources/transactions.d.mts.map +1 -0
  369. package/resources/transactions.d.ts +134 -0
  370. package/resources/transactions.d.ts.map +1 -0
  371. package/resources/transactions.js +23 -0
  372. package/resources/transactions.js.map +1 -0
  373. package/resources/transactions.mjs +19 -0
  374. package/resources/transactions.mjs.map +1 -0
  375. package/resources/users.d.mts +901 -0
  376. package/resources/users.d.mts.map +1 -0
  377. package/resources/users.d.ts +901 -0
  378. package/resources/users.d.ts.map +1 -0
  379. package/resources/users.js +278 -0
  380. package/resources/users.js.map +1 -0
  381. package/resources/users.mjs +274 -0
  382. package/resources/users.mjs.map +1 -0
  383. package/resources/wallets/balance.d.mts +40 -0
  384. package/resources/wallets/balance.d.mts.map +1 -0
  385. package/resources/wallets/balance.d.ts +40 -0
  386. package/resources/wallets/balance.d.ts.map +1 -0
  387. package/resources/wallets/balance.js +24 -0
  388. package/resources/wallets/balance.js.map +1 -0
  389. package/resources/wallets/balance.mjs +20 -0
  390. package/resources/wallets/balance.mjs.map +1 -0
  391. package/resources/wallets/index.d.mts +4 -0
  392. package/resources/wallets/index.d.mts.map +1 -0
  393. package/resources/wallets/index.d.ts +4 -0
  394. package/resources/wallets/index.d.ts.map +1 -0
  395. package/resources/wallets/index.js +11 -0
  396. package/resources/wallets/index.js.map +1 -0
  397. package/resources/wallets/index.mjs +5 -0
  398. package/resources/wallets/index.mjs.map +1 -0
  399. package/resources/wallets/transactions.d.mts +73 -0
  400. package/resources/wallets/transactions.d.mts.map +1 -0
  401. package/resources/wallets/transactions.d.ts +73 -0
  402. package/resources/wallets/transactions.d.ts.map +1 -0
  403. package/resources/wallets/transactions.js +24 -0
  404. package/resources/wallets/transactions.js.map +1 -0
  405. package/resources/wallets/transactions.mjs +20 -0
  406. package/resources/wallets/transactions.mjs.map +1 -0
  407. package/resources/wallets/wallets.d.mts +1137 -0
  408. package/resources/wallets/wallets.d.mts.map +1 -0
  409. package/resources/wallets/wallets.d.ts +1137 -0
  410. package/resources/wallets/wallets.d.ts.map +1 -0
  411. package/resources/wallets/wallets.js +235 -0
  412. package/resources/wallets/wallets.js.map +1 -0
  413. package/resources/wallets/wallets.mjs +230 -0
  414. package/resources/wallets/wallets.mjs.map +1 -0
  415. package/resources/wallets.d.mts +2 -0
  416. package/resources/wallets.d.mts.map +1 -0
  417. package/resources/wallets.d.ts +2 -0
  418. package/resources/wallets.d.ts.map +1 -0
  419. package/resources/wallets.js +6 -0
  420. package/resources/wallets.js.map +1 -0
  421. package/resources/wallets.mjs +3 -0
  422. package/resources/wallets.mjs.map +1 -0
  423. package/resources.d.mts +2 -0
  424. package/resources.d.mts.map +1 -0
  425. package/resources.d.ts +2 -0
  426. package/resources.d.ts.map +1 -0
  427. package/resources.js +5 -0
  428. package/resources.js.map +1 -0
  429. package/resources.mjs +2 -0
  430. package/resources.mjs.map +1 -0
  431. package/src/api-promise.ts +2 -0
  432. package/src/client.ts +1200 -0
  433. package/src/core/README.md +3 -0
  434. package/src/core/api-promise.ts +92 -0
  435. package/src/core/error.ts +130 -0
  436. package/src/core/pagination.ts +152 -0
  437. package/src/core/resource.ts +11 -0
  438. package/src/core/uploads.ts +2 -0
  439. package/src/error.ts +2 -0
  440. package/src/index.ts +3 -0
  441. package/src/internal/README.md +3 -0
  442. package/src/internal/builtin-types.ts +93 -0
  443. package/src/internal/detect-platform.ts +196 -0
  444. package/src/internal/errors.ts +33 -0
  445. package/src/internal/headers.ts +97 -0
  446. package/src/internal/parse.ts +50 -0
  447. package/src/internal/qs/LICENSE.md +13 -0
  448. package/src/internal/qs/README.md +3 -0
  449. package/src/internal/qs/formats.ts +10 -0
  450. package/src/internal/qs/index.ts +13 -0
  451. package/src/internal/qs/stringify.ts +385 -0
  452. package/src/internal/qs/types.ts +71 -0
  453. package/src/internal/qs/utils.ts +265 -0
  454. package/src/internal/request-options.ts +91 -0
  455. package/src/internal/shim-types.ts +26 -0
  456. package/src/internal/shims.ts +107 -0
  457. package/src/internal/to-file.ts +154 -0
  458. package/src/internal/types.ts +95 -0
  459. package/src/internal/uploads.ts +187 -0
  460. package/src/internal/utils/base64.ts +40 -0
  461. package/src/internal/utils/bytes.ts +32 -0
  462. package/src/internal/utils/env.ts +18 -0
  463. package/src/internal/utils/log.ts +126 -0
  464. package/src/internal/utils/path.ts +88 -0
  465. package/src/internal/utils/sleep.ts +3 -0
  466. package/src/internal/utils/uuid.ts +17 -0
  467. package/src/internal/utils/values.ts +105 -0
  468. package/src/internal/utils.ts +8 -0
  469. package/src/lib/.keep +4 -0
  470. package/src/pagination.ts +2 -0
  471. package/src/resource.ts +2 -0
  472. package/src/resources/analytics.ts +20 -0
  473. package/src/resources/apps.ts +213 -0
  474. package/src/resources/client-auth.ts +1323 -0
  475. package/src/resources/cross-app.ts +34 -0
  476. package/src/resources/embedded-wallets.ts +203 -0
  477. package/src/resources/funding.ts +225 -0
  478. package/src/resources/index.ts +191 -0
  479. package/src/resources/key-quorums.ts +177 -0
  480. package/src/resources/policies.ts +1993 -0
  481. package/src/resources/transactions.ts +208 -0
  482. package/src/resources/users.ts +1552 -0
  483. package/src/resources/wallets/balance.ts +103 -0
  484. package/src/resources/wallets/index.ts +29 -0
  485. package/src/resources/wallets/transactions.ts +156 -0
  486. package/src/resources/wallets/wallets.ts +1615 -0
  487. package/src/resources/wallets.ts +3 -0
  488. package/src/resources.ts +1 -0
  489. package/src/tsconfig.json +11 -0
  490. package/src/uploads.ts +2 -0
  491. package/src/version.ts +1 -0
  492. package/uploads.d.mts +2 -0
  493. package/uploads.d.mts.map +1 -0
  494. package/uploads.d.ts +2 -0
  495. package/uploads.d.ts.map +1 -0
  496. package/uploads.js +6 -0
  497. package/uploads.js.map +1 -0
  498. package/uploads.mjs +2 -0
  499. package/uploads.mjs.map +1 -0
  500. package/version.d.mts +2 -0
  501. package/version.d.mts.map +1 -0
  502. package/version.d.ts +2 -0
  503. package/version.d.ts.map +1 -0
  504. package/version.js +5 -0
  505. package/version.js.map +1 -0
  506. package/version.mjs +2 -0
  507. package/version.mjs.map +1 -0
@@ -0,0 +1,1284 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class Policies extends APIResource {
5
+ /**
6
+ * Create a new policy.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const policy = await client.policies.create({
11
+ * chain_type: 'ethereum',
12
+ * name: 'x',
13
+ * rules: [
14
+ * {
15
+ * action: 'ALLOW',
16
+ * conditions: [
17
+ * {
18
+ * field: 'to',
19
+ * field_source: 'ethereum_transaction',
20
+ * operator: 'eq',
21
+ * value: 'string',
22
+ * },
23
+ * ],
24
+ * method: 'eth_sendTransaction',
25
+ * name: 'x',
26
+ * },
27
+ * ],
28
+ * version: '1.0',
29
+ * });
30
+ * ```
31
+ */
32
+ create(params: PolicyCreateParams, options?: RequestOptions): APIPromise<Policy>;
33
+ /**
34
+ * Create a new rule for a policy.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const response = await client.policies._createRule(
39
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
40
+ * {
41
+ * action: 'ALLOW',
42
+ * conditions: [
43
+ * {
44
+ * field: 'to',
45
+ * field_source: 'ethereum_transaction',
46
+ * operator: 'eq',
47
+ * value: 'string',
48
+ * },
49
+ * ],
50
+ * method: 'eth_sendTransaction',
51
+ * name: 'x',
52
+ * },
53
+ * );
54
+ * ```
55
+ */
56
+ _createRule(policyID: string, params: PolicyCreateRuleParams, options?: RequestOptions): APIPromise<PolicyCreateRuleResponse>;
57
+ /**
58
+ * Delete a policy by policy ID.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * const response = await client.policies._delete(
63
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
64
+ * );
65
+ * ```
66
+ */
67
+ _delete(policyID: string, params?: PolicyDeleteParams | null | undefined, options?: RequestOptions): APIPromise<PolicyDeleteResponse>;
68
+ /**
69
+ * Delete a rule by policy ID and rule ID.
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * const response = await client.policies._deleteRule(
74
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
75
+ * { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
76
+ * );
77
+ * ```
78
+ */
79
+ _deleteRule(ruleID: string, params: PolicyDeleteRuleParams, options?: RequestOptions): APIPromise<PolicyDeleteRuleResponse>;
80
+ /**
81
+ * Update a policy by policy ID.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * const policy = await client.policies._update(
86
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
87
+ * );
88
+ * ```
89
+ */
90
+ _update(policyID: string, params: PolicyUpdateParams, options?: RequestOptions): APIPromise<Policy>;
91
+ /**
92
+ * Update a rule by policy ID and rule ID.
93
+ *
94
+ * @example
95
+ * ```ts
96
+ * const response = await client.policies._updateRule(
97
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
98
+ * {
99
+ * policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
100
+ * action: 'ALLOW',
101
+ * conditions: [
102
+ * {
103
+ * field: 'to',
104
+ * field_source: 'ethereum_transaction',
105
+ * operator: 'eq',
106
+ * value: 'string',
107
+ * },
108
+ * ],
109
+ * method: 'eth_sendTransaction',
110
+ * name: 'x',
111
+ * },
112
+ * );
113
+ * ```
114
+ */
115
+ _updateRule(ruleID: string, params: PolicyUpdateRuleParams, options?: RequestOptions): APIPromise<PolicyUpdateRuleResponse>;
116
+ /**
117
+ * Get a policy by policy ID.
118
+ *
119
+ * @example
120
+ * ```ts
121
+ * const policy = await client.policies.get(
122
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
123
+ * );
124
+ * ```
125
+ */
126
+ get(policyID: string, options?: RequestOptions): APIPromise<Policy>;
127
+ /**
128
+ * Get a rule by policy ID and rule ID.
129
+ *
130
+ * @example
131
+ * ```ts
132
+ * const response = await client.policies.getRule(
133
+ * 'xxxxxxxxxxxxxxxxxxxxxxxx',
134
+ * { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
135
+ * );
136
+ * ```
137
+ */
138
+ getRule(ruleID: string, params: PolicyGetRuleParams, options?: RequestOptions): APIPromise<PolicyGetRuleResponse>;
139
+ }
140
+ export interface Policy {
141
+ /**
142
+ * Unique ID of the created policy. This will be the primary identifier when using
143
+ * the policy in the future.
144
+ */
145
+ id: string;
146
+ /**
147
+ * The chain type the policy applies to.
148
+ */
149
+ chain_type: 'ethereum' | 'solana';
150
+ /**
151
+ * Unix timestamp of when the policy was created in milliseconds.
152
+ */
153
+ created_at: number;
154
+ /**
155
+ * Name to assign to policy.
156
+ */
157
+ name: string;
158
+ /**
159
+ * The key quorum ID of the owner of the policy.
160
+ */
161
+ owner_id: string | null;
162
+ rules: Array<Policy.Rule>;
163
+ /**
164
+ * Version of the policy. Currently, 1.0 is the only version.
165
+ */
166
+ version: '1.0';
167
+ }
168
+ export declare namespace Policy {
169
+ /**
170
+ * A rule that defines the conditions and action to take if the conditions are
171
+ * true.
172
+ */
173
+ interface Rule {
174
+ id: string;
175
+ /**
176
+ * Action to take if the conditions are true.
177
+ */
178
+ action: 'ALLOW' | 'DENY';
179
+ conditions: Array<Rule.EthereumTransactionCondition | Rule.EthereumCalldataCondition | Rule.EthereumTypedDataDomainCondition | Rule.EthereumTypedDataMessageCondition | Rule.Ethereum7702AuthorizationCondition | Rule.SolanaProgramInstructionCondition | Rule.SolanaSystemProgramInstructionCondition | Rule.SolanaTokenProgramInstructionCondition | Rule.SystemCondition>;
180
+ /**
181
+ * Method the rule applies to.
182
+ */
183
+ method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | '*';
184
+ name: string;
185
+ }
186
+ namespace Rule {
187
+ /**
188
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
189
+ * eth_sendTransaction request.
190
+ */
191
+ interface EthereumTransactionCondition {
192
+ field: 'to' | 'value';
193
+ field_source: 'ethereum_transaction';
194
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
195
+ value: string | Array<string>;
196
+ }
197
+ /**
198
+ * The decoded calldata in a smart contract interaction as the smart contract
199
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
200
+ * an abi parameter with the JSON ABI of the smart contract.
201
+ */
202
+ interface EthereumCalldataCondition {
203
+ abi: unknown;
204
+ field: string;
205
+ field_source: 'ethereum_calldata';
206
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
207
+ value: string | Array<string>;
208
+ }
209
+ /**
210
+ * Attributes from the signing domain that will verify the signature.
211
+ */
212
+ interface EthereumTypedDataDomainCondition {
213
+ field: 'chainId' | 'verifyingContract';
214
+ field_source: 'ethereum_typed_data_domain';
215
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
216
+ value: string | Array<string>;
217
+ }
218
+ /**
219
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
220
+ * EIP-712.
221
+ */
222
+ interface EthereumTypedDataMessageCondition {
223
+ field: string;
224
+ field_source: 'ethereum_typed_data_message';
225
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
226
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
227
+ value: string | Array<string>;
228
+ }
229
+ namespace EthereumTypedDataMessageCondition {
230
+ interface TypedData {
231
+ primary_type: string;
232
+ types: {
233
+ [key: string]: Array<TypedData.Type>;
234
+ };
235
+ }
236
+ namespace TypedData {
237
+ interface Type {
238
+ name: string;
239
+ type: string;
240
+ }
241
+ }
242
+ }
243
+ /**
244
+ * Allowed contract addresses for eth_signAuthorization requests.
245
+ */
246
+ interface Ethereum7702AuthorizationCondition {
247
+ field: 'contract';
248
+ field_source: 'ethereum_7702_authorization';
249
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
250
+ value: string | Array<string>;
251
+ }
252
+ /**
253
+ * Solana Program attributes, enables allowlisting Solana Programs.
254
+ */
255
+ interface SolanaProgramInstructionCondition {
256
+ field: 'programId';
257
+ field_source: 'solana_program_instruction';
258
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
259
+ value: string | Array<string>;
260
+ }
261
+ /**
262
+ * Solana System Program attributes, including more granular Transfer instruction
263
+ * fields.
264
+ */
265
+ interface SolanaSystemProgramInstructionCondition {
266
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
267
+ field_source: 'solana_system_program_instruction';
268
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
269
+ value: string | Array<string>;
270
+ }
271
+ /**
272
+ * Solana Token Program attributes, including more granular TransferChecked
273
+ * instruction fields.
274
+ */
275
+ interface SolanaTokenProgramInstructionCondition {
276
+ field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
277
+ field_source: 'solana_token_program_instruction';
278
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
279
+ value: string | Array<string>;
280
+ }
281
+ /**
282
+ * System attributes, including current unix timestamp (in seconds).
283
+ */
284
+ interface SystemCondition {
285
+ field: 'current_unix_timestamp';
286
+ field_source: 'system';
287
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
288
+ value: string | Array<string>;
289
+ }
290
+ }
291
+ }
292
+ /**
293
+ * A rule that defines the conditions and action to take if the conditions are
294
+ * true.
295
+ */
296
+ export interface PolicyCreateRuleResponse {
297
+ id: string;
298
+ /**
299
+ * Action to take if the conditions are true.
300
+ */
301
+ action: 'ALLOW' | 'DENY';
302
+ conditions: Array<PolicyCreateRuleResponse.EthereumTransactionCondition | PolicyCreateRuleResponse.EthereumCalldataCondition | PolicyCreateRuleResponse.EthereumTypedDataDomainCondition | PolicyCreateRuleResponse.EthereumTypedDataMessageCondition | PolicyCreateRuleResponse.Ethereum7702AuthorizationCondition | PolicyCreateRuleResponse.SolanaProgramInstructionCondition | PolicyCreateRuleResponse.SolanaSystemProgramInstructionCondition | PolicyCreateRuleResponse.SolanaTokenProgramInstructionCondition | PolicyCreateRuleResponse.SystemCondition>;
303
+ /**
304
+ * Method the rule applies to.
305
+ */
306
+ method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | '*';
307
+ name: string;
308
+ }
309
+ export declare namespace PolicyCreateRuleResponse {
310
+ /**
311
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
312
+ * eth_sendTransaction request.
313
+ */
314
+ interface EthereumTransactionCondition {
315
+ field: 'to' | 'value';
316
+ field_source: 'ethereum_transaction';
317
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
318
+ value: string | Array<string>;
319
+ }
320
+ /**
321
+ * The decoded calldata in a smart contract interaction as the smart contract
322
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
323
+ * an abi parameter with the JSON ABI of the smart contract.
324
+ */
325
+ interface EthereumCalldataCondition {
326
+ abi: unknown;
327
+ field: string;
328
+ field_source: 'ethereum_calldata';
329
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
330
+ value: string | Array<string>;
331
+ }
332
+ /**
333
+ * Attributes from the signing domain that will verify the signature.
334
+ */
335
+ interface EthereumTypedDataDomainCondition {
336
+ field: 'chainId' | 'verifyingContract';
337
+ field_source: 'ethereum_typed_data_domain';
338
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
339
+ value: string | Array<string>;
340
+ }
341
+ /**
342
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
343
+ * EIP-712.
344
+ */
345
+ interface EthereumTypedDataMessageCondition {
346
+ field: string;
347
+ field_source: 'ethereum_typed_data_message';
348
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
349
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
350
+ value: string | Array<string>;
351
+ }
352
+ namespace EthereumTypedDataMessageCondition {
353
+ interface TypedData {
354
+ primary_type: string;
355
+ types: {
356
+ [key: string]: Array<TypedData.Type>;
357
+ };
358
+ }
359
+ namespace TypedData {
360
+ interface Type {
361
+ name: string;
362
+ type: string;
363
+ }
364
+ }
365
+ }
366
+ /**
367
+ * Allowed contract addresses for eth_signAuthorization requests.
368
+ */
369
+ interface Ethereum7702AuthorizationCondition {
370
+ field: 'contract';
371
+ field_source: 'ethereum_7702_authorization';
372
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
373
+ value: string | Array<string>;
374
+ }
375
+ /**
376
+ * Solana Program attributes, enables allowlisting Solana Programs.
377
+ */
378
+ interface SolanaProgramInstructionCondition {
379
+ field: 'programId';
380
+ field_source: 'solana_program_instruction';
381
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
382
+ value: string | Array<string>;
383
+ }
384
+ /**
385
+ * Solana System Program attributes, including more granular Transfer instruction
386
+ * fields.
387
+ */
388
+ interface SolanaSystemProgramInstructionCondition {
389
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
390
+ field_source: 'solana_system_program_instruction';
391
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
392
+ value: string | Array<string>;
393
+ }
394
+ /**
395
+ * Solana Token Program attributes, including more granular TransferChecked
396
+ * instruction fields.
397
+ */
398
+ interface SolanaTokenProgramInstructionCondition {
399
+ field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
400
+ field_source: 'solana_token_program_instruction';
401
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
402
+ value: string | Array<string>;
403
+ }
404
+ /**
405
+ * System attributes, including current unix timestamp (in seconds).
406
+ */
407
+ interface SystemCondition {
408
+ field: 'current_unix_timestamp';
409
+ field_source: 'system';
410
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
411
+ value: string | Array<string>;
412
+ }
413
+ }
414
+ export interface PolicyDeleteResponse {
415
+ /**
416
+ * Whether the policy was deleted successfully.
417
+ */
418
+ success: boolean;
419
+ }
420
+ export interface PolicyDeleteRuleResponse {
421
+ /**
422
+ * Whether the rule was deleted successfully.
423
+ */
424
+ success: boolean;
425
+ }
426
+ export interface PolicyUpdateRuleResponse {
427
+ id: string;
428
+ /**
429
+ * Action to take if the conditions are true.
430
+ */
431
+ action: 'ALLOW' | 'DENY';
432
+ conditions: Array<PolicyUpdateRuleResponse.EthereumTransactionCondition | PolicyUpdateRuleResponse.EthereumCalldataCondition | PolicyUpdateRuleResponse.EthereumTypedDataDomainCondition | PolicyUpdateRuleResponse.EthereumTypedDataMessageCondition | PolicyUpdateRuleResponse.Ethereum7702AuthorizationCondition | PolicyUpdateRuleResponse.SolanaProgramInstructionCondition | PolicyUpdateRuleResponse.SolanaSystemProgramInstructionCondition | PolicyUpdateRuleResponse.SolanaTokenProgramInstructionCondition | PolicyUpdateRuleResponse.SystemCondition>;
433
+ /**
434
+ * Method the rule applies to.
435
+ */
436
+ method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | '*';
437
+ name: string;
438
+ }
439
+ export declare namespace PolicyUpdateRuleResponse {
440
+ /**
441
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
442
+ * eth_sendTransaction request.
443
+ */
444
+ interface EthereumTransactionCondition {
445
+ field: 'to' | 'value';
446
+ field_source: 'ethereum_transaction';
447
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
448
+ value: string | Array<string>;
449
+ }
450
+ /**
451
+ * The decoded calldata in a smart contract interaction as the smart contract
452
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
453
+ * an abi parameter with the JSON ABI of the smart contract.
454
+ */
455
+ interface EthereumCalldataCondition {
456
+ abi: unknown;
457
+ field: string;
458
+ field_source: 'ethereum_calldata';
459
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
460
+ value: string | Array<string>;
461
+ }
462
+ /**
463
+ * Attributes from the signing domain that will verify the signature.
464
+ */
465
+ interface EthereumTypedDataDomainCondition {
466
+ field: 'chainId' | 'verifyingContract';
467
+ field_source: 'ethereum_typed_data_domain';
468
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
469
+ value: string | Array<string>;
470
+ }
471
+ /**
472
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
473
+ * EIP-712.
474
+ */
475
+ interface EthereumTypedDataMessageCondition {
476
+ field: string;
477
+ field_source: 'ethereum_typed_data_message';
478
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
479
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
480
+ value: string | Array<string>;
481
+ }
482
+ namespace EthereumTypedDataMessageCondition {
483
+ interface TypedData {
484
+ primary_type: string;
485
+ types: {
486
+ [key: string]: Array<TypedData.Type>;
487
+ };
488
+ }
489
+ namespace TypedData {
490
+ interface Type {
491
+ name: string;
492
+ type: string;
493
+ }
494
+ }
495
+ }
496
+ /**
497
+ * Allowed contract addresses for eth_signAuthorization requests.
498
+ */
499
+ interface Ethereum7702AuthorizationCondition {
500
+ field: 'contract';
501
+ field_source: 'ethereum_7702_authorization';
502
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
503
+ value: string | Array<string>;
504
+ }
505
+ /**
506
+ * Solana Program attributes, enables allowlisting Solana Programs.
507
+ */
508
+ interface SolanaProgramInstructionCondition {
509
+ field: 'programId';
510
+ field_source: 'solana_program_instruction';
511
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
512
+ value: string | Array<string>;
513
+ }
514
+ /**
515
+ * Solana System Program attributes, including more granular Transfer instruction
516
+ * fields.
517
+ */
518
+ interface SolanaSystemProgramInstructionCondition {
519
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
520
+ field_source: 'solana_system_program_instruction';
521
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
522
+ value: string | Array<string>;
523
+ }
524
+ /**
525
+ * Solana Token Program attributes, including more granular TransferChecked
526
+ * instruction fields.
527
+ */
528
+ interface SolanaTokenProgramInstructionCondition {
529
+ field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
530
+ field_source: 'solana_token_program_instruction';
531
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
532
+ value: string | Array<string>;
533
+ }
534
+ /**
535
+ * System attributes, including current unix timestamp (in seconds).
536
+ */
537
+ interface SystemCondition {
538
+ field: 'current_unix_timestamp';
539
+ field_source: 'system';
540
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
541
+ value: string | Array<string>;
542
+ }
543
+ }
544
+ /**
545
+ * A rule that defines the conditions and action to take if the conditions are
546
+ * true.
547
+ */
548
+ export interface PolicyGetRuleResponse {
549
+ id: string;
550
+ /**
551
+ * Action to take if the conditions are true.
552
+ */
553
+ action: 'ALLOW' | 'DENY';
554
+ conditions: Array<PolicyGetRuleResponse.EthereumTransactionCondition | PolicyGetRuleResponse.EthereumCalldataCondition | PolicyGetRuleResponse.EthereumTypedDataDomainCondition | PolicyGetRuleResponse.EthereumTypedDataMessageCondition | PolicyGetRuleResponse.Ethereum7702AuthorizationCondition | PolicyGetRuleResponse.SolanaProgramInstructionCondition | PolicyGetRuleResponse.SolanaSystemProgramInstructionCondition | PolicyGetRuleResponse.SolanaTokenProgramInstructionCondition | PolicyGetRuleResponse.SystemCondition>;
555
+ /**
556
+ * Method the rule applies to.
557
+ */
558
+ method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | '*';
559
+ name: string;
560
+ }
561
+ export declare namespace PolicyGetRuleResponse {
562
+ /**
563
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
564
+ * eth_sendTransaction request.
565
+ */
566
+ interface EthereumTransactionCondition {
567
+ field: 'to' | 'value';
568
+ field_source: 'ethereum_transaction';
569
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
570
+ value: string | Array<string>;
571
+ }
572
+ /**
573
+ * The decoded calldata in a smart contract interaction as the smart contract
574
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
575
+ * an abi parameter with the JSON ABI of the smart contract.
576
+ */
577
+ interface EthereumCalldataCondition {
578
+ abi: unknown;
579
+ field: string;
580
+ field_source: 'ethereum_calldata';
581
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
582
+ value: string | Array<string>;
583
+ }
584
+ /**
585
+ * Attributes from the signing domain that will verify the signature.
586
+ */
587
+ interface EthereumTypedDataDomainCondition {
588
+ field: 'chainId' | 'verifyingContract';
589
+ field_source: 'ethereum_typed_data_domain';
590
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
591
+ value: string | Array<string>;
592
+ }
593
+ /**
594
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
595
+ * EIP-712.
596
+ */
597
+ interface EthereumTypedDataMessageCondition {
598
+ field: string;
599
+ field_source: 'ethereum_typed_data_message';
600
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
601
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
602
+ value: string | Array<string>;
603
+ }
604
+ namespace EthereumTypedDataMessageCondition {
605
+ interface TypedData {
606
+ primary_type: string;
607
+ types: {
608
+ [key: string]: Array<TypedData.Type>;
609
+ };
610
+ }
611
+ namespace TypedData {
612
+ interface Type {
613
+ name: string;
614
+ type: string;
615
+ }
616
+ }
617
+ }
618
+ /**
619
+ * Allowed contract addresses for eth_signAuthorization requests.
620
+ */
621
+ interface Ethereum7702AuthorizationCondition {
622
+ field: 'contract';
623
+ field_source: 'ethereum_7702_authorization';
624
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
625
+ value: string | Array<string>;
626
+ }
627
+ /**
628
+ * Solana Program attributes, enables allowlisting Solana Programs.
629
+ */
630
+ interface SolanaProgramInstructionCondition {
631
+ field: 'programId';
632
+ field_source: 'solana_program_instruction';
633
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
634
+ value: string | Array<string>;
635
+ }
636
+ /**
637
+ * Solana System Program attributes, including more granular Transfer instruction
638
+ * fields.
639
+ */
640
+ interface SolanaSystemProgramInstructionCondition {
641
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
642
+ field_source: 'solana_system_program_instruction';
643
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
644
+ value: string | Array<string>;
645
+ }
646
+ /**
647
+ * Solana Token Program attributes, including more granular TransferChecked
648
+ * instruction fields.
649
+ */
650
+ interface SolanaTokenProgramInstructionCondition {
651
+ field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
652
+ field_source: 'solana_token_program_instruction';
653
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
654
+ value: string | Array<string>;
655
+ }
656
+ /**
657
+ * System attributes, including current unix timestamp (in seconds).
658
+ */
659
+ interface SystemCondition {
660
+ field: 'current_unix_timestamp';
661
+ field_source: 'system';
662
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
663
+ value: string | Array<string>;
664
+ }
665
+ }
666
+ export interface PolicyCreateParams {
667
+ /**
668
+ * Body param: The chain type the policy applies to.
669
+ */
670
+ chain_type: 'ethereum' | 'solana';
671
+ /**
672
+ * Body param: Name to assign to policy.
673
+ */
674
+ name: string;
675
+ /**
676
+ * Body param:
677
+ */
678
+ rules: Array<PolicyCreateParams.Rule>;
679
+ /**
680
+ * Body param: Version of the policy. Currently, 1.0 is the only version.
681
+ */
682
+ version: '1.0';
683
+ /**
684
+ * Body param: The owner of the resource. If you provide this, do not specify an
685
+ * owner_id as it will be generated automatically. When updating a wallet, you can
686
+ * set the owner to null to remove the owner.
687
+ */
688
+ owner?: PolicyCreateParams.PublicKeyOwner | PolicyCreateParams.UserOwner | null;
689
+ /**
690
+ * Body param: The key quorum ID to set as the owner of the resource. If you
691
+ * provide this, do not specify an owner.
692
+ */
693
+ owner_id?: string | null;
694
+ /**
695
+ * Header param: Idempotency keys ensure API requests are executed only once within
696
+ * a 24-hour window.
697
+ */
698
+ 'privy-idempotency-key'?: string;
699
+ }
700
+ export declare namespace PolicyCreateParams {
701
+ /**
702
+ * The rules that apply to each method the policy covers.
703
+ */
704
+ interface Rule {
705
+ /**
706
+ * Action to take if the conditions are true.
707
+ */
708
+ action: 'ALLOW' | 'DENY';
709
+ conditions: Array<Rule.EthereumTransactionCondition | Rule.EthereumCalldataCondition | Rule.EthereumTypedDataDomainCondition | Rule.EthereumTypedDataMessageCondition | Rule.Ethereum7702AuthorizationCondition | Rule.SolanaProgramInstructionCondition | Rule.SolanaSystemProgramInstructionCondition | Rule.SolanaTokenProgramInstructionCondition | Rule.SystemCondition>;
710
+ /**
711
+ * Method the rule applies to.
712
+ */
713
+ method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | '*';
714
+ name: string;
715
+ }
716
+ namespace Rule {
717
+ /**
718
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
719
+ * eth_sendTransaction request.
720
+ */
721
+ interface EthereumTransactionCondition {
722
+ field: 'to' | 'value';
723
+ field_source: 'ethereum_transaction';
724
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
725
+ value: string | Array<string>;
726
+ }
727
+ /**
728
+ * The decoded calldata in a smart contract interaction as the smart contract
729
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
730
+ * an abi parameter with the JSON ABI of the smart contract.
731
+ */
732
+ interface EthereumCalldataCondition {
733
+ abi: unknown;
734
+ field: string;
735
+ field_source: 'ethereum_calldata';
736
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
737
+ value: string | Array<string>;
738
+ }
739
+ /**
740
+ * Attributes from the signing domain that will verify the signature.
741
+ */
742
+ interface EthereumTypedDataDomainCondition {
743
+ field: 'chainId' | 'verifyingContract';
744
+ field_source: 'ethereum_typed_data_domain';
745
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
746
+ value: string | Array<string>;
747
+ }
748
+ /**
749
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
750
+ * EIP-712.
751
+ */
752
+ interface EthereumTypedDataMessageCondition {
753
+ field: string;
754
+ field_source: 'ethereum_typed_data_message';
755
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
756
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
757
+ value: string | Array<string>;
758
+ }
759
+ namespace EthereumTypedDataMessageCondition {
760
+ interface TypedData {
761
+ primary_type: string;
762
+ types: {
763
+ [key: string]: Array<TypedData.Type>;
764
+ };
765
+ }
766
+ namespace TypedData {
767
+ interface Type {
768
+ name: string;
769
+ type: string;
770
+ }
771
+ }
772
+ }
773
+ /**
774
+ * Allowed contract addresses for eth_signAuthorization requests.
775
+ */
776
+ interface Ethereum7702AuthorizationCondition {
777
+ field: 'contract';
778
+ field_source: 'ethereum_7702_authorization';
779
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
780
+ value: string | Array<string>;
781
+ }
782
+ /**
783
+ * Solana Program attributes, enables allowlisting Solana Programs.
784
+ */
785
+ interface SolanaProgramInstructionCondition {
786
+ field: 'programId';
787
+ field_source: 'solana_program_instruction';
788
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
789
+ value: string | Array<string>;
790
+ }
791
+ /**
792
+ * Solana System Program attributes, including more granular Transfer instruction
793
+ * fields.
794
+ */
795
+ interface SolanaSystemProgramInstructionCondition {
796
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
797
+ field_source: 'solana_system_program_instruction';
798
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
799
+ value: string | Array<string>;
800
+ }
801
+ /**
802
+ * Solana Token Program attributes, including more granular TransferChecked
803
+ * instruction fields.
804
+ */
805
+ interface SolanaTokenProgramInstructionCondition {
806
+ field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
807
+ field_source: 'solana_token_program_instruction';
808
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
809
+ value: string | Array<string>;
810
+ }
811
+ /**
812
+ * System attributes, including current unix timestamp (in seconds).
813
+ */
814
+ interface SystemCondition {
815
+ field: 'current_unix_timestamp';
816
+ field_source: 'system';
817
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
818
+ value: string | Array<string>;
819
+ }
820
+ }
821
+ /**
822
+ * The P-256 public key of the owner of the resource. If you provide this, do not
823
+ * specify an owner_id as it will be generated automatically.
824
+ */
825
+ interface PublicKeyOwner {
826
+ public_key: string;
827
+ }
828
+ /**
829
+ * The user ID of the owner of the resource. The user must already exist, and this
830
+ * value must start with "did:privy:". If you provide this, do not specify an
831
+ * owner_id as it will be generated automatically.
832
+ */
833
+ interface UserOwner {
834
+ user_id: string;
835
+ }
836
+ }
837
+ export interface PolicyCreateRuleParams {
838
+ /**
839
+ * Body param: Action to take if the conditions are true.
840
+ */
841
+ action: 'ALLOW' | 'DENY';
842
+ /**
843
+ * Body param:
844
+ */
845
+ conditions: Array<PolicyCreateRuleParams.EthereumTransactionCondition | PolicyCreateRuleParams.EthereumCalldataCondition | PolicyCreateRuleParams.EthereumTypedDataDomainCondition | PolicyCreateRuleParams.EthereumTypedDataMessageCondition | PolicyCreateRuleParams.Ethereum7702AuthorizationCondition | PolicyCreateRuleParams.SolanaProgramInstructionCondition | PolicyCreateRuleParams.SolanaSystemProgramInstructionCondition | PolicyCreateRuleParams.SolanaTokenProgramInstructionCondition | PolicyCreateRuleParams.SystemCondition>;
846
+ /**
847
+ * Body param: Method the rule applies to.
848
+ */
849
+ method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | '*';
850
+ /**
851
+ * Body param:
852
+ */
853
+ name: string;
854
+ /**
855
+ * Header param: Request authorization signature. If multiple signatures are
856
+ * required, they should be comma separated.
857
+ */
858
+ 'privy-authorization-signature'?: string;
859
+ }
860
+ export declare namespace PolicyCreateRuleParams {
861
+ /**
862
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
863
+ * eth_sendTransaction request.
864
+ */
865
+ interface EthereumTransactionCondition {
866
+ field: 'to' | 'value';
867
+ field_source: 'ethereum_transaction';
868
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
869
+ value: string | Array<string>;
870
+ }
871
+ /**
872
+ * The decoded calldata in a smart contract interaction as the smart contract
873
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
874
+ * an abi parameter with the JSON ABI of the smart contract.
875
+ */
876
+ interface EthereumCalldataCondition {
877
+ abi: unknown;
878
+ field: string;
879
+ field_source: 'ethereum_calldata';
880
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
881
+ value: string | Array<string>;
882
+ }
883
+ /**
884
+ * Attributes from the signing domain that will verify the signature.
885
+ */
886
+ interface EthereumTypedDataDomainCondition {
887
+ field: 'chainId' | 'verifyingContract';
888
+ field_source: 'ethereum_typed_data_domain';
889
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
890
+ value: string | Array<string>;
891
+ }
892
+ /**
893
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
894
+ * EIP-712.
895
+ */
896
+ interface EthereumTypedDataMessageCondition {
897
+ field: string;
898
+ field_source: 'ethereum_typed_data_message';
899
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
900
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
901
+ value: string | Array<string>;
902
+ }
903
+ namespace EthereumTypedDataMessageCondition {
904
+ interface TypedData {
905
+ primary_type: string;
906
+ types: {
907
+ [key: string]: Array<TypedData.Type>;
908
+ };
909
+ }
910
+ namespace TypedData {
911
+ interface Type {
912
+ name: string;
913
+ type: string;
914
+ }
915
+ }
916
+ }
917
+ /**
918
+ * Allowed contract addresses for eth_signAuthorization requests.
919
+ */
920
+ interface Ethereum7702AuthorizationCondition {
921
+ field: 'contract';
922
+ field_source: 'ethereum_7702_authorization';
923
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
924
+ value: string | Array<string>;
925
+ }
926
+ /**
927
+ * Solana Program attributes, enables allowlisting Solana Programs.
928
+ */
929
+ interface SolanaProgramInstructionCondition {
930
+ field: 'programId';
931
+ field_source: 'solana_program_instruction';
932
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
933
+ value: string | Array<string>;
934
+ }
935
+ /**
936
+ * Solana System Program attributes, including more granular Transfer instruction
937
+ * fields.
938
+ */
939
+ interface SolanaSystemProgramInstructionCondition {
940
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
941
+ field_source: 'solana_system_program_instruction';
942
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
943
+ value: string | Array<string>;
944
+ }
945
+ /**
946
+ * Solana Token Program attributes, including more granular TransferChecked
947
+ * instruction fields.
948
+ */
949
+ interface SolanaTokenProgramInstructionCondition {
950
+ field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
951
+ field_source: 'solana_token_program_instruction';
952
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
953
+ value: string | Array<string>;
954
+ }
955
+ /**
956
+ * System attributes, including current unix timestamp (in seconds).
957
+ */
958
+ interface SystemCondition {
959
+ field: 'current_unix_timestamp';
960
+ field_source: 'system';
961
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
962
+ value: string | Array<string>;
963
+ }
964
+ }
965
+ export interface PolicyDeleteParams {
966
+ /**
967
+ * Request authorization signature. If multiple signatures are required, they
968
+ * should be comma separated.
969
+ */
970
+ 'privy-authorization-signature'?: string;
971
+ }
972
+ export interface PolicyDeleteRuleParams {
973
+ /**
974
+ * Path param:
975
+ */
976
+ policy_id: string;
977
+ /**
978
+ * Header param: Request authorization signature. If multiple signatures are
979
+ * required, they should be comma separated.
980
+ */
981
+ 'privy-authorization-signature'?: string;
982
+ }
983
+ export interface PolicyUpdateParams {
984
+ /**
985
+ * Body param: Name to assign to policy.
986
+ */
987
+ name?: string;
988
+ /**
989
+ * Body param: The owner of the resource. If you provide this, do not specify an
990
+ * owner_id as it will be generated automatically. When updating a wallet, you can
991
+ * set the owner to null to remove the owner.
992
+ */
993
+ owner?: PolicyUpdateParams.PublicKeyOwner | PolicyUpdateParams.UserOwner | null;
994
+ /**
995
+ * Body param: The key quorum ID to set as the owner of the resource. If you
996
+ * provide this, do not specify an owner.
997
+ */
998
+ owner_id?: string | null;
999
+ /**
1000
+ * Body param:
1001
+ */
1002
+ rules?: Array<PolicyUpdateParams.Rule>;
1003
+ /**
1004
+ * Header param: Request authorization signature. If multiple signatures are
1005
+ * required, they should be comma separated.
1006
+ */
1007
+ 'privy-authorization-signature'?: string;
1008
+ }
1009
+ export declare namespace PolicyUpdateParams {
1010
+ /**
1011
+ * The P-256 public key of the owner of the resource. If you provide this, do not
1012
+ * specify an owner_id as it will be generated automatically.
1013
+ */
1014
+ interface PublicKeyOwner {
1015
+ public_key: string;
1016
+ }
1017
+ /**
1018
+ * The user ID of the owner of the resource. The user must already exist, and this
1019
+ * value must start with "did:privy:". If you provide this, do not specify an
1020
+ * owner_id as it will be generated automatically.
1021
+ */
1022
+ interface UserOwner {
1023
+ user_id: string;
1024
+ }
1025
+ /**
1026
+ * The rules that apply to each method the policy covers.
1027
+ */
1028
+ interface Rule {
1029
+ /**
1030
+ * Action to take if the conditions are true.
1031
+ */
1032
+ action: 'ALLOW' | 'DENY';
1033
+ conditions: Array<Rule.EthereumTransactionCondition | Rule.EthereumCalldataCondition | Rule.EthereumTypedDataDomainCondition | Rule.EthereumTypedDataMessageCondition | Rule.Ethereum7702AuthorizationCondition | Rule.SolanaProgramInstructionCondition | Rule.SolanaSystemProgramInstructionCondition | Rule.SolanaTokenProgramInstructionCondition | Rule.SystemCondition>;
1034
+ /**
1035
+ * Method the rule applies to.
1036
+ */
1037
+ method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | '*';
1038
+ name: string;
1039
+ }
1040
+ namespace Rule {
1041
+ /**
1042
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
1043
+ * eth_sendTransaction request.
1044
+ */
1045
+ interface EthereumTransactionCondition {
1046
+ field: 'to' | 'value';
1047
+ field_source: 'ethereum_transaction';
1048
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1049
+ value: string | Array<string>;
1050
+ }
1051
+ /**
1052
+ * The decoded calldata in a smart contract interaction as the smart contract
1053
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1054
+ * an abi parameter with the JSON ABI of the smart contract.
1055
+ */
1056
+ interface EthereumCalldataCondition {
1057
+ abi: unknown;
1058
+ field: string;
1059
+ field_source: 'ethereum_calldata';
1060
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1061
+ value: string | Array<string>;
1062
+ }
1063
+ /**
1064
+ * Attributes from the signing domain that will verify the signature.
1065
+ */
1066
+ interface EthereumTypedDataDomainCondition {
1067
+ field: 'chainId' | 'verifyingContract';
1068
+ field_source: 'ethereum_typed_data_domain';
1069
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1070
+ value: string | Array<string>;
1071
+ }
1072
+ /**
1073
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1074
+ * EIP-712.
1075
+ */
1076
+ interface EthereumTypedDataMessageCondition {
1077
+ field: string;
1078
+ field_source: 'ethereum_typed_data_message';
1079
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1080
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
1081
+ value: string | Array<string>;
1082
+ }
1083
+ namespace EthereumTypedDataMessageCondition {
1084
+ interface TypedData {
1085
+ primary_type: string;
1086
+ types: {
1087
+ [key: string]: Array<TypedData.Type>;
1088
+ };
1089
+ }
1090
+ namespace TypedData {
1091
+ interface Type {
1092
+ name: string;
1093
+ type: string;
1094
+ }
1095
+ }
1096
+ }
1097
+ /**
1098
+ * Allowed contract addresses for eth_signAuthorization requests.
1099
+ */
1100
+ interface Ethereum7702AuthorizationCondition {
1101
+ field: 'contract';
1102
+ field_source: 'ethereum_7702_authorization';
1103
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1104
+ value: string | Array<string>;
1105
+ }
1106
+ /**
1107
+ * Solana Program attributes, enables allowlisting Solana Programs.
1108
+ */
1109
+ interface SolanaProgramInstructionCondition {
1110
+ field: 'programId';
1111
+ field_source: 'solana_program_instruction';
1112
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1113
+ value: string | Array<string>;
1114
+ }
1115
+ /**
1116
+ * Solana System Program attributes, including more granular Transfer instruction
1117
+ * fields.
1118
+ */
1119
+ interface SolanaSystemProgramInstructionCondition {
1120
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1121
+ field_source: 'solana_system_program_instruction';
1122
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1123
+ value: string | Array<string>;
1124
+ }
1125
+ /**
1126
+ * Solana Token Program attributes, including more granular TransferChecked
1127
+ * instruction fields.
1128
+ */
1129
+ interface SolanaTokenProgramInstructionCondition {
1130
+ field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
1131
+ field_source: 'solana_token_program_instruction';
1132
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1133
+ value: string | Array<string>;
1134
+ }
1135
+ /**
1136
+ * System attributes, including current unix timestamp (in seconds).
1137
+ */
1138
+ interface SystemCondition {
1139
+ field: 'current_unix_timestamp';
1140
+ field_source: 'system';
1141
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1142
+ value: string | Array<string>;
1143
+ }
1144
+ }
1145
+ }
1146
+ export interface PolicyUpdateRuleParams {
1147
+ /**
1148
+ * Path param:
1149
+ */
1150
+ policy_id: string;
1151
+ /**
1152
+ * Body param: Action to take if the conditions are true.
1153
+ */
1154
+ action: 'ALLOW' | 'DENY';
1155
+ /**
1156
+ * Body param:
1157
+ */
1158
+ conditions: Array<PolicyUpdateRuleParams.EthereumTransactionCondition | PolicyUpdateRuleParams.EthereumCalldataCondition | PolicyUpdateRuleParams.EthereumTypedDataDomainCondition | PolicyUpdateRuleParams.EthereumTypedDataMessageCondition | PolicyUpdateRuleParams.Ethereum7702AuthorizationCondition | PolicyUpdateRuleParams.SolanaProgramInstructionCondition | PolicyUpdateRuleParams.SolanaSystemProgramInstructionCondition | PolicyUpdateRuleParams.SolanaTokenProgramInstructionCondition | PolicyUpdateRuleParams.SystemCondition>;
1159
+ /**
1160
+ * Body param: Method the rule applies to.
1161
+ */
1162
+ method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | '*';
1163
+ /**
1164
+ * Body param:
1165
+ */
1166
+ name: string;
1167
+ /**
1168
+ * Header param: Request authorization signature. If multiple signatures are
1169
+ * required, they should be comma separated.
1170
+ */
1171
+ 'privy-authorization-signature'?: string;
1172
+ }
1173
+ export declare namespace PolicyUpdateRuleParams {
1174
+ /**
1175
+ * The verbatim Ethereum transaction object in an eth_signTransaction or
1176
+ * eth_sendTransaction request.
1177
+ */
1178
+ interface EthereumTransactionCondition {
1179
+ field: 'to' | 'value';
1180
+ field_source: 'ethereum_transaction';
1181
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1182
+ value: string | Array<string>;
1183
+ }
1184
+ /**
1185
+ * The decoded calldata in a smart contract interaction as the smart contract
1186
+ * method's parameters. Note that that 'ethereum_calldata' conditions must contain
1187
+ * an abi parameter with the JSON ABI of the smart contract.
1188
+ */
1189
+ interface EthereumCalldataCondition {
1190
+ abi: unknown;
1191
+ field: string;
1192
+ field_source: 'ethereum_calldata';
1193
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1194
+ value: string | Array<string>;
1195
+ }
1196
+ /**
1197
+ * Attributes from the signing domain that will verify the signature.
1198
+ */
1199
+ interface EthereumTypedDataDomainCondition {
1200
+ field: 'chainId' | 'verifyingContract';
1201
+ field_source: 'ethereum_typed_data_domain';
1202
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1203
+ value: string | Array<string>;
1204
+ }
1205
+ /**
1206
+ * 'types' and 'primary_type' attributes of the TypedData JSON object defined in
1207
+ * EIP-712.
1208
+ */
1209
+ interface EthereumTypedDataMessageCondition {
1210
+ field: string;
1211
+ field_source: 'ethereum_typed_data_message';
1212
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1213
+ typed_data: EthereumTypedDataMessageCondition.TypedData;
1214
+ value: string | Array<string>;
1215
+ }
1216
+ namespace EthereumTypedDataMessageCondition {
1217
+ interface TypedData {
1218
+ primary_type: string;
1219
+ types: {
1220
+ [key: string]: Array<TypedData.Type>;
1221
+ };
1222
+ }
1223
+ namespace TypedData {
1224
+ interface Type {
1225
+ name: string;
1226
+ type: string;
1227
+ }
1228
+ }
1229
+ }
1230
+ /**
1231
+ * Allowed contract addresses for eth_signAuthorization requests.
1232
+ */
1233
+ interface Ethereum7702AuthorizationCondition {
1234
+ field: 'contract';
1235
+ field_source: 'ethereum_7702_authorization';
1236
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1237
+ value: string | Array<string>;
1238
+ }
1239
+ /**
1240
+ * Solana Program attributes, enables allowlisting Solana Programs.
1241
+ */
1242
+ interface SolanaProgramInstructionCondition {
1243
+ field: 'programId';
1244
+ field_source: 'solana_program_instruction';
1245
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1246
+ value: string | Array<string>;
1247
+ }
1248
+ /**
1249
+ * Solana System Program attributes, including more granular Transfer instruction
1250
+ * fields.
1251
+ */
1252
+ interface SolanaSystemProgramInstructionCondition {
1253
+ field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
1254
+ field_source: 'solana_system_program_instruction';
1255
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1256
+ value: string | Array<string>;
1257
+ }
1258
+ /**
1259
+ * Solana Token Program attributes, including more granular TransferChecked
1260
+ * instruction fields.
1261
+ */
1262
+ interface SolanaTokenProgramInstructionCondition {
1263
+ field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
1264
+ field_source: 'solana_token_program_instruction';
1265
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1266
+ value: string | Array<string>;
1267
+ }
1268
+ /**
1269
+ * System attributes, including current unix timestamp (in seconds).
1270
+ */
1271
+ interface SystemCondition {
1272
+ field: 'current_unix_timestamp';
1273
+ field_source: 'system';
1274
+ operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
1275
+ value: string | Array<string>;
1276
+ }
1277
+ }
1278
+ export interface PolicyGetRuleParams {
1279
+ policy_id: string;
1280
+ }
1281
+ export declare namespace Policies {
1282
+ export { type Policy as Policy, type PolicyCreateRuleResponse as PolicyCreateRuleResponse, type PolicyDeleteResponse as PolicyDeleteResponse, type PolicyDeleteRuleResponse as PolicyDeleteRuleResponse, type PolicyUpdateRuleResponse as PolicyUpdateRuleResponse, type PolicyGetRuleResponse as PolicyGetRuleResponse, type PolicyCreateParams as PolicyCreateParams, type PolicyCreateRuleParams as PolicyCreateRuleParams, type PolicyDeleteParams as PolicyDeleteParams, type PolicyDeleteRuleParams as PolicyDeleteRuleParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyUpdateRuleParams as PolicyUpdateRuleParams, type PolicyGetRuleParams as PolicyGetRuleParams, };
1283
+ }
1284
+ //# sourceMappingURL=policies.d.ts.map