mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-24 15:36:59 +01:00
44 lines
802 B
TypeScript
44 lines
802 B
TypeScript
|
declare module 'coinselect' {
|
||
|
type Utxo = {
|
||
|
vout: number;
|
||
|
value: number;
|
||
|
txId: string;
|
||
|
};
|
||
|
|
||
|
export default function coinSelect<U extends Utxo>(
|
||
|
utxos: U[],
|
||
|
targets: { address: string; value?: number }[],
|
||
|
feeRate: number,
|
||
|
changeAddress?: string,
|
||
|
): {
|
||
|
inputs: U[];
|
||
|
outputs: {
|
||
|
address?: string;
|
||
|
value: number;
|
||
|
}[];
|
||
|
fee: number;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
declare module 'coinselect/split' {
|
||
|
type Utxo = {
|
||
|
vout: number;
|
||
|
value: number;
|
||
|
txId: string;
|
||
|
};
|
||
|
|
||
|
export default function coinSelectSplit<U extends Utxo>(
|
||
|
utxos: U[],
|
||
|
targets: { address: string; value?: number }[],
|
||
|
feeRate: number,
|
||
|
changeAddress?: string,
|
||
|
): {
|
||
|
inputs: U[];
|
||
|
outputs: {
|
||
|
address?: string;
|
||
|
value: number;
|
||
|
}[];
|
||
|
fee: number;
|
||
|
};
|
||
|
}
|