UNPKG
check-ethereum-scanner
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
Safety checks for new Ethereum tokens
check-ethereum-scanner
/
Ethereum-Renounced-Contract-Scanner
/
node_modules
/
cids
/
examples
/
cidv0-to-cidv1.js
13 lines
(7 loc)
•
263 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
'use strict'
const
CID
=
require
(
'../src'
)
const
multihashStr =
'QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB'
const
cidv0 =
new
CID
(multihashStr)
console
.
log
(cidv0.
toBaseEncodedString
())
const
cidv1 = cidv0.
toV1
()
console
.
log
(cidv1.
toBaseEncodedString
())