@gvnrdao/dh-lit-actions 0.0.33 → 0.0.37
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 +6 -13
- package/pkg-dist/constants/chunks/lit-actions-registry.d.ts.map +1 -1
- package/pkg-dist/constants/chunks/lit-actions-registry.js +274 -0
- package/pkg-dist/constants/chunks/lit-actions-registry.js.map +1 -0
- package/pkg-dist/constants/chunks/{package-registry.cjs → package-registry.js} +1 -1
- package/pkg-dist/constants/chunks/package-registry.js.map +1 -0
- package/pkg-dist/constants/{index.cjs → index.js} +2 -2
- package/pkg-dist/constants/index.js.map +1 -0
- package/pkg-dist/{index.cjs → index.js} +4 -4
- package/pkg-dist/index.js.map +1 -0
- package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.d.ts +6 -0
- package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.d.ts.map +1 -1
- package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.js.map +1 -0
- package/pkg-dist/interfaces/chunks/lit-action-config.i.js.map +1 -0
- package/pkg-dist/interfaces/chunks/lit-action-name.i.js.map +1 -0
- package/pkg-dist/interfaces/chunks/lit-action-registry.i.js.map +1 -0
- package/pkg-dist/interfaces/chunks/pkp-info.i.js.map +1 -0
- package/pkg-dist/interfaces/{index.cjs → index.js} +4 -4
- package/pkg-dist/interfaces/index.js.map +1 -0
- package/pkg-dist/package.json +1 -0
- package/pkg-dist/utils/chunks/cid-utils.js.map +1 -0
- package/pkg-dist/utils/chunks/{connection-helpers.cjs → connection-helpers.js} +4 -4
- package/pkg-dist/utils/chunks/connection-helpers.js.map +1 -0
- package/pkg-dist/utils/chunks/debug-logger.js.map +1 -0
- package/pkg-dist/utils/chunks/error-classification.js.map +1 -0
- package/pkg-dist/utils/chunks/{lit-action-helpers.cjs → lit-action-helpers.js} +1 -1
- package/pkg-dist/utils/chunks/lit-action-helpers.js.map +1 -0
- package/pkg-dist/utils/chunks/{pkp-setup.cjs → pkp-setup.js} +1 -1
- package/pkg-dist/utils/chunks/pkp-setup.js.map +1 -0
- package/pkg-dist/utils/chunks/{session-signature-cache.cjs → session-signature-cache.js} +1 -1
- package/pkg-dist/utils/chunks/session-signature-cache.js.map +1 -0
- package/pkg-dist/utils/{index.cjs → index.js} +7 -7
- package/pkg-dist/utils/index.js.map +1 -0
- package/out/authorization-dummy-b.hash +0 -1
- package/out/authorization-dummy-b.js +0 -44
- package/out/authorization-dummy.hash +0 -1
- package/out/authorization-dummy.js +0 -64
- package/out/btc-deposit-validator.hash +0 -1
- package/out/btc-deposit-validator.js +0 -1488
- package/out/pkp-validator-datil.hash +0 -1
- package/out/pkp-validator-datil.js +0 -232
- package/out/pkp-validator.hash +0 -1
- package/out/pkp-validator.js +0 -410
- package/out/ucd-mint-validator.hash +0 -1
- package/out/ucd-mint-validator.js +0 -2203
- package/pkg-dist/constants/chunks/lit-actions-registry.cjs +0 -175
- package/pkg-dist/constants/chunks/lit-actions-registry.cjs.map +0 -1
- package/pkg-dist/constants/chunks/package-registry.cjs.map +0 -1
- package/pkg-dist/constants/index.cjs.map +0 -1
- package/pkg-dist/index.cjs.map +0 -1
- package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.cjs.map +0 -1
- package/pkg-dist/interfaces/chunks/lit-action-config.i.cjs.map +0 -1
- package/pkg-dist/interfaces/chunks/lit-action-name.i.cjs.map +0 -1
- package/pkg-dist/interfaces/chunks/lit-action-registry.i.cjs.map +0 -1
- package/pkg-dist/interfaces/chunks/pkp-info.i.cjs.map +0 -1
- package/pkg-dist/interfaces/index.cjs.map +0 -1
- package/pkg-dist/utils/chunks/cid-utils.cjs.map +0 -1
- package/pkg-dist/utils/chunks/connection-helpers.cjs.map +0 -1
- package/pkg-dist/utils/chunks/debug-logger.cjs.map +0 -1
- package/pkg-dist/utils/chunks/error-classification.cjs.map +0 -1
- package/pkg-dist/utils/chunks/lit-action-helpers.cjs.map +0 -1
- package/pkg-dist/utils/chunks/pkp-setup.cjs.map +0 -1
- package/pkg-dist/utils/chunks/session-signature-cache.cjs.map +0 -1
- package/pkg-dist/utils/index.cjs.map +0 -1
- /package/pkg-dist/interfaces/chunks/{diamond-hands-lit-actions.i.cjs → diamond-hands-lit-actions.i.js} +0 -0
- /package/pkg-dist/interfaces/chunks/{lit-action-config.i.cjs → lit-action-config.i.js} +0 -0
- /package/pkg-dist/interfaces/chunks/{lit-action-name.i.cjs → lit-action-name.i.js} +0 -0
- /package/pkg-dist/interfaces/chunks/{lit-action-registry.i.cjs → lit-action-registry.i.js} +0 -0
- /package/pkg-dist/interfaces/chunks/{pkp-info.i.cjs → pkp-info.i.js} +0 -0
- /package/pkg-dist/utils/chunks/{cid-utils.cjs → cid-utils.js} +0 -0
- /package/pkg-dist/utils/chunks/{debug-logger.cjs → debug-logger.js} +0 -0
- /package/pkg-dist/utils/chunks/{error-classification.cjs → error-classification.js} +0 -0
|
@@ -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
|
|
22
|
-
__exportStar(require("./chunks/pkp-setup
|
|
23
|
-
__exportStar(require("./chunks/cid-utils
|
|
24
|
-
__exportStar(require("./chunks/connection-helpers
|
|
25
|
-
__exportStar(require("./chunks/debug-logger
|
|
26
|
-
__exportStar(require("./chunks/error-classification
|
|
27
|
-
__exportStar(require("./chunks/session-signature-cache
|
|
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);
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../pkg-src/utils/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;AAEH,8DAA4C;AAC5C,qDAAmC;AACnC,qDAAmC;AACnC,8DAA4C;AAC5C,wDAAsC;AACtC,gEAA8C;AAC9C,mEAAiD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6262c9467961c661d212b8c60806e499ed5e7d0fe8456e2455e536d40eb4c672
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// LIT Actions runtime provides: Lit, ethers, fetch
|
|
2
|
-
var _LIT_ACTION_ = (() => {
|
|
3
|
-
// src/authorization-dummy-b.ts
|
|
4
|
-
var authorizationGoB = async () => {
|
|
5
|
-
try {
|
|
6
|
-
const message = globalThis.messageToSign || "diamond-hands-test-signature-b";
|
|
7
|
-
if (!globalThis.publicKey) {
|
|
8
|
-
Lit.Actions.setResponse({
|
|
9
|
-
response: JSON.stringify({
|
|
10
|
-
success: false,
|
|
11
|
-
error: "PKP public key not available"
|
|
12
|
-
})
|
|
13
|
-
});
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const signature = await Lit.Actions.signEcdsa({
|
|
17
|
-
toSign: ethers.utils.arrayify(
|
|
18
|
-
ethers.utils.keccak256(ethers.utils.toUtf8Bytes(message))
|
|
19
|
-
),
|
|
20
|
-
publicKey: globalThis.publicKey,
|
|
21
|
-
sigName: "dummySig"
|
|
22
|
-
});
|
|
23
|
-
Lit.Actions.setResponse({
|
|
24
|
-
response: JSON.stringify({
|
|
25
|
-
success: true,
|
|
26
|
-
signature,
|
|
27
|
-
message,
|
|
28
|
-
pkpPublicKey: globalThis.publicKey,
|
|
29
|
-
timestamp: Date.now(),
|
|
30
|
-
action: "dummy-authorization-sign-b"
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
} catch (error) {
|
|
34
|
-
Lit.Actions.setResponse({
|
|
35
|
-
response: JSON.stringify({
|
|
36
|
-
success: false,
|
|
37
|
-
error: error.message || error.toString(),
|
|
38
|
-
timestamp: Date.now()
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
authorizationGoB();
|
|
44
|
-
})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c732ef30e50a5013a6c1cbac6dc011d3638875237d21097e3aff722b323d174b
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// LIT Actions runtime provides: Lit, ethers, fetch
|
|
2
|
-
var _LIT_ACTION_ = (() => {
|
|
3
|
-
// src/authorization-dummy.ts
|
|
4
|
-
var authorizationGo = async () => {
|
|
5
|
-
try {
|
|
6
|
-
if (!globalThis.publicKey) {
|
|
7
|
-
Lit.Actions.setResponse({
|
|
8
|
-
response: JSON.stringify({
|
|
9
|
-
success: false,
|
|
10
|
-
error: "PKP public key not available"
|
|
11
|
-
})
|
|
12
|
-
});
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
const rawToSign = globalThis.toSign;
|
|
16
|
-
const messageToSign = globalThis.messageToSign || "diamond-hands-test-signature";
|
|
17
|
-
let toSignData;
|
|
18
|
-
let signatureType;
|
|
19
|
-
if (rawToSign) {
|
|
20
|
-
if (typeof rawToSign === "string") {
|
|
21
|
-
toSignData = ethers.utils.arrayify(rawToSign);
|
|
22
|
-
} else if (rawToSign instanceof Uint8Array) {
|
|
23
|
-
toSignData = rawToSign;
|
|
24
|
-
} else if (Array.isArray(rawToSign)) {
|
|
25
|
-
toSignData = new Uint8Array(rawToSign);
|
|
26
|
-
} else {
|
|
27
|
-
throw new Error("Invalid toSign format");
|
|
28
|
-
}
|
|
29
|
-
signatureType = "bitcoin-raw-bytes";
|
|
30
|
-
} else {
|
|
31
|
-
toSignData = ethers.utils.arrayify(
|
|
32
|
-
ethers.utils.keccak256(ethers.utils.toUtf8Bytes(messageToSign))
|
|
33
|
-
);
|
|
34
|
-
signatureType = "ethereum-message-hash";
|
|
35
|
-
}
|
|
36
|
-
const signature = await Lit.Actions.signEcdsa({
|
|
37
|
-
toSign: toSignData,
|
|
38
|
-
publicKey: globalThis.publicKey,
|
|
39
|
-
sigName: "dummySig"
|
|
40
|
-
});
|
|
41
|
-
Lit.Actions.setResponse({
|
|
42
|
-
response: JSON.stringify({
|
|
43
|
-
success: true,
|
|
44
|
-
signature,
|
|
45
|
-
signatureType,
|
|
46
|
-
message: messageToSign,
|
|
47
|
-
rawDataSigned: rawToSign ? true : false,
|
|
48
|
-
pkpPublicKey: globalThis.publicKey,
|
|
49
|
-
timestamp: Date.now(),
|
|
50
|
-
action: "dummy-authorization-sign"
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
} catch (error) {
|
|
54
|
-
Lit.Actions.setResponse({
|
|
55
|
-
response: JSON.stringify({
|
|
56
|
-
success: false,
|
|
57
|
-
error: error.message || error.toString(),
|
|
58
|
-
timestamp: Date.now()
|
|
59
|
-
})
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
authorizationGo();
|
|
64
|
-
})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1c4a5ae60a2426fd18496820c4513b4241229691d13038047df3e9eb46d2e0d9
|