@bsv/wallet-toolbox-client
Version:
Client only Wallet Storage
50 lines • 1.61 kB
TypeScript
import { Beef, HexString, HttpClient } from '@bsv/sdk';
import { Chain } from '../../sdk/types';
import { GetMerklePathResult, PostBeefResult, WalletServices } from '../../sdk/WalletServices.interfaces';
export interface BitailsConfig {
/** Authentication token for BitTails API */
apiKey?: string;
/** The HTTP client used to make requests to the API. */
httpClient?: HttpClient;
}
/**
*
*/
export declare class Bitails {
readonly chain: Chain;
readonly apiKey: string;
readonly URL: string;
readonly httpClient: HttpClient;
constructor(chain?: Chain, config?: BitailsConfig);
getHttpHeaders(): Record<string, string>;
/**
* Bitails 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<PostBeefResult>;
/**
* @param raws Array of raw transactions to broadcast as hex strings
* @param txids Array of txids for transactions in raws for which results are requested, remaining raws are supporting only.
* @returns
*/
postRaws(raws: HexString[], txids?: string[]): Promise<PostBeefResult>;
/**
*
* @param txid
* @param services
* @returns
*/
getMerklePath(txid: string, services: WalletServices): Promise<GetMerklePathResult>;
}
export interface BitailsMerkleProof {
index: number;
txOrId: string;
target: string;
nodes: string[];
}
//# sourceMappingURL=Bitails.d.ts.map