@gvnrdao/dh-lit-actions 0.0.60 → 0.0.63

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 (233) hide show
  1. package/package.json +3 -3
  2. package/pkg-dist/pkg-src/constants/chunks/contract-deployments.d.ts.map +1 -0
  3. package/pkg-dist/pkg-src/constants/chunks/contract-deployments.js.map +1 -0
  4. package/pkg-dist/pkg-src/constants/chunks/lit-actions-registry.d.ts.map +1 -0
  5. package/pkg-dist/pkg-src/constants/chunks/lit-actions-registry.js.map +1 -0
  6. package/pkg-dist/pkg-src/constants/chunks/package-registry.d.ts.map +1 -0
  7. package/pkg-dist/pkg-src/constants/chunks/package-registry.js.map +1 -0
  8. package/pkg-dist/pkg-src/constants/index.d.ts.map +1 -0
  9. package/pkg-dist/pkg-src/constants/index.js.map +1 -0
  10. package/pkg-dist/pkg-src/executors/chunks/vault-snapshot-executor.d.ts +40 -0
  11. package/pkg-dist/pkg-src/executors/chunks/vault-snapshot-executor.d.ts.map +1 -0
  12. package/pkg-dist/pkg-src/executors/chunks/vault-snapshot-executor.js +102 -0
  13. package/pkg-dist/pkg-src/executors/chunks/vault-snapshot-executor.js.map +1 -0
  14. package/pkg-dist/pkg-src/executors/index.d.ts +43 -0
  15. package/pkg-dist/pkg-src/executors/index.d.ts.map +1 -0
  16. package/pkg-dist/pkg-src/executors/index.js +48 -0
  17. package/pkg-dist/pkg-src/executors/index.js.map +1 -0
  18. package/pkg-dist/pkg-src/index.d.ts.map +1 -0
  19. package/pkg-dist/pkg-src/index.js.map +1 -0
  20. package/pkg-dist/pkg-src/interfaces/chunks/diamond-hands-lit-actions.i.d.ts.map +1 -0
  21. package/pkg-dist/pkg-src/interfaces/chunks/diamond-hands-lit-actions.i.js.map +1 -0
  22. package/pkg-dist/pkg-src/interfaces/chunks/lit-action-config.i.d.ts.map +1 -0
  23. package/pkg-dist/pkg-src/interfaces/chunks/lit-action-config.i.js.map +1 -0
  24. package/pkg-dist/pkg-src/interfaces/chunks/lit-action-name.i.d.ts.map +1 -0
  25. package/pkg-dist/pkg-src/interfaces/chunks/lit-action-name.i.js.map +1 -0
  26. package/pkg-dist/pkg-src/interfaces/chunks/lit-action-registry.i.d.ts.map +1 -0
  27. package/pkg-dist/pkg-src/interfaces/chunks/lit-action-registry.i.js.map +1 -0
  28. package/pkg-dist/pkg-src/interfaces/chunks/pkp-info.i.d.ts.map +1 -0
  29. package/pkg-dist/pkg-src/interfaces/chunks/pkp-info.i.js.map +1 -0
  30. package/pkg-dist/pkg-src/interfaces/deployments.d.ts.map +1 -0
  31. package/pkg-dist/pkg-src/interfaces/deployments.js.map +1 -0
  32. package/pkg-dist/pkg-src/interfaces/index.d.ts.map +1 -0
  33. package/pkg-dist/pkg-src/interfaces/index.js.map +1 -0
  34. package/pkg-dist/pkg-src/utils/chunks/cid-utils.d.ts.map +1 -0
  35. package/pkg-dist/pkg-src/utils/chunks/cid-utils.js.map +1 -0
  36. package/pkg-dist/pkg-src/utils/chunks/connection-helpers.d.ts.map +1 -0
  37. package/pkg-dist/pkg-src/utils/chunks/connection-helpers.js.map +1 -0
  38. package/pkg-dist/pkg-src/utils/chunks/debug-logger.d.ts.map +1 -0
  39. package/pkg-dist/pkg-src/utils/chunks/debug-logger.js.map +1 -0
  40. package/pkg-dist/pkg-src/utils/chunks/error-classification.d.ts.map +1 -0
  41. package/pkg-dist/pkg-src/utils/chunks/error-classification.js.map +1 -0
  42. package/pkg-dist/pkg-src/utils/chunks/lit-action-helpers.d.ts.map +1 -0
  43. package/pkg-dist/pkg-src/utils/chunks/lit-action-helpers.js.map +1 -0
  44. package/pkg-dist/pkg-src/utils/chunks/pkp-setup.d.ts.map +1 -0
  45. package/pkg-dist/pkg-src/utils/chunks/pkp-setup.js.map +1 -0
  46. package/pkg-dist/pkg-src/utils/chunks/session-signature-cache.d.ts.map +1 -0
  47. package/pkg-dist/pkg-src/utils/chunks/session-signature-cache.js.map +1 -0
  48. package/pkg-dist/pkg-src/utils/index.d.ts.map +1 -0
  49. package/pkg-dist/pkg-src/utils/index.js.map +1 -0
  50. package/pkg-dist/src/constants/chunks/bitcoin-network-config.d.ts +130 -0
  51. package/pkg-dist/src/constants/chunks/bitcoin-network-config.d.ts.map +1 -0
  52. package/pkg-dist/src/constants/chunks/bitcoin-network-config.js +244 -0
  53. package/pkg-dist/src/constants/chunks/bitcoin-network-config.js.map +1 -0
  54. package/pkg-dist/src/constants/chunks/bitcoin.d.ts +42 -0
  55. package/pkg-dist/src/constants/chunks/bitcoin.d.ts.map +1 -0
  56. package/pkg-dist/src/constants/chunks/bitcoin.js +45 -0
  57. package/pkg-dist/src/constants/chunks/bitcoin.js.map +1 -0
  58. package/pkg-dist/src/constants/chunks/decimals.d.ts +44 -0
  59. package/pkg-dist/src/constants/chunks/decimals.d.ts.map +1 -0
  60. package/pkg-dist/src/constants/chunks/decimals.js +47 -0
  61. package/pkg-dist/src/constants/chunks/decimals.js.map +1 -0
  62. package/pkg-dist/src/constants/chunks/liquidation.d.ts +51 -0
  63. package/pkg-dist/src/constants/chunks/liquidation.d.ts.map +1 -0
  64. package/pkg-dist/src/constants/chunks/liquidation.js +54 -0
  65. package/pkg-dist/src/constants/chunks/liquidation.js.map +1 -0
  66. package/pkg-dist/src/constants/chunks/loan-status.d.ts +57 -0
  67. package/pkg-dist/src/constants/chunks/loan-status.d.ts.map +1 -0
  68. package/pkg-dist/src/constants/chunks/loan-status.js +95 -0
  69. package/pkg-dist/src/constants/chunks/loan-status.js.map +1 -0
  70. package/pkg-dist/src/constants/chunks/price-oracle.d.ts +46 -0
  71. package/pkg-dist/src/constants/chunks/price-oracle.d.ts.map +1 -0
  72. package/pkg-dist/src/constants/chunks/price-oracle.js +49 -0
  73. package/pkg-dist/src/constants/chunks/price-oracle.js.map +1 -0
  74. package/pkg-dist/src/constants/chunks/quantum-time.d.ts +63 -0
  75. package/pkg-dist/src/constants/chunks/quantum-time.d.ts.map +1 -0
  76. package/pkg-dist/src/constants/chunks/quantum-time.js +66 -0
  77. package/pkg-dist/src/constants/chunks/quantum-time.js.map +1 -0
  78. package/pkg-dist/src/constants/index.d.ts +16 -0
  79. package/pkg-dist/src/constants/index.d.ts.map +1 -0
  80. package/pkg-dist/src/constants/index.js +57 -0
  81. package/pkg-dist/src/constants/index.js.map +1 -0
  82. package/pkg-dist/src/interfaces/chunks/authorization.i.d.ts +19 -0
  83. package/pkg-dist/src/interfaces/chunks/authorization.i.d.ts.map +1 -0
  84. package/pkg-dist/src/interfaces/chunks/authorization.i.js +3 -0
  85. package/pkg-dist/src/interfaces/chunks/authorization.i.js.map +1 -0
  86. package/pkg-dist/src/interfaces/chunks/bitcoin-data-provider.i.d.ts +60 -0
  87. package/pkg-dist/src/interfaces/chunks/bitcoin-data-provider.i.d.ts.map +1 -0
  88. package/pkg-dist/src/interfaces/chunks/bitcoin-data-provider.i.js +3 -0
  89. package/pkg-dist/src/interfaces/chunks/bitcoin-data-provider.i.js.map +1 -0
  90. package/pkg-dist/src/interfaces/chunks/circuit-breaker.i.d.ts +18 -0
  91. package/pkg-dist/src/interfaces/chunks/circuit-breaker.i.d.ts.map +1 -0
  92. package/pkg-dist/src/interfaces/chunks/circuit-breaker.i.js +8 -0
  93. package/pkg-dist/src/interfaces/chunks/circuit-breaker.i.js.map +1 -0
  94. package/pkg-dist/src/interfaces/chunks/mint-authorization.i.d.ts +24 -0
  95. package/pkg-dist/src/interfaces/chunks/mint-authorization.i.d.ts.map +1 -0
  96. package/pkg-dist/src/interfaces/chunks/mint-authorization.i.js +5 -0
  97. package/pkg-dist/src/interfaces/chunks/mint-authorization.i.js.map +1 -0
  98. package/pkg-dist/src/interfaces/chunks/owner-authorization.d.ts +60 -0
  99. package/pkg-dist/src/interfaces/chunks/owner-authorization.d.ts.map +1 -0
  100. package/pkg-dist/src/interfaces/chunks/owner-authorization.js +8 -0
  101. package/pkg-dist/src/interfaces/chunks/owner-authorization.js.map +1 -0
  102. package/pkg-dist/src/interfaces/chunks/price-oracle.i.d.ts +26 -0
  103. package/pkg-dist/src/interfaces/chunks/price-oracle.i.d.ts.map +1 -0
  104. package/pkg-dist/src/interfaces/chunks/price-oracle.i.js +3 -0
  105. package/pkg-dist/src/interfaces/chunks/price-oracle.i.js.map +1 -0
  106. package/pkg-dist/src/interfaces/chunks/vault-balance-module.i.d.ts +23 -0
  107. package/pkg-dist/src/interfaces/chunks/vault-balance-module.i.d.ts.map +1 -0
  108. package/pkg-dist/src/interfaces/chunks/vault-balance-module.i.js +3 -0
  109. package/pkg-dist/src/interfaces/chunks/vault-balance-module.i.js.map +1 -0
  110. package/pkg-dist/src/interfaces/chunks/vault-balance.i.d.ts +63 -0
  111. package/pkg-dist/src/interfaces/chunks/vault-balance.i.d.ts.map +1 -0
  112. package/pkg-dist/src/interfaces/chunks/vault-balance.i.js +3 -0
  113. package/pkg-dist/src/interfaces/chunks/vault-balance.i.js.map +1 -0
  114. package/pkg-dist/src/interfaces/chunks/vault-snapshot.i.d.ts +51 -0
  115. package/pkg-dist/src/interfaces/chunks/vault-snapshot.i.d.ts.map +1 -0
  116. package/pkg-dist/src/interfaces/chunks/vault-snapshot.i.js +3 -0
  117. package/pkg-dist/src/interfaces/chunks/vault-snapshot.i.js.map +1 -0
  118. package/pkg-dist/src/interfaces/index.d.ts +15 -0
  119. package/pkg-dist/src/interfaces/index.d.ts.map +1 -0
  120. package/pkg-dist/src/interfaces/index.js +30 -0
  121. package/pkg-dist/src/interfaces/index.js.map +1 -0
  122. package/pkg-dist/src/modules/authorization.module.d.ts +160 -0
  123. package/pkg-dist/src/modules/authorization.module.d.ts.map +1 -0
  124. package/pkg-dist/src/modules/authorization.module.js +317 -0
  125. package/pkg-dist/src/modules/authorization.module.js.map +1 -0
  126. package/pkg-dist/src/modules/bitcoin-data-provider.module.d.ts +91 -0
  127. package/pkg-dist/src/modules/bitcoin-data-provider.module.d.ts.map +1 -0
  128. package/pkg-dist/src/modules/bitcoin-data-provider.module.js +261 -0
  129. package/pkg-dist/src/modules/bitcoin-data-provider.module.js.map +1 -0
  130. package/pkg-dist/src/modules/business-rules-math.module.d.ts +155 -0
  131. package/pkg-dist/src/modules/business-rules-math.module.d.ts.map +1 -0
  132. package/pkg-dist/src/modules/business-rules-math.module.js +309 -0
  133. package/pkg-dist/src/modules/business-rules-math.module.js.map +1 -0
  134. package/pkg-dist/src/modules/price-oracle.module.d.ts +29 -0
  135. package/pkg-dist/src/modules/price-oracle.module.d.ts.map +1 -0
  136. package/pkg-dist/src/modules/price-oracle.module.js +223 -0
  137. package/pkg-dist/src/modules/price-oracle.module.js.map +1 -0
  138. package/pkg-dist/src/modules/protocol-parameters.module.d.ts +58 -0
  139. package/pkg-dist/src/modules/protocol-parameters.module.d.ts.map +1 -0
  140. package/pkg-dist/src/modules/protocol-parameters.module.js +125 -0
  141. package/pkg-dist/src/modules/protocol-parameters.module.js.map +1 -0
  142. package/pkg-dist/src/modules/quantum-time.module.d.ts +149 -0
  143. package/pkg-dist/src/modules/quantum-time.module.d.ts.map +1 -0
  144. package/pkg-dist/src/modules/quantum-time.module.js +240 -0
  145. package/pkg-dist/src/modules/quantum-time.module.js.map +1 -0
  146. package/pkg-dist/src/modules/vault-balance.module.d.ts +172 -0
  147. package/pkg-dist/src/modules/vault-balance.module.d.ts.map +1 -0
  148. package/pkg-dist/src/modules/vault-balance.module.js +318 -0
  149. package/pkg-dist/src/modules/vault-balance.module.js.map +1 -0
  150. package/pkg-dist/src/modules/vault-snapshot.d.ts +168 -0
  151. package/pkg-dist/src/modules/vault-snapshot.d.ts.map +1 -0
  152. package/pkg-dist/src/modules/vault-snapshot.js +370 -0
  153. package/pkg-dist/src/modules/vault-snapshot.js.map +1 -0
  154. package/pkg-dist/constants/chunks/contract-deployments.d.ts.map +0 -1
  155. package/pkg-dist/constants/chunks/contract-deployments.js.map +0 -1
  156. package/pkg-dist/constants/chunks/lit-actions-registry.d.ts.map +0 -1
  157. package/pkg-dist/constants/chunks/lit-actions-registry.js.map +0 -1
  158. package/pkg-dist/constants/chunks/package-registry.d.ts.map +0 -1
  159. package/pkg-dist/constants/chunks/package-registry.js.map +0 -1
  160. package/pkg-dist/constants/index.d.ts.map +0 -1
  161. package/pkg-dist/constants/index.js.map +0 -1
  162. package/pkg-dist/index.d.ts.map +0 -1
  163. package/pkg-dist/index.js.map +0 -1
  164. package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.d.ts.map +0 -1
  165. package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.js.map +0 -1
  166. package/pkg-dist/interfaces/chunks/lit-action-config.i.d.ts.map +0 -1
  167. package/pkg-dist/interfaces/chunks/lit-action-config.i.js.map +0 -1
  168. package/pkg-dist/interfaces/chunks/lit-action-name.i.d.ts.map +0 -1
  169. package/pkg-dist/interfaces/chunks/lit-action-name.i.js.map +0 -1
  170. package/pkg-dist/interfaces/chunks/lit-action-registry.i.d.ts.map +0 -1
  171. package/pkg-dist/interfaces/chunks/lit-action-registry.i.js.map +0 -1
  172. package/pkg-dist/interfaces/chunks/pkp-info.i.d.ts.map +0 -1
  173. package/pkg-dist/interfaces/chunks/pkp-info.i.js.map +0 -1
  174. package/pkg-dist/interfaces/deployments.d.ts.map +0 -1
  175. package/pkg-dist/interfaces/deployments.js.map +0 -1
  176. package/pkg-dist/interfaces/index.d.ts.map +0 -1
  177. package/pkg-dist/interfaces/index.js.map +0 -1
  178. package/pkg-dist/utils/chunks/cid-utils.d.ts.map +0 -1
  179. package/pkg-dist/utils/chunks/cid-utils.js.map +0 -1
  180. package/pkg-dist/utils/chunks/connection-helpers.d.ts.map +0 -1
  181. package/pkg-dist/utils/chunks/connection-helpers.js.map +0 -1
  182. package/pkg-dist/utils/chunks/debug-logger.d.ts.map +0 -1
  183. package/pkg-dist/utils/chunks/debug-logger.js.map +0 -1
  184. package/pkg-dist/utils/chunks/error-classification.d.ts.map +0 -1
  185. package/pkg-dist/utils/chunks/error-classification.js.map +0 -1
  186. package/pkg-dist/utils/chunks/lit-action-helpers.d.ts.map +0 -1
  187. package/pkg-dist/utils/chunks/lit-action-helpers.js.map +0 -1
  188. package/pkg-dist/utils/chunks/pkp-setup.d.ts.map +0 -1
  189. package/pkg-dist/utils/chunks/pkp-setup.js.map +0 -1
  190. package/pkg-dist/utils/chunks/session-signature-cache.d.ts.map +0 -1
  191. package/pkg-dist/utils/chunks/session-signature-cache.js.map +0 -1
  192. package/pkg-dist/utils/index.d.ts.map +0 -1
  193. package/pkg-dist/utils/index.js.map +0 -1
  194. /package/pkg-dist/{constants → pkg-src/constants}/chunks/contract-deployments.d.ts +0 -0
  195. /package/pkg-dist/{constants → pkg-src/constants}/chunks/contract-deployments.js +0 -0
  196. /package/pkg-dist/{constants → pkg-src/constants}/chunks/lit-actions-registry.d.ts +0 -0
  197. /package/pkg-dist/{constants → pkg-src/constants}/chunks/lit-actions-registry.js +0 -0
  198. /package/pkg-dist/{constants → pkg-src/constants}/chunks/package-registry.d.ts +0 -0
  199. /package/pkg-dist/{constants → pkg-src/constants}/chunks/package-registry.js +0 -0
  200. /package/pkg-dist/{constants → pkg-src/constants}/index.d.ts +0 -0
  201. /package/pkg-dist/{constants → pkg-src/constants}/index.js +0 -0
  202. /package/pkg-dist/{index.d.ts → pkg-src/index.d.ts} +0 -0
  203. /package/pkg-dist/{index.js → pkg-src/index.js} +0 -0
  204. /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/diamond-hands-lit-actions.i.d.ts +0 -0
  205. /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/diamond-hands-lit-actions.i.js +0 -0
  206. /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-config.i.d.ts +0 -0
  207. /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-config.i.js +0 -0
  208. /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-name.i.d.ts +0 -0
  209. /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-name.i.js +0 -0
  210. /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-registry.i.d.ts +0 -0
  211. /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-registry.i.js +0 -0
  212. /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/pkp-info.i.d.ts +0 -0
  213. /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/pkp-info.i.js +0 -0
  214. /package/pkg-dist/{interfaces → pkg-src/interfaces}/deployments.d.ts +0 -0
  215. /package/pkg-dist/{interfaces → pkg-src/interfaces}/deployments.js +0 -0
  216. /package/pkg-dist/{interfaces → pkg-src/interfaces}/index.d.ts +0 -0
  217. /package/pkg-dist/{interfaces → pkg-src/interfaces}/index.js +0 -0
  218. /package/pkg-dist/{utils → pkg-src/utils}/chunks/cid-utils.d.ts +0 -0
  219. /package/pkg-dist/{utils → pkg-src/utils}/chunks/cid-utils.js +0 -0
  220. /package/pkg-dist/{utils → pkg-src/utils}/chunks/connection-helpers.d.ts +0 -0
  221. /package/pkg-dist/{utils → pkg-src/utils}/chunks/connection-helpers.js +0 -0
  222. /package/pkg-dist/{utils → pkg-src/utils}/chunks/debug-logger.d.ts +0 -0
  223. /package/pkg-dist/{utils → pkg-src/utils}/chunks/debug-logger.js +0 -0
  224. /package/pkg-dist/{utils → pkg-src/utils}/chunks/error-classification.d.ts +0 -0
  225. /package/pkg-dist/{utils → pkg-src/utils}/chunks/error-classification.js +0 -0
  226. /package/pkg-dist/{utils → pkg-src/utils}/chunks/lit-action-helpers.d.ts +0 -0
  227. /package/pkg-dist/{utils → pkg-src/utils}/chunks/lit-action-helpers.js +0 -0
  228. /package/pkg-dist/{utils → pkg-src/utils}/chunks/pkp-setup.d.ts +0 -0
  229. /package/pkg-dist/{utils → pkg-src/utils}/chunks/pkp-setup.js +0 -0
  230. /package/pkg-dist/{utils → pkg-src/utils}/chunks/session-signature-cache.d.ts +0 -0
  231. /package/pkg-dist/{utils → pkg-src/utils}/chunks/session-signature-cache.js +0 -0
  232. /package/pkg-dist/{utils → pkg-src/utils}/index.d.ts +0 -0
  233. /package/pkg-dist/{utils → pkg-src/utils}/index.js +0 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Circuit Breaker Interface
3
+ *
4
+ * Defines types for circuit breaker status and related information.
5
+ */
6
+ export interface CircuitBreakerStatus {
7
+ isTriggered: boolean;
8
+ triggerReason?: string;
9
+ triggeredAt?: number;
10
+ }
11
+ export interface SystemHealthStatus {
12
+ ucdControllerPaused: boolean;
13
+ circuitBreakerTriggered: boolean;
14
+ oracleEmergencyMode: boolean;
15
+ transfersPaused: boolean;
16
+ timestamp: number;
17
+ }
18
+ //# sourceMappingURL=circuit-breaker.i.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circuit-breaker.i.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/chunks/circuit-breaker.i.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,uBAAuB,EAAE,OAAO,CAAC;IACjC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ /**
3
+ * Circuit Breaker Interface
4
+ *
5
+ * Defines types for circuit breaker status and related information.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ //# sourceMappingURL=circuit-breaker.i.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circuit-breaker.i.js","sourceRoot":"","sources":["../../../../src/interfaces/chunks/circuit-breaker.i.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -0,0 +1,24 @@
1
+ export interface MintAuthorizationParams {
2
+ positionId: string;
3
+ requestedAmount: string;
4
+ btcAddress: string;
5
+ positionManagerAddress: string;
6
+ loanOpsManagerAddress: string;
7
+ }
8
+ export interface MintAuthorizationData {
9
+ positionId: string;
10
+ btcAddress: string;
11
+ totalBTCBalance: number;
12
+ authorizedBTCBalance: number;
13
+ availableBTCBalance: number;
14
+ btcPriceUSD: number;
15
+ requestedAmount: string;
16
+ timestamp: number;
17
+ collateralRatio: number;
18
+ }
19
+ export interface ValidationResult {
20
+ approved: boolean;
21
+ reason?: string;
22
+ authData?: MintAuthorizationData;
23
+ }
24
+ //# sourceMappingURL=mint-authorization.i.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mint-authorization.i.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/chunks/mint-authorization.i.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CAClC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // AuthorizedSpend is imported from vault-balance.i.ts
4
+ // No need to redefine it here
5
+ //# sourceMappingURL=mint-authorization.i.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mint-authorization.i.js","sourceRoot":"","sources":["../../../../src/interfaces/chunks/mint-authorization.i.ts"],"names":[],"mappings":";;AA0BA,sDAAsD;AACtD,8BAA8B"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Owner Authorization Interface
3
+ *
4
+ * Parameters required to authorize owner-only LIT Action operations
5
+ */
6
+ interface Authorization {
7
+ timestamp: number;
8
+ chainId: number;
9
+ signature: string;
10
+ mode: "dev" | "prod";
11
+ }
12
+ interface OwnerAuthorization extends Authorization {
13
+ positionId: string;
14
+ }
15
+ interface ActionAuthorization extends Authorization {
16
+ action: string;
17
+ }
18
+ interface AmountAuthorization extends Authorization {
19
+ amount: string | bigint;
20
+ }
21
+ interface ToAuthorization extends Authorization {
22
+ destinationAddress: string;
23
+ }
24
+ /**
25
+ * Authorization parameters for owner-only actions
26
+ *
27
+ * Used to verify that a caller is authorized to perform operations on a position.
28
+ *
29
+ * Security model:
30
+ * - signature: EIP-191 signature from position owner proving authorization
31
+ * - positionId: Identifies which position the operation affects
32
+ * - timestamp: Prevents replay attacks with old signatures
33
+ * - chainId: Prevents cross-chain replay attacks
34
+ * - amount: Amount of UCD to mint (part of signed message)
35
+ * - action: Type of operation (e.g., "mint-ucd") (part of signed message)
36
+ * - mode: Execution environment mode
37
+ *
38
+ * The LIT Action recovers the signer address from the signature and validates
39
+ * it matches the position owner queried from the PositionManager contract.
40
+ */
41
+ export interface OwnerAmountActionAuthorization extends OwnerAuthorization, AmountAuthorization, ActionAuthorization {
42
+ }
43
+ /**
44
+ * Authorization parameters for withdrawal operations
45
+ *
46
+ * Extends OwnerAmountActionAuthorization with destination address.
47
+ *
48
+ * Security model:
49
+ * - All base authorization checks (signature, owner, timestamp, chainId)
50
+ * - destinationAddress: Bitcoin address where funds will be withdrawn (signed)
51
+ * - amount: Amount in satoshis to withdraw (signed)
52
+ * - action: "withdraw-btc" (signed)
53
+ *
54
+ * The destination address is part of the signed authorization to prevent
55
+ * unauthorized redirection of withdrawal funds.
56
+ */
57
+ export interface OwnerAmountToActionAuthorization extends OwnerAuthorization, AmountAuthorization, ToAuthorization, ActionAuthorization {
58
+ }
59
+ export {};
60
+ //# sourceMappingURL=owner-authorization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owner-authorization.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/chunks/owner-authorization.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,UAAU,aAAa;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;CACtB;AAED,UAAU,kBAAmB,SAAQ,aAAa;IAChD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,mBAAoB,SAAQ,aAAa;IACjD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,mBAAoB,SAAQ,aAAa;IACjD,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,UAAU,eAAgB,SAAQ,aAAa;IAC7C,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,8BACf,SAAQ,kBAAkB,EACxB,mBAAmB,EACnB,mBAAmB;CAAG;AAE1B;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,gCACf,SAAQ,kBAAkB,EACxB,mBAAmB,EACnB,eAAe,EACf,mBAAmB;CAAG"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ /**
3
+ * Owner Authorization Interface
4
+ *
5
+ * Parameters required to authorize owner-only LIT Action operations
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ //# sourceMappingURL=owner-authorization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owner-authorization.js","sourceRoot":"","sources":["../../../../src/interfaces/chunks/owner-authorization.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Price Source Configuration
3
+ */
4
+ export interface PriceSourceConfig {
5
+ name: string;
6
+ fetchPrice: () => Promise<number>;
7
+ priority: number;
8
+ }
9
+ /**
10
+ * Price Oracle Module Interface
11
+ *
12
+ * Defines the contract for price oracle implementations.
13
+ */
14
+ export interface IPriceOracle {
15
+ /**
16
+ * Get BTC price in USD with 8 decimals
17
+ * @returns BTC price (e.g., 10000000000000n = $100,000)
18
+ */
19
+ getBTCPrice(): Promise<bigint>;
20
+ /**
21
+ * Get BTC price with consensus validation across multiple sources
22
+ * @returns BTC price with outlier filtering
23
+ */
24
+ getBTCPriceConsensus(): Promise<bigint>;
25
+ }
26
+ //# sourceMappingURL=price-oracle.i.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"price-oracle.i.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/chunks/price-oracle.i.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/B;;;OAGG;IACH,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACzC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=price-oracle.i.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"price-oracle.i.js","sourceRoot":"","sources":["../../../../src/interfaces/chunks/price-oracle.i.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import { VaultBalanceResult } from "./vault-balance.i";
2
+ /**
3
+ * Vault Balance Module Interface
4
+ *
5
+ * Defines the contract for vault balance calculation implementations.
6
+ */
7
+ export interface IVaultBalance {
8
+ /**
9
+ * Calculate trusted balance for a position
10
+ * @param positionId - Position identifier
11
+ * @param vaultAddress - Bitcoin vault address
12
+ * @returns Complete balance breakdown
13
+ */
14
+ calculateTrustedBalance(positionId: string, vaultAddress: string): Promise<VaultBalanceResult>;
15
+ /**
16
+ * Get available balance in satoshis
17
+ * @param positionId - Position identifier
18
+ * @param vaultAddress - Bitcoin vault address
19
+ * @returns Available balance
20
+ */
21
+ getTrustedBalance(positionId: string, vaultAddress: string): Promise<bigint>;
22
+ }
23
+ //# sourceMappingURL=vault-balance-module.i.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-balance-module.i.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/chunks/vault-balance-module.i.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,uBAAuB,CACrB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAE/B;;;;;OAKG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9E"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=vault-balance-module.i.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-balance-module.i.js","sourceRoot":"","sources":["../../../../src/interfaces/chunks/vault-balance-module.i.ts"],"names":[],"mappings":""}
@@ -0,0 +1,63 @@
1
+ export interface UTXO {
2
+ txid: string;
3
+ vout: number;
4
+ satoshis: bigint;
5
+ confirmations: number;
6
+ }
7
+ export interface UTXOSet {
8
+ utxos: UTXO[];
9
+ totalBalance: bigint;
10
+ totalUTXOs: number;
11
+ confirmedBalance: bigint;
12
+ unconfirmedBalance: bigint;
13
+ }
14
+ export interface BitcoinDataSource {
15
+ name: string;
16
+ url: string;
17
+ priority: number;
18
+ }
19
+ /**
20
+ * Bitcoin RPC Helper Interface
21
+ * Minimal interface for Bitcoin Core RPC operations
22
+ */
23
+ export interface IBitcoinRPCHelper {
24
+ listUnspent(wallet: string, address: string): Promise<any[]>;
25
+ getTransaction(wallet: string, txid: string): Promise<any>;
26
+ }
27
+ export interface BitcoinDataProviderConfig {
28
+ providerUrl: string;
29
+ fallbackProviders?: BitcoinDataSource[];
30
+ timeout?: number;
31
+ rpcHelper?: IBitcoinRPCHelper;
32
+ rpcWallet?: string;
33
+ }
34
+ export interface AuthorizedSpend {
35
+ txid: string;
36
+ vout: number;
37
+ satoshis: bigint;
38
+ positionId: string;
39
+ targetAddress: string;
40
+ targetAmount: bigint;
41
+ changeAddress: string;
42
+ timestamp: number;
43
+ }
44
+ export interface VaultBalanceResult {
45
+ totalUTXOs: UTXO[];
46
+ totalBalance: bigint;
47
+ authorizedUTXOs: AuthorizedSpend[];
48
+ authorizedBalance: bigint;
49
+ availableUTXOs: UTXO[];
50
+ availableBalance: bigint;
51
+ vaultAddress: string;
52
+ positionId: string;
53
+ timestamp: number;
54
+ }
55
+ export interface VaultBalanceConfig {
56
+ contractAddress: string;
57
+ chain: string;
58
+ chainId: number;
59
+ rpcUrl?: string;
60
+ bitcoinProvider: import("./bitcoin-data-provider.i").IBitcoinDataProvider;
61
+ minConfirmations?: number;
62
+ }
63
+ //# sourceMappingURL=vault-balance.i.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-balance.i.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/chunks/vault-balance.i.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7D,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5D;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,IAAI,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,IAAI,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,OAAO,2BAA2B,EAAE,oBAAoB,CAAC;IAC1E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=vault-balance.i.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-balance.i.js","sourceRoot":"","sources":["../../../../src/interfaces/chunks/vault-balance.i.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ import { UTXO } from "./vault-balance.i";
2
+ import { IVaultBalance } from "./vault-balance-module.i";
3
+ import { IPriceOracle } from "./price-oracle.i";
4
+ /**
5
+ * Complete vault snapshot with all calculated metrics
6
+ */
7
+ export interface VaultSnapshot {
8
+ positionId: string;
9
+ pkpId: string;
10
+ borrower: string;
11
+ vaultAddress: string;
12
+ ucdDebt: bigint;
13
+ termStartTimestamp: number;
14
+ selectedTerm: number;
15
+ status: number;
16
+ totalBTCSats: bigint;
17
+ totalUTXOs: UTXO[];
18
+ authorizedSpendsSats: bigint;
19
+ availableBTCSats: bigint;
20
+ availableUTXOs: UTXO[];
21
+ btcPriceUsd: bigint;
22
+ collateralValueUsd: bigint;
23
+ collateralRatioBps: number;
24
+ termDurationDays: number;
25
+ termLengthDays: number;
26
+ isExpired: boolean;
27
+ daysUntilExpiry: number;
28
+ daysIntoGracePeriod: number;
29
+ currentLiquidationThreshold: number;
30
+ isLiquidatable: boolean;
31
+ marginToLiquidationBps: number;
32
+ liquidationThresholdBps: number;
33
+ originationFeeBps: number;
34
+ extensionFeeBps: number;
35
+ timestamp: number;
36
+ blockHeight?: number;
37
+ }
38
+ /**
39
+ * Configuration for vault snapshot module
40
+ */
41
+ export interface VaultSnapshotConfig {
42
+ contractAddress: string;
43
+ chain: string;
44
+ chainId?: number;
45
+ rpcUrl?: string;
46
+ vaultBalance: IVaultBalance;
47
+ priceOracle: IPriceOracle;
48
+ termManagerAddress: string;
49
+ loanOpsManagerAddress: string;
50
+ }
51
+ //# sourceMappingURL=vault-snapshot.i.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-snapshot.i.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/chunks/vault-snapshot.i.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,aAAa;IAE5B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IAGf,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,IAAI,EAAE,CAAC;IACnB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,IAAI,EAAE,CAAC;IAGvB,WAAW,EAAE,MAAM,CAAC;IAGpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAG3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAG5B,2BAA2B,EAAE,MAAM,CAAC;IACpC,cAAc,EAAE,OAAO,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC;IAG/B,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IAGxB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,aAAa,CAAC;IAC5B,WAAW,EAAE,YAAY,CAAC;IAG1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;CAC/B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=vault-snapshot.i.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-snapshot.i.js","sourceRoot":"","sources":["../../../../src/interfaces/chunks/vault-snapshot.i.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Interface exports
3
+ *
4
+ * Centralized export point for all interface definitions.
5
+ * Interfaces are organized in chunks/*.i.ts files.
6
+ */
7
+ export * from "./chunks/authorization.i";
8
+ export * from "./chunks/mint-authorization.i";
9
+ export * from "./chunks/bitcoin-data-provider.i";
10
+ export { UTXO, VaultBalanceResult, VaultBalanceConfig, } from "./chunks/vault-balance.i";
11
+ export * from "./chunks/vault-balance-module.i";
12
+ export * from "./chunks/price-oracle.i";
13
+ export * from "./chunks/vault-snapshot.i";
14
+ export * from "./chunks/owner-authorization";
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,OAAO,EACL,IAAI,EACJ,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAClC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /**
3
+ * Interface exports
4
+ *
5
+ * Centralized export point for all interface definitions.
6
+ * Interfaces are organized in chunks/*.i.ts files.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("./chunks/authorization.i"), exports);
24
+ __exportStar(require("./chunks/mint-authorization.i"), exports);
25
+ __exportStar(require("./chunks/bitcoin-data-provider.i"), exports);
26
+ __exportStar(require("./chunks/vault-balance-module.i"), exports);
27
+ __exportStar(require("./chunks/price-oracle.i"), exports);
28
+ __exportStar(require("./chunks/vault-snapshot.i"), exports);
29
+ __exportStar(require("./chunks/owner-authorization"), exports);
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2DAAyC;AACzC,gEAA8C;AAC9C,mEAAiD;AAMjD,kEAAgD;AAChD,0DAAwC;AACxC,4DAA0C;AAC1C,+DAA6C"}
@@ -0,0 +1,160 @@
1
+ import { OwnerAmountActionAuthorization } from "../interfaces";
2
+ /**
3
+ * Authorization Module
4
+ *
5
+ * Validates that LIT Action callers are authorized to perform operations.
6
+ *
7
+ * RESTORED PRODUCTION-GRADE DESIGN (from b2794c9):
8
+ * - Quantum timestamp prevents replay across different quantums
9
+ * - Waits for safe quantum moment before validation
10
+ * - Validates timestamp is within current quantum window
11
+ * - Signature proves caller identity
12
+ * - Contract verification proves ownership
13
+ *
14
+ * Authorization Flow:
15
+ * 1. Wait for safe quantum moment (if in dead zone)
16
+ * 2. Verify timestamp is within valid quantum window
17
+ * 3. Build message hash from parameters (positionId, timestamp, chainId, amount, action)
18
+ * 4. Recover signer address from signature (EIP-191 standard)
19
+ * 5. Verify recovered signer === position owner (from contract)
20
+ *
21
+ * Security Properties:
22
+ * - Quantum timing enforces 100-second windows with dead zone protection
23
+ * - Smart contract only accepts one operation per quantum per position
24
+ * - Signature proves caller owns the signing address
25
+ * - Contract verification proves signer is position owner
26
+ * - chainId prevents cross-chain replay attacks
27
+ * - Mode controls whether dev environments (hardhat/regtest) are allowed
28
+ *
29
+ * Example: mintUCD
30
+ * - Message: keccak256(positionId, timestamp, chainId, amount, actionHash)
31
+ * - User signs with wallet (EIP-191)
32
+ * - LIT Action WAITS for safe quantum moment
33
+ * - LIT Action VALIDATES quantum timestamp
34
+ * - LIT Action recovers signer address
35
+ * - LIT Action verifies signer is position owner (via contract)
36
+ */
37
+ /**
38
+ * Authorization Module
39
+ *
40
+ * Provides methods to verify caller authorization for LIT Actions
41
+ */
42
+ export declare class AuthorizationModule {
43
+ /**
44
+ * Verify auth structure for amount/position/action operations
45
+ *
46
+ * Validates that all required fields are present and have correct types:
47
+ * - positionId (string, required)
48
+ * - chainId (number, required)
49
+ * - timestamp (number, required)
50
+ * - amount (required, any type that can convert to bigint)
51
+ * - action (string, required)
52
+ * - signature (string, required)
53
+ * - mode ("dev" or "prod", required)
54
+ *
55
+ * @param auth - Authorization object to validate (untyped)
56
+ * @returns Typed OwnerAmountActionAuthorization object after validation
57
+ * @throws Error if any validation fails
58
+ */
59
+ static verifyAmountPositionActionAuthorizationStructure(auth: any): OwnerAmountActionAuthorization;
60
+ /**
61
+ * Recover signer address from signature
62
+ *
63
+ * Uses EIP-191 standard (Ethereum Signed Message)
64
+ *
65
+ * @param messageHash - Keccak256 hash of the message
66
+ * @param signature - Signature to verify
67
+ * @returns Recovered signer address
68
+ */
69
+ static recoverSigner(messageHash: string, signature: string): Promise<string>;
70
+ /**
71
+ * Agnostic authorization verification
72
+ *
73
+ * Verifies authorization for any action by:
74
+ * 1. Waiting for safe quantum moment
75
+ * 2. Validating quantum timestamp
76
+ * 3. Building message hash using provided buildMessage function
77
+ * 4. Recovering signer from signature
78
+ * 5. Checking authorization using provided isAuthorized function
79
+ *
80
+ * @param auth - Authorization parameters (timestamp, signature, mode)
81
+ * @param buildMessage - Function to build message hash (caller has context/closure)
82
+ * @param isAuthorized - Function to check if recovered address is authorized (caller has context/closure)
83
+ * @returns True if authorized
84
+ */
85
+ static verifyActionAuthorization(auth: {
86
+ timestamp: number;
87
+ signature: string;
88
+ mode: "dev" | "prod";
89
+ }, buildMessage: () => string, isAuthorized: (recovered: string) => boolean): Promise<boolean>;
90
+ /**
91
+ * Verify position owner authorization for any amount-based position action
92
+ *
93
+ * AGNOSTIC BASE FUNCTION - verifies authorization without checking action string
94
+ * Specific action verification functions should validate action string before calling this.
95
+ *
96
+ * RESTORED PRODUCTION-GRADE QUANTUM VALIDATION:
97
+ * - STEP 1: Waits for safe quantum moment (avoids dead zone)
98
+ * - STEP 2: Validates timestamp is within current quantum window
99
+ * - STEP 3: Builds message hash from parameters
100
+ * - STEP 4: Recovers signer from signature
101
+ * - STEP 5: Verifies signer matches position owner
102
+ *
103
+ * Message contains: positionId, timestamp, chainId, amount, action
104
+ * NO callerAddress in message (recovered from signature via ecrecover)
105
+ *
106
+ * @param auth - Authorization parameters (positionId, timestamp, chainId, amount, action, signature, mode)
107
+ * @param positionOwner - Position owner address from contract
108
+ * @returns True if authorized
109
+ */
110
+ static verifyAmountPositionActionAuthorization(auth: {
111
+ positionId: string;
112
+ timestamp: number;
113
+ chainId: number;
114
+ amount: string | bigint;
115
+ action: string;
116
+ signature: string;
117
+ mode: "dev" | "prod";
118
+ }, positionOwner: string): Promise<boolean>;
119
+ /**
120
+ * Verify position owner authorization for mintUCD action
121
+ *
122
+ * Validates action string is "mint-ucd" then delegates to base function.
123
+ *
124
+ * @param auth - Authorization parameters (positionId, timestamp, chainId, amount, action, signature, mode)
125
+ * @param positionOwner - Position owner address from contract
126
+ * @returns True if authorized
127
+ */
128
+ static verifyMintAuthorization(auth: {
129
+ positionId: string;
130
+ timestamp: number;
131
+ chainId: number;
132
+ amount: string | bigint;
133
+ action: string;
134
+ signature: string;
135
+ mode: "dev" | "prod";
136
+ }, positionOwner: string): Promise<boolean>;
137
+ /**
138
+ * Verify position owner authorization for withdrawBTC action
139
+ *
140
+ * Validates action string is "withdraw-btc" and includes destinationAddress in message.
141
+ * Unlike mint/repay, withdrawal requires destination address to prevent unauthorized redirection.
142
+ *
143
+ * Message contains: positionId, timestamp, chainId, amount, destinationAddress, action
144
+ *
145
+ * @param auth - Authorization parameters (positionId, timestamp, chainId, amount, destinationAddress, action, signature, mode)
146
+ * @param positionOwner - Position owner address from contract
147
+ * @returns True if authorized
148
+ */
149
+ static verifyWithdrawAuthorization(auth: {
150
+ positionId: string;
151
+ timestamp: number;
152
+ chainId: number;
153
+ amount: string | bigint;
154
+ destinationAddress: string;
155
+ action: string;
156
+ signature: string;
157
+ mode: "dev" | "prod";
158
+ }, positionOwner: string): Promise<boolean>;
159
+ }
160
+ //# sourceMappingURL=authorization.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization.module.d.ts","sourceRoot":"","sources":["../../../src/modules/authorization.module.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAM/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH;;;;GAIG;AACH,qBAAa,mBAAmB;IAC9B;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,gDAAgD,CACrD,IAAI,EAAE,GAAG,GACR,8BAA8B;IA4CjC;;;;;;;;OAQG;WACU,aAAa,CACxB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC;IAyBlB;;;;;;;;;;;;;;OAcG;WACU,yBAAyB,CACpC,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;KACtB,EACD,YAAY,EAAE,MAAM,MAAM,EAC1B,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,GAC3C,OAAO,CAAC,OAAO,CAAC;IAuEnB;;;;;;;;;;;;;;;;;;;OAmBG;WACU,uCAAuC,CAClD,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;KACtB,EACD,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,OAAO,CAAC;IAoDnB;;;;;;;;OAQG;WACU,uBAAuB,CAClC,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;KACtB,EACD,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,OAAO,CAAC;IAanB;;;;;;;;;;;OAWG;WACU,2BAA2B,CACtC,IAAI,EAAE;QACJ,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;KACtB,EACD,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,OAAO,CAAC;CA4DpB"}