Skip to content

Commit 5e925e7

Browse files
CopilotChALkeR
andcommitted
Add documentation for base58 functions in README
Co-authored-by: ChALkeR <291301+ChALkeR@users.noreply.github.com>
1 parent ee50c30 commit 5e925e7

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,17 +468,39 @@ import { getPrefix } from '@exodus/bytes/bech32.js'
468468

469469
### `@exodus/bytes/base58.js`
470470

471+
Implements base58 encoding as used in Bitcoin and other cryptocurrencies.
472+
473+
Supports both standard base58 and XRP variant alphabets.
474+
471475
```js
472476
import { fromBase58, toBase58 } from '@exodus/bytes/base58.js'
473477
import { fromBase58xrp, toBase58xrp } from '@exodus/bytes/base58.js'
474478
```
475479

476480
#### `fromBase58(string, format = 'uint8')`
481+
482+
Decode a base58 string to bytes
483+
484+
Uses the standard Bitcoin base58 alphabet
485+
477486
#### `toBase58(arr)`
478487

488+
Encode a `Uint8Array` to a base58 string
489+
490+
Uses the standard Bitcoin base58 alphabet
491+
479492
#### `fromBase58xrp(string, format = 'uint8')`
493+
494+
Decode a base58 string to bytes using XRP alphabet
495+
496+
Uses the XRP variant base58 alphabet
497+
480498
#### `toBase58xrp(arr)`
481499

500+
Encode a `Uint8Array` to a base58 string using XRP alphabet
501+
502+
Uses the XRP variant base58 alphabet
503+
482504
### `@exodus/bytes/base58check.js`
483505

484506
```js

0 commit comments

Comments
 (0)