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

14 lines (13 loc) 660 B
import { CustomError } from "@rarible/utils"; import type { BlockchainEnum, BlockchainLayer1Enum, L1BlockchainByBlockchain } from "../union/enum/index.js"; import type { Layer1ful } from "./common.js"; export type AbstractTransactionHash<T extends BlockchainLayer1Enum> = Layer1ful<T> & { __IS_TRANSACTION_HASH__: true; }; export type HashByBlockchain = { [K in BlockchainEnum]: AbstractTransactionHash<L1BlockchainByBlockchain[K]>; }; export type TransactionHash = HashByBlockchain[BlockchainEnum]; export declare class InvalidTransactionHashError<T extends BlockchainLayer1Enum> extends CustomError { constructor(blockchain: T, value: string); }