Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of role fails with golang wrapper #67

Open
Martin-Aulich opened this issue Sep 24, 2021 · 0 comments
Open

Removal of role fails with golang wrapper #67

Martin-Aulich opened this issue Sep 24, 2021 · 0 comments

Comments

@Martin-Aulich
Copy link

Martin-Aulich commented Sep 24, 2021

Hello guys,

I'm currently trying to programmatically remove the role of a DID with the indy VDR golang wrapper. Sadly

err = client.CreateNym(nym.Dest, "", vdr.NoRole, c.serviceDid.DIDVal.MethodSpecificID, c.signature)

Sadly I receive the following error:
ERRO[0009] error from submitted request: (Indy error code: [0] {"code":31,"extra":"{\"op\":\"REJECT\",\"identifier\":\"86U8YCoQFXLu2qRC9spRiS\",\"reqId\":716439808,\"reason\":\"client request invalid: InvalidClientRequest('86U8YCoQF XLu2qRC9spRiS', 716439808)\",\"code\":null}","message":"Request failed: client request invalid: InvalidClientRequest('86U8YCoQFXLu2qRC9spRiS', 716439808)"})

If I change the role to vdr.NetworkMonitorRole (201) the same transaction works just fine and I can see the transaction in the ledger explorer:

err = c.client.CreateNym(nym.Dest, "", vdr.NetworkMonitorRole, c.serviceDid.DIDVal.MethodSpecificID, c.signature)

Type: NYM Nym: EWkYJruPjgXcmoHggPkWcV Role: 201 Verkey:

I'm using the following version of indy VDR Wrapper: github.com/hyperledger/indy-vdr/wrappers/golang v0.0.0-20210709184602-7a38fe8c85c4 and a local VON-Network

Update:

  • I have reproduced the error with the latest version: github.com/hyperledger/indy-vdr/wrappers/golang v0.0.0-20210922000711
  • I left the verkey empty because otherwise I'll get an error, even if the verkey is still exactly the same as it was before

I looked into the VDR code and to me it looks like a JSON serialization issue. In vdr/requests.go the Nym struct has an 'omitempty' tag on the Role field. Hence I presume the role field is not added to the request at all instead of adding it empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant