0.0.5 • Published 3 years ago

base58-monero v0.0.5

Weekly downloads
143
License
MIT
Repository
github
Last release
3 years ago

base58-monero

Base58 Monero style.

Base58 in Monero

Monero has its own variant of Base58.

In Monero the Base58 encoding is performed in 8-byte blocks, except the last block which is the remaining (8 or less) bytes.

The 8-byte block converts to 11 or less Base58 characters. If the block converted to less then 11 characters, the output is padded with "1"s (0 in Base58). The final block is padded as well to whatever would be the maximum size of this number of bytes encoded in Base58.

The advantage of Monero implementation is that output is of a fixed size which is not the case with plain Base58. The disadvantage is that default libraries won't work.

Install

npm i --save base58-monero

API

encode(buffer: Buffer | Uint8Array)

Encode Buffer or Uint8Array as base58 string.

decode(str: string)

Decode base58 string to Buffer.

More

Credits

Coin Crypto Wallet.

License

MIT

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago