ion-tools
ion-tools copied to clipboard
How to correctly specify URL to self-hosted node in AnchorRequest?
I'm experimenting with an ION node and using ion-tools to interact with it. I'm having trouble figuring out how to send an anchor request to it, though.
I can successfully resolve a DID using
let response = await ION.resolve('did:ion:test:EiClWZ1MnE8PHjH6y4e4nCKgtKnI1DK1foZiP61I86b6pw', {
nodeEndpoint: 'http://localhost:3000/identifiers/',
});
But when I try to submit an anchor request I get an error. Here's what I'm trying to do:
const requestBody = did.generateRequest();
const request = new ION.AnchorRequest(requestBody, {
challengeEndpoint: 'http://localhost:3000/api/v1.0/proof-of-work-challenge',
solutionEndpoint: 'http://localhost:3000/api/v1.0/operations',
});
let response = await request.submit();
Basically I'm changing https://beta.ion.msidentity.com
to http://localhost:3000
.
The error I get is Error: Get challenge service not available
. I can only assume the paths to the endpoints are incorrect. I have also tried http://localhost:3000/proof-of-work-challenge
and http://localhost:3000/operations
.
What is the correct path to the challenge and solution endpoints when running your own node?
Was trying to solve my own problem by looking through the ION code. I see where the operations
path is configured in the router, but I don't see anything related to the challenge.
@sugarjig the PoW thing was something Microsoft did to gate their own node's open endpoint against DDoS. We could add that as a general capability to ION nodes in general, but that would be new work/capabilities that need to be added to that code base.
Hello folks!
I am trying to get started with this by running some examples with a local (dockerized) node.
If ion-tools
is no longer supported, what should I use?
How do I sent did operations created by ion-tools
to my local node?
Where can I find technical documentation to get started as a developer?
Thanks!