@1llet.xyz/erc4337-gasless-sdk 0.4.56 → 0.4.58
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/dist/index.d.mts +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +2703 -2426
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2702 -2425
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -485,4 +485,45 @@ declare class CCTPStrategy implements BridgeStrategy {
|
|
|
485
485
|
execute(context: BridgeContext): Promise<SettleResponse>;
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
|
|
488
|
+
declare class StargateStrategy implements BridgeStrategy {
|
|
489
|
+
name: string;
|
|
490
|
+
canHandle(context: BridgeContext): boolean;
|
|
491
|
+
execute(context: BridgeContext): Promise<SettleResponse>;
|
|
492
|
+
}
|
|
493
|
+
declare function getStargateSimulation(sourceChain: string, destChain: string, amount: string, recipient: string): Promise<{
|
|
494
|
+
success: boolean;
|
|
495
|
+
amountSent: number;
|
|
496
|
+
protocolFee: string;
|
|
497
|
+
netAmountBridged: number;
|
|
498
|
+
estimatedReceived: string;
|
|
499
|
+
minAmount: string;
|
|
500
|
+
error?: undefined;
|
|
501
|
+
} | {
|
|
502
|
+
success: boolean;
|
|
503
|
+
error: any;
|
|
504
|
+
amountSent?: undefined;
|
|
505
|
+
protocolFee?: undefined;
|
|
506
|
+
netAmountBridged?: undefined;
|
|
507
|
+
estimatedReceived?: undefined;
|
|
508
|
+
minAmount?: undefined;
|
|
509
|
+
}>;
|
|
510
|
+
|
|
511
|
+
declare class UniswapService {
|
|
512
|
+
private publicClient;
|
|
513
|
+
constructor();
|
|
514
|
+
/**
|
|
515
|
+
* Get amount of USDC needed to buy exact amount of ETH
|
|
516
|
+
* @param amountETHWei Amount of ETH (Wei) needed
|
|
517
|
+
*/
|
|
518
|
+
quoteUSDCForETH(amountETHWei: bigint): Promise<bigint>;
|
|
519
|
+
/**
|
|
520
|
+
* Build tx data for swapping USDC -> ETH
|
|
521
|
+
* Uses SwapRouter02.exactOutputSingle + unwrapWETH9
|
|
522
|
+
*/
|
|
523
|
+
buildSwapData(recipient: Address, amountOutETH: bigint, maxAmountInUSDC: bigint): Hex;
|
|
524
|
+
getRouterAddress(): Address;
|
|
525
|
+
getUSDCAddress(): Address;
|
|
526
|
+
}
|
|
527
|
+
declare const uniswapService: UniswapService;
|
|
528
|
+
|
|
529
|
+
export { AccountAbstraction, type ApprovalSupportResult, BASE_MAINNET, BASE_SEPOLIA, BundlerClient, CCTPStrategy, CHAIN_CONFIGS, CHAIN_ID_TO_KEY, type ChainConfig$1 as ChainConfig, GNOSIS_MAINNET, type GasEstimate, NearStrategy, OPTIMISM_MAINNET, STELLAR, STELLAR_MAINNET, StargateStrategy, StellarService, type Token, TransferManager, UniswapService, type UserOpReceipt, type UserOperation, entryPointAbi, erc20Abi, getNearSimulation, getStargateSimulation, smartAccountAbi, uniswapService };
|
package/dist/index.d.ts
CHANGED
|
@@ -485,4 +485,45 @@ declare class CCTPStrategy implements BridgeStrategy {
|
|
|
485
485
|
execute(context: BridgeContext): Promise<SettleResponse>;
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
|
|
488
|
+
declare class StargateStrategy implements BridgeStrategy {
|
|
489
|
+
name: string;
|
|
490
|
+
canHandle(context: BridgeContext): boolean;
|
|
491
|
+
execute(context: BridgeContext): Promise<SettleResponse>;
|
|
492
|
+
}
|
|
493
|
+
declare function getStargateSimulation(sourceChain: string, destChain: string, amount: string, recipient: string): Promise<{
|
|
494
|
+
success: boolean;
|
|
495
|
+
amountSent: number;
|
|
496
|
+
protocolFee: string;
|
|
497
|
+
netAmountBridged: number;
|
|
498
|
+
estimatedReceived: string;
|
|
499
|
+
minAmount: string;
|
|
500
|
+
error?: undefined;
|
|
501
|
+
} | {
|
|
502
|
+
success: boolean;
|
|
503
|
+
error: any;
|
|
504
|
+
amountSent?: undefined;
|
|
505
|
+
protocolFee?: undefined;
|
|
506
|
+
netAmountBridged?: undefined;
|
|
507
|
+
estimatedReceived?: undefined;
|
|
508
|
+
minAmount?: undefined;
|
|
509
|
+
}>;
|
|
510
|
+
|
|
511
|
+
declare class UniswapService {
|
|
512
|
+
private publicClient;
|
|
513
|
+
constructor();
|
|
514
|
+
/**
|
|
515
|
+
* Get amount of USDC needed to buy exact amount of ETH
|
|
516
|
+
* @param amountETHWei Amount of ETH (Wei) needed
|
|
517
|
+
*/
|
|
518
|
+
quoteUSDCForETH(amountETHWei: bigint): Promise<bigint>;
|
|
519
|
+
/**
|
|
520
|
+
* Build tx data for swapping USDC -> ETH
|
|
521
|
+
* Uses SwapRouter02.exactOutputSingle + unwrapWETH9
|
|
522
|
+
*/
|
|
523
|
+
buildSwapData(recipient: Address, amountOutETH: bigint, maxAmountInUSDC: bigint): Hex;
|
|
524
|
+
getRouterAddress(): Address;
|
|
525
|
+
getUSDCAddress(): Address;
|
|
526
|
+
}
|
|
527
|
+
declare const uniswapService: UniswapService;
|
|
528
|
+
|
|
529
|
+
export { AccountAbstraction, type ApprovalSupportResult, BASE_MAINNET, BASE_SEPOLIA, BundlerClient, CCTPStrategy, CHAIN_CONFIGS, CHAIN_ID_TO_KEY, type ChainConfig$1 as ChainConfig, GNOSIS_MAINNET, type GasEstimate, NearStrategy, OPTIMISM_MAINNET, STELLAR, STELLAR_MAINNET, StargateStrategy, StellarService, type Token, TransferManager, UniswapService, type UserOpReceipt, type UserOperation, entryPointAbi, erc20Abi, getNearSimulation, getStargateSimulation, smartAccountAbi, uniswapService };
|