@gvnrdao/dh-lit-actions 0.0.61 → 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.
- package/package.json +3 -3
- package/pkg-dist/pkg-src/constants/chunks/contract-deployments.d.ts.map +1 -0
- package/pkg-dist/pkg-src/constants/chunks/contract-deployments.js.map +1 -0
- package/pkg-dist/pkg-src/constants/chunks/lit-actions-registry.d.ts.map +1 -0
- package/pkg-dist/pkg-src/constants/chunks/lit-actions-registry.js.map +1 -0
- package/pkg-dist/pkg-src/constants/chunks/package-registry.d.ts.map +1 -0
- package/pkg-dist/pkg-src/constants/chunks/package-registry.js.map +1 -0
- package/pkg-dist/pkg-src/constants/index.d.ts.map +1 -0
- package/pkg-dist/pkg-src/constants/index.js.map +1 -0
- package/pkg-dist/pkg-src/executors/chunks/vault-snapshot-executor.d.ts +40 -0
- package/pkg-dist/pkg-src/executors/chunks/vault-snapshot-executor.d.ts.map +1 -0
- package/pkg-dist/pkg-src/executors/chunks/vault-snapshot-executor.js +102 -0
- package/pkg-dist/pkg-src/executors/chunks/vault-snapshot-executor.js.map +1 -0
- package/pkg-dist/pkg-src/executors/index.d.ts +43 -0
- package/pkg-dist/pkg-src/executors/index.d.ts.map +1 -0
- package/pkg-dist/pkg-src/executors/index.js +48 -0
- package/pkg-dist/pkg-src/executors/index.js.map +1 -0
- package/pkg-dist/pkg-src/index.d.ts.map +1 -0
- package/pkg-dist/pkg-src/index.js.map +1 -0
- package/pkg-dist/pkg-src/interfaces/chunks/diamond-hands-lit-actions.i.d.ts.map +1 -0
- package/pkg-dist/pkg-src/interfaces/chunks/diamond-hands-lit-actions.i.js.map +1 -0
- package/pkg-dist/pkg-src/interfaces/chunks/lit-action-config.i.d.ts.map +1 -0
- package/pkg-dist/pkg-src/interfaces/chunks/lit-action-config.i.js.map +1 -0
- package/pkg-dist/pkg-src/interfaces/chunks/lit-action-name.i.d.ts.map +1 -0
- package/pkg-dist/pkg-src/interfaces/chunks/lit-action-name.i.js.map +1 -0
- package/pkg-dist/pkg-src/interfaces/chunks/lit-action-registry.i.d.ts.map +1 -0
- package/pkg-dist/pkg-src/interfaces/chunks/lit-action-registry.i.js.map +1 -0
- package/pkg-dist/pkg-src/interfaces/chunks/pkp-info.i.d.ts.map +1 -0
- package/pkg-dist/pkg-src/interfaces/chunks/pkp-info.i.js.map +1 -0
- package/pkg-dist/pkg-src/interfaces/deployments.d.ts.map +1 -0
- package/pkg-dist/pkg-src/interfaces/deployments.js.map +1 -0
- package/pkg-dist/pkg-src/interfaces/index.d.ts.map +1 -0
- package/pkg-dist/pkg-src/interfaces/index.js.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/cid-utils.d.ts.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/cid-utils.js.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/connection-helpers.d.ts.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/connection-helpers.js.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/debug-logger.d.ts.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/debug-logger.js.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/error-classification.d.ts.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/error-classification.js.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/lit-action-helpers.d.ts.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/lit-action-helpers.js.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/pkp-setup.d.ts.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/pkp-setup.js.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/session-signature-cache.d.ts.map +1 -0
- package/pkg-dist/pkg-src/utils/chunks/session-signature-cache.js.map +1 -0
- package/pkg-dist/pkg-src/utils/index.d.ts.map +1 -0
- package/pkg-dist/pkg-src/utils/index.js.map +1 -0
- package/pkg-dist/src/constants/chunks/bitcoin-network-config.d.ts +130 -0
- package/pkg-dist/src/constants/chunks/bitcoin-network-config.d.ts.map +1 -0
- package/pkg-dist/src/constants/chunks/bitcoin-network-config.js +244 -0
- package/pkg-dist/src/constants/chunks/bitcoin-network-config.js.map +1 -0
- package/pkg-dist/src/constants/chunks/bitcoin.d.ts +42 -0
- package/pkg-dist/src/constants/chunks/bitcoin.d.ts.map +1 -0
- package/pkg-dist/src/constants/chunks/bitcoin.js +45 -0
- package/pkg-dist/src/constants/chunks/bitcoin.js.map +1 -0
- package/pkg-dist/src/constants/chunks/decimals.d.ts +44 -0
- package/pkg-dist/src/constants/chunks/decimals.d.ts.map +1 -0
- package/pkg-dist/src/constants/chunks/decimals.js +47 -0
- package/pkg-dist/src/constants/chunks/decimals.js.map +1 -0
- package/pkg-dist/src/constants/chunks/liquidation.d.ts +51 -0
- package/pkg-dist/src/constants/chunks/liquidation.d.ts.map +1 -0
- package/pkg-dist/src/constants/chunks/liquidation.js +54 -0
- package/pkg-dist/src/constants/chunks/liquidation.js.map +1 -0
- package/pkg-dist/src/constants/chunks/loan-status.d.ts +57 -0
- package/pkg-dist/src/constants/chunks/loan-status.d.ts.map +1 -0
- package/pkg-dist/src/constants/chunks/loan-status.js +95 -0
- package/pkg-dist/src/constants/chunks/loan-status.js.map +1 -0
- package/pkg-dist/src/constants/chunks/price-oracle.d.ts +46 -0
- package/pkg-dist/src/constants/chunks/price-oracle.d.ts.map +1 -0
- package/pkg-dist/src/constants/chunks/price-oracle.js +49 -0
- package/pkg-dist/src/constants/chunks/price-oracle.js.map +1 -0
- package/pkg-dist/src/constants/chunks/quantum-time.d.ts +63 -0
- package/pkg-dist/src/constants/chunks/quantum-time.d.ts.map +1 -0
- package/pkg-dist/src/constants/chunks/quantum-time.js +66 -0
- package/pkg-dist/src/constants/chunks/quantum-time.js.map +1 -0
- package/pkg-dist/src/constants/index.d.ts +16 -0
- package/pkg-dist/src/constants/index.d.ts.map +1 -0
- package/pkg-dist/src/constants/index.js +57 -0
- package/pkg-dist/src/constants/index.js.map +1 -0
- package/pkg-dist/src/interfaces/chunks/authorization.i.d.ts +19 -0
- package/pkg-dist/src/interfaces/chunks/authorization.i.d.ts.map +1 -0
- package/pkg-dist/src/interfaces/chunks/authorization.i.js +3 -0
- package/pkg-dist/src/interfaces/chunks/authorization.i.js.map +1 -0
- package/pkg-dist/src/interfaces/chunks/bitcoin-data-provider.i.d.ts +60 -0
- package/pkg-dist/src/interfaces/chunks/bitcoin-data-provider.i.d.ts.map +1 -0
- package/pkg-dist/src/interfaces/chunks/bitcoin-data-provider.i.js +3 -0
- package/pkg-dist/src/interfaces/chunks/bitcoin-data-provider.i.js.map +1 -0
- package/pkg-dist/src/interfaces/chunks/circuit-breaker.i.d.ts +18 -0
- package/pkg-dist/src/interfaces/chunks/circuit-breaker.i.d.ts.map +1 -0
- package/pkg-dist/src/interfaces/chunks/circuit-breaker.i.js +8 -0
- package/pkg-dist/src/interfaces/chunks/circuit-breaker.i.js.map +1 -0
- package/pkg-dist/src/interfaces/chunks/mint-authorization.i.d.ts +24 -0
- package/pkg-dist/src/interfaces/chunks/mint-authorization.i.d.ts.map +1 -0
- package/pkg-dist/src/interfaces/chunks/mint-authorization.i.js +5 -0
- package/pkg-dist/src/interfaces/chunks/mint-authorization.i.js.map +1 -0
- package/pkg-dist/src/interfaces/chunks/owner-authorization.d.ts +60 -0
- package/pkg-dist/src/interfaces/chunks/owner-authorization.d.ts.map +1 -0
- package/pkg-dist/src/interfaces/chunks/owner-authorization.js +8 -0
- package/pkg-dist/src/interfaces/chunks/owner-authorization.js.map +1 -0
- package/pkg-dist/src/interfaces/chunks/price-oracle.i.d.ts +26 -0
- package/pkg-dist/src/interfaces/chunks/price-oracle.i.d.ts.map +1 -0
- package/pkg-dist/src/interfaces/chunks/price-oracle.i.js +3 -0
- package/pkg-dist/src/interfaces/chunks/price-oracle.i.js.map +1 -0
- package/pkg-dist/src/interfaces/chunks/vault-balance-module.i.d.ts +23 -0
- package/pkg-dist/src/interfaces/chunks/vault-balance-module.i.d.ts.map +1 -0
- package/pkg-dist/src/interfaces/chunks/vault-balance-module.i.js +3 -0
- package/pkg-dist/src/interfaces/chunks/vault-balance-module.i.js.map +1 -0
- package/pkg-dist/src/interfaces/chunks/vault-balance.i.d.ts +63 -0
- package/pkg-dist/src/interfaces/chunks/vault-balance.i.d.ts.map +1 -0
- package/pkg-dist/src/interfaces/chunks/vault-balance.i.js +3 -0
- package/pkg-dist/src/interfaces/chunks/vault-balance.i.js.map +1 -0
- package/pkg-dist/src/interfaces/chunks/vault-snapshot.i.d.ts +51 -0
- package/pkg-dist/src/interfaces/chunks/vault-snapshot.i.d.ts.map +1 -0
- package/pkg-dist/src/interfaces/chunks/vault-snapshot.i.js +3 -0
- package/pkg-dist/src/interfaces/chunks/vault-snapshot.i.js.map +1 -0
- package/pkg-dist/src/interfaces/index.d.ts +15 -0
- package/pkg-dist/src/interfaces/index.d.ts.map +1 -0
- package/pkg-dist/src/interfaces/index.js +30 -0
- package/pkg-dist/src/interfaces/index.js.map +1 -0
- package/pkg-dist/src/modules/authorization.module.d.ts +160 -0
- package/pkg-dist/src/modules/authorization.module.d.ts.map +1 -0
- package/pkg-dist/src/modules/authorization.module.js +317 -0
- package/pkg-dist/src/modules/authorization.module.js.map +1 -0
- package/pkg-dist/src/modules/bitcoin-data-provider.module.d.ts +91 -0
- package/pkg-dist/src/modules/bitcoin-data-provider.module.d.ts.map +1 -0
- package/pkg-dist/src/modules/bitcoin-data-provider.module.js +261 -0
- package/pkg-dist/src/modules/bitcoin-data-provider.module.js.map +1 -0
- package/pkg-dist/src/modules/business-rules-math.module.d.ts +155 -0
- package/pkg-dist/src/modules/business-rules-math.module.d.ts.map +1 -0
- package/pkg-dist/src/modules/business-rules-math.module.js +309 -0
- package/pkg-dist/src/modules/business-rules-math.module.js.map +1 -0
- package/pkg-dist/src/modules/price-oracle.module.d.ts +29 -0
- package/pkg-dist/src/modules/price-oracle.module.d.ts.map +1 -0
- package/pkg-dist/src/modules/price-oracle.module.js +223 -0
- package/pkg-dist/src/modules/price-oracle.module.js.map +1 -0
- package/pkg-dist/src/modules/protocol-parameters.module.d.ts +58 -0
- package/pkg-dist/src/modules/protocol-parameters.module.d.ts.map +1 -0
- package/pkg-dist/src/modules/protocol-parameters.module.js +125 -0
- package/pkg-dist/src/modules/protocol-parameters.module.js.map +1 -0
- package/pkg-dist/src/modules/quantum-time.module.d.ts +149 -0
- package/pkg-dist/src/modules/quantum-time.module.d.ts.map +1 -0
- package/pkg-dist/src/modules/quantum-time.module.js +240 -0
- package/pkg-dist/src/modules/quantum-time.module.js.map +1 -0
- package/pkg-dist/src/modules/vault-balance.module.d.ts +172 -0
- package/pkg-dist/src/modules/vault-balance.module.d.ts.map +1 -0
- package/pkg-dist/src/modules/vault-balance.module.js +318 -0
- package/pkg-dist/src/modules/vault-balance.module.js.map +1 -0
- package/pkg-dist/src/modules/vault-snapshot.d.ts +168 -0
- package/pkg-dist/src/modules/vault-snapshot.d.ts.map +1 -0
- package/pkg-dist/src/modules/vault-snapshot.js +370 -0
- package/pkg-dist/src/modules/vault-snapshot.js.map +1 -0
- package/pkg-dist/constants/chunks/contract-deployments.d.ts.map +0 -1
- package/pkg-dist/constants/chunks/contract-deployments.js.map +0 -1
- package/pkg-dist/constants/chunks/lit-actions-registry.d.ts.map +0 -1
- package/pkg-dist/constants/chunks/lit-actions-registry.js.map +0 -1
- package/pkg-dist/constants/chunks/package-registry.d.ts.map +0 -1
- package/pkg-dist/constants/chunks/package-registry.js.map +0 -1
- package/pkg-dist/constants/index.d.ts.map +0 -1
- package/pkg-dist/constants/index.js.map +0 -1
- package/pkg-dist/index.d.ts.map +0 -1
- package/pkg-dist/index.js.map +0 -1
- package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.d.ts.map +0 -1
- package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.js.map +0 -1
- package/pkg-dist/interfaces/chunks/lit-action-config.i.d.ts.map +0 -1
- package/pkg-dist/interfaces/chunks/lit-action-config.i.js.map +0 -1
- package/pkg-dist/interfaces/chunks/lit-action-name.i.d.ts.map +0 -1
- package/pkg-dist/interfaces/chunks/lit-action-name.i.js.map +0 -1
- package/pkg-dist/interfaces/chunks/lit-action-registry.i.d.ts.map +0 -1
- package/pkg-dist/interfaces/chunks/lit-action-registry.i.js.map +0 -1
- package/pkg-dist/interfaces/chunks/pkp-info.i.d.ts.map +0 -1
- package/pkg-dist/interfaces/chunks/pkp-info.i.js.map +0 -1
- package/pkg-dist/interfaces/deployments.d.ts.map +0 -1
- package/pkg-dist/interfaces/deployments.js.map +0 -1
- package/pkg-dist/interfaces/index.d.ts.map +0 -1
- package/pkg-dist/interfaces/index.js.map +0 -1
- package/pkg-dist/utils/chunks/cid-utils.d.ts.map +0 -1
- package/pkg-dist/utils/chunks/cid-utils.js.map +0 -1
- package/pkg-dist/utils/chunks/connection-helpers.d.ts.map +0 -1
- package/pkg-dist/utils/chunks/connection-helpers.js.map +0 -1
- package/pkg-dist/utils/chunks/debug-logger.d.ts.map +0 -1
- package/pkg-dist/utils/chunks/debug-logger.js.map +0 -1
- package/pkg-dist/utils/chunks/error-classification.d.ts.map +0 -1
- package/pkg-dist/utils/chunks/error-classification.js.map +0 -1
- package/pkg-dist/utils/chunks/lit-action-helpers.d.ts.map +0 -1
- package/pkg-dist/utils/chunks/lit-action-helpers.js.map +0 -1
- package/pkg-dist/utils/chunks/pkp-setup.d.ts.map +0 -1
- package/pkg-dist/utils/chunks/pkp-setup.js.map +0 -1
- package/pkg-dist/utils/chunks/session-signature-cache.d.ts.map +0 -1
- package/pkg-dist/utils/chunks/session-signature-cache.js.map +0 -1
- package/pkg-dist/utils/index.d.ts.map +0 -1
- package/pkg-dist/utils/index.js.map +0 -1
- /package/pkg-dist/{constants → pkg-src/constants}/chunks/contract-deployments.d.ts +0 -0
- /package/pkg-dist/{constants → pkg-src/constants}/chunks/contract-deployments.js +0 -0
- /package/pkg-dist/{constants → pkg-src/constants}/chunks/lit-actions-registry.d.ts +0 -0
- /package/pkg-dist/{constants → pkg-src/constants}/chunks/lit-actions-registry.js +0 -0
- /package/pkg-dist/{constants → pkg-src/constants}/chunks/package-registry.d.ts +0 -0
- /package/pkg-dist/{constants → pkg-src/constants}/chunks/package-registry.js +0 -0
- /package/pkg-dist/{constants → pkg-src/constants}/index.d.ts +0 -0
- /package/pkg-dist/{constants → pkg-src/constants}/index.js +0 -0
- /package/pkg-dist/{index.d.ts → pkg-src/index.d.ts} +0 -0
- /package/pkg-dist/{index.js → pkg-src/index.js} +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/diamond-hands-lit-actions.i.d.ts +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/diamond-hands-lit-actions.i.js +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-config.i.d.ts +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-config.i.js +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-name.i.d.ts +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-name.i.js +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-registry.i.d.ts +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/lit-action-registry.i.js +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/pkp-info.i.d.ts +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/chunks/pkp-info.i.js +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/deployments.d.ts +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/deployments.js +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/index.d.ts +0 -0
- /package/pkg-dist/{interfaces → pkg-src/interfaces}/index.js +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/cid-utils.d.ts +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/cid-utils.js +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/connection-helpers.d.ts +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/connection-helpers.js +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/debug-logger.d.ts +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/debug-logger.js +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/error-classification.d.ts +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/error-classification.js +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/lit-action-helpers.d.ts +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/lit-action-helpers.js +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/pkp-setup.d.ts +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/pkp-setup.js +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/session-signature-cache.d.ts +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/chunks/session-signature-cache.js +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/index.d.ts +0 -0
- /package/pkg-dist/{utils → pkg-src/utils}/index.js +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Liquidation Protocol Constants
|
|
4
|
+
*
|
|
5
|
+
* These constants define the liquidation thresholds and grace period escalation
|
|
6
|
+
* for the Diamond Hands Protocol. They are governance-adjustable parameters.
|
|
7
|
+
*
|
|
8
|
+
* CRITICAL: Changes to these values affect protocol security and user positions.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.GRACE_PERIOD_DAYS = exports.EXPIRED_LOAN_MAX_LIQUIDATION_THRESHOLD_BPS = exports.EXPIRED_LOAN_MIN_LIQUIDATION_THRESHOLD_BPS = exports.ACTIVE_LOAN_LIQUIDATION_THRESHOLD_BPS = void 0;
|
|
12
|
+
/**
|
|
13
|
+
* Active Loan Liquidation Threshold
|
|
14
|
+
*
|
|
15
|
+
* Minimum collateral ratio required for active (non-expired) loans.
|
|
16
|
+
* Value: 130% (13000 basis points)
|
|
17
|
+
*
|
|
18
|
+
* Governance-adjustable: YES
|
|
19
|
+
*/
|
|
20
|
+
exports.ACTIVE_LOAN_LIQUIDATION_THRESHOLD_BPS = 13000;
|
|
21
|
+
/**
|
|
22
|
+
* Expired Loan Minimum Liquidation Threshold
|
|
23
|
+
*
|
|
24
|
+
* Starting liquidation threshold when loan expires (day 0 of grace period).
|
|
25
|
+
* Value: 110% (11000 basis points)
|
|
26
|
+
*
|
|
27
|
+
* The threshold escalates from this value to MAX over the grace period.
|
|
28
|
+
*
|
|
29
|
+
* Governance-adjustable: YES
|
|
30
|
+
*/
|
|
31
|
+
exports.EXPIRED_LOAN_MIN_LIQUIDATION_THRESHOLD_BPS = 11000;
|
|
32
|
+
/**
|
|
33
|
+
* Expired Loan Maximum Liquidation Threshold
|
|
34
|
+
*
|
|
35
|
+
* Maximum liquidation threshold reached at end of grace period (day 30).
|
|
36
|
+
* Value: 200% (20000 basis points)
|
|
37
|
+
*
|
|
38
|
+
* The threshold escalates from MIN to this value over the grace period.
|
|
39
|
+
*
|
|
40
|
+
* Governance-adjustable: YES
|
|
41
|
+
*/
|
|
42
|
+
exports.EXPIRED_LOAN_MAX_LIQUIDATION_THRESHOLD_BPS = 20000;
|
|
43
|
+
/**
|
|
44
|
+
* Grace Period Duration
|
|
45
|
+
*
|
|
46
|
+
* Number of days after loan expiry before maximum liquidation threshold is reached.
|
|
47
|
+
* Value: 30 days
|
|
48
|
+
*
|
|
49
|
+
* During this period, liquidation threshold escalates quadratically from MIN to MAX.
|
|
50
|
+
*
|
|
51
|
+
* Governance-adjustable: YES
|
|
52
|
+
*/
|
|
53
|
+
exports.GRACE_PERIOD_DAYS = 30;
|
|
54
|
+
//# sourceMappingURL=liquidation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liquidation.js","sourceRoot":"","sources":["../../../../src/constants/chunks/liquidation.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH;;;;;;;GAOG;AACU,QAAA,qCAAqC,GAAG,KAAK,CAAC;AAE3D;;;;;;;;;GASG;AACU,QAAA,0CAA0C,GAAG,KAAK,CAAC;AAEhE;;;;;;;;;GASG;AACU,QAAA,0CAA0C,GAAG,KAAK,CAAC;AAEhE;;;;;;;;;GASG;AACU,QAAA,iBAAiB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loan Status Constants
|
|
3
|
+
*
|
|
4
|
+
* Canonical loan lifecycle states matching the smart contract LoanStatus enum.
|
|
5
|
+
* These values MUST match contracts/src/libraries/LoanStatus.sol exactly.
|
|
6
|
+
*
|
|
7
|
+
* @see contracts/src/libraries/LoanStatus.sol
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Loan lifecycle status enum
|
|
11
|
+
*
|
|
12
|
+
* Matches Solidity enum from LoanStatusLib.LoanStatus
|
|
13
|
+
*/
|
|
14
|
+
export declare enum LoanStatus {
|
|
15
|
+
/** Loan created, awaiting BTC deposit */
|
|
16
|
+
PENDING_DEPOSIT = 0,
|
|
17
|
+
/** BTC deposited, awaiting UCD minting */
|
|
18
|
+
PENDING_MINT = 1,
|
|
19
|
+
/** UCD minted, loan is active */
|
|
20
|
+
ACTIVE = 2,
|
|
21
|
+
/** Loan passed expiry, in grace period */
|
|
22
|
+
EXPIRED = 3,
|
|
23
|
+
/** Under-collateralized, eligible for liquidation */
|
|
24
|
+
LIQUIDATABLE = 4,
|
|
25
|
+
/** Position has been liquidated */
|
|
26
|
+
LIQUIDATED = 5,
|
|
27
|
+
/** UCD debt repaid, awaiting BTC withdrawal */
|
|
28
|
+
REPAID = 6,
|
|
29
|
+
/** Position permanently closed */
|
|
30
|
+
CLOSED = 7
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Convert loan status enum to human-readable string
|
|
34
|
+
*
|
|
35
|
+
* @param status Loan status enum value
|
|
36
|
+
* @returns Human-readable status string
|
|
37
|
+
*/
|
|
38
|
+
export declare function loanStatusToString(status: LoanStatus | number): string;
|
|
39
|
+
/**
|
|
40
|
+
* Check if status is valid for minting operations
|
|
41
|
+
*
|
|
42
|
+
* Minting is allowed in:
|
|
43
|
+
* - PENDING_DEPOSIT: Initial mint before BTC arrives
|
|
44
|
+
* - PENDING_MINT: Normal flow - mint after BTC deposited
|
|
45
|
+
* - ACTIVE: Additional minting (topping up debt)
|
|
46
|
+
*
|
|
47
|
+
* @param status Loan status to check
|
|
48
|
+
* @returns True if minting is allowed in this status
|
|
49
|
+
*/
|
|
50
|
+
export declare function isValidMintingStatus(status: LoanStatus | number): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Get list of statuses that allow minting
|
|
53
|
+
*
|
|
54
|
+
* @returns Array of valid minting statuses
|
|
55
|
+
*/
|
|
56
|
+
export declare function getValidMintingStatuses(): LoanStatus[];
|
|
57
|
+
//# sourceMappingURL=loan-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loan-status.d.ts","sourceRoot":"","sources":["../../../../src/constants/chunks/loan-status.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;GAIG;AACH,oBAAY,UAAU;IACpB,yCAAyC;IACzC,eAAe,IAAI;IAEnB,0CAA0C;IAC1C,YAAY,IAAI;IAEhB,iCAAiC;IACjC,MAAM,IAAI;IAEV,0CAA0C;IAC1C,OAAO,IAAI;IAEX,qDAAqD;IACrD,YAAY,IAAI;IAEhB,mCAAmC;IACnC,UAAU,IAAI;IAEd,+CAA+C;IAC/C,MAAM,IAAI;IAEV,kCAAkC;IAClC,MAAM,IAAI;CACX;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,CAqBtE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,CAMzE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,UAAU,EAAE,CAMtD"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Loan Status Constants
|
|
4
|
+
*
|
|
5
|
+
* Canonical loan lifecycle states matching the smart contract LoanStatus enum.
|
|
6
|
+
* These values MUST match contracts/src/libraries/LoanStatus.sol exactly.
|
|
7
|
+
*
|
|
8
|
+
* @see contracts/src/libraries/LoanStatus.sol
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.LoanStatus = void 0;
|
|
12
|
+
exports.loanStatusToString = loanStatusToString;
|
|
13
|
+
exports.isValidMintingStatus = isValidMintingStatus;
|
|
14
|
+
exports.getValidMintingStatuses = getValidMintingStatuses;
|
|
15
|
+
/**
|
|
16
|
+
* Loan lifecycle status enum
|
|
17
|
+
*
|
|
18
|
+
* Matches Solidity enum from LoanStatusLib.LoanStatus
|
|
19
|
+
*/
|
|
20
|
+
var LoanStatus;
|
|
21
|
+
(function (LoanStatus) {
|
|
22
|
+
/** Loan created, awaiting BTC deposit */
|
|
23
|
+
LoanStatus[LoanStatus["PENDING_DEPOSIT"] = 0] = "PENDING_DEPOSIT";
|
|
24
|
+
/** BTC deposited, awaiting UCD minting */
|
|
25
|
+
LoanStatus[LoanStatus["PENDING_MINT"] = 1] = "PENDING_MINT";
|
|
26
|
+
/** UCD minted, loan is active */
|
|
27
|
+
LoanStatus[LoanStatus["ACTIVE"] = 2] = "ACTIVE";
|
|
28
|
+
/** Loan passed expiry, in grace period */
|
|
29
|
+
LoanStatus[LoanStatus["EXPIRED"] = 3] = "EXPIRED";
|
|
30
|
+
/** Under-collateralized, eligible for liquidation */
|
|
31
|
+
LoanStatus[LoanStatus["LIQUIDATABLE"] = 4] = "LIQUIDATABLE";
|
|
32
|
+
/** Position has been liquidated */
|
|
33
|
+
LoanStatus[LoanStatus["LIQUIDATED"] = 5] = "LIQUIDATED";
|
|
34
|
+
/** UCD debt repaid, awaiting BTC withdrawal */
|
|
35
|
+
LoanStatus[LoanStatus["REPAID"] = 6] = "REPAID";
|
|
36
|
+
/** Position permanently closed */
|
|
37
|
+
LoanStatus[LoanStatus["CLOSED"] = 7] = "CLOSED";
|
|
38
|
+
})(LoanStatus || (exports.LoanStatus = LoanStatus = {}));
|
|
39
|
+
/**
|
|
40
|
+
* Convert loan status enum to human-readable string
|
|
41
|
+
*
|
|
42
|
+
* @param status Loan status enum value
|
|
43
|
+
* @returns Human-readable status string
|
|
44
|
+
*/
|
|
45
|
+
function loanStatusToString(status) {
|
|
46
|
+
switch (status) {
|
|
47
|
+
case LoanStatus.PENDING_DEPOSIT:
|
|
48
|
+
return "PENDING_DEPOSIT";
|
|
49
|
+
case LoanStatus.PENDING_MINT:
|
|
50
|
+
return "PENDING_MINT";
|
|
51
|
+
case LoanStatus.ACTIVE:
|
|
52
|
+
return "ACTIVE";
|
|
53
|
+
case LoanStatus.EXPIRED:
|
|
54
|
+
return "EXPIRED";
|
|
55
|
+
case LoanStatus.LIQUIDATABLE:
|
|
56
|
+
return "LIQUIDATABLE";
|
|
57
|
+
case LoanStatus.LIQUIDATED:
|
|
58
|
+
return "LIQUIDATED";
|
|
59
|
+
case LoanStatus.REPAID:
|
|
60
|
+
return "REPAID";
|
|
61
|
+
case LoanStatus.CLOSED:
|
|
62
|
+
return "CLOSED";
|
|
63
|
+
default:
|
|
64
|
+
return `UNKNOWN(${status})`;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Check if status is valid for minting operations
|
|
69
|
+
*
|
|
70
|
+
* Minting is allowed in:
|
|
71
|
+
* - PENDING_DEPOSIT: Initial mint before BTC arrives
|
|
72
|
+
* - PENDING_MINT: Normal flow - mint after BTC deposited
|
|
73
|
+
* - ACTIVE: Additional minting (topping up debt)
|
|
74
|
+
*
|
|
75
|
+
* @param status Loan status to check
|
|
76
|
+
* @returns True if minting is allowed in this status
|
|
77
|
+
*/
|
|
78
|
+
function isValidMintingStatus(status) {
|
|
79
|
+
return (status === LoanStatus.PENDING_DEPOSIT ||
|
|
80
|
+
status === LoanStatus.PENDING_MINT ||
|
|
81
|
+
status === LoanStatus.ACTIVE);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get list of statuses that allow minting
|
|
85
|
+
*
|
|
86
|
+
* @returns Array of valid minting statuses
|
|
87
|
+
*/
|
|
88
|
+
function getValidMintingStatuses() {
|
|
89
|
+
return [
|
|
90
|
+
LoanStatus.PENDING_DEPOSIT,
|
|
91
|
+
LoanStatus.PENDING_MINT,
|
|
92
|
+
LoanStatus.ACTIVE,
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=loan-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loan-status.js","sourceRoot":"","sources":["../../../../src/constants/chunks/loan-status.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAuCH,gDAqBC;AAaD,oDAMC;AAOD,0DAMC;AA1FD;;;;GAIG;AACH,IAAY,UAwBX;AAxBD,WAAY,UAAU;IACpB,yCAAyC;IACzC,iEAAmB,CAAA;IAEnB,0CAA0C;IAC1C,2DAAgB,CAAA;IAEhB,iCAAiC;IACjC,+CAAU,CAAA;IAEV,0CAA0C;IAC1C,iDAAW,CAAA;IAEX,qDAAqD;IACrD,2DAAgB,CAAA;IAEhB,mCAAmC;IACnC,uDAAc,CAAA;IAEd,+CAA+C;IAC/C,+CAAU,CAAA;IAEV,kCAAkC;IAClC,+CAAU,CAAA;AACZ,CAAC,EAxBW,UAAU,0BAAV,UAAU,QAwBrB;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,MAA2B;IAC5D,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,UAAU,CAAC,eAAe;YAC7B,OAAO,iBAAiB,CAAC;QAC3B,KAAK,UAAU,CAAC,YAAY;YAC1B,OAAO,cAAc,CAAC;QACxB,KAAK,UAAU,CAAC,MAAM;YACpB,OAAO,QAAQ,CAAC;QAClB,KAAK,UAAU,CAAC,OAAO;YACrB,OAAO,SAAS,CAAC;QACnB,KAAK,UAAU,CAAC,YAAY;YAC1B,OAAO,cAAc,CAAC;QACxB,KAAK,UAAU,CAAC,UAAU;YACxB,OAAO,YAAY,CAAC;QACtB,KAAK,UAAU,CAAC,MAAM;YACpB,OAAO,QAAQ,CAAC;QAClB,KAAK,UAAU,CAAC,MAAM;YACpB,OAAO,QAAQ,CAAC;QAClB;YACE,OAAO,WAAW,MAAM,GAAG,CAAC;IAChC,CAAC;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,oBAAoB,CAAC,MAA2B;IAC9D,OAAO,CACL,MAAM,KAAK,UAAU,CAAC,eAAe;QACrC,MAAM,KAAK,UAAU,CAAC,YAAY;QAClC,MAAM,KAAK,UAAU,CAAC,MAAM,CAC7B,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAgB,uBAAuB;IACrC,OAAO;QACL,UAAU,CAAC,eAAe;QAC1B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,MAAM;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Price Oracle Protocol Constants
|
|
3
|
+
*
|
|
4
|
+
* These constants define the validation thresholds for price consensus
|
|
5
|
+
* across multiple price sources. They ensure price integrity and prevent
|
|
6
|
+
* manipulation attacks.
|
|
7
|
+
*
|
|
8
|
+
* CRITICAL: Changes to these values affect price stability and oracle security.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Individual Price Source Outlier Threshold
|
|
12
|
+
*
|
|
13
|
+
* Maximum allowed deviation of a single price source from the median price.
|
|
14
|
+
* Value: 2% (0.02)
|
|
15
|
+
*
|
|
16
|
+
* If any source deviates more than this from the median, it is rejected as an outlier.
|
|
17
|
+
*
|
|
18
|
+
* Example:
|
|
19
|
+
* - Median price: $100,000
|
|
20
|
+
* - Outlier threshold: $2,000 (2%)
|
|
21
|
+
* - Acceptable range: $98,000 - $102,000
|
|
22
|
+
*
|
|
23
|
+
* Governance-adjustable: YES
|
|
24
|
+
*/
|
|
25
|
+
export declare const PRICE_ORACLE_OUTLIER_DEVIATION_THRESHOLD = 0.02;
|
|
26
|
+
/**
|
|
27
|
+
* Price Source Dispersion Threshold
|
|
28
|
+
*
|
|
29
|
+
* Maximum allowed spread between all price sources (max/min ratio).
|
|
30
|
+
* Value: 5% (0.05 = 1.05x ratio)
|
|
31
|
+
*
|
|
32
|
+
* If the price spread exceeds this threshold, consensus is rejected.
|
|
33
|
+
*
|
|
34
|
+
* Example:
|
|
35
|
+
* - Highest price: $105,000
|
|
36
|
+
* - Lowest price: $100,000
|
|
37
|
+
* - Ratio: 1.05 (5% dispersion) - ACCEPTABLE
|
|
38
|
+
* - Ratio: 1.06 (6% dispersion) - REJECTED
|
|
39
|
+
*
|
|
40
|
+
* This prevents accepting prices when sources disagree significantly,
|
|
41
|
+
* even if no single source is an outlier from the median.
|
|
42
|
+
*
|
|
43
|
+
* Governance-adjustable: YES
|
|
44
|
+
*/
|
|
45
|
+
export declare const PRICE_ORACLE_DISPERSION_THRESHOLD = 0.05;
|
|
46
|
+
//# sourceMappingURL=price-oracle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-oracle.d.ts","sourceRoot":"","sources":["../../../../src/constants/chunks/price-oracle.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wCAAwC,OAAO,CAAC;AAE7D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iCAAiC,OAAO,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Price Oracle Protocol Constants
|
|
4
|
+
*
|
|
5
|
+
* These constants define the validation thresholds for price consensus
|
|
6
|
+
* across multiple price sources. They ensure price integrity and prevent
|
|
7
|
+
* manipulation attacks.
|
|
8
|
+
*
|
|
9
|
+
* CRITICAL: Changes to these values affect price stability and oracle security.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PRICE_ORACLE_DISPERSION_THRESHOLD = exports.PRICE_ORACLE_OUTLIER_DEVIATION_THRESHOLD = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* Individual Price Source Outlier Threshold
|
|
15
|
+
*
|
|
16
|
+
* Maximum allowed deviation of a single price source from the median price.
|
|
17
|
+
* Value: 2% (0.02)
|
|
18
|
+
*
|
|
19
|
+
* If any source deviates more than this from the median, it is rejected as an outlier.
|
|
20
|
+
*
|
|
21
|
+
* Example:
|
|
22
|
+
* - Median price: $100,000
|
|
23
|
+
* - Outlier threshold: $2,000 (2%)
|
|
24
|
+
* - Acceptable range: $98,000 - $102,000
|
|
25
|
+
*
|
|
26
|
+
* Governance-adjustable: YES
|
|
27
|
+
*/
|
|
28
|
+
exports.PRICE_ORACLE_OUTLIER_DEVIATION_THRESHOLD = 0.02;
|
|
29
|
+
/**
|
|
30
|
+
* Price Source Dispersion Threshold
|
|
31
|
+
*
|
|
32
|
+
* Maximum allowed spread between all price sources (max/min ratio).
|
|
33
|
+
* Value: 5% (0.05 = 1.05x ratio)
|
|
34
|
+
*
|
|
35
|
+
* If the price spread exceeds this threshold, consensus is rejected.
|
|
36
|
+
*
|
|
37
|
+
* Example:
|
|
38
|
+
* - Highest price: $105,000
|
|
39
|
+
* - Lowest price: $100,000
|
|
40
|
+
* - Ratio: 1.05 (5% dispersion) - ACCEPTABLE
|
|
41
|
+
* - Ratio: 1.06 (6% dispersion) - REJECTED
|
|
42
|
+
*
|
|
43
|
+
* This prevents accepting prices when sources disagree significantly,
|
|
44
|
+
* even if no single source is an outlier from the median.
|
|
45
|
+
*
|
|
46
|
+
* Governance-adjustable: YES
|
|
47
|
+
*/
|
|
48
|
+
exports.PRICE_ORACLE_DISPERSION_THRESHOLD = 0.05;
|
|
49
|
+
//# sourceMappingURL=price-oracle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-oracle.js","sourceRoot":"","sources":["../../../../src/constants/chunks/price-oracle.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH;;;;;;;;;;;;;;GAcG;AACU,QAAA,wCAAwC,GAAG,IAAI,CAAC;AAE7D;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,iCAAiC,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quantum Time Window Protocol Constants
|
|
3
|
+
*
|
|
4
|
+
* These constants define the quantum time window system used for temporal
|
|
5
|
+
* validation of signed operations across the protocol.
|
|
6
|
+
*
|
|
7
|
+
* CRITICAL: Changes to these values affect replay attack protection and
|
|
8
|
+
* validator synchronization. All validators must use identical values.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Quantum Window Duration (seconds)
|
|
12
|
+
*
|
|
13
|
+
* Each quantum window is 100 seconds long.
|
|
14
|
+
* Quantum timestamps always end in 00: 100, 200, 300, 400...
|
|
15
|
+
*
|
|
16
|
+
* Value: 100 seconds
|
|
17
|
+
*
|
|
18
|
+
* Purpose:
|
|
19
|
+
* - Provides time-bound validation windows
|
|
20
|
+
* - Prevents replay attacks across quantum boundaries
|
|
21
|
+
* - Enables deterministic timestamp validation
|
|
22
|
+
*
|
|
23
|
+
* Security guarantee: Signatures are only valid within their quantum window.
|
|
24
|
+
*
|
|
25
|
+
* Governance-adjustable: NO (protocol-level constant)
|
|
26
|
+
*/
|
|
27
|
+
export declare const QUANTUM_WINDOW_SECONDS = 100;
|
|
28
|
+
/**
|
|
29
|
+
* Dead Zone Duration (seconds)
|
|
30
|
+
*
|
|
31
|
+
* The dead zone spans the quantum boundary: 8 seconds before + 8 seconds after.
|
|
32
|
+
* During this period, LIT Actions WAIT and Smart Contracts REJECT.
|
|
33
|
+
*
|
|
34
|
+
* Dead zone structure:
|
|
35
|
+
* - Seconds 92-99: Last 8 seconds of quantum (before boundary)
|
|
36
|
+
* - Seconds 0-7: First 8 seconds of quantum (after boundary)
|
|
37
|
+
* - Total: 16 seconds
|
|
38
|
+
*
|
|
39
|
+
* Value: 16 seconds (8+8)
|
|
40
|
+
*
|
|
41
|
+
* Protects against:
|
|
42
|
+
* 1. Clock desynchronization (NTP drift, network delays)
|
|
43
|
+
* 2. Ethereum miner timestamp manipulation (validators can shift ±15 seconds)
|
|
44
|
+
* 3. Quantum boundary confusion
|
|
45
|
+
*
|
|
46
|
+
* Security guarantee: 16-second buffer > 15-second miner manipulation = complete protection.
|
|
47
|
+
*
|
|
48
|
+
* Governance-adjustable: NO (protocol-level constant, security-critical)
|
|
49
|
+
*/
|
|
50
|
+
export declare const DEAD_ZONE_SECONDS = 16;
|
|
51
|
+
/**
|
|
52
|
+
* Safe Execution Window (seconds)
|
|
53
|
+
*
|
|
54
|
+
* Actual usable time in each quantum after excluding the dead zone.
|
|
55
|
+
*
|
|
56
|
+
* Value: 84 seconds (QUANTUM_WINDOW_SECONDS - DEAD_ZONE_SECONDS)
|
|
57
|
+
*
|
|
58
|
+
* Safe period: seconds 8-91 of each quantum
|
|
59
|
+
*
|
|
60
|
+
* Governance-adjustable: NO (derived from other constants)
|
|
61
|
+
*/
|
|
62
|
+
export declare const SAFE_EXECUTION_WINDOW_SECONDS: number;
|
|
63
|
+
//# sourceMappingURL=quantum-time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quantum-time.d.ts","sourceRoot":"","sources":["../../../../src/constants/chunks/quantum-time.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,QACE,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Quantum Time Window Protocol Constants
|
|
4
|
+
*
|
|
5
|
+
* These constants define the quantum time window system used for temporal
|
|
6
|
+
* validation of signed operations across the protocol.
|
|
7
|
+
*
|
|
8
|
+
* CRITICAL: Changes to these values affect replay attack protection and
|
|
9
|
+
* validator synchronization. All validators must use identical values.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SAFE_EXECUTION_WINDOW_SECONDS = exports.DEAD_ZONE_SECONDS = exports.QUANTUM_WINDOW_SECONDS = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* Quantum Window Duration (seconds)
|
|
15
|
+
*
|
|
16
|
+
* Each quantum window is 100 seconds long.
|
|
17
|
+
* Quantum timestamps always end in 00: 100, 200, 300, 400...
|
|
18
|
+
*
|
|
19
|
+
* Value: 100 seconds
|
|
20
|
+
*
|
|
21
|
+
* Purpose:
|
|
22
|
+
* - Provides time-bound validation windows
|
|
23
|
+
* - Prevents replay attacks across quantum boundaries
|
|
24
|
+
* - Enables deterministic timestamp validation
|
|
25
|
+
*
|
|
26
|
+
* Security guarantee: Signatures are only valid within their quantum window.
|
|
27
|
+
*
|
|
28
|
+
* Governance-adjustable: NO (protocol-level constant)
|
|
29
|
+
*/
|
|
30
|
+
exports.QUANTUM_WINDOW_SECONDS = 100;
|
|
31
|
+
/**
|
|
32
|
+
* Dead Zone Duration (seconds)
|
|
33
|
+
*
|
|
34
|
+
* The dead zone spans the quantum boundary: 8 seconds before + 8 seconds after.
|
|
35
|
+
* During this period, LIT Actions WAIT and Smart Contracts REJECT.
|
|
36
|
+
*
|
|
37
|
+
* Dead zone structure:
|
|
38
|
+
* - Seconds 92-99: Last 8 seconds of quantum (before boundary)
|
|
39
|
+
* - Seconds 0-7: First 8 seconds of quantum (after boundary)
|
|
40
|
+
* - Total: 16 seconds
|
|
41
|
+
*
|
|
42
|
+
* Value: 16 seconds (8+8)
|
|
43
|
+
*
|
|
44
|
+
* Protects against:
|
|
45
|
+
* 1. Clock desynchronization (NTP drift, network delays)
|
|
46
|
+
* 2. Ethereum miner timestamp manipulation (validators can shift ±15 seconds)
|
|
47
|
+
* 3. Quantum boundary confusion
|
|
48
|
+
*
|
|
49
|
+
* Security guarantee: 16-second buffer > 15-second miner manipulation = complete protection.
|
|
50
|
+
*
|
|
51
|
+
* Governance-adjustable: NO (protocol-level constant, security-critical)
|
|
52
|
+
*/
|
|
53
|
+
exports.DEAD_ZONE_SECONDS = 16;
|
|
54
|
+
/**
|
|
55
|
+
* Safe Execution Window (seconds)
|
|
56
|
+
*
|
|
57
|
+
* Actual usable time in each quantum after excluding the dead zone.
|
|
58
|
+
*
|
|
59
|
+
* Value: 84 seconds (QUANTUM_WINDOW_SECONDS - DEAD_ZONE_SECONDS)
|
|
60
|
+
*
|
|
61
|
+
* Safe period: seconds 8-91 of each quantum
|
|
62
|
+
*
|
|
63
|
+
* Governance-adjustable: NO (derived from other constants)
|
|
64
|
+
*/
|
|
65
|
+
exports.SAFE_EXECUTION_WINDOW_SECONDS = exports.QUANTUM_WINDOW_SECONDS - exports.DEAD_ZONE_SECONDS;
|
|
66
|
+
//# sourceMappingURL=quantum-time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quantum-time.js","sourceRoot":"","sources":["../../../../src/constants/chunks/quantum-time.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,sBAAsB,GAAG,GAAG,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACU,QAAA,iBAAiB,GAAG,EAAE,CAAC;AAEpC;;;;;;;;;;GAUG;AACU,QAAA,6BAA6B,GACxC,8BAAsB,GAAG,yBAAiB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diamond Hands Protocol Constants
|
|
3
|
+
*
|
|
4
|
+
* This file exports all protocol constants from their respective chunks.
|
|
5
|
+
* All governance-adjustable parameters are centralized here for easy auditing.
|
|
6
|
+
*
|
|
7
|
+
* CRITICAL: Any changes to these constants affect protocol behavior and security.
|
|
8
|
+
*/
|
|
9
|
+
export { ACTIVE_LOAN_LIQUIDATION_THRESHOLD_BPS, EXPIRED_LOAN_MIN_LIQUIDATION_THRESHOLD_BPS, EXPIRED_LOAN_MAX_LIQUIDATION_THRESHOLD_BPS, GRACE_PERIOD_DAYS, } from "./chunks/liquidation";
|
|
10
|
+
export { SATOSHIS_PER_BITCOIN, PRICE_ORACLE_DECIMALS, UCD_TOKEN_DECIMALS, } from "./chunks/decimals";
|
|
11
|
+
export { PRICE_ORACLE_OUTLIER_DEVIATION_THRESHOLD, PRICE_ORACLE_DISPERSION_THRESHOLD, } from "./chunks/price-oracle";
|
|
12
|
+
export { BITCOIN_DEFAULT_MIN_CONFIRMATIONS, MAX_BTC_AMOUNT } from "./chunks/bitcoin";
|
|
13
|
+
export { QUANTUM_WINDOW_SECONDS, DEAD_ZONE_SECONDS, SAFE_EXECUTION_WINDOW_SECONDS, } from "./chunks/quantum-time";
|
|
14
|
+
export { LoanStatus, loanStatusToString, isValidMintingStatus, getValidMintingStatuses, } from "./chunks/loan-status";
|
|
15
|
+
export { EVMChain, BitcoinNetwork, type BitcoinProviderConfig, CHAIN_TO_BITCOIN_NETWORK, CHAIN_TO_CHAIN_ID, APPROVED_BITCOIN_PROVIDERS, validateChain, getBitcoinNetworkForChain, getChainIdForChain, validateBitcoinProvider, getBitcoinProviderConfig, getApprovedProvidersForChain, getProviderName, } from "./chunks/bitcoin-network-config";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,qCAAqC,EACrC,0CAA0C,EAC1C,0CAA0C,EAC1C,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,wCAAwC,EACxC,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,iCAAiC,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGrF,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,QAAQ,EACR,cAAc,EACd,KAAK,qBAAqB,EAC1B,wBAAwB,EACxB,iBAAiB,EACjB,0BAA0B,EAC1B,aAAa,EACb,yBAAyB,EACzB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,EAC5B,eAAe,GAChB,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Diamond Hands Protocol Constants
|
|
4
|
+
*
|
|
5
|
+
* This file exports all protocol constants from their respective chunks.
|
|
6
|
+
* All governance-adjustable parameters are centralized here for easy auditing.
|
|
7
|
+
*
|
|
8
|
+
* CRITICAL: Any changes to these constants affect protocol behavior and security.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.getProviderName = exports.getApprovedProvidersForChain = exports.getBitcoinProviderConfig = exports.validateBitcoinProvider = exports.getChainIdForChain = exports.getBitcoinNetworkForChain = exports.validateChain = exports.APPROVED_BITCOIN_PROVIDERS = exports.CHAIN_TO_CHAIN_ID = exports.CHAIN_TO_BITCOIN_NETWORK = exports.BitcoinNetwork = exports.EVMChain = exports.getValidMintingStatuses = exports.isValidMintingStatus = exports.loanStatusToString = exports.LoanStatus = exports.SAFE_EXECUTION_WINDOW_SECONDS = exports.DEAD_ZONE_SECONDS = exports.QUANTUM_WINDOW_SECONDS = exports.MAX_BTC_AMOUNT = exports.BITCOIN_DEFAULT_MIN_CONFIRMATIONS = exports.PRICE_ORACLE_DISPERSION_THRESHOLD = exports.PRICE_ORACLE_OUTLIER_DEVIATION_THRESHOLD = exports.UCD_TOKEN_DECIMALS = exports.PRICE_ORACLE_DECIMALS = exports.SATOSHIS_PER_BITCOIN = exports.GRACE_PERIOD_DAYS = exports.EXPIRED_LOAN_MAX_LIQUIDATION_THRESHOLD_BPS = exports.EXPIRED_LOAN_MIN_LIQUIDATION_THRESHOLD_BPS = exports.ACTIVE_LOAN_LIQUIDATION_THRESHOLD_BPS = void 0;
|
|
12
|
+
// Liquidation thresholds and grace period
|
|
13
|
+
var liquidation_1 = require("./chunks/liquidation");
|
|
14
|
+
Object.defineProperty(exports, "ACTIVE_LOAN_LIQUIDATION_THRESHOLD_BPS", { enumerable: true, get: function () { return liquidation_1.ACTIVE_LOAN_LIQUIDATION_THRESHOLD_BPS; } });
|
|
15
|
+
Object.defineProperty(exports, "EXPIRED_LOAN_MIN_LIQUIDATION_THRESHOLD_BPS", { enumerable: true, get: function () { return liquidation_1.EXPIRED_LOAN_MIN_LIQUIDATION_THRESHOLD_BPS; } });
|
|
16
|
+
Object.defineProperty(exports, "EXPIRED_LOAN_MAX_LIQUIDATION_THRESHOLD_BPS", { enumerable: true, get: function () { return liquidation_1.EXPIRED_LOAN_MAX_LIQUIDATION_THRESHOLD_BPS; } });
|
|
17
|
+
Object.defineProperty(exports, "GRACE_PERIOD_DAYS", { enumerable: true, get: function () { return liquidation_1.GRACE_PERIOD_DAYS; } });
|
|
18
|
+
// Decimal precision for assets
|
|
19
|
+
var decimals_1 = require("./chunks/decimals");
|
|
20
|
+
Object.defineProperty(exports, "SATOSHIS_PER_BITCOIN", { enumerable: true, get: function () { return decimals_1.SATOSHIS_PER_BITCOIN; } });
|
|
21
|
+
Object.defineProperty(exports, "PRICE_ORACLE_DECIMALS", { enumerable: true, get: function () { return decimals_1.PRICE_ORACLE_DECIMALS; } });
|
|
22
|
+
Object.defineProperty(exports, "UCD_TOKEN_DECIMALS", { enumerable: true, get: function () { return decimals_1.UCD_TOKEN_DECIMALS; } });
|
|
23
|
+
// Price oracle validation thresholds
|
|
24
|
+
var price_oracle_1 = require("./chunks/price-oracle");
|
|
25
|
+
Object.defineProperty(exports, "PRICE_ORACLE_OUTLIER_DEVIATION_THRESHOLD", { enumerable: true, get: function () { return price_oracle_1.PRICE_ORACLE_OUTLIER_DEVIATION_THRESHOLD; } });
|
|
26
|
+
Object.defineProperty(exports, "PRICE_ORACLE_DISPERSION_THRESHOLD", { enumerable: true, get: function () { return price_oracle_1.PRICE_ORACLE_DISPERSION_THRESHOLD; } });
|
|
27
|
+
// Bitcoin network parameters
|
|
28
|
+
var bitcoin_1 = require("./chunks/bitcoin");
|
|
29
|
+
Object.defineProperty(exports, "BITCOIN_DEFAULT_MIN_CONFIRMATIONS", { enumerable: true, get: function () { return bitcoin_1.BITCOIN_DEFAULT_MIN_CONFIRMATIONS; } });
|
|
30
|
+
Object.defineProperty(exports, "MAX_BTC_AMOUNT", { enumerable: true, get: function () { return bitcoin_1.MAX_BTC_AMOUNT; } });
|
|
31
|
+
// Quantum time window system
|
|
32
|
+
var quantum_time_1 = require("./chunks/quantum-time");
|
|
33
|
+
Object.defineProperty(exports, "QUANTUM_WINDOW_SECONDS", { enumerable: true, get: function () { return quantum_time_1.QUANTUM_WINDOW_SECONDS; } });
|
|
34
|
+
Object.defineProperty(exports, "DEAD_ZONE_SECONDS", { enumerable: true, get: function () { return quantum_time_1.DEAD_ZONE_SECONDS; } });
|
|
35
|
+
Object.defineProperty(exports, "SAFE_EXECUTION_WINDOW_SECONDS", { enumerable: true, get: function () { return quantum_time_1.SAFE_EXECUTION_WINDOW_SECONDS; } });
|
|
36
|
+
// Network configuration was removed - functionality moved to bitcoin-network-config
|
|
37
|
+
// Loan status enum
|
|
38
|
+
var loan_status_1 = require("./chunks/loan-status");
|
|
39
|
+
Object.defineProperty(exports, "LoanStatus", { enumerable: true, get: function () { return loan_status_1.LoanStatus; } });
|
|
40
|
+
Object.defineProperty(exports, "loanStatusToString", { enumerable: true, get: function () { return loan_status_1.loanStatusToString; } });
|
|
41
|
+
Object.defineProperty(exports, "isValidMintingStatus", { enumerable: true, get: function () { return loan_status_1.isValidMintingStatus; } });
|
|
42
|
+
Object.defineProperty(exports, "getValidMintingStatuses", { enumerable: true, get: function () { return loan_status_1.getValidMintingStatuses; } });
|
|
43
|
+
// Bitcoin network configuration
|
|
44
|
+
var bitcoin_network_config_1 = require("./chunks/bitcoin-network-config");
|
|
45
|
+
Object.defineProperty(exports, "EVMChain", { enumerable: true, get: function () { return bitcoin_network_config_1.EVMChain; } });
|
|
46
|
+
Object.defineProperty(exports, "BitcoinNetwork", { enumerable: true, get: function () { return bitcoin_network_config_1.BitcoinNetwork; } });
|
|
47
|
+
Object.defineProperty(exports, "CHAIN_TO_BITCOIN_NETWORK", { enumerable: true, get: function () { return bitcoin_network_config_1.CHAIN_TO_BITCOIN_NETWORK; } });
|
|
48
|
+
Object.defineProperty(exports, "CHAIN_TO_CHAIN_ID", { enumerable: true, get: function () { return bitcoin_network_config_1.CHAIN_TO_CHAIN_ID; } });
|
|
49
|
+
Object.defineProperty(exports, "APPROVED_BITCOIN_PROVIDERS", { enumerable: true, get: function () { return bitcoin_network_config_1.APPROVED_BITCOIN_PROVIDERS; } });
|
|
50
|
+
Object.defineProperty(exports, "validateChain", { enumerable: true, get: function () { return bitcoin_network_config_1.validateChain; } });
|
|
51
|
+
Object.defineProperty(exports, "getBitcoinNetworkForChain", { enumerable: true, get: function () { return bitcoin_network_config_1.getBitcoinNetworkForChain; } });
|
|
52
|
+
Object.defineProperty(exports, "getChainIdForChain", { enumerable: true, get: function () { return bitcoin_network_config_1.getChainIdForChain; } });
|
|
53
|
+
Object.defineProperty(exports, "validateBitcoinProvider", { enumerable: true, get: function () { return bitcoin_network_config_1.validateBitcoinProvider; } });
|
|
54
|
+
Object.defineProperty(exports, "getBitcoinProviderConfig", { enumerable: true, get: function () { return bitcoin_network_config_1.getBitcoinProviderConfig; } });
|
|
55
|
+
Object.defineProperty(exports, "getApprovedProvidersForChain", { enumerable: true, get: function () { return bitcoin_network_config_1.getApprovedProvidersForChain; } });
|
|
56
|
+
Object.defineProperty(exports, "getProviderName", { enumerable: true, get: function () { return bitcoin_network_config_1.getProviderName; } });
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,0CAA0C;AAC1C,oDAK8B;AAJ5B,oIAAA,qCAAqC,OAAA;AACrC,yIAAA,0CAA0C,OAAA;AAC1C,yIAAA,0CAA0C,OAAA;AAC1C,gHAAA,iBAAiB,OAAA;AAGnB,+BAA+B;AAC/B,8CAI2B;AAHzB,gHAAA,oBAAoB,OAAA;AACpB,iHAAA,qBAAqB,OAAA;AACrB,8GAAA,kBAAkB,OAAA;AAGpB,qCAAqC;AACrC,sDAG+B;AAF7B,wIAAA,wCAAwC,OAAA;AACxC,iIAAA,iCAAiC,OAAA;AAGnC,6BAA6B;AAC7B,4CAAqF;AAA5E,4HAAA,iCAAiC,OAAA;AAAE,yGAAA,cAAc,OAAA;AAE1D,6BAA6B;AAC7B,sDAI+B;AAH7B,sHAAA,sBAAsB,OAAA;AACtB,iHAAA,iBAAiB,OAAA;AACjB,6HAAA,6BAA6B,OAAA;AAG/B,oFAAoF;AAEpF,mBAAmB;AACnB,oDAK8B;AAJ5B,yGAAA,UAAU,OAAA;AACV,iHAAA,kBAAkB,OAAA;AAClB,mHAAA,oBAAoB,OAAA;AACpB,sHAAA,uBAAuB,OAAA;AAGzB,gCAAgC;AAChC,0EAcyC;AAbvC,kHAAA,QAAQ,OAAA;AACR,wHAAA,cAAc,OAAA;AAEd,kIAAA,wBAAwB,OAAA;AACxB,2HAAA,iBAAiB,OAAA;AACjB,oIAAA,0BAA0B,OAAA;AAC1B,uHAAA,aAAa,OAAA;AACb,mIAAA,yBAAyB,OAAA;AACzB,4HAAA,kBAAkB,OAAA;AAClB,iIAAA,uBAAuB,OAAA;AACvB,kIAAA,wBAAwB,OAAA;AACxB,sIAAA,4BAA4B,OAAA;AAC5B,yHAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface SpendingAuthorization {
|
|
2
|
+
type: "user" | "liquidator" | "repayer";
|
|
3
|
+
positionId: string;
|
|
4
|
+
amount: string;
|
|
5
|
+
recipient: string;
|
|
6
|
+
signature: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PKPValidation {
|
|
9
|
+
pkpPublicKey: string;
|
|
10
|
+
authorizedAction: string;
|
|
11
|
+
validUntil: number;
|
|
12
|
+
}
|
|
13
|
+
export interface BTCConfirmation {
|
|
14
|
+
txHash: string;
|
|
15
|
+
amount: string;
|
|
16
|
+
pkpAddress: string;
|
|
17
|
+
blockHeight: number;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=authorization.i.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization.i.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/chunks/authorization.i.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAAC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization.i.js","sourceRoot":"","sources":["../../../../src/interfaces/chunks/authorization.i.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { UTXO, UTXOSet } from "./vault-balance.i";
|
|
2
|
+
/**
|
|
3
|
+
* Diamond Hands Faucet API Response
|
|
4
|
+
*/
|
|
5
|
+
export interface DiamondHandsBalanceResponse {
|
|
6
|
+
success: boolean;
|
|
7
|
+
address: string;
|
|
8
|
+
amount: number;
|
|
9
|
+
error?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Esplora API Balance Response
|
|
14
|
+
*/
|
|
15
|
+
export interface EsploraBalanceResponse {
|
|
16
|
+
chain_stats?: {
|
|
17
|
+
funded_txo_sum?: {
|
|
18
|
+
value: number;
|
|
19
|
+
};
|
|
20
|
+
spent_txo_sum?: {
|
|
21
|
+
value: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
funded_txo_sum?: {
|
|
25
|
+
value: number;
|
|
26
|
+
} | number;
|
|
27
|
+
spent_txo_sum?: {
|
|
28
|
+
value: number;
|
|
29
|
+
} | number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Bitcoin Data Provider Interface
|
|
33
|
+
*
|
|
34
|
+
* Defines the contract for Bitcoin network data providers.
|
|
35
|
+
*/
|
|
36
|
+
export interface IBitcoinDataProvider {
|
|
37
|
+
/**
|
|
38
|
+
* Fetch all UTXOs for a Bitcoin address
|
|
39
|
+
* @param address - Bitcoin address
|
|
40
|
+
* @returns Array of UTXOs
|
|
41
|
+
*/
|
|
42
|
+
getUTXOs(address: string): Promise<UTXO[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Get complete UTXO set with balance summary
|
|
45
|
+
* @param address - Bitcoin address
|
|
46
|
+
* @param minConfirmations - Minimum confirmations for "confirmed" status
|
|
47
|
+
* @returns Complete UTXO set with balance breakdown
|
|
48
|
+
*/
|
|
49
|
+
getUTXOSet(address: string, minConfirmations?: number): Promise<UTXOSet>;
|
|
50
|
+
/**
|
|
51
|
+
* Get transaction with confirmation count
|
|
52
|
+
* @param txid - Transaction ID to check
|
|
53
|
+
* @returns Transaction with confirmation count, or null if not found
|
|
54
|
+
*/
|
|
55
|
+
getTransaction(txid: string): Promise<{
|
|
56
|
+
txid: string;
|
|
57
|
+
confirmations: number;
|
|
58
|
+
} | null>;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=bitcoin-data-provider.i.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bitcoin-data-provider.i.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/chunks/bitcoin-data-provider.i.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE;QACZ,cAAc,CAAC,EAAE;YACf,KAAK,EAAE,MAAM,CAAC;SACf,CAAC;QACF,aAAa,CAAC,EAAE;YACd,KAAK,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CAAC;IACF,cAAc,CAAC,EACX;QACE,KAAK,EAAE,MAAM,CAAC;KACf,GACD,MAAM,CAAC;IACX,aAAa,CAAC,EACV;QACE,KAAK,EAAE,MAAM,CAAC;KACf,GACD,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAE3C;;;;;OAKG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzE;;;;OAIG;IACH,cAAc,CACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;CAC5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bitcoin-data-provider.i.js","sourceRoot":"","sources":["../../../../src/interfaces/chunks/bitcoin-data-provider.i.ts"],"names":[],"mappings":""}
|