@gvnrdao/dh-lit-ops 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +197 -0
- package/dist/constants/chunks/pkp-data.d.ts +28 -0
- package/dist/constants/chunks/pkp-data.d.ts.map +1 -0
- package/dist/constants/chunks/pkp-data.js +86 -0
- package/dist/constants/chunks/pkp-data.js.map +1 -0
- package/dist/constants/index.d.ts +8 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +25 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/chunks/authentication.d.ts +29 -0
- package/dist/interfaces/chunks/authentication.d.ts.map +1 -0
- package/dist/interfaces/chunks/authentication.js +7 -0
- package/dist/interfaces/chunks/authentication.js.map +1 -0
- package/dist/interfaces/chunks/config.d.ts +52 -0
- package/dist/interfaces/chunks/config.d.ts.map +1 -0
- package/dist/interfaces/chunks/config.js +7 -0
- package/dist/interfaces/chunks/config.js.map +1 -0
- package/dist/interfaces/chunks/lit-action-execution.d.ts +27 -0
- package/dist/interfaces/chunks/lit-action-execution.d.ts.map +1 -0
- package/dist/interfaces/chunks/lit-action-execution.js +7 -0
- package/dist/interfaces/chunks/lit-action-execution.js.map +1 -0
- package/dist/interfaces/chunks/pkp-operations.d.ts +143 -0
- package/dist/interfaces/chunks/pkp-operations.d.ts.map +1 -0
- package/dist/interfaces/chunks/pkp-operations.js +3 -0
- package/dist/interfaces/chunks/pkp-operations.js.map +1 -0
- package/dist/interfaces/index.d.ts +11 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/index.js +31 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/modules/action-executor.module.d.ts +34 -0
- package/dist/modules/action-executor.module.d.ts.map +1 -0
- package/dist/modules/action-executor.module.js +231 -0
- package/dist/modules/action-executor.module.js.map +1 -0
- package/dist/modules/auth-manager.module.d.ts +24 -0
- package/dist/modules/auth-manager.module.d.ts.map +1 -0
- package/dist/modules/auth-manager.module.js +103 -0
- package/dist/modules/auth-manager.module.js.map +1 -0
- package/dist/modules/client-manager.module.d.ts +64 -0
- package/dist/modules/client-manager.module.d.ts.map +1 -0
- package/dist/modules/client-manager.module.js +213 -0
- package/dist/modules/client-manager.module.js.map +1 -0
- package/dist/modules/lit-ops.module.d.ts +261 -0
- package/dist/modules/lit-ops.module.d.ts.map +1 -0
- package/dist/modules/lit-ops.module.js +792 -0
- package/dist/modules/lit-ops.module.js.map +1 -0
- package/dist/modules/pkp-authorizer.module.d.ts +72 -0
- package/dist/modules/pkp-authorizer.module.d.ts.map +1 -0
- package/dist/modules/pkp-authorizer.module.js +126 -0
- package/dist/modules/pkp-authorizer.module.js.map +1 -0
- package/dist/modules/pkp-macros.module.d.ts +188 -0
- package/dist/modules/pkp-macros.module.d.ts.map +1 -0
- package/dist/modules/pkp-macros.module.js +656 -0
- package/dist/modules/pkp-macros.module.js.map +1 -0
- package/dist/modules/pkp-manager.module.d.ts +56 -0
- package/dist/modules/pkp-manager.module.d.ts.map +1 -0
- package/dist/modules/pkp-manager.module.js +304 -0
- package/dist/modules/pkp-manager.module.js.map +1 -0
- package/dist/modules/pkp-minter.module.d.ts +66 -0
- package/dist/modules/pkp-minter.module.d.ts.map +1 -0
- package/dist/modules/pkp-minter.module.js +185 -0
- package/dist/modules/pkp-minter.module.js.map +1 -0
- package/dist/modules/pkp-signer.module.d.ts +56 -0
- package/dist/modules/pkp-signer.module.d.ts.map +1 -0
- package/dist/modules/pkp-signer.module.js +148 -0
- package/dist/modules/pkp-signer.module.js.map +1 -0
- package/dist/modules/session-signature-manager.module.d.ts +32 -0
- package/dist/modules/session-signature-manager.module.d.ts.map +1 -0
- package/dist/modules/session-signature-manager.module.js +123 -0
- package/dist/modules/session-signature-manager.module.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LIT Client Manager
|
|
3
|
+
* Centralized management of LitNodeClient instances with connection pooling
|
|
4
|
+
*/
|
|
5
|
+
import { LitContracts } from "@lit-protocol/contracts-sdk";
|
|
6
|
+
import { LitNodeClient } from "@lit-protocol/lit-node-client";
|
|
7
|
+
import { LIT_NETWORKS_KEYS } from "@lit-protocol/types";
|
|
8
|
+
import { ethers as ethers5 } from "ethers";
|
|
9
|
+
export interface ClientConfig {
|
|
10
|
+
litNetwork: LIT_NETWORKS_KEYS;
|
|
11
|
+
debug?: boolean;
|
|
12
|
+
alertWhenUnauthorized?: boolean;
|
|
13
|
+
minNodeCount?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class LitClientManager {
|
|
16
|
+
private clients;
|
|
17
|
+
private debug;
|
|
18
|
+
private defaultConfig;
|
|
19
|
+
private maxIdleTime;
|
|
20
|
+
private cleanupInterval;
|
|
21
|
+
constructor(defaultConfig: ClientConfig);
|
|
22
|
+
/**
|
|
23
|
+
* Get or create a LitNodeClient instance
|
|
24
|
+
* Uses singleton pattern per network configuration
|
|
25
|
+
*/
|
|
26
|
+
getClient(config?: Partial<ClientConfig>): Promise<LitNodeClient>;
|
|
27
|
+
/**
|
|
28
|
+
* Get or create LitContracts instance (cached per client)
|
|
29
|
+
*/
|
|
30
|
+
getContracts(signer: ethers5.Signer, config?: Partial<ClientConfig>): Promise<LitContracts>;
|
|
31
|
+
/**
|
|
32
|
+
* Release a reference to a client
|
|
33
|
+
* Decrements reference count for cleanup purposes
|
|
34
|
+
*/
|
|
35
|
+
releaseClient(config?: Partial<ClientConfig>): void;
|
|
36
|
+
/**
|
|
37
|
+
* Force disconnect and cleanup all clients
|
|
38
|
+
* Also stops the cleanup timer to prevent Jest from hanging
|
|
39
|
+
*/
|
|
40
|
+
disconnectAll(): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Get connection statistics
|
|
43
|
+
*/
|
|
44
|
+
getStats(): {
|
|
45
|
+
totalClients: number;
|
|
46
|
+
clientsByNetwork: Record<string, {
|
|
47
|
+
refCount: number;
|
|
48
|
+
lastUsed: number;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Private: Generate client key for caching
|
|
53
|
+
*/
|
|
54
|
+
private getClientKey;
|
|
55
|
+
/**
|
|
56
|
+
* Private: Start cleanup timer for idle clients
|
|
57
|
+
*/
|
|
58
|
+
private startCleanupTimer;
|
|
59
|
+
/**
|
|
60
|
+
* Private: Cleanup clients that have been idle too long
|
|
61
|
+
*/
|
|
62
|
+
private cleanupIdleClients;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=client-manager.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-manager.module.d.ts","sourceRoot":"","sources":["../../src/modules/client-manager.module.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAUD,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,KAAK,CAAU;IAEvB,OAAO,CAAC,aAAa,CAAe;IAGpC,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,eAAe,CAA+B;gBAE1C,aAAa,EAAE,YAAY;IAMvC;;;OAGG;IACG,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAuDvE;;OAEG;IACG,YAAY,CAChB,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAC7B,OAAO,CAAC,YAAY,CAAC;IA8CxB;;;OAGG;IACH,aAAa,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;IAenD;;;OAGG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAiCpC;;OAEG;IACH,QAAQ,IAAI;QACV,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC1E;IAmBD;;OAEG;IACH,OAAO,CAAC,YAAY;IAIpB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;OAEG;YACW,kBAAkB;CA6BjC"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* LIT Client Manager
|
|
4
|
+
* Centralized management of LitNodeClient instances with connection pooling
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.LitClientManager = void 0;
|
|
8
|
+
const contracts_sdk_1 = require("@lit-protocol/contracts-sdk");
|
|
9
|
+
const lit_node_client_1 = require("@lit-protocol/lit-node-client");
|
|
10
|
+
class LitClientManager {
|
|
11
|
+
constructor(defaultConfig) {
|
|
12
|
+
this.clients = new Map();
|
|
13
|
+
// Connection pool settings
|
|
14
|
+
this.maxIdleTime = 30 * 60 * 1000; // 30 minutes
|
|
15
|
+
this.cleanupInterval = null;
|
|
16
|
+
this.defaultConfig = defaultConfig;
|
|
17
|
+
this.debug = defaultConfig.debug || false;
|
|
18
|
+
// Don't start cleanup timer immediately - start it when first client is created
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get or create a LitNodeClient instance
|
|
22
|
+
* Uses singleton pattern per network configuration
|
|
23
|
+
*/
|
|
24
|
+
async getClient(config) {
|
|
25
|
+
const finalConfig = { ...this.defaultConfig, ...config };
|
|
26
|
+
const clientKey = this.getClientKey(finalConfig);
|
|
27
|
+
let managed = this.clients.get(clientKey);
|
|
28
|
+
if (!managed) {
|
|
29
|
+
// Start cleanup timer when we create the first client
|
|
30
|
+
if (this.clients.size === 0 && !this.cleanupInterval) {
|
|
31
|
+
this.startCleanupTimer();
|
|
32
|
+
}
|
|
33
|
+
if (this.debug) {
|
|
34
|
+
console.log(`🔌 Creating new LitNodeClient for ${finalConfig.litNetwork}`);
|
|
35
|
+
}
|
|
36
|
+
const client = new lit_node_client_1.LitNodeClient({
|
|
37
|
+
litNetwork: finalConfig.litNetwork,
|
|
38
|
+
debug: finalConfig.debug,
|
|
39
|
+
alertWhenUnauthorized: finalConfig.alertWhenUnauthorized,
|
|
40
|
+
minNodeCount: finalConfig.minNodeCount,
|
|
41
|
+
});
|
|
42
|
+
await client.connect();
|
|
43
|
+
managed = {
|
|
44
|
+
client,
|
|
45
|
+
contracts: null,
|
|
46
|
+
lastUsed: Date.now(),
|
|
47
|
+
refCount: 0,
|
|
48
|
+
network: finalConfig.litNetwork,
|
|
49
|
+
};
|
|
50
|
+
this.clients.set(clientKey, managed);
|
|
51
|
+
if (this.debug) {
|
|
52
|
+
console.log(`✅ LitNodeClient connected for ${finalConfig.litNetwork}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (this.debug) {
|
|
57
|
+
console.log(`🔄 Reusing existing LitNodeClient for ${finalConfig.litNetwork}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// Update usage tracking
|
|
61
|
+
managed.lastUsed = Date.now();
|
|
62
|
+
managed.refCount++;
|
|
63
|
+
return managed.client;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get or create LitContracts instance (cached per client)
|
|
67
|
+
*/
|
|
68
|
+
async getContracts(signer, config) {
|
|
69
|
+
const finalConfig = { ...this.defaultConfig, ...config };
|
|
70
|
+
const clientKey = this.getClientKey(finalConfig);
|
|
71
|
+
let managed = this.clients.get(clientKey);
|
|
72
|
+
if (!managed) {
|
|
73
|
+
// Get client first (will create if needed)
|
|
74
|
+
await this.getClient(config);
|
|
75
|
+
managed = this.clients.get(clientKey);
|
|
76
|
+
}
|
|
77
|
+
// Create contracts instance if not cached
|
|
78
|
+
if (!managed.contracts) {
|
|
79
|
+
if (this.debug) {
|
|
80
|
+
console.log(`🔌 Creating new LitContracts for ${finalConfig.litNetwork}`);
|
|
81
|
+
}
|
|
82
|
+
managed.contracts = new contracts_sdk_1.LitContracts({
|
|
83
|
+
signer,
|
|
84
|
+
network: finalConfig.litNetwork,
|
|
85
|
+
debug: finalConfig.debug,
|
|
86
|
+
});
|
|
87
|
+
await managed.contracts.connect();
|
|
88
|
+
if (this.debug) {
|
|
89
|
+
console.log(`✅ LitContracts connected for ${finalConfig.litNetwork}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
if (this.debug) {
|
|
94
|
+
console.log(`🔄 Reusing existing LitContracts for ${finalConfig.litNetwork}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// Update usage tracking
|
|
98
|
+
managed.lastUsed = Date.now();
|
|
99
|
+
managed.refCount++;
|
|
100
|
+
return managed.contracts;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Release a reference to a client
|
|
104
|
+
* Decrements reference count for cleanup purposes
|
|
105
|
+
*/
|
|
106
|
+
releaseClient(config) {
|
|
107
|
+
const finalConfig = { ...this.defaultConfig, ...config };
|
|
108
|
+
const clientKey = this.getClientKey(finalConfig);
|
|
109
|
+
const managed = this.clients.get(clientKey);
|
|
110
|
+
if (managed && managed.refCount > 0) {
|
|
111
|
+
managed.refCount--;
|
|
112
|
+
if (this.debug) {
|
|
113
|
+
console.log(`📉 Released client reference for ${finalConfig.litNetwork} (refs: ${managed.refCount})`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Force disconnect and cleanup all clients
|
|
119
|
+
* Also stops the cleanup timer to prevent Jest from hanging
|
|
120
|
+
*/
|
|
121
|
+
async disconnectAll() {
|
|
122
|
+
if (this.debug) {
|
|
123
|
+
console.log(`🔌 Disconnecting ${this.clients.size} LIT clients...`);
|
|
124
|
+
}
|
|
125
|
+
for (const [key, managed] of this.clients.entries()) {
|
|
126
|
+
try {
|
|
127
|
+
await managed.client.disconnect();
|
|
128
|
+
if (this.debug) {
|
|
129
|
+
console.log(`✅ Disconnected client: ${key}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
if (this.debug) {
|
|
134
|
+
console.error(`❌ Error disconnecting client ${key}:`, error);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
this.clients.clear();
|
|
139
|
+
// Stop the cleanup timer to prevent Jest from hanging
|
|
140
|
+
if (this.cleanupInterval) {
|
|
141
|
+
clearInterval(this.cleanupInterval);
|
|
142
|
+
this.cleanupInterval = null;
|
|
143
|
+
if (this.debug) {
|
|
144
|
+
console.log(`✅ Cleanup timer stopped`);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
if (this.debug) {
|
|
148
|
+
console.log(`✅ All LIT clients disconnected and cleaned up`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Get connection statistics
|
|
153
|
+
*/
|
|
154
|
+
getStats() {
|
|
155
|
+
const clientsByNetwork = {};
|
|
156
|
+
for (const [key, managed] of this.clients.entries()) {
|
|
157
|
+
clientsByNetwork[managed.network] = {
|
|
158
|
+
refCount: managed.refCount,
|
|
159
|
+
lastUsed: managed.lastUsed,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
totalClients: this.clients.size,
|
|
164
|
+
clientsByNetwork,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Private: Generate client key for caching
|
|
169
|
+
*/
|
|
170
|
+
getClientKey(config) {
|
|
171
|
+
return `${config.litNetwork}-${config.debug}-${config.minNodeCount}`;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Private: Start cleanup timer for idle clients
|
|
175
|
+
*/
|
|
176
|
+
startCleanupTimer() {
|
|
177
|
+
this.cleanupInterval = setInterval(() => {
|
|
178
|
+
this.cleanupIdleClients();
|
|
179
|
+
}, 5 * 60 * 1000); // Check every 5 minutes
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Private: Cleanup clients that have been idle too long
|
|
183
|
+
*/
|
|
184
|
+
async cleanupIdleClients() {
|
|
185
|
+
const now = Date.now();
|
|
186
|
+
const toRemove = [];
|
|
187
|
+
for (const [key, managed] of this.clients.entries()) {
|
|
188
|
+
// Only cleanup if no references and idle for too long
|
|
189
|
+
if (managed.refCount === 0 && now - managed.lastUsed > this.maxIdleTime) {
|
|
190
|
+
toRemove.push(key);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
for (const key of toRemove) {
|
|
194
|
+
const managed = this.clients.get(key);
|
|
195
|
+
if (managed) {
|
|
196
|
+
try {
|
|
197
|
+
await managed.client.disconnect();
|
|
198
|
+
this.clients.delete(key);
|
|
199
|
+
if (this.debug) {
|
|
200
|
+
console.log(`🧹 Cleaned up idle client: ${key}`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
if (this.debug) {
|
|
205
|
+
console.error(`❌ Error cleaning up client ${key}:`, error);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
exports.LitClientManager = LitClientManager;
|
|
213
|
+
//# sourceMappingURL=client-manager.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-manager.module.js","sourceRoot":"","sources":["../../src/modules/client-manager.module.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA2D;AAC3D,mEAA8D;AAmB9D,MAAa,gBAAgB;IAU3B,YAAY,aAA2B;QAT/B,YAAO,GAAG,IAAI,GAAG,EAAyB,CAAC;QAKnD,2BAA2B;QACnB,gBAAW,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QAC3C,oBAAe,GAA0B,IAAI,CAAC;QAGpD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,IAAI,KAAK,CAAC;QAC1C,gFAAgF;IAClF,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,SAAS,CAAC,MAA8B;QAC5C,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,MAAM,EAAE,CAAC;QACzD,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QAEjD,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAE1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,sDAAsD;YACtD,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;gBACrD,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,CAAC;YAED,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,GAAG,CACT,qCAAqC,WAAW,CAAC,UAAU,EAAE,CAC9D,CAAC;YACJ,CAAC;YAED,MAAM,MAAM,GAAG,IAAI,+BAAa,CAAC;gBAC/B,UAAU,EAAE,WAAW,CAAC,UAAU;gBAClC,KAAK,EAAE,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GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;gBACxE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QAED,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;YAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACtC,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,CAAC;oBACH,MAAM,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;oBAClC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;oBAEzB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;wBACf,OAAO,CAAC,GAAG,CAAC,8BAA8B,GAAG,EAAE,CAAC,CAAC;oBACnD,CAAC;gBACH,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;wBACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,GAAG,GAAG,EAAE,KAAK,CAAC,CAAC;oBAC7D,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAhQD,4CAgQC"}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LIT-OPS Main Module
|
|
3
|
+
* Diamond Hands Protocol - LIT Protocol Operations
|
|
4
|
+
*
|
|
5
|
+
* Main LitOps class providing decoupled LIT Protocol operations supporting:
|
|
6
|
+
* - Standalone mode: User pays LIT tokens directly
|
|
7
|
+
* - Service mode: Backend service handles LIT token costs
|
|
8
|
+
*/
|
|
9
|
+
import { ethers as ethers5 } from "ethers";
|
|
10
|
+
import { LitOpsConfig } from "../interfaces";
|
|
11
|
+
export declare class LitOps {
|
|
12
|
+
private config;
|
|
13
|
+
private clientManager;
|
|
14
|
+
private pkpManager;
|
|
15
|
+
private actionExecutor;
|
|
16
|
+
private pkpSigner;
|
|
17
|
+
private pkpMacroUtils;
|
|
18
|
+
private pkpMinter;
|
|
19
|
+
private pkpAuthorizer;
|
|
20
|
+
private authManager;
|
|
21
|
+
private sessionManager;
|
|
22
|
+
constructor(config: LitOpsConfig);
|
|
23
|
+
/**
|
|
24
|
+
* Create a new PKP
|
|
25
|
+
*/
|
|
26
|
+
createPKP(signer?: ethers5.Signer, litActionCid?: string): Promise<import("../interfaces").PKPCreationResult>;
|
|
27
|
+
/**
|
|
28
|
+
* Validate a PKP
|
|
29
|
+
*/
|
|
30
|
+
validatePKP(pkpId: string, signer?: ethers5.Signer): Promise<import("../interfaces").PKPValidationResult>;
|
|
31
|
+
/**
|
|
32
|
+
* Burn a PKP
|
|
33
|
+
*/
|
|
34
|
+
burnPKP(pkpId: string, signer?: ethers5.Signer, reason?: string): Promise<import("../interfaces").PKPBurnResult>;
|
|
35
|
+
/**
|
|
36
|
+
* Execute a LIT Action from CID
|
|
37
|
+
*/
|
|
38
|
+
executeActionFromCID(cid: string, pkpPublicKey: string, params: Record<string, any>, signer?: ethers5.Signer): Promise<import("../interfaces").LitActionExecutionResult>;
|
|
39
|
+
/**
|
|
40
|
+
* Execute a LIT Action from code
|
|
41
|
+
*/
|
|
42
|
+
executeActionFromCode(code: string, pkpPublicKey: string, params: Record<string, any>, signer?: ethers5.Signer): Promise<import("../interfaces").LitActionExecutionResult>;
|
|
43
|
+
/**
|
|
44
|
+
* Sign a message using PKP via LIT Action (Golden Implementation)
|
|
45
|
+
* This is the main PKP signing method that can create PKP if needed
|
|
46
|
+
*
|
|
47
|
+
* If pkpPublicKey is empty, it will:
|
|
48
|
+
* 1. Create a new PKP
|
|
49
|
+
* 2. Authorize the LIT Action
|
|
50
|
+
* 3. Burn the PKP for immutability
|
|
51
|
+
* 4. Sign the message
|
|
52
|
+
*
|
|
53
|
+
* If pkpPublicKey is provided, it will directly sign with existing PKP
|
|
54
|
+
*/
|
|
55
|
+
signMessageWithPKP(message: string, pkpPublicKey: string, litActionCid: string, signer: ethers5.Signer, pkpEthAddress?: string): Promise<import("./pkp-signer.module").PKPSigningResult>;
|
|
56
|
+
/**
|
|
57
|
+
* Create PKP with full workflow (Create + Authorize + Burn)
|
|
58
|
+
* This method provides the complete PKP creation workflow suitable for production use.
|
|
59
|
+
* Returns all necessary data for subsequent signing operations.
|
|
60
|
+
*
|
|
61
|
+
* @param litActionCid - The LIT Action CID to authorize for this PKP
|
|
62
|
+
* @param signer - The wallet to use for PKP creation and transactions
|
|
63
|
+
* @returns Complete PKP data including tokenId, publicKey, ethAddress, etc.
|
|
64
|
+
*/
|
|
65
|
+
createProductionPKP(litActionCid: string, signer: ethers5.Signer): Promise<import("./pkp-macros.module").PKPCompleteWorkflowResult>;
|
|
66
|
+
/**
|
|
67
|
+
* Sign message with existing PKP data
|
|
68
|
+
* This method takes the result from createProductionPKP and signs a message.
|
|
69
|
+
* Perfect for two-step workflow: create PKP, then sign multiple messages.
|
|
70
|
+
*
|
|
71
|
+
* @param message - The message to sign
|
|
72
|
+
* @param pkpData - PKP data from createProductionPKP or compatible interface
|
|
73
|
+
* @param litActionCid - The LIT Action CID to use for signing
|
|
74
|
+
* @param signer - The wallet to use for session signatures
|
|
75
|
+
* @returns Signature result with verification data
|
|
76
|
+
*/
|
|
77
|
+
signWithExistingPKP(message: string, pkpData: {
|
|
78
|
+
publicKey: string;
|
|
79
|
+
ethAddress: string;
|
|
80
|
+
permittedActions: string[];
|
|
81
|
+
}, litActionCid: string, signer: ethers5.Signer): Promise<import("./pkp-signer.module").PKPSigningResult>;
|
|
82
|
+
/**
|
|
83
|
+
* Get configuration
|
|
84
|
+
*/
|
|
85
|
+
getConfig(): LitOpsConfig;
|
|
86
|
+
/**
|
|
87
|
+
* Get client status
|
|
88
|
+
*/
|
|
89
|
+
getStatus(): {
|
|
90
|
+
config: LitOpsConfig;
|
|
91
|
+
client: {
|
|
92
|
+
totalClients: number;
|
|
93
|
+
clientsByNetwork: Record<string, {
|
|
94
|
+
refCount: number;
|
|
95
|
+
lastUsed: number;
|
|
96
|
+
}>;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Validate PKP Security via LIT Action
|
|
101
|
+
*
|
|
102
|
+
* This method executes the pkp-validator LIT Action to validate that a PKP is:
|
|
103
|
+
* - Created (exists on-chain)
|
|
104
|
+
* - Immutable (transferred to burn address)
|
|
105
|
+
* - Has only one authorized action
|
|
106
|
+
* - Authorized for the expected CID
|
|
107
|
+
*
|
|
108
|
+
* @param targetPkpTokenId - The PKP token ID to validate
|
|
109
|
+
* @param expectedCid - The expected CID in hex format (0x...)
|
|
110
|
+
* @param signerPkp - The PKP to use for signing the LIT Action (should be PKP_VALIDATOR_PKP)
|
|
111
|
+
* @param signer - The wallet to use for session signatures
|
|
112
|
+
* @returns PKP validation result with signature verification
|
|
113
|
+
*/
|
|
114
|
+
validatePKPSecurity(targetPkpTokenId: string, expectedCid: string, signerPkp: {
|
|
115
|
+
tokenId: string;
|
|
116
|
+
publicKey: string;
|
|
117
|
+
ethAddress: string;
|
|
118
|
+
}, signer: ethers5.Signer): Promise<{
|
|
119
|
+
success: boolean;
|
|
120
|
+
signature?: string;
|
|
121
|
+
error?: string;
|
|
122
|
+
signatureValid: boolean;
|
|
123
|
+
pkpAddress?: string;
|
|
124
|
+
recoveredAddress?: string;
|
|
125
|
+
validationResult?: {
|
|
126
|
+
exists: boolean;
|
|
127
|
+
isImmutable: boolean;
|
|
128
|
+
hasOnlyOneAction: boolean;
|
|
129
|
+
matchesExpectedCID: boolean;
|
|
130
|
+
allValid: boolean;
|
|
131
|
+
};
|
|
132
|
+
}>;
|
|
133
|
+
/**
|
|
134
|
+
* Ultimate PKP Macro: Create and Validate PKP to LIT Action
|
|
135
|
+
*
|
|
136
|
+
* This is the ultimate PKP security macro that combines:
|
|
137
|
+
* 1. PKP creation
|
|
138
|
+
* 2. LIT Action authorization
|
|
139
|
+
* 3. PKP immutability (burn to dead address)
|
|
140
|
+
* 4. PKP security validation via pkp-validator LIT Action
|
|
141
|
+
*
|
|
142
|
+
* Returns complete PKP data and cryptographic proof of security.
|
|
143
|
+
*
|
|
144
|
+
* @param litActionCid - The LIT Action CID to authorize for this PKP
|
|
145
|
+
* @param signer - Optional signer (required for standalone mode, not used in service mode)
|
|
146
|
+
* @returns Complete PKP creation and validation result with audit trail
|
|
147
|
+
*/
|
|
148
|
+
createAndValidatePkpToLitAction(litActionCid: string, signer?: ethers5.Signer): Promise<{
|
|
149
|
+
success: boolean;
|
|
150
|
+
error?: string;
|
|
151
|
+
timestamp: number;
|
|
152
|
+
duration: number;
|
|
153
|
+
targetCid: string;
|
|
154
|
+
pkpData: {
|
|
155
|
+
tokenId: string;
|
|
156
|
+
publicKey: string;
|
|
157
|
+
ethAddress: string;
|
|
158
|
+
mintTransactionHash: string;
|
|
159
|
+
verified: boolean;
|
|
160
|
+
owner: string;
|
|
161
|
+
authTransactionHash: string;
|
|
162
|
+
isPermitted: boolean;
|
|
163
|
+
permittedActions: string[];
|
|
164
|
+
burnTransactionHash?: string;
|
|
165
|
+
burned?: boolean;
|
|
166
|
+
workflow: string;
|
|
167
|
+
timestamp: number;
|
|
168
|
+
duration: number;
|
|
169
|
+
};
|
|
170
|
+
validationResult: {
|
|
171
|
+
success: boolean;
|
|
172
|
+
signature?: string;
|
|
173
|
+
error?: string;
|
|
174
|
+
signatureValid: boolean;
|
|
175
|
+
pkpAddress?: string;
|
|
176
|
+
recoveredAddress?: string;
|
|
177
|
+
validationResult?: {
|
|
178
|
+
exists: boolean;
|
|
179
|
+
isImmutable: boolean;
|
|
180
|
+
hasOnlyOneAction: boolean;
|
|
181
|
+
matchesExpectedCID: boolean;
|
|
182
|
+
allValid: boolean;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
auditTrail: {
|
|
186
|
+
steps: Array<{
|
|
187
|
+
step: number;
|
|
188
|
+
description: string;
|
|
189
|
+
timestamp: number;
|
|
190
|
+
duration: number;
|
|
191
|
+
success: boolean;
|
|
192
|
+
data?: any;
|
|
193
|
+
}>;
|
|
194
|
+
totalDuration: number;
|
|
195
|
+
};
|
|
196
|
+
}>;
|
|
197
|
+
/**
|
|
198
|
+
* Production method: Create a new Diamond Hands Loan PKP
|
|
199
|
+
*
|
|
200
|
+
* This is the main method that will be called in production.
|
|
201
|
+
* Creates a new PKP specifically for Diamond Hands loans, using the
|
|
202
|
+
* authorization dummy CID from dh-lit-actions package.
|
|
203
|
+
*
|
|
204
|
+
* @param signer - Optional signer (required for standalone mode, not used in service mode)
|
|
205
|
+
* @returns Complete PKP creation and validation result
|
|
206
|
+
*/
|
|
207
|
+
getNewDiamondHandsLoanPkp(signer?: ethers5.Wallet): Promise<{
|
|
208
|
+
success: boolean;
|
|
209
|
+
error?: string;
|
|
210
|
+
timestamp: number;
|
|
211
|
+
duration: number;
|
|
212
|
+
targetCid: string;
|
|
213
|
+
pkpData: {
|
|
214
|
+
tokenId: string;
|
|
215
|
+
publicKey: string;
|
|
216
|
+
ethAddress: string;
|
|
217
|
+
mintTransactionHash: string;
|
|
218
|
+
verified: boolean;
|
|
219
|
+
owner: string;
|
|
220
|
+
authTransactionHash: string;
|
|
221
|
+
isPermitted: boolean;
|
|
222
|
+
permittedActions: string[];
|
|
223
|
+
burnTransactionHash?: string;
|
|
224
|
+
burned?: boolean;
|
|
225
|
+
workflow: string;
|
|
226
|
+
timestamp: number;
|
|
227
|
+
duration: number;
|
|
228
|
+
};
|
|
229
|
+
validationResult: {
|
|
230
|
+
success: boolean;
|
|
231
|
+
signature?: string;
|
|
232
|
+
error?: string;
|
|
233
|
+
signatureValid: boolean;
|
|
234
|
+
pkpAddress?: string;
|
|
235
|
+
recoveredAddress?: string;
|
|
236
|
+
validationResult?: {
|
|
237
|
+
exists: boolean;
|
|
238
|
+
isImmutable: boolean;
|
|
239
|
+
hasOnlyOneAction: boolean;
|
|
240
|
+
matchesExpectedCID: boolean;
|
|
241
|
+
allValid: boolean;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
auditTrail: {
|
|
245
|
+
steps: Array<{
|
|
246
|
+
step: number;
|
|
247
|
+
description: string;
|
|
248
|
+
timestamp: number;
|
|
249
|
+
duration: number;
|
|
250
|
+
success: boolean;
|
|
251
|
+
data?: any;
|
|
252
|
+
}>;
|
|
253
|
+
totalDuration: number;
|
|
254
|
+
};
|
|
255
|
+
}>;
|
|
256
|
+
/**
|
|
257
|
+
* Cleanup - disconnect all clients
|
|
258
|
+
*/
|
|
259
|
+
disconnect(): Promise<void>;
|
|
260
|
+
}
|
|
261
|
+
//# sourceMappingURL=lit-ops.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-ops.module.d.ts","sourceRoot":"","sources":["../../src/modules/lit-ops.module.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAEL,YAAY,EAEb,MAAM,eAAe,CAAC;AAWvB,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,aAAa,CAAmB;IACxC,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,cAAc,CAAoB;IAC1C,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,WAAW,CAAiB;IACpC,OAAO,CAAC,cAAc,CAA0B;gBAEpC,MAAM,EAAE,YAAY;IA0KhC;;OAEG;IACG,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAa9D;;OAEG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM;IAOxD;;OAEG;IACG,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,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