import { SupportedNetwork, TxId } from '../globalTypes.js'; /** * a provider for interacting with the blockchain * @category Provider */ export interface ChainProvider { /** * Send a raw transaction hex string. * @param rawTxHex The raw transaction hex string to send. * @returns A promise which resolves to the hash of the transaction that has been sent. */ broadcast(txHex: string): Promise; /** * Send a PSBT. * @param psbtBase64 The PSBT to send. * @param metadata Optional metadata to attach to the transaction. * @returns A promise which resolves to the hash of the transaction that has been sent. */ broadcastPsbt(psbtBase64: string, metadata?: Record): Promise; /** * Get a transaction raw hex from the network. * @param txHash The hash value of the transaction. * @returns The query result with the transaction raw hex. */ getRawTransaction(txId: TxId): Promise; /** * Query a transaction confirmation * @param txId */ getConfirmations(txId: TxId): Promise; /** * Query current network fee * @param txId */ getFeeRate(): Promise; /** * Get the current network the provider is connected to. * @returns A promise which resolves to the current network identifier. */ getNetwork(): Promise; /** * Get the median time of the latest block. * @returns A promise which resolves to the median time as a Unix timestamp. */ getMedianTime(): Promise; } //# sourceMappingURL=chainProvider.d.ts.map