UNPKG

@rarible/types

Version:

`@rarible/types` is a TypeScript library that provides type definitions and interfaces for the Rarible ecosystem. This package is designed to facilitate seamless integration with Rarible's APIs and services, ensuring type safety and improved developer exp

23 lines (22 loc) 640 B
export type Binary = string & { __IS_BINARY__: true; }; /** * Convert string to binary string * @note that it also convert to lowercase * * 0xTest -> 0xtest * Test -> 0xtest */ export declare function toBinary(value: string, re?: RegExp): Binary; export type Word = Binary & { __IS_WORD__: true; }; export declare function toWord(value: string): Word; export declare const ZERO_WORD: Word; export declare function randomWord(): Word; export declare function randomBinary(size: number): Binary; export declare class InvalidBinaryError extends Error { readonly name = "InvalidBinaryError"; constructor(value: string); }