Skip to content

Commit a3e92d5

Browse files
feat(auth): LIT-4211 - Initial stub for lit-client package structure
1 parent 5c8dd30 commit a3e92d5

File tree

15 files changed

+175
-0
lines changed

15 files changed

+175
-0
lines changed

packages/lit-client/.babelrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"presets": [
3+
[
4+
"@nx/web/babel",
5+
{
6+
"useBuiltIns": "usage"
7+
}
8+
]
9+
]
10+
}

packages/lit-client/.eslintrc.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
}
17+
]
18+
}

packages/lit-client/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Quick Start
2+
3+
This package contains the main API layer for interacting with LIT network nodes and the LIT blockchain.
4+
5+
### node.js / browser
6+
7+
```
8+
yarn add @lit-protocol/lit-client
9+
```

packages/lit-client/index.ts

Whitespace-only changes.

packages/lit-client/jest.config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* eslint-disable */
2+
export default {
3+
displayName: 'lit-client',
4+
preset: '../../jest.preset.js',
5+
globals: {
6+
'ts-jest': {
7+
tsconfig: '<rootDir>/tsconfig.spec.json',
8+
},
9+
},
10+
transform: {
11+
'^.+\\.[t]s$': 'ts-jest',
12+
},
13+
moduleFileExtensions: ['ts', 'js', 'html'],
14+
coverageDirectory: '../../coverage/packages/lit-client',
15+
setupFilesAfterEnv: ['../../jest.setup.js'],
16+
};

packages/lit-client/package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "@lit-protocol/lit-client",
3+
"license": "MIT",
4+
"homepage": "https://github.com/Lit-Protocol/js-sdk",
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/LIT-Protocol/js-sdk"
8+
},
9+
"keywords": [
10+
"library"
11+
],
12+
"bugs": {
13+
"url": "https://github.com/LIT-Protocol/js-sdk/issues"
14+
},
15+
"type": "commonjs",
16+
"publishConfig": {
17+
"access": "public",
18+
"directory": "../../dist/packages/lit-client"
19+
},
20+
"gitHead": "0d7334c2c55f448e91fe32f29edc5db8f5e09e4b",
21+
"tags": [
22+
"universal"
23+
],
24+
"version": "8.0.0-alpha.0",
25+
"main": "./dist/src/index.js",
26+
"typings": "./dist/src/index.d.ts"
27+
}

packages/lit-client/project.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "lit-client",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"sourceRoot": "packages/lit-client/src",
5+
"projectType": "library",
6+
"targets": {
7+
"build": {
8+
"executor": "@nx/js:tsc",
9+
"outputs": ["{options.outputPath}"],
10+
"options": {
11+
"outputPath": "dist/packages/lit-client",
12+
"main": "packages/lit-client/src/index.ts",
13+
"tsConfig": "packages/lit-client/tsconfig.lib.json",
14+
"assets": ["packages/lit-client/*.md"],
15+
"updateBuildableProjectDepsInPackageJson": true
16+
}
17+
},
18+
"lint": {
19+
"executor": "@nx/linter:eslint",
20+
"outputs": ["{options.outputFile}"],
21+
"options": {
22+
"lintFilePatterns": ["packages/lit-client/**/*.ts"]
23+
}
24+
},
25+
"test": {
26+
"executor": "@nx/jest:jest",
27+
"outputs": ["{workspaceRoot}/coverage/packages/lit-client"],
28+
"options": {
29+
"jestConfig": "packages/lit-client/jest.config.ts",
30+
"passWithNoTests": true
31+
}
32+
}
33+
},
34+
"tags": []
35+
}

packages/lit-client/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Export our top-level consumer API and types for consumers of the entire lit-client package
2+
// export `getLitClient({network, authManager, options? })` => { ...api }
3+
4+
export {};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// This folder will contain the modules that 'glue together' chain and lit-node-specific behaviours into our top-level `lit-client` interface
2+
3+
export {};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Define behaviours / methods / modules that are entirely specific to interacting with LIT blockchains
2+
// These should be 'thin' methods that basically orchestrate a provided `LitNetwork` + params, and use an internal `LitChainClient` to do what is required
3+
4+
export {};

0 commit comments

Comments
 (0)