Skip to content

Commit

Permalink
feat: add did:ebsi provider Veramo plugin (#161)
Browse files Browse the repository at this point in the history
---------

Signed-off-by: Urban Vidovič <urbanfoundit@gmail.com>
Co-authored-by: martines3000 <domajnko.martin@gmail.com>
  • Loading branch information
pseudobun and martines3000 authored Apr 7, 2023
1 parent 4e5f8be commit a4bc1bb
Show file tree
Hide file tree
Showing 29 changed files with 9,949 additions and 5,133 deletions.
1,024 changes: 504 additions & 520 deletions packages/snap/index.html

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions packages/snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
"@blockchain-lab-um/ssi-snap-types": "*",
"@blockchain-lab-um/utils": "*",
"@blockchain-lab-um/veramo-vc-manager": "*",
"@cef-ebsi/ebsi-did-resolver": "^3.0.0",
"@cef-ebsi/key-did-resolver": "^1.0.0",
"@cef-ebsi/siop-auth": "^3.0.0",
"@cef-ebsi/verifiable-presentation": "^5.0.5",
"@ceramicnetwork/http-client": "2.20.0",
"@ceramicnetwork/streamid": "2.14.0",
"@didtools/pkh-ethereum": "^0.0.2",
Expand Down Expand Up @@ -84,10 +88,12 @@
"did-resolver": "4.0.1",
"did-session": "1.0.0",
"dids": "^3.4.0",
"elliptic": "^6.5.4",
"eth-sig-util": "3.0.1",
"ethers": "5.7.2",
"ethr-did": "2.3.6",
"ethr-did-resolver": "8.0.0",
"jose": "^4.13.1",
"js-sha256": "^0.9.0",
"json-loader": "^0.5.7",
"jsonpath": "^1.1.1",
Expand All @@ -111,6 +117,7 @@
"@metamask/snaps-webpack-plugin": "0.28.0",
"@swc/core": "^1.3.41",
"@swc/jest": "^0.2.24",
"@types/elliptic": "^6.4.14",
"@types/jest": "^29.5.0",
"@types/jsonpath": "^0.2.0",
"@types/lodash.clonedeep": "^4.5.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/blockchain-lab-um/ssi-snap.git"
},
"source": {
"shasum": "qyCwn7UrXV23XgK1QfNXZNTqHphKIY8yEcvMUVYJMD4=",
"shasum": "uEvHRxNOsnlp04R9abWC2sMzqWWEZ0A+F/RhF+CKrcM=",
"location": {
"npm": {
"filePath": "dist/snap.js",
Expand Down
2 changes: 2 additions & 0 deletions packages/snap/src/constants/multicodec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ export type CodecName =
| 'secp256k1-priv'
| 'secp256k1-pub'
| 'ed25519-priv'
| 'jwk_jcs-pub'
| 'ed25519-pub';

export const MULTICODECS: Record<CodecName, Uint8Array> = {
'secp256k1-priv': new Uint8Array([129, 38]),
'secp256k1-pub': new Uint8Array([231, 1]),
'ed25519-priv': new Uint8Array([128, 38]),
'jwk_jcs-pub': new Uint8Array([235, 81]),
'ed25519-pub': new Uint8Array([237, 1]),
};
19 changes: 19 additions & 0 deletions packages/snap/src/did/ebsi/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const BASE_URL = 'https://api-pilot.ebsi.eu';
const DID_REGISTRY = `${BASE_URL}/did-registry/v3/identifiers`;
const TAR_REG = `${BASE_URL}/trusted-apps-registry/v3/apps`;

const AUTH_RESPONSE = '/users-onboarding/v2/authentication-responses';
const SIOP_SESSIONS = '/authorisation/v2/siop-sessions';
const DID_REGISTRY_RPC = '/did-registry/v3/jsonrpc';

export const EbsiConfig = {
BASE_URL,
DID_REGISTRY,
TAR_REG,
};

export const EbsiEndpoints = {
AUTH_RESPONSE,
SIOP_SESSIONS,
DID_REGISTRY_RPC,
};
Loading

0 comments on commit a4bc1bb

Please sign in to comment.