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

How to register new DID using ion? #40

Closed
AnkitAtmecs opened this issue Aug 27, 2019 · 3 comments
Closed

How to register new DID using ion? #40

AnkitAtmecs opened this issue Aug 27, 2019 · 3 comments

Comments

@AnkitAtmecs
Copy link

We are trying to setup identity hub where we are planing to register a new DID for performing read write operation. identity hub is using _https://beta.hub.microsoft.com/_ as hub end point but we want to use the ION setup as the hub-end-point which is running on _http://localhost:3000/_.
Now i have two challenges in ION:
a) how to register a new DID ?
b) how to get ION hub end point?

@thehenrytsai
Copy link
Collaborator

Hi @AnkitAtmecs,

You should be able to use the create API specified in the protocol documentation to register new DIDs. Keep in mind that you obviously need to have enough funds in your bitcoin wallet in order to write to the blockchain.

For the hub endpoint, you can add the URI in the serviceEndpoint property in the DID document submitted in the create request.

@thehenrytsai
Copy link
Collaborator

Closing. Feel free to reopen if issue persists.

@ghost
Copy link

ghost commented Feb 27, 2020

Having a problem creating a DID using the API. I'm following the instructions and have this CURL request as follows:

curl --location --request POST 'http://localhost:3000/' \
--header 'Content-Type: application/json' \
--data-raw '{
  "type": "create",
  "suffixData": {
	  "operationDataHash": "4472d99bba1670457ee9a6746e481edf488a2c55",
	  "recoveryKey": {
	    "publicKeyHex": "02f49802fb3e09c6dd43f19aa41293d1e0dad044b68cf81cf7079499edfd0aa9f1"
	  },
	  "nextRecoveryOtpHash": "a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3"
	},
  "operationData": {
	    "nextUpdateOtpHash": "a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3",
	    "document": {
		  "publicKey": [
		    {
		      "id": "#key1",
		      "type": "Secp256k1VerificationKey2018",
		      "publicKeyHex": "02f49802fb3e09c6dd43f19aa41293d1e0dad044b68cf81cf7079499edfd0aa9f1",
		      "usage": "signing"
		    }
		  ]
		}
	}
}'

Getting a Bad request: TypeError: Cannot read property 'toString' of undefined during const response = await sidetreeCore.handleOperationRequest(ctx.body);

@ghost ghost mentioned this issue Mar 4, 2020
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

2 participants