@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) • 698 B
TypeScript
import { CustomError } from "@rarible/utils";
import type { BlockchainEnum, BlockchainLayer1Enum, L1BlockchainByBlockchain } from "../union/enum/domain.js";
import type { AbstractAddress } from "./address.js";
export type AbstractContractAddress<T extends BlockchainLayer1Enum> = AbstractAddress<T> & {
__IS_CONTRACT__: true;
};
export type ContractAddressByBlockchain = {
[K in BlockchainEnum]: AbstractContractAddress<L1BlockchainByBlockchain[K]>;
};
export type BlockchainContractAddress = ContractAddressByBlockchain[BlockchainEnum];
export declare class InvalidContractAddressError<T extends BlockchainLayer1Enum> extends CustomError {
constructor(blockchain: T, value: string);
}