Skip to content

Commit

Permalink
Ipns (#846)
Browse files Browse the repository at this point in the history
* Add ipns

* Update content-hash

* up to 3.0.26

* Remove console.log and upgraded ui
  • Loading branch information
makoto committed Jul 13, 2020
1 parent 2489710 commit 2b13e88
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"@ensdomains/ethregistrar": "^2.0.1",
"@ensdomains/react-ens-address": "^0.0.25",
"@ensdomains/resolver": "^0.2.4",
"@ensdomains/ui": "3.0.21",
"@ensdomains/ui": "3.0.27",
"apollo-cache-inmemory": "^1.2.9",
"apollo-client": "^2.4.5",
"apollo-link": "^1.2.2",
"apollo-link-http": "1.5.14",
"apollo-link-state": "^0.4.1",
"big-integer": "^1.6.44",
"content-hash": "^2.4.1",
"content-hash": "^2.5.2",
"core-js": "^3.1.4",
"cross-fetch": "^2.2.3",
"emotion": "^10.0.9",
Expand Down
3 changes: 3 additions & 0 deletions src/components/Links/ContentHashLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ const ContentHashLink = ({ value, contentType }) => {
if (protocolType === 'ipfs') {
externalLink = `https://gateway.ipfs.io/ipfs/${decoded}`
url = `ipfs://${decoded}`
} else if (protocolType === 'ipns') {
externalLink = `https://gateway.ipfs.io/ipns/${decoded}`
url = `ipns://${decoded}`
} else if (protocolType === 'bzz') {
externalLink = `https://swarm-gateways.net/bzz://${decoded}`
url = `bzz://${decoded}`
Expand Down
2 changes: 1 addition & 1 deletion src/utils/records.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function getPlaceholder(recordType, contentType) {
return 'Enter an Ethereum address'
case 'content':
if (contentType === 'contenthash') {
return 'Enter a content hash (eg: /ipfs/..., ipfs://..., bzz://..., onion://..., onion3://...)'
return 'Enter a content hash (eg: /ipfs/..., ipfs://..., /ipns/..., ipns://..., bzz://..., onion://..., onion3://...)'
} else {
return 'Enter a content'
}
Expand Down
53 changes: 48 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1809,10 +1809,10 @@
bluebird "^3.5.2"
dns-packet "^5.0.4"

"@ensdomains/ui@3.0.21":
version "3.0.21"
resolved "https://registry.yarnpkg.com/@ensdomains/ui/-/ui-3.0.21.tgz#d99817908178ce27d2ec6e171cacef85f8590427"
integrity sha512-a77/eb4HEnW2Ugm6sGZUPkpDTQ0mp99+Ygt1WcPIV+Enod27jDVVdUcPN2QacYbTDMdIjd+Z5lTeUQx+FweC9g==
"@ensdomains/ui@3.0.27":
version "3.0.27"
resolved "https://registry.yarnpkg.com/@ensdomains/ui/-/ui-3.0.27.tgz#64f65af1a123c5a778e4f31066f2ca6be0c0bf12"
integrity sha512-/cGE1L7gGPN3uwCsoNh8U84sbEXavHhA9zEwjx9JOj21kxtjGU/HklkH5Dq1GIu0Z7cnQa53L7E2y0U5cYecQQ==
dependencies:
"@0xproject/utils" "^2.0.2"
"@babel/plugin-proposal-class-properties" "^7.8.3"
Expand All @@ -1828,7 +1828,7 @@
base58check "^2.0.0"
bech32 "^1.1.3"
bs58 "^4.0.1"
content-hash "^2.4.1"
content-hash "^2.5.2"
cross-fetch "^3.0.2"
eth-ens-namehash "^2.0.8"
ethers "4.0.44"
Expand Down Expand Up @@ -4643,6 +4643,14 @@ buffer@^5.4.2, buffer@^5.4.3:
base64-js "^1.0.2"
ieee754 "^1.1.4"

buffer@^5.5.0, buffer@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786"
integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==
dependencies:
base64-js "^1.0.2"
ieee754 "^1.1.4"

builtin-status-codes@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
Expand Down Expand Up @@ -4971,6 +4979,17 @@ cids@^0.6.0:
multicodec "~0.5.0"
multihashes "~0.4.14"

cids@^0.7.1:
version "0.7.5"
resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2"
integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==
dependencies:
buffer "^5.5.0"
class-is "^1.1.0"
multibase "~0.6.0"
multicodec "^1.0.0"
multihashes "~0.4.15"

cids@~0.7.0, cids@~0.7.1:
version "0.7.1"
resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.1.tgz#d8bba49a35a0e82110879b5001abf1039c62347f"
Expand Down Expand Up @@ -5346,6 +5365,15 @@ content-hash@^2.4.1:
multicodec "^0.5.4"
multihashes "^0.4.15"

content-hash@^2.5.2:
version "2.5.2"
resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211"
integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==
dependencies:
cids "^0.7.1"
multicodec "^0.5.5"
multihashes "^0.4.15"

content-type@~1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
Expand Down Expand Up @@ -11189,6 +11217,21 @@ multicodec@^0.5.4, multicodec@~0.5.0, multicodec@~0.5.1, multicodec@~0.5.5:
dependencies:
varint "^5.0.0"

multicodec@^0.5.5:
version "0.5.7"
resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd"
integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==
dependencies:
varint "^5.0.0"

multicodec@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.3.tgz#1d2c35140f0bff3afad336613ac53e3dda400e0b"
integrity sha512-8G4JKbHWSe/39Xx2uiI+/b/S6mGgimzwEN4TOCokFUIfofg1T8eHny88ht9eWImD2dng+EEQRsApXxA5ubhU4g==
dependencies:
buffer "^5.6.0"
varint "^5.0.0"

multihashes@^0.4.15, multihashes@~0.4.13, multihashes@~0.4.14, multihashes@~0.4.15:
version "0.4.15"
resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.15.tgz#6dbc55f7f312c6782f5367c03c9783681589d8a6"
Expand Down

0 comments on commit 2b13e88

Please sign in to comment.