@gvnrdao/dh-lit-actions 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 +120 -0
- package/package.json +63 -0
- package/pkg-dist/constants/chunks/lit-actions-registry.d.ts +37 -0
- package/pkg-dist/constants/chunks/lit-actions-registry.d.ts.map +1 -0
- package/pkg-dist/constants/chunks/lit-actions-registry.js +144 -0
- package/pkg-dist/constants/chunks/lit-actions-registry.js.map +1 -0
- package/pkg-dist/constants/chunks/package-registry.d.ts +6 -0
- package/pkg-dist/constants/chunks/package-registry.d.ts.map +1 -0
- package/pkg-dist/constants/chunks/package-registry.js +15 -0
- package/pkg-dist/constants/chunks/package-registry.js.map +1 -0
- package/pkg-dist/constants/index.d.ts +7 -0
- package/pkg-dist/constants/index.d.ts.map +1 -0
- package/pkg-dist/constants/index.js +23 -0
- package/pkg-dist/constants/index.js.map +1 -0
- package/pkg-dist/index.d.ts +12 -0
- package/pkg-dist/index.d.ts.map +1 -0
- package/pkg-dist/index.js +34 -0
- package/pkg-dist/index.js.map +1 -0
- package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.d.ts +18 -0
- package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.d.ts.map +1 -0
- package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.js +3 -0
- package/pkg-dist/interfaces/chunks/diamond-hands-lit-actions.i.js.map +1 -0
- package/pkg-dist/interfaces/chunks/lit-action-config.i.d.ts +32 -0
- package/pkg-dist/interfaces/chunks/lit-action-config.i.d.ts.map +1 -0
- package/pkg-dist/interfaces/chunks/lit-action-config.i.js +3 -0
- package/pkg-dist/interfaces/chunks/lit-action-config.i.js.map +1 -0
- package/pkg-dist/interfaces/chunks/lit-action-name.i.d.ts +6 -0
- package/pkg-dist/interfaces/chunks/lit-action-name.i.d.ts.map +1 -0
- package/pkg-dist/interfaces/chunks/lit-action-name.i.js +3 -0
- package/pkg-dist/interfaces/chunks/lit-action-name.i.js.map +1 -0
- package/pkg-dist/interfaces/chunks/lit-action-registry.i.d.ts +17 -0
- package/pkg-dist/interfaces/chunks/lit-action-registry.i.d.ts.map +1 -0
- package/pkg-dist/interfaces/chunks/lit-action-registry.i.js +3 -0
- package/pkg-dist/interfaces/chunks/lit-action-registry.i.js.map +1 -0
- package/pkg-dist/interfaces/chunks/pkp-info.i.d.ts +25 -0
- package/pkg-dist/interfaces/chunks/pkp-info.i.d.ts.map +1 -0
- package/pkg-dist/interfaces/chunks/pkp-info.i.js +3 -0
- package/pkg-dist/interfaces/chunks/pkp-info.i.js.map +1 -0
- package/pkg-dist/interfaces/index.d.ts +9 -0
- package/pkg-dist/interfaces/index.d.ts.map +1 -0
- package/pkg-dist/interfaces/index.js +25 -0
- package/pkg-dist/interfaces/index.js.map +1 -0
- package/pkg-dist/utils/chunks/cid-utils.d.ts +6 -0
- package/pkg-dist/utils/chunks/cid-utils.d.ts.map +1 -0
- package/pkg-dist/utils/chunks/cid-utils.js +37 -0
- package/pkg-dist/utils/chunks/cid-utils.js.map +1 -0
- package/pkg-dist/utils/chunks/lit-action-helpers.d.ts +32 -0
- package/pkg-dist/utils/chunks/lit-action-helpers.d.ts.map +1 -0
- package/pkg-dist/utils/chunks/lit-action-helpers.js +58 -0
- package/pkg-dist/utils/chunks/lit-action-helpers.js.map +1 -0
- package/pkg-dist/utils/chunks/pkp-setup.d.ts +9 -0
- package/pkg-dist/utils/chunks/pkp-setup.d.ts.map +1 -0
- package/pkg-dist/utils/chunks/pkp-setup.js +15 -0
- package/pkg-dist/utils/chunks/pkp-setup.js.map +1 -0
- package/pkg-dist/utils/index.d.ts +8 -0
- package/pkg-dist/utils/index.d.ts.map +1 -0
- package/pkg-dist/utils/index.js +24 -0
- package/pkg-dist/utils/index.js.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# dh-lit-actions: Diamond Hands LIT Actions Package System
|
|
2
|
+
|
|
3
|
+
A comprehensive, deterministic, and auditable build system for LIT Protocol Actions used in the Diamond Hands Protocol.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
lit-actions/
|
|
9
|
+
├── src/ # LIT Action TypeScript sources
|
|
10
|
+
├── scripts/ # Build, minify, upload scripts (TypeScript)
|
|
11
|
+
├── out/ # Compiled .js files from src/
|
|
12
|
+
├── dist/ # Minified, deployment-ready .action.js files
|
|
13
|
+
├── pkg-src/ # Package source (registry + types)
|
|
14
|
+
└── pkg-dist/ # Built npm package (dh-lit-actions)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Two-Phase System
|
|
18
|
+
|
|
19
|
+
### Phase 1: LIT Actions Development & Deployment
|
|
20
|
+
|
|
21
|
+
- **Source**: `src/*.ts` - TypeScript LIT Actions
|
|
22
|
+
- **Build**: `out/*.js` - Compiled JavaScript
|
|
23
|
+
- **Minify**: `dist/*.action.js` - Minified for IPFS deployment
|
|
24
|
+
- **Upload**: Deploy to IPFS via Pinata
|
|
25
|
+
|
|
26
|
+
### Phase 2: NPM Package Generation
|
|
27
|
+
|
|
28
|
+
- **Package Source**: `pkg-src/` - Registry and types
|
|
29
|
+
- **Package Build**: `pkg-dist/` - Compiled npm package
|
|
30
|
+
- **Package Name**: `dh-lit-actions` - Published to npm
|
|
31
|
+
|
|
32
|
+
## Commands
|
|
33
|
+
|
|
34
|
+
### Development Commands
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm run clean # Clean out/ and dist/
|
|
38
|
+
npm run build # Build src/ → out/ (TypeScript compilation)
|
|
39
|
+
npm run minify # Minify out/ → dist/ (deployment-ready)
|
|
40
|
+
npm run upload # Upload dist/ to IPFS (mock mode by default)
|
|
41
|
+
npm run deploy # Full deployment pipeline (clean + build + minify + upload)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Package Commands
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm run clean:pkg # Clean pkg-dist/
|
|
48
|
+
npm run build:package # Update registry + build pkg-src/ → pkg-dist/
|
|
49
|
+
npm run package # Full package build (clean:pkg + build:package)
|
|
50
|
+
npm run release # Complete release (deploy + package)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Environment Setup
|
|
54
|
+
|
|
55
|
+
1. **Copy the example configuration:**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
cp .env.example .env
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
2. **Configure for your needs:**
|
|
62
|
+
|
|
63
|
+
### Mock Mode (Development - Default)
|
|
64
|
+
|
|
65
|
+
```env
|
|
66
|
+
MOCK_MODE=true
|
|
67
|
+
DEBUG_BUILD=false
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Production Mode (Real Pinata Upload)
|
|
71
|
+
|
|
72
|
+
```env
|
|
73
|
+
PINATA_JWT=your_pinata_jwt_token_here
|
|
74
|
+
MOCK_MODE=false
|
|
75
|
+
DEBUG_BUILD=false
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Getting Pinata JWT
|
|
79
|
+
|
|
80
|
+
1. Go to [Pinata Keys](https://app.pinata.cloud/keys)
|
|
81
|
+
2. Create a new API key
|
|
82
|
+
3. Select **Admin** permissions or at minimum:
|
|
83
|
+
- `pinFileToIPFS`
|
|
84
|
+
- `pinJSONToIPFS`
|
|
85
|
+
4. Copy the **JWT Token** (not API Key/Secret)
|
|
86
|
+
5. Add to your `.env` file as `PINATA_JWT`
|
|
87
|
+
|
|
88
|
+
## Build Commands
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Clean build
|
|
92
|
+
npm run clean
|
|
93
|
+
|
|
94
|
+
# Build LIT Actions (with debug)
|
|
95
|
+
DEBUG_BUILD=true npm run build
|
|
96
|
+
|
|
97
|
+
# Upload to IPFS (mock mode)
|
|
98
|
+
npm run upload
|
|
99
|
+
|
|
100
|
+
# Build + Upload
|
|
101
|
+
npm run deploy
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Mock Mode Quality
|
|
105
|
+
|
|
106
|
+
Our mock mode is **very good** for development:
|
|
107
|
+
|
|
108
|
+
- ✅ **Deterministic**: Same content = same CID
|
|
109
|
+
- ✅ **Realistic Format**: Proper IPFS CID format (`Qm...`)
|
|
110
|
+
- ✅ **Reproducible**: Perfect for testing
|
|
111
|
+
- ✅ **Hash-based**: Content integrity guaranteed
|
|
112
|
+
- ✅ **Offline Ready**: No network dependencies
|
|
113
|
+
|
|
114
|
+
**Mock CID Example**: `Qmd75a736b6ea15647bc551d8c55c6481acba3b2bcbc63`
|
|
115
|
+
|
|
116
|
+
The mock system generates CIDs based on content hash, so:
|
|
117
|
+
|
|
118
|
+
- Same TypeScript source → Same built JS → Same mock CID
|
|
119
|
+
- Perfect for development and testing
|
|
120
|
+
- Switch to real Pinata when ready for deployment
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gvnrdao/dh-lit-actions",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Diamond Hands Protocol LIT Actions - Deterministic, Auditable Builds",
|
|
5
|
+
"main": "pkg-dist/index.js",
|
|
6
|
+
"types": "pkg-dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"pkg-dist/**/*"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"clean": "rm -rf out dist",
|
|
12
|
+
"clean:pkg": "rm -rf pkg-dist",
|
|
13
|
+
"clean:all": "npm run clean && npm run clean:pkg",
|
|
14
|
+
"build": "ts-node scripts/build-actions.ts",
|
|
15
|
+
"build:pkg": "tsc -p tsconfig.pkg.json",
|
|
16
|
+
"build:package": "rm -rf pkg-dist && tsc -p tsconfig.pkg.json",
|
|
17
|
+
"minify": "ts-node scripts/minify-actions.ts",
|
|
18
|
+
"upload": "ts-node scripts/upload-to-pinata.ts",
|
|
19
|
+
"deploy": "npm run clean && npm run build && npm run minify && npm run upload",
|
|
20
|
+
"package": "npm run clean:pkg && npm run build:package",
|
|
21
|
+
"release": "npm run deploy && npm run package",
|
|
22
|
+
"prepublishOnly": "npm run package",
|
|
23
|
+
"test": "node scripts/test-only.js",
|
|
24
|
+
"test:jest": "jest",
|
|
25
|
+
"test:all": "jest",
|
|
26
|
+
"test:watch": "jest --watch",
|
|
27
|
+
"test:coverage": "jest --coverage"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@lit-protocol/contracts-sdk": "^7.3.0",
|
|
31
|
+
"@lit-protocol/lit-node-client": "^7.3.0",
|
|
32
|
+
"@types/bs58": "^5.0.0",
|
|
33
|
+
"axios": "1.7.7",
|
|
34
|
+
"bs58": "^6.0.0",
|
|
35
|
+
"dotenv": "16.4.7",
|
|
36
|
+
"ethers5": "npm:ethers@5.8.0",
|
|
37
|
+
"ethers6": "npm:ethers@6.15.0",
|
|
38
|
+
"form-data": "4.0.1",
|
|
39
|
+
"fs-extra": "11.2.0",
|
|
40
|
+
"multiformats": "^13.4.0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/fs-extra": "11.0.4",
|
|
44
|
+
"@types/jest": "^29.5.14",
|
|
45
|
+
"@types/node": "20.17.6",
|
|
46
|
+
"jest": "^29.7.0",
|
|
47
|
+
"terser": "5.36.0",
|
|
48
|
+
"ts-jest": "^29.4.1",
|
|
49
|
+
"ts-node": "10.9.2",
|
|
50
|
+
"typescript": "5.7.2"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=18.0.0",
|
|
54
|
+
"npm": ">=9.0.0"
|
|
55
|
+
},
|
|
56
|
+
"author": "Diamond Hands Protocol",
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "https://github.com/gvnrdao/diamond-hands.git",
|
|
61
|
+
"directory": "lit-actions"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DiamondHandsLitActions } from "../../interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* Diamond Hands LIT Actions Registry
|
|
4
|
+
* Contains all deployed LIT Actions with their IPFS CIDs and metadata
|
|
5
|
+
* Supports both datil (production) and datil-test (development) networks
|
|
6
|
+
*/
|
|
7
|
+
export declare const DH_LIT_ACTIONS_DATIL: DiamondHandsLitActions;
|
|
8
|
+
export declare const DH_LIT_ACTIONS_DATIL_TEST: DiamondHandsLitActions;
|
|
9
|
+
/**
|
|
10
|
+
* Main export - environment-aware deployments
|
|
11
|
+
* Automatically selects the correct network based on environment
|
|
12
|
+
*/
|
|
13
|
+
export declare const DH_LIT_ACTIONS: DiamondHandsLitActions;
|
|
14
|
+
/**
|
|
15
|
+
* Network-specific exports for explicit access
|
|
16
|
+
*/
|
|
17
|
+
export declare const DATIL_DEPLOYMENTS: DiamondHandsLitActions;
|
|
18
|
+
export declare const DATIL_TEST_DEPLOYMENTS: DiamondHandsLitActions;
|
|
19
|
+
/**
|
|
20
|
+
* Easy access exports for commonly used CIDs (environment-aware)
|
|
21
|
+
*/
|
|
22
|
+
export declare const AUTHORIZATION_DUMMY_CID: string;
|
|
23
|
+
export declare const AUTHORIZATION_DUMMY_B_CID: string;
|
|
24
|
+
export declare const PKP_VALIDATOR_CID: string;
|
|
25
|
+
/**
|
|
26
|
+
* Production datil network constants
|
|
27
|
+
*/
|
|
28
|
+
export declare const DATIL_AUTHORIZATION_DUMMY_CID: string;
|
|
29
|
+
export declare const DATIL_AUTHORIZATION_DUMMY_B_CID: string;
|
|
30
|
+
export declare const DATIL_PKP_VALIDATOR_CID: string;
|
|
31
|
+
/**
|
|
32
|
+
* Development datil-test network constants
|
|
33
|
+
*/
|
|
34
|
+
export declare const DATIL_TEST_AUTHORIZATION_DUMMY_CID: string;
|
|
35
|
+
export declare const DATIL_TEST_AUTHORIZATION_DUMMY_B_CID: string;
|
|
36
|
+
export declare const DATIL_TEST_PKP_VALIDATOR_CID: string;
|
|
37
|
+
//# sourceMappingURL=lit-actions-registry.d.ts.map
|
|
@@ -0,0 +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,sBAsDlC,CAAC;AAGF,eAAO,MAAM,yBAAyB,EAAE,sBAsDvC,CAAC;AAiBF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,sBACO,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,iBAAiB,wBAAuB,CAAC;AACtD,eAAO,MAAM,sBAAsB,wBAA4B,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAwC,CAAC;AAC7E,eAAO,MAAM,yBAAyB,QAAyC,CAAC;AAChF,eAAO,MAAM,iBAAiB,QAAkC,CAAC;AAEjE;;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"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.PKP_VALIDATOR_CID = exports.AUTHORIZATION_DUMMY_B_CID = exports.AUTHORIZATION_DUMMY_CID = exports.DATIL_TEST_DEPLOYMENTS = exports.DATIL_DEPLOYMENTS = exports.DH_LIT_ACTIONS = exports.DH_LIT_ACTIONS_DATIL_TEST = exports.DH_LIT_ACTIONS_DATIL = void 0;
|
|
4
|
+
const cid_utils_1 = require("../../utils/chunks/cid-utils");
|
|
5
|
+
/**
|
|
6
|
+
* Diamond Hands LIT Actions Registry
|
|
7
|
+
* Contains all deployed LIT Actions with their IPFS CIDs and metadata
|
|
8
|
+
* Supports both datil (production) and datil-test (development) networks
|
|
9
|
+
*/
|
|
10
|
+
// DATIL PRODUCTION NETWORK DEPLOYMENTS
|
|
11
|
+
exports.DH_LIT_ACTIONS_DATIL = {
|
|
12
|
+
authorizationDummy: {
|
|
13
|
+
cid: "QmYjYi4mMNDie1odSetbGa6YvNf8GQFyEGjjkS3YztAY1B",
|
|
14
|
+
authorizedCidHex: (0, cid_utils_1.cidToHex)("QmYjYi4mMNDie1odSetbGa6YvNf8GQFyEGjjkS3YztAY1B"),
|
|
15
|
+
name: "Authorization Dummy",
|
|
16
|
+
description: "Production authorization LIT Action for Milestone 1 testing and PKP authorization",
|
|
17
|
+
version: "0.1.0",
|
|
18
|
+
deployed: true,
|
|
19
|
+
deployedAt: 1757364571601,
|
|
20
|
+
size: 1044,
|
|
21
|
+
hash: "122c2e87e83bbd87dfdbb38c98dd7b09c3ed88ab61f2f2541ec34d061bffd4b1",
|
|
22
|
+
},
|
|
23
|
+
authorizationDummyB: {
|
|
24
|
+
cid: "QmZYwYmVfGzA3Xax8P3ZtPomkHAxhuLHBkxLwzHzsu164k",
|
|
25
|
+
authorizedCidHex: (0, cid_utils_1.cidToHex)("QmZYwYmVfGzA3Xax8P3ZtPomkHAxhuLHBkxLwzHzsu164k"),
|
|
26
|
+
name: "Authorization Dummy B",
|
|
27
|
+
description: "Production second dummy authorization LIT Action for testing failed authorization scenarios",
|
|
28
|
+
version: "0.1.0",
|
|
29
|
+
deployed: true,
|
|
30
|
+
deployedAt: 1757364571601,
|
|
31
|
+
size: 753,
|
|
32
|
+
hash: "04e2e2e4fbaaa59196971f853471451949569ff9020a3d7946ac77ee4b55e414",
|
|
33
|
+
},
|
|
34
|
+
pkpValidator: {
|
|
35
|
+
cid: "QmSNNYcXcEgFKQj4wNG4UeQHLx9mepz69s6po6Ys68PWHt",
|
|
36
|
+
authorizedCidHex: (0, cid_utils_1.cidToHex)("QmSNNYcXcEgFKQj4wNG4UeQHLx9mepz69s6po6Ys68PWHt"),
|
|
37
|
+
name: "PKP Validator",
|
|
38
|
+
description: "Production PKP validation LIT Action for verifying authorized PKPs",
|
|
39
|
+
version: "1.0.0",
|
|
40
|
+
deployed: true,
|
|
41
|
+
deployedAt: 1757364571601,
|
|
42
|
+
size: 5028,
|
|
43
|
+
hash: "b520bb2a8545fed00a05a22790f359163f2b50f22e5ee1cb80562ef66f843345",
|
|
44
|
+
pkp: {
|
|
45
|
+
tokenId: "999571600",
|
|
46
|
+
publicKey: "0x0411111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
|
|
47
|
+
ethAddress: "0x1111111111111111111111111111111111111111",
|
|
48
|
+
mintTxHash: "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
49
|
+
authTxHash: "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
50
|
+
burnTxHash: "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
|
|
51
|
+
immutable: true,
|
|
52
|
+
authorizedCidHex: "0x12203bdfa20bfe2064fc5c168aba812d5bf77568de2ec14cc811b0b1ad3d277abae7",
|
|
53
|
+
createdAt: 1757364571600,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
// DATIL-TEST DEVELOPMENT NETWORK DEPLOYMENTS
|
|
58
|
+
exports.DH_LIT_ACTIONS_DATIL_TEST = {
|
|
59
|
+
authorizationDummy: {
|
|
60
|
+
cid: "QmYjYi4mMNDie1odSetbGa6YvNf8GQFyEGjjkS3YztAY1B", // Previous test deployment
|
|
61
|
+
authorizedCidHex: (0, cid_utils_1.cidToHex)("QmW3QeWBvRdaFhvknrq6coNZ1HNnZ5PahHQttb7Aau9VDM"),
|
|
62
|
+
name: "Authorization Dummy (Test)",
|
|
63
|
+
description: "Development authorization LIT Action for Milestone 1 testing and PKP authorization on datil-test",
|
|
64
|
+
version: "0.1.0",
|
|
65
|
+
deployed: true,
|
|
66
|
+
deployedAt: 1757364571601, // Earlier deployment
|
|
67
|
+
size: 1044,
|
|
68
|
+
hash: "122c2e87e83bbd87dfdbb38c98dd7b09c3ed88ab61f2f2541ec34d061bffd4b1",
|
|
69
|
+
},
|
|
70
|
+
authorizationDummyB: {
|
|
71
|
+
cid: "QmZYwYmVfGzA3Xax8P3ZtPomkHAxhuLHBkxLwzHzsu164k", // Different CID for proper testing
|
|
72
|
+
authorizedCidHex: (0, cid_utils_1.cidToHex)("QmZYwYmVfGzA3Xax8P3ZtPomkHAxhuLHBkxLwzHzsu164k"),
|
|
73
|
+
name: "Authorization Dummy B (Test)",
|
|
74
|
+
description: "Development second dummy authorization LIT Action for testing failed authorization scenarios on datil-test",
|
|
75
|
+
version: "0.1.0",
|
|
76
|
+
deployed: true, // Not yet deployed to test network
|
|
77
|
+
deployedAt: 1757364571601,
|
|
78
|
+
size: 753,
|
|
79
|
+
hash: "04e2e2e4fbaaa59196971f853471451949569ff9020a3d7946ac77ee4b55e414",
|
|
80
|
+
},
|
|
81
|
+
pkpValidator: {
|
|
82
|
+
cid: "QmSNNYcXcEgFKQj4wNG4UeQHLx9mepz69s6po6Ys68PWHt", // Test network validator
|
|
83
|
+
authorizedCidHex: (0, cid_utils_1.cidToHex)("QmSar1YxZX5ZjDoCQGPbcMUNgpC6NZpc6caAMHYmgZdeHm"),
|
|
84
|
+
name: "PKP Validator (Test)",
|
|
85
|
+
description: "Development PKP validation LIT Action for verifying authorized PKPs on datil-test",
|
|
86
|
+
version: "1.0.0",
|
|
87
|
+
deployed: true, // Actually deployed to test network
|
|
88
|
+
deployedAt: 1757364571601,
|
|
89
|
+
size: 5028,
|
|
90
|
+
hash: "b520bb2a8545fed00a05a22790f359163f2b50f22e5ee1cb80562ef66f843345",
|
|
91
|
+
pkp: {
|
|
92
|
+
tokenId: "0x1f1756c46a3ea3d64db6b20900d679622941fc8bc26117633d541671211dc2cf",
|
|
93
|
+
publicKey: "0412e1e2029b360d5e85572f83bb2f3b3456eae0fa895bafd1942edfc80837d07a4bbba5a805d34133002a71dfb3b9806ea51364cb7a85a5c94d7e5f3fffba2807",
|
|
94
|
+
ethAddress: "0xA4F784980AD8c3bF39F4B151E0d7f3057E003aD6",
|
|
95
|
+
mintTxHash: "0x28f4e60ff2ed74a709a72c129efc0a9f755a56996bc6c48392756fedb07d6562",
|
|
96
|
+
authTxHash: "0xeda0eabff59435e1e2f76caf883019e7e3e8a6188ca9b330aae039979fde3780",
|
|
97
|
+
burnTxHash: "0x1f886df382c187f2f2519ee383f070af499c020cfb49be1903181f51b0b5ad24",
|
|
98
|
+
immutable: true,
|
|
99
|
+
authorizedCidHex: "0x12203bdfa20bfe2064fc5c168aba812d5bf77568de2ec14cc811b0b1ad3d277abae7",
|
|
100
|
+
createdAt: 1757364571604,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Get network-specific deployments based on current environment
|
|
106
|
+
*/
|
|
107
|
+
function getCurrentEnvironmentDeployments() {
|
|
108
|
+
// Check if we're in a test environment
|
|
109
|
+
if (process.env.LIT_NETWORK === "datil-test" ||
|
|
110
|
+
process.env.NODE_ENV === "test") {
|
|
111
|
+
return exports.DH_LIT_ACTIONS_DATIL_TEST;
|
|
112
|
+
}
|
|
113
|
+
// Default to production datil
|
|
114
|
+
return exports.DH_LIT_ACTIONS_DATIL;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Main export - environment-aware deployments
|
|
118
|
+
* Automatically selects the correct network based on environment
|
|
119
|
+
*/
|
|
120
|
+
exports.DH_LIT_ACTIONS = getCurrentEnvironmentDeployments();
|
|
121
|
+
/**
|
|
122
|
+
* Network-specific exports for explicit access
|
|
123
|
+
*/
|
|
124
|
+
exports.DATIL_DEPLOYMENTS = exports.DH_LIT_ACTIONS_DATIL;
|
|
125
|
+
exports.DATIL_TEST_DEPLOYMENTS = exports.DH_LIT_ACTIONS_DATIL_TEST;
|
|
126
|
+
/**
|
|
127
|
+
* Easy access exports for commonly used CIDs (environment-aware)
|
|
128
|
+
*/
|
|
129
|
+
exports.AUTHORIZATION_DUMMY_CID = exports.DH_LIT_ACTIONS.authorizationDummy.cid;
|
|
130
|
+
exports.AUTHORIZATION_DUMMY_B_CID = exports.DH_LIT_ACTIONS.authorizationDummyB.cid;
|
|
131
|
+
exports.PKP_VALIDATOR_CID = exports.DH_LIT_ACTIONS.pkpValidator.cid;
|
|
132
|
+
/**
|
|
133
|
+
* Production datil network constants
|
|
134
|
+
*/
|
|
135
|
+
exports.DATIL_AUTHORIZATION_DUMMY_CID = exports.DH_LIT_ACTIONS_DATIL.authorizationDummy.cid;
|
|
136
|
+
exports.DATIL_AUTHORIZATION_DUMMY_B_CID = exports.DH_LIT_ACTIONS_DATIL.authorizationDummyB.cid;
|
|
137
|
+
exports.DATIL_PKP_VALIDATOR_CID = exports.DH_LIT_ACTIONS_DATIL.pkpValidator.cid;
|
|
138
|
+
/**
|
|
139
|
+
* Development datil-test network constants
|
|
140
|
+
*/
|
|
141
|
+
exports.DATIL_TEST_AUTHORIZATION_DUMMY_CID = exports.DH_LIT_ACTIONS_DATIL_TEST.authorizationDummy.cid;
|
|
142
|
+
exports.DATIL_TEST_AUTHORIZATION_DUMMY_B_CID = exports.DH_LIT_ACTIONS_DATIL_TEST.authorizationDummyB.cid;
|
|
143
|
+
exports.DATIL_TEST_PKP_VALIDATOR_CID = exports.DH_LIT_ACTIONS_DATIL_TEST.pkpValidator.cid;
|
|
144
|
+
//# sourceMappingURL=lit-actions-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-actions-registry.js","sourceRoot":"","sources":["../../../pkg-src/constants/chunks/lit-actions-registry.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-registry.d.ts","sourceRoot":"","sources":["../../../pkg-src/constants/chunks/package-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,iBAMrC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DH_LIT_ACTIONS_REGISTRY = void 0;
|
|
4
|
+
const lit_actions_registry_1 = require("./lit-actions-registry");
|
|
5
|
+
/**
|
|
6
|
+
* Package Registry with Metadata
|
|
7
|
+
*/
|
|
8
|
+
exports.DH_LIT_ACTIONS_REGISTRY = {
|
|
9
|
+
packageName: "dh-lit-actions",
|
|
10
|
+
packageVersion: "0.1.0",
|
|
11
|
+
buildTime: Date.now(),
|
|
12
|
+
totalActions: Object.keys(lit_actions_registry_1.DH_LIT_ACTIONS).length,
|
|
13
|
+
actions: lit_actions_registry_1.DH_LIT_ACTIONS,
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=package-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-registry.js","sourceRoot":"","sources":["../../../pkg-src/constants/chunks/package-registry.ts"],"names":[],"mappings":";;;AACA,iEAAwD;AAExD;;GAEG;AACU,QAAA,uBAAuB,GAAsB;IACxD,WAAW,EAAE,gBAAgB;IAC7B,cAAc,EAAE,OAAO;IACvB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;IACrB,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,qCAAc,CAAC,CAAC,MAAM;IAChD,OAAO,EAAE,qCAAc;CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../pkg-src/constants/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Diamond Hands LIT Actions Constants
|
|
4
|
+
* All constant values used in the package
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
__exportStar(require("./chunks/lit-actions-registry"), exports);
|
|
22
|
+
__exportStar(require("./chunks/package-registry"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../pkg-src/constants/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;AAEH,gEAA8C;AAC9C,4DAA0C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dh-lit-actions Package
|
|
3
|
+
* Diamond Hands Protocol LIT Actions Registry
|
|
4
|
+
*
|
|
5
|
+
* This package exports deployed LIT Action CIDs and metadata
|
|
6
|
+
* for consumption by the Diamond Hands SDK and other applications.
|
|
7
|
+
*/
|
|
8
|
+
export * from "./interfaces";
|
|
9
|
+
export * from "./constants/chunks/lit-actions-registry";
|
|
10
|
+
export * from "./utils";
|
|
11
|
+
export { DH_LIT_ACTIONS as default } from "./constants/chunks/lit-actions-registry";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../pkg-src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,cAAc,cAAc,CAAC;AAG7B,cAAc,yCAAyC,CAAC;AAGxD,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,MAAM,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* dh-lit-actions Package
|
|
4
|
+
* Diamond Hands Protocol LIT Actions Registry
|
|
5
|
+
*
|
|
6
|
+
* This package exports deployed LIT Action CIDs and metadata
|
|
7
|
+
* for consumption by the Diamond Hands SDK and other applications.
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
21
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.default = void 0;
|
|
25
|
+
// Export interfaces
|
|
26
|
+
__exportStar(require("./interfaces"), exports);
|
|
27
|
+
// Export constants from registry
|
|
28
|
+
__exportStar(require("./constants/chunks/lit-actions-registry"), exports);
|
|
29
|
+
// Export utilities
|
|
30
|
+
__exportStar(require("./utils"), exports);
|
|
31
|
+
// Default export
|
|
32
|
+
var lit_actions_registry_1 = require("./constants/chunks/lit-actions-registry");
|
|
33
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return lit_actions_registry_1.DH_LIT_ACTIONS; } });
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../pkg-src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;AAEH,oBAAoB;AACpB,+CAA6B;AAE7B,iCAAiC;AACjC,0EAAwD;AAExD,mBAAmB;AACnB,0CAAwB;AAExB,iBAAiB;AACjB,gFAAoF;AAA3E,+GAAA,cAAc,OAAW"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LitActionConfig } from "./lit-action-config.i";
|
|
2
|
+
/**
|
|
3
|
+
* Diamond Hands LIT Actions Registry Interface
|
|
4
|
+
* Defines all available LIT Actions in the system
|
|
5
|
+
*/
|
|
6
|
+
export interface DiamondHandsLitActions {
|
|
7
|
+
/** Dummy authorization action for testing and milestone 1 */
|
|
8
|
+
authorizationDummy: LitActionConfig;
|
|
9
|
+
/** Second dummy authorization action for testing failed authorization scenarios */
|
|
10
|
+
authorizationDummyB: LitActionConfig;
|
|
11
|
+
/** PKP Validator action for production PKP validation */
|
|
12
|
+
pkpValidator: LitActionConfig;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Utility type for LIT Action names
|
|
16
|
+
*/
|
|
17
|
+
export type LitActionName = keyof DiamondHandsLitActions;
|
|
18
|
+
//# sourceMappingURL=diamond-hands-lit-actions.i.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diamond-hands-lit-actions.i.d.ts","sourceRoot":"","sources":["../../../pkg-src/interfaces/chunks/diamond-hands-lit-actions.i.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,6DAA6D;IAC7D,kBAAkB,EAAE,eAAe,CAAC;IACpC,mFAAmF;IACnF,mBAAmB,EAAE,eAAe,CAAC;IACrC,yDAAyD;IACzD,YAAY,EAAE,eAAe,CAAC;CAK/B;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diamond-hands-lit-actions.i.js","sourceRoot":"","sources":["../../../pkg-src/interfaces/chunks/diamond-hands-lit-actions.i.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PKPInfo } from "./pkp-info.i";
|
|
2
|
+
/**
|
|
3
|
+
* LIT Action Configuration Interface
|
|
4
|
+
* Defines the structure for deployed LIT Actions
|
|
5
|
+
*/
|
|
6
|
+
export interface LitActionConfig {
|
|
7
|
+
/** IPFS CID where the LIT Action is deployed */
|
|
8
|
+
cid: string;
|
|
9
|
+
/** CID in v0 format (Qm...) if available */
|
|
10
|
+
cidV0?: string;
|
|
11
|
+
/** CID in v1 format (bafkrei...) if available */
|
|
12
|
+
cidV1?: string;
|
|
13
|
+
/** CID in hex format for contract authorization */
|
|
14
|
+
authorizedCidHex: string;
|
|
15
|
+
/** Human-readable name of the LIT Action */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Description of what the LIT Action does */
|
|
18
|
+
description: string;
|
|
19
|
+
/** Version of the LIT Action */
|
|
20
|
+
version: string;
|
|
21
|
+
/** Whether the action is deployed and ready to use */
|
|
22
|
+
deployed: boolean;
|
|
23
|
+
/** Timestamp when the action was deployed */
|
|
24
|
+
deployedAt?: number;
|
|
25
|
+
/** Size of the minified action in bytes */
|
|
26
|
+
size?: number;
|
|
27
|
+
/** SHA256 hash of the minified action for verification */
|
|
28
|
+
hash?: string;
|
|
29
|
+
/** Production PKP information for this LIT Action (if applicable) */
|
|
30
|
+
pkp?: PKPInfo;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=lit-action-config.i.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-action-config.i.d.ts","sourceRoot":"","sources":["../../../pkg-src/interfaces/chunks/lit-action-config.i.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,gBAAgB,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,QAAQ,EAAE,OAAO,CAAC;IAClB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,GAAG,CAAC,EAAE,OAAO,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-action-config.i.js","sourceRoot":"","sources":["../../../pkg-src/interfaces/chunks/lit-action-config.i.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-action-name.i.d.ts","sourceRoot":"","sources":["../../../pkg-src/interfaces/chunks/lit-action-name.i.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-action-name.i.js","sourceRoot":"","sources":["../../../pkg-src/interfaces/chunks/lit-action-name.i.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DiamondHandsLitActions } from "./diamond-hands-lit-actions.i";
|
|
2
|
+
/**
|
|
3
|
+
* LIT Action Registry Metadata
|
|
4
|
+
*/
|
|
5
|
+
export interface LitActionRegistry {
|
|
6
|
+
/** Package name */
|
|
7
|
+
packageName: string;
|
|
8
|
+
/** Package version */
|
|
9
|
+
packageVersion: string;
|
|
10
|
+
/** Registry build timestamp */
|
|
11
|
+
buildTime: number;
|
|
12
|
+
/** Total number of deployed actions */
|
|
13
|
+
totalActions: number;
|
|
14
|
+
/** All available LIT Actions */
|
|
15
|
+
actions: DiamondHandsLitActions;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=lit-action-registry.i.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-action-registry.i.d.ts","sourceRoot":"","sources":["../../../pkg-src/interfaces/chunks/lit-action-registry.i.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,OAAO,EAAE,sBAAsB,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-action-registry.i.js","sourceRoot":"","sources":["../../../pkg-src/interfaces/chunks/lit-action-registry.i.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PKP Information Interface
|
|
3
|
+
* Contains production PKP data for LIT Action validation
|
|
4
|
+
*/
|
|
5
|
+
export interface PKPInfo {
|
|
6
|
+
/** PKP Token ID */
|
|
7
|
+
tokenId: string;
|
|
8
|
+
/** PKP Public Key */
|
|
9
|
+
publicKey: string;
|
|
10
|
+
/** PKP Ethereum Address */
|
|
11
|
+
ethAddress: string;
|
|
12
|
+
/** Transaction hash where PKP was minted */
|
|
13
|
+
mintTxHash: string;
|
|
14
|
+
/** Transaction hash where PKP was authorized */
|
|
15
|
+
authTxHash: string;
|
|
16
|
+
/** Transaction hash where PKP was burned/made immutable */
|
|
17
|
+
burnTxHash: string;
|
|
18
|
+
/** Whether PKP is immutable (transferred to burn address) */
|
|
19
|
+
immutable: boolean;
|
|
20
|
+
/** CID that the PKP was authorized for (hex format) */
|
|
21
|
+
authorizedCidHex: string;
|
|
22
|
+
/** Timestamp when PKP was created */
|
|
23
|
+
createdAt: number;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=pkp-info.i.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pkp-info.i.d.ts","sourceRoot":"","sources":["../../../pkg-src/interfaces/chunks/pkp-info.i.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,SAAS,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,gBAAgB,EAAE,MAAM,CAAC;IACzB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pkp-info.i.js","sourceRoot":"","sources":["../../../pkg-src/interfaces/chunks/pkp-info.i.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diamond Hands LIT Actions Interfaces
|
|
3
|
+
* All TypeScript interfaces and types used in the package
|
|
4
|
+
*/
|
|
5
|
+
export * from "./chunks/pkp-info.i";
|
|
6
|
+
export * from "./chunks/lit-action-config.i";
|
|
7
|
+
export * from "./chunks/diamond-hands-lit-actions.i";
|
|
8
|
+
export * from "./chunks/lit-action-registry.i";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../pkg-src/interfaces/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Diamond Hands LIT Actions Interfaces
|
|
4
|
+
* All TypeScript interfaces and types used in the package
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
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);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../pkg-src/interfaces/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;AAEH,sDAAoC;AACpC,+DAA6C;AAC7C,uEAAqD;AACrD,iEAA+C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cid-utils.d.ts","sourceRoot":"","sources":["../../../pkg-src/utils/chunks/cid-utils.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAqB5C"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.cidToHex = cidToHex;
|
|
7
|
+
const bs58_1 = __importDefault(require("bs58"));
|
|
8
|
+
/**
|
|
9
|
+
* Convert IPFS CID from base58 to hex format for contract authorization
|
|
10
|
+
* This matches the format expected by LIT Protocol smart contracts
|
|
11
|
+
*/
|
|
12
|
+
function cidToHex(cid) {
|
|
13
|
+
try {
|
|
14
|
+
if (cid.startsWith("Qm")) {
|
|
15
|
+
// v0 CID - convert base58 to hex
|
|
16
|
+
const bytes = bs58_1.default.decode(cid);
|
|
17
|
+
return "0x" + Buffer.from(bytes).toString("hex");
|
|
18
|
+
}
|
|
19
|
+
else if (cid.startsWith("0x")) {
|
|
20
|
+
// Already in hex format
|
|
21
|
+
return cid;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
// Unknown format - FAIL FAST
|
|
25
|
+
throw new Error(`Unsupported CID format: ${cid}. Only CIDv0 (Qm...) and hex (0x...) formats are supported.`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (error instanceof Error && error.message.includes('Unsupported CID format')) {
|
|
30
|
+
// Re-throw our own errors
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
// bs58 decode or other conversion errors
|
|
34
|
+
throw new Error(`Failed to convert CID ${cid} to hex: ${error instanceof Error ? error.message : String(error)}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=cid-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cid-utils.js","sourceRoot":"","sources":["../../../pkg-src/utils/chunks/cid-utils.ts"],"names":[],"mappings":";;;;;AAMA,4BAqBC;AA3BD,gDAAwB;AAExB;;;GAGG;AACH,SAAgB,QAAQ,CAAC,GAAW;IAClC,IAAI,CAAC;QACH,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,iCAAiC;YACjC,MAAM,KAAK,GAAG,cAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC/B,OAAO,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnD,CAAC;aAAM,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,wBAAwB;YACxB,OAAO,GAAG,CAAC;QACb,CAAC;aAAM,CAAC;YACN,6BAA6B;YAC7B,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,6DAA6D,CAAC,CAAC;QAC/G,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,CAAC;YAC/E,0BAA0B;YAC1B,MAAM,KAAK,CAAC;QACd,CAAC;QACD,yCAAyC;QACzC,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,YAAY,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACpH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { LitActionConfig, LitActionName } from "../../interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* Get LIT Action CID by name
|
|
4
|
+
* @param actionName - Name of the LIT Action
|
|
5
|
+
* @returns IPFS CID of the deployed action
|
|
6
|
+
* @throws Error if action is not deployed
|
|
7
|
+
*/
|
|
8
|
+
export declare function getLitActionCID(actionName: LitActionName): string;
|
|
9
|
+
/**
|
|
10
|
+
* Get LIT Action configuration by name
|
|
11
|
+
* @param actionName - Name of the LIT Action
|
|
12
|
+
* @returns Complete LIT Action configuration
|
|
13
|
+
*/
|
|
14
|
+
export declare function getLitActionConfig(actionName: LitActionName): LitActionConfig;
|
|
15
|
+
/**
|
|
16
|
+
* Check if a LIT Action is deployed and ready to use
|
|
17
|
+
* @param actionName - Name of the LIT Action
|
|
18
|
+
* @returns True if deployed, false otherwise
|
|
19
|
+
*/
|
|
20
|
+
export declare function isLitActionDeployed(actionName: LitActionName): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Validate that all required actions are deployed
|
|
23
|
+
* @param requiredActions - Array of required action names
|
|
24
|
+
* @returns True if all actions are deployed
|
|
25
|
+
*/
|
|
26
|
+
export declare function validateDeployedActions(requiredActions: LitActionName[]): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Get all deployed LIT Actions
|
|
29
|
+
* @returns Array of deployed LIT Action configurations
|
|
30
|
+
*/
|
|
31
|
+
export declare function getDeployedActions(): LitActionConfig[];
|
|
32
|
+
//# sourceMappingURL=lit-action-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-action-helpers.d.ts","sourceRoot":"","sources":["../../../pkg-src/utils/chunks/lit-action-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGlE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,aAAa,GAAG,MAAM,CAQjE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,aAAa,GAAG,eAAe,CAM7E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,aAAa,GAAG,OAAO,CAGtE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,aAAa,EAAE,GAC/B,OAAO,CAET;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,EAAE,CAEtD"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLitActionCID = getLitActionCID;
|
|
4
|
+
exports.getLitActionConfig = getLitActionConfig;
|
|
5
|
+
exports.isLitActionDeployed = isLitActionDeployed;
|
|
6
|
+
exports.validateDeployedActions = validateDeployedActions;
|
|
7
|
+
exports.getDeployedActions = getDeployedActions;
|
|
8
|
+
const constants_1 = require("../../constants");
|
|
9
|
+
/**
|
|
10
|
+
* Get LIT Action CID by name
|
|
11
|
+
* @param actionName - Name of the LIT Action
|
|
12
|
+
* @returns IPFS CID of the deployed action
|
|
13
|
+
* @throws Error if action is not deployed
|
|
14
|
+
*/
|
|
15
|
+
function getLitActionCID(actionName) {
|
|
16
|
+
const action = constants_1.DH_LIT_ACTIONS[actionName];
|
|
17
|
+
if (!action.deployed || !action.cid) {
|
|
18
|
+
throw new Error(`LIT Action '${actionName}' not deployed. Check deployment status.`);
|
|
19
|
+
}
|
|
20
|
+
return action.cid;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get LIT Action configuration by name
|
|
24
|
+
* @param actionName - Name of the LIT Action
|
|
25
|
+
* @returns Complete LIT Action configuration
|
|
26
|
+
*/
|
|
27
|
+
function getLitActionConfig(actionName) {
|
|
28
|
+
const action = constants_1.DH_LIT_ACTIONS[actionName];
|
|
29
|
+
if (!action) {
|
|
30
|
+
throw new Error(`LIT Action '${actionName}' not found in registry.`);
|
|
31
|
+
}
|
|
32
|
+
return action;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Check if a LIT Action is deployed and ready to use
|
|
36
|
+
* @param actionName - Name of the LIT Action
|
|
37
|
+
* @returns True if deployed, false otherwise
|
|
38
|
+
*/
|
|
39
|
+
function isLitActionDeployed(actionName) {
|
|
40
|
+
const action = constants_1.DH_LIT_ACTIONS[actionName];
|
|
41
|
+
return action && action.deployed && !!action.cid;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Validate that all required actions are deployed
|
|
45
|
+
* @param requiredActions - Array of required action names
|
|
46
|
+
* @returns True if all actions are deployed
|
|
47
|
+
*/
|
|
48
|
+
function validateDeployedActions(requiredActions) {
|
|
49
|
+
return requiredActions.every((actionName) => isLitActionDeployed(actionName));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get all deployed LIT Actions
|
|
53
|
+
* @returns Array of deployed LIT Action configurations
|
|
54
|
+
*/
|
|
55
|
+
function getDeployedActions() {
|
|
56
|
+
return Object.values(constants_1.DH_LIT_ACTIONS).filter((action) => action.deployed);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=lit-action-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lit-action-helpers.js","sourceRoot":"","sources":["../../../pkg-src/utils/chunks/lit-action-helpers.ts"],"names":[],"mappings":";;AASA,0CAQC;AAOD,gDAMC;AAOD,kDAGC;AAOD,0DAIC;AAMD,gDAEC;AA1DD,+CAAiD;AAEjD;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,UAAyB;IACvD,MAAM,MAAM,GAAG,0BAAc,CAAC,UAAU,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CACb,eAAe,UAAU,0CAA0C,CACpE,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,GAAG,CAAC;AACpB,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,UAAyB;IAC1D,MAAM,MAAM,GAAG,0BAAc,CAAC,UAAU,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,eAAe,UAAU,0BAA0B,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,UAAyB;IAC3D,MAAM,MAAM,GAAG,0BAAc,CAAC,UAAU,CAAC,CAAC;IAC1C,OAAO,MAAM,IAAI,MAAM,CAAC,QAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;AACnD,CAAC;AAED;;;;GAIG;AACH,SAAgB,uBAAuB,CACrC,eAAgC;IAEhC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAC;AAChF,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB;IAChC,OAAO,MAAM,CAAC,MAAM,CAAC,0BAAc,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the complete setup for PKP Validator testing
|
|
3
|
+
* Returns both the LIT Action config and its associated PKP
|
|
4
|
+
*/
|
|
5
|
+
export declare function getPKPValidatorSetup(): {
|
|
6
|
+
litAction: import("../..").LitActionConfig;
|
|
7
|
+
pkp: import("../..").PKPInfo;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=pkp-setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pkp-setup.d.ts","sourceRoot":"","sources":["../../../pkg-src/utils/chunks/pkp-setup.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,oBAAoB;;;EAKnC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPKPValidatorSetup = getPKPValidatorSetup;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
/**
|
|
6
|
+
* Get the complete setup for PKP Validator testing
|
|
7
|
+
* Returns both the LIT Action config and its associated PKP
|
|
8
|
+
*/
|
|
9
|
+
function getPKPValidatorSetup() {
|
|
10
|
+
return {
|
|
11
|
+
litAction: constants_1.DH_LIT_ACTIONS.pkpValidator,
|
|
12
|
+
pkp: constants_1.DH_LIT_ACTIONS.pkpValidator.pkp,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=pkp-setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pkp-setup.js","sourceRoot":"","sources":["../../../pkg-src/utils/chunks/pkp-setup.ts"],"names":[],"mappings":";;AAMA,oDAKC;AAXD,+CAAiD;AAEjD;;;GAGG;AACH,SAAgB,oBAAoB;IAClC,OAAO;QACL,SAAS,EAAE,0BAAc,CAAC,YAAY;QACtC,GAAG,EAAE,0BAAc,CAAC,YAAY,CAAC,GAAI;KACtC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diamond Hands LIT Actions Utilities
|
|
3
|
+
* All utility functions for working with deployed LIT Actions
|
|
4
|
+
*/
|
|
5
|
+
export * from "./chunks/lit-action-helpers";
|
|
6
|
+
export * from "./chunks/pkp-setup";
|
|
7
|
+
export * from "./chunks/cid-utils";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../pkg-src/utils/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Diamond Hands LIT Actions Utilities
|
|
4
|
+
* All utility functions for working with deployed LIT Actions
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
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
|
+
//# 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"}
|