Skip to content

Conversation

@ricott1
Copy link
Contributor

@ricott1 ricott1 commented Jul 10, 2019

Migrated pull from ensdomains/ens-app#355

I added the option to register an onion address, encoded as a multiaddress, in the contenthash entry.

This pull will work in tandem with a metamask pull.

It depends on another pull made on the content-hash dependency, which we should wait for.

@jefflau
Copy link
Member

jefflau commented Jul 15, 2019

@ricott1 Thanks for this - please ping me when that pull request has gone through

@jefflau
Copy link
Member

jefflau commented Jul 15, 2019

@ricott1 Also can you please add a test for the new protocol

@pldespaigne
Copy link
Contributor

Hi @jefflau ! I just introduce a general encoding function for content-hash in this PR, it is published to npm as v2.4.1.
It is now possible to do contentHash.encode('onion', onionAddress), I will update the readme's api section later today.

} else if (contentType === 'bzz') {
encoded = '0x' + contentHash.fromSwarm(content)
} else if (contentType === 'onion') {//In the future insert here general encoding given by contentHash library
encoded = '0x' + contentHash.fromOnion(content)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be contentHash.encode('onion', content);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ricott1
Copy link
Contributor Author

ricott1 commented Jul 16, 2019

Tests added

"ethers": "^4.0.30",
"js-sha3": "^0.8.0",
"lodash": "^4.17.11",
"node-gyp": "^5.0.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are we using node-gyp and rebuild for?

"ethers": "^4.0.30",
"js-sha3": "^0.8.0",
"lodash": "^4.17.11",
"node-gyp": "^5.0.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are we using node-gyp and rebuild for

@jefflau jefflau merged commit 9dc0a92 into ensdomains:master Jul 23, 2019
@pldespaigne
Copy link
Contributor

🎉

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

Successfully merging this pull request may close these issues.

3 participants