diff --git a/docs/api/Committee-Guide.md b/docs/api/Committee-Guide.md index 73d2fdb..eed6af1 100644 --- a/docs/api/Committee-Guide.md +++ b/docs/api/Committee-Guide.md @@ -56,6 +56,32 @@ curl -X 'POST' ${add_type1_member_to_public_directory_url} -H 'accept: applicati #### Onboarding a Type-2 member into the Public Directory +* You must have: + 1. The DID (Decentralized Identifier) + 2. New Member's Metadata + 3. The SCA to use + +```sh +api_url=http://localhost:3002 # Set LACChain Trust url +``` + +```sh +path_to_public_cacrt=../certs/SCA/SCA.crt # you should point to the public Certificate Authority pem +validDays=500 +expires=true +# metadata +did="did:lac1:1iT58jc7tEP4Y8zbf9Ma8dpdiGKZjzYmjtmFEZZ8Dias9rbBpAYS39dAekAZupNDdgGb" +legalName="Ministry Of Country CHL" +countryCode="CHL" #urn:iso:std:iso:3166 +url="https://lacnet.lacchain.net" +identificationData='{"id":'\"$did\"',"legalName":'\"$legalName\"',"countryCode": '\"$countryCode\"', "url": '\"$url\"'}' + +# process +add_member_to_public_directory_url="$api_url"/api/v1/public-directory/add-type2-member +data='{"validDays":'$validDays', "expires":'$expires',"identificationData":'$identificationData'}' +curl -X 'POST' ${add_member_to_public_directory_url} -H 'accept: application/json' -F caCert=@$path_to_public_cacrt -F data=$data +``` + ##### requirements * You must have: 1. The Certificate Authority diff --git a/package.json b/package.json index 79aaab7..f6978f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lacchain-trust", - "version": "0.0.2", + "version": "0.0.3", "description": "Rest api for Lacchain Trust built on top of Lacchain", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -85,7 +85,7 @@ "express-rate-limit": "^6.3.0", "helmet": "^5.0.2", "jsonwebtoken": "^9.0.0", - "lacchain-identity": "^0.0.2", + "lacchain-identity": "^0.0.3", "morgan": "^1.10.0", "multer": "^1.4.4", "nodemailer": "^6.7.3", diff --git a/yarn.lock b/yarn.lock index 062be88..d9130be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5785,10 +5785,10 @@ koa@^2.8.2: type-is "^1.6.16" vary "^1.1.2" -lacchain-identity@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/lacchain-identity/-/lacchain-identity-0.0.2.tgz#f67082667b4793a3edd67a83c68c5c11902fb73a" - integrity sha512-Th72Swzc6vub3IeM9+u0w+scc98h7Xcqxp2QLK1Xa7pXuRHMWmmRJPFM1pAnj6qPj4l+pzUKUDoAevML2W+fZg== +lacchain-identity@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/lacchain-identity/-/lacchain-identity-0.0.3.tgz#8323aa6c75981f15aeb0b1919c0a43d39e12f4e1" + integrity sha512-4TJ7VGayF1ksi1xSqcMUg6+44vJyeeNu2u/X45l/MDDX1+R2Wr4dbRmA3f6LwmUEKi53+GL+KmuBtb8fyitaTA== dependencies: "@lacchain/gas-model-provider" "^1.0.1" aws-sdk "^2.1116.0" @@ -5807,7 +5807,7 @@ lacchain-identity@^0.0.2: helmet "^5.0.2" json-canonicalize "^1.0.6" jsonwebtoken "^9.0.0" - lacchain-key-manager "^0.0.2" + lacchain-key-manager "^0.0.3" morgan "^1.10.0" multer "^1.4.4" nodemailer "^6.7.3" @@ -5827,10 +5827,10 @@ lacchain-identity@^0.0.2: typescript-logging "^2.1.0" typescript-logging-log4ts-style "^2.1.0" -lacchain-key-manager@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/lacchain-key-manager/-/lacchain-key-manager-0.0.2.tgz#e9996ad66bdbf52e4db3148390a09dff630413b7" - integrity sha512-8qDeQUYHgZylcPQDkKc3N6eprVUlp0vCH+4GsH+iznZ6HlWhhdghMgEgYwSq1jlmM9L/jBos+m7m1iWBDWoQbg== +lacchain-key-manager@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/lacchain-key-manager/-/lacchain-key-manager-0.0.3.tgz#d2f577eb0849753522f8b2709f954ca97fb212e3" + integrity sha512-bCZqJ957lPg6WItbAX3BTaY7Ai5nY7Di5Eyyx0939qvedb/0tbvOu+EV8GsScfqyPmfGBhJ42PRnHRR0th5ZBA== dependencies: "@lacchain/gas-model-provider" "^1.0.1" DIDComm-js "git+https://github.com/decentralized-identity/DIDComm-js.git"