-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Client for new ipex admit API and updated issue-ecr.sh to work with IPEX
Signed-off-by: pfeairheller <pfeairheller@gmail.com>
- Loading branch information
1 parent
c48847d
commit 39db004
Showing
7 changed files
with
132 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# -*- encoding: utf-8 -*- | ||
""" | ||
SIGNIFY | ||
signify.app.clienting module | ||
Testing clienting with integration tests that require a running KERIA Cloud Agent | ||
""" | ||
import sys | ||
|
||
from keri.core.coring import Tiers | ||
from keri.vc.proving import Creder | ||
|
||
from signify.app.clienting import SignifyClient | ||
|
||
|
||
def list_ipex(): | ||
url = "http://localhost:3901" | ||
bran = b'0123456789abcdefghijk' | ||
tier = Tiers.low | ||
|
||
client = SignifyClient(passcode=bran, tier=tier, url=url) | ||
notificatons = client.notifications() | ||
|
||
notes = notificatons.list() | ||
for note in notes["notes"]: | ||
a = note['a'] | ||
if a['r'].startswith("/exn/ipex/"): | ||
print(a['d']) | ||
|
||
|
||
if __name__ == "__main__": | ||
list_ipex() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# -*- encoding: utf-8 -*- | ||
""" | ||
SIGNIFY | ||
signify.app.clienting module | ||
Testing clienting with integration tests that require a running KERIA Cloud Agent | ||
""" | ||
import sys | ||
|
||
from keri.core.coring import Tiers | ||
|
||
from signify.app.clienting import SignifyClient | ||
|
||
|
||
def send_admit(grant, recp): | ||
url = "http://localhost:3901" | ||
bran = b'0123456789abcdefghijk' | ||
tier = Tiers.low | ||
|
||
client = SignifyClient(passcode=bran, tier=tier, url=url) | ||
|
||
identifiers = client.identifiers() | ||
|
||
hab = identifiers.get("BankUser") | ||
create_admit(client, hab, grant, recp) | ||
|
||
|
||
def create_admit(client, hab, said, recp, dt=None): | ||
ipex = client.ipex() | ||
admit, sigs, atc = ipex.admit(hab, "", said, dt=dt) | ||
|
||
ipex.submitAdmit(hab['name'], exn=admit, sigs=sigs, atc=atc, recp=recp) | ||
|
||
|
||
if __name__ == "__main__": | ||
send_admit(sys.argv[1], sys.argv[2]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters