@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
21 lines (20 loc) • 1.04 kB
TypeScript
import { CustomError } from "@rarible/utils";
import type { AbstractContractAddress } from "../../common/contract-address.js";
import type { BlockchainEnum, L1BlockchainByBlockchain, WithBlockchain } from "../enum/domain.js";
/**
* Contract address format of union service
*
* @example
* ETHEREUM:0xd07dc4262bcdbf85190c01c996b4c06a461d2430
* POLYGON:0xd07dc4262bcdbf85190c01c996b4c06a461d2430
* FLOW:A.0x01658d9b94068f3c.CommonNFT
*/
export type UnionContractAddress<Index extends BlockchainEnum = BlockchainEnum> = WithBlockchain<Index, AbstractContractAddress<L1BlockchainByBlockchain[Index]>> & {
__IS_CONTRACT_ADDRESS__: true;
};
export declare function toUnionContractAddress(value: string): UnionContractAddress;
export declare function toUnionContractAddressSafe(value: string): UnionContractAddress | undefined;
export declare function isUnionContractAddress(value: string): value is UnionContractAddress;
export declare class InvalidUnionContractAddressError extends CustomError {
constructor(address: string);
}