@dynamic-labs-wallet/svm 0.0.29 → 0.0.31
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 +15 -3
- package/index.esm.js +15 -3
- package/package.json +3 -3
- package/src/svm/svm.d.ts +2 -1
- package/src/svm/svm.d.ts.map +1 -1
package/index.cjs.js
CHANGED
|
@@ -146,7 +146,18 @@ class DynamicSvmWalletClient extends browser.DynamicWalletClient {
|
|
|
146
146
|
// accountAddress: string;
|
|
147
147
|
// message: string;
|
|
148
148
|
// signature: string;
|
|
149
|
-
// }) {
|
|
149
|
+
// }) {
|
|
150
|
+
// const signatureEd25519 = bs58.decode(signature);
|
|
151
|
+
// const publicKey = new PublicKey(accountAddress);
|
|
152
|
+
// const messageBytes = new TextEncoder().encode(message);
|
|
153
|
+
// const verified = nacl.sign.detached.verify(
|
|
154
|
+
// messageBytes,
|
|
155
|
+
// signatureEd25519,
|
|
156
|
+
// publicKey.toBytes()
|
|
157
|
+
// );
|
|
158
|
+
// console.log('verified', verified);
|
|
159
|
+
// return verified;
|
|
160
|
+
// }
|
|
150
161
|
async signTransaction({ senderAddress, toAddress, value, rpcUrl = `https://api.devnet.solana.com` }) {
|
|
151
162
|
try {
|
|
152
163
|
const { transaction, serializedTransaction } = await createSolanaTransaction({
|
|
@@ -218,10 +229,11 @@ class DynamicSvmWalletClient extends browser.DynamicWalletClient {
|
|
|
218
229
|
*
|
|
219
230
|
* @param keyShares The key shares to export the private key for
|
|
220
231
|
* @returns The private key
|
|
221
|
-
*/ async offlineExportPrivateKey({ keyShares }) {
|
|
232
|
+
*/ async offlineExportPrivateKey({ keyShares, derivationPath }) {
|
|
222
233
|
const { derivedPrivateKey } = await this.offlineExportKey({
|
|
223
234
|
chainName: this.chainName,
|
|
224
|
-
keyShares
|
|
235
|
+
keyShares,
|
|
236
|
+
derivationPath
|
|
225
237
|
});
|
|
226
238
|
return {
|
|
227
239
|
derivedPrivateKey
|
package/index.esm.js
CHANGED
|
@@ -144,7 +144,18 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
144
144
|
// accountAddress: string;
|
|
145
145
|
// message: string;
|
|
146
146
|
// signature: string;
|
|
147
|
-
// }) {
|
|
147
|
+
// }) {
|
|
148
|
+
// const signatureEd25519 = bs58.decode(signature);
|
|
149
|
+
// const publicKey = new PublicKey(accountAddress);
|
|
150
|
+
// const messageBytes = new TextEncoder().encode(message);
|
|
151
|
+
// const verified = nacl.sign.detached.verify(
|
|
152
|
+
// messageBytes,
|
|
153
|
+
// signatureEd25519,
|
|
154
|
+
// publicKey.toBytes()
|
|
155
|
+
// );
|
|
156
|
+
// console.log('verified', verified);
|
|
157
|
+
// return verified;
|
|
158
|
+
// }
|
|
148
159
|
async signTransaction({ senderAddress, toAddress, value, rpcUrl = `https://api.devnet.solana.com` }) {
|
|
149
160
|
try {
|
|
150
161
|
const { transaction, serializedTransaction } = await createSolanaTransaction({
|
|
@@ -216,10 +227,11 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
216
227
|
*
|
|
217
228
|
* @param keyShares The key shares to export the private key for
|
|
218
229
|
* @returns The private key
|
|
219
|
-
*/ async offlineExportPrivateKey({ keyShares }) {
|
|
230
|
+
*/ async offlineExportPrivateKey({ keyShares, derivationPath }) {
|
|
220
231
|
const { derivedPrivateKey } = await this.offlineExportKey({
|
|
221
232
|
chainName: this.chainName,
|
|
222
|
-
keyShares
|
|
233
|
+
keyShares,
|
|
234
|
+
derivationPath
|
|
223
235
|
});
|
|
224
236
|
return {
|
|
225
237
|
derivedPrivateKey
|
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.31",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@dynamic-labs-wallet/browser": "0.0.
|
|
6
|
-
"@dynamic-labs-wallet/core": "0.0.
|
|
5
|
+
"@dynamic-labs-wallet/browser": "0.0.31",
|
|
6
|
+
"@dynamic-labs-wallet/core": "0.0.31",
|
|
7
7
|
"@solana/web3.js": "^1.98.0",
|
|
8
8
|
"bs58": "^6.0.0"
|
|
9
9
|
},
|
package/src/svm/svm.d.ts
CHANGED
|
@@ -60,8 +60,9 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
60
60
|
* @param keyShares The key shares to export the private key for
|
|
61
61
|
* @returns The private key
|
|
62
62
|
*/
|
|
63
|
-
offlineExportPrivateKey({ keyShares, }: {
|
|
63
|
+
offlineExportPrivateKey({ keyShares, derivationPath, }: {
|
|
64
64
|
keyShares: Ed25519KeygenResult[];
|
|
65
|
+
derivationPath?: string;
|
|
65
66
|
}): Promise<{
|
|
66
67
|
derivedPrivateKey: string | undefined;
|
|
67
68
|
}>;
|
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,EACzB,MAAM,8BAA8B,CAAC;AAStC,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,GACzB,EAAE;QACD,wBAAwB,EAAE,wBAAwB,CAAC;KACpD,GAAG,OAAO,CAAC;QACV,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,E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