@dynamic-labs-wallet/browser 0.0.12 → 0.0.13
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 +5 -5
- package/index.esm.js +5 -5
- package/package.json +3 -3
- package/src/client.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -442,8 +442,8 @@ class DynamicWalletClient {
|
|
|
442
442
|
}
|
|
443
443
|
async offlineExportKey({ chainName, keyShares }) {
|
|
444
444
|
try {
|
|
445
|
-
if (!keyShares || keyShares.length
|
|
446
|
-
throw new Error(
|
|
445
|
+
if (!keyShares || keyShares.length < 2) {
|
|
446
|
+
throw new Error(`Must provide at least min threshold of key shares`);
|
|
447
447
|
}
|
|
448
448
|
const mpcSigner = getMPCSigner({
|
|
449
449
|
chainName,
|
|
@@ -614,10 +614,10 @@ class DynamicWalletClient {
|
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
616
|
async exportClientKeyshares({ accountAddress }) {
|
|
617
|
-
const
|
|
617
|
+
const clientKeyShares = await this.getClientKeyShares({
|
|
618
618
|
accountAddress
|
|
619
619
|
});
|
|
620
|
-
const text = JSON.stringify(
|
|
620
|
+
const text = JSON.stringify(clientKeyShares);
|
|
621
621
|
const blob = new Blob([
|
|
622
622
|
text
|
|
623
623
|
], {
|
|
@@ -629,7 +629,7 @@ class DynamicWalletClient {
|
|
|
629
629
|
a.download = 'clientKeyshare.txt';
|
|
630
630
|
a.click();
|
|
631
631
|
}
|
|
632
|
-
async
|
|
632
|
+
async getClientKeyShares({ accountAddress }) {
|
|
633
633
|
const wallet = await this.getWallet({
|
|
634
634
|
accountAddress
|
|
635
635
|
});
|
package/index.esm.js
CHANGED
|
@@ -442,8 +442,8 @@ class DynamicWalletClient {
|
|
|
442
442
|
}
|
|
443
443
|
async offlineExportKey({ chainName, keyShares }) {
|
|
444
444
|
try {
|
|
445
|
-
if (!keyShares || keyShares.length
|
|
446
|
-
throw new Error(
|
|
445
|
+
if (!keyShares || keyShares.length < 2) {
|
|
446
|
+
throw new Error(`Must provide at least min threshold of key shares`);
|
|
447
447
|
}
|
|
448
448
|
const mpcSigner = getMPCSigner({
|
|
449
449
|
chainName,
|
|
@@ -614,10 +614,10 @@ class DynamicWalletClient {
|
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
616
|
async exportClientKeyshares({ accountAddress }) {
|
|
617
|
-
const
|
|
617
|
+
const clientKeyShares = await this.getClientKeyShares({
|
|
618
618
|
accountAddress
|
|
619
619
|
});
|
|
620
|
-
const text = JSON.stringify(
|
|
620
|
+
const text = JSON.stringify(clientKeyShares);
|
|
621
621
|
const blob = new Blob([
|
|
622
622
|
text
|
|
623
623
|
], {
|
|
@@ -629,7 +629,7 @@ class DynamicWalletClient {
|
|
|
629
629
|
a.download = 'clientKeyshare.txt';
|
|
630
630
|
a.click();
|
|
631
631
|
}
|
|
632
|
-
async
|
|
632
|
+
async getClientKeyShares({ accountAddress }) {
|
|
633
633
|
const wallet = await this.getWallet({
|
|
634
634
|
accountAddress
|
|
635
635
|
});
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/browser",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@dynamic-labs-wallet/core": "0.0.
|
|
6
|
-
"@dynamic-labs-wallet/lib-mpc-web": "0.0.
|
|
5
|
+
"@dynamic-labs-wallet/core": "0.0.13",
|
|
6
|
+
"@dynamic-labs-wallet/lib-mpc-web": "0.0.13"
|
|
7
7
|
},
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "restricted"
|
package/src/client.d.ts
CHANGED
|
@@ -137,7 +137,7 @@ export declare class DynamicWalletClient {
|
|
|
137
137
|
exportClientKeyshares({ accountAddress }: {
|
|
138
138
|
accountAddress?: string;
|
|
139
139
|
}): Promise<void>;
|
|
140
|
-
|
|
140
|
+
getClientKeyShares({ accountAddress }: {
|
|
141
141
|
accountAddress?: string;
|
|
142
142
|
}): Promise<ClientKeyShare[]>;
|
|
143
143
|
getWallet({ accountAddress }: {
|