@dynamic-labs-wallet/node-evm 1.0.50 → 1.0.52
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 +480 -6
- package/index.esm.js +468 -8
- package/package.json +3 -3
- package/src/client/client.d.ts +48 -1
- package/src/client/client.d.ts.map +1 -1
- package/src/client/gasless.client.d.ts +35 -0
- package/src/client/gasless.client.d.ts.map +1 -0
- package/src/client/gasless.constants.d.ts +63 -0
- package/src/client/gasless.constants.d.ts.map +1 -0
- package/src/client/gasless.types.d.ts +153 -0
- package/src/client/gasless.types.d.ts.map +1 -0
- package/src/client/index.d.ts +2 -0
- package/src/client/index.d.ts.map +1 -1
package/index.esm.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { toAccount } from 'viem/accounts';
|
|
2
2
|
import { MessageHash, createLogError, createDelegatedWalletClient, delegatedSignMessage as delegatedSignMessage$1, stripHexPrefix, revokeDelegation as revokeDelegation$1, DynamicWalletClient, getMPCChainConfig, WalletOperation } from '@dynamic-labs-wallet/node';
|
|
3
|
-
import { getAddress, stringToHex, bytesToHex, size, concat, hashTypedData, validateTypedData, serializeSignature, parseSignature, serializeTransaction, createPublicClient, http,
|
|
3
|
+
import { getAddress, stringToHex, bytesToHex, size, concat, hashTypedData, validateTypedData, serializeSignature, parseSignature, serializeTransaction, defineChain, createPublicClient, http, createWalletClient } from 'viem';
|
|
4
4
|
import { hashAuthorization } from 'viem/utils';
|
|
5
5
|
import { mainnet } from 'viem/chains';
|
|
6
|
+
import { randomBytes } from 'node:crypto';
|
|
6
7
|
import { initializeClient, refreshUser, getNetworksData, createDynamicClient } from '@dynamic-labs-sdk/client';
|
|
7
8
|
import { assertDefined } from '@dynamic-labs-sdk/client/core';
|
|
8
9
|
import { mapNetworkDataToViemChain } from '@dynamic-labs-sdk/evm/viem';
|
|
@@ -93,7 +94,7 @@ const deriveAccountAddress = ({ rawPublicKey })=>{
|
|
|
93
94
|
};
|
|
94
95
|
};
|
|
95
96
|
|
|
96
|
-
const logError$
|
|
97
|
+
const logError$2 = createLogError('node-evm');
|
|
97
98
|
/**
|
|
98
99
|
* Creates a delegated EVM wallet client for functional operations
|
|
99
100
|
*/ const createDelegatedEvmWalletClient = ({ environmentId, baseApiUrl, baseMPCRelayApiUrl, apiKey, debug = false })=>{
|
|
@@ -132,7 +133,7 @@ const logError$1 = createLogError('node-evm');
|
|
|
132
133
|
});
|
|
133
134
|
return serializeECDSASignature(signatureEcdsa);
|
|
134
135
|
} catch (error) {
|
|
135
|
-
logError$
|
|
136
|
+
logError$2({
|
|
136
137
|
message: 'Error in delegatedSignMessage',
|
|
137
138
|
error: error,
|
|
138
139
|
context: {
|
|
@@ -178,7 +179,7 @@ const logError$1 = createLogError('node-evm');
|
|
|
178
179
|
});
|
|
179
180
|
return serializeTransaction(signedTx);
|
|
180
181
|
} catch (error) {
|
|
181
|
-
logError$
|
|
182
|
+
logError$2({
|
|
182
183
|
message: 'Error in delegatedSignTransaction',
|
|
183
184
|
error: error,
|
|
184
185
|
context: {
|
|
@@ -211,7 +212,7 @@ const logError$1 = createLogError('node-evm');
|
|
|
211
212
|
});
|
|
212
213
|
return serializeECDSASignature(signatureEcdsa);
|
|
213
214
|
} catch (error) {
|
|
214
|
-
logError$
|
|
215
|
+
logError$2({
|
|
215
216
|
message: 'Error in delegatedSignTypedData',
|
|
216
217
|
error: error,
|
|
217
218
|
context: {
|
|
@@ -246,7 +247,7 @@ const logError$1 = createLogError('node-evm');
|
|
|
246
247
|
const serializedSignature = serializeECDSASignature(signatureEcdsa);
|
|
247
248
|
return parseSignature(serializedSignature);
|
|
248
249
|
} catch (error) {
|
|
249
|
-
logError$
|
|
250
|
+
logError$2({
|
|
250
251
|
message: 'Error in delegatedSignAuthorization',
|
|
251
252
|
error: error,
|
|
252
253
|
context: {
|
|
@@ -279,7 +280,7 @@ const logError$1 = createLogError('node-evm');
|
|
|
279
280
|
});
|
|
280
281
|
return serializeECDSASignature(signatureEcdsa);
|
|
281
282
|
} catch (error) {
|
|
282
|
-
logError$
|
|
283
|
+
logError$2({
|
|
283
284
|
message: 'Error in delegatedSignRawMessage',
|
|
284
285
|
error: error,
|
|
285
286
|
context: {
|
|
@@ -395,6 +396,409 @@ const createAccountAdapter = ({ evmClient, walletMetadata, password, externalSer
|
|
|
395
396
|
});
|
|
396
397
|
};
|
|
397
398
|
|
|
399
|
+
/** The Fireblocks Universal Gasless Delegate (UGD) contract address used for EIP-7702 delegation. */ const DELEGATION_CONTRACT_ADDRESS = '0x0000Fb7702036ff9f76044a501ac1aA74cbab16b';
|
|
400
|
+
/** Default sponsored transaction validity duration in seconds (10 minutes). */ const DEFAULT_VALID_FOR_SECONDS = 600;
|
|
401
|
+
/** EIP-7702 delegation code prefix used to identify delegated accounts. */ const DELEGATION_CODE_PREFIX = '0xef0100';
|
|
402
|
+
/** ERC-7579 batch call with opData and auth mode identifier. */ const BATCH_CALL_OPDATA_AUTH_MODE = '0x0100000000007821000100000000000000000000000000000000000000000000';
|
|
403
|
+
/** EIP-712 typed data types for UGD AuthorizedExecutions signing. */ const AUTHORIZED_EXECUTIONS_TYPES = {
|
|
404
|
+
AuthorizedExecutions: [
|
|
405
|
+
{
|
|
406
|
+
name: 'calls',
|
|
407
|
+
type: 'Execution[]'
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: 'deadline',
|
|
411
|
+
type: 'uint256'
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
name: 'mode',
|
|
415
|
+
type: 'bytes32'
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
name: 'nonce',
|
|
419
|
+
type: 'uint256'
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
name: 'relayer',
|
|
423
|
+
type: 'address'
|
|
424
|
+
}
|
|
425
|
+
],
|
|
426
|
+
Execution: [
|
|
427
|
+
{
|
|
428
|
+
name: 'target',
|
|
429
|
+
type: 'address'
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
name: 'value',
|
|
433
|
+
type: 'uint256'
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
name: 'data',
|
|
437
|
+
type: 'bytes'
|
|
438
|
+
}
|
|
439
|
+
]
|
|
440
|
+
};
|
|
441
|
+
/** Minimal ABI for the UGD contract's nonce validation function. */ const UGD_ABI = [
|
|
442
|
+
{
|
|
443
|
+
inputs: [
|
|
444
|
+
{
|
|
445
|
+
name: 'nonce',
|
|
446
|
+
type: 'uint256'
|
|
447
|
+
}
|
|
448
|
+
],
|
|
449
|
+
name: 'isNonceUsed',
|
|
450
|
+
outputs: [
|
|
451
|
+
{
|
|
452
|
+
name: '',
|
|
453
|
+
type: 'bool'
|
|
454
|
+
}
|
|
455
|
+
],
|
|
456
|
+
stateMutability: 'view',
|
|
457
|
+
type: 'function'
|
|
458
|
+
}
|
|
459
|
+
];
|
|
460
|
+
/** Default polling interval for sponsored transaction status checks (milliseconds). */ const EVM_GASLESS_DEFAULT_POLL_INTERVAL_MS = 2000;
|
|
461
|
+
/** Default timeout for sponsored transaction polling (milliseconds). */ const EVM_GASLESS_DEFAULT_TIMEOUT_MS = 60000;
|
|
462
|
+
// Error messages
|
|
463
|
+
const ERROR_GASLESS_RPC_REQUIRED_FOR_AUTO_DELEGATE = 'rpcUrl is required when autoDelegate is true and no explicit authorization is provided. ' + 'Pass rpcUrl, pass an explicit authorization, or set autoDelegate: false.';
|
|
464
|
+
const ERROR_GASLESS_RELAY_FAILED = 'EVM sponsored transaction relay failed';
|
|
465
|
+
const ERROR_GASLESS_TIMEOUT = 'EVM sponsored transaction timed out waiting for terminal status';
|
|
466
|
+
const ERROR_GASLESS_MISSING_REQUEST_ID = 'Relay response did not include a requestId';
|
|
467
|
+
const ERROR_GASLESS_MISSING_YPARITY = 'Signed authorization is missing yParity';
|
|
468
|
+
const ERROR_GASLESS_RPC_REQUIRED = 'rpcUrl is required for this operation';
|
|
469
|
+
|
|
470
|
+
const logError$1 = createLogError('node-evm');
|
|
471
|
+
/**
|
|
472
|
+
* Builds a stateless gasless client for EVM sponsored transactions (Fireblocks-relayer
|
|
473
|
+
* native gasless via EIP-7702 / AuthorizedExecutions). It holds no wallet state — the
|
|
474
|
+
* signing primitives and API client are injected by the owning `DynamicEvmWalletClient`.
|
|
475
|
+
*/ const createEvmGaslessClient = ({ apiClient, createViemPublicClient, signAuthorization, signTypedData })=>{
|
|
476
|
+
const viemPublicClientForChain = (chainId, rpcUrl)=>{
|
|
477
|
+
if (!rpcUrl) {
|
|
478
|
+
throw new Error(ERROR_GASLESS_RPC_REQUIRED);
|
|
479
|
+
}
|
|
480
|
+
const chain = defineChain({
|
|
481
|
+
id: chainId,
|
|
482
|
+
name: `Chain ${chainId}`,
|
|
483
|
+
nativeCurrency: {
|
|
484
|
+
name: 'Ether',
|
|
485
|
+
symbol: 'ETH',
|
|
486
|
+
decimals: 18
|
|
487
|
+
},
|
|
488
|
+
rpcUrls: {
|
|
489
|
+
default: {
|
|
490
|
+
http: [
|
|
491
|
+
rpcUrl
|
|
492
|
+
]
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
return createViemPublicClient({
|
|
497
|
+
chain,
|
|
498
|
+
rpcUrl
|
|
499
|
+
});
|
|
500
|
+
};
|
|
501
|
+
const generateRandomNonce = ()=>BigInt('0x' + randomBytes(32).toString('hex'));
|
|
502
|
+
const generateIntentNonce = async ({ walletAddress, chainId, rpcUrl })=>{
|
|
503
|
+
let nonce = generateRandomNonce();
|
|
504
|
+
if (rpcUrl) {
|
|
505
|
+
try {
|
|
506
|
+
const publicClient = viemPublicClientForChain(chainId, rpcUrl);
|
|
507
|
+
// On a brand-new (undelegated) wallet the address has no UGD code yet,
|
|
508
|
+
// so isNonceUsed reverts — the random value is safe regardless.
|
|
509
|
+
const isUsed = await publicClient.readContract({
|
|
510
|
+
address: walletAddress,
|
|
511
|
+
abi: UGD_ABI,
|
|
512
|
+
functionName: 'isNonceUsed',
|
|
513
|
+
args: [
|
|
514
|
+
nonce
|
|
515
|
+
]
|
|
516
|
+
});
|
|
517
|
+
if (isUsed) {
|
|
518
|
+
nonce = generateRandomNonce();
|
|
519
|
+
}
|
|
520
|
+
} catch (e) {
|
|
521
|
+
// RPC failure is tolerable — 256-bit random collision is negligible
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
return nonce;
|
|
525
|
+
};
|
|
526
|
+
const is7702DelegationActive = async ({ walletAddress, chainId, rpcUrl })=>{
|
|
527
|
+
const publicClient = viemPublicClientForChain(chainId, rpcUrl);
|
|
528
|
+
const code = await publicClient.getCode({
|
|
529
|
+
address: walletAddress
|
|
530
|
+
});
|
|
531
|
+
if (!code) return false;
|
|
532
|
+
const expectedPrefix = DELEGATION_CODE_PREFIX + DELEGATION_CONTRACT_ADDRESS.slice(2).toLowerCase();
|
|
533
|
+
return code.toLowerCase().startsWith(expectedPrefix);
|
|
534
|
+
};
|
|
535
|
+
const sign7702Authorization = async ({ walletMetadata, chainId, rpcUrl, nonce, password, externalServerKeyShares })=>{
|
|
536
|
+
const address = walletMetadata.accountAddress;
|
|
537
|
+
try {
|
|
538
|
+
let eoaNonce;
|
|
539
|
+
if (nonce === undefined) {
|
|
540
|
+
if (!rpcUrl) {
|
|
541
|
+
throw new Error(ERROR_GASLESS_RPC_REQUIRED);
|
|
542
|
+
}
|
|
543
|
+
const publicClient = viemPublicClientForChain(chainId, rpcUrl);
|
|
544
|
+
eoaNonce = Number(await publicClient.getTransactionCount({
|
|
545
|
+
address
|
|
546
|
+
}));
|
|
547
|
+
} else {
|
|
548
|
+
eoaNonce = nonce;
|
|
549
|
+
}
|
|
550
|
+
const authorization = {
|
|
551
|
+
address: DELEGATION_CONTRACT_ADDRESS,
|
|
552
|
+
chainId,
|
|
553
|
+
nonce: eoaNonce
|
|
554
|
+
};
|
|
555
|
+
const sig = await signAuthorization({
|
|
556
|
+
authorization,
|
|
557
|
+
walletMetadata,
|
|
558
|
+
password,
|
|
559
|
+
externalServerKeyShares
|
|
560
|
+
});
|
|
561
|
+
if (sig.yParity === undefined) {
|
|
562
|
+
throw new Error(ERROR_GASLESS_MISSING_YPARITY);
|
|
563
|
+
}
|
|
564
|
+
return {
|
|
565
|
+
address: DELEGATION_CONTRACT_ADDRESS,
|
|
566
|
+
chainId,
|
|
567
|
+
nonce: eoaNonce,
|
|
568
|
+
r: sig.r,
|
|
569
|
+
s: sig.s,
|
|
570
|
+
yParity: sig.yParity
|
|
571
|
+
};
|
|
572
|
+
} catch (error) {
|
|
573
|
+
logError$1({
|
|
574
|
+
message: 'Error signing 7702 authorization',
|
|
575
|
+
error: error,
|
|
576
|
+
context: {
|
|
577
|
+
accountAddress: address,
|
|
578
|
+
chainId
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
throw error;
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
const getAvailableEvmGaslessRelayer = async ({ chainId, traceContext })=>{
|
|
585
|
+
const result = await apiClient.getAvailableEVMGaslessRelayer({
|
|
586
|
+
chainId,
|
|
587
|
+
traceContext
|
|
588
|
+
});
|
|
589
|
+
return {
|
|
590
|
+
relayerAddress: result.relayerAddress
|
|
591
|
+
};
|
|
592
|
+
};
|
|
593
|
+
const resolveSponsoredAuthorization = async ({ authorization, autoDelegate, walletMetadata, chainId, rpcUrl, password, externalServerKeyShares })=>{
|
|
594
|
+
if (authorization) {
|
|
595
|
+
return authorization;
|
|
596
|
+
}
|
|
597
|
+
if (!autoDelegate) {
|
|
598
|
+
return undefined;
|
|
599
|
+
}
|
|
600
|
+
// The EOA nonce and delegation status are only knowable on-chain; without
|
|
601
|
+
// an RPC we can't safely auto-sign a 7702 authorization, so fail loud
|
|
602
|
+
// instead of relaying an intent that would revert.
|
|
603
|
+
if (!rpcUrl) {
|
|
604
|
+
throw new Error(ERROR_GASLESS_RPC_REQUIRED_FOR_AUTO_DELEGATE);
|
|
605
|
+
}
|
|
606
|
+
const walletAddress = walletMetadata.accountAddress;
|
|
607
|
+
const isDelegated = await is7702DelegationActive({
|
|
608
|
+
walletAddress,
|
|
609
|
+
chainId,
|
|
610
|
+
rpcUrl
|
|
611
|
+
});
|
|
612
|
+
if (isDelegated) {
|
|
613
|
+
return undefined;
|
|
614
|
+
}
|
|
615
|
+
return sign7702Authorization({
|
|
616
|
+
walletMetadata,
|
|
617
|
+
chainId,
|
|
618
|
+
rpcUrl,
|
|
619
|
+
password,
|
|
620
|
+
externalServerKeyShares
|
|
621
|
+
});
|
|
622
|
+
};
|
|
623
|
+
const signSponsoredTransaction = async ({ walletMetadata, calls, chainId, rpcUrl, authorization, autoDelegate = true, nonce: providedNonce, validForSeconds = DEFAULT_VALID_FOR_SECONDS, password, externalServerKeyShares, traceContext })=>{
|
|
624
|
+
const walletAddress = walletMetadata.accountAddress;
|
|
625
|
+
try {
|
|
626
|
+
const resolvedAuth = await resolveSponsoredAuthorization({
|
|
627
|
+
authorization,
|
|
628
|
+
autoDelegate,
|
|
629
|
+
walletMetadata,
|
|
630
|
+
chainId,
|
|
631
|
+
rpcUrl,
|
|
632
|
+
password,
|
|
633
|
+
externalServerKeyShares
|
|
634
|
+
});
|
|
635
|
+
const nonce = providedNonce != null ? providedNonce : await generateIntentNonce({
|
|
636
|
+
walletAddress,
|
|
637
|
+
chainId,
|
|
638
|
+
rpcUrl
|
|
639
|
+
});
|
|
640
|
+
const deadline = BigInt(Math.floor(Date.now() / 1000) + validForSeconds);
|
|
641
|
+
const { relayerAddress } = await getAvailableEvmGaslessRelayer({
|
|
642
|
+
chainId,
|
|
643
|
+
traceContext
|
|
644
|
+
});
|
|
645
|
+
const signature = await signTypedData({
|
|
646
|
+
walletMetadata,
|
|
647
|
+
password,
|
|
648
|
+
externalServerKeyShares,
|
|
649
|
+
typedData: {
|
|
650
|
+
domain: {
|
|
651
|
+
chainId,
|
|
652
|
+
verifyingContract: DELEGATION_CONTRACT_ADDRESS
|
|
653
|
+
},
|
|
654
|
+
message: {
|
|
655
|
+
calls: calls.map((c)=>({
|
|
656
|
+
data: c.data,
|
|
657
|
+
target: c.target,
|
|
658
|
+
value: c.value
|
|
659
|
+
})),
|
|
660
|
+
deadline,
|
|
661
|
+
mode: BATCH_CALL_OPDATA_AUTH_MODE,
|
|
662
|
+
nonce,
|
|
663
|
+
relayer: relayerAddress
|
|
664
|
+
},
|
|
665
|
+
primaryType: 'AuthorizedExecutions',
|
|
666
|
+
types: AUTHORIZED_EXECUTIONS_TYPES
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
return {
|
|
670
|
+
authorization: resolvedAuth,
|
|
671
|
+
calls,
|
|
672
|
+
chainId,
|
|
673
|
+
deadline: deadline.toString(),
|
|
674
|
+
nonce: nonce.toString(),
|
|
675
|
+
relayer: relayerAddress,
|
|
676
|
+
signature,
|
|
677
|
+
walletAddress
|
|
678
|
+
};
|
|
679
|
+
} catch (error) {
|
|
680
|
+
logError$1({
|
|
681
|
+
message: 'Error signing sponsored transaction',
|
|
682
|
+
error: error,
|
|
683
|
+
context: {
|
|
684
|
+
accountAddress: walletAddress,
|
|
685
|
+
chainId
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
throw error;
|
|
689
|
+
}
|
|
690
|
+
};
|
|
691
|
+
const getEVMSponsoredTransactionStatus = async ({ requestId, traceContext })=>{
|
|
692
|
+
const result = await apiClient.getEVMSponsoredTransactionStatus({
|
|
693
|
+
requestId,
|
|
694
|
+
traceContext
|
|
695
|
+
});
|
|
696
|
+
return result;
|
|
697
|
+
};
|
|
698
|
+
const isSignedTransactionParams = (params)=>'signedTransaction' in params;
|
|
699
|
+
const relaySponsoredTransaction = async (params)=>{
|
|
700
|
+
try {
|
|
701
|
+
const signed = isSignedTransactionParams(params) ? params.signedTransaction : await signSponsoredTransaction(params);
|
|
702
|
+
const { requestId } = await apiClient.sponsorEVMTransaction({
|
|
703
|
+
traceContext: params.traceContext,
|
|
704
|
+
request: _extends({
|
|
705
|
+
authorization: signed.authorization,
|
|
706
|
+
calls: signed.calls.map((c)=>({
|
|
707
|
+
data: c.data,
|
|
708
|
+
target: c.target,
|
|
709
|
+
value: c.value.toString()
|
|
710
|
+
})),
|
|
711
|
+
chainId: signed.chainId,
|
|
712
|
+
deadline: signed.deadline,
|
|
713
|
+
nonce: signed.nonce,
|
|
714
|
+
relayer: signed.relayer,
|
|
715
|
+
signature: signed.signature,
|
|
716
|
+
walletAddress: signed.walletAddress
|
|
717
|
+
}, params.userId ? {
|
|
718
|
+
userId: params.userId
|
|
719
|
+
} : {})
|
|
720
|
+
});
|
|
721
|
+
if (!requestId) {
|
|
722
|
+
throw new Error(ERROR_GASLESS_MISSING_REQUEST_ID);
|
|
723
|
+
}
|
|
724
|
+
return {
|
|
725
|
+
requestId
|
|
726
|
+
};
|
|
727
|
+
} catch (error) {
|
|
728
|
+
const { accountAddress, chainId } = isSignedTransactionParams(params) ? {
|
|
729
|
+
accountAddress: params.signedTransaction.walletAddress,
|
|
730
|
+
chainId: params.signedTransaction.chainId
|
|
731
|
+
} : {
|
|
732
|
+
accountAddress: params.walletMetadata.accountAddress,
|
|
733
|
+
chainId: params.chainId
|
|
734
|
+
};
|
|
735
|
+
logError$1({
|
|
736
|
+
message: 'Error relaying sponsored transaction',
|
|
737
|
+
error: error,
|
|
738
|
+
context: {
|
|
739
|
+
accountAddress,
|
|
740
|
+
chainId,
|
|
741
|
+
userId: params.userId
|
|
742
|
+
}
|
|
743
|
+
});
|
|
744
|
+
throw error;
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
const waitForSponsoredTransaction = async ({ requestId, pollInterval = EVM_GASLESS_DEFAULT_POLL_INTERVAL_MS, timeout = EVM_GASLESS_DEFAULT_TIMEOUT_MS, traceContext })=>{
|
|
748
|
+
try {
|
|
749
|
+
// A zero or negative pollInterval makes attempts Infinity and turns this into a
|
|
750
|
+
// tight loop hammering the status API, so clamp it to a sane minimum.
|
|
751
|
+
const effectivePoll = Math.max(1, pollInterval);
|
|
752
|
+
const attempts = Math.max(1, Math.floor(timeout / effectivePoll));
|
|
753
|
+
for(let i = 0; i < attempts; i++){
|
|
754
|
+
const r = await getEVMSponsoredTransactionStatus({
|
|
755
|
+
requestId,
|
|
756
|
+
traceContext
|
|
757
|
+
});
|
|
758
|
+
if (r.status === 'failure') {
|
|
759
|
+
var _r_errorMessage;
|
|
760
|
+
throw new Error(`${ERROR_GASLESS_RELAY_FAILED}: ${(_r_errorMessage = r.errorMessage) != null ? _r_errorMessage : 'unknown'}`);
|
|
761
|
+
}
|
|
762
|
+
if (r.transactionHash) {
|
|
763
|
+
return {
|
|
764
|
+
transactionHash: r.transactionHash
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
if (i < attempts - 1) {
|
|
768
|
+
await new Promise((resolve)=>setTimeout(resolve, effectivePoll));
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
throw new Error(`${ERROR_GASLESS_TIMEOUT}: ${requestId}`);
|
|
772
|
+
} catch (error) {
|
|
773
|
+
logError$1({
|
|
774
|
+
message: 'Error waiting for sponsored transaction',
|
|
775
|
+
error: error,
|
|
776
|
+
context: {
|
|
777
|
+
requestId
|
|
778
|
+
}
|
|
779
|
+
});
|
|
780
|
+
throw error;
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
const sendSponsoredTransaction = async (params)=>{
|
|
784
|
+
const { requestId } = await relaySponsoredTransaction(params);
|
|
785
|
+
return waitForSponsoredTransaction({
|
|
786
|
+
requestId,
|
|
787
|
+
traceContext: params.traceContext
|
|
788
|
+
});
|
|
789
|
+
};
|
|
790
|
+
return {
|
|
791
|
+
getAvailableEvmGaslessRelayer,
|
|
792
|
+
getEVMSponsoredTransactionStatus,
|
|
793
|
+
is7702DelegationActive,
|
|
794
|
+
relaySponsoredTransaction,
|
|
795
|
+
sendSponsoredTransaction,
|
|
796
|
+
sign7702Authorization,
|
|
797
|
+
signSponsoredTransaction,
|
|
798
|
+
waitForSponsoredTransaction
|
|
799
|
+
};
|
|
800
|
+
};
|
|
801
|
+
|
|
398
802
|
const logError = createLogError('node-evm');
|
|
399
803
|
class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
400
804
|
get jwtAuthToken() {
|
|
@@ -827,6 +1231,62 @@ class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
827
1231
|
const evmWallets = wallets.filter((wallet)=>wallet.chainName === 'EVM');
|
|
828
1232
|
return evmWallets;
|
|
829
1233
|
}
|
|
1234
|
+
// ---------------------------------------------------------------------------
|
|
1235
|
+
// EVM gasless (Fireblocks-relayer native gasless via EIP-7702 / AuthorizedExecutions)
|
|
1236
|
+
// ---------------------------------------------------------------------------
|
|
1237
|
+
get evmGasless() {
|
|
1238
|
+
return createEvmGaslessClient({
|
|
1239
|
+
apiClient: this.apiClient,
|
|
1240
|
+
createViemPublicClient: (args)=>this.createViemPublicClient(args),
|
|
1241
|
+
signAuthorization: (args)=>this.signAuthorization(args),
|
|
1242
|
+
signTypedData: (args)=>this.signTypedData(args)
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Checks whether the given wallet address has an active EIP-7702 delegation
|
|
1247
|
+
* to the Universal Gasless Delegate (UGD) contract.
|
|
1248
|
+
*/ async is7702DelegationActive(params) {
|
|
1249
|
+
return this.evmGasless.is7702DelegationActive(params);
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* Signs an EIP-7702 authorization that delegates the EOA to the UGD contract.
|
|
1253
|
+
* The EOA nonce is fetched from the chain unless explicitly provided.
|
|
1254
|
+
*/ async sign7702Authorization(params) {
|
|
1255
|
+
return this.evmGasless.sign7702Authorization(params);
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* Fetches the available gasless relayer address for a given chain.
|
|
1259
|
+
*/ async getAvailableEvmGaslessRelayer(params) {
|
|
1260
|
+
return this.evmGasless.getAvailableEvmGaslessRelayer(params);
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Signs a sponsored transaction intent: resolves 7702 authorization, generates
|
|
1264
|
+
* a bitmap nonce, fetches the relayer, and MPC-signs the EIP-712 typed data.
|
|
1265
|
+
*/ async signSponsoredTransaction(params) {
|
|
1266
|
+
return this.evmGasless.signSponsoredTransaction(params);
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Returns the current status of an EVM sponsored transaction relay request.
|
|
1270
|
+
*/ async getEVMSponsoredTransactionStatus(params) {
|
|
1271
|
+
return this.evmGasless.getEVMSponsoredTransactionStatus(params);
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Relays a sponsored transaction to the Dynamic API.
|
|
1275
|
+
* Accepts either a pre-signed transaction or parameters to sign first.
|
|
1276
|
+
*/ async relaySponsoredTransaction(params) {
|
|
1277
|
+
return this.evmGasless.relaySponsoredTransaction(params);
|
|
1278
|
+
}
|
|
1279
|
+
/**
|
|
1280
|
+
* Relay then poll to completion. Fixed 60s/2s default (matches js-sdk).
|
|
1281
|
+
* For a custom timeout, use relaySponsoredTransaction + waitForSponsoredTransaction.
|
|
1282
|
+
*/ async sendSponsoredTransaction(params) {
|
|
1283
|
+
return this.evmGasless.sendSponsoredTransaction(params);
|
|
1284
|
+
}
|
|
1285
|
+
/**
|
|
1286
|
+
* Polls the relay status until a terminal state (success or failure) is reached.
|
|
1287
|
+
*/ async waitForSponsoredTransaction(params) {
|
|
1288
|
+
return this.evmGasless.waitForSponsoredTransaction(params);
|
|
1289
|
+
}
|
|
830
1290
|
constructor({ environmentId, baseApiUrl, baseMPCRelayApiUrl, debug, enableMPCAccelerator, logger }){
|
|
831
1291
|
super({
|
|
832
1292
|
environmentId,
|
|
@@ -1022,4 +1482,4 @@ const createZerodevClient = async (evmClient)=>{
|
|
|
1022
1482
|
return client;
|
|
1023
1483
|
};
|
|
1024
1484
|
|
|
1025
|
-
export { DynamicEvmWalletClient, ERROR_ACCOUNT_ADDRESS_REQUIRED, ERROR_CREATE_WALLET_ACCOUNT, ERROR_KEYGEN_FAILED, ERROR_SIGN_MESSAGE, ERROR_SIGN_RAW_MESSAGE, ERROR_SIGN_TYPED_DATA, ERROR_VERIFY_MESSAGE_SIGNATURE, EVM_SIGN_MESSAGE_PREFIX, createAccountAdapter, createDelegatedEvmWalletClient, createZerodevClient, delegatedSignAuthorization, delegatedSignMessage, delegatedSignRawMessage, delegatedSignTransaction, delegatedSignTypedData, deriveAccountAddress, formatEVMMessage, formatTypedData, revokeDelegation, serializeECDSASignature };
|
|
1485
|
+
export { AUTHORIZED_EXECUTIONS_TYPES, BATCH_CALL_OPDATA_AUTH_MODE, DEFAULT_VALID_FOR_SECONDS, DELEGATION_CODE_PREFIX, DELEGATION_CONTRACT_ADDRESS, DynamicEvmWalletClient, ERROR_ACCOUNT_ADDRESS_REQUIRED, ERROR_CREATE_WALLET_ACCOUNT, ERROR_GASLESS_MISSING_REQUEST_ID, ERROR_GASLESS_MISSING_YPARITY, ERROR_GASLESS_RELAY_FAILED, ERROR_GASLESS_RPC_REQUIRED, ERROR_GASLESS_RPC_REQUIRED_FOR_AUTO_DELEGATE, ERROR_GASLESS_TIMEOUT, ERROR_KEYGEN_FAILED, ERROR_SIGN_MESSAGE, ERROR_SIGN_RAW_MESSAGE, ERROR_SIGN_TYPED_DATA, ERROR_VERIFY_MESSAGE_SIGNATURE, EVM_GASLESS_DEFAULT_POLL_INTERVAL_MS, EVM_GASLESS_DEFAULT_TIMEOUT_MS, EVM_SIGN_MESSAGE_PREFIX, UGD_ABI, createAccountAdapter, createDelegatedEvmWalletClient, createZerodevClient, delegatedSignAuthorization, delegatedSignMessage, delegatedSignRawMessage, delegatedSignTransaction, delegatedSignTypedData, deriveAccountAddress, formatEVMMessage, formatTypedData, revokeDelegation, serializeECDSASignature };
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/node-evm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
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.52",
|
|
8
8
|
"@dynamic-labs/sdk-api-core": "^0.0.984",
|
|
9
9
|
"@dynamic-labs-sdk/client": "0.3.0",
|
|
10
10
|
"@dynamic-labs-sdk/zerodev": "0.3.0",
|
|
11
11
|
"@dynamic-labs-sdk/evm": "0.3.0",
|
|
12
12
|
"@zerodev/ecdsa-validator": "5.4.9",
|
|
13
13
|
"@zerodev/sdk": "5.4.36",
|
|
14
|
-
"@dynamic-labs-wallet/core": "1.0.
|
|
14
|
+
"@dynamic-labs-wallet/core": "1.0.52"
|
|
15
15
|
},
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|
package/src/client/client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DynamicWalletClient, type DynamicWalletClientProps, type EcdsaKeygenResult, type EcdsaPublicKey, type Ed25519KeygenResult, type ServerKeyShare, type ThresholdSignatureScheme, type WalletMetadata } from '@dynamic-labs-wallet/node';
|
|
2
2
|
import type { SignMessageContext } from '@dynamic-labs/sdk-api-core';
|
|
3
|
-
import { type Account, type Chain, type PublicClient, type SignableMessage, type TransactionSerializable, type Transport, type TypedData, type WalletClient } from 'viem';
|
|
3
|
+
import { type Account, type Chain, type Hex, type PublicClient, type SignableMessage, type TransactionSerializable, type Transport, type TypedData, type WalletClient } from 'viem';
|
|
4
|
+
import type { GetAvailableEvmGaslessRelayerParams, GetEVMSponsoredTransactionStatusParams, Is7702DelegationActiveParams, RelaySponsoredTransactionParams, SerializedAuthorization, Sign7702AuthorizationParams, SignedSponsoredTransaction, SignSponsoredTransactionParams, SponsoredTransactionStatusResult, WaitForSponsoredTransactionParams } from './gasless.types.js';
|
|
4
5
|
export declare class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
5
6
|
readonly chainName = "EVM";
|
|
6
7
|
constructor({ environmentId, baseApiUrl, baseMPCRelayApiUrl, debug, enableMPCAccelerator, logger, }: DynamicWalletClientProps);
|
|
@@ -143,5 +144,51 @@ export declare class DynamicEvmWalletClient extends DynamicWalletClient {
|
|
|
143
144
|
derivationPath: string | undefined;
|
|
144
145
|
thresholdSignatureScheme: ThresholdSignatureScheme;
|
|
145
146
|
}[]>;
|
|
147
|
+
private get evmGasless();
|
|
148
|
+
/**
|
|
149
|
+
* Checks whether the given wallet address has an active EIP-7702 delegation
|
|
150
|
+
* to the Universal Gasless Delegate (UGD) contract.
|
|
151
|
+
*/
|
|
152
|
+
is7702DelegationActive(params: Is7702DelegationActiveParams): Promise<boolean>;
|
|
153
|
+
/**
|
|
154
|
+
* Signs an EIP-7702 authorization that delegates the EOA to the UGD contract.
|
|
155
|
+
* The EOA nonce is fetched from the chain unless explicitly provided.
|
|
156
|
+
*/
|
|
157
|
+
sign7702Authorization(params: Sign7702AuthorizationParams): Promise<SerializedAuthorization>;
|
|
158
|
+
/**
|
|
159
|
+
* Fetches the available gasless relayer address for a given chain.
|
|
160
|
+
*/
|
|
161
|
+
getAvailableEvmGaslessRelayer(params: GetAvailableEvmGaslessRelayerParams): Promise<{
|
|
162
|
+
relayerAddress: Hex;
|
|
163
|
+
}>;
|
|
164
|
+
/**
|
|
165
|
+
* Signs a sponsored transaction intent: resolves 7702 authorization, generates
|
|
166
|
+
* a bitmap nonce, fetches the relayer, and MPC-signs the EIP-712 typed data.
|
|
167
|
+
*/
|
|
168
|
+
signSponsoredTransaction(params: SignSponsoredTransactionParams): Promise<SignedSponsoredTransaction>;
|
|
169
|
+
/**
|
|
170
|
+
* Returns the current status of an EVM sponsored transaction relay request.
|
|
171
|
+
*/
|
|
172
|
+
getEVMSponsoredTransactionStatus(params: GetEVMSponsoredTransactionStatusParams): Promise<SponsoredTransactionStatusResult>;
|
|
173
|
+
/**
|
|
174
|
+
* Relays a sponsored transaction to the Dynamic API.
|
|
175
|
+
* Accepts either a pre-signed transaction or parameters to sign first.
|
|
176
|
+
*/
|
|
177
|
+
relaySponsoredTransaction(params: RelaySponsoredTransactionParams): Promise<{
|
|
178
|
+
requestId: string;
|
|
179
|
+
}>;
|
|
180
|
+
/**
|
|
181
|
+
* Relay then poll to completion. Fixed 60s/2s default (matches js-sdk).
|
|
182
|
+
* For a custom timeout, use relaySponsoredTransaction + waitForSponsoredTransaction.
|
|
183
|
+
*/
|
|
184
|
+
sendSponsoredTransaction(params: RelaySponsoredTransactionParams): Promise<{
|
|
185
|
+
transactionHash: Hex;
|
|
186
|
+
}>;
|
|
187
|
+
/**
|
|
188
|
+
* Polls the relay status until a terminal state (success or failure) is reached.
|
|
189
|
+
*/
|
|
190
|
+
waitForSponsoredTransaction(params: WaitForSponsoredTransactionParams): Promise<{
|
|
191
|
+
transactionHash: Hex;
|
|
192
|
+
}>;
|
|
146
193
|
}
|
|
147
194
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EAExB,KAAK,cAAc,EAEnB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EAEpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EAExB,KAAK,cAAc,EAEnB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EAEpB,MAAM,2BAA2B,CAAC;AACnC,OAA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