Skip to content

Add base58 as a built-in string validator #1520

@elee1766

Description

@elee1766

Request a feature

I would like support for the base58 encoding for string verification in stdlib: https://datatracker.ietf.org/doc/html/draft-msporny-base58-03

🤷 Motivation

I would like to not redeclare a base58 type in many projects that I work on. It's a bit of a pain.

Base58 is quite widely used at this point, importantly, it is used as a standard encoding for Solana and some parts of Bitcoin.

💡 Solution

Implement base58 encoding with regex /^[\dA-HJ-NP-Za-km-z]+$/;

there is no special url encoded version like base64, so it should be just be a matter of adding the regexStringNode and registering it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions