From cedbd38959699c730bc8f541a228e11255de91c9 Mon Sep 17 00:00:00 2001 From: pfeairheller Date: Thu, 7 Dec 2023 10:28:33 -0800 Subject: [PATCH 1/3] Moving these scripts to new repo at WebOfTrust/signify-integration --- examples/scripts/client.ts | 127 -------- examples/scripts/create_agent.py | 47 --- examples/scripts/create_multisig_aid.py | 79 ----- examples/scripts/create_person_aid.py | 81 ------ examples/scripts/create_rpys.py | 61 ---- examples/scripts/data/delegator.json | 13 - examples/scripts/data/gleif-sample.json | 13 - examples/scripts/data/multisig-triple.json | 17 -- examples/scripts/delegator.sh | 7 - examples/scripts/env.sh | 5 - examples/scripts/get.py | 27 -- .../keri/cf/demo-witness-oobis-schema.json | 17 -- examples/scripts/list_aids.py | 27 -- examples/scripts/list_notifications.py | 85 ------ examples/scripts/list_notifications.ts | 112 -------- examples/scripts/make_endroles.ts | 58 ---- .../scripts/multisig-create-credential.sh | 3 - .../scripts/multisig-create-credential.ts | 271 ------------------ examples/scripts/multisig-kli.sh | 25 -- examples/scripts/multisig-sigpy.sh | 10 - examples/scripts/multisig-sigts.sh | 8 - examples/scripts/multisig_endrole.py | 93 ------ examples/scripts/package.json | 11 - examples/scripts/stream_escrows.py | 35 --- examples/scripts/tsconfig.json | 9 - 25 files changed, 1241 deletions(-) delete mode 100644 examples/scripts/client.ts delete mode 100644 examples/scripts/create_agent.py delete mode 100644 examples/scripts/create_multisig_aid.py delete mode 100644 examples/scripts/create_person_aid.py delete mode 100644 examples/scripts/create_rpys.py delete mode 100644 examples/scripts/data/delegator.json delete mode 100644 examples/scripts/data/gleif-sample.json delete mode 100644 examples/scripts/data/multisig-triple.json delete mode 100755 examples/scripts/delegator.sh delete mode 100644 examples/scripts/env.sh delete mode 100644 examples/scripts/get.py delete mode 100755 examples/scripts/keri/cf/demo-witness-oobis-schema.json delete mode 100644 examples/scripts/list_aids.py delete mode 100644 examples/scripts/list_notifications.py delete mode 100644 examples/scripts/list_notifications.ts delete mode 100644 examples/scripts/make_endroles.ts delete mode 100755 examples/scripts/multisig-create-credential.sh delete mode 100644 examples/scripts/multisig-create-credential.ts delete mode 100755 examples/scripts/multisig-kli.sh delete mode 100755 examples/scripts/multisig-sigpy.sh delete mode 100755 examples/scripts/multisig-sigts.sh delete mode 100644 examples/scripts/multisig_endrole.py delete mode 100644 examples/scripts/package.json delete mode 100644 examples/scripts/stream_escrows.py delete mode 100644 examples/scripts/tsconfig.json diff --git a/examples/scripts/client.ts b/examples/scripts/client.ts deleted file mode 100644 index 11e8d4c3..00000000 --- a/examples/scripts/client.ts +++ /dev/null @@ -1,127 +0,0 @@ -import signify from 'signify-ts'; - -await connect(); - -async function connect() { - const url = 'http://127.0.0.1:3901'; - const bran = '0123456789abcdefghijk'; - - await signify.ready(); - const client = new signify.SignifyClient(url, bran); - console.log(client.controller.pre); - const [evt, sign] = client.controller?.event ?? []; - const data = { - icp: evt.ked, - sig: sign.qb64, - stem: client.controller?.stem, - pidx: 1, - tier: client.controller?.tier, - }; - - await fetch('http://127.0.0.1:3903/boot', { - method: 'POST', - body: JSON.stringify(data), - headers: { - 'Content-Type': 'application/json', - }, - }); - - await client.connect(); - const d = await client.state(); - console.log('Connected: '); - console.log(' Agent: ', d.agent.i, ' Controller: ', d.controller.state.i); - - const identifiers = client.identifiers(); - const oobis = client.oobis(); - const operations = client.operations(); - const exchanges = client.exchanges(); - - const salt = 'abcdefghijk0123456789'; - const res = await identifiers.create('multisig-ts', { bran: salt }); - let op = await res.op(); - let aid = op['response']; - - await identifiers.addEndRole('multisig-ts', 'agent', d.agent.i); - - console.log('Created AID: ', aid); - - console.log('Resolving delegator...'); - op = await oobis.resolve( - 'http://127.0.0.1:5642/oobi/EHpD0-CDWOdu5RJ8jHBSUkOqBZ3cXeDVHWNb_Ul89VI7/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv' + - '_VmF_dJNN6vkf2Ha', - 'delegator' - ); - while (!op['done']) { - op = await operations.get(op['name']); - await new Promise((resolve) => setTimeout(resolve, 1000)); // sleep for 1 second - } - console.log('done.'); - // let delegator = op['response'] - - console.log('Resolving multisig-kli...'); - op = await oobis.resolve( - 'http://127.0.0.1:5642/oobi/EFBmwh8vdPTofoautCiEjjuA17gSlEnE3xc-xy-fGzWZ', - 'multisig-kli' - ); - while (!op['done']) { - op = await operations.get(op['name']); - await new Promise((resolve) => setTimeout(resolve, 1000)); // sleep for 1 second - } - console.log('done.'); - const kli = op['response']; - - console.log('Resolving multisig-sigpy...'); - op = await oobis.resolve( - 'http://127.0.0.1:3902/oobi/EBcIURLpxmVwahksgrsGW6_dUw0zBhyEHYFk17eWrZfk/agent/EERMVxqeHfFo_eIvyzBXaKdT1EyobZdSs1QXuFyYLjmz', - 'multisig-sigpy' - ); - while (!op['done']) { - op = await operations.get(op['name']); - await new Promise((resolve) => setTimeout(resolve, 1000)); // sleep for 1 second - } - console.log('done.'); - const sigPy = op['response']; - - aid = await identifiers.get('multisig-ts'); - const sigTs = aid['state']; - - const states = [sigPy, kli, sigTs]; - const ires = await identifiers.create('multisig', { - algo: signify.Algos.group, - mhab: aid, - delpre: 'EHpD0-CDWOdu5RJ8jHBSUkOqBZ3cXeDVHWNb_Ul89VI7', - toad: 2, - wits: [ - 'BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha', - 'BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM', - 'BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX', - ], - isith: ['1/3', '1/3', '1/3'], - nsith: ['1/3', '1/3', '1/3'], - states: states, - rstates: states, - }); - - const serder = ires.serder; - const sigs = ires.sigs; - const sigers = sigs.map((sig: any) => new signify.Siger({ qb64: sig })); - - const ims = signify.d(signify.messagize(serder, sigers)); - const atc = ims.substring(serder.size); - const embeds = { - icp: [serder, atc], - }; - - const smids = states.map((state) => state['i']); - const recp = [sigPy, kli].map((state) => state['i']); - - await exchanges.send( - 'multisig-ts', - 'multisig', - aid, - '/multisig/icp', - { gid: serder.pre, smids: smids, rmids: smids }, - embeds, - recp - ); -} diff --git a/examples/scripts/create_agent.py b/examples/scripts/create_agent.py deleted file mode 100644 index 3994a7da..00000000 --- a/examples/scripts/create_agent.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- encoding: utf-8 -*- -""" -SIGNIFY -signify.app.clienting module - -Testing clienting with integration tests that require a running KERIA Cloud Agent -""" - -import pytest -import requests -from keri import kering -from keri.core.coring import Tiers - -from signify.app.clienting import SignifyClient - - -def create_agent(): - url = "http://localhost:3901" - bran = b'9876543210abcdefghijk' - tier = Tiers.low - client = SignifyClient(passcode=bran, tier=tier) - print(client.controller) - assert client.controller == "EP5JMOzNfDL8WbpRiyLxrsVg7GF-HcjIOsceqeluauxj" - - evt, siger = client.ctrl.event() - - res = requests.post(url="http://localhost:3903/boot", - json=dict( - icp=evt.ked, - sig=siger.qb64, - stem=client.ctrl.stem, - pidx=1, - tier=client.ctrl.tier)) - - if res.status_code != requests.codes.accepted: - raise kering.AuthNError(f"unable to initialize cloud agent connection, {res.status_code}, {res.text}") - - client.connect(url=url, ) - assert client.agent is not None - print(client.agent.pre) - assert client.agent.pre == "EERMVxqeHfFo_eIvyzBXaKdT1EyobZdSs1QXuFyYLjmz" - assert client.agent.delpre == "EP5JMOzNfDL8WbpRiyLxrsVg7GF-HcjIOsceqeluauxj" - print("Person agent created") - - -if __name__ == "__main__": - create_agent() diff --git a/examples/scripts/create_multisig_aid.py b/examples/scripts/create_multisig_aid.py deleted file mode 100644 index c3b1e0db..00000000 --- a/examples/scripts/create_multisig_aid.py +++ /dev/null @@ -1,79 +0,0 @@ -# -*- encoding: utf-8 -*- -""" -SIGNIFY -signify.app.clienting module - -Testing clienting with integration tests that require a running KERIA Cloud Agent -""" -import json -from time import sleep - -from keri.app.keeping import Algos -from keri.core import eventing, coring -from keri.core.coring import Tiers -from keri.peer import exchanging -from signify.app.clienting import SignifyClient - - -def create_multisig_aid(): - url = "http://localhost:3901" - bran = b'9876543210abcdefghijk' - tier = Tiers.low - - client = SignifyClient(passcode=bran, tier=tier, url=url) - - identifiers = client.identifiers() - operations = client.operations() - states = client.keyStates() - exchanges = client.exchanges() - - aid = identifiers.get("multisig-sigpy") - sigPy = aid["state"] - - kli = states.get("EFBmwh8vdPTofoautCiEjjuA17gSlEnE3xc-xy-fGzWZ") - sigTs = states.get("ELViLL4JCh-oktYca-pmPLwkmUaeYjyPmCLxELAKZW8V") - - assert len(kli) == 1 - assert len(sigTs) == 1 - - states = rstates = [sigPy, kli[0], sigTs[0]] - for state in states: - print(json.dumps(state, indent=2)) - - icp, isigs, op = identifiers.create("multisig", algo=Algos.group, mhab=aid, - delpre="EHpD0-CDWOdu5RJ8jHBSUkOqBZ3cXeDVHWNb_Ul89VI7", - toad=2, - wits=[ - "BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha", - "BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM", - "BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX" - ], - isith=["1/3", "1/3", "1/3"], nsith=["1/3", "1/3", "1/3"], - states=states, - rstates=rstates) - - smids = ["EBcIURLpxmVwahksgrsGW6_dUw0zBhyEHYFk17eWrZfk", - "EFBmwh8vdPTofoautCiEjjuA17gSlEnE3xc-xy-fGzWZ", - "ELViLL4JCh-oktYca-pmPLwkmUaeYjyPmCLxELAKZW8V"] - recp = ["EFBmwh8vdPTofoautCiEjjuA17gSlEnE3xc-xy-fGzWZ", - "ELViLL4JCh-oktYca-pmPLwkmUaeYjyPmCLxELAKZW8V"] - - embeds = dict( - icp=eventing.messagize(serder=icp, sigers=[coring.Siger(qb64=sig) for sig in isigs]) - ) - - exchanges.send("multisig-sigpy", "multisig", sender=aid, route="/multisig/icp", - payload=dict(gid=icp.pre, smids=smids, rmids=smids), - embeds=embeds, recipients=recp) - - print("waiting on multisig creation...") - while not op["done"]: - op = operations.get(op["name"]) - sleep(1) - gAid = op["response"] - print(f"group multisig created:") - print(json.dumps(gAid, indent=2)) - - -if __name__ == "__main__": - create_multisig_aid() diff --git a/examples/scripts/create_person_aid.py b/examples/scripts/create_person_aid.py deleted file mode 100644 index 3ee70636..00000000 --- a/examples/scripts/create_person_aid.py +++ /dev/null @@ -1,81 +0,0 @@ -# -*- encoding: utf-8 -*- -""" -SIGNIFY -signify.app.clienting module - -Testing clienting with integration tests that require a running KERIA Cloud Agent -""" -from time import sleep - -from keri.core import coring -from keri.core.coring import Tiers - -from signify.app.clienting import SignifyClient - - -def create_aid(): - url = "http://localhost:3901" - bran = b'9876543210abcdefghijk' - tier = Tiers.low - - client = SignifyClient(passcode=bran, tier=tier, url=url) - - identifiers = client.identifiers() - operations = client.operations() - oobis = client.oobis() - - res = identifiers.list() - assert res["aids"] == [] - - wits = [ - "BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha", - "BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM", - "BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX" - ] - - _, _, op = identifiers.create("multisig-sigpy", bran="0123456789abcdefghijk", wits=wits, toad="2") - - while not op["done"]: - op = operations.get(op["name"]) - sleep(1) - - icp = coring.Serder(ked=op["response"]) - assert icp.pre == "EBcIURLpxmVwahksgrsGW6_dUw0zBhyEHYFk17eWrZfk" - print(f"Person AID {icp.pre} created") - - identifiers.addEndRole("multisig-sigpy", eid=client.agent.pre) - - print("multisig-sigpy resolving delegator...") - op = oobis.resolve( - oobi="http://127.0.0.1:5642/oobi/EHpD0-CDWOdu5RJ8jHBSUkOqBZ3cXeDVHWNb_Ul89VI7/witness/BBilc4-L3tFUnfM_wJr4S4OJ" - "anAv_VmF_dJNN6vkf2Ha", - alias="delegator") - while not op["done"]: - op = operations.get(op["name"]) - sleep(1) - print("... done") - - print("multisig-sigpy resolving multisig-kli...") - op = oobis.resolve( - oobi="http://127.0.0.1:5642/oobi/EFBmwh8vdPTofoautCiEjjuA17gSlEnE3xc-xy-fGzWZ", - alias="multisig-kli") - while not op["done"]: - op = operations.get(op["name"]) - sleep(1) - print("... done") - - input(f"\nPress any key after multisig-sigts is created? ") - - print("multisig-sigpy resolving multisig-sigts...") - op = oobis.resolve( - oobi="http://127.0.0.1:3902/oobi/ELViLL4JCh-oktYca-pmPLwkmUaeYjyPmCLxELAKZW8V/agent/EEXekkGu9IAzav6pZVJhkLnjt" - "jM5v3AcyA-pdKUcaGei", - alias="multisig-sigts") - while not op["done"]: - op = operations.get(op["name"]) - sleep(1) - print("... done") - - -if __name__ == "__main__": - create_aid() diff --git a/examples/scripts/create_rpys.py b/examples/scripts/create_rpys.py deleted file mode 100644 index 4760509d..00000000 --- a/examples/scripts/create_rpys.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- encoding: utf-8 -*- -""" -SIGNIFY -signify.app.clienting module - -Testing clienting with integration tests that require a running KERIA Cloud Agent -""" -import json -from time import sleep - -from keri.app.keeping import Algos -from keri.core.coring import Tiers -from signify.app.clienting import SignifyClient - - -def create_multisig_aid(): - url = "http://localhost:3901" - bran = b'9876543210abcdefghijk' - tier = Tiers.low - - client = SignifyClient(passcode=bran, tier=tier, url=url) - - identifiers = client.identifiers() - operations = client.operations() - states = client.keyStates() - - aid = identifiers.get("multisig-sigpy") - sigPy = aid["state"] - - kli = states.get("EFBmwh8vdPTofoautCiEjjuA17gSlEnE3xc-xy-fGzWZ") - sigTs = states.get("ELViLL4JCh-oktYca-pmPLwkmUaeYjyPmCLxELAKZW8V") - - assert len(kli) == 1 - assert len(sigTs) == 1 - - states = rstates = [sigPy, kli[0], sigTs[0]] - for state in states: - print(json.dumps(state, indent=2)) - - op = identifiers.create("multisig", algo=Algos.group, mhab=aid, - delpre="EHpD0-CDWOdu5RJ8jHBSUkOqBZ3cXeDVHWNb_Ul89VI7", - toad=2, - wits=[ - "BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha", - "BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM", - "BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX" - ], - isith=["1/3", "1/3", "1/3"], nsith=["1/3", "1/3", "1/3"], - states=states, - rstates=rstates) - print("waiting on multisig creation...") - while not op["done"]: - op = operations.get(op["name"]) - sleep(1) - gAid = op["response"] - print(f"group multisig created:") - print(json.dumps(gAid, indent=2)) - - -if __name__ == "__main__": - create_multisig_aid() diff --git a/examples/scripts/data/delegator.json b/examples/scripts/data/delegator.json deleted file mode 100644 index ad888229..00000000 --- a/examples/scripts/data/delegator.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "transferable": true, - "wits": [ - "BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha", - "BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM", - "BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX" - ], - "toad": 2, - "icount": 1, - "ncount": 1, - "isith": "1", - "nsith": "1" -} diff --git a/examples/scripts/data/gleif-sample.json b/examples/scripts/data/gleif-sample.json deleted file mode 100644 index 850aca03..00000000 --- a/examples/scripts/data/gleif-sample.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "transferable": true, - "wits": [ - "BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha", - "BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM", - "BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX" - ], - "toad": 3, - "icount": 1, - "ncount": 1, - "isith": "1", - "nsith": "1" -} diff --git a/examples/scripts/data/multisig-triple.json b/examples/scripts/data/multisig-triple.json deleted file mode 100644 index 893c6078..00000000 --- a/examples/scripts/data/multisig-triple.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "delpre": "EHpD0-CDWOdu5RJ8jHBSUkOqBZ3cXeDVHWNb_Ul89VI7", - "aids": [ - "EBcIURLpxmVwahksgrsGW6_dUw0zBhyEHYFk17eWrZfk", - "EFBmwh8vdPTofoautCiEjjuA17gSlEnE3xc-xy-fGzWZ", - "ELViLL4JCh-oktYca-pmPLwkmUaeYjyPmCLxELAKZW8V" - ], - "transferable": true, - "wits": [ - "BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha", - "BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM", - "BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX" - ], - "toad": 2, - "isith": ["1/3", "1/3", "1/3"], - "nsith": ["1/3", "1/3", "1/3"] -} diff --git a/examples/scripts/delegator.sh b/examples/scripts/delegator.sh deleted file mode 100755 index 451e1c8b..00000000 --- a/examples/scripts/delegator.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -kli init --name delegator --nopasscode --config-dir ${KERI_SCRIPT_DIR} --config-file demo-witness-oobis-schema --salt 0ACDEyMzQ1Njc4OWdoaWpsaw -kli incept --name delegator --alias delegator --file ${KERI_DEMO_SCRIPT_DIR}/data/delegator.json - -echo "Waiting for delegation request..." -kli delegate confirm --name delegator --alias delegator \ No newline at end of file diff --git a/examples/scripts/env.sh b/examples/scripts/env.sh deleted file mode 100644 index 70b867d6..00000000 --- a/examples/scripts/env.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -demo=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -export KERI_DEMO_SCRIPT_DIR="${demo}" -export KERI_SCRIPT_DIR="${demo}" \ No newline at end of file diff --git a/examples/scripts/get.py b/examples/scripts/get.py deleted file mode 100644 index 17e03e55..00000000 --- a/examples/scripts/get.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- encoding: utf-8 -*- -""" -SIGNIFY -signify.app.clienting module - -Testing clienting with integration tests that require a running KERIA Cloud Agent -""" -from pprint import pprint - -from keri.core.coring import Tiers -from signify.app.clienting import SignifyClient - - -def get(): - url = "http://localhost:3901" - bran = b'9876543210abcdefghijk' - tier = Tiers.low - - client = SignifyClient(passcode=bran, tier=tier, url=url) - - identifiers = client.identifiers() - - aid = identifiers.get("multisig") - pprint(aid) - -if __name__ == "__main__": - get() diff --git a/examples/scripts/keri/cf/demo-witness-oobis-schema.json b/examples/scripts/keri/cf/demo-witness-oobis-schema.json deleted file mode 100755 index 413d779a..00000000 --- a/examples/scripts/keri/cf/demo-witness-oobis-schema.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "dt": "2022-01-20T12:57:59.823350+00:00", - "iurls": [ - "http://127.0.0.1:5642/oobi/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha/controller", - "http://127.0.0.1:5644/oobi/BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX/controller", - "http://127.0.0.1:5643/oobi/BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM/controller" - ], - "durls": [ - "http://127.0.0.1:7723/oobi/EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy", - "http://127.0.0.1:7723/oobi/EMhvwOlyEJ9kN4PrwCpr9Jsv7TxPhiYveZ0oP3lJzdEi", - "http://127.0.0.1:7723/oobi/EKA57bKBKxr_kN7iN5i7lMUxpMG-s19dRcmov1iDxz-E", - "http://127.0.0.1:7723/oobi/EEy9PkikFcANV1l7EHukCeXqrzT1hNZjGlUk7wuMO5jw", - "http://127.0.0.1:7723/oobi/ENPXp1vQzRF6JwIuS-mp2U8Uf1MoADoP_GqQ62VsDZWY", - "http://127.0.0.1:7723/oobi/EH6ekLjSr8V32WyFbGe1zXjTzFs9PkTYmupJ9H65O14g", - "http://127.0.0.1:7723/oobi/EBfdlu8R27Fbx-ehrqwImnK-8Cm79sqbAQ4MmvEAYqao" - ] -} diff --git a/examples/scripts/list_aids.py b/examples/scripts/list_aids.py deleted file mode 100644 index bae4694e..00000000 --- a/examples/scripts/list_aids.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- encoding: utf-8 -*- -""" -SIGNIFY -signify.app.clienting module - -Testing clienting with integration tests that require a running KERIA Cloud Agent -""" - -from keri.core.coring import Tiers - -from signify.app.clienting import SignifyClient - - -def list_aids(): - url = "http://localhost:3901" - bran = b'9876543210abcdefghijk' - tier = Tiers.low - client = SignifyClient(passcode=bran, tier=tier, url=url) - - identifiers = client.identifiers() - res = identifiers.list() - for aid in res["aids"]: - print(f"{aid['name']}: {aid['prefix']}") - - -if __name__ == "__main__": - list_aids() diff --git a/examples/scripts/list_notifications.py b/examples/scripts/list_notifications.py deleted file mode 100644 index 2d59db10..00000000 --- a/examples/scripts/list_notifications.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- encoding: utf-8 -*- -""" -SIGNIFY -signify.app.clienting module - -Testing clienting with integration tests that require a running KERIA Cloud Agent -""" -import json -from pprint import pprint - -from keri.core import coring -from keri.core.coring import Tiers -from keri.core.eventing import messagize, SealEvent -from keri.peer import exchanging -from signify.app.clienting import SignifyClient - - -def list_notifications(): - url = "http://localhost:3901" - bran = b'9876543210abcdefghijk' - tier = Tiers.low - - client = SignifyClient(passcode=bran, tier=tier, url=url) - identifiers = client.identifiers() - notificatons = client.notifications() - groups = client.groups() - registries = client.registries() - - res = notificatons.list() - - for note in res["notes"]: - body = note['a'] - route = body['r'] - match route.split("/"): - case ["", "multisig", "icp"]: - pass - # print(body) - # print(f"Recv: inception request for multisig AID=BLAH") - case ["", "multisig", "vcp"]: - said = body['d'] - res = groups.get_request(said=said) - msg = next(exn for exn in res if exn['exn']['d'] == said) - - sender = msg['sender'] - group = msg["groupName"] - - exn = msg['exn'] - usage = exn['a']["usage"] - print(f"Credential registry inception request for group AID {group}:") - print(f"\tReceived from: {sender}") - print(f"\tPurpose: \"{usage}\"") - yes = input("Approve [Y|n]? ") - - if yes in ('', 'y', 'Y'): - registryName = input("Enter new local name for registry: ") - embeds = exn['e'] - vcp = embeds['vcp'] - ixn = embeds['ixn'] - serder = coring.Serder(ked=ixn) - ghab = identifiers.get(group) - - keeper = client.manager.get(aid=ghab) - sigs = keeper.sign(ser=serder.raw) - - ims = messagize(serder=serder, sigers=[coring.Siger(qb64=sig) for sig in sigs]) - embeds = dict( - vcp=coring.Serder(ked=vcp).raw, - ixn=ims - ) - - sender = ghab["group"]["mhab"] - keeper = client.manager.get(aid=sender) - exn, end = exchanging.exchange(route="/multisig/vcp", - payload={'gid': ghab["prefix"], 'usage': "test"}, - sender=sender["prefix"], embeds=embeds) - - esigs = keeper.sign(ser=exn.raw) - groups.send_request(group, exn.ked, esigs, end) - - return registries.create_from_events(name=group, hab=ghab, registryName=registryName, vcp=vcp, - ixn=ixn, sigs=sigs) - - -if __name__ == "__main__": - list_notifications() diff --git a/examples/scripts/list_notifications.ts b/examples/scripts/list_notifications.ts deleted file mode 100644 index 3001897e..00000000 --- a/examples/scripts/list_notifications.ts +++ /dev/null @@ -1,112 +0,0 @@ -import signify from 'signify-ts'; -import promptSync from 'prompt-sync'; - -const prmpt = promptSync({ sigint: true }); - -await list_notifications(); - -async function list_notifications() { - const url = 'http://127.0.0.1:3901'; - const bran = '0123456789abcdefghijk'; - - await signify.ready(); - const client = new signify.SignifyClient(url, bran); - await client.connect(); - const d = await client.state(); - console.log('Connected: '); - console.log(' Agent: ', d.agent.i, ' Controller: ', d.controller.state.i); - - const identifiers = client.identifiers(); - const notifications = client.notifications(); - const groups = client.groups(); - const registries = client.registries(); - - const res = await notifications.list(); - const notes = res.notes; - - for (const note of notes) { - const payload = note.a; - const route = payload.r; - - if (route === '/multisig/vcp') { - const res = await groups.getRequest(payload.d); - if (res.length == 0) { - console.log( - 'error extracting exns matching nre for ' + payload.data - ); - } - const msg = res[0]; - - let sender = msg['sender']; - const group = msg['groupName']; - - const exn = msg['exn']; - const usage = exn['a']['usage']; - console.log( - 'Credential registry inception request for group AID :' + group - ); - console.log('\tReceived from: ' + sender); - console.log('\tPurpose: ' + usage); - console.log('\nAuto-creating new registry...'); - const yes = prmpt('Approve [Y|n]? '); - if (yes === 'y' || yes === 'Y' || yes === '') { - try { - const registryName = prmpt( - 'Enter new local name for registry: ' - ); - let embeds = exn['e']; - const vcp = embeds['vcp']; - const ixn = embeds['ixn']; - const serder = new signify.Serder(ixn); - const ghab = await identifiers.get(group); - - let keeper = client.manager!.get(ghab); - const sigs = keeper.sign(signify.b(serder.raw)); - const sigers = sigs.map( - (sig: any) => new signify.Siger({ qb64: sig }) - ); - - const ims = signify.d(signify.messagize(serder, sigers)); - const atc = ims.substring(serder.size); - embeds = { - vcp: [new signify.Serder(vcp), undefined], - ixn: [serder, atc], - }; - - sender = ghab['group']['mhab']; - keeper = client.manager!.get(sender); - const [nexn, end] = signify.exchange( - '/multisig/vcp', - { gid: ghab['prefix'], usage: 'test' }, - sender['prefix'], - undefined, - undefined, - undefined, - undefined, - embeds - ); - - console.log(nexn.pretty()); - const esigs = keeper.sign(signify.b(nexn.raw)); - await groups.sendRequest( - group, - nexn.ked, - esigs, - signify.d(end) - ); - - return await registries.createFromEvents( - ghab, - group, - registryName, - vcp, - ixn, - sigs - ); - } catch (e: any) { - console.log(e); - } - } - } - } -} diff --git a/examples/scripts/make_endroles.ts b/examples/scripts/make_endroles.ts deleted file mode 100644 index 16f48dda..00000000 --- a/examples/scripts/make_endroles.ts +++ /dev/null @@ -1,58 +0,0 @@ -import signify from 'signify-ts'; - -await makeends(); - -async function makeends() { - const url = 'http://127.0.0.1:3901'; - const bran = '0123456789abcdefghijk'; - - await signify.ready(); - const client = new signify.SignifyClient(url, bran); - await client.connect(); - const d = await client.state(); - console.log('Connected: '); - console.log(' Agent: ', d.agent.i, ' Controller: ', d.controller.state.i); - - const identifiers = client.identifiers(); - const escrows = client.escrows(); - - const members = await identifiers.members('multisig'); - const hab = await identifiers.get('multisig'); - const aid = hab['prefix']; - const signing = members['signing']; - - const auths = new Map(); - const stamp = new Date(); - - signing.forEach((end: any) => { - const ends = end['ends']; - const roles = ['agent', 'mailbox']; - roles.forEach((role) => { - if (role in ends) { - Object.keys(ends[role]).forEach((k: any) => { - const key = [aid, role, k].join('.'); - auths.set(key, stamp); - }); - } - }); - }); - - const rpys = await escrows.listReply('/end/role'); - - rpys.forEach((rpy: object) => { - const serder = new signify.Serder(rpy); - const payload = serder.ked['a']; - - const key = Object.values(payload).join('.'); - const then = new Date(Date.parse(serder.ked['dt'])); - if (auths.has(key) && then < stamp) { - identifiers.addEndRole( - 'multisig', - payload['role'], - payload['eid'], - serder.ked['dt'] - ); - auths.set(key, then); // track signed role auths by timestamp signed - } - }); -} diff --git a/examples/scripts/multisig-create-credential.sh b/examples/scripts/multisig-create-credential.sh deleted file mode 100755 index f7ca316f..00000000 --- a/examples/scripts/multisig-create-credential.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -npx --package=signify-ts ts-node --esm multisig-create-credential.ts diff --git a/examples/scripts/multisig-create-credential.ts b/examples/scripts/multisig-create-credential.ts deleted file mode 100644 index 78174123..00000000 --- a/examples/scripts/multisig-create-credential.ts +++ /dev/null @@ -1,271 +0,0 @@ -import signify from 'signify-ts'; - -await connect(); - -async function connect() { - const url = 'http://127.0.0.1:3901'; - const bran = '0123456789abcdefghijk'; - - await signify.ready(); - const client = new signify.SignifyClient(url, bran); - console.log(client.controller.pre); - const [evt, sign] = client.controller?.event ?? []; - const data = { - icp: evt.ked, - sig: sign.qb64, - stem: client.controller?.stem, - pidx: 1, - tier: client.controller?.tier, - }; - - await fetch('http://127.0.0.1:3903/boot', { - method: 'POST', - body: JSON.stringify(data), - headers: { - 'Content-Type': 'application/json', - }, - }); - - await client.connect(); - const d = await client.state(); - console.log('Connected: '); - console.log(' Agent: ', d.agent.i, ' Controller: ', d.controller.state.i); - - const identifiers = client.identifiers(); - const oobis = client.oobis(); - const operations = client.operations(); - const exchanges = client.exchanges(); - - const salt = '0123456789lmnopqrstuv'; - const res = await identifiers.create('agent0', { bran: salt }); - let op = await res.op(); - let aid = op['response']; - - await identifiers.addEndRole('agent0', 'agent', d.agent.i); - - console.log('Created AID: ', aid); - - console.log('Resolving multisig1...'); - op = await oobis.resolve( - 'http://127.0.0.1:5642/oobi/EKYLUMmNPZeEs77Zvclf0bSN5IN-mLfLpx2ySb-HDlk4/witness', - 'multisig1' - ); - while (!op['done']) { - op = await operations.get(op['name']); - await new Promise((resolve) => setTimeout(resolve, 1000)); // sleep for 1 second - } - console.log('done.'); - const multisig1 = op['response']; - - console.log('Resolving multisig2...'); - op = await oobis.resolve( - 'http://127.0.0.1:5642/oobi/EJccSRTfXYF6wrUVuenAIHzwcx3hJugeiJsEKmndi5q1/witness', - 'multisig2' - ); - while (!op['done']) { - op = await operations.get(op['name']); - await new Promise((resolve) => setTimeout(resolve, 1000)); // sleep for 1 second - } - console.log('done.'); - const multisig2 = op['response']; - - aid = await identifiers.get('agent0'); - const agent0 = aid['state']; - - const states = [multisig2, multisig1, agent0]; - const ires = await identifiers.create('multisig', { - algo: signify.Algos.group, - mhab: aid, - toad: 3, - wits: [ - 'BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha', - 'BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM', - 'BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX', - ], - isith: ['1/3', '1/3', '1/3'], - nsith: ['1/3', '1/3', '1/3'], - states: states, - rstates: states, - }); - - let serder = ires.serder; - let sigs = ires.sigs; - let sigers = sigs.map((sig: any) => new signify.Siger({ qb64: sig })); - - let ims = signify.d(signify.messagize(serder, sigers)); - let atc = ims.substring(serder.size); - const embeds = { - icp: [serder, atc], - }; - - const smids = states.map((state) => state['i']); - let recp = [multisig2, multisig1].map((state) => state['i']); - - await exchanges.send( - 'agent0', - 'multisig', - aid, - '/multisig/icp', - { gid: serder.pre, smids: smids, rmids: smids }, - embeds, - recp - ); - - const multisigAID = serder.pre; - console.log('Waiting for multisig AID to be created'); - - op = await ires.op(); - while (!op['done']) { - op = await operations.get(op['name']); - await new Promise((resolve) => setTimeout(resolve, 1000)); // sleep for 1 second - } - console.log('done.'); - - console.log('Resolving schema...'); - op = await oobis.resolve( - 'http://127.0.0.1:7723/oobi/EBfdlu8R27Fbx-ehrqwImnK-8Cm79sqbAQ4MmvEAYqao', - 'schema' - ); - while (!op['done']) { - op = await operations.get(op['name']); - await new Promise((resolve) => setTimeout(resolve, 1000)); // sleep for 1 second - } - console.log('done.'); - const schemaSAID = 'EBfdlu8R27Fbx-ehrqwImnK-8Cm79sqbAQ4MmvEAYqao'; - - console.log('Creating registry...'); - const vcpRes1 = await client.registries().create({ - name: 'multisig', - registryName: 'vLEI Registry', - nonce: 'AHSNDV3ABI6U8OIgKaj3aky91ZpNL54I5_7-qwtC6q2s', - }); - - let op1 = await vcpRes1.op(); - serder = vcpRes1.regser; - const regk = serder.pre; - const anc = vcpRes1.serder; - sigs = vcpRes1.sigs; - - sigers = sigs.map((sig: any) => new signify.Siger({ qb64: sig })); - ims = signify.d(signify.messagize(anc, sigers)); - atc = ims.substring(anc.size); - - const regbeds = { - vcp: [serder, ''], - anc: [anc, atc], - }; - - recp = [ - 'EKYLUMmNPZeEs77Zvclf0bSN5IN-mLfLpx2ySb-HDlk4', - 'EJccSRTfXYF6wrUVuenAIHzwcx3hJugeiJsEKmndi5q1', - ]; - await client - .exchanges() - .send( - 'agent0', - 'multisig', - aid, - '/multisig/vcp', - { gid: multisigAID, usage: 'Issue vLEIs' }, - regbeds, - recp - ); - - while (!op1['done']) { - op1 = await operations.get(op1['name']); - await new Promise((resolve) => setTimeout(resolve, 1000)); // sleep for 1 second - } - console.log('done.'); - - console.log('Creating credential from multisig...'); - // Issue credential - const vcdata = { - LEI: '5493001KJTIIGC8Y1R17', - }; - const holder = 'ELjSFdrTdCebJlmvbFNX9-TLhR2PO0_60al1kQp5_e6k'; - - const TIME = '2023-09-25T16:01:37.000000+00:00'; - const credRes = await client - .credentials() - .issue( - 'multisig', - regk, - schemaSAID, - holder, - vcdata, - undefined, - undefined, - TIME - ); - op1 = await credRes.op(); - - const acdc = new signify.Serder(credRes.acdc); - const iss = credRes.iserder; - const ianc = credRes.anc; - const isigs = credRes.sigs; - - sigers = isigs.map((sig: any) => new signify.Siger({ qb64: sig })); - ims = signify.d(signify.messagize(ianc, sigers)); - atc = ims.substring(anc.size); - - const vcembeds = { - acdc: [acdc, ''], - iss: [iss, ''], - anc: [ianc, atc], - }; - - await client - .exchanges() - .send( - 'agent0', - 'multisig', - aid, - '/multisig/iss', - { gid: multisigAID }, - vcembeds, - recp - ); - - while (!op1['done']) { - op1 = await client.operations().get(op1.name); - await new Promise((resolve) => setTimeout(resolve, 1000)); - } - - console.log('Creating IPEX grant message to send...'); - - const [grant, gsigs, end] = await client - .ipex() - .grant('multisig', holder, '', acdc, iss, ianc, atc, undefined, TIME); - const m = await client.identifiers().get('multisig'); - - const mstate = m['state']; - const seal = [ - 'SealEvent', - { i: m['prefix'], s: mstate['ee']['s'], d: mstate['ee']['d'] }, - ]; - sigers = gsigs.map((sig: any) => new signify.Siger({ qb64: sig })); - - const gims = signify.d( - signify.messagize(grant, sigers, seal, undefined, undefined, true) - ); - atc = gims.substring(grant.size); - atc += end; - - const gembeds: any = { - exn: [grant, atc], - }; - - await client - .exchanges() - .send( - 'agent0', - 'multisig', - aid, - '/multisig/exn', - { gid: multisigAID }, - gembeds, - recp - ); - - console.log('... done!'); -} diff --git a/examples/scripts/multisig-kli.sh b/examples/scripts/multisig-kli.sh deleted file mode 100755 index 54a4ae4b..00000000 --- a/examples/scripts/multisig-kli.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# To run this script you need to run the following command in a separate terminals: -# > kli witness demo -# and from the vLEI repo run: -# > vLEI-server -s ./schema/acdc -c ./samples/acdc/ -o ./samples/oobis/ -# - -# EFBmwh8vdPTofoautCiEjjuA17gSlEnE3xc-xy-fGzWZ -kli init --name multisig-kli --salt 0ACDEyMzQ1Njc4OWxtbm9GhI --nopasscode --config-dir "${KERI_SCRIPT_DIR}" --config-file demo-witness-oobis-schema -kli incept --name multisig-kli --alias multisig-kli --file "${KERI_DEMO_SCRIPT_DIR}"/data/gleif-sample.json -kli ends add --name multisig-kli --alias multisig-kli --role mailbox --eid BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX - -read -n 1 -r -p "Press any key after multisig-sigpy and multisig-sigts have been created:" - -kli oobi resolve --name multisig-kli --oobi-alias delegator --oobi http://127.0.0.1:5642/oobi/EHpD0-CDWOdu5RJ8jHBSUkOqBZ3cXeDVHWNb_Ul89VI7/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha -kli oobi resolve --name multisig-kli --oobi-alias multisig-sigpy --oobi http://127.0.0.1:3902/oobi/EBcIURLpxmVwahksgrsGW6_dUw0zBhyEHYFk17eWrZfk/agent/EERMVxqeHfFo_eIvyzBXaKdT1EyobZdSs1QXuFyYLjmz -kli oobi resolve --name multisig-kli --oobi-alias multisig-sigts --oobi http://127.0.0.1:3902/oobi/ELViLL4JCh-oktYca-pmPLwkmUaeYjyPmCLxELAKZW8V/agent/EEXekkGu9IAzav6pZVJhkLnjtjM5v3AcyA-pdKUcaGei - -kli multisig incept --name multisig-kli --alias multisig-kli --group multisig --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-triple.json - -read -n 1 -r -p "Press any key to create endpoints for multisig AID..." - - -kli ends add --name multisig-kli --alias multisig --role mailbox --eid BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX diff --git a/examples/scripts/multisig-sigpy.sh b/examples/scripts/multisig-sigpy.sh deleted file mode 100755 index bb7f667d..00000000 --- a/examples/scripts/multisig-sigpy.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - - -python "${KERI_SCRIPT_DIR}"/create_agent.py -python "${KERI_SCRIPT_DIR}"/create_person_aid.py -python "${KERI_SCRIPT_DIR}"/create_multisig_aid.py - -read -n 1 -r -p "Press any key to create endpoints for multisig AID..." - -python "${KERI_SCRIPT_DIR}"/multisig_endrole.py diff --git a/examples/scripts/multisig-sigts.sh b/examples/scripts/multisig-sigts.sh deleted file mode 100755 index 4f2e0d7a..00000000 --- a/examples/scripts/multisig-sigts.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - - -npx --package=signify-ts ts-node --esm client.ts - -read -n 1 -r -p "Press any key to create endpoints for multisig AID..." - -npx --package=signify-ts ts-node --esm make_endroles.ts \ No newline at end of file diff --git a/examples/scripts/multisig_endrole.py b/examples/scripts/multisig_endrole.py deleted file mode 100644 index 07045db1..00000000 --- a/examples/scripts/multisig_endrole.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- encoding: utf-8 -*- -""" -SIGNIFY -signify.app.clienting module - -Testing clienting with integration tests that require a running KERIA Cloud Agent -""" - -import json -from time import sleep - -from keri.app.keeping import Algos -from keri.core import coring -from keri.core.coring import Tiers -from keri.help import helping -from signify.app.clienting import SignifyClient - -url = "http://localhost:3901" -bran = b'9876543210abcdefghijk' -tier = Tiers.low - -def authorize_endroles(): - client = SignifyClient(passcode=bran, tier=tier, url=url) - identifiers = client.identifiers() - escrows = client.escrows() - endroles = client.endroles() - - members = identifiers.members("multisig") - hab = identifiers.get("multisig") - aid = hab["prefix"] - - auths = {} - stamp = helping.nowUTC() - - for member in members['signing']: - ends = member["ends"] - if not ends: - print("\tNone") - - for role in ("agent", "mailbox"): - if role in ends: - for k, v in ends[role].items(): - auths[(aid, role, k)] = stamp - - rpys = escrows.getEscrowReply(route="/end/role") - for rpy in rpys: - serder = coring.Serder(ked=rpy) - payload = serder.ked['a'] - keys = tuple(payload.values()) - then = helping.fromIso8601(serder.ked["dt"]) - if keys in auths and then < stamp: - identifiers.addEndRole("multisig", role=payload["role"], eid=payload['eid'], stamp=helping.toIso8601(then)) - auths[keys] = then # track signed role auths by timestamp signed - - print("Waiting for approvals from other members...") - authKeys = set(auths.keys()) - while authKeys - endrole_set(endroles, "multisig"): - rpys = escrows.getEscrowReply(route="/end/role") - for rpy in rpys: - serder = coring.Serder(ked=rpy) - payload = serder.ked['a'] - keys = tuple(payload.values()) - if keys in auths: - then = helping.fromIso8601(serder.ked["dt"]) - stamp = auths[keys] - - if stamp == then: - continue - - if then < stamp: - print(f"authing {payload} - {then}") - identifiers.addEndRole("multisig", role=payload["role"], eid=payload['eid'], - stamp=serder.ked["dt"]) - auths[keys] = then # track signed role auths by timestamp signed - - print("All endpoint role authorizations approved") - - -def endrole_set(er, name): - ends = er.list(name=name) - return {(end['cid'], end['role'], end['eid']) for end in ends} - - -def list_endroles(): - client = SignifyClient(passcode=bran, tier=tier, url=url) - - endroles = client.endroles() - print(endrole_set(endroles, "multisig")) - - -if __name__ == "__main__": - authorize_endroles() - # list_endroles() diff --git a/examples/scripts/package.json b/examples/scripts/package.json deleted file mode 100644 index dfd189ff..00000000 --- a/examples/scripts/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "type": "module", - "private": true, - "dependencies": { - "prompt-sync": "^4.2.0", - "signify-ts": "*" - }, - "devDependencies": { - "@types/prompt-sync": "^4.2.2" - } -} diff --git a/examples/scripts/stream_escrows.py b/examples/scripts/stream_escrows.py deleted file mode 100644 index c5a5058c..00000000 --- a/examples/scripts/stream_escrows.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- encoding: utf-8 -*- -""" -SIGNIFY -signify.app.clienting module - -Testing clienting with integration tests that require a running KERIA Cloud Agent -""" -import json -from time import sleep - -from keri.app.keeping import Algos -from keri.core.coring import Tiers -from signify.app.clienting import SignifyClient - - -def stream_escrows(): - url = "http://localhost:3901" - bran = b'9876543210abcdefghijk' - tier = Tiers.low - - client = SignifyClient(passcode=bran, tier=tier, url=url) - - endroles = client.endroles() - - - - - escrows = client.escrows() - - for rpy in escrows.getEscrowReplyIter(route="/end/role"): - print(rpy) - - -if __name__ == "__main__": - stream_escrows() diff --git a/examples/scripts/tsconfig.json b/examples/scripts/tsconfig.json deleted file mode 100644 index 6c19b63b..00000000 --- a/examples/scripts/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.node.json", - "compilerOptions": { - "noEmit": true, - "paths": { - "signify-ts": ["../../src"] - } - } -} From 7dac183c379b1382566670459fa77996568769ef Mon Sep 17 00:00:00 2001 From: pfeairheller Date: Thu, 7 Dec 2023 11:06:35 -0800 Subject: [PATCH 2/3] Resolve conflicts. --- package-lock.json | 73 ++++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/package-lock.json b/package-lock.json index c750249c..ca2b9a07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,6 +55,7 @@ } }, "examples/scripts": { + "extraneous": true, "dependencies": { "prompt-sync": "^4.2.0", "signify-ts": "*" @@ -2232,11 +2233,42 @@ "optional": true, "peer": true }, - "node_modules/@types/prompt-sync": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@types/prompt-sync/-/prompt-sync-4.2.3.tgz", - "integrity": "sha512-Ox77gCSx0YyeakGt/qfOZUSFNSSi+sh3ABoGOiCwiO2KODx492BJnUm9oIXS+AHJtqp12iM4RduY6viTJ9bYwA==", - "dev": true + "node_modules/@types/prop-types": { + "version": "15.7.10", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.10.tgz", + "integrity": "sha512-mxSnDQxPqsZxmeShFH+uwQ4kO4gcJcGahjjMFeLbKE95IAZiiZyiEepGZjtXJ7hN/yfu0bu9xN2ajcU0JcxX6A==" + }, + "node_modules/@types/react": { + "version": "18.2.37", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.37.tgz", + "integrity": "sha512-RGAYMi2bhRgEXT3f4B92WTohopH6bIXw05FuGlmJEnv/omEn190+QYEIYxIAuIBdKgboYYdVved2p1AxZVQnaw==", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.2.15", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.15.tgz", + "integrity": "sha512-HWMdW+7r7MR5+PZqJF6YFNSCtjz1T0dsvo/f1BV6HkV+6erD/nA7wd9NM00KVG83zf2nJ7uATPO9ttdIPvi3gg==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-transition-group": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.9.tgz", + "integrity": "sha512-ZVNmWumUIh5NhH8aMD9CR2hdW0fNuYInlocZHaZ+dgk/1K49j1w/HoAuK1ki+pgscQrOFRTlXeoURtuzEkV3dg==", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/scheduler": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.6.tgz", + "integrity": "sha512-Vlktnchmkylvc9SnwwwozTv04L/e1NykF5vgoQ0XTmI8DD+wxfjQuHuvHS3p0r2jz2x2ghPs2h1FVeDirIteWA==" }, "node_modules/@types/semver": { "version": "7.5.5", @@ -10390,33 +10422,6 @@ "integrity": "sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==", "dev": true }, - "node_modules/prompt-sync": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz", - "integrity": "sha512-BuEzzc5zptP5LsgV5MZETjDaKSWfchl5U9Luiu8SKp7iZWD5tZalOxvNcZRwv+d2phNFr8xlbxmFNcRKfJOzJw==", - "dependencies": { - "strip-ansi": "^5.0.0" - } - }, - "node_modules/prompt-sync/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "engines": { - "node": ">=6" - } - }, - "node_modules/prompt-sync/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -10924,10 +10929,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/scripts": { - "resolved": "examples/scripts", - "link": true - }, "node_modules/seedrandom": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", diff --git a/package.json b/package.json index 9897982a..2572e996 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "build": "npm run build:cjs && npm run build:esm && npm run build:types", "test": "jest test/", "test:integration": "jest examples/integration-scripts/ --runInBand --bail", - "lint": "npx eslint src test examples/integration-scripts examples/scripts", + "lint": "npx eslint src test examples/integration-scripts", "prepare": "npm run build", "generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose", "pretty": "prettier --config .prettierrc 'src/**/*.ts' 'test/**/*.ts' 'examples/**/*.ts' --write", From a3395cbd4230f72f846523d74d03a80aa55d659c Mon Sep 17 00:00:00 2001 From: pfeairheller Date: Thu, 7 Dec 2023 11:30:54 -0800 Subject: [PATCH 3/3] Re-run npm i... again --- package-lock.json | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/package-lock.json b/package-lock.json index ca2b9a07..b031795d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2233,43 +2233,6 @@ "optional": true, "peer": true }, - "node_modules/@types/prop-types": { - "version": "15.7.10", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.10.tgz", - "integrity": "sha512-mxSnDQxPqsZxmeShFH+uwQ4kO4gcJcGahjjMFeLbKE95IAZiiZyiEepGZjtXJ7hN/yfu0bu9xN2ajcU0JcxX6A==" - }, - "node_modules/@types/react": { - "version": "18.2.37", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.37.tgz", - "integrity": "sha512-RGAYMi2bhRgEXT3f4B92WTohopH6bIXw05FuGlmJEnv/omEn190+QYEIYxIAuIBdKgboYYdVved2p1AxZVQnaw==", - "dependencies": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - }, - "node_modules/@types/react-dom": { - "version": "18.2.15", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.15.tgz", - "integrity": "sha512-HWMdW+7r7MR5+PZqJF6YFNSCtjz1T0dsvo/f1BV6HkV+6erD/nA7wd9NM00KVG83zf2nJ7uATPO9ttdIPvi3gg==", - "dev": true, - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/react-transition-group": { - "version": "4.4.9", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.9.tgz", - "integrity": "sha512-ZVNmWumUIh5NhH8aMD9CR2hdW0fNuYInlocZHaZ+dgk/1K49j1w/HoAuK1ki+pgscQrOFRTlXeoURtuzEkV3dg==", - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/scheduler": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.6.tgz", - "integrity": "sha512-Vlktnchmkylvc9SnwwwozTv04L/e1NykF5vgoQ0XTmI8DD+wxfjQuHuvHS3p0r2jz2x2ghPs2h1FVeDirIteWA==" - }, "node_modules/@types/semver": { "version": "7.5.5", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz",