Skip to content

Commit a1eb27f

Browse files
committed
Dock updates for json demo
Signed-off-by: Ian Costanzo <ian@anon-solutions.ca>
1 parent fb6c69c commit a1eb27f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

demo/AliceWantsAJsonCredential.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ Open up a second shell (so you have 2 shells open in the `demo` directory) and i
2929

3030
Note that you start the `faber` agent with AIP2.0 options. (When you specify `--cred-type json-ld` faber will set aip to `20` automatically, so the `--aip` option is not strictly required.)
3131

32+
Also note that the above will only work with the `/issue-credential-2.0/create-offer` endpoint. If you want to use the `/issue-credential-2.0/send` endpoint - which automates each step of the credential exchange - you will need to include the `--no-auto` option when starting each of the alice and faber agents (since the alice and faber controllers *also* automatically respond to each step in the credential exchange).
33+
3234
(Alternately you can run run Alice and Faber agents locally, see the `./faber-local.sh` and `./alice-local.sh` scripts in the `demo` directory.)
3335

3436
Copy the "invitation" json text from the Faber shell and paste into the Alice shell to establish a connection between the two agents.
3537

38+
(If you are running with `--no-auto` you will also need to call the `/connections/accept-invitation` endpoint in alice's admin api swagger page.)
39+
3640
Now open up two browser windows to the [Faber](http://localhost:8021/api/doc) and [Alice](http://localhost:8031/api/doc) admin api swagger pages.
3741

3842
Using the Faber admin api, you have to create a DID with the appropriate:
@@ -78,7 +82,9 @@ Congradulations, you are now ready to start issuing JSON-LD credentials!
7882
- You have created a (non-public) DID for Faber to use to sign/issue the credentials - you will need to copy the DID that you created above into the examples below (as `issuer`).
7983
- You have created a (non-public) DID for Alice to use as her `credentialSubject.id` - this is required for Alice to sign the proof (the `credentialSubject.id` is not required, but then the provided presentation can't be verified).
8084

81-
To issue a credential, use the `/issue-credential-2.0/send` (or `/issue-credential-2.0/create-offer`) endpoint, you can test with this example payload (just replace the "connection_id", "issuer" key, "credentialSubject.id" and "proofType" with appropriate values:
85+
To issue a credential, use the `/issue-credential-2.0/send` (or `/issue-credential-2.0/create-offer`) endpoint. As mentioned above, if you are using the `/send` endpoint, you need to make sure to include `--no-auto` when starting both of the agents.
86+
87+
You can test with this example payload (just replace the "connection_id", "issuer" key, "credentialSubject.id" and "proofType" with appropriate values:
8288

8389
```
8490
{
@@ -174,6 +180,8 @@ To see the issued credential, call the `/credentials/w3c` endpoint on Alice's ad
174180
}
175181
```
176182

183+
If you *don't* see the credential in your wallet, look up the credential exchange record (in alice's admin api - `/issue-credential-2.0/records`) and check the state. If the state is `credential-received`, then the credential has been received but not stored, in this case just call the `/store` endpoint for this credential exchange.
184+
177185

178186
## Building More Realistic JSON-LD Credentials
179187

0 commit comments

Comments
 (0)