Skip to content

Commit 9a1a983

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

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
@@ -425,17 +425,39 @@ import { getPrefix } from '@exodus/bytes/bech32.js'
425425

426426
### `@exodus/bytes/base58.js`
427427

428+
Implements base58 encoding as used in Bitcoin and other cryptocurrencies.
429+
430+
Supports both standard base58 and XRP variant alphabets.
431+
428432
```js
429433
import { fromBase58, toBase58 } from '@exodus/bytes/base58.js'
430434
import { fromBase58xrp, toBase58xrp } from '@exodus/bytes/base58.js'
431435
```
432436

433437
#### `fromBase58(string, format = 'uint8')`
438+
439+
Decode a base58 string to bytes
440+
441+
Uses the standard Bitcoin base58 alphabet
442+
434443
#### `toBase58(arr)`
435444

445+
Encode a `Uint8Array` to a base58 string
446+
447+
Uses the standard Bitcoin base58 alphabet
448+
436449
#### `fromBase58xrp(string, format = 'uint8')`
450+
451+
Decode a base58 string to bytes using XRP alphabet
452+
453+
Uses the XRP variant base58 alphabet
454+
437455
#### `toBase58xrp(arr)`
438456

457+
Encode a `Uint8Array` to a base58 string using XRP alphabet
458+
459+
Uses the XRP variant base58 alphabet
460+
439461
### `@exodus/bytes/base58check.js`
440462

441463
```js

0 commit comments

Comments
 (0)