Skip to content

Commit

Permalink
replace with own prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Mollik <[email protected]>
  • Loading branch information
cre8 committed Feb 21, 2024
1 parent edb6bbb commit 79373aa
Show file tree
Hide file tree
Showing 55 changed files with 4,289 additions and 1,634 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-test-publish-on-push-cached.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ jobs:
- test
# - lint
env:
NPM_TOKEN: ${{secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN }}
GH_TOKEN: ${{secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
GH_USER: github-actions
Expand Down Expand Up @@ -154,9 +154,9 @@ jobs:
- name: 'Setup npm registry'
run: |
echo "@hopae:registry=https://npm.pkg.github.com/" > .npmrc
echo "registry=https://npm.pkg.github.com/" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=$NPM_TOKEN" >> .npmrc
echo "@bcrl:registry=https://registry.npmjs.org/" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
- name: 'Publish @latest when on main'
Expand Down
4 changes: 2 additions & 2 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

| Maintainer | GitHub ID | LFID | Email | Chat ID | Company Affiliation | Scope |
| ----------------- | ---------------- | --------- | --------------------- | ----------- | ------------------- | --------- |
| Ace | pensivej | - | Ace@hopae.io | Ace | Hopae Inc. | sd-jwt-js |
| Gavin | zustkeeper | - | Gavin@hopae.io | Gavin | Hopae Inc. | sd-jwt-js |
| Ace | pensivej | - | Ace@bcrl.io | Ace | Hopae Inc. | sd-jwt-js |
| Gavin | zustkeeper | - | Gavin@bcrl.io | Gavin | Hopae Inc. | sd-jwt-js |
| Lukas | lukasjhan | Lukas.Han | [email protected] | lukas.j.han | Hopae Inc. | sd-jwt-js |
| Berend Sliedrecht | berendsliedrecht | beri14 | [email protected] | - | Animo Solutions | sd-jwt-js |

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ By adhering to these design principles, "Selective Disclosure for JWT" aims to s
To install this project, run the following command:

```bash
npm install @hopae/sd-jwt
npm install @bcrl/sd-jwt
```

Ensure you have Node.js installed as a prerequisite.
Expand All @@ -53,7 +53,7 @@ Ensure you have Node.js installed as a prerequisite.
Here's a basic example of how to use this library:

```jsx
import sdjwt, { DisclosureFrame } from '@hopae/sd-jwt';
import sdjwt, { DisclosureFrame } from '@bcrl/sd-jwt';

// Issuer defines the claims object with the user's information
const claims = {
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h2 class="text-2xl font-bold mb-4">Installation</h2>
</p>
<p class="mb-4">
<div class="bg-gray-800 text-blue-200 font-mono text-sm p-4 rounded-lg overflow-x-auto my-6">
<pre>$ npm install @hopae/sd-jwt</pre>
<pre>$ npm install @bcrl/sd-jwt</pre>
</div>
</p>
<div class="flex justify-center items-center gap-4 pb-6">
Expand Down
4 changes: 2 additions & 2 deletions examples/core-example/all.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SDJwtInstance } from '@hopae/sd-jwt-core';
import { DisclosureFrame } from '@hopae/sd-jwt-type';
import { SDJwtInstance } from '@bcrl/sd-jwt-core';
import { DisclosureFrame } from '@bcrl/sd-jwt-type';
import { createSignerVerifier, digest, generateSalt } from './utils';

(async () => {
Expand Down
4 changes: 2 additions & 2 deletions examples/core-example/basic.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SDJwtInstance } from '@hopae/sd-jwt-core';
import { DisclosureFrame } from '@hopae/sd-jwt-type';
import { SDJwtInstance } from '@bcrl/sd-jwt-core';
import { DisclosureFrame } from '@bcrl/sd-jwt-type';
import { createSignerVerifier, digest, generateSalt } from './utils';

(async () => {
Expand Down
4 changes: 2 additions & 2 deletions examples/core-example/custom.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SDJwtInstance } from '@hopae/sd-jwt-core';
import { DisclosureFrame } from '@hopae/sd-jwt-type';
import { SDJwtInstance } from '@bcrl/sd-jwt-core';
import { DisclosureFrame } from '@bcrl/sd-jwt-type';
import { createSignerVerifier, digest, generateSalt } from './utils';

(async () => {
Expand Down
4 changes: 2 additions & 2 deletions examples/core-example/custom_header.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SDJwtInstance } from '@hopae/sd-jwt-core';
import { DisclosureFrame } from '@hopae/sd-jwt-type';
import { SDJwtInstance } from '@bcrl/sd-jwt-core';
import { DisclosureFrame } from '@bcrl/sd-jwt-type';
import { createSignerVerifier, digest, generateSalt } from './utils';

(async () => {
Expand Down
2 changes: 1 addition & 1 deletion examples/core-example/decode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SDJwtInstance } from '@hopae/sd-jwt-core';
import { SDJwtInstance } from '@bcrl/sd-jwt-core';
import { createSignerVerifier, digest, generateSalt } from './utils';

(async () => {
Expand Down
4 changes: 2 additions & 2 deletions examples/core-example/decoy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SDJwtInstance } from '@hopae/sd-jwt-core';
import { DisclosureFrame } from '@hopae/sd-jwt-type';
import { SDJwtInstance } from '@bcrl/sd-jwt-core';
import { DisclosureFrame } from '@bcrl/sd-jwt-type';
import { createSignerVerifier, digest, generateSalt } from './utils';

(async () => {
Expand Down
4 changes: 2 additions & 2 deletions examples/core-example/kb.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SDJwtInstance } from '@hopae/sd-jwt-core';
import { DisclosureFrame } from '@hopae/sd-jwt-type';
import { SDJwtInstance } from '@bcrl/sd-jwt-core';
import { DisclosureFrame } from '@bcrl/sd-jwt-type';
import { createSignerVerifier, digest, generateSalt } from './utils';

(async () => {
Expand Down
4 changes: 2 additions & 2 deletions examples/core-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@hopae/sd-jwt-core": "workspace:*",
"@hopae/sd-jwt-type": "workspace:*"
"@bcrl/sd-jwt-core": "workspace:*",
"@bcrl/sd-jwt-type": "workspace:*"
}
}
4 changes: 2 additions & 2 deletions examples/core-example/sdjwtobject.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SDJwtInstance } from '@hopae/sd-jwt-core';
import { DisclosureFrame } from '@hopae/sd-jwt-type';
import { SDJwtInstance } from '@bcrl/sd-jwt-core';
import { DisclosureFrame } from '@bcrl/sd-jwt-type';
import { createSignerVerifier, digest, generateSalt } from './utils';

(async () => {
Expand Down
2 changes: 1 addition & 1 deletion examples/core-example/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Crypto from 'crypto';
import { Signer, Verifier } from '@hopae/sd-jwt-type';
import { Signer, Verifier } from '@bcrl/sd-jwt-type';

export const createSignerVerifier = () => {
const { privateKey, publicKey } = Crypto.generateKeyPairSync('ed25519');
Expand Down
4 changes: 2 additions & 2 deletions examples/decode-example/decode.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { decodeSdJwt, getClaims } from '@hopae/sd-jwt-decode';
import { digest } from '@hopae/sd-jwt-node-crypto';
import { decodeSdJwt, getClaims } from '@bcrl/sd-jwt-decode';
import { digest } from '@bcrl/sd-jwt-node-crypto';

(async () => {
const sdjwt =
Expand Down
6 changes: 3 additions & 3 deletions examples/decode-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@hopae/sd-jwt-decode": "workspace:*",
"@hopae/sd-jwt-type": "workspace:*",
"@hopae/sd-jwt-node-crypto": "workspace:*"
"@bcrl/sd-jwt-decode": "workspace:*",
"@bcrl/sd-jwt-type": "workspace:*",
"@bcrl/sd-jwt-node-crypto": "workspace:*"
}
}
8 changes: 4 additions & 4 deletions examples/present-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@hopae/sd-jwt-present": "workspace:*",
"@hopae/sd-jwt-decode": "workspace:*",
"@hopae/sd-jwt-type": "workspace:*",
"@hopae/sd-jwt-node-crypto": "workspace:*"
"@bcrl/sd-jwt-present": "workspace:*",
"@bcrl/sd-jwt-decode": "workspace:*",
"@bcrl/sd-jwt-type": "workspace:*",
"@bcrl/sd-jwt-node-crypto": "workspace:*"
}
}
6 changes: 3 additions & 3 deletions examples/present-example/present.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { present, presentableKeys } from '@hopae/sd-jwt-present';
import { decodeSdJwt, getClaims } from '@hopae/sd-jwt-decode';
import { digest } from '@hopae/sd-jwt-node-crypto';
import { present, presentableKeys } from '@bcrl/sd-jwt-present';
import { decodeSdJwt, getClaims } from '@bcrl/sd-jwt-decode';
import { digest } from '@bcrl/sd-jwt-node-crypto';

(async () => {
const sdjwt =
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@hopae/sd-jwt",
"name": "@bcrl/sd-jwt",
"version": "2.0.1",
"description": "sd-jwt draft 7 implementation in typescript",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/broswer-crypto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

## [2.0.3](https://github.com/openwallet-foundation-labs/sd-jwt-js/compare/v2.0.2...v2.0.3) (2024-02-20)

**Note:** Version bump only for package @hopae/sd-jwt-browser-crypto
**Note:** Version bump only for package @bcrl/sd-jwt-browser-crypto
2 changes: 1 addition & 1 deletion packages/broswer-crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@hopae/sd-jwt-browser-crypto",
"name": "@bcrl/sd-jwt-browser-crypto",
"version": "2.0.3",
"description": "sd-jwt draft 7 implementation in typescript",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

## [2.0.3](https://github.com/openwallet-foundation-labs/sd-jwt-js/compare/v2.0.2...v2.0.3) (2024-02-20)

**Note:** Version bump only for package @hopae/sd-jwt-core
**Note:** Version bump only for package @bcrl/sd-jwt-core
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@hopae/sd-jwt-core",
"name": "@bcrl/sd-jwt-core",
"version": "2.0.3",
"description": "sd-jwt draft 7 implementation in typescript",
"main": "dist/index.js",
Expand Down Expand Up @@ -36,12 +36,12 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@hopae/sd-jwt-node-crypto": "2.0.3"
"@bcrl/sd-jwt-node-crypto": "2.0.3"
},
"dependencies": {
"@hopae/sd-jwt-decode": "2.0.3",
"@hopae/sd-jwt-type": "2.0.3",
"@hopae/sd-jwt-util": "2.0.3"
"@bcrl/sd-jwt-decode": "2.0.3",
"@bcrl/sd-jwt-type": "2.0.3",
"@bcrl/sd-jwt-util": "2.0.3"
},
"tsup": {
"entry": [
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/decoy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HasherAndAlg, SaltGenerator } from '@hopae/sd-jwt-type';
import { Uint8ArrayToBase64Url } from '@hopae/sd-jwt-util';
import { HasherAndAlg, SaltGenerator } from '@bcrl/sd-jwt-type';
import { Uint8ArrayToBase64Url } from '@bcrl/sd-jwt-util';

// This function creates a decoy value that can be used to obscure SD JWT payload.
// The value is basically a hash of a random salt. So the value is not predictable.
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SDJWTException } from '@hopae/sd-jwt-util';
import { SDJWTException } from '@bcrl/sd-jwt-util';
import { Jwt } from './jwt';
import { KBJwt } from './kbjwt';
import { SDJwt, pack } from './sdjwt';
Expand All @@ -9,7 +9,7 @@ import {
SDJWTCompact,
SDJWTConfig,
SD_JWT_TYP,
} from '@hopae/sd-jwt-type';
} from '@bcrl/sd-jwt-type';

export * from './sdjwt';
export * from './kbjwt';
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/jwt.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Base64urlEncode, SDJWTException } from '@hopae/sd-jwt-util';
import { Base64urlString, Signer, Verifier } from '@hopae/sd-jwt-type';
import { decodeJwt } from '@hopae/sd-jwt-decode';
import { Base64urlEncode, SDJWTException } from '@bcrl/sd-jwt-util';
import { Base64urlString, Signer, Verifier } from '@bcrl/sd-jwt-type';
import { decodeJwt } from '@bcrl/sd-jwt-decode';

export type JwtData<
Header extends Record<string, any>,
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/kbjwt.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SDJWTException } from '@hopae/sd-jwt-util';
import { SDJWTException } from '@bcrl/sd-jwt-util';
import { Jwt } from './jwt';
import { Verifier, kbHeader, kbPayload } from '@hopae/sd-jwt-type';
import { Verifier, kbHeader, kbPayload } from '@bcrl/sd-jwt-type';

export class KBJwt<
Header extends kbHeader = kbHeader,
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/sdjwt.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createDecoy } from './decoy';
import { SDJWTException, Disclosure } from '@hopae/sd-jwt-util';
import { SDJWTException, Disclosure } from '@bcrl/sd-jwt-util';
import { Jwt } from './jwt';
import { KBJwt } from './kbjwt';
import {
Expand All @@ -14,12 +14,12 @@ import {
SaltGenerator,
kbHeader,
kbPayload,
} from '@hopae/sd-jwt-type';
} from '@bcrl/sd-jwt-type';
import {
createHashMapping,
getSDAlgAndPayload,
unpack,
} from '@hopae/sd-jwt-decode';
} from '@bcrl/sd-jwt-decode';

export type SDJwtData<
Header extends Record<string, any>,
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/test/decoy.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createDecoy } from '../decoy';
import { describe, expect, test } from 'vitest';
import { Base64urlEncode } from '@hopae/sd-jwt-util';
import { digest, generateSalt } from '@hopae/sd-jwt-node-crypto';
import { Base64urlEncode } from '@bcrl/sd-jwt-util';
import { digest, generateSalt } from '@bcrl/sd-jwt-node-crypto';

const hash = {
hasher: digest,
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { SDJwtInstance } from '../index';
import { Signer, Verifier } from '@hopae/sd-jwt-type';
import { Signer, Verifier } from '@bcrl/sd-jwt-type';
import Crypto from 'node:crypto';
import { describe, expect, test } from 'vitest';
import { digest, generateSalt } from '@hopae/sd-jwt-node-crypto';
import { digest, generateSalt } from '@bcrl/sd-jwt-node-crypto';

export const createSignerVerifier = () => {
const { privateKey, publicKey } = Crypto.generateKeyPairSync('ed25519');
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/test/jwt.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SDJWTException } from '@hopae/sd-jwt-util';
import { SDJWTException } from '@bcrl/sd-jwt-util';
import { Jwt } from '../jwt';
import Crypto from 'node:crypto';
import { Signer, Verifier } from '@hopae/sd-jwt-type';
import { Signer, Verifier } from '@bcrl/sd-jwt-type';
import { describe, expect, test } from 'vitest';

describe('JWT', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/test/kbjwt.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SDJWTException } from '@hopae/sd-jwt-util';
import { SDJWTException } from '@bcrl/sd-jwt-util';
import { KBJwt } from '../kbjwt';
import { KB_JWT_TYP, Signer, Verifier } from '@hopae/sd-jwt-type';
import { KB_JWT_TYP, Signer, Verifier } from '@bcrl/sd-jwt-type';
import Crypto from 'node:crypto';
import { describe, expect, test } from 'vitest';

Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/test/sdjwt.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Disclosure } from '@hopae/sd-jwt-util';
import { Disclosure } from '@bcrl/sd-jwt-util';
import { Jwt } from '../jwt';
import { SDJwt, listKeys, pack } from '../sdjwt';
import Crypto from 'node:crypto';
import { describe, test, expect } from 'vitest';
import { DisclosureFrame, Signer } from '@hopae/sd-jwt-type';
import { generateSalt, digest as hasher } from '@hopae/sd-jwt-node-crypto';
import { unpack, createHashMapping } from '@hopae/sd-jwt-decode';
import { DisclosureFrame, Signer } from '@bcrl/sd-jwt-type';
import { generateSalt, digest as hasher } from '@bcrl/sd-jwt-node-crypto';
import { unpack, createHashMapping } from '@bcrl/sd-jwt-decode';

const hash = { alg: 'SHA256', hasher };

Expand Down
4 changes: 2 additions & 2 deletions packages/core/test/app-e2e.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Crypto from 'node:crypto';
import { SDJwtInstance } from '../src';
import { DisclosureFrame, Signer, Verifier } from '@hopae/sd-jwt-type';
import { DisclosureFrame, Signer, Verifier } from '@bcrl/sd-jwt-type';
import fs from 'fs';
import path from 'path';
import { describe, expect, test } from 'vitest';
import { digest, generateSalt } from '@hopae/sd-jwt-node-crypto';
import { digest, generateSalt } from '@bcrl/sd-jwt-node-crypto';

export const createSignerVerifier = () => {
const { privateKey, publicKey } = Crypto.generateKeyPairSync('ed25519');
Expand Down
2 changes: 1 addition & 1 deletion packages/decode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

## [2.0.3](https://github.com/openwallet-foundation-labs/sd-jwt-js/compare/v2.0.2...v2.0.3) (2024-02-20)

**Note:** Version bump only for package @hopae/sd-jwt-decode
**Note:** Version bump only for package @bcrl/sd-jwt-decode
8 changes: 4 additions & 4 deletions packages/decode/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@hopae/sd-jwt-decode",
"name": "@bcrl/sd-jwt-decode",
"version": "2.0.3",
"description": "sd-jwt draft 7 implementation in typescript",
"main": "dist/index.js",
Expand Down Expand Up @@ -34,11 +34,11 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@hopae/sd-jwt-node-crypto": "2.0.3"
"@bcrl/sd-jwt-node-crypto": "2.0.3"
},
"dependencies": {
"@hopae/sd-jwt-type": "2.0.3",
"@hopae/sd-jwt-util": "2.0.3"
"@bcrl/sd-jwt-type": "2.0.3",
"@bcrl/sd-jwt-util": "2.0.3"
},
"tsup": {
"entry": [
Expand Down
Loading

0 comments on commit 79373aa

Please sign in to comment.