@dynamic-labs-wallet/btc 0.0.251 → 0.0.253
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/index.cjs.js +38 -24
- package/index.esm.js +38 -24
- package/package.json +2 -2
- package/src/client/client.d.ts +2 -2
- package/src/client/client.d.ts.map +1 -1
- package/src/utils/index.d.ts +1 -0
- package/src/utils/index.d.ts.map +1 -1
- package/src/utils/parseDerivationPath/index.d.ts +2 -0
- package/src/utils/parseDerivationPath/index.d.ts.map +1 -0
- package/src/utils/parseDerivationPath/parseDerivationPath.d.ts +10 -0
- package/src/utils/parseDerivationPath/parseDerivationPath.d.ts.map +1 -0
package/index.cjs.js
CHANGED
|
@@ -753,6 +753,20 @@ initEccLib();
|
|
|
753
753
|
}
|
|
754
754
|
};
|
|
755
755
|
|
|
756
|
+
/**
|
|
757
|
+
* Parses the derivation path string into a Uint32Array
|
|
758
|
+
* Handles empty strings and empty array strings by returning an empty Uint32Array
|
|
759
|
+
*
|
|
760
|
+
* @param derivationPath - The derivation path as a JSON string (e.g., '{"0":44,"1":0,"2":0}' or '[]' or '')
|
|
761
|
+
* @returns The derivation path as a Uint32Array
|
|
762
|
+
* @throws Error if the derivation path is invalid JSON
|
|
763
|
+
*/ const parseDerivationPath = (derivationPath)=>{
|
|
764
|
+
if (derivationPath === '[]' || derivationPath === '') {
|
|
765
|
+
return new Uint32Array([]);
|
|
766
|
+
}
|
|
767
|
+
return new Uint32Array(Object.values(JSON.parse(derivationPath)));
|
|
768
|
+
};
|
|
769
|
+
|
|
756
770
|
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
757
771
|
class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
758
772
|
/**
|
|
@@ -783,10 +797,6 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
|
783
797
|
const ceremonyCompletePromise = new Promise((resolve)=>{
|
|
784
798
|
ceremonyCompleteResolver = resolve;
|
|
785
799
|
});
|
|
786
|
-
// Validate address type is provided
|
|
787
|
-
if (!addressType) {
|
|
788
|
-
throw new Error('Address type is required for BTC');
|
|
789
|
-
}
|
|
790
800
|
const buildBitcoinConfig = {
|
|
791
801
|
addressType,
|
|
792
802
|
network
|
|
@@ -830,8 +840,8 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
|
830
840
|
addressType: addressType,
|
|
831
841
|
network
|
|
832
842
|
});
|
|
833
|
-
// Store client key shares to
|
|
834
|
-
await this.
|
|
843
|
+
// Store client key shares to storage
|
|
844
|
+
await this.setClientKeySharesToStorage({
|
|
835
845
|
accountAddress,
|
|
836
846
|
clientKeyShares,
|
|
837
847
|
overwriteOrMerge: 'overwrite'
|
|
@@ -916,14 +926,14 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
|
916
926
|
throw new Error('Wallet not found in walletMap');
|
|
917
927
|
}
|
|
918
928
|
const derivationPath = walletProperties.derivationPath;
|
|
919
|
-
if (
|
|
929
|
+
if (derivationPath === undefined || derivationPath === null) {
|
|
920
930
|
throw new Error('Derivation path missing in walletMap');
|
|
921
931
|
}
|
|
922
932
|
let addressType = walletProperties.addressType;
|
|
923
933
|
if (!addressType) {
|
|
924
934
|
addressType = getAddressTypeFromDerivationPath(derivationPath);
|
|
925
935
|
}
|
|
926
|
-
const clientKeyShares = await this.
|
|
936
|
+
const clientKeyShares = await this.getClientKeySharesFromStorage({
|
|
927
937
|
accountAddress
|
|
928
938
|
});
|
|
929
939
|
if (!clientKeyShares || clientKeyShares.length === 0) {
|
|
@@ -933,10 +943,11 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
|
933
943
|
addressType,
|
|
934
944
|
network
|
|
935
945
|
};
|
|
946
|
+
const walletDerivationPath = parseDerivationPath(derivationPath);
|
|
936
947
|
const derivedPublicKey = await this.derivePublicKey({
|
|
937
948
|
chainName: this.chainName,
|
|
938
949
|
keyShare: clientKeyShares[0],
|
|
939
|
-
derivationPath:
|
|
950
|
+
derivationPath: walletDerivationPath,
|
|
940
951
|
bitcoinConfig
|
|
941
952
|
});
|
|
942
953
|
if (!derivedPublicKey) {
|
|
@@ -1018,7 +1029,7 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
|
1018
1029
|
throw new Error('Wallet not found in walletMap');
|
|
1019
1030
|
}
|
|
1020
1031
|
const derivationPath = walletProperties.derivationPath;
|
|
1021
|
-
if (
|
|
1032
|
+
if (derivationPath === undefined || derivationPath === null) {
|
|
1022
1033
|
throw new Error('Derivation path missing in walletMap');
|
|
1023
1034
|
}
|
|
1024
1035
|
let addressType = walletProperties.addressType;
|
|
@@ -1097,23 +1108,25 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
|
1097
1108
|
},
|
|
1098
1109
|
onCeremonyComplete: (accountAddress, walletId)=>{
|
|
1099
1110
|
ceremonyAccountAddress = accountAddress;
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
network
|
|
1103
|
-
});
|
|
1111
|
+
// For imported BTC wallets, use empty derivation path
|
|
1112
|
+
// The server returns "[]" for imported wallets (raw key, not derived)
|
|
1104
1113
|
this.initializeWalletMapEntry({
|
|
1105
1114
|
accountAddress,
|
|
1106
1115
|
walletId,
|
|
1107
1116
|
chainName: this.chainName,
|
|
1108
1117
|
thresholdSignatureScheme,
|
|
1109
|
-
derivationPath: JSON.stringify(
|
|
1110
|
-
index,
|
|
1111
|
-
value
|
|
1112
|
-
]))),
|
|
1118
|
+
derivationPath: JSON.stringify([]),
|
|
1113
1119
|
additionalProps: {
|
|
1114
1120
|
addressType: addressTypeEnum
|
|
1115
1121
|
}
|
|
1116
1122
|
});
|
|
1123
|
+
this.logger.debug('walletMap updated for wallet', {
|
|
1124
|
+
context: {
|
|
1125
|
+
accountAddress,
|
|
1126
|
+
walletId,
|
|
1127
|
+
walletMap: this.walletMap
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1117
1130
|
ceremonyCeremonyCompleteResolver(undefined);
|
|
1118
1131
|
},
|
|
1119
1132
|
onError,
|
|
@@ -1131,7 +1144,7 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
|
1131
1144
|
if (publicAddressCheck && accountAddress !== publicAddressCheck) {
|
|
1132
1145
|
throw new Error(`Public address mismatch: derived address ${accountAddress} !== public address ${publicAddressCheck}`);
|
|
1133
1146
|
}
|
|
1134
|
-
await this.
|
|
1147
|
+
await this.setClientKeySharesToStorage({
|
|
1135
1148
|
accountAddress,
|
|
1136
1149
|
clientKeyShares,
|
|
1137
1150
|
overwriteOrMerge: 'overwrite'
|
|
@@ -1212,7 +1225,7 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
|
1212
1225
|
throw new Error('Wallet not found in walletMap');
|
|
1213
1226
|
}
|
|
1214
1227
|
const derivationPath = walletProperties.derivationPath;
|
|
1215
|
-
if (
|
|
1228
|
+
if (derivationPath === undefined || derivationPath === null) {
|
|
1216
1229
|
throw new Error('Derivation path missing in walletMap');
|
|
1217
1230
|
}
|
|
1218
1231
|
let addressType = walletProperties.addressType;
|
|
@@ -1224,16 +1237,17 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
|
1224
1237
|
network
|
|
1225
1238
|
};
|
|
1226
1239
|
const psbt = bitcoin__namespace.Psbt.fromBase64(transaction);
|
|
1227
|
-
const clientKeyShares = await this.
|
|
1240
|
+
const clientKeyShares = await this.getClientKeySharesFromStorage({
|
|
1228
1241
|
accountAddress: senderAddress
|
|
1229
1242
|
});
|
|
1230
1243
|
if (!clientKeyShares || clientKeyShares.length === 0) {
|
|
1231
1244
|
throw new Error('No key shares found');
|
|
1232
1245
|
}
|
|
1246
|
+
const walletDerivationPath = parseDerivationPath(derivationPath);
|
|
1233
1247
|
const derivedPublicKey = await this.derivePublicKey({
|
|
1234
1248
|
chainName: this.chainName,
|
|
1235
1249
|
keyShare: clientKeyShares[0],
|
|
1236
|
-
derivationPath:
|
|
1250
|
+
derivationPath: walletDerivationPath,
|
|
1237
1251
|
bitcoinConfig
|
|
1238
1252
|
});
|
|
1239
1253
|
if (!derivedPublicKey) {
|
|
@@ -1463,7 +1477,7 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
|
1463
1477
|
/**
|
|
1464
1478
|
* Creates a new instance of DynamicBtcWalletClient
|
|
1465
1479
|
* @param props - The client properties
|
|
1466
|
-
*/ constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode = browser.AuthMode.HEADER, sdkVersion, forwardMPCClient }){
|
|
1480
|
+
*/ constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode = browser.AuthMode.HEADER, sdkVersion, forwardMPCClient }, internalOptions){
|
|
1467
1481
|
super({
|
|
1468
1482
|
environmentId,
|
|
1469
1483
|
authToken,
|
|
@@ -1475,7 +1489,7 @@ class DynamicBtcWalletClient extends browser.DynamicWalletClient {
|
|
|
1475
1489
|
authMode,
|
|
1476
1490
|
sdkVersion,
|
|
1477
1491
|
forwardMPCClient
|
|
1478
|
-
}), this.chainName = 'BTC';
|
|
1492
|
+
}, internalOptions), this.chainName = 'BTC';
|
|
1479
1493
|
}
|
|
1480
1494
|
}
|
|
1481
1495
|
|
package/index.esm.js
CHANGED
|
@@ -733,6 +733,20 @@ initEccLib();
|
|
|
733
733
|
}
|
|
734
734
|
};
|
|
735
735
|
|
|
736
|
+
/**
|
|
737
|
+
* Parses the derivation path string into a Uint32Array
|
|
738
|
+
* Handles empty strings and empty array strings by returning an empty Uint32Array
|
|
739
|
+
*
|
|
740
|
+
* @param derivationPath - The derivation path as a JSON string (e.g., '{"0":44,"1":0,"2":0}' or '[]' or '')
|
|
741
|
+
* @returns The derivation path as a Uint32Array
|
|
742
|
+
* @throws Error if the derivation path is invalid JSON
|
|
743
|
+
*/ const parseDerivationPath = (derivationPath)=>{
|
|
744
|
+
if (derivationPath === '[]' || derivationPath === '') {
|
|
745
|
+
return new Uint32Array([]);
|
|
746
|
+
}
|
|
747
|
+
return new Uint32Array(Object.values(JSON.parse(derivationPath)));
|
|
748
|
+
};
|
|
749
|
+
|
|
736
750
|
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
737
751
|
class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
738
752
|
/**
|
|
@@ -763,10 +777,6 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
763
777
|
const ceremonyCompletePromise = new Promise((resolve)=>{
|
|
764
778
|
ceremonyCompleteResolver = resolve;
|
|
765
779
|
});
|
|
766
|
-
// Validate address type is provided
|
|
767
|
-
if (!addressType) {
|
|
768
|
-
throw new Error('Address type is required for BTC');
|
|
769
|
-
}
|
|
770
780
|
const buildBitcoinConfig = {
|
|
771
781
|
addressType,
|
|
772
782
|
network
|
|
@@ -810,8 +820,8 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
810
820
|
addressType: addressType,
|
|
811
821
|
network
|
|
812
822
|
});
|
|
813
|
-
// Store client key shares to
|
|
814
|
-
await this.
|
|
823
|
+
// Store client key shares to storage
|
|
824
|
+
await this.setClientKeySharesToStorage({
|
|
815
825
|
accountAddress,
|
|
816
826
|
clientKeyShares,
|
|
817
827
|
overwriteOrMerge: 'overwrite'
|
|
@@ -896,14 +906,14 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
896
906
|
throw new Error('Wallet not found in walletMap');
|
|
897
907
|
}
|
|
898
908
|
const derivationPath = walletProperties.derivationPath;
|
|
899
|
-
if (
|
|
909
|
+
if (derivationPath === undefined || derivationPath === null) {
|
|
900
910
|
throw new Error('Derivation path missing in walletMap');
|
|
901
911
|
}
|
|
902
912
|
let addressType = walletProperties.addressType;
|
|
903
913
|
if (!addressType) {
|
|
904
914
|
addressType = getAddressTypeFromDerivationPath(derivationPath);
|
|
905
915
|
}
|
|
906
|
-
const clientKeyShares = await this.
|
|
916
|
+
const clientKeyShares = await this.getClientKeySharesFromStorage({
|
|
907
917
|
accountAddress
|
|
908
918
|
});
|
|
909
919
|
if (!clientKeyShares || clientKeyShares.length === 0) {
|
|
@@ -913,10 +923,11 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
913
923
|
addressType,
|
|
914
924
|
network
|
|
915
925
|
};
|
|
926
|
+
const walletDerivationPath = parseDerivationPath(derivationPath);
|
|
916
927
|
const derivedPublicKey = await this.derivePublicKey({
|
|
917
928
|
chainName: this.chainName,
|
|
918
929
|
keyShare: clientKeyShares[0],
|
|
919
|
-
derivationPath:
|
|
930
|
+
derivationPath: walletDerivationPath,
|
|
920
931
|
bitcoinConfig
|
|
921
932
|
});
|
|
922
933
|
if (!derivedPublicKey) {
|
|
@@ -998,7 +1009,7 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
998
1009
|
throw new Error('Wallet not found in walletMap');
|
|
999
1010
|
}
|
|
1000
1011
|
const derivationPath = walletProperties.derivationPath;
|
|
1001
|
-
if (
|
|
1012
|
+
if (derivationPath === undefined || derivationPath === null) {
|
|
1002
1013
|
throw new Error('Derivation path missing in walletMap');
|
|
1003
1014
|
}
|
|
1004
1015
|
let addressType = walletProperties.addressType;
|
|
@@ -1077,23 +1088,25 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
1077
1088
|
},
|
|
1078
1089
|
onCeremonyComplete: (accountAddress, walletId)=>{
|
|
1079
1090
|
ceremonyAccountAddress = accountAddress;
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
network
|
|
1083
|
-
});
|
|
1091
|
+
// For imported BTC wallets, use empty derivation path
|
|
1092
|
+
// The server returns "[]" for imported wallets (raw key, not derived)
|
|
1084
1093
|
this.initializeWalletMapEntry({
|
|
1085
1094
|
accountAddress,
|
|
1086
1095
|
walletId,
|
|
1087
1096
|
chainName: this.chainName,
|
|
1088
1097
|
thresholdSignatureScheme,
|
|
1089
|
-
derivationPath: JSON.stringify(
|
|
1090
|
-
index,
|
|
1091
|
-
value
|
|
1092
|
-
]))),
|
|
1098
|
+
derivationPath: JSON.stringify([]),
|
|
1093
1099
|
additionalProps: {
|
|
1094
1100
|
addressType: addressTypeEnum
|
|
1095
1101
|
}
|
|
1096
1102
|
});
|
|
1103
|
+
this.logger.debug('walletMap updated for wallet', {
|
|
1104
|
+
context: {
|
|
1105
|
+
accountAddress,
|
|
1106
|
+
walletId,
|
|
1107
|
+
walletMap: this.walletMap
|
|
1108
|
+
}
|
|
1109
|
+
});
|
|
1097
1110
|
ceremonyCeremonyCompleteResolver(undefined);
|
|
1098
1111
|
},
|
|
1099
1112
|
onError,
|
|
@@ -1111,7 +1124,7 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
1111
1124
|
if (publicAddressCheck && accountAddress !== publicAddressCheck) {
|
|
1112
1125
|
throw new Error(`Public address mismatch: derived address ${accountAddress} !== public address ${publicAddressCheck}`);
|
|
1113
1126
|
}
|
|
1114
|
-
await this.
|
|
1127
|
+
await this.setClientKeySharesToStorage({
|
|
1115
1128
|
accountAddress,
|
|
1116
1129
|
clientKeyShares,
|
|
1117
1130
|
overwriteOrMerge: 'overwrite'
|
|
@@ -1192,7 +1205,7 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
1192
1205
|
throw new Error('Wallet not found in walletMap');
|
|
1193
1206
|
}
|
|
1194
1207
|
const derivationPath = walletProperties.derivationPath;
|
|
1195
|
-
if (
|
|
1208
|
+
if (derivationPath === undefined || derivationPath === null) {
|
|
1196
1209
|
throw new Error('Derivation path missing in walletMap');
|
|
1197
1210
|
}
|
|
1198
1211
|
let addressType = walletProperties.addressType;
|
|
@@ -1204,16 +1217,17 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
1204
1217
|
network
|
|
1205
1218
|
};
|
|
1206
1219
|
const psbt = bitcoin.Psbt.fromBase64(transaction);
|
|
1207
|
-
const clientKeyShares = await this.
|
|
1220
|
+
const clientKeyShares = await this.getClientKeySharesFromStorage({
|
|
1208
1221
|
accountAddress: senderAddress
|
|
1209
1222
|
});
|
|
1210
1223
|
if (!clientKeyShares || clientKeyShares.length === 0) {
|
|
1211
1224
|
throw new Error('No key shares found');
|
|
1212
1225
|
}
|
|
1226
|
+
const walletDerivationPath = parseDerivationPath(derivationPath);
|
|
1213
1227
|
const derivedPublicKey = await this.derivePublicKey({
|
|
1214
1228
|
chainName: this.chainName,
|
|
1215
1229
|
keyShare: clientKeyShares[0],
|
|
1216
|
-
derivationPath:
|
|
1230
|
+
derivationPath: walletDerivationPath,
|
|
1217
1231
|
bitcoinConfig
|
|
1218
1232
|
});
|
|
1219
1233
|
if (!derivedPublicKey) {
|
|
@@ -1443,7 +1457,7 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
1443
1457
|
/**
|
|
1444
1458
|
* Creates a new instance of DynamicBtcWalletClient
|
|
1445
1459
|
* @param props - The client properties
|
|
1446
|
-
*/ constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode = AuthMode.HEADER, sdkVersion, forwardMPCClient }){
|
|
1460
|
+
*/ constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode = AuthMode.HEADER, sdkVersion, forwardMPCClient }, internalOptions){
|
|
1447
1461
|
super({
|
|
1448
1462
|
environmentId,
|
|
1449
1463
|
authToken,
|
|
@@ -1455,7 +1469,7 @@ class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
1455
1469
|
authMode,
|
|
1456
1470
|
sdkVersion,
|
|
1457
1471
|
forwardMPCClient
|
|
1458
|
-
}), this.chainName = 'BTC';
|
|
1472
|
+
}, internalOptions), this.chainName = 'BTC';
|
|
1459
1473
|
}
|
|
1460
1474
|
}
|
|
1461
1475
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/btc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.253",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@dynamic-labs/sdk-api-core": "^0.0.828",
|
|
9
|
-
"@dynamic-labs-wallet/browser": "0.0.
|
|
9
|
+
"@dynamic-labs-wallet/browser": "0.0.253",
|
|
10
10
|
"@bitcoinerlab/secp256k1": "^1.2.0",
|
|
11
11
|
"bitcoinjs-lib": "^7.0.0",
|
|
12
12
|
"bip322-js": "^3.0.0",
|
package/src/client/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BitcoinAddressType, BitcoinNetwork, DynamicWalletClient, type BIP340KeygenResult, type BitcoinConfig, type DynamicWalletClientProps, type EcdsaPublicKey, type ThresholdSignatureScheme } from '@dynamic-labs-wallet/browser';
|
|
1
|
+
import { BitcoinAddressType, BitcoinNetwork, DynamicWalletClient, type BIP340KeygenResult, type BitcoinConfig, type DynamicWalletClientInternalOptions, type DynamicWalletClientProps, type EcdsaPublicKey, type ThresholdSignatureScheme } from '@dynamic-labs-wallet/browser';
|
|
2
2
|
import type { SignMessageContext } from '@dynamic-labs/sdk-api-core';
|
|
3
3
|
export declare class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
4
4
|
readonly chainName = "BTC";
|
|
@@ -6,7 +6,7 @@ export declare class DynamicBtcWalletClient extends DynamicWalletClient {
|
|
|
6
6
|
* Creates a new instance of DynamicBtcWalletClient
|
|
7
7
|
* @param props - The client properties
|
|
8
8
|
*/
|
|
9
|
-
constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode, sdkVersion, forwardMPCClient, }: DynamicWalletClientProps);
|
|
9
|
+
constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, featureFlags, authMode, sdkVersion, forwardMPCClient, }: DynamicWalletClientProps, internalOptions?: DynamicWalletClientInternalOptions);
|
|
10
10
|
/**
|
|
11
11
|
* Creates a Bitcoin wallet account
|
|
12
12
|
* @param thresholdSignatureScheme - The threshold signature scheme to use for the wallet
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EAOnB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EAEnB,KAAK,wBAAwB,EAC9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EAOnB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,kCAAkC,EACvC,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EAEnB,KAAK,wBAAwB,EAC9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAwBrE,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,QAAQ,CAAC,SAAS,SAAS;IAE3B;;;OAGG;gBAED,EACE,aAAa,EACb,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,KAAK,EACL,YAAY,EACZ,QAA0B,EAC1B,UAAU,EACV,gBAAgB,GACjB,EAAE,wBAAwB,EAC3B,eAAe,CAAC,EAAE,kCAAkC;IAmBtD;;;;;;;;OAQG;IACG,mBAAmB,CAAC,EACxB,wBAAwB,EACxB,QAAoB,EACpB,OAAO,EACP,eAAe,EACf,aAAa,GACd,EAAE;QACD,wBAAwB,EAAE,wBAAwB,CAAC;QACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAA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,OAAO,CAAC,MAAM,CAAC;IA6MnB;;;;;;;;OAQG;IACG,iBAAiB,CAAC,EACtB,eAAe,EACf,MAAM,EACN,aAAa,EACb,OAAO,EACP,YAAuB,GACxB,EAAE;QACD,eAAe,EAAE,MAAM,CAAC;QACxB,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,EAAE,MAAM,CAAC;QACtB,OAAO,EAAE,cAAc,CAAC;QACxB,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;KAC3C,GAAG,OAAO,CAAC,MAAM,CAAC;IA6GnB;;;;;OAKG;YACW,QAAQ;IActB;;;OAGG;IACG,iBAAiB;CAOxB"}
|
package/src/utils/index.d.ts
CHANGED
|
@@ -15,4 +15,5 @@ export { calculateTaprootTweak } from './calculateTaprootTweak/index.js';
|
|
|
15
15
|
export { convertSignatureToTaprootBuffer } from './convertSignatureToTaprootBuffer/index.js';
|
|
16
16
|
export { collectPSBTInputData } from './collectPSBTInputData/index.js';
|
|
17
17
|
export { doesInputBelongToAddress } from './doesInputBelongToAddress/index.js';
|
|
18
|
+
export { parseDerivationPath } from './parseDerivationPath/index.js';
|
|
18
19
|
//# sourceMappingURL=index.d.ts.map
|
package/src/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,6CAA6C,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA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wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/parseDerivationPath/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses the derivation path string into a Uint32Array
|
|
3
|
+
* Handles empty strings and empty array strings by returning an empty Uint32Array
|
|
4
|
+
*
|
|
5
|
+
* @param derivationPath - The derivation path as a JSON string (e.g., '{"0":44,"1":0,"2":0}' or '[]' or '')
|
|
6
|
+
* @returns The derivation path as a Uint32Array
|
|
7
|
+
* @throws Error if the derivation path is invalid JSON
|
|
8
|
+
*/
|
|
9
|
+
export declare const parseDerivationPath: (derivationPath: string) => Uint32Array;
|
|
10
|
+
//# sourceMappingURL=parseDerivationPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseDerivationPath.d.ts","sourceRoot":"","sources":["../../../src/utils/parseDerivationPath/parseDerivationPath.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,mBAAoB,MAAM,KAAG,WAK5D,CAAC"}
|