@caravan/psbt 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +21 -2
- package/dist/index.mjs +20 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -93842,7 +93842,26 @@ var getHashForSignature = (psbt, inputIndex, inputAmount, sigHashFlag = import_b
|
|
|
93842
93842
|
|
|
93843
93843
|
// src/psbtv0/utils.ts
|
|
93844
93844
|
var import_bitcoin4 = require("@caravan/bitcoin");
|
|
93845
|
-
|
|
93845
|
+
|
|
93846
|
+
// ../multisig/dist/index.mjs
|
|
93847
|
+
var braidDetailsToWalletConfig = (braidDetails) => {
|
|
93848
|
+
return {
|
|
93849
|
+
network: braidDetails.network,
|
|
93850
|
+
extendedPublicKeys: braidDetails.extendedPublicKeys.map((key) => ({
|
|
93851
|
+
xpub: key.base58String,
|
|
93852
|
+
bip32Path: key.path,
|
|
93853
|
+
xfp: key.rootFingerprint
|
|
93854
|
+
})),
|
|
93855
|
+
quorum: {
|
|
93856
|
+
requiredSigners: braidDetails.requiredSigners,
|
|
93857
|
+
totalSigners: braidDetails.extendedPublicKeys.length
|
|
93858
|
+
},
|
|
93859
|
+
name: `${braidDetails.requiredSigners}-of-${braidDetails.extendedPublicKeys.length} ${braidDetails.addressType} ${braidDetails.network} wallet`,
|
|
93860
|
+
addressType: braidDetails.addressType
|
|
93861
|
+
};
|
|
93862
|
+
};
|
|
93863
|
+
|
|
93864
|
+
// src/psbtv0/utils.ts
|
|
93846
93865
|
var import_bignumber2 = __toESM(require("bignumber.js"));
|
|
93847
93866
|
var idToHash = (txid) => {
|
|
93848
93867
|
return import_buffer.Buffer.from(txid, "hex").reverse();
|
|
@@ -93903,7 +93922,7 @@ var convertLegacyOutput = (output) => {
|
|
|
93903
93922
|
};
|
|
93904
93923
|
};
|
|
93905
93924
|
var getWalletConfigFromInput = (input) => {
|
|
93906
|
-
return
|
|
93925
|
+
return braidDetailsToWalletConfig(JSON.parse(input.multisig.braidDetails));
|
|
93907
93926
|
};
|
|
93908
93927
|
// Annotate the CommonJS export names for ESM import in node:
|
|
93909
93928
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -93821,9 +93821,26 @@ import {
|
|
|
93821
93821
|
P2SH_P2WSH,
|
|
93822
93822
|
P2WSH
|
|
93823
93823
|
} from "@caravan/bitcoin";
|
|
93824
|
-
|
|
93825
|
-
|
|
93826
|
-
|
|
93824
|
+
|
|
93825
|
+
// ../multisig/dist/index.mjs
|
|
93826
|
+
var braidDetailsToWalletConfig = (braidDetails) => {
|
|
93827
|
+
return {
|
|
93828
|
+
network: braidDetails.network,
|
|
93829
|
+
extendedPublicKeys: braidDetails.extendedPublicKeys.map((key) => ({
|
|
93830
|
+
xpub: key.base58String,
|
|
93831
|
+
bip32Path: key.path,
|
|
93832
|
+
xfp: key.rootFingerprint
|
|
93833
|
+
})),
|
|
93834
|
+
quorum: {
|
|
93835
|
+
requiredSigners: braidDetails.requiredSigners,
|
|
93836
|
+
totalSigners: braidDetails.extendedPublicKeys.length
|
|
93837
|
+
},
|
|
93838
|
+
name: `${braidDetails.requiredSigners}-of-${braidDetails.extendedPublicKeys.length} ${braidDetails.addressType} ${braidDetails.network} wallet`,
|
|
93839
|
+
addressType: braidDetails.addressType
|
|
93840
|
+
};
|
|
93841
|
+
};
|
|
93842
|
+
|
|
93843
|
+
// src/psbtv0/utils.ts
|
|
93827
93844
|
import BigNumber2 from "bignumber.js";
|
|
93828
93845
|
var idToHash = (txid) => {
|
|
93829
93846
|
return Buffer2.from(txid, "hex").reverse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caravan/psbt",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "typescript library for working with PSBTs",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@caravan/bitcoin": "*",
|
|
43
|
-
"@caravan/multisig": "*",
|
|
44
43
|
"bignumber.js": "^8.1.1",
|
|
45
44
|
"bip174": "^2.1.1",
|
|
46
45
|
"bitcoinjs-lib-v6": "npm:bitcoinjs-lib@^6.1.5",
|
|
@@ -52,6 +51,7 @@
|
|
|
52
51
|
"author": "unchained capital",
|
|
53
52
|
"license": "ISC",
|
|
54
53
|
"devDependencies": {
|
|
54
|
+
"@caravan/multisig": "*",
|
|
55
55
|
"@caravan/eslint-config": "*",
|
|
56
56
|
"@caravan/typescript-config": "*",
|
|
57
57
|
"@inrupt/jest-jsdom-polyfills": "^3.2.1",
|