@dynamic-labs-wallet/evm 0.0.32 → 0.0.34
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 +33 -73
- package/index.esm.js +35 -75
- package/package.json +2 -2
- package/src/client/client.d.ts +11 -17
- package/src/client/client.d.ts.map +1 -1
package/index.cjs.js
CHANGED
|
@@ -41,7 +41,7 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
41
41
|
transport: viem.http(rpcUrl)
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
async createWalletAccount({ thresholdSignatureScheme }) {
|
|
44
|
+
async createWalletAccount({ thresholdSignatureScheme, password = undefined }) {
|
|
45
45
|
try {
|
|
46
46
|
// Generate key shares for given threshold signature scheme (TSS)
|
|
47
47
|
const { rawPublicKey, clientKeyShares } = await this.keyGen({
|
|
@@ -66,12 +66,13 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
66
66
|
walletId: newWalletId,
|
|
67
67
|
chainName: this.chainName,
|
|
68
68
|
clientKeyShares: clientKeyShares,
|
|
69
|
-
thresholdSignatureScheme
|
|
69
|
+
thresholdSignatureScheme,
|
|
70
|
+
clientKeySharesBackupInfo: browser.getClientKeyShareBackupInfo()
|
|
70
71
|
};
|
|
71
72
|
// Backup the new wallet
|
|
72
73
|
await this.storeEncryptedBackupByWallet({
|
|
73
74
|
accountAddress,
|
|
74
|
-
password
|
|
75
|
+
password
|
|
75
76
|
});
|
|
76
77
|
return {
|
|
77
78
|
accountAddress,
|
|
@@ -84,7 +85,12 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
84
85
|
throw new Error(ERROR_CREATE_WALLET_ACCOUNT);
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
|
-
async signMessage({ message, accountAddress }) {
|
|
88
|
+
async signMessage({ message, accountAddress, password = undefined }) {
|
|
89
|
+
await this.verifyPassword({
|
|
90
|
+
accountAddress,
|
|
91
|
+
password,
|
|
92
|
+
walletOperation: browser.WalletOperation.SIGN_MESSAGE
|
|
93
|
+
});
|
|
88
94
|
try {
|
|
89
95
|
if (!accountAddress) {
|
|
90
96
|
throw new Error(ERROR_ACCOUNT_ADDRESS_REQUIRED);
|
|
@@ -95,7 +101,8 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
95
101
|
const signatureEcdsa = await this.sign({
|
|
96
102
|
message: formattedMessage,
|
|
97
103
|
accountAddress: accountAddress,
|
|
98
|
-
chainName: this.chainName
|
|
104
|
+
chainName: this.chainName,
|
|
105
|
+
password
|
|
99
106
|
});
|
|
100
107
|
// Serialize the signature
|
|
101
108
|
const serializedSignature = serializeECDSASignature(signatureEcdsa);
|
|
@@ -122,47 +129,13 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
122
129
|
throw new Error(ERROR_VERIFY_MESSAGE_SIGNATURE);
|
|
123
130
|
}
|
|
124
131
|
}
|
|
125
|
-
async signTransaction({
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
// Get the balance of the sender address
|
|
131
|
-
const balance = await publicClient.getBalance({
|
|
132
|
-
address: senderAddress
|
|
133
|
-
});
|
|
134
|
-
// Calculate total cost (gas * maxFeePerGas + value)
|
|
135
|
-
const totalCost = gas * maxFeePerGas + value;
|
|
136
|
-
if (balance < totalCost) {
|
|
137
|
-
throw new Error(`Insufficient funds. Required: ${totalCost}, Available: ${balance}`);
|
|
138
|
-
}
|
|
139
|
-
const walletClient = viem.createWalletClient({
|
|
140
|
-
chain,
|
|
141
|
-
transport: viem.http(rpcUrl),
|
|
142
|
-
account: senderAddress
|
|
143
|
-
});
|
|
144
|
-
const nonce = await publicClient.getTransactionCount({
|
|
145
|
-
address: senderAddress
|
|
146
|
-
});
|
|
147
|
-
const transactionRequest = {
|
|
148
|
-
to: toAddress,
|
|
149
|
-
value,
|
|
150
|
-
chainId: chain.id,
|
|
151
|
-
type: 'eip1559',
|
|
152
|
-
gas,
|
|
153
|
-
maxFeePerGas,
|
|
154
|
-
maxPriorityFeePerGas,
|
|
155
|
-
nonce,
|
|
156
|
-
from: senderAddress,
|
|
157
|
-
accessList: []
|
|
158
|
-
};
|
|
159
|
-
const preparedTx = await walletClient.prepareTransactionRequest(transactionRequest);
|
|
160
|
-
// Get the transaction hash that needs to be signed
|
|
161
|
-
const unsignedTx = _extends({}, preparedTx, {
|
|
162
|
-
type: 'eip1559'
|
|
132
|
+
async signTransaction({ senderAddress, transaction, password = undefined }) {
|
|
133
|
+
await this.verifyPassword({
|
|
134
|
+
accountAddress: senderAddress,
|
|
135
|
+
password,
|
|
136
|
+
walletOperation: browser.WalletOperation.SIGN_TRANSACTION
|
|
163
137
|
});
|
|
164
|
-
|
|
165
|
-
const serializedTx = viem.serializeTransaction(unsignedTx);
|
|
138
|
+
const serializedTx = viem.serializeTransaction(transaction);
|
|
166
139
|
const serializedTxBytes = Uint8Array.from(Buffer.from(serializedTx.slice(2), 'hex'));
|
|
167
140
|
if (!(serializedTxBytes instanceof Uint8Array)) {
|
|
168
141
|
throw new Error('Invalid serializedTxBytes');
|
|
@@ -171,7 +144,8 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
171
144
|
const signatureEcdsa = await this.sign({
|
|
172
145
|
message: serializedTxBytes,
|
|
173
146
|
accountAddress: senderAddress,
|
|
174
|
-
chainName: this.chainName
|
|
147
|
+
chainName: this.chainName,
|
|
148
|
+
password
|
|
175
149
|
});
|
|
176
150
|
if (!('r' in signatureEcdsa && 's' in signatureEcdsa && 'v' in signatureEcdsa)) {
|
|
177
151
|
throw new Error('Invalid signature format returned from MPC signing');
|
|
@@ -180,34 +154,13 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
180
154
|
const r = `0x${Buffer.from(signatureEcdsa.r).toString('hex')}`;
|
|
181
155
|
const s = `0x${Buffer.from(signatureEcdsa.s).toString('hex')}`;
|
|
182
156
|
const v = BigInt(signatureEcdsa.v);
|
|
183
|
-
const signedTx = {
|
|
184
|
-
to: unsignedTx.to,
|
|
185
|
-
value: unsignedTx.value,
|
|
186
|
-
chainId: chain.id,
|
|
187
|
-
type: 'eip1559',
|
|
188
|
-
gas: unsignedTx.gas,
|
|
189
|
-
maxFeePerGas: unsignedTx.maxFeePerGas,
|
|
190
|
-
maxPriorityFeePerGas: unsignedTx.maxPriorityFeePerGas,
|
|
191
|
-
nonce: unsignedTx.nonce,
|
|
157
|
+
const signedTx = _extends({}, transaction, {
|
|
192
158
|
r: r,
|
|
193
159
|
s: s,
|
|
194
160
|
v: v
|
|
195
|
-
};
|
|
196
|
-
// Serialize the signed transaction
|
|
161
|
+
});
|
|
197
162
|
const serializedSignedTx = viem.serializeTransaction(signedTx);
|
|
198
|
-
|
|
199
|
-
// Send the raw transaction
|
|
200
|
-
if (broadcastTxn) {
|
|
201
|
-
const sentTxHash = await walletClient.sendRawTransaction({
|
|
202
|
-
serializedTransaction: serializedSignedTx
|
|
203
|
-
});
|
|
204
|
-
this.logger.info('Transaction broadcasted! Hash:', sentTxHash);
|
|
205
|
-
txHash = sentTxHash;
|
|
206
|
-
}
|
|
207
|
-
return {
|
|
208
|
-
txHash,
|
|
209
|
-
signedTx: serializedSignedTx
|
|
210
|
-
};
|
|
163
|
+
return serializedSignedTx;
|
|
211
164
|
} catch (error) {
|
|
212
165
|
this.logger.error('Error signing transaction:', error);
|
|
213
166
|
throw error;
|
|
@@ -225,10 +178,16 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
225
178
|
publicKeyHex
|
|
226
179
|
};
|
|
227
180
|
}
|
|
228
|
-
async exportPrivateKey({ accountAddress }) {
|
|
181
|
+
async exportPrivateKey({ accountAddress, password = undefined }) {
|
|
182
|
+
await this.verifyPassword({
|
|
183
|
+
accountAddress,
|
|
184
|
+
password,
|
|
185
|
+
walletOperation: browser.WalletOperation.EXPORT_PRIVATE_KEY
|
|
186
|
+
});
|
|
229
187
|
const { derivedPrivateKey } = await this.exportKey({
|
|
230
188
|
accountAddress,
|
|
231
|
-
chainName: this.chainName
|
|
189
|
+
chainName: this.chainName,
|
|
190
|
+
password
|
|
232
191
|
});
|
|
233
192
|
return {
|
|
234
193
|
derivedPrivateKey
|
|
@@ -265,7 +224,8 @@ class DynamicEvmWalletClient extends browser.DynamicWalletClient {
|
|
|
265
224
|
walletId: newWalletId,
|
|
266
225
|
chainName: this.chainName,
|
|
267
226
|
clientKeyShares,
|
|
268
|
-
thresholdSignatureScheme
|
|
227
|
+
thresholdSignatureScheme,
|
|
228
|
+
clientKeySharesBackupInfo: browser.getClientKeyShareBackupInfo()
|
|
269
229
|
};
|
|
270
230
|
await this.storeEncryptedBackupByWallet({
|
|
271
231
|
accountAddress
|
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DynamicWalletClient, MessageHash } from '@dynamic-labs-wallet/browser';
|
|
2
|
-
import { serializeSignature, createPublicClient, http,
|
|
1
|
+
import { DynamicWalletClient, getClientKeyShareBackupInfo, WalletOperation, MessageHash } from '@dynamic-labs-wallet/browser';
|
|
2
|
+
import { serializeSignature, createPublicClient, http, serializeTransaction } from 'viem';
|
|
3
3
|
import { mainnet } from 'viem/chains';
|
|
4
4
|
|
|
5
5
|
function _extends() {
|
|
@@ -39,7 +39,7 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
39
39
|
transport: http(rpcUrl)
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
async createWalletAccount({ thresholdSignatureScheme }) {
|
|
42
|
+
async createWalletAccount({ thresholdSignatureScheme, password = undefined }) {
|
|
43
43
|
try {
|
|
44
44
|
// Generate key shares for given threshold signature scheme (TSS)
|
|
45
45
|
const { rawPublicKey, clientKeyShares } = await this.keyGen({
|
|
@@ -64,12 +64,13 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
64
64
|
walletId: newWalletId,
|
|
65
65
|
chainName: this.chainName,
|
|
66
66
|
clientKeyShares: clientKeyShares,
|
|
67
|
-
thresholdSignatureScheme
|
|
67
|
+
thresholdSignatureScheme,
|
|
68
|
+
clientKeySharesBackupInfo: getClientKeyShareBackupInfo()
|
|
68
69
|
};
|
|
69
70
|
// Backup the new wallet
|
|
70
71
|
await this.storeEncryptedBackupByWallet({
|
|
71
72
|
accountAddress,
|
|
72
|
-
password
|
|
73
|
+
password
|
|
73
74
|
});
|
|
74
75
|
return {
|
|
75
76
|
accountAddress,
|
|
@@ -82,7 +83,12 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
82
83
|
throw new Error(ERROR_CREATE_WALLET_ACCOUNT);
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
|
-
async signMessage({ message, accountAddress }) {
|
|
86
|
+
async signMessage({ message, accountAddress, password = undefined }) {
|
|
87
|
+
await this.verifyPassword({
|
|
88
|
+
accountAddress,
|
|
89
|
+
password,
|
|
90
|
+
walletOperation: WalletOperation.SIGN_MESSAGE
|
|
91
|
+
});
|
|
86
92
|
try {
|
|
87
93
|
if (!accountAddress) {
|
|
88
94
|
throw new Error(ERROR_ACCOUNT_ADDRESS_REQUIRED);
|
|
@@ -93,7 +99,8 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
93
99
|
const signatureEcdsa = await this.sign({
|
|
94
100
|
message: formattedMessage,
|
|
95
101
|
accountAddress: accountAddress,
|
|
96
|
-
chainName: this.chainName
|
|
102
|
+
chainName: this.chainName,
|
|
103
|
+
password
|
|
97
104
|
});
|
|
98
105
|
// Serialize the signature
|
|
99
106
|
const serializedSignature = serializeECDSASignature(signatureEcdsa);
|
|
@@ -120,47 +127,13 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
120
127
|
throw new Error(ERROR_VERIFY_MESSAGE_SIGNATURE);
|
|
121
128
|
}
|
|
122
129
|
}
|
|
123
|
-
async signTransaction({
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
// Get the balance of the sender address
|
|
129
|
-
const balance = await publicClient.getBalance({
|
|
130
|
-
address: senderAddress
|
|
131
|
-
});
|
|
132
|
-
// Calculate total cost (gas * maxFeePerGas + value)
|
|
133
|
-
const totalCost = gas * maxFeePerGas + value;
|
|
134
|
-
if (balance < totalCost) {
|
|
135
|
-
throw new Error(`Insufficient funds. Required: ${totalCost}, Available: ${balance}`);
|
|
136
|
-
}
|
|
137
|
-
const walletClient = createWalletClient({
|
|
138
|
-
chain,
|
|
139
|
-
transport: http(rpcUrl),
|
|
140
|
-
account: senderAddress
|
|
141
|
-
});
|
|
142
|
-
const nonce = await publicClient.getTransactionCount({
|
|
143
|
-
address: senderAddress
|
|
144
|
-
});
|
|
145
|
-
const transactionRequest = {
|
|
146
|
-
to: toAddress,
|
|
147
|
-
value,
|
|
148
|
-
chainId: chain.id,
|
|
149
|
-
type: 'eip1559',
|
|
150
|
-
gas,
|
|
151
|
-
maxFeePerGas,
|
|
152
|
-
maxPriorityFeePerGas,
|
|
153
|
-
nonce,
|
|
154
|
-
from: senderAddress,
|
|
155
|
-
accessList: []
|
|
156
|
-
};
|
|
157
|
-
const preparedTx = await walletClient.prepareTransactionRequest(transactionRequest);
|
|
158
|
-
// Get the transaction hash that needs to be signed
|
|
159
|
-
const unsignedTx = _extends({}, preparedTx, {
|
|
160
|
-
type: 'eip1559'
|
|
130
|
+
async signTransaction({ senderAddress, transaction, password = undefined }) {
|
|
131
|
+
await this.verifyPassword({
|
|
132
|
+
accountAddress: senderAddress,
|
|
133
|
+
password,
|
|
134
|
+
walletOperation: WalletOperation.SIGN_TRANSACTION
|
|
161
135
|
});
|
|
162
|
-
|
|
163
|
-
const serializedTx = serializeTransaction(unsignedTx);
|
|
136
|
+
const serializedTx = serializeTransaction(transaction);
|
|
164
137
|
const serializedTxBytes = Uint8Array.from(Buffer.from(serializedTx.slice(2), 'hex'));
|
|
165
138
|
if (!(serializedTxBytes instanceof Uint8Array)) {
|
|
166
139
|
throw new Error('Invalid serializedTxBytes');
|
|
@@ -169,7 +142,8 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
169
142
|
const signatureEcdsa = await this.sign({
|
|
170
143
|
message: serializedTxBytes,
|
|
171
144
|
accountAddress: senderAddress,
|
|
172
|
-
chainName: this.chainName
|
|
145
|
+
chainName: this.chainName,
|
|
146
|
+
password
|
|
173
147
|
});
|
|
174
148
|
if (!('r' in signatureEcdsa && 's' in signatureEcdsa && 'v' in signatureEcdsa)) {
|
|
175
149
|
throw new Error('Invalid signature format returned from MPC signing');
|
|
@@ -178,34 +152,13 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
178
152
|
const r = `0x${Buffer.from(signatureEcdsa.r).toString('hex')}`;
|
|
179
153
|
const s = `0x${Buffer.from(signatureEcdsa.s).toString('hex')}`;
|
|
180
154
|
const v = BigInt(signatureEcdsa.v);
|
|
181
|
-
const signedTx = {
|
|
182
|
-
to: unsignedTx.to,
|
|
183
|
-
value: unsignedTx.value,
|
|
184
|
-
chainId: chain.id,
|
|
185
|
-
type: 'eip1559',
|
|
186
|
-
gas: unsignedTx.gas,
|
|
187
|
-
maxFeePerGas: unsignedTx.maxFeePerGas,
|
|
188
|
-
maxPriorityFeePerGas: unsignedTx.maxPriorityFeePerGas,
|
|
189
|
-
nonce: unsignedTx.nonce,
|
|
155
|
+
const signedTx = _extends({}, transaction, {
|
|
190
156
|
r: r,
|
|
191
157
|
s: s,
|
|
192
158
|
v: v
|
|
193
|
-
};
|
|
194
|
-
// Serialize the signed transaction
|
|
159
|
+
});
|
|
195
160
|
const serializedSignedTx = serializeTransaction(signedTx);
|
|
196
|
-
|
|
197
|
-
// Send the raw transaction
|
|
198
|
-
if (broadcastTxn) {
|
|
199
|
-
const sentTxHash = await walletClient.sendRawTransaction({
|
|
200
|
-
serializedTransaction: serializedSignedTx
|
|
201
|
-
});
|
|
202
|
-
this.logger.info('Transaction broadcasted! Hash:', sentTxHash);
|
|
203
|
-
txHash = sentTxHash;
|
|
204
|
-
}
|
|
205
|
-
return {
|
|
206
|
-
txHash,
|
|
207
|
-
signedTx: serializedSignedTx
|
|
208
|
-
};
|
|
161
|
+
return serializedSignedTx;
|
|
209
162
|
} catch (error) {
|
|
210
163
|
this.logger.error('Error signing transaction:', error);
|
|
211
164
|
throw error;
|
|
@@ -223,10 +176,16 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
223
176
|
publicKeyHex
|
|
224
177
|
};
|
|
225
178
|
}
|
|
226
|
-
async exportPrivateKey({ accountAddress }) {
|
|
179
|
+
async exportPrivateKey({ accountAddress, password = undefined }) {
|
|
180
|
+
await this.verifyPassword({
|
|
181
|
+
accountAddress,
|
|
182
|
+
password,
|
|
183
|
+
walletOperation: WalletOperation.EXPORT_PRIVATE_KEY
|
|
184
|
+
});
|
|
227
185
|
const { derivedPrivateKey } = await this.exportKey({
|
|
228
186
|
accountAddress,
|
|
229
|
-
chainName: this.chainName
|
|
187
|
+
chainName: this.chainName,
|
|
188
|
+
password
|
|
230
189
|
});
|
|
231
190
|
return {
|
|
232
191
|
derivedPrivateKey
|
|
@@ -263,7 +222,8 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
263
222
|
walletId: newWalletId,
|
|
264
223
|
chainName: this.chainName,
|
|
265
224
|
clientKeyShares,
|
|
266
|
-
thresholdSignatureScheme
|
|
225
|
+
thresholdSignatureScheme,
|
|
226
|
+
clientKeySharesBackupInfo: getClientKeyShareBackupInfo()
|
|
267
227
|
};
|
|
268
228
|
await this.storeEncryptedBackupByWallet({
|
|
269
229
|
accountAddress
|
package/package.json
CHANGED
package/src/client/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClientKeyShare, DynamicWalletClient, EcdsaKeygenResult, EcdsaPublicKey, Ed25519KeygenResult, ThresholdSignatureScheme, DynamicWalletClientProps } from '@dynamic-labs-wallet/browser';
|
|
2
|
-
import { type PublicClient, type Chain, type SignableMessage } from 'viem';
|
|
2
|
+
import { type PublicClient, type Chain, type SignableMessage, type TransactionSerializable } from 'viem';
|
|
3
3
|
export declare class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
4
4
|
readonly chainName = "EVM";
|
|
5
5
|
constructor({ environmentId, authToken, baseApiUrl, baseMPCRelayApiUrl, storageKey, debug, }: DynamicWalletClientProps);
|
|
@@ -7,45 +7,39 @@ export declare class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
7
7
|
chain: Chain;
|
|
8
8
|
rpcUrl?: string;
|
|
9
9
|
}): PublicClient;
|
|
10
|
-
createWalletAccount({ thresholdSignatureScheme, }: {
|
|
10
|
+
createWalletAccount({ thresholdSignatureScheme, password, }: {
|
|
11
11
|
thresholdSignatureScheme: ThresholdSignatureScheme;
|
|
12
|
+
password?: string;
|
|
12
13
|
}): Promise<{
|
|
13
14
|
accountAddress: string;
|
|
14
15
|
publicKeyHex: string;
|
|
15
16
|
rawPublicKey: EcdsaPublicKey | Uint8Array | undefined;
|
|
16
17
|
clientKeyShares: ClientKeyShare[];
|
|
17
18
|
}>;
|
|
18
|
-
signMessage({ message, accountAddress, }: {
|
|
19
|
+
signMessage({ message, accountAddress, password, }: {
|
|
19
20
|
message: string;
|
|
20
21
|
accountAddress: string;
|
|
22
|
+
password?: string;
|
|
21
23
|
}): Promise<`0x${string}`>;
|
|
22
24
|
verifyMessageSignature({ accountAddress, message, signature, }: {
|
|
23
25
|
accountAddress: string;
|
|
24
26
|
message: SignableMessage;
|
|
25
27
|
signature: any;
|
|
26
28
|
}): Promise<boolean>;
|
|
27
|
-
signTransaction({
|
|
28
|
-
chain: Chain;
|
|
29
|
+
signTransaction({ senderAddress, transaction, password, }: {
|
|
29
30
|
senderAddress: string;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
maxFeePerGas: bigint;
|
|
34
|
-
maxPriorityFeePerGas: bigint;
|
|
35
|
-
rpcUrl?: string;
|
|
36
|
-
broadcastTxn?: boolean;
|
|
37
|
-
}): Promise<{
|
|
38
|
-
txHash?: string;
|
|
39
|
-
signedTx: string;
|
|
40
|
-
}>;
|
|
31
|
+
transaction: TransactionSerializable;
|
|
32
|
+
password?: string;
|
|
33
|
+
}): Promise<string>;
|
|
41
34
|
deriveAccountAddress({ rawPublicKey, }: {
|
|
42
35
|
rawPublicKey: EcdsaPublicKey;
|
|
43
36
|
}): Promise<{
|
|
44
37
|
accountAddress: string;
|
|
45
38
|
publicKeyHex: any;
|
|
46
39
|
}>;
|
|
47
|
-
exportPrivateKey({ accountAddress }: {
|
|
40
|
+
exportPrivateKey({ accountAddress, password, }: {
|
|
48
41
|
accountAddress: string;
|
|
42
|
+
password?: string;
|
|
49
43
|
}): Promise<{
|
|
50
44
|
derivedPrivateKey: string | undefined;
|
|
51
45
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EAEd,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EAEd,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EAIzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,KAAK,EAEV,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC7B,MAAM,MAAM,CAAC;AAWd,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,QAAQ,CAAC,SAAS,SAAS;gBAEf,EACV,aAAa,EACb,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,KAAK,GACN,EAAE,wBAAwB;IAW3B,sBAAsB,CAAC,EACrB,KAAK,EACL,MAAM,GACP,EAAE;QACD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