I'm trying to issue a credential via the /vcwallet/issue endpoint with a key that I created beforehand via /vcwallet/create-key-pair.
Expected result
Credential with an added proof section.
Actual result
Error:
{
"code": 12010,
"message": "failed to issue credential: getKeySet: failed to read json keyset from reader: cannot read data for keysetID z6MksNRMoWkz5UdGgSkpbMS83FvRkKzNN5XAbbF2gLgWCmCe: failed to get DB entry: data not found"
}
Sample code / test case
I created a key pair via the /vcwallet/create-key-pair endpoint
Furthermore, I'm wondering whether splitting the verification method is enough to find the right key. In my understanding the steps to find the right key are:
resolve the DID document referenced by verificationMethod (split('#')[0]) - this step happens
find the public key with id split('#')[1] - this step seems to be missing
decode the public key and pass it to the key manager - this step seems to be missing
instead split('#')[1] is used as public key or key id
What I'm trying to do
I'm trying to issue a credential via the
/vcwallet/issue
endpoint with a key that I created beforehand via/vcwallet/create-key-pair
.Expected result
Credential with an added proof section.
Actual result
Error:
Sample code / test case
/vcwallet/create-key-pair
endpoint/vcwallet/issue
endpointIt looks like the verification method isn't properly turned into a keyID that can key found by the key manager. Instead the verification method is directly fed to
keyManager.Get()
: https://github.com/hyperledger/aries-framework-go/blob/main/pkg/wallet/kmsclient.go#L271Also the test cases only test the error cases but not the happy case: https://github.com/hyperledger/aries-framework-go/blob/main/pkg/wallet/kmsclient_test.go#L587
Furthermore, I'm wondering whether splitting the verification method is enough to find the right key. In my understanding the steps to find the right key are:
verificationMethod
(split('#')[0]
) - this step happenssplit('#')[1]
- this step seems to be missingsplit('#')[1]
is used as public key or key id