{"size": 653, "ext": "scrbl", "max_stars_repo_path": "base58/base58.scrbl", "max_stars_repo_name": "marckn0x/base58", "max_stars_repo_stars_event_min_datetime": "2022-02-20T23:50:28.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-20T23:50:28.000Z", "max_issues_repo_path": "base58/base58.scrbl", "max_issues_repo_name": "marckn0x/base58", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "base58/base58.scrbl", "max_forks_repo_name": "marckn0x/base58", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.3913043478, "max_line_length": 77, "alphanum_fraction": 0.7120980092}
#lang scribble/manual

@(require (for-label racket))

@title{Base58}

@author[(author+email "Marc Burns" "marc@kn0x.io")]

@defmodule[base58]

Provides
@hyperlink["https://en.bitcoin.it/wiki/Base58Check_encoding"]{Base58Check}
encoding and decoding functions.

@defproc[(base58-encode [bs bytes?] [#:check? check? any/c #t]) string?]{
  Encodes @racketfont{bs} to a base58 string.
  When @racket[check?] is not @racket[#f], appends check bytes.
}

@defproc[(base58-decode [str string?] [#:check? check? any/c #t]) bytes?]{
  Decodes base58 string @racketfont{str} to bytes.
  When @racket[check?] is not @racket[#f], validates and removes check bytes.
}