@bsv/wallet-toolbox
Version:
BRC100 conforming wallet, wallet storage and wallet signer components
71 lines • 3.02 kB
TypeScript
import { Beef, HexString, WhatsOnChainConfig } from '@bsv/sdk';
import { sdk, Services } from '../../index.client';
import SdkWhatsOnChain from './SdkWhatsOnChain';
/**
*
*/
export declare class WhatsOnChain extends SdkWhatsOnChain {
services: Services;
constructor(chain?: sdk.Chain, config?: WhatsOnChainConfig, services?: Services);
/**
* POST
* https://api.whatsonchain.com/v1/bsv/main/txs/status
* Content-Type: application/json
* data: "{\"txids\":[\"6815f8014db74eab8b7f75925c68929597f1d97efa970109d990824c25e5e62b\"]}"
*
* result for a mined txid:
* [{
* "txid":"294cd1ebd5689fdee03509f92c32184c0f52f037d4046af250229b97e0c8f1aa",
* "blockhash":"000000000000000004b5ce6670f2ff27354a1e87d0a01bf61f3307f4ccd358b5",
* "blockheight":612251,
* "blocktime":1575841517,
* "confirmations":278272
* }]
*
* result for a valid recent txid:
* [{"txid":"6815f8014db74eab8b7f75925c68929597f1d97efa970109d990824c25e5e62b"}]
*
* result for an unknown txid:
* [{"txid":"6815f8014db74eab8b7f75925c68929597f1d97efa970109d990824c25e5e62c","error":"unknown"}]
*/
getStatusForTxids(txids: string[]): Promise<sdk.GetStatusForTxidsResult>;
/**
* 2025-02-16 throwing internal server error 500.
* @param txid
* @returns
*/
getTxPropagation(txid: string): Promise<number>;
/**
* May return undefined for unmined transactions that are in the mempool.
* @param txid
* @returns raw transaction as hex string or undefined if txid not found in mined block.
*/
getRawTx(txid: string): Promise<string | undefined>;
getRawTxResult(txid: string): Promise<sdk.GetRawTxResult>;
/**
* WhatsOnChain does not natively support a postBeef end-point aware of multiple txids of interest in the Beef.
*
* Send rawTx in `txids` order from beef.
*
* @param beef
* @param txids
* @returns
*/
postBeef(beef: Beef, txids: string[]): Promise<sdk.PostBeefResult>;
/**
* @param rawTx raw transaction to broadcast as hex string
* @returns txid returned by transaction processor of transaction broadcast
*/
postRawTx(rawTx: HexString): Promise<sdk.PostTxResultForTxid>;
/**
* @param txid
* @returns
*/
getMerklePath(txid: string, services: sdk.WalletServices): Promise<sdk.GetMerklePathResult>;
updateBsvExchangeRate(rate?: sdk.BsvExchangeRate, updateMsecs?: number): Promise<sdk.BsvExchangeRate>;
getUtxoStatus(output: string, outputFormat?: sdk.GetUtxoStatusOutputFormat, outpoint?: string): Promise<sdk.GetUtxoStatusResult>;
getScriptHashConfirmedHistory(hash: string): Promise<sdk.GetScriptHashHistoryResult>;
getScriptHashUnconfirmedHistory(hash: string): Promise<sdk.GetScriptHashHistoryResult>;
getScriptHashHistory(hash: string): Promise<sdk.GetScriptHashHistoryResult>;
}
//# sourceMappingURL=WhatsOnChain.d.ts.map