|
pirms 7 mēnešiem | |
---|---|---|
dist | pirms 8 mēnešiem | |
docs | pirms 8 mēnešiem | |
src | pirms 8 mēnešiem | |
test | pirms 8 mēnešiem | |
.gitignore | pirms 8 mēnešiem | |
LICENSE | pirms 8 mēnešiem | |
README.md | pirms 8 mēnešiem | |
build.sh | pirms 8 mēnešiem | |
package-lock.json | pirms 7 mēnešiem | |
package.json | pirms 8 mēnešiem | |
tsconfig.json | pirms 8 mēnešiem | |
typedoc.json | pirms 8 mēnešiem | |
yarn.lock | pirms 8 mēnešiem |
This package contains the code paths necessary to encode and/or decode hexadecimal strings to Base58 encoding and back again.
Adapted from the Turtlecoin project for use in Fedoragold.
import { Base58 } from 'fedoragold-base58'
const rawAddress = Base58.decode('TRTLv3JRA772aBveLkCjG5jDvoUdKwa8YDsgLxCczL1oPei42XAMLE5QLRHM2c8oo5WbwLiB5ky7mDP7WGB53Jnp2ygHEomu3qa')
const address = Base58.encode(rawAddress)
const Base58 = require('fedoragold-base58').Base58
const rawAddress = Base58.decode('TRTLv3JRA772aBveLkCjG5jDvoUdKwa8YDsgLxCczL1oPei42XAMLE5QLRHM2c8oo5WbwLiB5ky7mDP7WGB53Jnp2ygHEomu3qa')
const address = Base58.encode(rawAddress)
You can find the full documentation for this library here