@dynamic-labs-wallet/evm 0.0.80 → 0.0.82
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 +9 -6
- package/index.esm.js +9 -6
- package/package.json +2 -2
- package/src/client/client.d.ts +6 -3
- package/src/client/client.d.ts.map +1 -1
package/index.cjs.js
CHANGED
|
@@ -113,11 +113,12 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
113
113
|
throw new Error(ERROR_CREATE_WALLET_ACCOUNT);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
async signMessage({ message, accountAddress, password = undefined }) {
|
|
116
|
+
async signMessage({ message, accountAddress, password = undefined, signedSessionId }) {
|
|
117
117
|
await this.verifyPassword({
|
|
118
118
|
accountAddress,
|
|
119
119
|
password,
|
|
120
|
-
walletOperation: browser.WalletOperation.SIGN_MESSAGE
|
|
120
|
+
walletOperation: browser.WalletOperation.SIGN_MESSAGE,
|
|
121
|
+
signedSessionId
|
|
121
122
|
});
|
|
122
123
|
try {
|
|
123
124
|
if (!accountAddress) {
|
|
@@ -157,11 +158,12 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
157
158
|
throw new Error(ERROR_VERIFY_MESSAGE_SIGNATURE);
|
|
158
159
|
}
|
|
159
160
|
}
|
|
160
|
-
async signTransaction({ senderAddress, transaction, password = undefined }) {
|
|
161
|
+
async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId }) {
|
|
161
162
|
await this.verifyPassword({
|
|
162
163
|
accountAddress: senderAddress,
|
|
163
164
|
password,
|
|
164
|
-
walletOperation: browser.WalletOperation.SIGN_TRANSACTION
|
|
165
|
+
walletOperation: browser.WalletOperation.SIGN_TRANSACTION,
|
|
166
|
+
signedSessionId
|
|
165
167
|
});
|
|
166
168
|
const serializedTx = viem.serializeTransaction(transaction);
|
|
167
169
|
const serializedTxBytes = Uint8Array.from(Buffer.from(serializedTx.slice(2), 'hex'));
|
|
@@ -206,11 +208,12 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
206
208
|
publicKeyHex
|
|
207
209
|
};
|
|
208
210
|
}
|
|
209
|
-
async exportPrivateKey({ accountAddress, password = undefined }) {
|
|
211
|
+
async exportPrivateKey({ accountAddress, password = undefined, signedSessionId }) {
|
|
210
212
|
await this.verifyPassword({
|
|
211
213
|
accountAddress,
|
|
212
214
|
password,
|
|
213
|
-
walletOperation: browser.WalletOperation.EXPORT_PRIVATE_KEY
|
|
215
|
+
walletOperation: browser.WalletOperation.EXPORT_PRIVATE_KEY,
|
|
216
|
+
signedSessionId
|
|
214
217
|
});
|
|
215
218
|
const { derivedPrivateKey } = await this.exportKey({
|
|
216
219
|
accountAddress,
|
package/index.esm.js
CHANGED
|
@@ -111,11 +111,12 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
111
111
|
throw new Error(ERROR_CREATE_WALLET_ACCOUNT);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
async signMessage({ message, accountAddress, password = undefined }) {
|
|
114
|
+
async signMessage({ message, accountAddress, password = undefined, signedSessionId }) {
|
|
115
115
|
await this.verifyPassword({
|
|
116
116
|
accountAddress,
|
|
117
117
|
password,
|
|
118
|
-
walletOperation: WalletOperation.SIGN_MESSAGE
|
|
118
|
+
walletOperation: WalletOperation.SIGN_MESSAGE,
|
|
119
|
+
signedSessionId
|
|
119
120
|
});
|
|
120
121
|
try {
|
|
121
122
|
if (!accountAddress) {
|
|
@@ -155,11 +156,12 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
155
156
|
throw new Error(ERROR_VERIFY_MESSAGE_SIGNATURE);
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
|
-
async signTransaction({ senderAddress, transaction, password = undefined }) {
|
|
159
|
+
async signTransaction({ senderAddress, transaction, password = undefined, signedSessionId }) {
|
|
159
160
|
await this.verifyPassword({
|
|
160
161
|
accountAddress: senderAddress,
|
|
161
162
|
password,
|
|
162
|
-
walletOperation: WalletOperation.SIGN_TRANSACTION
|
|
163
|
+
walletOperation: WalletOperation.SIGN_TRANSACTION,
|
|
164
|
+
signedSessionId
|
|
163
165
|
});
|
|
164
166
|
const serializedTx = serializeTransaction(transaction);
|
|
165
167
|
const serializedTxBytes = Uint8Array.from(Buffer.from(serializedTx.slice(2), 'hex'));
|
|
@@ -204,11 +206,12 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
204
206
|
publicKeyHex
|
|
205
207
|
};
|
|
206
208
|
}
|
|
207
|
-
async exportPrivateKey({ accountAddress, password = undefined }) {
|
|
209
|
+
async exportPrivateKey({ accountAddress, password = undefined, signedSessionId }) {
|
|
208
210
|
await this.verifyPassword({
|
|
209
211
|
accountAddress,
|
|
210
212
|
password,
|
|
211
|
-
walletOperation: WalletOperation.EXPORT_PRIVATE_KEY
|
|
213
|
+
walletOperation: WalletOperation.EXPORT_PRIVATE_KEY,
|
|
214
|
+
signedSessionId
|
|
212
215
|
});
|
|
213
216
|
const { derivedPrivateKey } = await this.exportKey({
|
|
214
217
|
accountAddress,
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/evm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.82",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@dynamic-labs-wallet/browser": "0.0.
|
|
6
|
+
"@dynamic-labs-wallet/browser": "0.0.82"
|
|
7
7
|
},
|
|
8
8
|
"peerDependencies": {
|
|
9
9
|
"viem": "^2.22.1"
|
package/src/client/client.d.ts
CHANGED
|
@@ -16,20 +16,22 @@ export declare class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
16
16
|
publicKeyHex: string;
|
|
17
17
|
rawPublicKey: EcdsaPublicKey | Uint8Array | string | undefined;
|
|
18
18
|
}>;
|
|
19
|
-
signMessage({ message, accountAddress, password, }: {
|
|
19
|
+
signMessage({ message, accountAddress, password, signedSessionId, }: {
|
|
20
20
|
message: string;
|
|
21
21
|
accountAddress: string;
|
|
22
22
|
password?: string;
|
|
23
|
+
signedSessionId?: string;
|
|
23
24
|
}): Promise<`0x${string}`>;
|
|
24
25
|
verifyMessageSignature({ accountAddress, message, signature, }: {
|
|
25
26
|
accountAddress: string;
|
|
26
27
|
message: SignableMessage;
|
|
27
28
|
signature: any;
|
|
28
29
|
}): Promise<boolean>;
|
|
29
|
-
signTransaction({ senderAddress, transaction, password, }: {
|
|
30
|
+
signTransaction({ senderAddress, transaction, password, signedSessionId, }: {
|
|
30
31
|
senderAddress: string;
|
|
31
32
|
transaction: TransactionSerializable;
|
|
32
33
|
password?: string;
|
|
34
|
+
signedSessionId?: string;
|
|
33
35
|
}): Promise<string>;
|
|
34
36
|
deriveAccountAddress({ rawPublicKey }: {
|
|
35
37
|
rawPublicKey: EcdsaPublicKey;
|
|
@@ -37,9 +39,10 @@ export declare class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
37
39
|
accountAddress: `0x${string}`;
|
|
38
40
|
publicKeyHex: any;
|
|
39
41
|
};
|
|
40
|
-
exportPrivateKey({ accountAddress, password, }: {
|
|
42
|
+
exportPrivateKey({ accountAddress, password, signedSessionId, }: {
|
|
41
43
|
accountAddress: string;
|
|
42
44
|
password?: string;
|
|
45
|
+
signedSessionId?: string;
|
|
43
46
|
}): Promise<string | undefined>;
|
|
44
47
|
offlineExportPrivateKey({ keyShares, derivationPath, }: {
|
|
45
48
|
keyShares: (EcdsaKeygenResult | Ed25519KeygenResult)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EAEd,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EAIzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL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