@dynamic-labs-wallet/node 0.0.166 → 0.0.168
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 +80 -65
- package/index.esm.js +71 -25
- package/internal/core/package.json +17 -0
- package/internal/node/package.json +17 -0
- package/package.json +9 -4
- package/src/backup/encryption.d.ts +1 -1
- package/src/backup/encryption.d.ts.map +1 -1
- package/src/backup/utils.d.ts +2 -2
- package/src/backup/utils.d.ts.map +1 -1
- package/src/client.d.ts +6 -6
- package/src/client.d.ts.map +1 -1
- package/src/index.d.ts +8 -5
- package/src/index.d.ts.map +1 -1
- package/src/mpc/index.d.ts +2 -2
- package/src/mpc/index.d.ts.map +1 -1
- package/src/mpc/mpc.d.ts +1 -2
- package/src/mpc/mpc.d.ts.map +1 -1
- package/src/mpc/types.d.ts +1 -2
- package/src/mpc/types.d.ts.map +1 -1
- package/src/types.d.ts +8 -2
- package/src/types.d.ts.map +1 -1
- package/src/utils.d.ts +3 -3
- package/src/utils.d.ts.map +1 -1
package/index.cjs.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var core$1 = require('#internal/core');
|
|
3
4
|
var core = require('@dynamic-labs-wallet/core');
|
|
4
|
-
var node = require('
|
|
5
|
+
var node = require('#internal/node');
|
|
5
6
|
var uuid = require('uuid');
|
|
6
7
|
var logger$1 = require('@dynamic-labs/logger');
|
|
7
8
|
var crypto = require('crypto');
|
|
8
9
|
|
|
10
|
+
// Removed duplicate exports - these are already exported from #internal/core
|
|
9
11
|
const getMPCSignatureScheme = ({ signingAlgorithm, baseRelayUrl = core.MPC_RELAY_PROD_API_URL })=>{
|
|
10
12
|
switch(signingAlgorithm){
|
|
11
13
|
case core.SigningAlgorithm.ECDSA:
|
|
@@ -927,10 +929,14 @@ class DynamicWalletClient {
|
|
|
927
929
|
if (shareCount !== undefined) {
|
|
928
930
|
requiredShareCount = shareCount;
|
|
929
931
|
}
|
|
930
|
-
const dynamicShares = backups[core.BackupLocation.DYNAMIC].slice(0, requiredShareCount);
|
|
932
|
+
const dynamicShares = (backups[core.BackupLocation.DYNAMIC] || []).slice(0, requiredShareCount);
|
|
933
|
+
const externalShares = (backups[core.BackupLocation.EXTERNAL] || []).slice(0, requiredShareCount);
|
|
934
|
+
// If we have DYNAMIC shares, use those; otherwise use EXTERNAL shares
|
|
935
|
+
const sharesToUse = dynamicShares.length > 0 ? dynamicShares : externalShares;
|
|
936
|
+
const backupLocation = dynamicShares.length > 0 ? core.BackupLocation.DYNAMIC : core.BackupLocation.EXTERNAL;
|
|
931
937
|
return {
|
|
932
938
|
shares: {
|
|
933
|
-
[
|
|
939
|
+
[backupLocation]: sharesToUse.map((ks)=>{
|
|
934
940
|
var _ks_externalKeyShareId, _ref;
|
|
935
941
|
return (_ref = (_ks_externalKeyShareId = ks.externalKeyShareId) != null ? _ks_externalKeyShareId : ks.keyShareId) != null ? _ref : '';
|
|
936
942
|
})
|
|
@@ -948,12 +954,24 @@ class DynamicWalletClient {
|
|
|
948
954
|
walletOperation,
|
|
949
955
|
shareCount
|
|
950
956
|
});
|
|
951
|
-
|
|
952
|
-
const
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
+
// Get the key share IDs from whichever backup location has shares
|
|
958
|
+
const dynamicKeyShareIds = shares[core.BackupLocation.DYNAMIC] || [];
|
|
959
|
+
const externalKeyShareIds = shares[core.BackupLocation.EXTERNAL] || [];
|
|
960
|
+
// Only attempt recovery if we have DYNAMIC shares (the API doesn't support EXTERNAL shares)
|
|
961
|
+
let data;
|
|
962
|
+
if (dynamicKeyShareIds.length > 0) {
|
|
963
|
+
data = await this.apiClient.recoverEncryptedBackupByWallet({
|
|
964
|
+
walletId: wallet.walletId,
|
|
965
|
+
keyShareIds: dynamicKeyShareIds,
|
|
966
|
+
requiresSignedSessionId: false
|
|
967
|
+
});
|
|
968
|
+
} else if (externalKeyShareIds.length > 0) {
|
|
969
|
+
this.logger.debug('Skipping recovery - only EXTERNAL shares available (backUpToClientShareService: false)');
|
|
970
|
+
return []; // Return empty array since we can't recover EXTERNAL shares via API
|
|
971
|
+
} else {
|
|
972
|
+
this.logger.debug('No shares available for recovery');
|
|
973
|
+
return []; // Return empty array if no shares are available
|
|
974
|
+
}
|
|
957
975
|
const dynamicKeyShares = data.keyShares.filter((keyShare)=>keyShare.encryptedAccountCredential !== null && keyShare.backupLocation === core.BackupLocation.DYNAMIC);
|
|
958
976
|
const decryptedKeyShares = await Promise.all(dynamicKeyShares.map((keyShare)=>this.decryptKeyShare({
|
|
959
977
|
keyShare: keyShare.encryptedAccountCredential,
|
|
@@ -984,6 +1002,7 @@ class DynamicWalletClient {
|
|
|
984
1002
|
* @param walletOperation - The wallet operation that determines required fields
|
|
985
1003
|
* @returns boolean indicating if wallet needs to be re-fetched and restored from server
|
|
986
1004
|
*/ async checkWalletFields({ accountAddress, walletOperation = core.WalletOperation.REACH_THRESHOLD, shareCount }) {
|
|
1005
|
+
var _existingWallet_externalServerKeyShares;
|
|
987
1006
|
let keyshareCheck = false;
|
|
988
1007
|
let walletCheck = false;
|
|
989
1008
|
let thresholdSignatureSchemeCheck = false;
|
|
@@ -1003,7 +1022,7 @@ class DynamicWalletClient {
|
|
|
1003
1022
|
}
|
|
1004
1023
|
// check if wallet already exists with sufficient keyshares
|
|
1005
1024
|
if (existingWallet) {
|
|
1006
|
-
var
|
|
1025
|
+
var _existingWallet_externalServerKeyShares1;
|
|
1007
1026
|
const { shares } = this.recoverStrategy({
|
|
1008
1027
|
externalServerKeySharesBackupInfo: existingWallet.externalServerKeySharesBackupInfo || {
|
|
1009
1028
|
backups: getExternalServerKeyShareBackupInfo()
|
|
@@ -1013,11 +1032,35 @@ class DynamicWalletClient {
|
|
|
1013
1032
|
shareCount
|
|
1014
1033
|
});
|
|
1015
1034
|
const { dynamic: requiredDynamicKeyShareIds = [] } = shares;
|
|
1016
|
-
|
|
1035
|
+
const { external: requiredExternalKeyShareIds = [] } = shares;
|
|
1036
|
+
// Check if we have enough shares from any backup location
|
|
1037
|
+
const totalRequiredShares = requiredDynamicKeyShareIds.length + requiredExternalKeyShareIds.length;
|
|
1038
|
+
// Check if we have the required shares either loaded OR available in backup
|
|
1039
|
+
const hasLoadedShares = totalRequiredShares <= (((_existingWallet_externalServerKeyShares1 = existingWallet.externalServerKeyShares) == null ? void 0 : _existingWallet_externalServerKeyShares1.length) || 0);
|
|
1040
|
+
// Check if backup contains the specific required share IDs
|
|
1041
|
+
const hasBackupShares = existingWallet.externalServerKeySharesBackupInfo && (()=>{
|
|
1042
|
+
const backupShares = existingWallet.externalServerKeySharesBackupInfo.backups.dynamic;
|
|
1043
|
+
const allRequiredIds = [
|
|
1044
|
+
...requiredDynamicKeyShareIds,
|
|
1045
|
+
...requiredExternalKeyShareIds
|
|
1046
|
+
];
|
|
1047
|
+
return allRequiredIds.every((requiredId)=>backupShares.some((backupShare)=>backupShare.externalKeyShareId === requiredId || backupShare.keyShareId === requiredId));
|
|
1048
|
+
})();
|
|
1049
|
+
if (hasLoadedShares || hasBackupShares) {
|
|
1017
1050
|
keyshareCheck = true;
|
|
1018
1051
|
}
|
|
1019
1052
|
}
|
|
1020
|
-
|
|
1053
|
+
const result = walletCheck && thresholdSignatureSchemeCheck && keyshareCheck && derivationPathCheck;
|
|
1054
|
+
this.logger.debug('Wallet checks:', {
|
|
1055
|
+
walletCheck,
|
|
1056
|
+
thresholdSignatureSchemeCheck,
|
|
1057
|
+
keyshareCheck,
|
|
1058
|
+
derivationPathCheck,
|
|
1059
|
+
existingWallet: !!existingWallet,
|
|
1060
|
+
keySharesLength: existingWallet == null ? void 0 : (_existingWallet_externalServerKeyShares = existingWallet.externalServerKeyShares) == null ? void 0 : _existingWallet_externalServerKeyShares.length,
|
|
1061
|
+
result
|
|
1062
|
+
});
|
|
1063
|
+
return result;
|
|
1021
1064
|
}
|
|
1022
1065
|
/**
|
|
1023
1066
|
* verifyPassword attempts to recover and decrypt a single client key share using the provided password.
|
|
@@ -1043,8 +1086,10 @@ class DynamicWalletClient {
|
|
|
1043
1086
|
accountAddress
|
|
1044
1087
|
});
|
|
1045
1088
|
const { dynamic: dynamicKeyShareIds = [] } = backups;
|
|
1046
|
-
|
|
1047
|
-
|
|
1089
|
+
const { external: externalKeyShareIds = [] } = backups;
|
|
1090
|
+
// Check if we have any shares available (DYNAMIC or EXTERNAL)
|
|
1091
|
+
if (dynamicKeyShareIds.length === 0 && externalKeyShareIds.length === 0) {
|
|
1092
|
+
throw new Error('No key shares found');
|
|
1048
1093
|
}
|
|
1049
1094
|
try {
|
|
1050
1095
|
await this.recoverEncryptedBackupByWallet({
|
|
@@ -1089,12 +1134,16 @@ class DynamicWalletClient {
|
|
|
1089
1134
|
if (walletOperation === core.WalletOperation.REACH_ALL_PARTIES || walletOperation === core.WalletOperation.REFRESH || walletOperation === core.WalletOperation.RESHARE) {
|
|
1090
1135
|
return true;
|
|
1091
1136
|
}
|
|
1092
|
-
const { requiredShareCount } = this.recoverStrategy({
|
|
1137
|
+
const { shares, requiredShareCount } = this.recoverStrategy({
|
|
1093
1138
|
externalServerKeySharesBackupInfo,
|
|
1094
1139
|
thresholdSignatureScheme: this.walletMap[accountAddress].thresholdSignatureScheme,
|
|
1095
1140
|
walletOperation
|
|
1096
1141
|
});
|
|
1097
|
-
|
|
1142
|
+
const dynamicKeyShareIds = shares[core.BackupLocation.DYNAMIC] || [];
|
|
1143
|
+
const externalKeyShareIds = shares[core.BackupLocation.EXTERNAL] || [];
|
|
1144
|
+
// Check if we have enough shares from either location
|
|
1145
|
+
const totalAvailableShares = externalServerKeyShares.length + dynamicKeyShareIds.length + externalKeyShareIds.length;
|
|
1146
|
+
if (totalAvailableShares >= requiredShareCount) {
|
|
1098
1147
|
return false;
|
|
1099
1148
|
}
|
|
1100
1149
|
return true;
|
|
@@ -1176,8 +1225,8 @@ class DynamicWalletClient {
|
|
|
1176
1225
|
const user = await this.apiClient.getUser(uuid.v4());
|
|
1177
1226
|
const waasWallets = (_user_verifiedCredentials = user.verifiedCredentials) == null ? void 0 : _user_verifiedCredentials.filter((vc)=>vc.walletName === 'dynamicwaas');
|
|
1178
1227
|
const wallets = waasWallets.map((vc)=>{
|
|
1179
|
-
var _this_walletMap_vc_address,
|
|
1180
|
-
var
|
|
1228
|
+
var _this_walletMap_vc_address, _vc_walletProperties, _vc_walletProperties1;
|
|
1229
|
+
var _vc_walletProperties_derivationPath;
|
|
1181
1230
|
return {
|
|
1182
1231
|
walletId: vc.id,
|
|
1183
1232
|
chainName: vc.chain,
|
|
@@ -1186,20 +1235,18 @@ class DynamicWalletClient {
|
|
|
1186
1235
|
walletProperties: vc.walletProperties || {}
|
|
1187
1236
|
}),
|
|
1188
1237
|
externalServerKeyShares: ((_this_walletMap_vc_address = this.walletMap[vc.address]) == null ? void 0 : _this_walletMap_vc_address.externalServerKeyShares) || [],
|
|
1189
|
-
derivationPath: (
|
|
1190
|
-
thresholdSignatureScheme: (
|
|
1238
|
+
derivationPath: (_vc_walletProperties_derivationPath = (_vc_walletProperties = vc.walletProperties) == null ? void 0 : _vc_walletProperties.derivationPath) != null ? _vc_walletProperties_derivationPath : undefined,
|
|
1239
|
+
thresholdSignatureScheme: (_vc_walletProperties1 = vc.walletProperties) == null ? void 0 : _vc_walletProperties1.thresholdSignatureScheme
|
|
1191
1240
|
};
|
|
1192
1241
|
});
|
|
1193
1242
|
this.walletMap = wallets.reduce((acc, wallet)=>{
|
|
1194
|
-
var _acc_accountAddress;
|
|
1195
|
-
const accountAddress = wallet.accountAddress;
|
|
1196
1243
|
acc[wallet.accountAddress] = {
|
|
1197
1244
|
walletId: wallet.walletId,
|
|
1198
1245
|
chainName: wallet.chainName,
|
|
1199
1246
|
accountAddress: wallet.accountAddress,
|
|
1200
1247
|
externalServerKeyShares: wallet.externalServerKeyShares || [],
|
|
1201
1248
|
externalServerKeySharesBackupInfo: wallet.externalServerKeySharesBackupInfo,
|
|
1202
|
-
derivationPath:
|
|
1249
|
+
derivationPath: wallet.derivationPath,
|
|
1203
1250
|
thresholdSignatureScheme: wallet.thresholdSignatureScheme
|
|
1204
1251
|
};
|
|
1205
1252
|
return acc;
|
|
@@ -1219,53 +1266,21 @@ class DynamicWalletClient {
|
|
|
1219
1266
|
}
|
|
1220
1267
|
}
|
|
1221
1268
|
|
|
1222
|
-
Object.defineProperty(exports, "
|
|
1223
|
-
enumerable: true,
|
|
1224
|
-
get: function () { return node.BIP340; }
|
|
1225
|
-
});
|
|
1226
|
-
Object.defineProperty(exports, "BIP340InitKeygenResult", {
|
|
1227
|
-
enumerable: true,
|
|
1228
|
-
get: function () { return node.BIP340InitKeygenResult; }
|
|
1229
|
-
});
|
|
1230
|
-
Object.defineProperty(exports, "BIP340KeygenResult", {
|
|
1231
|
-
enumerable: true,
|
|
1232
|
-
get: function () { return node.BIP340KeygenResult; }
|
|
1233
|
-
});
|
|
1234
|
-
Object.defineProperty(exports, "Ecdsa", {
|
|
1235
|
-
enumerable: true,
|
|
1236
|
-
get: function () { return node.Ecdsa; }
|
|
1237
|
-
});
|
|
1238
|
-
Object.defineProperty(exports, "EcdsaInitKeygenResult", {
|
|
1239
|
-
enumerable: true,
|
|
1240
|
-
get: function () { return node.EcdsaInitKeygenResult; }
|
|
1241
|
-
});
|
|
1242
|
-
Object.defineProperty(exports, "EcdsaKeygenResult", {
|
|
1243
|
-
enumerable: true,
|
|
1244
|
-
get: function () { return node.EcdsaKeygenResult; }
|
|
1245
|
-
});
|
|
1246
|
-
Object.defineProperty(exports, "EcdsaPublicKey", {
|
|
1247
|
-
enumerable: true,
|
|
1248
|
-
get: function () { return node.EcdsaPublicKey; }
|
|
1249
|
-
});
|
|
1250
|
-
Object.defineProperty(exports, "EcdsaSignature", {
|
|
1251
|
-
enumerable: true,
|
|
1252
|
-
get: function () { return node.EcdsaSignature; }
|
|
1253
|
-
});
|
|
1254
|
-
Object.defineProperty(exports, "ExportableEd25519", {
|
|
1269
|
+
Object.defineProperty(exports, "SOLANA_RPC_URL", {
|
|
1255
1270
|
enumerable: true,
|
|
1256
|
-
get: function () { return
|
|
1271
|
+
get: function () { return core.SOLANA_RPC_URL; }
|
|
1257
1272
|
});
|
|
1258
|
-
Object.defineProperty(exports, "
|
|
1273
|
+
Object.defineProperty(exports, "ThresholdSignatureScheme", {
|
|
1259
1274
|
enumerable: true,
|
|
1260
|
-
get: function () { return
|
|
1275
|
+
get: function () { return core.ThresholdSignatureScheme; }
|
|
1261
1276
|
});
|
|
1262
|
-
Object.defineProperty(exports, "
|
|
1277
|
+
Object.defineProperty(exports, "WalletOperation", {
|
|
1263
1278
|
enumerable: true,
|
|
1264
|
-
get: function () { return
|
|
1279
|
+
get: function () { return core.WalletOperation; }
|
|
1265
1280
|
});
|
|
1266
|
-
Object.defineProperty(exports, "
|
|
1281
|
+
Object.defineProperty(exports, "getMPCChainConfig", {
|
|
1267
1282
|
enumerable: true,
|
|
1268
|
-
get: function () { return
|
|
1283
|
+
get: function () { return core.getMPCChainConfig; }
|
|
1269
1284
|
});
|
|
1270
1285
|
exports.DynamicWalletClient = DynamicWalletClient;
|
|
1271
1286
|
exports.base64ToBytes = base64ToBytes;
|
|
@@ -1280,9 +1295,9 @@ exports.isHexString = isHexString;
|
|
|
1280
1295
|
exports.mergeUniqueKeyShares = mergeUniqueKeyShares;
|
|
1281
1296
|
exports.retryPromise = retryPromise;
|
|
1282
1297
|
exports.stringToBytes = stringToBytes;
|
|
1283
|
-
Object.keys(core).forEach(function (k) {
|
|
1298
|
+
Object.keys(core$1).forEach(function (k) {
|
|
1284
1299
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
1285
1300
|
enumerable: true,
|
|
1286
|
-
get: function () { return core[k]; }
|
|
1301
|
+
get: function () { return core$1[k]; }
|
|
1287
1302
|
});
|
|
1288
1303
|
});
|
package/index.esm.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
export * from '#internal/core';
|
|
1
2
|
import { SigningAlgorithm, MPC_RELAY_PROD_API_URL, getMPCChainConfig, BackupLocation, DynamicApiClient, getClientThreshold, MPC_CONFIG, getTSSConfig, WalletOperation, getServerWalletReshareConfig } from '@dynamic-labs-wallet/core';
|
|
2
|
-
export
|
|
3
|
-
import { BIP340, ExportableEd25519, Ecdsa, MessageHash, EcdsaKeygenResult, ExportableEd25519KeygenResult, BIP340KeygenResult } from '
|
|
4
|
-
export { BIP340, BIP340InitKeygenResult, BIP340KeygenResult, Ecdsa, EcdsaInitKeygenResult, EcdsaKeygenResult, EcdsaPublicKey, EcdsaSignature, ExportableEd25519, ExportableEd25519InitKeygenResult, ExportableEd25519KeygenResult, MessageHash } from './internal/node';
|
|
3
|
+
export { SOLANA_RPC_URL, ThresholdSignatureScheme, WalletOperation, getMPCChainConfig } from '@dynamic-labs-wallet/core';
|
|
4
|
+
import { BIP340, ExportableEd25519, Ecdsa, MessageHash, EcdsaKeygenResult, ExportableEd25519KeygenResult, BIP340KeygenResult } from '#internal/node';
|
|
5
5
|
import { v4 } from 'uuid';
|
|
6
6
|
import { Logger } from '@dynamic-labs/logger';
|
|
7
7
|
import crypto from 'crypto';
|
|
8
8
|
|
|
9
|
+
// Removed duplicate exports - these are already exported from #internal/core
|
|
9
10
|
const getMPCSignatureScheme = ({ signingAlgorithm, baseRelayUrl = MPC_RELAY_PROD_API_URL })=>{
|
|
10
11
|
switch(signingAlgorithm){
|
|
11
12
|
case SigningAlgorithm.ECDSA:
|
|
@@ -927,10 +928,14 @@ class DynamicWalletClient {
|
|
|
927
928
|
if (shareCount !== undefined) {
|
|
928
929
|
requiredShareCount = shareCount;
|
|
929
930
|
}
|
|
930
|
-
const dynamicShares = backups[BackupLocation.DYNAMIC].slice(0, requiredShareCount);
|
|
931
|
+
const dynamicShares = (backups[BackupLocation.DYNAMIC] || []).slice(0, requiredShareCount);
|
|
932
|
+
const externalShares = (backups[BackupLocation.EXTERNAL] || []).slice(0, requiredShareCount);
|
|
933
|
+
// If we have DYNAMIC shares, use those; otherwise use EXTERNAL shares
|
|
934
|
+
const sharesToUse = dynamicShares.length > 0 ? dynamicShares : externalShares;
|
|
935
|
+
const backupLocation = dynamicShares.length > 0 ? BackupLocation.DYNAMIC : BackupLocation.EXTERNAL;
|
|
931
936
|
return {
|
|
932
937
|
shares: {
|
|
933
|
-
[
|
|
938
|
+
[backupLocation]: sharesToUse.map((ks)=>{
|
|
934
939
|
var _ks_externalKeyShareId, _ref;
|
|
935
940
|
return (_ref = (_ks_externalKeyShareId = ks.externalKeyShareId) != null ? _ks_externalKeyShareId : ks.keyShareId) != null ? _ref : '';
|
|
936
941
|
})
|
|
@@ -948,12 +953,24 @@ class DynamicWalletClient {
|
|
|
948
953
|
walletOperation,
|
|
949
954
|
shareCount
|
|
950
955
|
});
|
|
951
|
-
|
|
952
|
-
const
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
956
|
+
// Get the key share IDs from whichever backup location has shares
|
|
957
|
+
const dynamicKeyShareIds = shares[BackupLocation.DYNAMIC] || [];
|
|
958
|
+
const externalKeyShareIds = shares[BackupLocation.EXTERNAL] || [];
|
|
959
|
+
// Only attempt recovery if we have DYNAMIC shares (the API doesn't support EXTERNAL shares)
|
|
960
|
+
let data;
|
|
961
|
+
if (dynamicKeyShareIds.length > 0) {
|
|
962
|
+
data = await this.apiClient.recoverEncryptedBackupByWallet({
|
|
963
|
+
walletId: wallet.walletId,
|
|
964
|
+
keyShareIds: dynamicKeyShareIds,
|
|
965
|
+
requiresSignedSessionId: false
|
|
966
|
+
});
|
|
967
|
+
} else if (externalKeyShareIds.length > 0) {
|
|
968
|
+
this.logger.debug('Skipping recovery - only EXTERNAL shares available (backUpToClientShareService: false)');
|
|
969
|
+
return []; // Return empty array since we can't recover EXTERNAL shares via API
|
|
970
|
+
} else {
|
|
971
|
+
this.logger.debug('No shares available for recovery');
|
|
972
|
+
return []; // Return empty array if no shares are available
|
|
973
|
+
}
|
|
957
974
|
const dynamicKeyShares = data.keyShares.filter((keyShare)=>keyShare.encryptedAccountCredential !== null && keyShare.backupLocation === BackupLocation.DYNAMIC);
|
|
958
975
|
const decryptedKeyShares = await Promise.all(dynamicKeyShares.map((keyShare)=>this.decryptKeyShare({
|
|
959
976
|
keyShare: keyShare.encryptedAccountCredential,
|
|
@@ -984,6 +1001,7 @@ class DynamicWalletClient {
|
|
|
984
1001
|
* @param walletOperation - The wallet operation that determines required fields
|
|
985
1002
|
* @returns boolean indicating if wallet needs to be re-fetched and restored from server
|
|
986
1003
|
*/ async checkWalletFields({ accountAddress, walletOperation = WalletOperation.REACH_THRESHOLD, shareCount }) {
|
|
1004
|
+
var _existingWallet_externalServerKeyShares;
|
|
987
1005
|
let keyshareCheck = false;
|
|
988
1006
|
let walletCheck = false;
|
|
989
1007
|
let thresholdSignatureSchemeCheck = false;
|
|
@@ -1003,7 +1021,7 @@ class DynamicWalletClient {
|
|
|
1003
1021
|
}
|
|
1004
1022
|
// check if wallet already exists with sufficient keyshares
|
|
1005
1023
|
if (existingWallet) {
|
|
1006
|
-
var
|
|
1024
|
+
var _existingWallet_externalServerKeyShares1;
|
|
1007
1025
|
const { shares } = this.recoverStrategy({
|
|
1008
1026
|
externalServerKeySharesBackupInfo: existingWallet.externalServerKeySharesBackupInfo || {
|
|
1009
1027
|
backups: getExternalServerKeyShareBackupInfo()
|
|
@@ -1013,11 +1031,35 @@ class DynamicWalletClient {
|
|
|
1013
1031
|
shareCount
|
|
1014
1032
|
});
|
|
1015
1033
|
const { dynamic: requiredDynamicKeyShareIds = [] } = shares;
|
|
1016
|
-
|
|
1034
|
+
const { external: requiredExternalKeyShareIds = [] } = shares;
|
|
1035
|
+
// Check if we have enough shares from any backup location
|
|
1036
|
+
const totalRequiredShares = requiredDynamicKeyShareIds.length + requiredExternalKeyShareIds.length;
|
|
1037
|
+
// Check if we have the required shares either loaded OR available in backup
|
|
1038
|
+
const hasLoadedShares = totalRequiredShares <= (((_existingWallet_externalServerKeyShares1 = existingWallet.externalServerKeyShares) == null ? void 0 : _existingWallet_externalServerKeyShares1.length) || 0);
|
|
1039
|
+
// Check if backup contains the specific required share IDs
|
|
1040
|
+
const hasBackupShares = existingWallet.externalServerKeySharesBackupInfo && (()=>{
|
|
1041
|
+
const backupShares = existingWallet.externalServerKeySharesBackupInfo.backups.dynamic;
|
|
1042
|
+
const allRequiredIds = [
|
|
1043
|
+
...requiredDynamicKeyShareIds,
|
|
1044
|
+
...requiredExternalKeyShareIds
|
|
1045
|
+
];
|
|
1046
|
+
return allRequiredIds.every((requiredId)=>backupShares.some((backupShare)=>backupShare.externalKeyShareId === requiredId || backupShare.keyShareId === requiredId));
|
|
1047
|
+
})();
|
|
1048
|
+
if (hasLoadedShares || hasBackupShares) {
|
|
1017
1049
|
keyshareCheck = true;
|
|
1018
1050
|
}
|
|
1019
1051
|
}
|
|
1020
|
-
|
|
1052
|
+
const result = walletCheck && thresholdSignatureSchemeCheck && keyshareCheck && derivationPathCheck;
|
|
1053
|
+
this.logger.debug('Wallet checks:', {
|
|
1054
|
+
walletCheck,
|
|
1055
|
+
thresholdSignatureSchemeCheck,
|
|
1056
|
+
keyshareCheck,
|
|
1057
|
+
derivationPathCheck,
|
|
1058
|
+
existingWallet: !!existingWallet,
|
|
1059
|
+
keySharesLength: existingWallet == null ? void 0 : (_existingWallet_externalServerKeyShares = existingWallet.externalServerKeyShares) == null ? void 0 : _existingWallet_externalServerKeyShares.length,
|
|
1060
|
+
result
|
|
1061
|
+
});
|
|
1062
|
+
return result;
|
|
1021
1063
|
}
|
|
1022
1064
|
/**
|
|
1023
1065
|
* verifyPassword attempts to recover and decrypt a single client key share using the provided password.
|
|
@@ -1043,8 +1085,10 @@ class DynamicWalletClient {
|
|
|
1043
1085
|
accountAddress
|
|
1044
1086
|
});
|
|
1045
1087
|
const { dynamic: dynamicKeyShareIds = [] } = backups;
|
|
1046
|
-
|
|
1047
|
-
|
|
1088
|
+
const { external: externalKeyShareIds = [] } = backups;
|
|
1089
|
+
// Check if we have any shares available (DYNAMIC or EXTERNAL)
|
|
1090
|
+
if (dynamicKeyShareIds.length === 0 && externalKeyShareIds.length === 0) {
|
|
1091
|
+
throw new Error('No key shares found');
|
|
1048
1092
|
}
|
|
1049
1093
|
try {
|
|
1050
1094
|
await this.recoverEncryptedBackupByWallet({
|
|
@@ -1089,12 +1133,16 @@ class DynamicWalletClient {
|
|
|
1089
1133
|
if (walletOperation === WalletOperation.REACH_ALL_PARTIES || walletOperation === WalletOperation.REFRESH || walletOperation === WalletOperation.RESHARE) {
|
|
1090
1134
|
return true;
|
|
1091
1135
|
}
|
|
1092
|
-
const { requiredShareCount } = this.recoverStrategy({
|
|
1136
|
+
const { shares, requiredShareCount } = this.recoverStrategy({
|
|
1093
1137
|
externalServerKeySharesBackupInfo,
|
|
1094
1138
|
thresholdSignatureScheme: this.walletMap[accountAddress].thresholdSignatureScheme,
|
|
1095
1139
|
walletOperation
|
|
1096
1140
|
});
|
|
1097
|
-
|
|
1141
|
+
const dynamicKeyShareIds = shares[BackupLocation.DYNAMIC] || [];
|
|
1142
|
+
const externalKeyShareIds = shares[BackupLocation.EXTERNAL] || [];
|
|
1143
|
+
// Check if we have enough shares from either location
|
|
1144
|
+
const totalAvailableShares = externalServerKeyShares.length + dynamicKeyShareIds.length + externalKeyShareIds.length;
|
|
1145
|
+
if (totalAvailableShares >= requiredShareCount) {
|
|
1098
1146
|
return false;
|
|
1099
1147
|
}
|
|
1100
1148
|
return true;
|
|
@@ -1176,8 +1224,8 @@ class DynamicWalletClient {
|
|
|
1176
1224
|
const user = await this.apiClient.getUser(v4());
|
|
1177
1225
|
const waasWallets = (_user_verifiedCredentials = user.verifiedCredentials) == null ? void 0 : _user_verifiedCredentials.filter((vc)=>vc.walletName === 'dynamicwaas');
|
|
1178
1226
|
const wallets = waasWallets.map((vc)=>{
|
|
1179
|
-
var _this_walletMap_vc_address,
|
|
1180
|
-
var
|
|
1227
|
+
var _this_walletMap_vc_address, _vc_walletProperties, _vc_walletProperties1;
|
|
1228
|
+
var _vc_walletProperties_derivationPath;
|
|
1181
1229
|
return {
|
|
1182
1230
|
walletId: vc.id,
|
|
1183
1231
|
chainName: vc.chain,
|
|
@@ -1186,20 +1234,18 @@ class DynamicWalletClient {
|
|
|
1186
1234
|
walletProperties: vc.walletProperties || {}
|
|
1187
1235
|
}),
|
|
1188
1236
|
externalServerKeyShares: ((_this_walletMap_vc_address = this.walletMap[vc.address]) == null ? void 0 : _this_walletMap_vc_address.externalServerKeyShares) || [],
|
|
1189
|
-
derivationPath: (
|
|
1190
|
-
thresholdSignatureScheme: (
|
|
1237
|
+
derivationPath: (_vc_walletProperties_derivationPath = (_vc_walletProperties = vc.walletProperties) == null ? void 0 : _vc_walletProperties.derivationPath) != null ? _vc_walletProperties_derivationPath : undefined,
|
|
1238
|
+
thresholdSignatureScheme: (_vc_walletProperties1 = vc.walletProperties) == null ? void 0 : _vc_walletProperties1.thresholdSignatureScheme
|
|
1191
1239
|
};
|
|
1192
1240
|
});
|
|
1193
1241
|
this.walletMap = wallets.reduce((acc, wallet)=>{
|
|
1194
|
-
var _acc_accountAddress;
|
|
1195
|
-
const accountAddress = wallet.accountAddress;
|
|
1196
1242
|
acc[wallet.accountAddress] = {
|
|
1197
1243
|
walletId: wallet.walletId,
|
|
1198
1244
|
chainName: wallet.chainName,
|
|
1199
1245
|
accountAddress: wallet.accountAddress,
|
|
1200
1246
|
externalServerKeyShares: wallet.externalServerKeyShares || [],
|
|
1201
1247
|
externalServerKeySharesBackupInfo: wallet.externalServerKeySharesBackupInfo,
|
|
1202
|
-
derivationPath:
|
|
1248
|
+
derivationPath: wallet.derivationPath,
|
|
1203
1249
|
thresholdSignatureScheme: wallet.thresholdSignatureScheme
|
|
1204
1250
|
};
|
|
1205
1251
|
return acc;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "#internal/core",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./index.d.ts",
|
|
10
|
+
"require": "./index.js",
|
|
11
|
+
"import": "./index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@noble/hashes": "1.7.1"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "#internal/node",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./index.d.ts",
|
|
10
|
+
"require": "./index.js",
|
|
11
|
+
"import": "./index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@noble/hashes": "1.7.1"
|
|
16
|
+
}
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/node",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.168",
|
|
4
4
|
"license": "Licensed under the Dynamic Labs, Inc. Terms Of Service (https://www.dynamic.xyz/terms-conditions)",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"dependencies": {
|
|
6
|
-
"@dynamic-labs-wallet/core": "0.0.
|
|
7
|
+
"@dynamic-labs-wallet/core": "0.0.168",
|
|
7
8
|
"@dynamic-labs/logger": "^4.25.3",
|
|
8
9
|
"uuid": "11.1.0",
|
|
9
10
|
"@noble/hashes": "1.7.1"
|
|
@@ -23,13 +24,17 @@
|
|
|
23
24
|
"main": "./index.cjs.js",
|
|
24
25
|
"module": "./index.esm.js",
|
|
25
26
|
"types": "./index.esm.d.ts",
|
|
26
|
-
"type": "module",
|
|
27
27
|
"exports": {
|
|
28
28
|
"./package.json": "./package.json",
|
|
29
29
|
".": {
|
|
30
30
|
"types": "./index.esm.d.ts",
|
|
31
31
|
"import": "./index.esm.js",
|
|
32
|
-
"require": "./index.cjs.js"
|
|
32
|
+
"require": "./index.cjs.js",
|
|
33
|
+
"default": "./index.esm.js"
|
|
33
34
|
}
|
|
35
|
+
},
|
|
36
|
+
"imports": {
|
|
37
|
+
"#internal/node": "./internal/node/index.js",
|
|
38
|
+
"#internal/core": "./internal/core/index.js"
|
|
34
39
|
}
|
|
35
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EncryptionMetadata } from '@dynamic-labs-wallet/core';
|
|
1
|
+
import type { EncryptionMetadata } from '@dynamic-labs-wallet/core';
|
|
2
2
|
export declare const ENCRYPTION_VERSION_LEGACY = "v1";
|
|
3
3
|
export declare const ENCRYPTION_VERSION_CURRENT = "v2";
|
|
4
4
|
export declare const PBKDF2_ALGORITHM = "PBKDF2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../../src/backup/encryption.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../../src/backup/encryption.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAQpE,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,eAAO,MAAM,qBAAqB,YAAY,CAAC;AAC/C,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;CAiBtB,CAAC;AAEX,eAAO,MAAM,iBAAiB,SAC8B,CAAC;AAC7D,eAAO,MAAM,wBAAwB,QACsB,CAAC;AAE5D,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAsCjE;;;GAGG;AACH,eAAO,MAAM,WAAW,iCAIrB;IACD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;;;;;EAkCA,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,wBAGrB;IACD,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACrE,QAAQ,EAAE,MAAM,CAAC;CAClB,oBA2CA,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B,YACjC,MAAM,KACd,kBAcF,CAAC"}
|
package/src/backup/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServerKeyShare } from '../mpc/types';
|
|
2
|
-
import { WalletProperties } from '../types';
|
|
1
|
+
import type { ServerKeyShare } from '../mpc/types.js';
|
|
2
|
+
import type { WalletProperties } from '../types.js';
|
|
3
3
|
export declare const checkIfExternalServerKeySharesAreRequired: (wallet: WalletProperties, externalServerKeyShares?: ServerKeyShare[]) => void;
|
|
4
4
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/backup/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/backup/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,eAAO,MAAM,yCAAyC,WAC5C,gBAAgB,4BACE,cAAc,EAAE,SAkB3C,CAAC"}
|
package/src/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EcdsaKeygenResult, BIP340KeygenResult, EcdsaPublicKey, EcdsaSignature, ExportableEd25519KeygenResult } from '
|
|
2
|
-
import { ThresholdSignatureScheme, DynamicApiClient, WalletOperation, KeyShareBackupInfo, BackupLocation } from '@dynamic-labs-wallet/core';
|
|
3
|
-
import { ServerInitKeygenResult } from './mpc/types';
|
|
4
|
-
import { WalletProperties } from './types';
|
|
1
|
+
import { EcdsaKeygenResult, BIP340KeygenResult, type EcdsaPublicKey, type EcdsaSignature, ExportableEd25519KeygenResult } from '#internal/node';
|
|
2
|
+
import { type ThresholdSignatureScheme, DynamicApiClient, WalletOperation, type KeyShareBackupInfo, BackupLocation } from '@dynamic-labs-wallet/core';
|
|
3
|
+
import type { ServerInitKeygenResult } from './mpc/types.js';
|
|
4
|
+
import type { WalletProperties } from './types.js';
|
|
5
5
|
type ServerKeyShare = EcdsaKeygenResult | BIP340KeygenResult | ExportableEd25519KeygenResult;
|
|
6
6
|
export declare class DynamicWalletClient {
|
|
7
7
|
environmentId: string;
|
|
@@ -170,7 +170,7 @@ export declare class DynamicWalletClient {
|
|
|
170
170
|
getExternalServerKeyShares({ accountAddress, password, }: {
|
|
171
171
|
accountAddress: string;
|
|
172
172
|
password?: string;
|
|
173
|
-
}): Promise<import("./
|
|
173
|
+
}): Promise<import("./index.js").ServerKeyShare[]>;
|
|
174
174
|
updatePassword({ accountAddress, existingPassword, newPassword, backUpToClientShareService, }: {
|
|
175
175
|
accountAddress: string;
|
|
176
176
|
existingPassword?: string;
|
|
@@ -212,7 +212,7 @@ export declare class DynamicWalletClient {
|
|
|
212
212
|
exportExternalServerKeyShares({ accountAddress, password, }: {
|
|
213
213
|
accountAddress: string;
|
|
214
214
|
password?: string;
|
|
215
|
-
}): Promise<import("./
|
|
215
|
+
}): Promise<import("./index.js").ServerKeyShare[]>;
|
|
216
216
|
/**
|
|
217
217
|
* Helper function to check if the required wallet fields are present and valid
|
|
218
218
|
* @param accountAddress - The account address of the wallet to check
|
package/src/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../packages/src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../packages/src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,cAAc,EAEnB,KAAK,cAAc,EAInB,6BAA6B,EAC9B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,KAAK,wBAAwB,EAC7B,gBAAgB,EAIhB,eAAe,EACf,KAAK,kBAAkB,EACvB,cAAc,EAIf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAcnD,KAAK,cAAc,GACf,iBAAiB,GACjB,kBAAkB,GAClB,6BAA6B,CAAC;AAElC,qBAAa,mBAAmB;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IAEtB,SAAS,CAAC,MAAM,wCAAU;IAE1B,SAAS,CAAC,SAAS,EAAG,gBAAgB,CAAC;IACvC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAM;IAC3D,SAAS,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACtC,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACpC,SAAS,CAAC,UAAU,CAAC,EAAE,MAAM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C,EAAE,eAAe,CAAC;KACnC,GAAG,OAAO,CAAC,OAAO,CAAC;IAYpB;;OAEG;IACG,uCAAuC,CAAC,EAC5C,cAAc,EACd,eAAiD,GAClD,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,GAAG,OAAO,CAAC,OAAO,CAAC;IAwCd,yCAAyC,CAAC,EAC9C,cAAc,GACf,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAoBzB,SAAS,CAAC,EACd,cAAc,EACd,eAA8C,EAC9C,UAAsB,EACtB,QAAoB,GACrB,EAAE;QACD,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;IA2EK,UAAU;CAqCjB"}
|
package/src/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
1
|
+
export * from '#internal/core';
|
|
2
|
+
export { ThresholdSignatureScheme } from '@dynamic-labs-wallet/core';
|
|
3
|
+
export { WalletOperation, SOLANA_RPC_URL, getMPCChainConfig, } from '@dynamic-labs-wallet/core';
|
|
4
|
+
export { getMPCSignatureScheme, getMPCSigner } from './mpc/index.js';
|
|
5
|
+
export type { ServerInitKeygenResult, ServerKeyShare, SignMessage, } from './mpc/index.js';
|
|
6
|
+
export * from './client.js';
|
|
7
|
+
export * from './types.js';
|
|
8
|
+
export * from './utils.js';
|
|
6
9
|
//# sourceMappingURL=index.d.ts.map
|
package/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACrE,YAAY,EACV,sBAAsB,EACtB,cAAc,EACd,WAAW,GACZ,MAAM,gBAAgB,CAAC;AAGxB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
package/src/mpc/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { getMPCSignatureScheme, getMPCSigner } from './mpc.js';
|
|
2
|
+
export type { ServerInitKeygenResult, ServerKeyShare, SignMessage, } from './types.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/src/mpc/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mpc/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mpc/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC/D,YAAY,EACV,sBAAsB,EACtB,cAAc,EACd,WAAW,GACZ,MAAM,YAAY,CAAC"}
|
package/src/mpc/mpc.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SigningAlgorithm } from '@dynamic-labs-wallet/core';
|
|
2
|
-
import { Ecdsa, ExportableEd25519, BIP340
|
|
3
|
-
export { Ecdsa, ExportableEd25519, BIP340, EcdsaPublicKey, EcdsaKeygenResult, ExportableEd25519KeygenResult, BIP340KeygenResult, MessageHash, EcdsaInitKeygenResult, ExportableEd25519InitKeygenResult, BIP340InitKeygenResult, EcdsaSignature, };
|
|
2
|
+
import { Ecdsa, ExportableEd25519, BIP340 } from '#internal/node';
|
|
4
3
|
export declare const getMPCSignatureScheme: ({ signingAlgorithm, baseRelayUrl, }: {
|
|
5
4
|
signingAlgorithm: SigningAlgorithm;
|
|
6
5
|
baseRelayUrl?: string;
|
package/src/mpc/mpc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mpc.d.ts","sourceRoot":"","sources":["../../src/mpc/mpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAEjB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,
|
|
1
|
+
{"version":3,"file":"mpc.d.ts","sourceRoot":"","sources":["../../src/mpc/mpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAEjB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAIlE,eAAO,MAAM,qBAAqB,wCAG/B;IACD,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,uCAWA,CAAC;AAEF,eAAO,MAAM,YAAY,iCAGtB;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,uCAOA,CAAC"}
|
package/src/mpc/types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { BIP340InitKeygenResult, BIP340KeygenResult,
|
|
1
|
+
import type { BIP340InitKeygenResult, BIP340KeygenResult, EcdsaInitKeygenResult, EcdsaKeygenResult, Ed25519InitKeygenResult, Ed25519KeygenResult, MessageHash } from '#internal/node';
|
|
2
2
|
export type ServerInitKeygenResult = EcdsaInitKeygenResult | Ed25519InitKeygenResult | BIP340InitKeygenResult;
|
|
3
3
|
export type ServerKeyShare = EcdsaKeygenResult | Ed25519KeygenResult | BIP340KeygenResult;
|
|
4
4
|
export type SignMessage = MessageHash | Uint8Array;
|
|
5
|
-
export type { Ecdsa, Ed25519, BIP340, EcdsaPublicKey, EcdsaKeygenResult, Ed25519KeygenResult, BIP340KeygenResult, MessageHash, EcdsaSignature, } from '../../internal/node';
|
|
6
5
|
//# sourceMappingURL=types.d.ts.map
|
package/src/mpc/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/mpc/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/mpc/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,sBAAsB,GAC9B,qBAAqB,GACrB,uBAAuB,GACvB,sBAAsB,CAAC;AAE3B,MAAM,MAAM,cAAc,GACtB,iBAAiB,GACjB,mBAAmB,GACnB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,UAAU,CAAC"}
|
package/src/types.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { ThresholdSignatureScheme, KeyShareBackupInfo } from '@dynamic-labs-wallet/core';
|
|
2
|
-
import { ServerKeyShare } from './mpc/types';
|
|
1
|
+
import type { ThresholdSignatureScheme, KeyShareBackupInfo } from '@dynamic-labs-wallet/core';
|
|
2
|
+
import type { ServerKeyShare } from './mpc/types.js';
|
|
3
|
+
export interface DynamicWalletClientProps {
|
|
4
|
+
environmentId: string;
|
|
5
|
+
baseApiUrl?: string;
|
|
6
|
+
baseMPCRelayApiUrl?: string;
|
|
7
|
+
debug?: boolean;
|
|
8
|
+
}
|
|
3
9
|
export interface WalletProperties {
|
|
4
10
|
chainName: string;
|
|
5
11
|
walletId: string;
|
package/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../packages/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../packages/src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,uBAAuB,EAAE,cAAc,EAAE,CAAC;IAC1C,wBAAwB,EAAE,wBAAwB,CAAC;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iCAAiC,EAAE,kBAAkB,CAAC;CACvD"}
|
package/src/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WaasWalletProperties, KeyShareBackupInfo } from '@dynamic-labs-wallet/core';
|
|
2
|
-
import { ServerKeyShare } from './mpc/types';
|
|
3
|
-
import { MessageHash } from '
|
|
1
|
+
import { type WaasWalletProperties, type KeyShareBackupInfo } from '@dynamic-labs-wallet/core';
|
|
2
|
+
import type { ServerKeyShare } from './mpc/types.js';
|
|
3
|
+
import { MessageHash } from '#internal/node';
|
|
4
4
|
export declare const bytesToBase64: (arr: Uint8Array) => string;
|
|
5
5
|
export declare const stringToBytes: (str: string) => Uint8Array;
|
|
6
6
|
export declare const base64ToBytes: (base64: string) => Uint8Array;
|
package/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../packages/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../packages/src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EAExB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,eAAO,MAAM,aAAa,QAAS,UAAU,WAE5C,CAAC;AAEF,eAAO,MAAM,aAAa,QAAS,MAAM,eAExC,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,MAAM,eAE3C,CAAC;AAGF,eAAO,MAAM,mBAAmB,QAAS,MAAM,KAAG,MAEjD,CAAC;AAEF,eAAO,MAAM,WAAW,QAAS,MAAM,YAKtC,CAAC;AAEF,eAAO,MAAM,mCAAmC,YAAa;IAC3D,gBAAgB,EAAE,oBAAoB,CAAC;CACxC,KAAG,kBAuCH,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,sBACZ,cAAc,EAAE,gBACrB,cAAc,EAAE,KAC7B,cAAc,EAchB,CAAC;AAEF,UAAU,WAAW;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,CAAC,EAClC,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC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