-
Notifications
You must be signed in to change notification settings - Fork 0
Description
This is the next step towards implementing the full WAS/LinkedCreds Author integration flow, with the aim to de-risk ZcapClient creation and usage on the LinkedCreds Author side.
-
If the wallet receives a zCap request (so, in
handleZcapRequestfunction), if a WAS connection has not been made (if there is no root signer basically), display a warning to the user, "This request first requires you to set up a WAS connection. Go to the dev menu and enable 'Connect to WAS.". And then cancel the workflow. -
Change the delegated query to something like the following:
const invocationTarget = (new URL(`/space/${spaceId}`, WAS.BASE_URL)).toString()
const allowedAction = ['GET', 'POST', 'PUT', 'DELETE']
const delegatedZcap = await zcapClient.delegate({
capability: parentCapability,
controller,
invocationTarget,
allowedActions,
expires: ZCAP_EXPIRES.toISOString()
});- return it in a
{ zcap }object, as currently.
What we're doing here is (temporarily) creating a general purpose zCap to read and write to a space, that LinkedCreds Author can use to store evidence documents.
(While we're waiting for the 'List collection contents' functionality to be available)