opnet
Version:
The perfect library for building Bitcoin-based applications.
49 lines (48 loc) • 1.53 kB
TypeScript
export interface SequentialBroadcastTxResult {
readonly txid: string;
readonly success: boolean;
readonly error?: string;
readonly peers?: number;
}
export interface BroadcastedTransactionPackage {
readonly success: boolean;
readonly error?: string;
readonly testResults?: readonly TestMempoolAcceptResult[];
readonly packageResult?: PackageResult;
readonly sequentialResults?: readonly SequentialBroadcastTxResult[];
readonly fellBackToSequential?: boolean;
}
export interface TestMempoolAcceptResult {
readonly txid: string;
readonly wtxid: string;
readonly allowed?: boolean;
readonly vsize?: number;
readonly packageError?: string;
readonly rejectReason?: string;
readonly rejectDetails?: string;
readonly fees?: TestMempoolAcceptFees;
}
export interface TestMempoolAcceptFees {
readonly base: number;
readonly effectiveFeerate: number;
readonly effectiveIncludes: readonly string[];
}
export interface PackageTxResult {
readonly txid: string;
readonly otherWtxid?: string;
readonly vsize?: number;
readonly fees?: PackageTxFees;
readonly error?: string;
}
export interface PackageTxFees {
readonly base: number;
readonly effectiveFeerate?: number;
readonly effectiveIncludes?: readonly string[];
}
export interface PackageResult {
readonly packageMsg: string;
readonly txResults: {
readonly [wtxid: string]: PackageTxResult;
};
readonly replacedTransactions?: readonly string[];
}