UNPKG

@hazae41/base58

Version:

Base58 adapter for WebAssembly and JS implementations

21 lines (17 loc) 518 B
'use strict'; var index = require('../../libs/copiable/index.cjs'); function fromScure(scure) { const { base58 } = scure; function getBytes(bytes) { return "bytes" in bytes ? bytes.bytes : bytes; } function encodeOrThrow(bytes) { return base58.encode(getBytes(bytes)); } function decodeOrThrow(text) { return new index.Copied(base58.decode(text)); } return { encodeOrThrow, decodeOrThrow }; } exports.fromScure = fromScure; //# sourceMappingURL=scure.cjs.map