Skip to content

Commit

Permalink
feat: Use threads for jws verification
Browse files Browse the repository at this point in the history
Exposes necessary functionality to use threads for jws verification.
  • Loading branch information
dbcfd committed Oct 27, 2023
1 parent e4b0bbc commit 6209bc5
Show file tree
Hide file tree
Showing 10 changed files with 410 additions and 194 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'pnpm'

- name: Install dependencies and build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x', '18.x', '20.x']
node: ['20.x']
os: [ubuntu-latest, macOS-latest]

steps:
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node }}
cache: 'pnpm'

- name: Install dependencies and build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'pnpm'

- name: Install dependencies and build
Expand Down
2 changes: 1 addition & 1 deletion packages/cacao/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"devDependencies": {
"@types/luxon": "^3.3.0",
"@types/node": "^20.2.3",
"@types/node": "^20.8.0",
"luxon": "^3.3.0"
}
}
4 changes: 2 additions & 2 deletions packages/codecs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dist"
],
"engines": {
"node": ">=14.14"
"node": ">=20.8"
},
"sideEffects": false,
"scripts": {
Expand Down Expand Up @@ -45,7 +45,7 @@
},
"homepage": "https://github.com/ceramicnetwork/js-did#readme",
"dependencies": {
"codeco": "^1.1.0",
"codeco": "^1.2.0",
"multiformats": "^11.0.1",
"uint8arrays": "^4.0.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/did-session/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export class DIDSession {
*/
static async hasSessionFor(account: AccountId, resources: Array<string>): Promise<boolean> {
const store = await SessionStore.create()
const { cacao } = (await store.get(account)) || {} as { cacao: Cacao }
const { cacao } = (await store.get(account)) || ({} as { cacao: Cacao })
return cacao && cacaoContainsResources(cacao, resources)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/did-session/src/sessionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class SessionStore {

static async create(): Promise<SessionStore> {
if (typeof globalThis.indexedDB === 'undefined') {
throw new Error('SessionStore is only supported in the browser')
throw new Error('SessionStore is only supported in the browser')
}
const request = indexedDB.open('did-session', 1)
request.onupgradeneeded = (event: IDBVersionChangeEvent) => {
Expand Down
Loading

0 comments on commit 6209bc5

Please sign in to comment.