@dynamic-labs-wallet/node-svm 1.0.76 → 1.0.78
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 +67 -24
- package/index.esm.js +67 -24
- package/package.json +2 -2
- package/src/client/client.d.ts +8 -3
- package/src/client/client.d.ts.map +1 -1
- package/src/delegatedClient.d.ts +8 -3
- package/src/delegatedClient.d.ts.map +1 -1
package/index.cjs
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
var node = require('@dynamic-labs-wallet/node');
|
|
4
4
|
var web3_js = require('@solana/web3.js');
|
|
5
5
|
|
|
6
|
+
function _extends() {
|
|
7
|
+
_extends = Object.assign || function assign(target) {
|
|
8
|
+
for(var i = 1; i < arguments.length; i++){
|
|
9
|
+
var source = arguments[i];
|
|
10
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
11
|
+
}
|
|
12
|
+
return target;
|
|
13
|
+
};
|
|
14
|
+
return _extends.apply(this, arguments);
|
|
15
|
+
}
|
|
16
|
+
|
|
6
17
|
const ERROR_CREATE_WALLET_ACCOUNT = 'Error creating svm wallet account';
|
|
7
18
|
const ERROR_SIGN_RAW_MESSAGE = 'Error signing raw message';
|
|
8
19
|
|
|
@@ -143,7 +154,9 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
|
|
|
143
154
|
error: error,
|
|
144
155
|
context: {}
|
|
145
156
|
});
|
|
146
|
-
throw new Error(ERROR_CREATE_WALLET_ACCOUNT
|
|
157
|
+
throw new Error(ERROR_CREATE_WALLET_ACCOUNT, {
|
|
158
|
+
cause: error
|
|
159
|
+
});
|
|
147
160
|
}
|
|
148
161
|
}
|
|
149
162
|
// Function to properly derive account address
|
|
@@ -164,7 +177,7 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
|
|
|
164
177
|
* @param message The message to sign (Uint8Array)
|
|
165
178
|
* @param walletMetadata Wallet metadata (the full object returned by createWalletAccount/importPrivateKey, with backupInfo merged from any subsequent updatePassword/refresh/reshare)
|
|
166
179
|
* @param password The password for encrypted backup shares
|
|
167
|
-
*/ async signMessage({ message, walletMetadata, password = undefined, externalServerKeyShares }) {
|
|
180
|
+
*/ async signMessage({ message, walletMetadata, password = undefined, externalServerKeyShares, context }) {
|
|
168
181
|
const { accountAddress } = walletMetadata;
|
|
169
182
|
if (!accountAddress) {
|
|
170
183
|
throw new Error('Account address is required');
|
|
@@ -172,13 +185,17 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
|
|
|
172
185
|
try {
|
|
173
186
|
const messageBytes = typeof message === 'string' ? new TextEncoder().encode(message) : message;
|
|
174
187
|
const messageHex = toHex(messageBytes);
|
|
188
|
+
const resolvedContext = context != null ? context : {
|
|
189
|
+
svmMessage: typeof message === 'string' ? message : messageHex
|
|
190
|
+
};
|
|
175
191
|
const signatureEd25519 = await this.sign({
|
|
176
192
|
message: messageHex,
|
|
177
193
|
accountAddress,
|
|
178
194
|
chainName: this.chainName,
|
|
179
195
|
password,
|
|
180
196
|
externalServerKeyShares,
|
|
181
|
-
walletMetadata
|
|
197
|
+
walletMetadata,
|
|
198
|
+
context: resolvedContext
|
|
182
199
|
});
|
|
183
200
|
return encodeBase58(signatureEd25519);
|
|
184
201
|
} catch (error) {
|
|
@@ -199,7 +216,7 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
|
|
|
199
216
|
* @param message The pre-formatted hex message to sign
|
|
200
217
|
* @param walletMetadata Wallet metadata (the full object returned by createWalletAccount/importPrivateKey, with backupInfo merged from any subsequent updatePassword/refresh/reshare)
|
|
201
218
|
* @param password The password for encrypted backup shares
|
|
202
|
-
*/ async signRawMessage({ message, walletMetadata, password = undefined, externalServerKeyShares }) {
|
|
219
|
+
*/ async signRawMessage({ message, walletMetadata, password = undefined, externalServerKeyShares, context }) {
|
|
203
220
|
const { accountAddress } = walletMetadata;
|
|
204
221
|
if (!accountAddress) {
|
|
205
222
|
throw new Error('Account address is required');
|
|
@@ -213,7 +230,8 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
|
|
|
213
230
|
password,
|
|
214
231
|
externalServerKeyShares,
|
|
215
232
|
isFormatted: true,
|
|
216
|
-
walletMetadata
|
|
233
|
+
walletMetadata,
|
|
234
|
+
context
|
|
217
235
|
});
|
|
218
236
|
return encodeBase58(signatureEd25519);
|
|
219
237
|
} catch (error) {
|
|
@@ -230,7 +248,7 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
|
|
|
230
248
|
}
|
|
231
249
|
}
|
|
232
250
|
//todo:should txn just be a string?
|
|
233
|
-
async signTransaction({ walletMetadata, transaction, password = undefined, externalServerKeyShares, sponsor = false }) {
|
|
251
|
+
async signTransaction({ walletMetadata, transaction, password = undefined, externalServerKeyShares, sponsor = false, chainId, context }) {
|
|
234
252
|
const { accountAddress } = walletMetadata;
|
|
235
253
|
if (!accountAddress) {
|
|
236
254
|
throw new Error('Account address is required');
|
|
@@ -254,6 +272,21 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
|
|
|
254
272
|
const messageBytes = transaction.serializeMessage();
|
|
255
273
|
messageToSign = toHex(Buffer.isBuffer(messageBytes) ? messageBytes : messageBytes);
|
|
256
274
|
}
|
|
275
|
+
// Mirrors the browser SVM client: svmTransaction context requires a chainId,
|
|
276
|
+
// so it's only attached when the caller provides one. Not derivable when
|
|
277
|
+
// `transaction` is a raw hex string (no Transaction object to serialize).
|
|
278
|
+
const resolvedContext = chainId !== undefined && typeof transaction !== 'string' ? _extends({}, context, {
|
|
279
|
+
svmTransaction: {
|
|
280
|
+
chainId,
|
|
281
|
+
method: 'signAndSendTransaction',
|
|
282
|
+
serializedTransactions: [
|
|
283
|
+
encodeBase58(transaction instanceof web3_js.VersionedTransaction ? transaction.serialize() : transaction.serialize({
|
|
284
|
+
requireAllSignatures: false,
|
|
285
|
+
verifySignatures: false
|
|
286
|
+
}))
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
}) : context;
|
|
257
290
|
const signatureEd25519 = await this.sign({
|
|
258
291
|
message: messageToSign,
|
|
259
292
|
accountAddress,
|
|
@@ -261,7 +294,8 @@ class DynamicSvmWalletClient extends node.DynamicWalletClient {
|
|
|
261
294
|
password,
|
|
262
295
|
externalServerKeyShares,
|
|
263
296
|
walletMetadata,
|
|
264
|
-
walletOperation: node.WalletOperation.SIGN_TRANSACTION
|
|
297
|
+
walletOperation: node.WalletOperation.SIGN_TRANSACTION,
|
|
298
|
+
context: resolvedContext
|
|
265
299
|
});
|
|
266
300
|
if (!signatureEd25519) {
|
|
267
301
|
throw new Error('Signature is undefined');
|
|
@@ -504,17 +538,6 @@ async function sendTransaction({ signedTransaction, rpcUrl = 'https://api.devnet
|
|
|
504
538
|
return txid;
|
|
505
539
|
}
|
|
506
540
|
|
|
507
|
-
function _extends() {
|
|
508
|
-
_extends = Object.assign || function assign(target) {
|
|
509
|
-
for(var i = 1; i < arguments.length; i++){
|
|
510
|
-
var source = arguments[i];
|
|
511
|
-
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
512
|
-
}
|
|
513
|
-
return target;
|
|
514
|
-
};
|
|
515
|
-
return _extends.apply(this, arguments);
|
|
516
|
-
}
|
|
517
|
-
|
|
518
541
|
const logError = node.createLogError('node-svm');
|
|
519
542
|
/**
|
|
520
543
|
* Creates a delegated SVM wallet client for functional operations
|
|
@@ -532,11 +555,14 @@ const logError = node.createLogError('node-svm');
|
|
|
532
555
|
};
|
|
533
556
|
/**
|
|
534
557
|
* Signs a message using delegated signing for SVM
|
|
535
|
-
*/ const delegatedSignMessage = async (client, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath, isFormatted = false })=>{
|
|
558
|
+
*/ const delegatedSignMessage = async (client, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath, isFormatted = false, context })=>{
|
|
536
559
|
try {
|
|
537
560
|
if (!keyShare || !walletId || !walletApiKey) {
|
|
538
561
|
throw new Error('Delegated key share, wallet ID, and wallet API key are required to sign a message');
|
|
539
562
|
}
|
|
563
|
+
const resolvedContext = context != null ? context : {
|
|
564
|
+
svmMessage: message
|
|
565
|
+
};
|
|
540
566
|
const signatureEd25519 = await node.delegatedSignMessage(client, {
|
|
541
567
|
walletId,
|
|
542
568
|
shareSetId,
|
|
@@ -545,7 +571,8 @@ const logError = node.createLogError('node-svm');
|
|
|
545
571
|
message,
|
|
546
572
|
chainName: client.chainName,
|
|
547
573
|
derivationPath,
|
|
548
|
-
isFormatted
|
|
574
|
+
isFormatted,
|
|
575
|
+
context: resolvedContext
|
|
549
576
|
});
|
|
550
577
|
return encodeBase58(signatureEd25519);
|
|
551
578
|
} catch (error) {
|
|
@@ -598,7 +625,7 @@ const logError = node.createLogError('node-svm');
|
|
|
598
625
|
* signerAddress: senderAddress, // Explicitly specify who signs
|
|
599
626
|
* });
|
|
600
627
|
*
|
|
601
|
-
*/ const delegatedSignTransaction = async (client, { walletId, shareSetId, walletApiKey, keyShare, transaction, signerAddress, derivationPath })=>{
|
|
628
|
+
*/ const delegatedSignTransaction = async (client, { walletId, shareSetId, walletApiKey, keyShare, transaction, signerAddress, derivationPath, chainId, context })=>{
|
|
602
629
|
try {
|
|
603
630
|
if (!keyShare || !walletId || !walletApiKey) {
|
|
604
631
|
throw new Error('Delegated key share, wallet ID, and wallet API key are required to sign a transaction');
|
|
@@ -613,6 +640,20 @@ const logError = node.createLogError('node-svm');
|
|
|
613
640
|
const messageBytes = transaction.serializeMessage();
|
|
614
641
|
messageToSign = messageBytes.toString('hex');
|
|
615
642
|
}
|
|
643
|
+
// Mirrors the browser SVM client: svmTransaction context requires a chainId,
|
|
644
|
+
// so it's only attached when the caller provides one.
|
|
645
|
+
const resolvedContext = chainId !== undefined ? _extends({}, context, {
|
|
646
|
+
svmTransaction: {
|
|
647
|
+
chainId,
|
|
648
|
+
method: 'signAndSendTransaction',
|
|
649
|
+
serializedTransactions: [
|
|
650
|
+
encodeBase58(transaction instanceof web3_js.VersionedTransaction ? transaction.serialize() : transaction.serialize({
|
|
651
|
+
requireAllSignatures: false,
|
|
652
|
+
verifySignatures: false
|
|
653
|
+
}))
|
|
654
|
+
]
|
|
655
|
+
}
|
|
656
|
+
}) : context;
|
|
616
657
|
const signatureEd25519 = await node.delegatedSignMessage(client, {
|
|
617
658
|
walletId,
|
|
618
659
|
shareSetId,
|
|
@@ -621,7 +662,8 @@ const logError = node.createLogError('node-svm');
|
|
|
621
662
|
message: messageToSign,
|
|
622
663
|
chainName: client.chainName,
|
|
623
664
|
derivationPath,
|
|
624
|
-
isFormatted: false
|
|
665
|
+
isFormatted: false,
|
|
666
|
+
context: resolvedContext
|
|
625
667
|
});
|
|
626
668
|
if (!signatureEd25519) {
|
|
627
669
|
throw new Error('Signature is undefined');
|
|
@@ -695,7 +737,7 @@ const logError = node.createLogError('node-svm');
|
|
|
695
737
|
* message: hash,
|
|
696
738
|
* });
|
|
697
739
|
*
|
|
698
|
-
*/ const delegatedSignRawMessage = async (client, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath })=>{
|
|
740
|
+
*/ const delegatedSignRawMessage = async (client, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath, context })=>{
|
|
699
741
|
if (!keyShare || !walletId || !walletApiKey) {
|
|
700
742
|
throw new Error('Delegated key share, wallet ID, and wallet API key are required to sign a raw message');
|
|
701
743
|
}
|
|
@@ -707,7 +749,8 @@ const logError = node.createLogError('node-svm');
|
|
|
707
749
|
keyShare,
|
|
708
750
|
message: node.stripHexPrefix(message),
|
|
709
751
|
derivationPath,
|
|
710
|
-
isFormatted: true
|
|
752
|
+
isFormatted: true,
|
|
753
|
+
context
|
|
711
754
|
});
|
|
712
755
|
} catch (error) {
|
|
713
756
|
logError({
|
package/index.esm.js
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { createLogError, DynamicWalletClient, getMPCChainConfig, stripHexPrefix, WalletOperation, SOLANA_RPC_URL, createDelegatedWalletClient, delegatedSignMessage as delegatedSignMessage$1, revokeDelegation as revokeDelegation$1 } from '@dynamic-labs-wallet/node';
|
|
2
2
|
import { PublicKey, VersionedTransaction, Keypair, Transaction, Connection, SystemProgram } from '@solana/web3.js';
|
|
3
3
|
|
|
4
|
+
function _extends() {
|
|
5
|
+
_extends = Object.assign || function assign(target) {
|
|
6
|
+
for(var i = 1; i < arguments.length; i++){
|
|
7
|
+
var source = arguments[i];
|
|
8
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
9
|
+
}
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
return _extends.apply(this, arguments);
|
|
13
|
+
}
|
|
14
|
+
|
|
4
15
|
const ERROR_CREATE_WALLET_ACCOUNT = 'Error creating svm wallet account';
|
|
5
16
|
const ERROR_SIGN_RAW_MESSAGE = 'Error signing raw message';
|
|
6
17
|
|
|
@@ -141,7 +152,9 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
141
152
|
error: error,
|
|
142
153
|
context: {}
|
|
143
154
|
});
|
|
144
|
-
throw new Error(ERROR_CREATE_WALLET_ACCOUNT
|
|
155
|
+
throw new Error(ERROR_CREATE_WALLET_ACCOUNT, {
|
|
156
|
+
cause: error
|
|
157
|
+
});
|
|
145
158
|
}
|
|
146
159
|
}
|
|
147
160
|
// Function to properly derive account address
|
|
@@ -162,7 +175,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
162
175
|
* @param message The message to sign (Uint8Array)
|
|
163
176
|
* @param walletMetadata Wallet metadata (the full object returned by createWalletAccount/importPrivateKey, with backupInfo merged from any subsequent updatePassword/refresh/reshare)
|
|
164
177
|
* @param password The password for encrypted backup shares
|
|
165
|
-
*/ async signMessage({ message, walletMetadata, password = undefined, externalServerKeyShares }) {
|
|
178
|
+
*/ async signMessage({ message, walletMetadata, password = undefined, externalServerKeyShares, context }) {
|
|
166
179
|
const { accountAddress } = walletMetadata;
|
|
167
180
|
if (!accountAddress) {
|
|
168
181
|
throw new Error('Account address is required');
|
|
@@ -170,13 +183,17 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
170
183
|
try {
|
|
171
184
|
const messageBytes = typeof message === 'string' ? new TextEncoder().encode(message) : message;
|
|
172
185
|
const messageHex = toHex(messageBytes);
|
|
186
|
+
const resolvedContext = context != null ? context : {
|
|
187
|
+
svmMessage: typeof message === 'string' ? message : messageHex
|
|
188
|
+
};
|
|
173
189
|
const signatureEd25519 = await this.sign({
|
|
174
190
|
message: messageHex,
|
|
175
191
|
accountAddress,
|
|
176
192
|
chainName: this.chainName,
|
|
177
193
|
password,
|
|
178
194
|
externalServerKeyShares,
|
|
179
|
-
walletMetadata
|
|
195
|
+
walletMetadata,
|
|
196
|
+
context: resolvedContext
|
|
180
197
|
});
|
|
181
198
|
return encodeBase58(signatureEd25519);
|
|
182
199
|
} catch (error) {
|
|
@@ -197,7 +214,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
197
214
|
* @param message The pre-formatted hex message to sign
|
|
198
215
|
* @param walletMetadata Wallet metadata (the full object returned by createWalletAccount/importPrivateKey, with backupInfo merged from any subsequent updatePassword/refresh/reshare)
|
|
199
216
|
* @param password The password for encrypted backup shares
|
|
200
|
-
*/ async signRawMessage({ message, walletMetadata, password = undefined, externalServerKeyShares }) {
|
|
217
|
+
*/ async signRawMessage({ message, walletMetadata, password = undefined, externalServerKeyShares, context }) {
|
|
201
218
|
const { accountAddress } = walletMetadata;
|
|
202
219
|
if (!accountAddress) {
|
|
203
220
|
throw new Error('Account address is required');
|
|
@@ -211,7 +228,8 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
211
228
|
password,
|
|
212
229
|
externalServerKeyShares,
|
|
213
230
|
isFormatted: true,
|
|
214
|
-
walletMetadata
|
|
231
|
+
walletMetadata,
|
|
232
|
+
context
|
|
215
233
|
});
|
|
216
234
|
return encodeBase58(signatureEd25519);
|
|
217
235
|
} catch (error) {
|
|
@@ -228,7 +246,7 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
228
246
|
}
|
|
229
247
|
}
|
|
230
248
|
//todo:should txn just be a string?
|
|
231
|
-
async signTransaction({ walletMetadata, transaction, password = undefined, externalServerKeyShares, sponsor = false }) {
|
|
249
|
+
async signTransaction({ walletMetadata, transaction, password = undefined, externalServerKeyShares, sponsor = false, chainId, context }) {
|
|
232
250
|
const { accountAddress } = walletMetadata;
|
|
233
251
|
if (!accountAddress) {
|
|
234
252
|
throw new Error('Account address is required');
|
|
@@ -252,6 +270,21 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
252
270
|
const messageBytes = transaction.serializeMessage();
|
|
253
271
|
messageToSign = toHex(Buffer.isBuffer(messageBytes) ? messageBytes : messageBytes);
|
|
254
272
|
}
|
|
273
|
+
// Mirrors the browser SVM client: svmTransaction context requires a chainId,
|
|
274
|
+
// so it's only attached when the caller provides one. Not derivable when
|
|
275
|
+
// `transaction` is a raw hex string (no Transaction object to serialize).
|
|
276
|
+
const resolvedContext = chainId !== undefined && typeof transaction !== 'string' ? _extends({}, context, {
|
|
277
|
+
svmTransaction: {
|
|
278
|
+
chainId,
|
|
279
|
+
method: 'signAndSendTransaction',
|
|
280
|
+
serializedTransactions: [
|
|
281
|
+
encodeBase58(transaction instanceof VersionedTransaction ? transaction.serialize() : transaction.serialize({
|
|
282
|
+
requireAllSignatures: false,
|
|
283
|
+
verifySignatures: false
|
|
284
|
+
}))
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
}) : context;
|
|
255
288
|
const signatureEd25519 = await this.sign({
|
|
256
289
|
message: messageToSign,
|
|
257
290
|
accountAddress,
|
|
@@ -259,7 +292,8 @@ class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
259
292
|
password,
|
|
260
293
|
externalServerKeyShares,
|
|
261
294
|
walletMetadata,
|
|
262
|
-
walletOperation: WalletOperation.SIGN_TRANSACTION
|
|
295
|
+
walletOperation: WalletOperation.SIGN_TRANSACTION,
|
|
296
|
+
context: resolvedContext
|
|
263
297
|
});
|
|
264
298
|
if (!signatureEd25519) {
|
|
265
299
|
throw new Error('Signature is undefined');
|
|
@@ -502,17 +536,6 @@ async function sendTransaction({ signedTransaction, rpcUrl = 'https://api.devnet
|
|
|
502
536
|
return txid;
|
|
503
537
|
}
|
|
504
538
|
|
|
505
|
-
function _extends() {
|
|
506
|
-
_extends = Object.assign || function assign(target) {
|
|
507
|
-
for(var i = 1; i < arguments.length; i++){
|
|
508
|
-
var source = arguments[i];
|
|
509
|
-
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
510
|
-
}
|
|
511
|
-
return target;
|
|
512
|
-
};
|
|
513
|
-
return _extends.apply(this, arguments);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
539
|
const logError = createLogError('node-svm');
|
|
517
540
|
/**
|
|
518
541
|
* Creates a delegated SVM wallet client for functional operations
|
|
@@ -530,11 +553,14 @@ const logError = createLogError('node-svm');
|
|
|
530
553
|
};
|
|
531
554
|
/**
|
|
532
555
|
* Signs a message using delegated signing for SVM
|
|
533
|
-
*/ const delegatedSignMessage = async (client, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath, isFormatted = false })=>{
|
|
556
|
+
*/ const delegatedSignMessage = async (client, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath, isFormatted = false, context })=>{
|
|
534
557
|
try {
|
|
535
558
|
if (!keyShare || !walletId || !walletApiKey) {
|
|
536
559
|
throw new Error('Delegated key share, wallet ID, and wallet API key are required to sign a message');
|
|
537
560
|
}
|
|
561
|
+
const resolvedContext = context != null ? context : {
|
|
562
|
+
svmMessage: message
|
|
563
|
+
};
|
|
538
564
|
const signatureEd25519 = await delegatedSignMessage$1(client, {
|
|
539
565
|
walletId,
|
|
540
566
|
shareSetId,
|
|
@@ -543,7 +569,8 @@ const logError = createLogError('node-svm');
|
|
|
543
569
|
message,
|
|
544
570
|
chainName: client.chainName,
|
|
545
571
|
derivationPath,
|
|
546
|
-
isFormatted
|
|
572
|
+
isFormatted,
|
|
573
|
+
context: resolvedContext
|
|
547
574
|
});
|
|
548
575
|
return encodeBase58(signatureEd25519);
|
|
549
576
|
} catch (error) {
|
|
@@ -596,7 +623,7 @@ const logError = createLogError('node-svm');
|
|
|
596
623
|
* signerAddress: senderAddress, // Explicitly specify who signs
|
|
597
624
|
* });
|
|
598
625
|
*
|
|
599
|
-
*/ const delegatedSignTransaction = async (client, { walletId, shareSetId, walletApiKey, keyShare, transaction, signerAddress, derivationPath })=>{
|
|
626
|
+
*/ const delegatedSignTransaction = async (client, { walletId, shareSetId, walletApiKey, keyShare, transaction, signerAddress, derivationPath, chainId, context })=>{
|
|
600
627
|
try {
|
|
601
628
|
if (!keyShare || !walletId || !walletApiKey) {
|
|
602
629
|
throw new Error('Delegated key share, wallet ID, and wallet API key are required to sign a transaction');
|
|
@@ -611,6 +638,20 @@ const logError = createLogError('node-svm');
|
|
|
611
638
|
const messageBytes = transaction.serializeMessage();
|
|
612
639
|
messageToSign = messageBytes.toString('hex');
|
|
613
640
|
}
|
|
641
|
+
// Mirrors the browser SVM client: svmTransaction context requires a chainId,
|
|
642
|
+
// so it's only attached when the caller provides one.
|
|
643
|
+
const resolvedContext = chainId !== undefined ? _extends({}, context, {
|
|
644
|
+
svmTransaction: {
|
|
645
|
+
chainId,
|
|
646
|
+
method: 'signAndSendTransaction',
|
|
647
|
+
serializedTransactions: [
|
|
648
|
+
encodeBase58(transaction instanceof VersionedTransaction ? transaction.serialize() : transaction.serialize({
|
|
649
|
+
requireAllSignatures: false,
|
|
650
|
+
verifySignatures: false
|
|
651
|
+
}))
|
|
652
|
+
]
|
|
653
|
+
}
|
|
654
|
+
}) : context;
|
|
614
655
|
const signatureEd25519 = await delegatedSignMessage$1(client, {
|
|
615
656
|
walletId,
|
|
616
657
|
shareSetId,
|
|
@@ -619,7 +660,8 @@ const logError = createLogError('node-svm');
|
|
|
619
660
|
message: messageToSign,
|
|
620
661
|
chainName: client.chainName,
|
|
621
662
|
derivationPath,
|
|
622
|
-
isFormatted: false
|
|
663
|
+
isFormatted: false,
|
|
664
|
+
context: resolvedContext
|
|
623
665
|
});
|
|
624
666
|
if (!signatureEd25519) {
|
|
625
667
|
throw new Error('Signature is undefined');
|
|
@@ -693,7 +735,7 @@ const logError = createLogError('node-svm');
|
|
|
693
735
|
* message: hash,
|
|
694
736
|
* });
|
|
695
737
|
*
|
|
696
|
-
*/ const delegatedSignRawMessage = async (client, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath })=>{
|
|
738
|
+
*/ const delegatedSignRawMessage = async (client, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath, context })=>{
|
|
697
739
|
if (!keyShare || !walletId || !walletApiKey) {
|
|
698
740
|
throw new Error('Delegated key share, wallet ID, and wallet API key are required to sign a raw message');
|
|
699
741
|
}
|
|
@@ -705,7 +747,8 @@ const logError = createLogError('node-svm');
|
|
|
705
747
|
keyShare,
|
|
706
748
|
message: stripHexPrefix(message),
|
|
707
749
|
derivationPath,
|
|
708
|
-
isFormatted: true
|
|
750
|
+
isFormatted: true,
|
|
751
|
+
context
|
|
709
752
|
});
|
|
710
753
|
} catch (error) {
|
|
711
754
|
logError({
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/node-svm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.78",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dynamic-labs-wallet/node": "1.0.
|
|
7
|
+
"@dynamic-labs-wallet/node": "1.0.78",
|
|
8
8
|
"@solana/web3.js": "^1.98.2"
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
package/src/client/client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ServerKeyShare, DynamicWalletClient, type Ed25519KeygenResult, type ThresholdSignatureScheme, type TraceContext, type DynamicWalletClientProps, type WalletMetadata } from '@dynamic-labs-wallet/node';
|
|
2
|
+
import type { SignMessageContext } from '@dynamic-labs/sdk-api-core';
|
|
2
3
|
import { Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
3
4
|
export declare class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
4
5
|
readonly chainName = "SVM";
|
|
@@ -34,11 +35,12 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
34
35
|
* @param walletMetadata Wallet metadata (the full object returned by createWalletAccount/importPrivateKey, with backupInfo merged from any subsequent updatePassword/refresh/reshare)
|
|
35
36
|
* @param password The password for encrypted backup shares
|
|
36
37
|
*/
|
|
37
|
-
signMessage({ message, walletMetadata, password, externalServerKeyShares, }: {
|
|
38
|
+
signMessage({ message, walletMetadata, password, externalServerKeyShares, context, }: {
|
|
38
39
|
message: string | Uint8Array;
|
|
39
40
|
walletMetadata: WalletMetadata;
|
|
40
41
|
password?: string;
|
|
41
42
|
externalServerKeyShares?: ServerKeyShare[];
|
|
43
|
+
context?: SignMessageContext;
|
|
42
44
|
}): Promise<string>;
|
|
43
45
|
/**
|
|
44
46
|
* Signs a pre-formatted (raw) message without additional encoding.
|
|
@@ -48,19 +50,22 @@ export declare class DynamicSvmWalletClient extends DynamicWalletClient {
|
|
|
48
50
|
* @param walletMetadata Wallet metadata (the full object returned by createWalletAccount/importPrivateKey, with backupInfo merged from any subsequent updatePassword/refresh/reshare)
|
|
49
51
|
* @param password The password for encrypted backup shares
|
|
50
52
|
*/
|
|
51
|
-
signRawMessage({ message, walletMetadata, password, externalServerKeyShares, }: {
|
|
53
|
+
signRawMessage({ message, walletMetadata, password, externalServerKeyShares, context, }: {
|
|
52
54
|
message: string;
|
|
53
55
|
walletMetadata: WalletMetadata;
|
|
54
56
|
password?: string;
|
|
55
57
|
externalServerKeyShares?: ServerKeyShare[];
|
|
58
|
+
context?: SignMessageContext;
|
|
56
59
|
}): Promise<string>;
|
|
57
|
-
signTransaction({ walletMetadata, transaction, password, externalServerKeyShares, sponsor, }: {
|
|
60
|
+
signTransaction({ walletMetadata, transaction, password, externalServerKeyShares, sponsor, chainId, context, }: {
|
|
58
61
|
walletMetadata: WalletMetadata;
|
|
59
62
|
transaction: VersionedTransaction | Transaction | string;
|
|
60
63
|
password?: string;
|
|
61
64
|
externalServerKeyShares?: ServerKeyShare[];
|
|
62
65
|
/** If true, requests gas sponsorship from Dynamic before signing. */
|
|
63
66
|
sponsor?: boolean;
|
|
67
|
+
chainId?: string;
|
|
68
|
+
context?: SignMessageContext;
|
|
64
69
|
}): Promise<string>;
|
|
65
70
|
/**
|
|
66
71
|
* Exports the private key for a given wallet
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAGjB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EAGpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAW,WAAW,EAAE,oBAAoB,EAAa,MAAM,iBAAiB,CAAC;AAUxF,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,QAAQ,CAAC,SAAS,SAAS;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;gBAEZ,EACV,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,MAAM,EACN,KAAK,GACN,EAAE,wBAAwB;IAW3B;;;;;OAKG;IACG,mBAAmB,CAAC,EACxB,wBAAwB,EACxB,QAAQ,EACR,OAAO,EACP,eAAuB,GACxB,EAAE;QACD,wBAAwB,EAAE,wBAAwB,CAAC;QACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;QACjC,eAAe,CAAC,EAAE,OAAO,CAAC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,cAAc,CAAC;YACtB,+BAA+B,EAAE,OAAO,CAAC;SAC1C,CAAC,CAAC;KACJ,CAAC;IAmEF;;;;;;;;;;;;;OAaG;IACG,kBAAkB,CAAC,EACvB,WAAW,EACX,YAAY,GACb,EAAE;QACD,WAAW,EAAE,oBAAoB,GAAG,WAAW,CAAC;QAChD,YAAY,CAAC,EAAE,YAAY,CAAC;KAC7B,GAAG,OAAO,CAAC,oBAAoB,GAAG,WAAW,CAAC;IAuB/C,wEAAwE;IAClE,aAAa;;;;;;;;;CAKpB"}
|
package/src/delegatedClient.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DelegatedWalletClient, ServerKeyShare } from '@dynamic-labs-wallet/node';
|
|
2
|
+
import type { SignMessageContext } from '@dynamic-labs/sdk-api-core';
|
|
2
3
|
import type { Transaction } from '@solana/web3.js';
|
|
3
4
|
import { VersionedTransaction } from '@solana/web3.js';
|
|
4
5
|
export type DelegatedSvmClientConfig = {
|
|
@@ -18,7 +19,7 @@ export declare const createDelegatedSvmWalletClient: ({ environmentId, baseApiUr
|
|
|
18
19
|
/**
|
|
19
20
|
* Signs a message using delegated signing for SVM
|
|
20
21
|
*/
|
|
21
|
-
export declare const delegatedSignMessage: (client: DelegatedSvmWalletClient, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath, isFormatted, }: {
|
|
22
|
+
export declare const delegatedSignMessage: (client: DelegatedSvmWalletClient, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath, isFormatted, context, }: {
|
|
22
23
|
walletId: string;
|
|
23
24
|
/**
|
|
24
25
|
* Optional. The `shareSetId` from the `wallet.delegation.created`
|
|
@@ -33,6 +34,7 @@ export declare const delegatedSignMessage: (client: DelegatedSvmWalletClient, {
|
|
|
33
34
|
message: string;
|
|
34
35
|
derivationPath?: Uint32Array;
|
|
35
36
|
isFormatted?: boolean;
|
|
37
|
+
context?: SignMessageContext;
|
|
36
38
|
}) => Promise<string>;
|
|
37
39
|
/**
|
|
38
40
|
* Signs a transaction using delegated signing for SVM
|
|
@@ -74,7 +76,7 @@ export declare const delegatedSignMessage: (client: DelegatedSvmWalletClient, {
|
|
|
74
76
|
* });
|
|
75
77
|
*
|
|
76
78
|
*/
|
|
77
|
-
export declare const delegatedSignTransaction: (client: DelegatedSvmWalletClient, { walletId, shareSetId, walletApiKey, keyShare, transaction, signerAddress, derivationPath, }: {
|
|
79
|
+
export declare const delegatedSignTransaction: (client: DelegatedSvmWalletClient, { walletId, shareSetId, walletApiKey, keyShare, transaction, signerAddress, derivationPath, chainId, context, }: {
|
|
78
80
|
walletId: string;
|
|
79
81
|
/**
|
|
80
82
|
* Optional. The `shareSetId` from the `wallet.delegation.created`
|
|
@@ -89,6 +91,8 @@ export declare const delegatedSignTransaction: (client: DelegatedSvmWalletClient
|
|
|
89
91
|
transaction: VersionedTransaction | Transaction;
|
|
90
92
|
signerAddress?: string;
|
|
91
93
|
derivationPath?: Uint32Array;
|
|
94
|
+
chainId?: string;
|
|
95
|
+
context?: SignMessageContext;
|
|
92
96
|
}) => Promise<VersionedTransaction | Transaction>;
|
|
93
97
|
/**
|
|
94
98
|
* Signs a pre-formatted (raw) message using delegated signing for SVM.
|
|
@@ -124,7 +128,7 @@ export declare const delegatedSignTransaction: (client: DelegatedSvmWalletClient
|
|
|
124
128
|
* });
|
|
125
129
|
*
|
|
126
130
|
*/
|
|
127
|
-
export declare const delegatedSignRawMessage: (client: DelegatedSvmWalletClient, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath, }: {
|
|
131
|
+
export declare const delegatedSignRawMessage: (client: DelegatedSvmWalletClient, { walletId, shareSetId, walletApiKey, keyShare, message, derivationPath, context, }: {
|
|
128
132
|
walletId: string;
|
|
129
133
|
/**
|
|
130
134
|
* Optional. The `shareSetId` from the `wallet.delegation.created`
|
|
@@ -138,6 +142,7 @@ export declare const delegatedSignRawMessage: (client: DelegatedSvmWalletClient,
|
|
|
138
142
|
keyShare: ServerKeyShare;
|
|
139
143
|
message: string;
|
|
140
144
|
derivationPath?: Uint32Array;
|
|
145
|
+
context?: SignMessageContext;
|
|
141
146
|
}) => Promise<string>;
|
|
142
147
|
/**
|
|
143
148
|
* Revoke delegation - delegates to the node package
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegatedClient.d.ts","sourceRoot":"","sources":["../../packages/src/delegatedClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAQvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAa,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAMlE,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,qBAAqB,GAAG;IAC7D,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,8BAA8B,sEAMxC,wBAAwB,KAAG,wBAU7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,WACvB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"delegatedClient.d.ts","sourceRoot":"","sources":["../../packages/src/delegatedClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAQvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAa,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAMlE,MAAM,MAAM,wBAA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