@dynamic-labs-wallet/svm 0.0.34 → 0.0.36
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 +4 -2
- package/index.esm.js +4 -2
- package/package.json +3 -3
- package/src/svm/svm.d.ts +3 -1
- package/src/svm/svm.d.ts.map +1 -1
package/index.cjs.js
CHANGED
|
@@ -224,8 +224,9 @@ class DynamicSvmWalletClient extends browser.DynamicWalletClient {
|
|
|
224
224
|
* @param privateKey The private key to import
|
|
225
225
|
* @param chainName The chain name to import the private key for
|
|
226
226
|
* @param thresholdSignatureScheme The threshold signature scheme to use
|
|
227
|
+
* @param password The password for encrypted backup shares
|
|
227
228
|
* @returns The account address, raw public key, and client key shares
|
|
228
|
-
*/ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme }) {
|
|
229
|
+
*/ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined }) {
|
|
229
230
|
//get public key from private key
|
|
230
231
|
const publicKey = this.getPublicKeyFromPrivateKey(privateKey);
|
|
231
232
|
const formattedPrivateKey = await this.decodePrivateKeyForSolana(privateKey);
|
|
@@ -253,7 +254,8 @@ class DynamicSvmWalletClient extends browser.DynamicWalletClient {
|
|
|
253
254
|
clientKeySharesBackupInfo: browser.getClientKeyShareBackupInfo()
|
|
254
255
|
};
|
|
255
256
|
await this.storeEncryptedBackupByWallet({
|
|
256
|
-
accountAddress
|
|
257
|
+
accountAddress,
|
|
258
|
+
password
|
|
257
259
|
});
|
|
258
260
|
return {
|
|
259
261
|
accountAddress,
|
package/index.esm.js
CHANGED
|
@@ -222,8 +222,9 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
222
222
|
* @param privateKey The private key to import
|
|
223
223
|
* @param chainName The chain name to import the private key for
|
|
224
224
|
* @param thresholdSignatureScheme The threshold signature scheme to use
|
|
225
|
+
* @param password The password for encrypted backup shares
|
|
225
226
|
* @returns The account address, raw public key, and client key shares
|
|
226
|
-
*/ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme }) {
|
|
227
|
+
*/ async importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password = undefined }) {
|
|
227
228
|
//get public key from private key
|
|
228
229
|
const publicKey = this.getPublicKeyFromPrivateKey(privateKey);
|
|
229
230
|
const formattedPrivateKey = await this.decodePrivateKeyForSolana(privateKey);
|
|
@@ -251,7 +252,8 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
251
252
|
clientKeySharesBackupInfo: getClientKeyShareBackupInfo()
|
|
252
253
|
};
|
|
253
254
|
await this.storeEncryptedBackupByWallet({
|
|
254
|
-
accountAddress
|
|
255
|
+
accountAddress,
|
|
256
|
+
password
|
|
255
257
|
});
|
|
256
258
|
return {
|
|
257
259
|
accountAddress,
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/svm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@dynamic-labs-wallet/browser": "0.0.
|
|
6
|
-
"@dynamic-labs-wallet/core": "0.0.
|
|
5
|
+
"@dynamic-labs-wallet/browser": "0.0.36",
|
|
6
|
+
"@dynamic-labs-wallet/core": "0.0.36",
|
|
7
7
|
"@solana/web3.js": "^1.98.0",
|
|
8
8
|
"bs58": "^6.0.0"
|
|
9
9
|
},
|
package/src/svm/svm.d.ts
CHANGED
|
@@ -83,12 +83,14 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
83
83
|
* @param privateKey The private key to import
|
|
84
84
|
* @param chainName The chain name to import the private key for
|
|
85
85
|
* @param thresholdSignatureScheme The threshold signature scheme to use
|
|
86
|
+
* @param password The password for encrypted backup shares
|
|
86
87
|
* @returns The account address, raw public key, and client key shares
|
|
87
88
|
*/
|
|
88
|
-
importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, }: {
|
|
89
|
+
importPrivateKey({ privateKey, chainName, thresholdSignatureScheme, password, }: {
|
|
89
90
|
privateKey: string;
|
|
90
91
|
chainName: string;
|
|
91
92
|
thresholdSignatureScheme: ThresholdSignatureScheme;
|
|
93
|
+
password?: string;
|
|
92
94
|
}): Promise<{
|
|
93
95
|
accountAddress: string;
|
|
94
96
|
rawPublicKey: Uint8Array | undefined;
|
package/src/svm/svm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svm.d.ts","sourceRoot":"","sources":["../../src/svm/svm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EAGzB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAW,WAAW,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG7E,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,QAAQ,CAAC,SAAS,SAAS;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;gBAEZ,EACV,aAAa,EACb,SAAS,EACT,UAAU,EACV,kBAAkB,GACnB,EAAE;QACD,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B;IASD;;;;;OAKG;IACG,mBAAmB,CAAC,EACxB,wBAAwB,EACxB,QAAoB,GACrB,EAAE;QACD,wBAAwB,EAAE,wBAAwB,CAAC;QACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC;QACV,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,UAAU,CAAC;QACzB,eAAe,EAAE,cAAc,EAAE,CAAC;KACnC,CAAC;IAoDI,oBAAoB,CAAC,YAAY,EAAE,UAAU;;;IAOnD;;;;;;OAMG;IACG,WAAW,CAAC,EAChB,OAAO,EACP,cAAc,EACd,QAAoB,GACrB,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