@gvnrdao/dh-lit-actions 0.0.30 → 0.0.33
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/out/btc-deposit-validator.hash +1 -1
- package/out/btc-deposit-validator.js +1471 -20
- package/out/ucd-mint-validator.hash +1 -1
- package/out/ucd-mint-validator.js +42 -24
- package/package.json +1 -1
- package/pkg-dist/constants/chunks/lit-actions-registry.cjs +20 -20
- package/pkg-dist/constants/chunks/lit-actions-registry.cjs.map +1 -1
- package/pkg-dist/constants/chunks/lit-actions-registry.d.ts.map +1 -1
- package/pkg-dist/constants/chunks/package-registry.cjs +1 -1
- package/pkg-dist/constants/index.cjs +2 -2
- package/pkg-dist/index.cjs +4 -4
- package/pkg-dist/interfaces/index.cjs +4 -4
- package/pkg-dist/utils/chunks/connection-helpers.cjs +4 -4
- package/pkg-dist/utils/chunks/lit-action-helpers.cjs +1 -1
- package/pkg-dist/utils/chunks/pkp-setup.cjs +1 -1
- package/pkg-dist/utils/chunks/session-signature-cache.cjs +1 -1
- package/pkg-dist/utils/index.cjs +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
5d5511b61e20ac05dd50403a43cdb747a457d3d64765e674bb0e81a25ed1f016
|
|
@@ -13,6 +13,7 @@ var _LIT_ACTION_ = (() => {
|
|
|
13
13
|
|
|
14
14
|
// src/constants/chunks/bitcoin.ts
|
|
15
15
|
var BITCOIN_DEFAULT_MIN_CONFIRMATIONS = 6;
|
|
16
|
+
var MAX_BTC_AMOUNT = 25e6 * 1e8;
|
|
16
17
|
|
|
17
18
|
// src/constants/chunks/quantum-time.ts
|
|
18
19
|
var QUANTUM_WINDOW_SECONDS = 100;
|
|
@@ -601,7 +602,13 @@ var _LIT_ACTION_ = (() => {
|
|
|
601
602
|
const controller = new AbortController();
|
|
602
603
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
603
604
|
try {
|
|
604
|
-
const response = await fetch(endpoint, {
|
|
605
|
+
const response = await fetch(endpoint, {
|
|
606
|
+
signal: controller.signal,
|
|
607
|
+
headers: {
|
|
608
|
+
"Accept": "application/json",
|
|
609
|
+
"Content-Type": "application/json"
|
|
610
|
+
}
|
|
611
|
+
});
|
|
605
612
|
clearTimeout(timeoutId);
|
|
606
613
|
if (!response.ok) {
|
|
607
614
|
throw new Error(
|
|
@@ -718,7 +725,8 @@ var _LIT_ACTION_ = (() => {
|
|
|
718
725
|
|
|
719
726
|
// src/modules/price-oracle.module.ts
|
|
720
727
|
var PriceOracleModule = class {
|
|
721
|
-
constructor(sources) {
|
|
728
|
+
constructor(options, sources) {
|
|
729
|
+
this.mode = options?.mode || "full";
|
|
722
730
|
this.sources = sources || this.getDefaultSources();
|
|
723
731
|
this.sources.sort((a, b) => a.priority - b.priority);
|
|
724
732
|
}
|
|
@@ -729,7 +737,8 @@ var _LIT_ACTION_ = (() => {
|
|
|
729
737
|
};
|
|
730
738
|
const fetchJson = async (url) => {
|
|
731
739
|
const controller = new AbortController();
|
|
732
|
-
const
|
|
740
|
+
const timeoutMs = this.mode === "fast" ? 4e3 : 8e3;
|
|
741
|
+
const id = setTimeout(() => controller.abort(), timeoutMs);
|
|
733
742
|
try {
|
|
734
743
|
const res = await fetch(url, { headers: DEFAULT_HEADERS, signal: controller.signal });
|
|
735
744
|
if (!res.ok) {
|
|
@@ -752,13 +761,16 @@ var _LIT_ACTION_ = (() => {
|
|
|
752
761
|
if (!Number.isFinite(price) || price <= 0) {
|
|
753
762
|
throw new Error("Invalid CoinGecko price payload");
|
|
754
763
|
}
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
764
|
+
if (this.mode !== "fast") {
|
|
765
|
+
const allPrices = await Lit.Actions.broadcastAndCollect({
|
|
766
|
+
name: "coinGeckoPrice",
|
|
767
|
+
value: price.toString()
|
|
768
|
+
});
|
|
769
|
+
const prices = allPrices.map((p) => parseFloat(p));
|
|
770
|
+
prices.sort((a, b) => a - b);
|
|
771
|
+
return prices[Math.floor(prices.length / 2)];
|
|
772
|
+
}
|
|
773
|
+
return price;
|
|
762
774
|
},
|
|
763
775
|
priority: 1
|
|
764
776
|
},
|
|
@@ -772,13 +784,16 @@ var _LIT_ACTION_ = (() => {
|
|
|
772
784
|
if (!Number.isFinite(price) || price <= 0) {
|
|
773
785
|
throw new Error("Invalid Binance price payload");
|
|
774
786
|
}
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
787
|
+
if (this.mode !== "fast") {
|
|
788
|
+
const allPrices = await Lit.Actions.broadcastAndCollect({
|
|
789
|
+
name: "binancePrice",
|
|
790
|
+
value: price.toString()
|
|
791
|
+
});
|
|
792
|
+
const prices = allPrices.map((p) => parseFloat(p));
|
|
793
|
+
prices.sort((a, b) => a - b);
|
|
794
|
+
return prices[Math.floor(prices.length / 2)];
|
|
795
|
+
}
|
|
796
|
+
return price;
|
|
782
797
|
},
|
|
783
798
|
priority: 2
|
|
784
799
|
},
|
|
@@ -790,13 +805,16 @@ var _LIT_ACTION_ = (() => {
|
|
|
790
805
|
if (!Number.isFinite(price) || price <= 0) {
|
|
791
806
|
throw new Error("Invalid Coinbase price payload");
|
|
792
807
|
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
808
|
+
if (this.mode !== "fast") {
|
|
809
|
+
const allPrices = await Lit.Actions.broadcastAndCollect({
|
|
810
|
+
name: "coinbasePrice",
|
|
811
|
+
value: price.toString()
|
|
812
|
+
});
|
|
813
|
+
const prices = allPrices.map((p) => parseFloat(p));
|
|
814
|
+
prices.sort((a, b) => a - b);
|
|
815
|
+
return prices[Math.floor(prices.length / 2)];
|
|
816
|
+
}
|
|
817
|
+
return price;
|
|
800
818
|
},
|
|
801
819
|
priority: 3
|
|
802
820
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DATIL_TEST_PKP_VALIDATOR_CID = exports.DATIL_TEST_AUTHORIZATION_DUMMY_B_CID = exports.DATIL_TEST_AUTHORIZATION_DUMMY_CID = exports.DATIL_PKP_VALIDATOR_CID = exports.DATIL_AUTHORIZATION_DUMMY_B_CID = exports.DATIL_AUTHORIZATION_DUMMY_CID = exports.DATIL_TEST_DEPLOYMENTS = exports.DATIL_DEPLOYMENTS = exports.DH_LIT_ACTIONS_DATIL_TEST = exports.DH_LIT_ACTIONS_DATIL = void 0;
|
|
4
4
|
exports.getDeploymentsForNetwork = getDeploymentsForNetwork;
|
|
5
|
-
const cid_utils_1 = require("../../utils/chunks/cid-utils");
|
|
5
|
+
const cid_utils_1 = require("../../utils/chunks/cid-utils.cjs");
|
|
6
6
|
/**
|
|
7
7
|
* Diamond Hands LIT Actions Registry
|
|
8
8
|
* Contains all deployed LIT Actions with their IPFS CIDs and metadata
|
|
@@ -33,25 +33,25 @@ exports.DH_LIT_ACTIONS_DATIL = {
|
|
|
33
33
|
hash: "6262c9467961c661d212b8c60806e499ed5e7d0fe8456e2455e536d40eb4c672",
|
|
34
34
|
},
|
|
35
35
|
pkpValidator: {
|
|
36
|
-
cid: "
|
|
37
|
-
authorizedCidHex: (0, cid_utils_1.cidToHex)("
|
|
38
|
-
name: "
|
|
39
|
-
description: "Production
|
|
40
|
-
version: "1.0.
|
|
36
|
+
cid: "QmfLA7vSiUhW7W2dkn5j1WBS1sDSqX1HckkaP4dmWWiqrJ",
|
|
37
|
+
authorizedCidHex: (0, cid_utils_1.cidToHex)("QmfLA7vSiUhW7W2dkn5j1WBS1sDSqX1HckkaP4dmWWiqrJ"),
|
|
38
|
+
name: "Pkp Validator Datil",
|
|
39
|
+
description: "Production Pkp Validator Datil",
|
|
40
|
+
version: "1.0.0",
|
|
41
41
|
deployed: true,
|
|
42
|
-
deployedAt:
|
|
43
|
-
size:
|
|
44
|
-
hash: "
|
|
42
|
+
deployedAt: 1761592446476,
|
|
43
|
+
size: 5305,
|
|
44
|
+
hash: "a40f3406fd0adffcf65421a9cec2c8963f3ad3e7bcf35d76bf5a2f412a45502d",
|
|
45
45
|
pkp: {
|
|
46
|
-
tokenId: "
|
|
47
|
-
publicKey: "
|
|
48
|
-
ethAddress: "
|
|
49
|
-
mintTxHash: "
|
|
50
|
-
authTxHash: "
|
|
51
|
-
burnTxHash: "
|
|
46
|
+
tokenId: "76973782076207308740993824597354753270444206700035793747792955502400793800448",
|
|
47
|
+
publicKey: "0x04228912eff8107f22306e6a63190b4b2979d6287308b8d95a7125a6653ac708d7a46dcb5ba81fa2615018356e747a7f09f25f51089236da71756a6eac03c85392",
|
|
48
|
+
ethAddress: "0x54C6626C515b29d43f165BCFB8E3a89C6d15bae1",
|
|
49
|
+
mintTxHash: "0x6a26237144f8e0f6aab00e8a1b835258a3795b2f741455ce3a3058fcdccc75ca",
|
|
50
|
+
authTxHash: "0xf8c90001658b7759da484b9f45db9b4cae8b549d14983ead7711d40b54a52578",
|
|
51
|
+
burnTxHash: "0xe7fa1d063ac614ab74120557e80de0c9cdd4b08d5f691b7bda8c8903e3854d87",
|
|
52
52
|
immutable: true,
|
|
53
|
-
authorizedCidHex: "
|
|
54
|
-
createdAt:
|
|
53
|
+
authorizedCidHex: (0, cid_utils_1.cidToHex)("QmfLA7vSiUhW7W2dkn5j1WBS1sDSqX1HckkaP4dmWWiqrJ"),
|
|
54
|
+
createdAt: 1761592422840,
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
57
|
ucdMintValidator: {
|
|
@@ -73,7 +73,7 @@ exports.DH_LIT_ACTIONS_DATIL = {
|
|
|
73
73
|
burnTxHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
74
74
|
immutable: false,
|
|
75
75
|
authorizedCidHex: (0, cid_utils_1.cidToHex)("QmNLei78zWmzUdbeRB3CiUfAizWUrbeeZh5K1rhAQKCh51"),
|
|
76
|
-
createdAt:
|
|
76
|
+
createdAt: 1761427363400,
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
};
|
|
@@ -108,7 +108,7 @@ exports.DH_LIT_ACTIONS_DATIL_TEST = {
|
|
|
108
108
|
description: "Development PKP validation LIT Action for verifying authorized PKPs on datil-test (with decimal PKP ID format)",
|
|
109
109
|
version: "1.0.2",
|
|
110
110
|
deployed: true, // Actually deployed to test network
|
|
111
|
-
deployedAt:
|
|
111
|
+
deployedAt: 1761427363918,
|
|
112
112
|
size: 12322,
|
|
113
113
|
hash: "ac5d1dbc1ae8b678f435ac568320887e69e662d93d5f92e11f69e3a322f2e1ef",
|
|
114
114
|
pkp: {
|
|
@@ -142,7 +142,7 @@ exports.DH_LIT_ACTIONS_DATIL_TEST = {
|
|
|
142
142
|
burnTxHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
143
143
|
immutable: false,
|
|
144
144
|
authorizedCidHex: (0, cid_utils_1.cidToHex)("QmNLei78zWmzUdbeRB3CiUfAizWUrbeeZh5K1rhAQKCh51"),
|
|
145
|
-
createdAt:
|
|
145
|
+
createdAt: 1761427363400,
|
|
146
146
|
},
|
|
147
147
|
},
|
|
148
148
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lit-actions-registry.cjs","sourceRoot":"","sources":["../../../pkg-src/constants/chunks/lit-actions-registry.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"lit-actions-registry.cjs","sourceRoot":"","sources":["../../../pkg-src/constants/chunks/lit-actions-registry.ts"],"names":[],"mappings":";;;AAuMA,4DAOC;AA7MD,4DAAwD;AAExD;;;;GAIG;AAEH,uCAAuC;AAC1B,QAAA,oBAAoB,GAA2B;IAC1D,kBAAkB,EAAE;QAClB,GAAG,EAAE,gDAAgD;QACrD,gBAAgB,EAAE,IAAA,oBAAQ,EACxB,gDAAgD,CACjD;QACD,IAAI,EAAE,qBAAqB;QAC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6BAA6B,GACxC,4BAAoB,CAAC,kBAAkB,CAAC,GAAG,CAAC;AACjC,QAAA,+BAA+B,GAC1C,4BAAoB,CAAC,mBAAmB,CAAC,GAAG,CAAC;AAClC,QAAA,uBAAuB,GAAG,4BAAoB,CAAC,YAAY,CAAC,GAAG,CAAC;AAE7E;;GAEG;AACU,QAAA,kCAAkC,GAC7C,iCAAyB,CAAC,kBAAkB,CAAC,GAAG,CAAC;AACtC,QAAA,oCAAoC,GAC/C,iCAAyB,CAAC,mBAAmB,CAAC,GAAG,CAAC;AACvC,QAAA,4BAA4B,GACvC,iCAAyB,CAAC,YAAY,CAAC,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lit-actions-registry.d.ts","sourceRoot":"","sources":["../../../pkg-src/constants/chunks/lit-actions-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAG1D;;;;GAIG;AAGH,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"lit-actions-registry.d.ts","sourceRoot":"","sources":["../../../pkg-src/constants/chunks/lit-actions-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAG1D;;;;GAIG;AAGH,eAAO,MAAM,oBAAoB,EAAE,sBA2FlC,CAAC;AAGF,eAAO,MAAM,yBAAyB,EAAE,sBA0FvC,CAAC;AAEF;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,GAAG,YAAY,GAC9B,sBAAsB,CAKxB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,wBAAuB,CAAC;AACtD,eAAO,MAAM,sBAAsB,wBAA4B,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,6BAA6B,QACG,CAAC;AAC9C,eAAO,MAAM,+BAA+B,QACE,CAAC;AAC/C,eAAO,MAAM,uBAAuB,QAAwC,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,kCAAkC,QACG,CAAC;AACnD,eAAO,MAAM,oCAAoC,QACE,CAAC;AACpD,eAAO,MAAM,4BAA4B,QACG,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DH_LIT_ACTIONS_REGISTRY = void 0;
|
|
4
|
-
const lit_actions_registry_1 = require("./lit-actions-registry");
|
|
4
|
+
const lit_actions_registry_1 = require("./lit-actions-registry.cjs");
|
|
5
5
|
/**
|
|
6
6
|
* Package Registry with Metadata
|
|
7
7
|
*/
|
|
@@ -18,6 +18,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
__exportStar(require("./chunks/lit-actions-registry"), exports);
|
|
22
|
-
__exportStar(require("./chunks/package-registry"), exports);
|
|
21
|
+
__exportStar(require("./chunks/lit-actions-registry.cjs"), exports);
|
|
22
|
+
__exportStar(require("./chunks/package-registry.cjs"), exports);
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
package/pkg-dist/index.cjs
CHANGED
|
@@ -23,13 +23,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
exports.DH_LIT_ACTIONS_DATIL_TEST = exports.DH_LIT_ACTIONS_DATIL = void 0;
|
|
25
25
|
// Export interfaces
|
|
26
|
-
__exportStar(require("./interfaces"), exports);
|
|
26
|
+
__exportStar(require("./interfaces/index.cjs"), exports);
|
|
27
27
|
// Export constants from registry
|
|
28
|
-
__exportStar(require("./constants/chunks/lit-actions-registry"), exports);
|
|
28
|
+
__exportStar(require("./constants/chunks/lit-actions-registry.cjs"), exports);
|
|
29
29
|
// Export utilities
|
|
30
|
-
__exportStar(require("./utils"), exports);
|
|
30
|
+
__exportStar(require("./utils/index.cjs"), exports);
|
|
31
31
|
// Default export
|
|
32
|
-
var lit_actions_registry_1 = require("./constants/chunks/lit-actions-registry");
|
|
32
|
+
var lit_actions_registry_1 = require("./constants/chunks/lit-actions-registry.cjs");
|
|
33
33
|
Object.defineProperty(exports, "DH_LIT_ACTIONS_DATIL", { enumerable: true, get: function () { return lit_actions_registry_1.DH_LIT_ACTIONS_DATIL; } });
|
|
34
34
|
Object.defineProperty(exports, "DH_LIT_ACTIONS_DATIL_TEST", { enumerable: true, get: function () { return lit_actions_registry_1.DH_LIT_ACTIONS_DATIL_TEST; } });
|
|
35
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -18,8 +18,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
__exportStar(require("./chunks/pkp-info.i"), exports);
|
|
22
|
-
__exportStar(require("./chunks/lit-action-config.i"), exports);
|
|
23
|
-
__exportStar(require("./chunks/diamond-hands-lit-actions.i"), exports);
|
|
24
|
-
__exportStar(require("./chunks/lit-action-registry.i"), exports);
|
|
21
|
+
__exportStar(require("./chunks/pkp-info.i.cjs"), exports);
|
|
22
|
+
__exportStar(require("./chunks/lit-action-config.i.cjs"), exports);
|
|
23
|
+
__exportStar(require("./chunks/diamond-hands-lit-actions.i.cjs"), exports);
|
|
24
|
+
__exportStar(require("./chunks/lit-action-registry.i.cjs"), exports);
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -51,8 +51,8 @@ exports.validateLitNodeReadiness = validateLitNodeReadiness;
|
|
|
51
51
|
exports.executeLitAction = executeLitAction;
|
|
52
52
|
exports.executePkpOperation = executePkpOperation;
|
|
53
53
|
exports.getNetworkTimeouts = getNetworkTimeouts;
|
|
54
|
-
const debug_logger_1 = require("./debug-logger");
|
|
55
|
-
const error_classification_1 = require("./error-classification");
|
|
54
|
+
const debug_logger_1 = require("./debug-logger.cjs");
|
|
55
|
+
const error_classification_1 = require("./error-classification.cjs");
|
|
56
56
|
/**
|
|
57
57
|
* Default retry configuration optimized for LIT Protocol operations
|
|
58
58
|
*/
|
|
@@ -254,7 +254,7 @@ async function validateLitNodeConnection(litNodeClient) {
|
|
|
254
254
|
async function generateSessionSignatures(litNodeClient, sessionConfig, config = {}, pkpTokenId, litActionCid, signerAddress, network = 'datil') {
|
|
255
255
|
// If caching parameters are provided, try cache first
|
|
256
256
|
if (pkpTokenId && litActionCid && signerAddress) {
|
|
257
|
-
const { sessionSignatureCache } = await Promise.resolve().then(() => __importStar(require(
|
|
257
|
+
const { sessionSignatureCache } = await Promise.resolve().then(() => __importStar(require("./session-signature-cache.cjs")));
|
|
258
258
|
const cached = sessionSignatureCache.get(pkpTokenId, litActionCid, signerAddress, network);
|
|
259
259
|
if (cached) {
|
|
260
260
|
const sigCount = Object.keys(cached).length;
|
|
@@ -268,7 +268,7 @@ async function generateSessionSignatures(litNodeClient, sessionConfig, config =
|
|
|
268
268
|
const sigCount = Object.keys(sessionSigs).length;
|
|
269
269
|
// Cache if parameters provided
|
|
270
270
|
if (pkpTokenId && litActionCid && signerAddress) {
|
|
271
|
-
const { sessionSignatureCache } = await Promise.resolve().then(() => __importStar(require(
|
|
271
|
+
const { sessionSignatureCache } = await Promise.resolve().then(() => __importStar(require("./session-signature-cache.cjs")));
|
|
272
272
|
const expiration = new Date(sessionConfig.expiration);
|
|
273
273
|
sessionSignatureCache.set(pkpTokenId, litActionCid, signerAddress, network, sessionSigs, expiration);
|
|
274
274
|
}
|
|
@@ -5,7 +5,7 @@ exports.getLitActionConfig = getLitActionConfig;
|
|
|
5
5
|
exports.isLitActionDeployed = isLitActionDeployed;
|
|
6
6
|
exports.validateDeployedActions = validateDeployedActions;
|
|
7
7
|
exports.getDeployedActions = getDeployedActions;
|
|
8
|
-
const constants_1 = require("../../constants");
|
|
8
|
+
const constants_1 = require("../../constants/index.cjs");
|
|
9
9
|
/**
|
|
10
10
|
* Get LIT Action CID by name
|
|
11
11
|
* @param actionName - Name of the LIT Action
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getPKPValidatorSetup = getPKPValidatorSetup;
|
|
4
|
-
const lit_actions_registry_1 = require("../../constants/chunks/lit-actions-registry");
|
|
4
|
+
const lit_actions_registry_1 = require("../../constants/chunks/lit-actions-registry.cjs");
|
|
5
5
|
/**
|
|
6
6
|
* Get the complete setup for PKP Validator testing
|
|
7
7
|
* Returns both the LIT Action config and its associated PKP
|
|
@@ -9,7 +9,7 @@ exports.generateSessionSignaturesWithCache = generateSessionSignaturesWithCache;
|
|
|
9
9
|
exports.configureSessionSignatureCache = configureSessionSignatureCache;
|
|
10
10
|
exports.clearSessionSignatureCache = clearSessionSignatureCache;
|
|
11
11
|
exports.getSessionSignatureCacheStats = getSessionSignatureCacheStats;
|
|
12
|
-
const debug_logger_1 = require("./debug-logger");
|
|
12
|
+
const debug_logger_1 = require("./debug-logger.cjs");
|
|
13
13
|
exports.DEFAULT_CACHE_CONFIG = {
|
|
14
14
|
maxEntries: 50,
|
|
15
15
|
bufferTimeMs: 60000, // 1 minute buffer before expiration
|
package/pkg-dist/utils/index.cjs
CHANGED
|
@@ -18,11 +18,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
__exportStar(require("./chunks/lit-action-helpers"), exports);
|
|
22
|
-
__exportStar(require("./chunks/pkp-setup"), exports);
|
|
23
|
-
__exportStar(require("./chunks/cid-utils"), exports);
|
|
24
|
-
__exportStar(require("./chunks/connection-helpers"), exports);
|
|
25
|
-
__exportStar(require("./chunks/debug-logger"), exports);
|
|
26
|
-
__exportStar(require("./chunks/error-classification"), exports);
|
|
27
|
-
__exportStar(require("./chunks/session-signature-cache"), exports);
|
|
21
|
+
__exportStar(require("./chunks/lit-action-helpers.cjs"), exports);
|
|
22
|
+
__exportStar(require("./chunks/pkp-setup.cjs"), exports);
|
|
23
|
+
__exportStar(require("./chunks/cid-utils.cjs"), exports);
|
|
24
|
+
__exportStar(require("./chunks/connection-helpers.cjs"), exports);
|
|
25
|
+
__exportStar(require("./chunks/debug-logger.cjs"), exports);
|
|
26
|
+
__exportStar(require("./chunks/error-classification.cjs"), exports);
|
|
27
|
+
__exportStar(require("./chunks/session-signature-cache.cjs"), exports);
|
|
28
28
|
//# sourceMappingURL=index.js.map
|