diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5edfb58..f1f52be 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,10 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v2 with: - python-version: 3.10.13 + python-version: 3.12.2 + - name: Clear databases + run: | + rm -Rf /usr/local/var/keri/* - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index d04c2a9..cb72f41 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -182,7 +182,12 @@ E.g. using git, Github pages, FTP, SCP, etc. ## Example: serve from docker You can run the docker example service to serve the did.json and keri.cesr files for the other docker containers: -First, lets copy our generated files to the directory we'll serve from. On your `LOCAL` machine (or within the container) you can copy `volume/dkr/examples/ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe` to `volume/dkr/pages/ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe`: +First, lets copy our generated files to the directory we'll serve from. On your +`LOCAL` machine (or within the container) you can copy +`volume/dkr/examples/ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe` to +`volume/dkr/pages/ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe`: + +For this demo these files have been copied ahead of time for you. ``` cp -R volume/dkr/examples/ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe volume/dkr/pages/ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe @@ -203,12 +208,6 @@ It will search for AID named directories and for the two files (`did.json` and ` "did.doc.dir": "/usr/local/var/webs/volume/dkr/pages/" ``` -And when a file is found by the service, there will be logs like: -``` -Looking for did.json file /usr/local/var/webs/volume/dkr/pages/ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe -registering /ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe/did.json -``` - It will serve it at a URL that you can CURL from any of our docker containers (for instance from the webs container) like: `command:` diff --git a/docker-compose.yml b/docker-compose.yml index 429c04a..6998e7b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3" -networks: - websnet: +# networks: +# websnet: services: witnesshost: diff --git a/setup.py b/setup.py index 915408b..6a142e1 100644 --- a/setup.py +++ b/setup.py @@ -86,7 +86,6 @@ 'http_sfv>=0.9.8', 'cryptography>=39.0.2', 'requests>=2.28', - 'numpy>=1.26.0', 'pytest>=6.2.5', 'pytest-timeout>=2.3.1' ], diff --git a/src/dkr/app/cli/commands/did/keri/resolve.py b/src/dkr/app/cli/commands/did/keri/resolve.py index 818fd32..6f34541 100644 --- a/src/dkr/app/cli/commands/did/keri/resolve.py +++ b/src/dkr/app/cli/commands/did/keri/resolve.py @@ -28,25 +28,25 @@ dest="bran", default=None) # passcode => bran parser.add_argument("--did", "-d", help="DID to resolve (did:keri method)", required=True) parser.add_argument("--oobi", "-o", help="OOBI to use for resolving the DID", required=False) -parser.add_argument("--metadata", "-m", help="Whether to include metadata (True), or only return the DID document (False)", type=bool, required=False, default=None) +parser.add_argument("--meta", "-m", help="Whether to include metadata (True), or only return the DID document (False)", type=bool, required=False, default=None) def handler(args): hby = existing.setupHby(name=args.name, base=args.base, bran=args.bran) hbyDoer = habbing.HaberyDoer(habery=hby) # setup doer obl = oobiing.Oobiery(hby=hby) - res = KeriResolver(hby=hby, hbyDoer=hbyDoer, obl=obl, did=args.did, oobi=args.oobi, metadata=args.metadata) + res = KeriResolver(hby=hby, hbyDoer=hbyDoer, obl=obl, did=args.did, oobi=args.oobi, meta=args.meta) return [res] class KeriResolver(doing.DoDoer): - def __init__(self, hby, hbyDoer, obl, did, oobi, metadata): + def __init__(self, hby, hbyDoer, obl, did, oobi, meta): self.hby = hby self.did = did self.oobi = oobi - self.metadata = metadata + self.meta = meta self.toRemove = [hbyDoer] + obl.doers doers = list(self.toRemove) + [doing.doify(self.resolve)] @@ -68,9 +68,9 @@ def resolve(self, tymth, tock=0.0, **opts): while self.hby.db.roobi.get(keys=(self.oobi,)) is None: _ = yield tock - didresult = didding.generateDIDDoc(self.hby, did=self.did, aid=aid, oobi=self.oobi, metadata=True) + didresult = didding.generateDIDDoc(self.hby, did=self.did, aid=aid, oobi=self.oobi, meta=True) dd = didresult[didding.DD_FIELD] - result = didresult if self.metadata else dd + result = didresult if self.meta else dd data = json.dumps(result, indent=2) print(data) diff --git a/src/dkr/app/cli/commands/did/webs/generate.py b/src/dkr/app/cli/commands/did/webs/generate.py index 8c7729b..fc5eea5 100644 --- a/src/dkr/app/cli/commands/did/webs/generate.py +++ b/src/dkr/app/cli/commands/did/webs/generate.py @@ -37,14 +37,15 @@ required=False, default=None, help="Name of regery to find designated aliases attestation. Default is None.") +parser.add_argument("--meta", "-m", help="Whether to include metadata (True), or only return the DID document (False)", type=bool, required=False, default=False) def handler(args): - gen = Generator(name=args.name, base=args.base, bran=args.bran, did=args.did, oobi=None, da_reg=args.da_reg) + gen = Generator(name=args.name, base=args.base, bran=args.bran, did=args.did, oobi=None, da_reg=args.da_reg, meta=args.meta) return [gen] class Generator(doing.DoDoer): - def __init__(self, name, base, bran, did, oobi, da_reg): + def __init__(self, name, base, bran, did, oobi, da_reg, meta=False): self.name = name self.base = base self.bran = bran @@ -55,6 +56,8 @@ def __init__(self, name, base, bran, did, oobi, da_reg): self.did = did # self.oobi = oobi self.da_reg = da_reg + self.meta = meta + print("Generate DID document command", did, "using oobi", oobi, "and metadata", meta, "registry name for creds", da_reg) self.toRemove = [hbyDoer] + obl.doers doers = list(self.toRemove) + [doing.doify(self.generate)] @@ -105,7 +108,12 @@ def generate(self, tymth, tock=0.0, **opts): kcf.write(tmsg) #generate did doc - diddoc = didding.generateDIDDoc(self.hby, did=self.did, aid=aid, oobi=None, reg_name=self.da_reg) + result = didding.generateDIDDoc(self.hby, did=self.did, aid=aid, oobi=None, reg_name=self.da_reg, meta=self.meta) + + diddoc = result + if(self.meta): + diddoc = result["didDocument"] + print("Generated metadata for DID document", result["didDocumentMetadata"]) # Create the directory (and any intermediate directories in the given path) if it doesn't already exist dd_dir_path = f"{aid}" @@ -172,7 +180,7 @@ def genTelCesr(self, reger: viring.Reger, regk: str, msgs: bytearray): msgs.extend(msg) def genAcdcCesr(self, aid, creder, msgs: bytearray): - print(f"Generating {creder.crd['d']} ACDC CESR events, issued by {creder.crd['i']}") + # print(f"Generating {creder.crd['d']} ACDC CESR events, issued by {creder.crd['i']}") cmsg = self.hby.habs[aid].endorse(creder) msgs.extend(cmsg) @@ -187,7 +195,7 @@ def genCredCesr(self, aid: str, schema: str, msgs: bytearray): creder, *_ = rgy.reger.cloneCred(said=saider.qb64) - if creder.status is not None: - self.genTelCesr(rgy.reger, creder.status, msgs) + if creder.regi is not None: + self.genTelCesr(rgy.reger, creder.regi, msgs) self.genTelCesr(rgy.reger, creder.said, msgs) self.genAcdcCesr(aid, creder, msgs) diff --git a/src/dkr/app/cli/commands/did/webs/resolve.py b/src/dkr/app/cli/commands/did/webs/resolve.py index 3a07424..4f6ad5a 100644 --- a/src/dkr/app/cli/commands/did/webs/resolve.py +++ b/src/dkr/app/cli/commands/did/webs/resolve.py @@ -23,24 +23,24 @@ parser.add_argument('--passcode', help='22 character encryption passcode for keystore (is not saved)', dest="bran", default=None) # passcode => bran parser.add_argument("--did", "-d", help="DID to resolve", required=True) -parser.add_argument("--metadata", "-m", help="Whether to include metadata (True), or only return the DID document (False)", type=bool, required=False, default=None) +parser.add_argument("--meta", "-m", help="Whether to include metadata (True), or only return the DID document (False)", type=bool, required=False, default=None) def handler(args): hby = existing.setupHby(name=args.name, base=args.base, bran=args.bran) hbyDoer = habbing.HaberyDoer(habery=hby) # setup doer obl = oobiing.Oobiery(hby=hby) - res = WebsResolver(hby=hby, hbyDoer=hbyDoer, obl=obl, did=args.did, metadata=args.metadata) + res = WebsResolver(hby=hby, hbyDoer=hbyDoer, obl=obl, did=args.did, meta=args.meta) return [res] class WebsResolver(doing.DoDoer): - def __init__(self, hby, hbyDoer, obl, did, metadata): + def __init__(self, hby, hbyDoer, obl, did, meta): self.hby = hby self.did = did - self.metadata = metadata + self.meta = meta self.toRemove = [hbyDoer] + obl.doers doers = list(self.toRemove) + [doing.doify(self.resolve)] @@ -51,6 +51,6 @@ def resolve(self, tymth, tock=0.125, **opts): self.tock = tock _ = (yield self.tock) - resolving.resolve(hby=self.hby, did=self.did, metadata=self.metadata) + resolving.resolve(hby=self.hby, did=self.did, meta=self.meta) self.remove(self.toRemove) \ No newline at end of file diff --git a/src/dkr/core/didding.py b/src/dkr/core/didding.py index e76af1e..dace1a2 100644 --- a/src/dkr/core/didding.py +++ b/src/dkr/core/didding.py @@ -4,10 +4,10 @@ """ -from datetime import datetime +import datetime import json +import math import re -import numpy as np from base64 import urlsafe_b64encode @@ -60,10 +60,10 @@ def parseDIDWebs(did): return domain, port, path, aid -def generateDIDDoc(hby: habbing.Habery, did, aid, oobi=None, metadata=None, reg_name=None): +def generateDIDDoc(hby: habbing.Habery, did, aid, oobi=None, meta=False, reg_name=None): if (did and aid) and not did.endswith(aid): raise ValueError(f"{did} does not end with {aid}") - print("Generating DID document for", did, "with aid", aid, "using oobi", oobi, "and metadata", metadata, "registry name for creds", reg_name) + print("Generating DID document for", did, "with aid", aid, "using oobi", oobi, "and metadata", meta, "registry name for creds", reg_name) hab = None if aid in hby.habs: @@ -112,7 +112,7 @@ def generateDIDDoc(hby: habbing.Habery, did, aid, oobi=None, metadata=None, reg_ conditionThreshold=conditions )) elif isinstance(kever.tholder.thold, list): - lcd = int(np.lcm.reduce([fr.denominator for fr in kever.tholder.thold[0]])) + lcd = int(math.lcm(*[fr.denominator for fr in kever.tholder.thold[0]])) threshold = float(lcd/2) numerators = [int(fr.numerator * lcd / fr.denominator) for fr in kever.tholder.thold[0]] conditions = [] @@ -164,7 +164,7 @@ def generateDIDDoc(hby: habbing.Habery, did, aid, oobi=None, metadata=None, reg_ didResolutionMetadata = dict( contentType="application/did+json", - retrieved=datetime.utcnow().strftime(DID_TIME_FORMAT) + retrieved=datetime.datetime.now(datetime.UTC).strftime(DID_TIME_FORMAT) ) didDocumentMetadata = dict( witnesses=witnesses, @@ -178,7 +178,7 @@ def generateDIDDoc(hby: habbing.Habery, did, aid, oobi=None, metadata=None, reg_ alsoKnownAs=aka_ids ) - if metadata is True: + if meta is True: resolutionResult = dict( didDocument=diddoc, didResolutionMetadata=didResolutionMetadata, @@ -265,4 +265,4 @@ def addEnds(ends): ) if v not in sEnds: sEnds.append(v) - return sEnds \ No newline at end of file + return sEnds diff --git a/src/dkr/core/resolving.py b/src/dkr/core/resolving.py index fe12c2d..a9a2a68 100644 --- a/src/dkr/core/resolving.py +++ b/src/dkr/core/resolving.py @@ -53,7 +53,7 @@ def saveCesr(hby: habbing.Habery, kc_res: requests.Response, aid: str = None): assert aid in hby.kevers, f"KERI CESR parsing failed, KERI AID {aid} not found in habery" def getComp(hby: habbing.Habery, did: str, aid: str, dd_res: requests.Response, kc_res: requests.Response): - dd = didding.generateDIDDoc(hby, did=did, aid=aid, oobi=None, metadata=True) + dd = didding.generateDIDDoc(hby, did=did, aid=aid, oobi=None, meta=True) dd[didding.DD_META_FIELD]['didDocUrl'] = dd_res.url dd[didding.DD_META_FIELD]['keriCesrUrl'] = kc_res.url @@ -62,7 +62,7 @@ def getComp(hby: habbing.Habery, did: str, aid: str, dd_res: requests.Response, return dd, dd_actual -def verify(dd, dd_actual, metadata: bool = False): +def verify(dd, dd_actual, meta: bool = False): dd_exp = dd if didding.DD_FIELD in dd_exp: dd_exp = dd[didding.DD_FIELD] @@ -71,7 +71,7 @@ def verify(dd, dd_actual, metadata: bool = False): result = None if verified: - result = dd if metadata else dd[didding.DD_FIELD] + result = dd if meta else dd[didding.DD_FIELD] print(f"DID verified") else: didresult = dict() @@ -145,11 +145,11 @@ def _compare_dicts(expected, actual, path=""): if expected != actual: print(f"Different values for key {path}: {expected} (expected) vs. {actual} (actual)", file=sys.stderr) -def resolve(hby, did, metadata=False, resq: queue.Queue = None): +def resolve(hby, did, meta=False, resq: queue.Queue = None): aid, dd_res, kc_res = getSrcs(did=did, resq=resq) saveCesr(hby=hby,kc_res=kc_res, aid=aid) dd, dd_actual = getComp(hby=hby, did=did, aid=aid, dd_res=dd_res, kc_res=kc_res) - vresult = verify(dd, dd_actual, metadata=metadata) + vresult = verify(dd, dd_actual, meta=meta) print("Resolution result: ", vresult) return vresult @@ -225,7 +225,7 @@ def __init__(self, hby, hbyDoer, obl): super(ResolveResource, self).__init__(doers=[]) print(f"Init resolver endpoint") - def on_get(self, req, rep, did): + def on_get(self, req, rep, did, meta=False): print(f"Request to resolve did: {did}") if did is None: @@ -239,20 +239,18 @@ def on_get(self, req, rep, did): else: oobi = None - metadata = False - if did.startswith('did:webs:'): #res = WebsResolver(hby=self.hby, hbyDoer=self.hbyDoer, obl=self.obl, did=did) #tymth = None # ??? #data = res.resolve(tymth) - cmd = f"dkr did webs resolve --name dkr --did {did} --metadata {metadata}" + cmd = f"dkr did webs resolve --name dkr --did {did} --meta {meta}" stream = os.popen(cmd) data = stream.read() elif did.startswith('did:keri'): #res = KeriResolver(hby=self.hby, hbyDoer=self.hbyDoer, obl=self.obl, did=did, oobi=oobi, metadata=False) #tymth = None # ??? #data = res.resolve(tymth) - cmd = f"dkr did keri resolve --name dkr --did {did} --oobi {oobi} --metadata {metadata}" + cmd = f"dkr did keri resolve --name dkr --did {did} --oobi {oobi} --meta {meta}" stream = os.popen(cmd) data = stream.read() else: diff --git a/tests/dkr/app/cli/commands/did/webs/test_resolve.py b/tests/dkr/app/cli/commands/did/webs/test_resolve.py index b1dc3cd..d43ca36 100644 --- a/tests/dkr/app/cli/commands/did/webs/test_resolve.py +++ b/tests/dkr/app/cli/commands/did/webs/test_resolve.py @@ -166,18 +166,18 @@ def on_get(self, req, resp): # assert dd[didding.DD_FIELD][didding.VMETH_FIELD] == dd_actual[didding.VMETH_FIELD] # # no metadata -# vresult = resolving.verify(dd, dd_actual, metadata=False) +# vresult = resolving.verify(dd, dd_actual, meta=False) # assert vresult[didding.VMETH_FIELD] == dd[didding.DD_FIELD][didding.VMETH_FIELD] # # metadata -# vresult = resolving.verify(dd, dd_actual, metadata=True) +# vresult = resolving.verify(dd, dd_actual, meta=True) # assert vresult[didding.DD_FIELD][didding.VMETH_FIELD] == dd[didding.DD_FIELD][didding.VMETH_FIELD] # # should not verify # dd_actual_bad = dd_actual # # remove the last character of the id # dd_actual_bad[didding.VMETH_FIELD][0]["id"] = dd_actual_bad[didding.VMETH_FIELD][0]["id"][:-1] -# vresult = resolving.verify(dd, dd_actual_bad, metadata=True) +# vresult = resolving.verify(dd, dd_actual_bad, meta=True) # assert vresult[didding.DID_RES_META_FIELD]['error'] == 'notVerified' # # TODO test services, alsoKnownAs, etc. diff --git a/tests/dkr/core/test_didding.py b/tests/dkr/core/test_didding.py index 1340fe0..7fc3ee1 100644 --- a/tests/dkr/core/test_didding.py +++ b/tests/dkr/core/test_didding.py @@ -156,7 +156,7 @@ def test_parse_web_did(): def test_gen_did_doc(setup_habs): hby, hab, wesHby, wesHab = setup_habs - didDoc = didding.generateDIDDoc(hby, did, hab.pre, oobi=None, metadata=False) + didDoc = didding.generateDIDDoc(hby, did, hab.pre, oobi=None, meta=False) assert ( didDoc["id"] == f"{did}" @@ -204,9 +204,9 @@ def test_gen_did_doc(setup_habs): } -def test_gen_did_doc_with_metadata(setup_habs): +def test_gen_did_doc_with_meta(setup_habs): hby, hab, wesHby, wesHab = setup_habs - didDoc = didding.generateDIDDoc(hby, did, hab.pre, oobi=None, metadata=True) + didDoc = didding.generateDIDDoc(hby, did, hab.pre, oobi=None, meta=True) assert ( didDoc[didding.DD_FIELD]["id"] == f"{did}" @@ -264,14 +264,14 @@ def test_gen_did_doc_no_hab(setup_habs): did = f"did:web:did-webs-service%3a7676:{aid}" try: - didDoc = didding.generateDIDDoc(hby, did, aid, oobi=None, metadata=False) + didDoc = didding.generateDIDDoc(hby, did, aid, oobi=None, meta=False) except KeyError as e: assert str(e) == f"'{aid}'" msgs = resolving.loadFile(f"./volume/dkr/pages/{aid}/keri.cesr") hby.psr.parse(ims=msgs) - didDoc = didding.generateDIDDoc(hby, did, aid, oobi=None, metadata=False) + didDoc = didding.generateDIDDoc(hby, did, aid, oobi=None, meta=False) expected = resolving.loadJsonFile(f"./volume/dkr/pages/{aid}/did.json") @@ -290,7 +290,7 @@ def test_gen_desig_aliases(setup_habs, seeder): ) didDoc = didding.generateDIDDoc( - hby, did, hab.pre, oobi=None, metadata=True, reg_name=crdntler.rgy.name + hby, did, hab.pre, oobi=None, meta=True, reg_name=crdntler.rgy.name ) assert ( didDoc[didding.DD_FIELD]["id"] @@ -339,7 +339,7 @@ def test_gen_desig_aliases_revoked(setup_habs, seeder): revoke_cred(hab, crdntler.rgy, crdntler.rgy.registryByName("dAliases"), creds[0]) didDoc = didding.generateDIDDoc( - hby, did, hab.pre, oobi=None, metadata=True + hby, did, hab.pre, oobi=None, meta=True ) assert ( didDoc[didding.DD_FIELD]["id"] diff --git a/volume/dkr/examples/get_started_docker.sh b/volume/dkr/examples/get_started_docker.sh index 37fc60b..801b297 100755 --- a/volume/dkr/examples/get_started_docker.sh +++ b/volume/dkr/examples/get_started_docker.sh @@ -20,7 +20,7 @@ echo "" echo "ATTENTION: In your did-webs-service, start the webs server first, see the GETTING_STARTED.md for those instructions" read -p "Press enter to resolve did:webs..." -dkr did webs resolve --name controller --did "did:webs:did-webs-service%3a7676:ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe" +dkr did webs resolve --name controller --did "did:webs:did-webs-service%3a7676:ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe" --meta True echo "" read -p "Press enter to create designated aliases..." @@ -29,7 +29,7 @@ kli vc registry incept --name controller --alias controller --registry-name dAli kli oobi resolve --name controller --oobi-alias myDesigAliases --oobi "https://weboftrust.github.io/oobi/EN6Oh5XSD5_q2Hgu-aqpdfbVepdpYpFlgz6zvJL5b_r5" -kli vc issue --name controller --alias controller --registry-name dAliases --schema EN6Oh5XSD5_q2Hgu-aqpdfbVepdpYpFlgz6zvJL5b_r5 --data @desig-aliases-attr-public.json --rules @desig-aliases-rules-public.json +kli vc create --name controller --alias controller --registry-name dAliases --schema EN6Oh5XSD5_q2Hgu-aqpdfbVepdpYpFlgz6zvJL5b_r5 --data @desig-aliases-attr-public.json --rules @desig-aliases-rules-public.json kli vc list --name controller --alias controller --issued --schema EN6Oh5XSD5_q2Hgu-aqpdfbVepdpYpFlgz6zvJL5b_r5 @@ -40,11 +40,11 @@ kli vc export --name controller --alias controller --said "$SAID" --chain echo "" read -p "Press enter generate did:webs with designated aliases..." -dkr did webs generate --name controller --did "did:webs:did-webs-service%3a7676:ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe" +dkr did webs generate --name controller --did "did:webs:did-webs-service%3a7676:ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe" --meta True cp -R ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe ../pages/ echo "" read -p "Press enter to resolve did:webs with designated aliases..." -dkr did webs resolve --name controller --did "did:webs:did-webs-service%3a7676:ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe" \ No newline at end of file +dkr did webs resolve --name controller --did "did:webs:did-webs-service%3a7676:ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe" --meta True \ No newline at end of file diff --git a/volume/dkr/examples/get_started_docker_gen.sh b/volume/dkr/examples/get_started_docker_gen.sh index b2f6402..0968e31 100755 --- a/volume/dkr/examples/get_started_docker_gen.sh +++ b/volume/dkr/examples/get_started_docker_gen.sh @@ -9,7 +9,7 @@ kli incept --name controller --alias controller --file /usr/local/var/webs/volum echo "" read -p "Press enter to generate did:webs..." -dkr did webs generate --name controller --did "did:webs:did-webs-service%3a7676:ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe" +dkr did webs generate --name controller --did "did:webs:did-webs-service%3a7676:ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe" --meta True echo "" read -p "Press enter to copy to pages..." diff --git a/volume/dkr/examples/get_started_docker_resolve.sh b/volume/dkr/examples/get_started_docker_resolve.sh index 044d047..3630feb 100755 --- a/volume/dkr/examples/get_started_docker_resolve.sh +++ b/volume/dkr/examples/get_started_docker_resolve.sh @@ -32,6 +32,6 @@ fi DID="did:webs:did-webs-service%3a7676:$AID" echo "Resolving $AID did:webs $DID... " -source "./get_started_webs_resolve.sh" "${NAME}" "${DID}" +source "./get_started_webs_resolve.sh" "${NAME}" "${DID}" "True" diff --git a/volume/dkr/examples/get_started_docker_wits.sh b/volume/dkr/examples/get_started_docker_wits.sh index 6f4c9e8..39f05fe 100755 --- a/volume/dkr/examples/get_started_docker_wits.sh +++ b/volume/dkr/examples/get_started_docker_wits.sh @@ -25,7 +25,7 @@ echo "" echo "ATTENTION: In your did-webs-service, start the webs server first, see the GETTING_STARTED.md for those instructions" read -p "Press enter to resolve did:webs..." -dkr did webs resolve --name controller --did "did:webs:did-webs-service%3a7676:$AID" +dkr did webs resolve --name controller --did "did:webs:did-webs-service%3a7676:$AID" --meta True echo "" read -p "Press enter to create designated aliases..." @@ -52,4 +52,4 @@ cp -R $AID ../pages/ echo "" read -p "Press enter to resolve did:webs with designated aliases..." -dkr did webs resolve --name controller --did "did:webs:did-webs-service%3a7676:$AID" \ No newline at end of file +dkr did webs resolve --name controller --did "did:webs:did-webs-service%3a7676:$AID" --meta True \ No newline at end of file diff --git a/volume/dkr/examples/get_started_webs_gen.sh b/volume/dkr/examples/get_started_webs_gen.sh index 4797910..c84dc6d 100755 --- a/volume/dkr/examples/get_started_webs_gen.sh +++ b/volume/dkr/examples/get_started_webs_gen.sh @@ -8,4 +8,4 @@ hostPath=$2 aid=$3 # generate controller did:webs for EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP at labs.hyperledger.org -dkr did webs generate --name "${ctrlName}" --did "did:webs:${hostPath}:${aid}" \ No newline at end of file +dkr did webs generate --name "${ctrlName}" --did "did:webs:${hostPath}:${aid}" --meta True \ No newline at end of file diff --git a/volume/dkr/examples/get_started_webs_resolve.sh b/volume/dkr/examples/get_started_webs_resolve.sh index 37abbf5..8267243 100755 --- a/volume/dkr/examples/get_started_webs_resolve.sh +++ b/volume/dkr/examples/get_started_webs_resolve.sh @@ -4,6 +4,8 @@ ctrlName=$1 # did did=$2 +# metadata +meta=$3 # generate controller did:webs for EKYGGh-FtAphGmSZbsuBs_t4qpsjYJ2ZqvMKluq9OxmP at labs.hyperledger.org -dkr did webs resolve --name "${ctrlName}" --did "${did}" +dkr did webs resolve --name "${ctrlName}" --did "${did}" --meta "${meta}" diff --git a/volume/dkr/pages/ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe/keri.cesr b/volume/dkr/pages/ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe/keri.cesr index 64c2068..c1e367f 100644 --- a/volume/dkr/pages/ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe/keri.cesr +++ b/volume/dkr/pages/ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe/keri.cesr @@ -1 +1 @@ -{"v":"KERI10JSON00012b_","t":"icp","d":"ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe","i":"ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe","s":"0","kt":"1","k":["DHr0-I-mMN7h6cLMOTRJkkfPuMd0vgQPrOk4Y3edaHjr"],"nt":"1","n":["ELa775aLyane1vdiJEuexP8zrueiIoG995pZPGJiBzGX"],"bt":"0","b":[],"c":[],"a":[]}-VAn-AABAADjfOjbPu9OWce59OQIc-y3Su4kvfC2BAd_e_NLHbXcOK8-3s6do5vBfrxQ1kDyvFGCPMcSl620dLMZ4QDYlvME-EAB0AAAAAAAAAAAAAAAAAAAAAAA1AAG2024-03-06T14c48c10d241878p00c00 \ No newline at end of file +{"v":"KERI10JSON00012b_","t":"icp","d":"ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe","i":"ENro7uf0ePmiK3jdTo2YCdXLqW7z7xoP6qhhBou6gBLe","s":"0","kt":"1","k":["DHr0-I-mMN7h6cLMOTRJkkfPuMd0vgQPrOk4Y3edaHjr"],"nt":"1","n":["ELa775aLyane1vdiJEuexP8zrueiIoG995pZPGJiBzGX"],"bt":"0","b":[],"c":[],"a":[]}-VAn-AABAADjfOjbPu9OWce59OQIc-y3Su4kvfC2BAd_e_NLHbXcOK8-3s6do5vBfrxQ1kDyvFGCPMcSl620dLMZ4QDYlvME-EAB0AAAAAAAAAAAAAAAAAAAAAAA1AAG2024-04-05T15c29c27d336958p00c00 \ No newline at end of file