From 767ae1674931281f82ba202528d965be9641a261 Mon Sep 17 00:00:00 2001 From: Hyunhum Cho Date: Tue, 14 Feb 2023 11:32:26 +0900 Subject: [PATCH] feat: add declaration file to prevent type error --- index.d.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..ef9d836 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,20 @@ +export interface UTXO { + txid: string, + vout: number, + value: number, + nonWitnessUtxo? : Buffer, + witnessUtxo? : { + script: Buffer, + value: number + } +} +export interface Target { + address: string, + value: number +} +export interface SelectedUTXO { + inputs: UTXO[], + outputs: Target[], + fee: number +} +export default function coinSelect(utxos: UTXO[], outputs: Target[], feeRate: number): SelectedUTXO;