@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
14 lines (13 loc) • 642 B
TypeScript
import { CustomError } from "@rarible/utils";
import type { BlockchainEnum, BlockchainLayer1Enum, L1BlockchainByBlockchain } from "../union/enum/domain.js";
import type { Layer1ful } from "./common.js";
export type AbstractAddress<T extends BlockchainLayer1Enum> = Layer1ful<T> & {
__IS_ADDRESS__: true;
};
export type AddressByBlockchain = {
[K in BlockchainEnum]: AbstractAddress<L1BlockchainByBlockchain[K]>;
};
export type BlockchainAddress = AddressByBlockchain[BlockchainLayer1Enum];
export declare class InvalidAddressError<T extends BlockchainLayer1Enum> extends CustomError {
constructor(blockchain: T, value: string);
}