Skip to content

Commit

Permalink
simplify prettier setup (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
lenkan authored Mar 1, 2024
1 parent 6574f30 commit e2b2f6e
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 64 deletions.
6 changes: 2 additions & 4 deletions .jsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"includePattern": ".ts$",
"excludePattern": "(node_modules/|docs|dist|examples|test)"
},
"plugins": [
"plugins/markdown"
],
"plugins": ["plugins/markdown"],
"templates": {
"cleverLinks": false,
"monospaceLinks": true,
Expand All @@ -24,4 +22,4 @@
"recurse": true,
"template": "./node_modules/minami"
}
}
}
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
diagrams/
docs/
package.json
package-lock.json
.github/
12 changes: 6 additions & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 4
}
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 4
}
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Project Name: signify-ts

## Signify - KERI Signing at the Edge

Of the five functions in a KERI agent,
Of the five functions in a KERI agent,

1. Key generation
2. Encrypted key storage
Expand All @@ -19,20 +19,18 @@ Of the five functions in a KERI agent,

Signify-TS splits off two, key generation and event signing into a TypeScript library to provide "signing at the edge".
It accomplishes this by using [libsodium](https://doc.libsodium.org/) to generate ed25519 key pairs for signing and x25519 key pairs for encrypting the
private keys, next public keys and salts used to generate the private keys. The encrypted private key and salts are then stored on a
remote cloud agent that never has access to the decryption keys. New key pair sets (current and next) will be generated
private keys, next public keys and salts used to generate the private keys. The encrypted private key and salts are then stored on a
remote cloud agent that never has access to the decryption keys. New key pair sets (current and next) will be generated
for inception and rotation events with only the public keys and blake3 hash of the next keys made available to the agent.

The communication protocol between a Signify client and [KERI](https://github.com/WebOfTrust/keri) agent will encode all cryptographic primitives as CESR base64
encoded strings for the initial implementation. Support for binary CESR can be added in the future.

encoded strings for the initial implementation. Support for binary CESR can be added in the future.

### Environment Setup

The code is built using Typescript and running code locally requires a Mac or Linux OS.

- Install [Node.js](https://nodejs.org)

- Install [Node.js](https://nodejs.org)

- Install dependencies:
```bash
Expand Down Expand Up @@ -117,5 +115,4 @@ Account Creation Workflow

![Account Creation](/diagrams/account-creation-workflow.png)


![Account Creation Webpage](/diagrams/account-creation-webpage-workflow.png)
18 changes: 9 additions & 9 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
coverage:
status:
project:
default:
target: 55
paths: ["src"]
patch:
default:
target: 75
paths: ["src"]
status:
project:
default:
target: 55
paths: ['src']
patch:
default:
target: 75
paths: ['src']
20 changes: 9 additions & 11 deletions config/keria.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{
"dt": "2023-12-01T10:05:25.062609+00:00",
"keria": {
"dt": "2023-12-01T10:05:25.062609+00:00",
"curls": [
"http://keria:3902/"
]
"dt": "2023-12-01T10:05:25.062609+00:00",
"curls": ["http://keria:3902/"]
},
"iurls": [
"http://witness-demo:5642/oobi/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha/controller",
"http://witness-demo:5643/oobi/BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM/controller",
"http://witness-demo:5644/oobi/BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX/controller",
"http://witness-demo:5645/oobi/BM35JN8XeJSEfpxopjn5jr7tAHCE5749f0OobhMLCorE/controller",
"http://witness-demo:5646/oobi/BIj15u5V11bkbtAxMA7gcNJZcax-7TgaBMLsQnMHpYHP/controller",
"http://witness-demo:5647/oobi/BF2rZTW79z4IXocYRQnjjsOuvFUQv-ptCf8Yltd7PfsM/controller"
"http://witness-demo:5642/oobi/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha/controller",
"http://witness-demo:5643/oobi/BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM/controller",
"http://witness-demo:5644/oobi/BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX/controller",
"http://witness-demo:5645/oobi/BM35JN8XeJSEfpxopjn5jr7tAHCE5749f0OobhMLCorE/controller",
"http://witness-demo:5646/oobi/BIj15u5V11bkbtAxMA7gcNJZcax-7TgaBMLsQnMHpYHP/controller",
"http://witness-demo:5647/oobi/BF2rZTW79z4IXocYRQnjjsOuvFUQv-ptCf8Yltd7PfsM/controller"
]
}
}
12 changes: 6 additions & 6 deletions examples/integration-scripts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extends": "../../tsconfig.node.json",
"compilerOptions": {
"noEmit": true,
"paths": {
"signify-ts": ["../../src"]
"extends": "../../tsconfig.node.json",
"compilerOptions": {
"noEmit": true,
"paths": {
"signify-ts": ["../../src"]
}
}
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"lint": "npx eslint src test examples/integration-scripts",
"prepare": "npm run build",
"generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose",
"pretty": "prettier --config .prettierrc 'src/**/*.ts' 'test/**/*.ts' 'examples/**/*.ts' --write",
"pretty:check": "prettier --config .prettierrc 'src/**/*.ts' 'test/**/*.ts' 'examples/**/*.ts' --check"
"pretty": "prettier --write .",
"pretty:check": "prettier --check ."
},
"name": "signify-ts",
"author": "Phil Feairheller",
Expand Down
12 changes: 6 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"include": ["src", "types", "test", "examples/integration-scripts"],
"extends": "./tsconfig.node.json",
"compilerOptions": {
"noEmit": true,
"allowImportingTsExtensions": true
}
"include": ["src", "types", "test", "examples/integration-scripts"],
"extends": "./tsconfig.node.json",
"compilerOptions": {
"noEmit": true,
"allowImportingTsExtensions": true
}
}
22 changes: 11 additions & 11 deletions tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"lib": ["dom", "esnext"],
"moduleResolution": "node",
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
}
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"lib": ["dom", "esnext"],
"moduleResolution": "node",
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
}
}
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
declare module 'ecdsa-secp256r1';
declare module 'ecdsa-secp256r1';

0 comments on commit e2b2f6e

Please sign in to comment.