@radar/redshift-utils

Utilities used across REDSHIFT codebases

Installation

npm

npm install @radar/redshift-utils

yarn

yarn add @radar/redshift-utils

Usage - Validator

Import

import { validator } from '@radar/redshift-utils';

Methods

Validate Network

Determine if the passed network is valid

const isValid = await validator.isValidNetwork(network);

Validate On-Chain Ticker

Determine if the passed on-chain ticker is valid

Validate Market

Determine if the passed market is valid

Validate UUID

Determine if the passed UUID is valid

Validate Base58Check

Determine if the passed string is valid base58check

Validate Bech32

Determine if the passed string is valid bech32

Validate Base58Check or Bech32

Determine if the passed string is valid base58check or bech32

Validate Hex

Determine if the passed string is a valid hex

Validate Network & Subnet

Determine if the passed network and subnet are valid

Last updated

Was this helpful?