Skip to content

Commit

Permalink
Fix type definition files
Browse files Browse the repository at this point in the history
Bump tiny-secp256k1 library and
add coinselect type definition file.
  • Loading branch information
tvpeter committed Mar 8, 2023
1 parent 991bf8b commit d49bcbc
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 56 deletions.
78 changes: 23 additions & 55 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"cross-fetch": "^3.1.5",
"crypto-browserify": "^3.12.0",
"scrypt-js": "^3.0.1",
"tiny-secp256k1": "^1.1.6"
"tiny-secp256k1": "^2.2.1"
},
"devDependencies": {
"@types/mocha": "^10.0.0",
Expand Down
21 changes: 21 additions & 0 deletions src/types/coinselect.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
declare module "coinselect" {

interface Output {
address: string;
value: number;
}

interface CoinSelectResponse<T> {
inputs: T[];
outputs: Output[];
fee: number;
}

function coinselect<T>(
utxos: T[],
outputs: Output[],
feeRate: number
): CoinSelectResponse<T>;

export default coinselect;
}

0 comments on commit d49bcbc

Please sign in to comment.