didkit
didkit copied to clipboard
Verify Invocation Assumes Delegation
Using the node module, I am attempting to verify the invocation of a root capability. I.e. a capability before it has been delegated.
I run into the error: missing field
parentCapability``
I believe this is because the verify_invocation funtion is expecting a Delegation.
I could also just be implementing this wrong. But have you tested verifying an invocation of a root capability?
I seem to be able to generate the root invocation without issues.
{
'@context': 'https://w3id.org/security/v2',
id: 'urn:uuid:ad86cb2c-e9db-434a-beae-71b82120a8a4',
capabilityAction: 'write',
proof: {
type: 'Ed25519Signature2018',
proofPurpose: 'capabilityInvocation',
verificationMethod: 'did:key:z6MkrtW3VfiCytTetfGhpj1aERSBqwUT2zsvwu6djfDkgZcN#z6MkrtW3VfiCytTetfGhpj1aERSBqwUT2zsvwu6djfDkgZcN',
created: '2023-10-03T20:59:16.105Z',
jws: 'eyJhbGciOiJFZERTQSIsImNyaXQiOlsiYjY0Il0sImI2NCI6ZmFsc2V9..FAVjy5hA1831FUhZjD8-dOsavFC5zssRaHM36KwMQqCeYF9WysUCHNC57PL2OSAtounKEdZp7i_WB2k074wNCw',
capability: 'urn:zcap:root:did%3Akey%3Az6MkrtW3VfiCytTetfGhpj1aERSBqwUT2zsvwu6djfDkgZcN'
}
}
I just can't verify.
I have managed to verify an invoked delegation of this capability however.