Skip to content

Commit d5654da

Browse files
feat(babylonlabs): vendor and integrate BTC staking library v2.3.4
2 parents c84ff2d + 3871add commit d5654da

File tree

26 files changed

+765
-363
lines changed

26 files changed

+765
-363
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
BitGo Fork of https://github.com/babylonlabs-io/btc-staking-ts/tree/v1.0.3
1+
BitGo Fork of https://github.com/babylonlabs-io/btc-staking-ts/tree/v2.3.4

modules/babylonlabs-io-btc-staking-ts/build.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,19 @@ async function main() {
1919
platform: "node", // for CJS
2020
outfile: "dist/index.cjs",
2121
format: "cjs",
22+
sourcemap: true,
2223
});
2324

2425
await build({
2526
...shared,
2627
platform: "node", // for ESM
2728
outfile: "dist/index.js",
2829
format: "esm",
30+
sourcemap: true,
2931
});
3032
}
3133

3234
main().catch((err) => {
3335
console.error(err);
3436
process.exit(1);
35-
});
37+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// commitlint.config.cjs
2+
module.exports = {
3+
extends: ['@commitlint/config-conventional'],
4+
rules: {
5+
'footer-max-line-length': [0, 'always'], // disable the footer length limit
6+
},
7+
};

modules/babylonlabs-io-btc-staking-ts/jest.setup.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
const { initBTCCurve } = require("./src");
2+
13
const originalTest = global.test;
2-
const NUM_ITERATIONS = 10;
4+
const NUM_ITERATIONS = 3;
5+
;
6+
7+
initBTCCurve();
38

49
global.test = (name, fn, timeout) => {
510
for (let i = 0; i < NUM_ITERATIONS; i++) {
@@ -14,3 +19,5 @@ global.it = (name, fn, timeout) => {
1419
originalIt(`${name} (iteration ${i + 1})`, fn, timeout);
1520
}
1621
};
22+
23+
global.it.each = originalIt.each;

modules/babylonlabs-io-btc-staking-ts/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bitgo/babylonlabs-io-btc-staking-ts",
3-
"version": "1.2.0",
3+
"version": "2.3.4",
44
"description": "Library exposing methods for the creation and consumption of Bitcoin transactions pertaining to Babylon's Bitcoin Staking protocol.",
55
"module": "dist/index.js",
66
"main": "dist/index.cjs",
@@ -33,7 +33,8 @@
3333
"license": "SEE LICENSE IN LICENSE",
3434
"devDependencies": {
3535
"dts-bundle-generator": "^9.3.1",
36-
"esbuild": "^0.20.2"
36+
"esbuild": "^0.20.2",
37+
"nanoevents": "^9.1.0"
3738
},
3839
"dependencies": {
3940
"@babylonlabs-io/babylon-proto-ts": "1.0.0",

modules/babylonlabs-io-btc-staking-ts/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
export { StakingScriptData, Staking } from "./staking";
1+
export { Staking, StakingScriptData } from "./staking";
22
export type { StakingScripts } from "./staking";
3+
export * from "./staking/manager";
34
export {
45
ObservableStaking,
56
ObservableStakingScriptData,
67
} from "./staking/observable";
78
export * from "./staking/transactions";
89
export * from "./types";
910
export * from "./utils/btc";
10-
export * from "./utils/utxo/findInputUTXO";
11-
export * from "./utils/utxo/getPsbtInputFields";
12-
export * from "./utils/utxo/getScriptType";
1311
export {
1412
getBabylonParamByBtcHeight,
1513
getBabylonParamByVersion,
1614
} from "./utils/staking/param";
17-
export * from "./staking/manager";
15+
export * from "./utils/utxo/findInputUTXO";
16+
export * from "./utils/utxo/getPsbtInputFields";
17+
export * from "./utils/utxo/getScriptType";
1818

1919
// BitGo-specific exports
2020
export * from "./utils/babylon";

0 commit comments

Comments
 (0)