@sodax/sdk 1.3.1-beta-rc3 → 1.4.0-beta
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.cjs +10158 -5069
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2893 -74
- package/dist/index.d.ts +2893 -74
- package/dist/index.mjs +11095 -6048
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconAddress, IInjectiveWalletProvider, InjectiveExecuteResponse, SolanaChainConfig, SolanaBase58PublicKey, SolanaRpcResponseAndContext, SolanaTokenAmount, SolanaRawTransactionInstruction, WalletAddressProvider, SolanaSerializedTransaction, ISolanaWalletProvider, StellarSpokeChainConfig, StellarRpcConfig, IStellarWalletProvider, SuiSpokeChainConfig, SuiPaginatedCoins, SuiExecutionResult, ISuiWalletProvider, NearSpokeChainConfig, CallContractParams, NearRawTransaction, TransferArgs, SendMsgArgs, FillData, INearWalletProvider, Address, Erc20Token, SpokeChainId, HttpUrl, Token, GetMoneyMarketTokensApiResponse, SolverConfig, HubAsset, OriginalAssetAddress, XToken, Hex as Hex$1, defaultSharedConfig, RadfiDepositTxResponse, BitcoinSpokeChainConfig, IBitcoinWalletProvider, AddressType, HubChainId, IconSpokeChainConfig, IIconWalletProvider, EvmHubChainConfig, EvmSpokeChainConfig, IEvmWalletProvider, SpokeChainConfig, SonicSpokeChainConfig, EvmChainId, InjectiveSpokeChainConfig, JsonObject, InjectiveRawTransaction, AssetInfo, TokenInfo, HubAddress, ChainId, EvmRawTransaction, EvmRawTransactionReceipt, ChainType, Hash as Hash$1, IntentRelayChainId, StellarRawTransaction, MoneyMarketConfig, spokeChainConfig, ICON_MAINNET_CHAIN_ID, BaseSpokeChainConfig, IConfigApi, SubmitSwapTxRequest, SubmitSwapTxResponse, GetSubmitSwapTxStatusParams, SubmitSwapTxStatusResponse, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, GetSwapTokensByChainIdApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetHubAssetsApiResponse, GetHubAssetsByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, HubAssetInfo, IconEoaAddress, HubChainConfig, BridgeLimit } from '@sodax/types';
|
|
1
|
+
import { IconAddress, IInjectiveWalletProvider, InjectiveExecuteResponse, SolanaChainConfig, SolanaBase58PublicKey, SolanaRpcResponseAndContext, SolanaTokenAmount, SolanaRawTransactionInstruction, WalletAddressProvider, SolanaSerializedTransaction, ISolanaWalletProvider, StellarSpokeChainConfig, StellarRpcConfig, IStellarWalletProvider, SuiSpokeChainConfig, SuiPaginatedCoins, SuiExecutionResult, ISuiWalletProvider, NearSpokeChainConfig, CallContractParams, NearRawTransaction, TransferArgs, SendMsgArgs, FillData, INearWalletProvider, Address, Erc20Token, SpokeChainId, HttpUrl, Token, GetMoneyMarketTokensApiResponse, SolverConfig, HubAsset, OriginalAssetAddress, XToken, Hex as Hex$1, defaultSharedConfig, StacksSpokeChainConfig, StacksTransactionParams, IStacksWalletProvider, RadfiDepositTxResponse, BitcoinSpokeChainConfig, IBitcoinWalletProvider, AddressType, HubChainId, IconSpokeChainConfig, IIconWalletProvider, EvmHubChainConfig, EvmSpokeChainConfig, IEvmWalletProvider, SpokeChainConfig, SonicSpokeChainConfig, EvmChainId, InjectiveSpokeChainConfig, JsonObject, InjectiveRawTransaction, ConcentratedLiquidityConfig, AssetInfo, TokenInfo, HubAddress, ChainId, EvmRawTransaction, EvmRawTransactionReceipt, ChainType, Hash as Hash$1, IntentRelayChainId, StellarRawTransaction, MoneyMarketConfig, spokeChainConfig, ICON_MAINNET_CHAIN_ID, BaseSpokeChainConfig, IConfigApi, SubmitSwapTxRequest, SubmitSwapTxResponse, GetSubmitSwapTxStatusParams, SubmitSwapTxStatusResponse, GetAllConfigApiResponse, GetChainsApiResponse, GetSwapTokensApiResponse, GetSwapTokensByChainIdApiResponse, GetMoneyMarketReserveAssetsApiResponse, GetMoneyMarketTokensByChainIdApiResponse, GetHubAssetsApiResponse, GetHubAssetsByChainIdApiResponse, GetRelayChainIdMapApiResponse, GetSpokeChainConfigApiResponse, HubAssetInfo, IconEoaAddress, HubChainConfig, BridgeLimit } from '@sodax/types';
|
|
2
2
|
export * from '@sodax/types';
|
|
3
3
|
import * as viem from 'viem';
|
|
4
4
|
import { Hex, Address as Address$1, PublicClient, HttpTransport, WalletClient, CustomTransport, Chain, Account as Account$1, Hash, GetLogsReturnType, TransactionReceipt } from 'viem';
|
|
@@ -9,8 +9,13 @@ import { Transaction as Transaction$1, TransactionResult } from '@mysten/sui/tra
|
|
|
9
9
|
import { JsonRpcProvider } from 'near-api-js';
|
|
10
10
|
import * as bitcoin from 'bitcoinjs-lib';
|
|
11
11
|
import { SorobanRpc, rpc, Transaction, Memo, MemoType, Operation, FeeBumpTransaction, Horizon, Contract, Account, xdr } from '@stellar/stellar-sdk';
|
|
12
|
+
import { StacksNetwork } from '@stacks/network';
|
|
13
|
+
import { ClarityValue } from '@stacks/transactions';
|
|
12
14
|
import { ChainGrpcWasmApi, TxGrpcApi } from '@injectivelabs/sdk-ts';
|
|
13
15
|
import { NetworkEndpoints } from '@injectivelabs/networks';
|
|
16
|
+
import { PoolKey } from '@pancakeswap/infinity-sdk';
|
|
17
|
+
export { CLPositionConfig, EncodedPoolKey, PoolKey, Slot0 } from '@pancakeswap/infinity-sdk';
|
|
18
|
+
import { Price, Token as Token$1 } from '@pancakeswap/swap-sdk-core';
|
|
14
19
|
import BigNumber$1 from 'bignumber.js';
|
|
15
20
|
|
|
16
21
|
declare const assetManagerAbi: readonly [{
|
|
@@ -5435,6 +5440,1615 @@ declare const stakingRouterAbi: readonly [{
|
|
|
5435
5440
|
readonly type: "function";
|
|
5436
5441
|
}];
|
|
5437
5442
|
|
|
5443
|
+
declare const clPoolManagerAbi: readonly [{
|
|
5444
|
+
readonly inputs: readonly [{
|
|
5445
|
+
readonly internalType: "address";
|
|
5446
|
+
readonly name: "tokenA";
|
|
5447
|
+
readonly type: "address";
|
|
5448
|
+
}, {
|
|
5449
|
+
readonly internalType: "address";
|
|
5450
|
+
readonly name: "tokenB";
|
|
5451
|
+
readonly type: "address";
|
|
5452
|
+
}, {
|
|
5453
|
+
readonly internalType: "uint24";
|
|
5454
|
+
readonly name: "fee";
|
|
5455
|
+
readonly type: "uint24";
|
|
5456
|
+
}, {
|
|
5457
|
+
readonly internalType: "int24";
|
|
5458
|
+
readonly name: "tickSpacing";
|
|
5459
|
+
readonly type: "int24";
|
|
5460
|
+
}, {
|
|
5461
|
+
readonly internalType: "uint160";
|
|
5462
|
+
readonly name: "sqrtPriceX96";
|
|
5463
|
+
readonly type: "uint160";
|
|
5464
|
+
}];
|
|
5465
|
+
readonly name: "createPool";
|
|
5466
|
+
readonly outputs: readonly [{
|
|
5467
|
+
readonly internalType: "address";
|
|
5468
|
+
readonly name: "pool";
|
|
5469
|
+
readonly type: "address";
|
|
5470
|
+
}];
|
|
5471
|
+
readonly stateMutability: "nonpayable";
|
|
5472
|
+
readonly type: "function";
|
|
5473
|
+
}, {
|
|
5474
|
+
readonly inputs: readonly [{
|
|
5475
|
+
readonly internalType: "address";
|
|
5476
|
+
readonly name: "tokenA";
|
|
5477
|
+
readonly type: "address";
|
|
5478
|
+
}, {
|
|
5479
|
+
readonly internalType: "address";
|
|
5480
|
+
readonly name: "tokenB";
|
|
5481
|
+
readonly type: "address";
|
|
5482
|
+
}, {
|
|
5483
|
+
readonly internalType: "uint24";
|
|
5484
|
+
readonly name: "fee";
|
|
5485
|
+
readonly type: "uint24";
|
|
5486
|
+
}];
|
|
5487
|
+
readonly name: "getPool";
|
|
5488
|
+
readonly outputs: readonly [{
|
|
5489
|
+
readonly internalType: "address";
|
|
5490
|
+
readonly name: "pool";
|
|
5491
|
+
readonly type: "address";
|
|
5492
|
+
}];
|
|
5493
|
+
readonly stateMutability: "view";
|
|
5494
|
+
readonly type: "function";
|
|
5495
|
+
}, {
|
|
5496
|
+
readonly inputs: readonly [{
|
|
5497
|
+
readonly components: readonly [{
|
|
5498
|
+
readonly internalType: "address";
|
|
5499
|
+
readonly name: "currency0";
|
|
5500
|
+
readonly type: "address";
|
|
5501
|
+
}, {
|
|
5502
|
+
readonly internalType: "address";
|
|
5503
|
+
readonly name: "currency1";
|
|
5504
|
+
readonly type: "address";
|
|
5505
|
+
}, {
|
|
5506
|
+
readonly internalType: "address";
|
|
5507
|
+
readonly name: "hooks";
|
|
5508
|
+
readonly type: "address";
|
|
5509
|
+
}, {
|
|
5510
|
+
readonly internalType: "address";
|
|
5511
|
+
readonly name: "poolManager";
|
|
5512
|
+
readonly type: "address";
|
|
5513
|
+
}, {
|
|
5514
|
+
readonly internalType: "uint24";
|
|
5515
|
+
readonly name: "fee";
|
|
5516
|
+
readonly type: "uint24";
|
|
5517
|
+
}, {
|
|
5518
|
+
readonly internalType: "bytes32";
|
|
5519
|
+
readonly name: "parameters";
|
|
5520
|
+
readonly type: "bytes32";
|
|
5521
|
+
}];
|
|
5522
|
+
readonly internalType: "struct PoolKey";
|
|
5523
|
+
readonly name: "key";
|
|
5524
|
+
readonly type: "tuple";
|
|
5525
|
+
}, {
|
|
5526
|
+
readonly internalType: "uint160";
|
|
5527
|
+
readonly name: "sqrtPriceX96";
|
|
5528
|
+
readonly type: "uint160";
|
|
5529
|
+
}];
|
|
5530
|
+
readonly name: "initialize";
|
|
5531
|
+
readonly outputs: readonly [];
|
|
5532
|
+
readonly stateMutability: "nonpayable";
|
|
5533
|
+
readonly type: "function";
|
|
5534
|
+
}, {
|
|
5535
|
+
readonly inputs: readonly [{
|
|
5536
|
+
readonly internalType: "bytes32";
|
|
5537
|
+
readonly name: "id";
|
|
5538
|
+
readonly type: "bytes32";
|
|
5539
|
+
}];
|
|
5540
|
+
readonly name: "getSlot0";
|
|
5541
|
+
readonly outputs: readonly [{
|
|
5542
|
+
readonly internalType: "uint160";
|
|
5543
|
+
readonly name: "sqrtPriceX96";
|
|
5544
|
+
readonly type: "uint160";
|
|
5545
|
+
}, {
|
|
5546
|
+
readonly internalType: "int24";
|
|
5547
|
+
readonly name: "tick";
|
|
5548
|
+
readonly type: "int24";
|
|
5549
|
+
}, {
|
|
5550
|
+
readonly internalType: "uint24";
|
|
5551
|
+
readonly name: "protocolFee";
|
|
5552
|
+
readonly type: "uint24";
|
|
5553
|
+
}, {
|
|
5554
|
+
readonly internalType: "uint24";
|
|
5555
|
+
readonly name: "lpFee";
|
|
5556
|
+
readonly type: "uint24";
|
|
5557
|
+
}];
|
|
5558
|
+
readonly stateMutability: "view";
|
|
5559
|
+
readonly type: "function";
|
|
5560
|
+
}];
|
|
5561
|
+
declare const clPositionManagerAbi: readonly [{
|
|
5562
|
+
readonly inputs: readonly [{
|
|
5563
|
+
readonly components: readonly [{
|
|
5564
|
+
readonly internalType: "address";
|
|
5565
|
+
readonly name: "token0";
|
|
5566
|
+
readonly type: "address";
|
|
5567
|
+
}, {
|
|
5568
|
+
readonly internalType: "address";
|
|
5569
|
+
readonly name: "token1";
|
|
5570
|
+
readonly type: "address";
|
|
5571
|
+
}, {
|
|
5572
|
+
readonly internalType: "uint24";
|
|
5573
|
+
readonly name: "fee";
|
|
5574
|
+
readonly type: "uint24";
|
|
5575
|
+
}, {
|
|
5576
|
+
readonly internalType: "int24";
|
|
5577
|
+
readonly name: "tickLower";
|
|
5578
|
+
readonly type: "int24";
|
|
5579
|
+
}, {
|
|
5580
|
+
readonly internalType: "int24";
|
|
5581
|
+
readonly name: "tickUpper";
|
|
5582
|
+
readonly type: "int24";
|
|
5583
|
+
}, {
|
|
5584
|
+
readonly internalType: "uint256";
|
|
5585
|
+
readonly name: "amount0Desired";
|
|
5586
|
+
readonly type: "uint256";
|
|
5587
|
+
}, {
|
|
5588
|
+
readonly internalType: "uint256";
|
|
5589
|
+
readonly name: "amount1Desired";
|
|
5590
|
+
readonly type: "uint256";
|
|
5591
|
+
}, {
|
|
5592
|
+
readonly internalType: "uint256";
|
|
5593
|
+
readonly name: "amount0Min";
|
|
5594
|
+
readonly type: "uint256";
|
|
5595
|
+
}, {
|
|
5596
|
+
readonly internalType: "uint256";
|
|
5597
|
+
readonly name: "amount1Min";
|
|
5598
|
+
readonly type: "uint256";
|
|
5599
|
+
}, {
|
|
5600
|
+
readonly internalType: "address";
|
|
5601
|
+
readonly name: "recipient";
|
|
5602
|
+
readonly type: "address";
|
|
5603
|
+
}, {
|
|
5604
|
+
readonly internalType: "uint256";
|
|
5605
|
+
readonly name: "deadline";
|
|
5606
|
+
readonly type: "uint256";
|
|
5607
|
+
}];
|
|
5608
|
+
readonly internalType: "struct INonfungiblePositionManager.MintParams";
|
|
5609
|
+
readonly name: "params";
|
|
5610
|
+
readonly type: "tuple";
|
|
5611
|
+
}];
|
|
5612
|
+
readonly name: "mint";
|
|
5613
|
+
readonly outputs: readonly [{
|
|
5614
|
+
readonly internalType: "uint256";
|
|
5615
|
+
readonly name: "tokenId";
|
|
5616
|
+
readonly type: "uint256";
|
|
5617
|
+
}, {
|
|
5618
|
+
readonly internalType: "uint128";
|
|
5619
|
+
readonly name: "liquidity";
|
|
5620
|
+
readonly type: "uint128";
|
|
5621
|
+
}, {
|
|
5622
|
+
readonly internalType: "uint256";
|
|
5623
|
+
readonly name: "amount0";
|
|
5624
|
+
readonly type: "uint256";
|
|
5625
|
+
}, {
|
|
5626
|
+
readonly internalType: "uint256";
|
|
5627
|
+
readonly name: "amount1";
|
|
5628
|
+
readonly type: "uint256";
|
|
5629
|
+
}];
|
|
5630
|
+
readonly stateMutability: "payable";
|
|
5631
|
+
readonly type: "function";
|
|
5632
|
+
}, {
|
|
5633
|
+
readonly inputs: readonly [{
|
|
5634
|
+
readonly components: readonly [{
|
|
5635
|
+
readonly internalType: "uint256";
|
|
5636
|
+
readonly name: "tokenId";
|
|
5637
|
+
readonly type: "uint256";
|
|
5638
|
+
}, {
|
|
5639
|
+
readonly internalType: "uint128";
|
|
5640
|
+
readonly name: "liquidity";
|
|
5641
|
+
readonly type: "uint128";
|
|
5642
|
+
}, {
|
|
5643
|
+
readonly internalType: "uint256";
|
|
5644
|
+
readonly name: "amount0Min";
|
|
5645
|
+
readonly type: "uint256";
|
|
5646
|
+
}, {
|
|
5647
|
+
readonly internalType: "uint256";
|
|
5648
|
+
readonly name: "amount1Min";
|
|
5649
|
+
readonly type: "uint256";
|
|
5650
|
+
}, {
|
|
5651
|
+
readonly internalType: "uint256";
|
|
5652
|
+
readonly name: "deadline";
|
|
5653
|
+
readonly type: "uint256";
|
|
5654
|
+
}];
|
|
5655
|
+
readonly internalType: "struct INonfungiblePositionManager.DecreaseLiquidityParams";
|
|
5656
|
+
readonly name: "params";
|
|
5657
|
+
readonly type: "tuple";
|
|
5658
|
+
}];
|
|
5659
|
+
readonly name: "decreaseLiquidity";
|
|
5660
|
+
readonly outputs: readonly [{
|
|
5661
|
+
readonly internalType: "uint256";
|
|
5662
|
+
readonly name: "amount0";
|
|
5663
|
+
readonly type: "uint256";
|
|
5664
|
+
}, {
|
|
5665
|
+
readonly internalType: "uint256";
|
|
5666
|
+
readonly name: "amount1";
|
|
5667
|
+
readonly type: "uint256";
|
|
5668
|
+
}];
|
|
5669
|
+
readonly stateMutability: "payable";
|
|
5670
|
+
readonly type: "function";
|
|
5671
|
+
}, {
|
|
5672
|
+
readonly inputs: readonly [{
|
|
5673
|
+
readonly components: readonly [{
|
|
5674
|
+
readonly internalType: "uint256";
|
|
5675
|
+
readonly name: "tokenId";
|
|
5676
|
+
readonly type: "uint256";
|
|
5677
|
+
}, {
|
|
5678
|
+
readonly internalType: "address";
|
|
5679
|
+
readonly name: "recipient";
|
|
5680
|
+
readonly type: "address";
|
|
5681
|
+
}, {
|
|
5682
|
+
readonly internalType: "uint256";
|
|
5683
|
+
readonly name: "amount0Max";
|
|
5684
|
+
readonly type: "uint256";
|
|
5685
|
+
}, {
|
|
5686
|
+
readonly internalType: "uint256";
|
|
5687
|
+
readonly name: "amount1Max";
|
|
5688
|
+
readonly type: "uint256";
|
|
5689
|
+
}];
|
|
5690
|
+
readonly internalType: "struct INonfungiblePositionManager.CollectParams";
|
|
5691
|
+
readonly name: "params";
|
|
5692
|
+
readonly type: "tuple";
|
|
5693
|
+
}];
|
|
5694
|
+
readonly name: "collect";
|
|
5695
|
+
readonly outputs: readonly [{
|
|
5696
|
+
readonly internalType: "uint256";
|
|
5697
|
+
readonly name: "amount0";
|
|
5698
|
+
readonly type: "uint256";
|
|
5699
|
+
}, {
|
|
5700
|
+
readonly internalType: "uint256";
|
|
5701
|
+
readonly name: "amount1";
|
|
5702
|
+
readonly type: "uint256";
|
|
5703
|
+
}];
|
|
5704
|
+
readonly stateMutability: "payable";
|
|
5705
|
+
readonly type: "function";
|
|
5706
|
+
}, {
|
|
5707
|
+
readonly inputs: readonly [{
|
|
5708
|
+
readonly internalType: "uint256";
|
|
5709
|
+
readonly name: "tokenId";
|
|
5710
|
+
readonly type: "uint256";
|
|
5711
|
+
}];
|
|
5712
|
+
readonly name: "positions";
|
|
5713
|
+
readonly outputs: readonly [{
|
|
5714
|
+
readonly internalType: "uint96";
|
|
5715
|
+
readonly name: "nonce";
|
|
5716
|
+
readonly type: "uint96";
|
|
5717
|
+
}, {
|
|
5718
|
+
readonly internalType: "address";
|
|
5719
|
+
readonly name: "operator";
|
|
5720
|
+
readonly type: "address";
|
|
5721
|
+
}, {
|
|
5722
|
+
readonly internalType: "address";
|
|
5723
|
+
readonly name: "token0";
|
|
5724
|
+
readonly type: "address";
|
|
5725
|
+
}, {
|
|
5726
|
+
readonly internalType: "address";
|
|
5727
|
+
readonly name: "token1";
|
|
5728
|
+
readonly type: "address";
|
|
5729
|
+
}, {
|
|
5730
|
+
readonly internalType: "uint24";
|
|
5731
|
+
readonly name: "fee";
|
|
5732
|
+
readonly type: "uint24";
|
|
5733
|
+
}, {
|
|
5734
|
+
readonly internalType: "int24";
|
|
5735
|
+
readonly name: "tickLower";
|
|
5736
|
+
readonly type: "int24";
|
|
5737
|
+
}, {
|
|
5738
|
+
readonly internalType: "int24";
|
|
5739
|
+
readonly name: "tickUpper";
|
|
5740
|
+
readonly type: "int24";
|
|
5741
|
+
}, {
|
|
5742
|
+
readonly internalType: "uint128";
|
|
5743
|
+
readonly name: "liquidity";
|
|
5744
|
+
readonly type: "uint128";
|
|
5745
|
+
}, {
|
|
5746
|
+
readonly internalType: "uint256";
|
|
5747
|
+
readonly name: "feeGrowthInside0LastX128";
|
|
5748
|
+
readonly type: "uint256";
|
|
5749
|
+
}, {
|
|
5750
|
+
readonly internalType: "uint256";
|
|
5751
|
+
readonly name: "feeGrowthInside1LastX128";
|
|
5752
|
+
readonly type: "uint256";
|
|
5753
|
+
}, {
|
|
5754
|
+
readonly internalType: "uint128";
|
|
5755
|
+
readonly name: "tokensOwed0";
|
|
5756
|
+
readonly type: "uint128";
|
|
5757
|
+
}, {
|
|
5758
|
+
readonly internalType: "uint128";
|
|
5759
|
+
readonly name: "tokensOwed1";
|
|
5760
|
+
readonly type: "uint128";
|
|
5761
|
+
}];
|
|
5762
|
+
readonly stateMutability: "view";
|
|
5763
|
+
readonly type: "function";
|
|
5764
|
+
}];
|
|
5765
|
+
declare const clRouterAbi: readonly [{
|
|
5766
|
+
readonly inputs: readonly [{
|
|
5767
|
+
readonly components: readonly [{
|
|
5768
|
+
readonly internalType: "address";
|
|
5769
|
+
readonly name: "tokenIn";
|
|
5770
|
+
readonly type: "address";
|
|
5771
|
+
}, {
|
|
5772
|
+
readonly internalType: "address";
|
|
5773
|
+
readonly name: "tokenOut";
|
|
5774
|
+
readonly type: "address";
|
|
5775
|
+
}, {
|
|
5776
|
+
readonly internalType: "uint24";
|
|
5777
|
+
readonly name: "fee";
|
|
5778
|
+
readonly type: "uint24";
|
|
5779
|
+
}, {
|
|
5780
|
+
readonly internalType: "address";
|
|
5781
|
+
readonly name: "recipient";
|
|
5782
|
+
readonly type: "address";
|
|
5783
|
+
}, {
|
|
5784
|
+
readonly internalType: "uint256";
|
|
5785
|
+
readonly name: "deadline";
|
|
5786
|
+
readonly type: "uint256";
|
|
5787
|
+
}, {
|
|
5788
|
+
readonly internalType: "uint256";
|
|
5789
|
+
readonly name: "amountIn";
|
|
5790
|
+
readonly type: "uint256";
|
|
5791
|
+
}, {
|
|
5792
|
+
readonly internalType: "uint256";
|
|
5793
|
+
readonly name: "amountOutMinimum";
|
|
5794
|
+
readonly type: "uint256";
|
|
5795
|
+
}, {
|
|
5796
|
+
readonly internalType: "uint160";
|
|
5797
|
+
readonly name: "sqrtPriceLimitX96";
|
|
5798
|
+
readonly type: "uint160";
|
|
5799
|
+
}];
|
|
5800
|
+
readonly internalType: "struct ISwapRouter.ExactInputSingleParams";
|
|
5801
|
+
readonly name: "params";
|
|
5802
|
+
readonly type: "tuple";
|
|
5803
|
+
}];
|
|
5804
|
+
readonly name: "exactInputSingle";
|
|
5805
|
+
readonly outputs: readonly [{
|
|
5806
|
+
readonly internalType: "uint256";
|
|
5807
|
+
readonly name: "amountOut";
|
|
5808
|
+
readonly type: "uint256";
|
|
5809
|
+
}];
|
|
5810
|
+
readonly stateMutability: "payable";
|
|
5811
|
+
readonly type: "function";
|
|
5812
|
+
}, {
|
|
5813
|
+
readonly inputs: readonly [{
|
|
5814
|
+
readonly components: readonly [{
|
|
5815
|
+
readonly internalType: "address";
|
|
5816
|
+
readonly name: "tokenIn";
|
|
5817
|
+
readonly type: "address";
|
|
5818
|
+
}, {
|
|
5819
|
+
readonly internalType: "address";
|
|
5820
|
+
readonly name: "tokenOut";
|
|
5821
|
+
readonly type: "address";
|
|
5822
|
+
}, {
|
|
5823
|
+
readonly internalType: "uint24";
|
|
5824
|
+
readonly name: "fee";
|
|
5825
|
+
readonly type: "uint24";
|
|
5826
|
+
}, {
|
|
5827
|
+
readonly internalType: "address";
|
|
5828
|
+
readonly name: "recipient";
|
|
5829
|
+
readonly type: "address";
|
|
5830
|
+
}, {
|
|
5831
|
+
readonly internalType: "uint256";
|
|
5832
|
+
readonly name: "deadline";
|
|
5833
|
+
readonly type: "uint256";
|
|
5834
|
+
}, {
|
|
5835
|
+
readonly internalType: "uint256";
|
|
5836
|
+
readonly name: "amountOut";
|
|
5837
|
+
readonly type: "uint256";
|
|
5838
|
+
}, {
|
|
5839
|
+
readonly internalType: "uint256";
|
|
5840
|
+
readonly name: "amountInMaximum";
|
|
5841
|
+
readonly type: "uint256";
|
|
5842
|
+
}, {
|
|
5843
|
+
readonly internalType: "uint160";
|
|
5844
|
+
readonly name: "sqrtPriceLimitX96";
|
|
5845
|
+
readonly type: "uint160";
|
|
5846
|
+
}];
|
|
5847
|
+
readonly internalType: "struct ISwapRouter.ExactOutputSingleParams";
|
|
5848
|
+
readonly name: "params";
|
|
5849
|
+
readonly type: "tuple";
|
|
5850
|
+
}];
|
|
5851
|
+
readonly name: "exactOutputSingle";
|
|
5852
|
+
readonly outputs: readonly [{
|
|
5853
|
+
readonly internalType: "uint256";
|
|
5854
|
+
readonly name: "amountIn";
|
|
5855
|
+
readonly type: "uint256";
|
|
5856
|
+
}];
|
|
5857
|
+
readonly stateMutability: "payable";
|
|
5858
|
+
readonly type: "function";
|
|
5859
|
+
}];
|
|
5860
|
+
declare const clQuoterAbi: readonly [{
|
|
5861
|
+
readonly inputs: readonly [{
|
|
5862
|
+
readonly internalType: "address";
|
|
5863
|
+
readonly name: "tokenIn";
|
|
5864
|
+
readonly type: "address";
|
|
5865
|
+
}, {
|
|
5866
|
+
readonly internalType: "address";
|
|
5867
|
+
readonly name: "tokenOut";
|
|
5868
|
+
readonly type: "address";
|
|
5869
|
+
}, {
|
|
5870
|
+
readonly internalType: "uint24";
|
|
5871
|
+
readonly name: "fee";
|
|
5872
|
+
readonly type: "uint24";
|
|
5873
|
+
}, {
|
|
5874
|
+
readonly internalType: "uint256";
|
|
5875
|
+
readonly name: "amountIn";
|
|
5876
|
+
readonly type: "uint256";
|
|
5877
|
+
}, {
|
|
5878
|
+
readonly internalType: "uint160";
|
|
5879
|
+
readonly name: "sqrtPriceLimitX96";
|
|
5880
|
+
readonly type: "uint160";
|
|
5881
|
+
}];
|
|
5882
|
+
readonly name: "quoteExactInputSingle";
|
|
5883
|
+
readonly outputs: readonly [{
|
|
5884
|
+
readonly internalType: "uint256";
|
|
5885
|
+
readonly name: "amountOut";
|
|
5886
|
+
readonly type: "uint256";
|
|
5887
|
+
}];
|
|
5888
|
+
readonly stateMutability: "nonpayable";
|
|
5889
|
+
readonly type: "function";
|
|
5890
|
+
}, {
|
|
5891
|
+
readonly inputs: readonly [{
|
|
5892
|
+
readonly internalType: "address";
|
|
5893
|
+
readonly name: "tokenIn";
|
|
5894
|
+
readonly type: "address";
|
|
5895
|
+
}, {
|
|
5896
|
+
readonly internalType: "address";
|
|
5897
|
+
readonly name: "tokenOut";
|
|
5898
|
+
readonly type: "address";
|
|
5899
|
+
}, {
|
|
5900
|
+
readonly internalType: "uint24";
|
|
5901
|
+
readonly name: "fee";
|
|
5902
|
+
readonly type: "uint24";
|
|
5903
|
+
}, {
|
|
5904
|
+
readonly internalType: "uint256";
|
|
5905
|
+
readonly name: "amountOut";
|
|
5906
|
+
readonly type: "uint256";
|
|
5907
|
+
}, {
|
|
5908
|
+
readonly internalType: "uint160";
|
|
5909
|
+
readonly name: "sqrtPriceLimitX96";
|
|
5910
|
+
readonly type: "uint160";
|
|
5911
|
+
}];
|
|
5912
|
+
readonly name: "quoteExactOutputSingle";
|
|
5913
|
+
readonly outputs: readonly [{
|
|
5914
|
+
readonly internalType: "uint256";
|
|
5915
|
+
readonly name: "amountIn";
|
|
5916
|
+
readonly type: "uint256";
|
|
5917
|
+
}];
|
|
5918
|
+
readonly stateMutability: "nonpayable";
|
|
5919
|
+
readonly type: "function";
|
|
5920
|
+
}];
|
|
5921
|
+
declare const clTickLensAbi: readonly [{
|
|
5922
|
+
readonly inputs: readonly [{
|
|
5923
|
+
readonly internalType: "address";
|
|
5924
|
+
readonly name: "pool";
|
|
5925
|
+
readonly type: "address";
|
|
5926
|
+
}, {
|
|
5927
|
+
readonly internalType: "int16";
|
|
5928
|
+
readonly name: "tickBitmapIndex";
|
|
5929
|
+
readonly type: "int16";
|
|
5930
|
+
}];
|
|
5931
|
+
readonly name: "getPopulatedTicksInWord";
|
|
5932
|
+
readonly outputs: readonly [{
|
|
5933
|
+
readonly components: readonly [{
|
|
5934
|
+
readonly internalType: "int24";
|
|
5935
|
+
readonly name: "tick";
|
|
5936
|
+
readonly type: "int24";
|
|
5937
|
+
}, {
|
|
5938
|
+
readonly internalType: "int128";
|
|
5939
|
+
readonly name: "liquidityGross";
|
|
5940
|
+
readonly type: "int128";
|
|
5941
|
+
}, {
|
|
5942
|
+
readonly internalType: "int128";
|
|
5943
|
+
readonly name: "liquidityNet";
|
|
5944
|
+
readonly type: "int128";
|
|
5945
|
+
}, {
|
|
5946
|
+
readonly internalType: "uint256";
|
|
5947
|
+
readonly name: "feeGrowthOutside0X128";
|
|
5948
|
+
readonly type: "uint256";
|
|
5949
|
+
}, {
|
|
5950
|
+
readonly internalType: "uint256";
|
|
5951
|
+
readonly name: "feeGrowthOutside1X128";
|
|
5952
|
+
readonly type: "uint256";
|
|
5953
|
+
}, {
|
|
5954
|
+
readonly internalType: "int56";
|
|
5955
|
+
readonly name: "tickCumulativeOutside";
|
|
5956
|
+
readonly type: "int56";
|
|
5957
|
+
}, {
|
|
5958
|
+
readonly internalType: "uint160";
|
|
5959
|
+
readonly name: "secondsPerLiquidityOutsideX128";
|
|
5960
|
+
readonly type: "uint160";
|
|
5961
|
+
}, {
|
|
5962
|
+
readonly internalType: "uint32";
|
|
5963
|
+
readonly name: "secondsOutside";
|
|
5964
|
+
readonly type: "uint32";
|
|
5965
|
+
}, {
|
|
5966
|
+
readonly internalType: "bool";
|
|
5967
|
+
readonly name: "initialized";
|
|
5968
|
+
readonly type: "bool";
|
|
5969
|
+
}];
|
|
5970
|
+
readonly internalType: "struct ITickLens.PopulatedTick[]";
|
|
5971
|
+
readonly name: "populatedTicks";
|
|
5972
|
+
readonly type: "tuple[]";
|
|
5973
|
+
}];
|
|
5974
|
+
readonly stateMutability: "view";
|
|
5975
|
+
readonly type: "function";
|
|
5976
|
+
}];
|
|
5977
|
+
declare const clPoolAbi: readonly [{
|
|
5978
|
+
readonly inputs: readonly [];
|
|
5979
|
+
readonly name: "slot0";
|
|
5980
|
+
readonly outputs: readonly [{
|
|
5981
|
+
readonly internalType: "uint160";
|
|
5982
|
+
readonly name: "sqrtPriceX96";
|
|
5983
|
+
readonly type: "uint160";
|
|
5984
|
+
}, {
|
|
5985
|
+
readonly internalType: "int24";
|
|
5986
|
+
readonly name: "tick";
|
|
5987
|
+
readonly type: "int24";
|
|
5988
|
+
}, {
|
|
5989
|
+
readonly internalType: "uint16";
|
|
5990
|
+
readonly name: "observationIndex";
|
|
5991
|
+
readonly type: "uint16";
|
|
5992
|
+
}, {
|
|
5993
|
+
readonly internalType: "uint16";
|
|
5994
|
+
readonly name: "observationCardinality";
|
|
5995
|
+
readonly type: "uint16";
|
|
5996
|
+
}, {
|
|
5997
|
+
readonly internalType: "uint16";
|
|
5998
|
+
readonly name: "observationCardinalityNext";
|
|
5999
|
+
readonly type: "uint16";
|
|
6000
|
+
}, {
|
|
6001
|
+
readonly internalType: "uint8";
|
|
6002
|
+
readonly name: "feeProtocol";
|
|
6003
|
+
readonly type: "uint8";
|
|
6004
|
+
}, {
|
|
6005
|
+
readonly internalType: "bool";
|
|
6006
|
+
readonly name: "unlocked";
|
|
6007
|
+
readonly type: "bool";
|
|
6008
|
+
}];
|
|
6009
|
+
readonly stateMutability: "view";
|
|
6010
|
+
readonly type: "function";
|
|
6011
|
+
}, {
|
|
6012
|
+
readonly inputs: readonly [];
|
|
6013
|
+
readonly name: "liquidity";
|
|
6014
|
+
readonly outputs: readonly [{
|
|
6015
|
+
readonly internalType: "uint128";
|
|
6016
|
+
readonly name: "";
|
|
6017
|
+
readonly type: "uint128";
|
|
6018
|
+
}];
|
|
6019
|
+
readonly stateMutability: "view";
|
|
6020
|
+
readonly type: "function";
|
|
6021
|
+
}];
|
|
6022
|
+
declare const defaultHookAbi: readonly [{
|
|
6023
|
+
readonly inputs: readonly [];
|
|
6024
|
+
readonly name: "getHooksRegistrationBitmap";
|
|
6025
|
+
readonly outputs: readonly [{
|
|
6026
|
+
readonly internalType: "uint256";
|
|
6027
|
+
readonly name: "";
|
|
6028
|
+
readonly type: "uint256";
|
|
6029
|
+
}];
|
|
6030
|
+
readonly stateMutability: "view";
|
|
6031
|
+
readonly type: "function";
|
|
6032
|
+
}];
|
|
6033
|
+
|
|
6034
|
+
/**
|
|
6035
|
+
* PoolKey structure ABI definition
|
|
6036
|
+
*/
|
|
6037
|
+
declare const poolKeyAbi: readonly [{
|
|
6038
|
+
readonly type: "address";
|
|
6039
|
+
readonly name: "currency0";
|
|
6040
|
+
}, {
|
|
6041
|
+
readonly type: "address";
|
|
6042
|
+
readonly name: "currency1";
|
|
6043
|
+
}, {
|
|
6044
|
+
readonly type: "address";
|
|
6045
|
+
readonly name: "hooks";
|
|
6046
|
+
}, {
|
|
6047
|
+
readonly type: "address";
|
|
6048
|
+
readonly name: "poolManager";
|
|
6049
|
+
}, {
|
|
6050
|
+
readonly type: "uint24";
|
|
6051
|
+
readonly name: "fee";
|
|
6052
|
+
}, {
|
|
6053
|
+
readonly type: "bytes32";
|
|
6054
|
+
readonly name: "parameters";
|
|
6055
|
+
}];
|
|
6056
|
+
/**
|
|
6057
|
+
* Swap exact input single parameters ABI definition
|
|
6058
|
+
*/
|
|
6059
|
+
declare const swapExactInSingleParamsAbi: readonly [{
|
|
6060
|
+
readonly type: "tuple";
|
|
6061
|
+
readonly name: "params";
|
|
6062
|
+
readonly components: readonly [{
|
|
6063
|
+
readonly type: "tuple";
|
|
6064
|
+
readonly name: "poolKey";
|
|
6065
|
+
readonly components: readonly [{
|
|
6066
|
+
readonly type: "address";
|
|
6067
|
+
readonly name: "currency0";
|
|
6068
|
+
}, {
|
|
6069
|
+
readonly type: "address";
|
|
6070
|
+
readonly name: "currency1";
|
|
6071
|
+
}, {
|
|
6072
|
+
readonly type: "address";
|
|
6073
|
+
readonly name: "hooks";
|
|
6074
|
+
}, {
|
|
6075
|
+
readonly type: "address";
|
|
6076
|
+
readonly name: "poolManager";
|
|
6077
|
+
}, {
|
|
6078
|
+
readonly type: "uint24";
|
|
6079
|
+
readonly name: "fee";
|
|
6080
|
+
}, {
|
|
6081
|
+
readonly type: "bytes32";
|
|
6082
|
+
readonly name: "parameters";
|
|
6083
|
+
}];
|
|
6084
|
+
}, {
|
|
6085
|
+
readonly type: "bool";
|
|
6086
|
+
readonly name: "zeroForOne";
|
|
6087
|
+
}, {
|
|
6088
|
+
readonly type: "uint128";
|
|
6089
|
+
readonly name: "amountIn";
|
|
6090
|
+
}, {
|
|
6091
|
+
readonly type: "uint128";
|
|
6092
|
+
readonly name: "amountOutMinimum";
|
|
6093
|
+
}, {
|
|
6094
|
+
readonly type: "bytes";
|
|
6095
|
+
readonly name: "hookData";
|
|
6096
|
+
}];
|
|
6097
|
+
}];
|
|
6098
|
+
/**
|
|
6099
|
+
* Mint position parameters ABI definition
|
|
6100
|
+
*/
|
|
6101
|
+
declare const mintPositionParamsAbi: readonly [{
|
|
6102
|
+
readonly type: "tuple";
|
|
6103
|
+
readonly name: "poolKey";
|
|
6104
|
+
readonly components: readonly [{
|
|
6105
|
+
readonly type: "address";
|
|
6106
|
+
readonly name: "currency0";
|
|
6107
|
+
}, {
|
|
6108
|
+
readonly type: "address";
|
|
6109
|
+
readonly name: "currency1";
|
|
6110
|
+
}, {
|
|
6111
|
+
readonly type: "address";
|
|
6112
|
+
readonly name: "hooks";
|
|
6113
|
+
}, {
|
|
6114
|
+
readonly type: "address";
|
|
6115
|
+
readonly name: "poolManager";
|
|
6116
|
+
}, {
|
|
6117
|
+
readonly type: "uint24";
|
|
6118
|
+
readonly name: "fee";
|
|
6119
|
+
}, {
|
|
6120
|
+
readonly type: "bytes32";
|
|
6121
|
+
readonly name: "parameters";
|
|
6122
|
+
}];
|
|
6123
|
+
}, {
|
|
6124
|
+
readonly type: "int24";
|
|
6125
|
+
readonly name: "tickLower";
|
|
6126
|
+
}, {
|
|
6127
|
+
readonly type: "int24";
|
|
6128
|
+
readonly name: "tickUpper";
|
|
6129
|
+
}, {
|
|
6130
|
+
readonly type: "uint128";
|
|
6131
|
+
readonly name: "liquidity";
|
|
6132
|
+
}, {
|
|
6133
|
+
readonly type: "uint256";
|
|
6134
|
+
readonly name: "amount0";
|
|
6135
|
+
}, {
|
|
6136
|
+
readonly type: "uint256";
|
|
6137
|
+
readonly name: "amount1";
|
|
6138
|
+
}, {
|
|
6139
|
+
readonly type: "address";
|
|
6140
|
+
readonly name: "recipient";
|
|
6141
|
+
}, {
|
|
6142
|
+
readonly type: "bytes";
|
|
6143
|
+
readonly name: "hookData";
|
|
6144
|
+
}];
|
|
6145
|
+
/**
|
|
6146
|
+
* Modify liquidity parameters ABI definition (for increase/decrease liquidity)
|
|
6147
|
+
* Based on: (uint256 tokenId, uint256 liquidity, uint128 amount0Max, uint128 amount1Max, bytes hookData)
|
|
6148
|
+
*/
|
|
6149
|
+
declare const modifyLiquidityParamsAbi: readonly [{
|
|
6150
|
+
readonly type: "uint256";
|
|
6151
|
+
readonly name: "tokenId";
|
|
6152
|
+
}, {
|
|
6153
|
+
readonly type: "uint256";
|
|
6154
|
+
readonly name: "liquidity";
|
|
6155
|
+
}, {
|
|
6156
|
+
readonly type: "uint128";
|
|
6157
|
+
readonly name: "amount0Max";
|
|
6158
|
+
}, {
|
|
6159
|
+
readonly type: "uint128";
|
|
6160
|
+
readonly name: "amount1Max";
|
|
6161
|
+
}, {
|
|
6162
|
+
readonly type: "bytes";
|
|
6163
|
+
readonly name: "hookData";
|
|
6164
|
+
}];
|
|
6165
|
+
|
|
6166
|
+
declare const erc4626Abi: readonly [{
|
|
6167
|
+
readonly type: "function";
|
|
6168
|
+
readonly name: "asset";
|
|
6169
|
+
readonly inputs: readonly [];
|
|
6170
|
+
readonly outputs: readonly [{
|
|
6171
|
+
readonly name: "";
|
|
6172
|
+
readonly type: "address";
|
|
6173
|
+
readonly internalType: "address";
|
|
6174
|
+
}];
|
|
6175
|
+
readonly stateMutability: "view";
|
|
6176
|
+
}, {
|
|
6177
|
+
readonly type: "function";
|
|
6178
|
+
readonly name: "totalAssets";
|
|
6179
|
+
readonly inputs: readonly [];
|
|
6180
|
+
readonly outputs: readonly [{
|
|
6181
|
+
readonly name: "";
|
|
6182
|
+
readonly type: "uint256";
|
|
6183
|
+
readonly internalType: "uint256";
|
|
6184
|
+
}];
|
|
6185
|
+
readonly stateMutability: "view";
|
|
6186
|
+
}, {
|
|
6187
|
+
readonly type: "function";
|
|
6188
|
+
readonly name: "convertToShares";
|
|
6189
|
+
readonly inputs: readonly [{
|
|
6190
|
+
readonly name: "assets";
|
|
6191
|
+
readonly type: "uint256";
|
|
6192
|
+
readonly internalType: "uint256";
|
|
6193
|
+
}];
|
|
6194
|
+
readonly outputs: readonly [{
|
|
6195
|
+
readonly name: "";
|
|
6196
|
+
readonly type: "uint256";
|
|
6197
|
+
readonly internalType: "uint256";
|
|
6198
|
+
}];
|
|
6199
|
+
readonly stateMutability: "view";
|
|
6200
|
+
}, {
|
|
6201
|
+
readonly type: "function";
|
|
6202
|
+
readonly name: "convertToAssets";
|
|
6203
|
+
readonly inputs: readonly [{
|
|
6204
|
+
readonly name: "shares";
|
|
6205
|
+
readonly type: "uint256";
|
|
6206
|
+
readonly internalType: "uint256";
|
|
6207
|
+
}];
|
|
6208
|
+
readonly outputs: readonly [{
|
|
6209
|
+
readonly name: "";
|
|
6210
|
+
readonly type: "uint256";
|
|
6211
|
+
readonly internalType: "uint256";
|
|
6212
|
+
}];
|
|
6213
|
+
readonly stateMutability: "view";
|
|
6214
|
+
}, {
|
|
6215
|
+
readonly type: "function";
|
|
6216
|
+
readonly name: "maxDeposit";
|
|
6217
|
+
readonly inputs: readonly [{
|
|
6218
|
+
readonly name: "receiver";
|
|
6219
|
+
readonly type: "address";
|
|
6220
|
+
readonly internalType: "address";
|
|
6221
|
+
}];
|
|
6222
|
+
readonly outputs: readonly [{
|
|
6223
|
+
readonly name: "";
|
|
6224
|
+
readonly type: "uint256";
|
|
6225
|
+
readonly internalType: "uint256";
|
|
6226
|
+
}];
|
|
6227
|
+
readonly stateMutability: "view";
|
|
6228
|
+
}, {
|
|
6229
|
+
readonly type: "function";
|
|
6230
|
+
readonly name: "previewDeposit";
|
|
6231
|
+
readonly inputs: readonly [{
|
|
6232
|
+
readonly name: "assets";
|
|
6233
|
+
readonly type: "uint256";
|
|
6234
|
+
readonly internalType: "uint256";
|
|
6235
|
+
}];
|
|
6236
|
+
readonly outputs: readonly [{
|
|
6237
|
+
readonly name: "";
|
|
6238
|
+
readonly type: "uint256";
|
|
6239
|
+
readonly internalType: "uint256";
|
|
6240
|
+
}];
|
|
6241
|
+
readonly stateMutability: "view";
|
|
6242
|
+
}, {
|
|
6243
|
+
readonly type: "function";
|
|
6244
|
+
readonly name: "deposit";
|
|
6245
|
+
readonly inputs: readonly [{
|
|
6246
|
+
readonly name: "assets";
|
|
6247
|
+
readonly type: "uint256";
|
|
6248
|
+
readonly internalType: "uint256";
|
|
6249
|
+
}, {
|
|
6250
|
+
readonly name: "receiver";
|
|
6251
|
+
readonly type: "address";
|
|
6252
|
+
readonly internalType: "address";
|
|
6253
|
+
}];
|
|
6254
|
+
readonly outputs: readonly [{
|
|
6255
|
+
readonly name: "";
|
|
6256
|
+
readonly type: "uint256";
|
|
6257
|
+
readonly internalType: "uint256";
|
|
6258
|
+
}];
|
|
6259
|
+
readonly stateMutability: "nonpayable";
|
|
6260
|
+
}, {
|
|
6261
|
+
readonly type: "function";
|
|
6262
|
+
readonly name: "maxMint";
|
|
6263
|
+
readonly inputs: readonly [{
|
|
6264
|
+
readonly name: "receiver";
|
|
6265
|
+
readonly type: "address";
|
|
6266
|
+
readonly internalType: "address";
|
|
6267
|
+
}];
|
|
6268
|
+
readonly outputs: readonly [{
|
|
6269
|
+
readonly name: "";
|
|
6270
|
+
readonly type: "uint256";
|
|
6271
|
+
readonly internalType: "uint256";
|
|
6272
|
+
}];
|
|
6273
|
+
readonly stateMutability: "view";
|
|
6274
|
+
}, {
|
|
6275
|
+
readonly type: "function";
|
|
6276
|
+
readonly name: "previewMint";
|
|
6277
|
+
readonly inputs: readonly [{
|
|
6278
|
+
readonly name: "shares";
|
|
6279
|
+
readonly type: "uint256";
|
|
6280
|
+
readonly internalType: "uint256";
|
|
6281
|
+
}];
|
|
6282
|
+
readonly outputs: readonly [{
|
|
6283
|
+
readonly name: "";
|
|
6284
|
+
readonly type: "uint256";
|
|
6285
|
+
readonly internalType: "uint256";
|
|
6286
|
+
}];
|
|
6287
|
+
readonly stateMutability: "view";
|
|
6288
|
+
}, {
|
|
6289
|
+
readonly type: "function";
|
|
6290
|
+
readonly name: "mint";
|
|
6291
|
+
readonly inputs: readonly [{
|
|
6292
|
+
readonly name: "shares";
|
|
6293
|
+
readonly type: "uint256";
|
|
6294
|
+
readonly internalType: "uint256";
|
|
6295
|
+
}, {
|
|
6296
|
+
readonly name: "receiver";
|
|
6297
|
+
readonly type: "address";
|
|
6298
|
+
readonly internalType: "address";
|
|
6299
|
+
}];
|
|
6300
|
+
readonly outputs: readonly [{
|
|
6301
|
+
readonly name: "";
|
|
6302
|
+
readonly type: "uint256";
|
|
6303
|
+
readonly internalType: "uint256";
|
|
6304
|
+
}];
|
|
6305
|
+
readonly stateMutability: "nonpayable";
|
|
6306
|
+
}, {
|
|
6307
|
+
readonly type: "function";
|
|
6308
|
+
readonly name: "maxWithdraw";
|
|
6309
|
+
readonly inputs: readonly [{
|
|
6310
|
+
readonly name: "owner";
|
|
6311
|
+
readonly type: "address";
|
|
6312
|
+
readonly internalType: "address";
|
|
6313
|
+
}];
|
|
6314
|
+
readonly outputs: readonly [{
|
|
6315
|
+
readonly name: "";
|
|
6316
|
+
readonly type: "uint256";
|
|
6317
|
+
readonly internalType: "uint256";
|
|
6318
|
+
}];
|
|
6319
|
+
readonly stateMutability: "view";
|
|
6320
|
+
}, {
|
|
6321
|
+
readonly type: "function";
|
|
6322
|
+
readonly name: "previewWithdraw";
|
|
6323
|
+
readonly inputs: readonly [{
|
|
6324
|
+
readonly name: "assets";
|
|
6325
|
+
readonly type: "uint256";
|
|
6326
|
+
readonly internalType: "uint256";
|
|
6327
|
+
}];
|
|
6328
|
+
readonly outputs: readonly [{
|
|
6329
|
+
readonly name: "";
|
|
6330
|
+
readonly type: "uint256";
|
|
6331
|
+
readonly internalType: "uint256";
|
|
6332
|
+
}];
|
|
6333
|
+
readonly stateMutability: "view";
|
|
6334
|
+
}, {
|
|
6335
|
+
readonly type: "function";
|
|
6336
|
+
readonly name: "withdraw";
|
|
6337
|
+
readonly inputs: readonly [{
|
|
6338
|
+
readonly name: "assets";
|
|
6339
|
+
readonly type: "uint256";
|
|
6340
|
+
readonly internalType: "uint256";
|
|
6341
|
+
}, {
|
|
6342
|
+
readonly name: "receiver";
|
|
6343
|
+
readonly type: "address";
|
|
6344
|
+
readonly internalType: "address";
|
|
6345
|
+
}, {
|
|
6346
|
+
readonly name: "owner";
|
|
6347
|
+
readonly type: "address";
|
|
6348
|
+
readonly internalType: "address";
|
|
6349
|
+
}];
|
|
6350
|
+
readonly outputs: readonly [{
|
|
6351
|
+
readonly name: "";
|
|
6352
|
+
readonly type: "uint256";
|
|
6353
|
+
readonly internalType: "uint256";
|
|
6354
|
+
}];
|
|
6355
|
+
readonly stateMutability: "nonpayable";
|
|
6356
|
+
}, {
|
|
6357
|
+
readonly type: "function";
|
|
6358
|
+
readonly name: "maxRedeem";
|
|
6359
|
+
readonly inputs: readonly [{
|
|
6360
|
+
readonly name: "owner";
|
|
6361
|
+
readonly type: "address";
|
|
6362
|
+
readonly internalType: "address";
|
|
6363
|
+
}];
|
|
6364
|
+
readonly outputs: readonly [{
|
|
6365
|
+
readonly name: "";
|
|
6366
|
+
readonly type: "uint256";
|
|
6367
|
+
readonly internalType: "uint256";
|
|
6368
|
+
}];
|
|
6369
|
+
readonly stateMutability: "view";
|
|
6370
|
+
}, {
|
|
6371
|
+
readonly type: "function";
|
|
6372
|
+
readonly name: "previewRedeem";
|
|
6373
|
+
readonly inputs: readonly [{
|
|
6374
|
+
readonly name: "shares";
|
|
6375
|
+
readonly type: "uint256";
|
|
6376
|
+
readonly internalType: "uint256";
|
|
6377
|
+
}];
|
|
6378
|
+
readonly outputs: readonly [{
|
|
6379
|
+
readonly name: "";
|
|
6380
|
+
readonly type: "uint256";
|
|
6381
|
+
readonly internalType: "uint256";
|
|
6382
|
+
}];
|
|
6383
|
+
readonly stateMutability: "view";
|
|
6384
|
+
}, {
|
|
6385
|
+
readonly type: "function";
|
|
6386
|
+
readonly name: "redeem";
|
|
6387
|
+
readonly inputs: readonly [{
|
|
6388
|
+
readonly name: "shares";
|
|
6389
|
+
readonly type: "uint256";
|
|
6390
|
+
readonly internalType: "uint256";
|
|
6391
|
+
}, {
|
|
6392
|
+
readonly name: "receiver";
|
|
6393
|
+
readonly type: "address";
|
|
6394
|
+
readonly internalType: "address";
|
|
6395
|
+
}, {
|
|
6396
|
+
readonly name: "owner";
|
|
6397
|
+
readonly type: "address";
|
|
6398
|
+
readonly internalType: "address";
|
|
6399
|
+
}];
|
|
6400
|
+
readonly outputs: readonly [{
|
|
6401
|
+
readonly name: "";
|
|
6402
|
+
readonly type: "uint256";
|
|
6403
|
+
readonly internalType: "uint256";
|
|
6404
|
+
}];
|
|
6405
|
+
readonly stateMutability: "nonpayable";
|
|
6406
|
+
}, {
|
|
6407
|
+
readonly type: "event";
|
|
6408
|
+
readonly name: "Deposit";
|
|
6409
|
+
readonly inputs: readonly [{
|
|
6410
|
+
readonly name: "sender";
|
|
6411
|
+
readonly type: "address";
|
|
6412
|
+
readonly indexed: true;
|
|
6413
|
+
readonly internalType: "address";
|
|
6414
|
+
}, {
|
|
6415
|
+
readonly name: "owner";
|
|
6416
|
+
readonly type: "address";
|
|
6417
|
+
readonly indexed: true;
|
|
6418
|
+
readonly internalType: "address";
|
|
6419
|
+
}, {
|
|
6420
|
+
readonly name: "assets";
|
|
6421
|
+
readonly type: "uint256";
|
|
6422
|
+
readonly indexed: false;
|
|
6423
|
+
readonly internalType: "uint256";
|
|
6424
|
+
}, {
|
|
6425
|
+
readonly name: "shares";
|
|
6426
|
+
readonly type: "uint256";
|
|
6427
|
+
readonly indexed: false;
|
|
6428
|
+
readonly internalType: "uint256";
|
|
6429
|
+
}];
|
|
6430
|
+
readonly anonymous: false;
|
|
6431
|
+
}, {
|
|
6432
|
+
readonly type: "event";
|
|
6433
|
+
readonly name: "Withdraw";
|
|
6434
|
+
readonly inputs: readonly [{
|
|
6435
|
+
readonly name: "sender";
|
|
6436
|
+
readonly type: "address";
|
|
6437
|
+
readonly indexed: true;
|
|
6438
|
+
readonly internalType: "address";
|
|
6439
|
+
}, {
|
|
6440
|
+
readonly name: "receiver";
|
|
6441
|
+
readonly type: "address";
|
|
6442
|
+
readonly indexed: true;
|
|
6443
|
+
readonly internalType: "address";
|
|
6444
|
+
}, {
|
|
6445
|
+
readonly name: "owner";
|
|
6446
|
+
readonly type: "address";
|
|
6447
|
+
readonly indexed: true;
|
|
6448
|
+
readonly internalType: "address";
|
|
6449
|
+
}, {
|
|
6450
|
+
readonly name: "assets";
|
|
6451
|
+
readonly type: "uint256";
|
|
6452
|
+
readonly indexed: false;
|
|
6453
|
+
readonly internalType: "uint256";
|
|
6454
|
+
}, {
|
|
6455
|
+
readonly name: "shares";
|
|
6456
|
+
readonly type: "uint256";
|
|
6457
|
+
readonly indexed: false;
|
|
6458
|
+
readonly internalType: "uint256";
|
|
6459
|
+
}];
|
|
6460
|
+
readonly anonymous: false;
|
|
6461
|
+
}];
|
|
6462
|
+
|
|
6463
|
+
declare const pancakeSwapInfinityPositionManagerAbi: readonly [{
|
|
6464
|
+
readonly inputs: readonly [{
|
|
6465
|
+
readonly internalType: "bytes";
|
|
6466
|
+
readonly name: "payload";
|
|
6467
|
+
readonly type: "bytes";
|
|
6468
|
+
}, {
|
|
6469
|
+
readonly internalType: "uint256";
|
|
6470
|
+
readonly name: "deadline";
|
|
6471
|
+
readonly type: "uint256";
|
|
6472
|
+
}];
|
|
6473
|
+
readonly name: "modifyLiquidities";
|
|
6474
|
+
readonly outputs: readonly [];
|
|
6475
|
+
readonly stateMutability: "payable";
|
|
6476
|
+
readonly type: "function";
|
|
6477
|
+
}, {
|
|
6478
|
+
readonly inputs: readonly [{
|
|
6479
|
+
readonly internalType: "bytes";
|
|
6480
|
+
readonly name: "actions";
|
|
6481
|
+
readonly type: "bytes";
|
|
6482
|
+
}, {
|
|
6483
|
+
readonly internalType: "bytes[]";
|
|
6484
|
+
readonly name: "params";
|
|
6485
|
+
readonly type: "bytes[]";
|
|
6486
|
+
}];
|
|
6487
|
+
readonly name: "modifyLiquiditiesWithoutLock";
|
|
6488
|
+
readonly outputs: readonly [];
|
|
6489
|
+
readonly stateMutability: "payable";
|
|
6490
|
+
readonly type: "function";
|
|
6491
|
+
}, {
|
|
6492
|
+
readonly inputs: readonly [{
|
|
6493
|
+
readonly internalType: "uint256";
|
|
6494
|
+
readonly name: "tokenId";
|
|
6495
|
+
readonly type: "uint256";
|
|
6496
|
+
}];
|
|
6497
|
+
readonly name: "positions";
|
|
6498
|
+
readonly outputs: readonly [{
|
|
6499
|
+
readonly components: readonly [{
|
|
6500
|
+
readonly internalType: "address";
|
|
6501
|
+
readonly name: "currency0";
|
|
6502
|
+
readonly type: "address";
|
|
6503
|
+
}, {
|
|
6504
|
+
readonly internalType: "address";
|
|
6505
|
+
readonly name: "currency1";
|
|
6506
|
+
readonly type: "address";
|
|
6507
|
+
}, {
|
|
6508
|
+
readonly internalType: "address";
|
|
6509
|
+
readonly name: "hooks";
|
|
6510
|
+
readonly type: "address";
|
|
6511
|
+
}, {
|
|
6512
|
+
readonly internalType: "address";
|
|
6513
|
+
readonly name: "poolManager";
|
|
6514
|
+
readonly type: "address";
|
|
6515
|
+
}, {
|
|
6516
|
+
readonly internalType: "uint24";
|
|
6517
|
+
readonly name: "fee";
|
|
6518
|
+
readonly type: "uint24";
|
|
6519
|
+
}, {
|
|
6520
|
+
readonly internalType: "bytes32";
|
|
6521
|
+
readonly name: "parameters";
|
|
6522
|
+
readonly type: "bytes32";
|
|
6523
|
+
}];
|
|
6524
|
+
readonly internalType: "struct PoolKey";
|
|
6525
|
+
readonly name: "poolKey";
|
|
6526
|
+
readonly type: "tuple";
|
|
6527
|
+
}, {
|
|
6528
|
+
readonly internalType: "int24";
|
|
6529
|
+
readonly name: "tickLower";
|
|
6530
|
+
readonly type: "int24";
|
|
6531
|
+
}, {
|
|
6532
|
+
readonly internalType: "int24";
|
|
6533
|
+
readonly name: "tickUpper";
|
|
6534
|
+
readonly type: "int24";
|
|
6535
|
+
}, {
|
|
6536
|
+
readonly internalType: "uint128";
|
|
6537
|
+
readonly name: "liquidity";
|
|
6538
|
+
readonly type: "uint128";
|
|
6539
|
+
}, {
|
|
6540
|
+
readonly internalType: "uint256";
|
|
6541
|
+
readonly name: "feeGrowthInside0LastX128";
|
|
6542
|
+
readonly type: "uint256";
|
|
6543
|
+
}, {
|
|
6544
|
+
readonly internalType: "uint256";
|
|
6545
|
+
readonly name: "feeGrowthInside1LastX128";
|
|
6546
|
+
readonly type: "uint256";
|
|
6547
|
+
}, {
|
|
6548
|
+
readonly internalType: "address";
|
|
6549
|
+
readonly name: "_subscriber";
|
|
6550
|
+
readonly type: "address";
|
|
6551
|
+
}];
|
|
6552
|
+
readonly stateMutability: "view";
|
|
6553
|
+
readonly type: "function";
|
|
6554
|
+
}, {
|
|
6555
|
+
readonly inputs: readonly [{
|
|
6556
|
+
readonly internalType: "uint256";
|
|
6557
|
+
readonly name: "tokenId";
|
|
6558
|
+
readonly type: "uint256";
|
|
6559
|
+
}, {
|
|
6560
|
+
readonly internalType: "address";
|
|
6561
|
+
readonly name: "recipient";
|
|
6562
|
+
readonly type: "address";
|
|
6563
|
+
}, {
|
|
6564
|
+
readonly internalType: "uint128";
|
|
6565
|
+
readonly name: "amount0Max";
|
|
6566
|
+
readonly type: "uint128";
|
|
6567
|
+
}, {
|
|
6568
|
+
readonly internalType: "uint128";
|
|
6569
|
+
readonly name: "amount1Max";
|
|
6570
|
+
readonly type: "uint128";
|
|
6571
|
+
}];
|
|
6572
|
+
readonly name: "collect";
|
|
6573
|
+
readonly outputs: readonly [{
|
|
6574
|
+
readonly internalType: "uint256";
|
|
6575
|
+
readonly name: "amount0";
|
|
6576
|
+
readonly type: "uint256";
|
|
6577
|
+
}, {
|
|
6578
|
+
readonly internalType: "uint256";
|
|
6579
|
+
readonly name: "amount1";
|
|
6580
|
+
readonly type: "uint256";
|
|
6581
|
+
}];
|
|
6582
|
+
readonly stateMutability: "payable";
|
|
6583
|
+
readonly type: "function";
|
|
6584
|
+
}];
|
|
6585
|
+
declare const pancakeSwapInfinityPoolManagerAbi: readonly [{
|
|
6586
|
+
readonly inputs: readonly [{
|
|
6587
|
+
readonly components: readonly [{
|
|
6588
|
+
readonly internalType: "address";
|
|
6589
|
+
readonly name: "currency0";
|
|
6590
|
+
readonly type: "address";
|
|
6591
|
+
}, {
|
|
6592
|
+
readonly internalType: "address";
|
|
6593
|
+
readonly name: "currency1";
|
|
6594
|
+
readonly type: "address";
|
|
6595
|
+
}, {
|
|
6596
|
+
readonly internalType: "address";
|
|
6597
|
+
readonly name: "hooks";
|
|
6598
|
+
readonly type: "address";
|
|
6599
|
+
}, {
|
|
6600
|
+
readonly internalType: "address";
|
|
6601
|
+
readonly name: "poolManager";
|
|
6602
|
+
readonly type: "address";
|
|
6603
|
+
}, {
|
|
6604
|
+
readonly internalType: "uint24";
|
|
6605
|
+
readonly name: "fee";
|
|
6606
|
+
readonly type: "uint24";
|
|
6607
|
+
}, {
|
|
6608
|
+
readonly internalType: "bytes32";
|
|
6609
|
+
readonly name: "parameters";
|
|
6610
|
+
readonly type: "bytes32";
|
|
6611
|
+
}];
|
|
6612
|
+
readonly internalType: "struct PoolKey";
|
|
6613
|
+
readonly name: "key";
|
|
6614
|
+
readonly type: "tuple";
|
|
6615
|
+
}, {
|
|
6616
|
+
readonly internalType: "uint160";
|
|
6617
|
+
readonly name: "sqrtPriceX96";
|
|
6618
|
+
readonly type: "uint160";
|
|
6619
|
+
}];
|
|
6620
|
+
readonly name: "initialize";
|
|
6621
|
+
readonly outputs: readonly [{
|
|
6622
|
+
readonly internalType: "contract IPool";
|
|
6623
|
+
readonly name: "pool";
|
|
6624
|
+
readonly type: "address";
|
|
6625
|
+
}];
|
|
6626
|
+
readonly stateMutability: "nonpayable";
|
|
6627
|
+
readonly type: "function";
|
|
6628
|
+
}, {
|
|
6629
|
+
readonly inputs: readonly [{
|
|
6630
|
+
readonly internalType: "address";
|
|
6631
|
+
readonly name: "currency0";
|
|
6632
|
+
readonly type: "address";
|
|
6633
|
+
}, {
|
|
6634
|
+
readonly internalType: "address";
|
|
6635
|
+
readonly name: "currency1";
|
|
6636
|
+
readonly type: "address";
|
|
6637
|
+
}, {
|
|
6638
|
+
readonly internalType: "uint24";
|
|
6639
|
+
readonly name: "fee";
|
|
6640
|
+
readonly type: "uint24";
|
|
6641
|
+
}];
|
|
6642
|
+
readonly name: "getPool";
|
|
6643
|
+
readonly outputs: readonly [{
|
|
6644
|
+
readonly internalType: "contract IPool";
|
|
6645
|
+
readonly name: "pool";
|
|
6646
|
+
readonly type: "address";
|
|
6647
|
+
}];
|
|
6648
|
+
readonly stateMutability: "view";
|
|
6649
|
+
readonly type: "function";
|
|
6650
|
+
}];
|
|
6651
|
+
declare const pancakeSwapInfinityDefaultHookAbi: readonly [{
|
|
6652
|
+
readonly inputs: readonly [];
|
|
6653
|
+
readonly name: "getHooksRegistrationBitmap";
|
|
6654
|
+
readonly outputs: readonly [{
|
|
6655
|
+
readonly internalType: "uint256";
|
|
6656
|
+
readonly name: "";
|
|
6657
|
+
readonly type: "uint256";
|
|
6658
|
+
}];
|
|
6659
|
+
readonly stateMutability: "view";
|
|
6660
|
+
readonly type: "function";
|
|
6661
|
+
}];
|
|
6662
|
+
|
|
6663
|
+
declare const permit2Abi: readonly [{
|
|
6664
|
+
readonly type: "function";
|
|
6665
|
+
readonly name: "allowance";
|
|
6666
|
+
readonly inputs: readonly [{
|
|
6667
|
+
readonly name: "user";
|
|
6668
|
+
readonly type: "address";
|
|
6669
|
+
readonly internalType: "address";
|
|
6670
|
+
}, {
|
|
6671
|
+
readonly name: "token";
|
|
6672
|
+
readonly type: "address";
|
|
6673
|
+
readonly internalType: "address";
|
|
6674
|
+
}, {
|
|
6675
|
+
readonly name: "spender";
|
|
6676
|
+
readonly type: "address";
|
|
6677
|
+
readonly internalType: "address";
|
|
6678
|
+
}];
|
|
6679
|
+
readonly outputs: readonly [{
|
|
6680
|
+
readonly name: "amount";
|
|
6681
|
+
readonly type: "uint160";
|
|
6682
|
+
readonly internalType: "uint160";
|
|
6683
|
+
}, {
|
|
6684
|
+
readonly name: "expiration";
|
|
6685
|
+
readonly type: "uint48";
|
|
6686
|
+
readonly internalType: "uint48";
|
|
6687
|
+
}, {
|
|
6688
|
+
readonly name: "nonce";
|
|
6689
|
+
readonly type: "uint48";
|
|
6690
|
+
readonly internalType: "uint48";
|
|
6691
|
+
}];
|
|
6692
|
+
readonly stateMutability: "view";
|
|
6693
|
+
}, {
|
|
6694
|
+
readonly type: "function";
|
|
6695
|
+
readonly name: "approve";
|
|
6696
|
+
readonly inputs: readonly [{
|
|
6697
|
+
readonly name: "token";
|
|
6698
|
+
readonly type: "address";
|
|
6699
|
+
readonly internalType: "address";
|
|
6700
|
+
}, {
|
|
6701
|
+
readonly name: "spender";
|
|
6702
|
+
readonly type: "address";
|
|
6703
|
+
readonly internalType: "address";
|
|
6704
|
+
}, {
|
|
6705
|
+
readonly name: "amount";
|
|
6706
|
+
readonly type: "uint160";
|
|
6707
|
+
readonly internalType: "uint160";
|
|
6708
|
+
}, {
|
|
6709
|
+
readonly name: "expiration";
|
|
6710
|
+
readonly type: "uint48";
|
|
6711
|
+
readonly internalType: "uint48";
|
|
6712
|
+
}];
|
|
6713
|
+
readonly outputs: readonly [];
|
|
6714
|
+
readonly stateMutability: "nonpayable";
|
|
6715
|
+
}, {
|
|
6716
|
+
readonly type: "function";
|
|
6717
|
+
readonly name: "permit";
|
|
6718
|
+
readonly inputs: readonly [{
|
|
6719
|
+
readonly name: "owner";
|
|
6720
|
+
readonly type: "address";
|
|
6721
|
+
readonly internalType: "address";
|
|
6722
|
+
}, {
|
|
6723
|
+
readonly name: "permitSingle";
|
|
6724
|
+
readonly type: "tuple";
|
|
6725
|
+
readonly internalType: "struct IAllowanceTransfer.PermitSingle";
|
|
6726
|
+
readonly components: readonly [{
|
|
6727
|
+
readonly name: "details";
|
|
6728
|
+
readonly type: "tuple";
|
|
6729
|
+
readonly internalType: "struct IAllowanceTransfer.PermitDetails";
|
|
6730
|
+
readonly components: readonly [{
|
|
6731
|
+
readonly name: "token";
|
|
6732
|
+
readonly type: "address";
|
|
6733
|
+
readonly internalType: "address";
|
|
6734
|
+
}, {
|
|
6735
|
+
readonly name: "amount";
|
|
6736
|
+
readonly type: "uint160";
|
|
6737
|
+
readonly internalType: "uint160";
|
|
6738
|
+
}, {
|
|
6739
|
+
readonly name: "expiration";
|
|
6740
|
+
readonly type: "uint48";
|
|
6741
|
+
readonly internalType: "uint48";
|
|
6742
|
+
}, {
|
|
6743
|
+
readonly name: "nonce";
|
|
6744
|
+
readonly type: "uint48";
|
|
6745
|
+
readonly internalType: "uint48";
|
|
6746
|
+
}];
|
|
6747
|
+
}, {
|
|
6748
|
+
readonly name: "spender";
|
|
6749
|
+
readonly type: "address";
|
|
6750
|
+
readonly internalType: "address";
|
|
6751
|
+
}, {
|
|
6752
|
+
readonly name: "sigDeadline";
|
|
6753
|
+
readonly type: "uint256";
|
|
6754
|
+
readonly internalType: "uint256";
|
|
6755
|
+
}];
|
|
6756
|
+
}, {
|
|
6757
|
+
readonly name: "signature";
|
|
6758
|
+
readonly type: "bytes";
|
|
6759
|
+
readonly internalType: "bytes";
|
|
6760
|
+
}];
|
|
6761
|
+
readonly outputs: readonly [];
|
|
6762
|
+
readonly stateMutability: "nonpayable";
|
|
6763
|
+
}, {
|
|
6764
|
+
readonly type: "function";
|
|
6765
|
+
readonly name: "permitBatch";
|
|
6766
|
+
readonly inputs: readonly [{
|
|
6767
|
+
readonly name: "owner";
|
|
6768
|
+
readonly type: "address";
|
|
6769
|
+
readonly internalType: "address";
|
|
6770
|
+
}, {
|
|
6771
|
+
readonly name: "permitBatch";
|
|
6772
|
+
readonly type: "tuple";
|
|
6773
|
+
readonly internalType: "struct IAllowanceTransfer.PermitBatch";
|
|
6774
|
+
readonly components: readonly [{
|
|
6775
|
+
readonly name: "details";
|
|
6776
|
+
readonly type: "tuple[]";
|
|
6777
|
+
readonly internalType: "struct IAllowanceTransfer.PermitDetails[]";
|
|
6778
|
+
readonly components: readonly [{
|
|
6779
|
+
readonly name: "token";
|
|
6780
|
+
readonly type: "address";
|
|
6781
|
+
readonly internalType: "address";
|
|
6782
|
+
}, {
|
|
6783
|
+
readonly name: "amount";
|
|
6784
|
+
readonly type: "uint160";
|
|
6785
|
+
readonly internalType: "uint160";
|
|
6786
|
+
}, {
|
|
6787
|
+
readonly name: "expiration";
|
|
6788
|
+
readonly type: "uint48";
|
|
6789
|
+
readonly internalType: "uint48";
|
|
6790
|
+
}, {
|
|
6791
|
+
readonly name: "nonce";
|
|
6792
|
+
readonly type: "uint48";
|
|
6793
|
+
readonly internalType: "uint48";
|
|
6794
|
+
}];
|
|
6795
|
+
}, {
|
|
6796
|
+
readonly name: "spender";
|
|
6797
|
+
readonly type: "address";
|
|
6798
|
+
readonly internalType: "address";
|
|
6799
|
+
}, {
|
|
6800
|
+
readonly name: "sigDeadline";
|
|
6801
|
+
readonly type: "uint256";
|
|
6802
|
+
readonly internalType: "uint256";
|
|
6803
|
+
}];
|
|
6804
|
+
}, {
|
|
6805
|
+
readonly name: "signature";
|
|
6806
|
+
readonly type: "bytes";
|
|
6807
|
+
readonly internalType: "bytes";
|
|
6808
|
+
}];
|
|
6809
|
+
readonly outputs: readonly [];
|
|
6810
|
+
readonly stateMutability: "nonpayable";
|
|
6811
|
+
}, {
|
|
6812
|
+
readonly type: "function";
|
|
6813
|
+
readonly name: "transferFrom";
|
|
6814
|
+
readonly inputs: readonly [{
|
|
6815
|
+
readonly name: "from";
|
|
6816
|
+
readonly type: "address";
|
|
6817
|
+
readonly internalType: "address";
|
|
6818
|
+
}, {
|
|
6819
|
+
readonly name: "to";
|
|
6820
|
+
readonly type: "address";
|
|
6821
|
+
readonly internalType: "address";
|
|
6822
|
+
}, {
|
|
6823
|
+
readonly name: "amount";
|
|
6824
|
+
readonly type: "uint160";
|
|
6825
|
+
readonly internalType: "uint160";
|
|
6826
|
+
}, {
|
|
6827
|
+
readonly name: "token";
|
|
6828
|
+
readonly type: "address";
|
|
6829
|
+
readonly internalType: "address";
|
|
6830
|
+
}];
|
|
6831
|
+
readonly outputs: readonly [];
|
|
6832
|
+
readonly stateMutability: "nonpayable";
|
|
6833
|
+
}, {
|
|
6834
|
+
readonly type: "function";
|
|
6835
|
+
readonly name: "transferFromBatch";
|
|
6836
|
+
readonly inputs: readonly [{
|
|
6837
|
+
readonly name: "transferDetails";
|
|
6838
|
+
readonly type: "tuple[]";
|
|
6839
|
+
readonly internalType: "struct IAllowanceTransfer.AllowanceTransferDetails[]";
|
|
6840
|
+
readonly components: readonly [{
|
|
6841
|
+
readonly name: "from";
|
|
6842
|
+
readonly type: "address";
|
|
6843
|
+
readonly internalType: "address";
|
|
6844
|
+
}, {
|
|
6845
|
+
readonly name: "to";
|
|
6846
|
+
readonly type: "address";
|
|
6847
|
+
readonly internalType: "address";
|
|
6848
|
+
}, {
|
|
6849
|
+
readonly name: "amount";
|
|
6850
|
+
readonly type: "uint160";
|
|
6851
|
+
readonly internalType: "uint160";
|
|
6852
|
+
}, {
|
|
6853
|
+
readonly name: "token";
|
|
6854
|
+
readonly type: "address";
|
|
6855
|
+
readonly internalType: "address";
|
|
6856
|
+
}];
|
|
6857
|
+
}];
|
|
6858
|
+
readonly outputs: readonly [];
|
|
6859
|
+
readonly stateMutability: "nonpayable";
|
|
6860
|
+
}, {
|
|
6861
|
+
readonly type: "function";
|
|
6862
|
+
readonly name: "lockdown";
|
|
6863
|
+
readonly inputs: readonly [{
|
|
6864
|
+
readonly name: "approvals";
|
|
6865
|
+
readonly type: "tuple[]";
|
|
6866
|
+
readonly internalType: "struct IAllowanceTransfer.TokenSpenderPair[]";
|
|
6867
|
+
readonly components: readonly [{
|
|
6868
|
+
readonly name: "token";
|
|
6869
|
+
readonly type: "address";
|
|
6870
|
+
readonly internalType: "address";
|
|
6871
|
+
}, {
|
|
6872
|
+
readonly name: "spender";
|
|
6873
|
+
readonly type: "address";
|
|
6874
|
+
readonly internalType: "address";
|
|
6875
|
+
}];
|
|
6876
|
+
}];
|
|
6877
|
+
readonly outputs: readonly [];
|
|
6878
|
+
readonly stateMutability: "nonpayable";
|
|
6879
|
+
}, {
|
|
6880
|
+
readonly type: "function";
|
|
6881
|
+
readonly name: "invalidateNonces";
|
|
6882
|
+
readonly inputs: readonly [{
|
|
6883
|
+
readonly name: "token";
|
|
6884
|
+
readonly type: "address";
|
|
6885
|
+
readonly internalType: "address";
|
|
6886
|
+
}, {
|
|
6887
|
+
readonly name: "spender";
|
|
6888
|
+
readonly type: "address";
|
|
6889
|
+
readonly internalType: "address";
|
|
6890
|
+
}, {
|
|
6891
|
+
readonly name: "newNonce";
|
|
6892
|
+
readonly type: "uint48";
|
|
6893
|
+
readonly internalType: "uint48";
|
|
6894
|
+
}];
|
|
6895
|
+
readonly outputs: readonly [];
|
|
6896
|
+
readonly stateMutability: "nonpayable";
|
|
6897
|
+
}, {
|
|
6898
|
+
readonly type: "event";
|
|
6899
|
+
readonly name: "Approval";
|
|
6900
|
+
readonly inputs: readonly [{
|
|
6901
|
+
readonly name: "owner";
|
|
6902
|
+
readonly type: "address";
|
|
6903
|
+
readonly indexed: true;
|
|
6904
|
+
readonly internalType: "address";
|
|
6905
|
+
}, {
|
|
6906
|
+
readonly name: "token";
|
|
6907
|
+
readonly type: "address";
|
|
6908
|
+
readonly indexed: true;
|
|
6909
|
+
readonly internalType: "address";
|
|
6910
|
+
}, {
|
|
6911
|
+
readonly name: "spender";
|
|
6912
|
+
readonly type: "address";
|
|
6913
|
+
readonly indexed: true;
|
|
6914
|
+
readonly internalType: "address";
|
|
6915
|
+
}, {
|
|
6916
|
+
readonly name: "amount";
|
|
6917
|
+
readonly type: "uint160";
|
|
6918
|
+
readonly indexed: false;
|
|
6919
|
+
readonly internalType: "uint160";
|
|
6920
|
+
}, {
|
|
6921
|
+
readonly name: "expiration";
|
|
6922
|
+
readonly type: "uint48";
|
|
6923
|
+
readonly indexed: false;
|
|
6924
|
+
readonly internalType: "uint48";
|
|
6925
|
+
}];
|
|
6926
|
+
readonly anonymous: false;
|
|
6927
|
+
}, {
|
|
6928
|
+
readonly type: "event";
|
|
6929
|
+
readonly name: "Permit";
|
|
6930
|
+
readonly inputs: readonly [{
|
|
6931
|
+
readonly name: "owner";
|
|
6932
|
+
readonly type: "address";
|
|
6933
|
+
readonly indexed: true;
|
|
6934
|
+
readonly internalType: "address";
|
|
6935
|
+
}, {
|
|
6936
|
+
readonly name: "token";
|
|
6937
|
+
readonly type: "address";
|
|
6938
|
+
readonly indexed: true;
|
|
6939
|
+
readonly internalType: "address";
|
|
6940
|
+
}, {
|
|
6941
|
+
readonly name: "spender";
|
|
6942
|
+
readonly type: "address";
|
|
6943
|
+
readonly indexed: true;
|
|
6944
|
+
readonly internalType: "address";
|
|
6945
|
+
}, {
|
|
6946
|
+
readonly name: "amount";
|
|
6947
|
+
readonly type: "uint160";
|
|
6948
|
+
readonly indexed: false;
|
|
6949
|
+
readonly internalType: "uint160";
|
|
6950
|
+
}, {
|
|
6951
|
+
readonly name: "expiration";
|
|
6952
|
+
readonly type: "uint48";
|
|
6953
|
+
readonly indexed: false;
|
|
6954
|
+
readonly internalType: "uint48";
|
|
6955
|
+
}, {
|
|
6956
|
+
readonly name: "nonce";
|
|
6957
|
+
readonly type: "uint48";
|
|
6958
|
+
readonly indexed: false;
|
|
6959
|
+
readonly internalType: "uint48";
|
|
6960
|
+
}];
|
|
6961
|
+
readonly anonymous: false;
|
|
6962
|
+
}, {
|
|
6963
|
+
readonly type: "event";
|
|
6964
|
+
readonly name: "Lockdown";
|
|
6965
|
+
readonly inputs: readonly [{
|
|
6966
|
+
readonly name: "owner";
|
|
6967
|
+
readonly type: "address";
|
|
6968
|
+
readonly indexed: true;
|
|
6969
|
+
readonly internalType: "address";
|
|
6970
|
+
}, {
|
|
6971
|
+
readonly name: "token";
|
|
6972
|
+
readonly type: "address";
|
|
6973
|
+
readonly indexed: true;
|
|
6974
|
+
readonly internalType: "address";
|
|
6975
|
+
}, {
|
|
6976
|
+
readonly name: "spender";
|
|
6977
|
+
readonly type: "address";
|
|
6978
|
+
readonly indexed: true;
|
|
6979
|
+
readonly internalType: "address";
|
|
6980
|
+
}];
|
|
6981
|
+
readonly anonymous: false;
|
|
6982
|
+
}, {
|
|
6983
|
+
readonly type: "event";
|
|
6984
|
+
readonly name: "NonceInvalidation";
|
|
6985
|
+
readonly inputs: readonly [{
|
|
6986
|
+
readonly name: "owner";
|
|
6987
|
+
readonly type: "address";
|
|
6988
|
+
readonly indexed: true;
|
|
6989
|
+
readonly internalType: "address";
|
|
6990
|
+
}, {
|
|
6991
|
+
readonly name: "token";
|
|
6992
|
+
readonly type: "address";
|
|
6993
|
+
readonly indexed: true;
|
|
6994
|
+
readonly internalType: "address";
|
|
6995
|
+
}, {
|
|
6996
|
+
readonly name: "spender";
|
|
6997
|
+
readonly type: "address";
|
|
6998
|
+
readonly indexed: true;
|
|
6999
|
+
readonly internalType: "address";
|
|
7000
|
+
}, {
|
|
7001
|
+
readonly name: "newNonce";
|
|
7002
|
+
readonly type: "uint48";
|
|
7003
|
+
readonly indexed: false;
|
|
7004
|
+
readonly internalType: "uint48";
|
|
7005
|
+
}];
|
|
7006
|
+
readonly anonymous: false;
|
|
7007
|
+
}];
|
|
7008
|
+
|
|
7009
|
+
declare const stataTokenFactoryAbi: readonly [{
|
|
7010
|
+
readonly type: "function";
|
|
7011
|
+
readonly name: "getStataTokens";
|
|
7012
|
+
readonly inputs: readonly [];
|
|
7013
|
+
readonly outputs: readonly [{
|
|
7014
|
+
readonly name: "";
|
|
7015
|
+
readonly type: "address[]";
|
|
7016
|
+
readonly internalType: "address[]";
|
|
7017
|
+
}];
|
|
7018
|
+
readonly stateMutability: "view";
|
|
7019
|
+
}, {
|
|
7020
|
+
readonly type: "function";
|
|
7021
|
+
readonly name: "getStataToken";
|
|
7022
|
+
readonly inputs: readonly [{
|
|
7023
|
+
readonly name: "underlying";
|
|
7024
|
+
readonly type: "address";
|
|
7025
|
+
readonly internalType: "address";
|
|
7026
|
+
}];
|
|
7027
|
+
readonly outputs: readonly [{
|
|
7028
|
+
readonly name: "";
|
|
7029
|
+
readonly type: "address";
|
|
7030
|
+
readonly internalType: "address";
|
|
7031
|
+
}];
|
|
7032
|
+
readonly stateMutability: "view";
|
|
7033
|
+
}];
|
|
7034
|
+
|
|
7035
|
+
declare const universalRouterAbi: readonly [{
|
|
7036
|
+
readonly inputs: readonly [{
|
|
7037
|
+
readonly type: "bytes";
|
|
7038
|
+
readonly name: "commands";
|
|
7039
|
+
}, {
|
|
7040
|
+
readonly type: "bytes[]";
|
|
7041
|
+
readonly name: "inputs";
|
|
7042
|
+
}, {
|
|
7043
|
+
readonly type: "uint256";
|
|
7044
|
+
readonly name: "deadline";
|
|
7045
|
+
}];
|
|
7046
|
+
readonly name: "execute";
|
|
7047
|
+
readonly outputs: readonly [];
|
|
7048
|
+
readonly stateMutability: "payable";
|
|
7049
|
+
readonly type: "function";
|
|
7050
|
+
}];
|
|
7051
|
+
|
|
5438
7052
|
declare function getIconAddressBytes(address: string): Hex;
|
|
5439
7053
|
|
|
5440
7054
|
type IconJsonRpcVersion = '2.0';
|
|
@@ -7267,6 +8881,7 @@ type SodaxConfig = {
|
|
|
7267
8881
|
moneyMarket?: MoneyMarketConfigParams;
|
|
7268
8882
|
migration?: MigrationServiceConfig;
|
|
7269
8883
|
bridge?: BridgeServiceConfig;
|
|
8884
|
+
dex?: DexServiceConfig;
|
|
7270
8885
|
hubProviderConfig?: EvmHubProviderConfig;
|
|
7271
8886
|
relayerApiEndpoint?: HttpUrl;
|
|
7272
8887
|
backendApiConfig?: BackendApiConfig;
|
|
@@ -7287,6 +8902,7 @@ declare class Sodax {
|
|
|
7287
8902
|
readonly bridge: BridgeService;
|
|
7288
8903
|
readonly staking: StakingService;
|
|
7289
8904
|
readonly partners: PartnerService;
|
|
8905
|
+
readonly dex: DexService;
|
|
7290
8906
|
readonly config: ConfigService;
|
|
7291
8907
|
readonly hubProvider: EvmHubProvider;
|
|
7292
8908
|
readonly relayerApiEndpoint: HttpUrl;
|
|
@@ -7300,6 +8916,31 @@ declare class Sodax {
|
|
|
7300
8916
|
initialize(): Promise<Result<void>>;
|
|
7301
8917
|
}
|
|
7302
8918
|
|
|
8919
|
+
declare abstract class StacksBaseSpokeProvider {
|
|
8920
|
+
chainConfig: StacksSpokeChainConfig;
|
|
8921
|
+
protected network: StacksNetwork;
|
|
8922
|
+
constructor(config: StacksSpokeChainConfig);
|
|
8923
|
+
getSTXBalance(address: string): Promise<bigint>;
|
|
8924
|
+
readTokenBalance(token: string, address: string): Promise<bigint>;
|
|
8925
|
+
getImplContractAddress(stateContract: string): Promise<string>;
|
|
8926
|
+
protected abstract walletReadContract(txParams: StacksTransactionParams): Promise<ClarityValue>;
|
|
8927
|
+
}
|
|
8928
|
+
declare class StacksSpokeProvider extends StacksBaseSpokeProvider implements ISpokeProvider {
|
|
8929
|
+
readonly walletProvider: IStacksWalletProvider;
|
|
8930
|
+
constructor(config: StacksSpokeChainConfig, walletProvider: IStacksWalletProvider);
|
|
8931
|
+
protected walletReadContract(txParams: StacksTransactionParams): Promise<ClarityValue>;
|
|
8932
|
+
}
|
|
8933
|
+
type StacksRawSpokeProviderConfig = {
|
|
8934
|
+
walletAddress: string;
|
|
8935
|
+
chainConfig: StacksSpokeChainConfig;
|
|
8936
|
+
};
|
|
8937
|
+
declare class StacksRawSpokeProvider extends StacksBaseSpokeProvider implements IRawSpokeProvider {
|
|
8938
|
+
readonly walletProvider: WalletAddressProvider;
|
|
8939
|
+
readonly raw = true;
|
|
8940
|
+
constructor(walletAddress: string, config: StacksSpokeChainConfig);
|
|
8941
|
+
protected walletReadContract(txParams: StacksTransactionParams): Promise<ClarityValue>;
|
|
8942
|
+
}
|
|
8943
|
+
|
|
7303
8944
|
type RadfiConfig = {
|
|
7304
8945
|
url: string;
|
|
7305
8946
|
apiKey: string;
|
|
@@ -7322,27 +8963,47 @@ type RadfiWalletBalance = {
|
|
|
7322
8963
|
totalUtxos: number;
|
|
7323
8964
|
};
|
|
7324
8965
|
type RadfiUtxo = {
|
|
7325
|
-
|
|
7326
|
-
|
|
8966
|
+
_id: string;
|
|
8967
|
+
txid: string;
|
|
7327
8968
|
vout: number;
|
|
7328
|
-
|
|
8969
|
+
txidVout: string;
|
|
8970
|
+
satoshi: number;
|
|
8971
|
+
amount: string;
|
|
7329
8972
|
address: string;
|
|
7330
8973
|
isSpent: boolean;
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
8974
|
+
status: string;
|
|
8975
|
+
source: string;
|
|
8976
|
+
runes?: Array<{
|
|
8977
|
+
runeid: string;
|
|
8978
|
+
amount: string;
|
|
8979
|
+
divisibility?: number;
|
|
8980
|
+
rune?: string;
|
|
8981
|
+
spacedRune?: string;
|
|
8982
|
+
symbol?: string;
|
|
8983
|
+
}>;
|
|
8984
|
+
height?: number;
|
|
8985
|
+
confirmations?: number;
|
|
8986
|
+
createdAt?: number;
|
|
8987
|
+
updatedAt?: number;
|
|
7334
8988
|
};
|
|
7335
8989
|
type RadfiUtxoListResponse = {
|
|
8990
|
+
code: string;
|
|
8991
|
+
message: string;
|
|
7336
8992
|
data: RadfiUtxo[];
|
|
7337
|
-
total: number;
|
|
7338
|
-
page: number;
|
|
7339
|
-
pageSize: number;
|
|
7340
8993
|
};
|
|
7341
8994
|
type RadfiBuildTxResponse = {
|
|
7342
8995
|
base64Psbt: string;
|
|
7343
|
-
fee:
|
|
8996
|
+
fee: {
|
|
8997
|
+
feeRate: number;
|
|
8998
|
+
totalFee: number;
|
|
8999
|
+
};
|
|
7344
9000
|
txId: string;
|
|
7345
9001
|
};
|
|
9002
|
+
type RadfiMaxSpentResponse = {
|
|
9003
|
+
maxSatsAmt: number;
|
|
9004
|
+
feeRate: number;
|
|
9005
|
+
fee: number;
|
|
9006
|
+
};
|
|
7346
9007
|
declare class RadfiProvider {
|
|
7347
9008
|
private readonly config;
|
|
7348
9009
|
constructor(config: RadfiConfig);
|
|
@@ -7397,6 +9058,32 @@ declare class RadfiProvider {
|
|
|
7397
9058
|
userAddress: string;
|
|
7398
9059
|
signedBase64Tx: string;
|
|
7399
9060
|
}, accessToken: string): Promise<string>;
|
|
9061
|
+
/**
|
|
9062
|
+
* Withdraw BTC from trading wallet to user's personal wallet.
|
|
9063
|
+
* Returns an unsigned PSBT for the user to sign.
|
|
9064
|
+
*/
|
|
9065
|
+
withdrawToUser(params: {
|
|
9066
|
+
userAddress: string;
|
|
9067
|
+
amount: string;
|
|
9068
|
+
tokenId: string;
|
|
9069
|
+
withdrawTo: string;
|
|
9070
|
+
}, accessToken: string): Promise<RadfiBuildTxResponse>;
|
|
9071
|
+
/**
|
|
9072
|
+
* Sign and broadcast a withdraw transaction via Radfi.
|
|
9073
|
+
*/
|
|
9074
|
+
signAndBroadcastWithdraw(params: {
|
|
9075
|
+
userAddress: string;
|
|
9076
|
+
signedBase64Tx: string;
|
|
9077
|
+
}, accessToken: string): Promise<string>;
|
|
9078
|
+
/**
|
|
9079
|
+
* Get max spendable amount for a withdraw transaction (amount after fee).
|
|
9080
|
+
*/
|
|
9081
|
+
getMaxWithdrawable(params: {
|
|
9082
|
+
userAddress: string;
|
|
9083
|
+
amount: string;
|
|
9084
|
+
tokenId: string;
|
|
9085
|
+
withdrawTo: string;
|
|
9086
|
+
}, accessToken: string): Promise<RadfiMaxSpentResponse>;
|
|
7400
9087
|
private request;
|
|
7401
9088
|
}
|
|
7402
9089
|
|
|
@@ -7444,8 +9131,9 @@ declare class BitcoinBaseSpokeProvider {
|
|
|
7444
9131
|
readonly radfi: RadfiProvider;
|
|
7445
9132
|
readonly walletMode: WalletMode;
|
|
7446
9133
|
radfiAccessToken: string;
|
|
9134
|
+
radfiRefreshToken: string;
|
|
7447
9135
|
constructor(config: BitcoinSpokeChainConfig, radfiConfig: RadfiConfig, walletMode?: WalletMode, rpcURL?: string);
|
|
7448
|
-
setRadfiAccessToken(token: string): void;
|
|
9136
|
+
setRadfiAccessToken(token: string, refreshToken?: string): void;
|
|
7449
9137
|
/**
|
|
7450
9138
|
* Get current fee estimates
|
|
7451
9139
|
*/
|
|
@@ -7476,9 +9164,12 @@ declare class BitcoinBaseSpokeProvider {
|
|
|
7476
9164
|
*/
|
|
7477
9165
|
fetchRawTransaction(txid: string): Promise<string>;
|
|
7478
9166
|
/**
|
|
7479
|
-
* Estimate transaction size in vbytes
|
|
9167
|
+
* Estimate transaction size in vbytes.
|
|
9168
|
+
* @param addressType — caller's address type for accurate per-input weight.
|
|
9169
|
+
* P2PKH ≈ 148 vB, P2SH-P2WPKH ≈ 91 vB, P2WPKH ≈ 68 vB, P2TR ≈ 58 vB.
|
|
9170
|
+
* Defaults to P2WPKH (68 vB) when omitted.
|
|
7480
9171
|
*/
|
|
7481
|
-
estimateTxSize(inputCount: number, outputCount: number): number;
|
|
9172
|
+
estimateTxSize(inputCount: number, outputCount: number, addressType?: AddressType): number;
|
|
7482
9173
|
getAddressType(address: string): AddressType;
|
|
7483
9174
|
encodePayloadToBytes(payload: Payload): string;
|
|
7484
9175
|
static encodeWithdrawalData<S extends BitcoinSpokeProviderType, R extends boolean = false>(dstChainId: HubChainId, data: Hex, provider: S, raw?: R): Promise<string>;
|
|
@@ -7497,6 +9188,12 @@ declare class BitcoinRawSpokeProvider extends BitcoinBaseSpokeProvider implement
|
|
|
7497
9188
|
declare class BitcoinSpokeProvider extends BitcoinBaseSpokeProvider implements ISpokeProvider {
|
|
7498
9189
|
readonly walletProvider: IBitcoinWalletProvider;
|
|
7499
9190
|
constructor(walletProvider: IBitcoinWalletProvider, chainConfig: BitcoinSpokeChainConfig, radfiConfig: RadfiConfig, walletMode?: WalletMode, rpcUrl?: string);
|
|
9191
|
+
/**
|
|
9192
|
+
* Get the effective wallet address for hub wallet derivation and relay submission.
|
|
9193
|
+
* In TRADING mode, returns the trading wallet address (not the personal wallet).
|
|
9194
|
+
* This must be used everywhere a wallet address is needed for hub interaction.
|
|
9195
|
+
*/
|
|
9196
|
+
getEffectiveWalletAddress(): Promise<string>;
|
|
7500
9197
|
/**
|
|
7501
9198
|
* Authenticate with Radfi: BIP322-sign a login message, then call the Radfi API.
|
|
7502
9199
|
* Returns accessToken, refreshToken, and tradingAddress.
|
|
@@ -7509,7 +9206,9 @@ declare class BitcoinSpokeProvider extends BitcoinBaseSpokeProvider implements I
|
|
|
7509
9206
|
}>;
|
|
7510
9207
|
/**
|
|
7511
9208
|
* Ensure a valid Radfi access token is set on this provider.
|
|
7512
|
-
*
|
|
9209
|
+
* If a token exists, validates it via the Radfi API.
|
|
9210
|
+
* If invalid, tries refreshing with the refresh token first.
|
|
9211
|
+
* If refresh also fails, falls back to full re-authentication (BIP322 sign).
|
|
7513
9212
|
*/
|
|
7514
9213
|
ensureRadfiAccessToken(): Promise<void>;
|
|
7515
9214
|
/**
|
|
@@ -7623,10 +9322,10 @@ declare class EvmRawSpokeProvider extends EvmBaseSpokeProvider implements IRawSp
|
|
|
7623
9322
|
readonly raw = true;
|
|
7624
9323
|
constructor(walletAddress: Address$1, chainConfig: EvmSpokeChainConfig, rpcUrl?: string);
|
|
7625
9324
|
}
|
|
7626
|
-
type IWalletProvider = IEvmWalletProvider | IInjectiveWalletProvider | IStellarWalletProvider | ISuiWalletProvider | IIconWalletProvider | IInjectiveWalletProvider | IStellarWalletProvider | IBitcoinWalletProvider | ISolanaWalletProvider | INearWalletProvider;
|
|
7627
|
-
type SpokeProvider = (EvmSpokeProvider | InjectiveSpokeProvider | IconSpokeProvider | SuiSpokeProvider | StellarSpokeProvider | SolanaSpokeProvider | SonicSpokeProvider | BitcoinSpokeProvider | NearSpokeProvider) & ISpokeProvider;
|
|
7628
|
-
type RawSpokeProvider = (EvmRawSpokeProvider | InjectiveRawSpokeProvider | IconRawSpokeProvider | SuiRawSpokeProvider | StellarRawSpokeProvider | SolanaRawSpokeProvider | SonicRawSpokeProvider | BitcoinRawSpokeProvider | NearRawSpokeProvider) & IRawSpokeProvider;
|
|
7629
|
-
type RawSpokeProviderConfig = (EvmRawSpokeProviderConfig | InjectiveRawSpokeProviderConfig | IconRawSpokeProviderConfig | SuiRawSpokeProviderConfig | StellarRawSpokeProviderConfig | SolanaRawSpokeProviderConfig | SonicRawSpokeProviderConfig | NearRawSpokeProviderConfig) & {
|
|
9325
|
+
type IWalletProvider = IEvmWalletProvider | IInjectiveWalletProvider | IStellarWalletProvider | ISuiWalletProvider | IIconWalletProvider | IInjectiveWalletProvider | IStellarWalletProvider | IBitcoinWalletProvider | ISolanaWalletProvider | IStacksWalletProvider | INearWalletProvider;
|
|
9326
|
+
type SpokeProvider = (EvmSpokeProvider | InjectiveSpokeProvider | IconSpokeProvider | SuiSpokeProvider | StellarSpokeProvider | SolanaSpokeProvider | SonicSpokeProvider | StacksSpokeProvider | BitcoinSpokeProvider | NearSpokeProvider) & ISpokeProvider;
|
|
9327
|
+
type RawSpokeProvider = (EvmRawSpokeProvider | InjectiveRawSpokeProvider | IconRawSpokeProvider | SuiRawSpokeProvider | StellarRawSpokeProvider | SolanaRawSpokeProvider | SonicRawSpokeProvider | StacksRawSpokeProvider | BitcoinRawSpokeProvider | NearRawSpokeProvider) & IRawSpokeProvider;
|
|
9328
|
+
type RawSpokeProviderConfig = (EvmRawSpokeProviderConfig | InjectiveRawSpokeProviderConfig | IconRawSpokeProviderConfig | SuiRawSpokeProviderConfig | StellarRawSpokeProviderConfig | SolanaRawSpokeProviderConfig | SonicRawSpokeProviderConfig | StacksRawSpokeProviderConfig | NearRawSpokeProviderConfig) & {
|
|
7630
9329
|
chainConfig: SpokeChainConfig;
|
|
7631
9330
|
};
|
|
7632
9331
|
type SpokeProviderType = SpokeProvider | RawSpokeProvider;
|
|
@@ -7766,7 +9465,7 @@ declare const hyper: {
|
|
|
7766
9465
|
};
|
|
7767
9466
|
declare function getEvmViemChain(id: EvmChainId): Chain;
|
|
7768
9467
|
declare const bnUSDLegacySpokeChainIds: readonly ["0x1.icon", "sui", "stellar"];
|
|
7769
|
-
declare const newbnUSDSpokeChainIds: ("0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "sonic" | "0xa.optimism" | "0x89.polygon" | "hyper" | "lightlink" | "ethereum" | "redbelly" | "0x2019.kaia" | "sui" | "stellar" | "injective-1" | "solana" | "near" | "bitcoin")[];
|
|
9468
|
+
declare const newbnUSDSpokeChainIds: ("0xa86a.avax" | "0xa4b1.arbitrum" | "0x2105.base" | "0x38.bsc" | "sonic" | "0xa.optimism" | "0x89.polygon" | "hyper" | "lightlink" | "ethereum" | "redbelly" | "0x2019.kaia" | "sui" | "stellar" | "injective-1" | "solana" | "near" | "bitcoin" | "stacks")[];
|
|
7770
9469
|
declare const bnUSDLegacyTokens: readonly [{
|
|
7771
9470
|
readonly symbol: "bnUSD (legacy)";
|
|
7772
9471
|
readonly name: "bnUSD";
|
|
@@ -7894,6 +9593,12 @@ declare const bnUSDNewTokens: ({
|
|
|
7894
9593
|
readonly decimals: 18;
|
|
7895
9594
|
readonly address: "0:0";
|
|
7896
9595
|
readonly xChainId: "bitcoin";
|
|
9596
|
+
} | {
|
|
9597
|
+
readonly symbol: "bnUSD";
|
|
9598
|
+
readonly name: "bnUSD";
|
|
9599
|
+
readonly decimals: 6;
|
|
9600
|
+
readonly address: "SP3031RGK734636C8KGW2Y76TEQBTVX59Q472EQH0.bnusd";
|
|
9601
|
+
readonly xChainId: "stacks";
|
|
7897
9602
|
})[];
|
|
7898
9603
|
declare const isLegacybnUSDChainId: (chainId: SpokeChainId) => boolean;
|
|
7899
9604
|
declare const isNewbnUSDChainId: (chainId: SpokeChainId) => boolean;
|
|
@@ -7903,6 +9608,118 @@ declare const getAllLegacybnUSDTokens: () => {
|
|
|
7903
9608
|
token: LegacybnUSDToken;
|
|
7904
9609
|
chainId: LegacybnUSDChainId;
|
|
7905
9610
|
}[];
|
|
9611
|
+
declare const getConcentratedLiquidityConfig: () => ConcentratedLiquidityConfig;
|
|
9612
|
+
declare const dexPools: {
|
|
9613
|
+
readonly AETH_BNUSD: {
|
|
9614
|
+
readonly currency0: "0x3E102c7D9b46c92aBcd4c2e1C70f362B47a201A6";
|
|
9615
|
+
readonly currency1: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
9616
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
9617
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
9618
|
+
readonly fee: 8388608;
|
|
9619
|
+
readonly parameters: {
|
|
9620
|
+
readonly tickSpacing: 10;
|
|
9621
|
+
readonly hooksRegistration: {
|
|
9622
|
+
readonly beforeInitialize: true;
|
|
9623
|
+
readonly afterInitialize: true;
|
|
9624
|
+
readonly beforeAddLiquidity: true;
|
|
9625
|
+
readonly afterAddLiquidity: true;
|
|
9626
|
+
readonly beforeRemoveLiquidity: true;
|
|
9627
|
+
readonly afterRemoveLiquidity: true;
|
|
9628
|
+
readonly beforeSwap: true;
|
|
9629
|
+
readonly afterSwap: true;
|
|
9630
|
+
readonly beforeDonate: true;
|
|
9631
|
+
readonly afterDonate: true;
|
|
9632
|
+
readonly beforeSwapReturnsDelta: true;
|
|
9633
|
+
readonly afterSwapReturnsDelta: true;
|
|
9634
|
+
readonly afterMintReturnsDelta: true;
|
|
9635
|
+
readonly afterBurnReturnsDelta: true;
|
|
9636
|
+
};
|
|
9637
|
+
};
|
|
9638
|
+
};
|
|
9639
|
+
readonly BTC_BNUSD: {
|
|
9640
|
+
readonly currency0: "0x8aDe79C255761971f4057253712b916AB2494275";
|
|
9641
|
+
readonly currency1: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
9642
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
9643
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
9644
|
+
readonly fee: 8388608;
|
|
9645
|
+
readonly parameters: {
|
|
9646
|
+
readonly tickSpacing: 10;
|
|
9647
|
+
readonly hooksRegistration: {
|
|
9648
|
+
readonly beforeInitialize: true;
|
|
9649
|
+
readonly afterInitialize: true;
|
|
9650
|
+
readonly beforeAddLiquidity: true;
|
|
9651
|
+
readonly afterAddLiquidity: true;
|
|
9652
|
+
readonly beforeRemoveLiquidity: true;
|
|
9653
|
+
readonly afterRemoveLiquidity: true;
|
|
9654
|
+
readonly beforeSwap: true;
|
|
9655
|
+
readonly afterSwap: true;
|
|
9656
|
+
readonly beforeDonate: true;
|
|
9657
|
+
readonly afterDonate: true;
|
|
9658
|
+
readonly beforeSwapReturnsDelta: true;
|
|
9659
|
+
readonly afterSwapReturnsDelta: true;
|
|
9660
|
+
readonly afterMintReturnsDelta: true;
|
|
9661
|
+
readonly afterBurnReturnsDelta: true;
|
|
9662
|
+
};
|
|
9663
|
+
};
|
|
9664
|
+
};
|
|
9665
|
+
readonly ASODA_BNUSD: {
|
|
9666
|
+
readonly currency0: "0xac8540fee419c7ceb985889EaBa1e84B42a53e8a";
|
|
9667
|
+
readonly currency1: "0xE801CA34E19aBCbFeA12025378D19c4FBE250131";
|
|
9668
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
9669
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
9670
|
+
readonly fee: 8388608;
|
|
9671
|
+
readonly parameters: {
|
|
9672
|
+
readonly tickSpacing: 10;
|
|
9673
|
+
readonly hooksRegistration: {
|
|
9674
|
+
readonly beforeInitialize: true;
|
|
9675
|
+
readonly afterInitialize: true;
|
|
9676
|
+
readonly beforeAddLiquidity: true;
|
|
9677
|
+
readonly afterAddLiquidity: true;
|
|
9678
|
+
readonly beforeRemoveLiquidity: true;
|
|
9679
|
+
readonly afterRemoveLiquidity: true;
|
|
9680
|
+
readonly beforeSwap: true;
|
|
9681
|
+
readonly afterSwap: true;
|
|
9682
|
+
readonly beforeDonate: true;
|
|
9683
|
+
readonly afterDonate: true;
|
|
9684
|
+
readonly beforeSwapReturnsDelta: true;
|
|
9685
|
+
readonly afterSwapReturnsDelta: true;
|
|
9686
|
+
readonly afterMintReturnsDelta: true;
|
|
9687
|
+
readonly afterBurnReturnsDelta: true;
|
|
9688
|
+
};
|
|
9689
|
+
};
|
|
9690
|
+
};
|
|
9691
|
+
readonly ASODA_XSODA: {
|
|
9692
|
+
readonly currency0: "0xac8540fee419c7ceb985889EaBa1e84B42a53e8a";
|
|
9693
|
+
readonly currency1: "0xADC6561Cc8FC31767B4917CCc97F510D411378d9";
|
|
9694
|
+
readonly hooks: "0x598448d8f8553b9c6f27E52a92E2cCf27cDEF229";
|
|
9695
|
+
readonly poolManager: "0xA3256ab552A271A16AcDfdB521B32ef82d481F43";
|
|
9696
|
+
readonly fee: 8388608;
|
|
9697
|
+
readonly parameters: {
|
|
9698
|
+
readonly tickSpacing: 10;
|
|
9699
|
+
readonly hooksRegistration: {
|
|
9700
|
+
readonly beforeInitialize: true;
|
|
9701
|
+
readonly afterInitialize: true;
|
|
9702
|
+
readonly beforeAddLiquidity: true;
|
|
9703
|
+
readonly afterAddLiquidity: true;
|
|
9704
|
+
readonly beforeRemoveLiquidity: true;
|
|
9705
|
+
readonly afterRemoveLiquidity: true;
|
|
9706
|
+
readonly beforeSwap: true;
|
|
9707
|
+
readonly afterSwap: true;
|
|
9708
|
+
readonly beforeDonate: true;
|
|
9709
|
+
readonly afterDonate: true;
|
|
9710
|
+
readonly beforeSwapReturnsDelta: true;
|
|
9711
|
+
readonly afterSwapReturnsDelta: true;
|
|
9712
|
+
readonly afterMintReturnsDelta: true;
|
|
9713
|
+
readonly afterBurnReturnsDelta: true;
|
|
9714
|
+
};
|
|
9715
|
+
};
|
|
9716
|
+
};
|
|
9717
|
+
};
|
|
9718
|
+
declare const StatATokenAddresses: {
|
|
9719
|
+
readonly '0xac8540fee419c7ceb985889eaba1e84b42a53e8a': "0x21685E341DE7844135329914Be6Bd8D16982d834";
|
|
9720
|
+
readonly '0x8ade79c255761971f4057253712b916ab2494275': "0x7A1A5555842Ad2D0eD274d09b5c4406a95799D5d";
|
|
9721
|
+
readonly '0x3e102c7d9b46c92abcd4c2e1c70f362b47a201a6': "0x4effB5813271699683C25c734F4daBc45B363709";
|
|
9722
|
+
};
|
|
7906
9723
|
|
|
7907
9724
|
type EvmDepositToDataParams = {
|
|
7908
9725
|
token: Hex | string;
|
|
@@ -7966,7 +9783,7 @@ declare class EvmWalletAbstraction {
|
|
|
7966
9783
|
/**
|
|
7967
9784
|
* Get the hub wallet address for a given spoke chain and address.
|
|
7968
9785
|
* @param chainId - The spoke chain ID.
|
|
7969
|
-
* @param address - The address on the spoke chain.
|
|
9786
|
+
* @param address - The encoded address on the spoke chain.
|
|
7970
9787
|
* @param hubProvider - The hub provider.
|
|
7971
9788
|
* @returns The hub wallet address.
|
|
7972
9789
|
*/
|
|
@@ -8599,6 +10416,18 @@ declare const IntentFilledEventAbi: {
|
|
|
8599
10416
|
readonly anonymous: false;
|
|
8600
10417
|
};
|
|
8601
10418
|
type IntentFilledEventLog = GetLogsReturnType<typeof IntentFilledEventAbi>[number];
|
|
10419
|
+
declare const MintPositionEventAbi: {
|
|
10420
|
+
readonly type: "event";
|
|
10421
|
+
readonly name: "MintPosition";
|
|
10422
|
+
readonly inputs: readonly [{
|
|
10423
|
+
readonly name: "tokenId";
|
|
10424
|
+
readonly type: "uint256";
|
|
10425
|
+
readonly indexed: true;
|
|
10426
|
+
readonly internalType: "uint256";
|
|
10427
|
+
}];
|
|
10428
|
+
readonly anonymous: false;
|
|
10429
|
+
};
|
|
10430
|
+
type MintPositionEventLog = GetLogsReturnType<typeof MintPositionEventAbi>[number];
|
|
8602
10431
|
declare class EvmSolverService {
|
|
8603
10432
|
private constructor();
|
|
8604
10433
|
/**
|
|
@@ -9776,6 +11605,57 @@ declare class SuiSpokeService {
|
|
|
9776
11605
|
private static call;
|
|
9777
11606
|
}
|
|
9778
11607
|
|
|
11608
|
+
type StacksSpokeDepositParams = {
|
|
11609
|
+
from: Hex;
|
|
11610
|
+
token: string;
|
|
11611
|
+
to?: HubAddress;
|
|
11612
|
+
amount: bigint;
|
|
11613
|
+
data: Hex;
|
|
11614
|
+
};
|
|
11615
|
+
declare class StacksSpokeService {
|
|
11616
|
+
private constructor();
|
|
11617
|
+
/**
|
|
11618
|
+
* Deposit tokens to the spoke chain.
|
|
11619
|
+
* @param {StacksSpokeDepositParams} params - The parameters for the deposit, including the user's address, token address, amount, and additional data.
|
|
11620
|
+
* @param {StacksSpokeProviderType} spokeProvider - The provider for the spoke chain.
|
|
11621
|
+
* @param {EvmHubProvider} hubProvider - The provider for the hub chain.
|
|
11622
|
+
* @returns {Promise<Hash>} A promise that resolves to the transaction hash.
|
|
11623
|
+
*/
|
|
11624
|
+
static deposit<R extends boolean = false>(params: StacksSpokeDepositParams, spokeProvider: StacksSpokeProviderType, hubProvider: EvmHubProvider, raw?: R): PromiseStacksTxReturnType<R>;
|
|
11625
|
+
/**
|
|
11626
|
+
* Get the balance of the token in the spoke chain.
|
|
11627
|
+
* @param {Address} token - The address of the token to get the balance of.
|
|
11628
|
+
* @param {StacksSpokeProviderType} spokeProvider - The spoke provider.
|
|
11629
|
+
* @returns {Promise<bigint>} The balance of the token.
|
|
11630
|
+
*/
|
|
11631
|
+
static getDeposit(token: string, spokeProvider: StacksSpokeProviderType): Promise<bigint>;
|
|
11632
|
+
/**
|
|
11633
|
+
* Get the simulation parameters for a deposit.
|
|
11634
|
+
* @param {StacksSpokeDepositParams} params - The deposit parameters.
|
|
11635
|
+
* @param {StacksSpokeProviderType} spokeProvider - The provider for the spoke chain.
|
|
11636
|
+
* @param {EvmHubProvider} hubProvider - The provider for the hub chain.
|
|
11637
|
+
* @returns {Promise<DepositSimulationParams>} The simulation parameters.
|
|
11638
|
+
*/
|
|
11639
|
+
static getSimulateDepositParams(params: StacksSpokeDepositParams, spokeProvider: StacksSpokeProviderType, hubProvider: EvmHubProvider): Promise<DepositSimulationParams>;
|
|
11640
|
+
/**
|
|
11641
|
+
* Calls a contract on the spoke chain using the user's wallet.
|
|
11642
|
+
* @param {Hex} from - The address of the user on the spoke chain.
|
|
11643
|
+
* @param {Hex} payload - The payload to send to the contract.
|
|
11644
|
+
* @param {StacksSpokeProviderType} spokeProvider - The provider for the spoke chain.
|
|
11645
|
+
* @param {EvmHubProvider} hubProvider - The provider for the hub chain.
|
|
11646
|
+
* @returns {Promise<Hash>} A promise that resolves to the transaction hash.
|
|
11647
|
+
*/
|
|
11648
|
+
static callWallet<R extends boolean = false>(from: Hex, payload: Hex, spokeProvider: StacksSpokeProviderType, hubProvider: EvmHubProvider, raw?: R): PromiseStacksTxReturnType<R>;
|
|
11649
|
+
/**
|
|
11650
|
+
* Transfers tokens to the hub chain.
|
|
11651
|
+
*/
|
|
11652
|
+
private static transfer;
|
|
11653
|
+
/**
|
|
11654
|
+
* Sends a message to the hub chain.
|
|
11655
|
+
*/
|
|
11656
|
+
private static call;
|
|
11657
|
+
}
|
|
11658
|
+
|
|
9779
11659
|
type BitcoinSpokeDepositParams = {
|
|
9780
11660
|
from: string;
|
|
9781
11661
|
to?: HubAddress;
|
|
@@ -9790,15 +11670,6 @@ type BitcoinTransferToHubParams = {
|
|
|
9790
11670
|
data?: Hex$1;
|
|
9791
11671
|
accessToken?: string;
|
|
9792
11672
|
};
|
|
9793
|
-
type DepositSimulationParams$1 = {
|
|
9794
|
-
spokeChainID: number | string;
|
|
9795
|
-
token: Hex$1;
|
|
9796
|
-
from: Hex$1;
|
|
9797
|
-
to: HubAddress;
|
|
9798
|
-
amount: bigint;
|
|
9799
|
-
data: Hex$1;
|
|
9800
|
-
srcAddress: Hex$1;
|
|
9801
|
-
};
|
|
9802
11673
|
declare class BitcoinSpokeService {
|
|
9803
11674
|
private constructor();
|
|
9804
11675
|
/**
|
|
@@ -9835,7 +11706,7 @@ declare class BitcoinSpokeService {
|
|
|
9835
11706
|
* @param {EvmHubProvider} EvmHubProvider - The hub chain provider
|
|
9836
11707
|
* @returns {Promise<DepositSimulationParams>} Simulation parameters
|
|
9837
11708
|
*/
|
|
9838
|
-
static getSimulateDepositParams(params: BitcoinSpokeDepositParams, spokeProvider: BitcoinSpokeProviderType, EvmHubProvider: EvmHubProvider): Promise<DepositSimulationParams
|
|
11709
|
+
static getSimulateDepositParams(params: BitcoinSpokeDepositParams, spokeProvider: BitcoinSpokeProviderType, EvmHubProvider: EvmHubProvider): Promise<DepositSimulationParams>;
|
|
9839
11710
|
/**
|
|
9840
11711
|
* Fund the Radfi trading wallet by sending BTC from the user's personal wallet
|
|
9841
11712
|
*
|
|
@@ -9874,55 +11745,385 @@ declare class BitcoinSpokeService {
|
|
|
9874
11745
|
* @param {boolean} raw - Whether to return raw PSBT or transaction hash
|
|
9875
11746
|
* @returns {Promise<TxReturnType<BitcoinSpokeProviderType, R>>} Transaction hash or raw PSBT
|
|
9876
11747
|
*/
|
|
9877
|
-
private static call;
|
|
9878
|
-
}
|
|
9879
|
-
|
|
9880
|
-
declare class Erc20Service {
|
|
9881
|
-
private constructor();
|
|
9882
|
-
static getErc20Token(token: Address$1, publicClient: PublicClient): Promise<Erc20Token>;
|
|
11748
|
+
private static call;
|
|
11749
|
+
}
|
|
11750
|
+
|
|
11751
|
+
declare class Erc20Service {
|
|
11752
|
+
private constructor();
|
|
11753
|
+
static getErc20Token(token: Address$1, publicClient: PublicClient): Promise<Erc20Token>;
|
|
11754
|
+
/**
|
|
11755
|
+
* Check if spender has enough ERC20 allowance for given amount
|
|
11756
|
+
* @param token - ERC20 token address
|
|
11757
|
+
* @param amount - Amount to check allowance for
|
|
11758
|
+
* @param owner - User wallet address
|
|
11759
|
+
* @param spender - Spender address
|
|
11760
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11761
|
+
* @return - True if spender is allowed to spend amount on behalf of owner
|
|
11762
|
+
*/
|
|
11763
|
+
static isAllowanceValid(token: Address$1, amount: bigint, owner: Address$1, spender: Address$1, spokeProvider: EvmSpokeProviderType | SonicSpokeProviderType): Promise<Result<boolean>>;
|
|
11764
|
+
/**
|
|
11765
|
+
* Approve ERC20 amount spending
|
|
11766
|
+
* @param token - ERC20 token address
|
|
11767
|
+
* @param amount - Amount to approve
|
|
11768
|
+
* @param spender - Spender address
|
|
11769
|
+
* @param provider - EVM Provider
|
|
11770
|
+
*/
|
|
11771
|
+
static approve<R extends boolean = false>(token: Address$1, amount: bigint, spender: Address$1, spokeProvider: EvmSpokeProviderType | SonicSpokeProviderType, raw?: R): Promise<TxReturnType<EvmSpokeProviderType | SonicSpokeProviderType, R>>;
|
|
11772
|
+
/**
|
|
11773
|
+
* Encodes a transfer transaction for a token.
|
|
11774
|
+
* @param token - The address of the token.
|
|
11775
|
+
* @param to - The address to transfer the token to.
|
|
11776
|
+
* @param amount - The amount of the token to transfer.
|
|
11777
|
+
* @returns The encoded contract call.
|
|
11778
|
+
*/
|
|
11779
|
+
static encodeTransfer(token: Address$1, to: Address$1, amount: bigint): EvmContractCall;
|
|
11780
|
+
/**
|
|
11781
|
+
* Encodes a transferFrom transaction for a token.
|
|
11782
|
+
* @param token - The address of the token.
|
|
11783
|
+
* @param from - The address to transfer the token from.
|
|
11784
|
+
* @param to - The address to transfer the token to.
|
|
11785
|
+
* @param amount - The amount of the token to transfer.
|
|
11786
|
+
* @returns The encoded contract call.
|
|
11787
|
+
*/
|
|
11788
|
+
static encodeTransferFrom(token: Address$1, from: Address$1, to: Address$1, amount: bigint): EvmContractCall;
|
|
11789
|
+
/**
|
|
11790
|
+
* Encodes an approval transaction for a token.
|
|
11791
|
+
* @param token - The address of the token.
|
|
11792
|
+
* @param to - The address to approve the token to.
|
|
11793
|
+
* @param amount - The amount of the token to approve.
|
|
11794
|
+
* @returns The encoded contract call.
|
|
11795
|
+
*/
|
|
11796
|
+
static encodeApprove(token: Address$1, to: Address$1, amount: bigint): EvmContractCall;
|
|
11797
|
+
}
|
|
11798
|
+
|
|
11799
|
+
declare class Erc4626Service {
|
|
11800
|
+
private constructor();
|
|
11801
|
+
/**
|
|
11802
|
+
* Get the underlying asset address of the vault
|
|
11803
|
+
* @param vault - ERC4626 vault address
|
|
11804
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11805
|
+
* @returns The address of the underlying asset
|
|
11806
|
+
*/
|
|
11807
|
+
static getAsset(vault: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<Address$1>>;
|
|
11808
|
+
/**
|
|
11809
|
+
* Get the total amount of underlying assets held by the vault
|
|
11810
|
+
* @param vault - ERC4626 vault address
|
|
11811
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11812
|
+
* @returns Total assets in the vault
|
|
11813
|
+
*/
|
|
11814
|
+
static getTotalAssets(vault: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<bigint>>;
|
|
11815
|
+
/**
|
|
11816
|
+
* Convert assets to shares
|
|
11817
|
+
* @param vault - ERC4626 vault address
|
|
11818
|
+
* @param assets - Amount of assets to convert
|
|
11819
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11820
|
+
* @returns Equivalent amount of shares
|
|
11821
|
+
*/
|
|
11822
|
+
static convertToShares(vault: Address$1, assets: bigint, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<bigint>>;
|
|
11823
|
+
/**
|
|
11824
|
+
* Convert shares to assets
|
|
11825
|
+
* @param vault - ERC4626 vault address
|
|
11826
|
+
* @param shares - Amount of shares to convert
|
|
11827
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11828
|
+
* @returns Equivalent amount of assets
|
|
11829
|
+
*/
|
|
11830
|
+
static convertToAssets(vault: Address$1, shares: bigint, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<bigint>>;
|
|
11831
|
+
/**
|
|
11832
|
+
* Get the maximum amount of assets that can be deposited
|
|
11833
|
+
* @param vault - ERC4626 vault address
|
|
11834
|
+
* @param receiver - Address that will receive the shares
|
|
11835
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11836
|
+
* @returns Maximum deposit amount
|
|
11837
|
+
*/
|
|
11838
|
+
static getMaxDeposit(vault: Address$1, receiver: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<bigint>>;
|
|
11839
|
+
/**
|
|
11840
|
+
* Preview the amount of shares that would be minted for a deposit
|
|
11841
|
+
* @param vault - ERC4626 vault address
|
|
11842
|
+
* @param assets - Amount of assets to deposit
|
|
11843
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11844
|
+
* @returns Expected shares to be minted
|
|
11845
|
+
*/
|
|
11846
|
+
static previewDeposit(vault: Address$1, assets: bigint, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<bigint>>;
|
|
11847
|
+
/**
|
|
11848
|
+
* Deposit assets into the vault
|
|
11849
|
+
* @param vault - ERC4626 vault address
|
|
11850
|
+
* @param assets - Amount of assets to deposit
|
|
11851
|
+
* @param receiver - Address that will receive the shares
|
|
11852
|
+
* @param spokeProvider - EVM Provider
|
|
11853
|
+
* @param raw - Whether to return raw transaction data
|
|
11854
|
+
*/
|
|
11855
|
+
static deposit<R extends boolean = false>(vault: Address$1, assets: bigint, receiver: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
|
|
11856
|
+
/**
|
|
11857
|
+
* Get the maximum amount of shares that can be minted
|
|
11858
|
+
* @param vault - ERC4626 vault address
|
|
11859
|
+
* @param receiver - Address that will receive the shares
|
|
11860
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11861
|
+
* @returns Maximum mint amount
|
|
11862
|
+
*/
|
|
11863
|
+
static getMaxMint(vault: Address$1, receiver: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<bigint>>;
|
|
11864
|
+
/**
|
|
11865
|
+
* Preview the amount of assets needed to mint shares
|
|
11866
|
+
* @param vault - ERC4626 vault address
|
|
11867
|
+
* @param shares - Amount of shares to mint
|
|
11868
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11869
|
+
* @returns Expected assets needed
|
|
11870
|
+
*/
|
|
11871
|
+
static previewMint(vault: Address$1, shares: bigint, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<bigint>>;
|
|
11872
|
+
/**
|
|
11873
|
+
* Mint vault shares
|
|
11874
|
+
* @param vault - ERC4626 vault address
|
|
11875
|
+
* @param shares - Amount of shares to mint
|
|
11876
|
+
* @param receiver - Address that will receive the shares
|
|
11877
|
+
* @param spokeProvider - EVM Provider
|
|
11878
|
+
* @param raw - Whether to return raw transaction data
|
|
11879
|
+
*/
|
|
11880
|
+
static mint<R extends boolean = false>(vault: Address$1, shares: bigint, receiver: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
|
|
11881
|
+
/**
|
|
11882
|
+
* Get the maximum amount of assets that can be withdrawn
|
|
11883
|
+
* @param vault - ERC4626 vault address
|
|
11884
|
+
* @param owner - Address of the share owner
|
|
11885
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11886
|
+
* @returns Maximum withdrawal amount
|
|
11887
|
+
*/
|
|
11888
|
+
static getMaxWithdraw(vault: Address$1, owner: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<bigint>>;
|
|
11889
|
+
/**
|
|
11890
|
+
* Preview the amount of shares that would be burned for a withdrawal
|
|
11891
|
+
* @param vault - ERC4626 vault address
|
|
11892
|
+
* @param assets - Amount of assets to withdraw
|
|
11893
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11894
|
+
* @returns Expected shares to be burned
|
|
11895
|
+
*/
|
|
11896
|
+
static previewWithdraw(vault: Address$1, assets: bigint, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<bigint>>;
|
|
11897
|
+
/**
|
|
11898
|
+
* Withdraw assets from the vault
|
|
11899
|
+
* @param vault - ERC4626 vault address
|
|
11900
|
+
* @param assets - Amount of assets to withdraw
|
|
11901
|
+
* @param receiver - Address that will receive the assets
|
|
11902
|
+
* @param owner - Address of the share owner
|
|
11903
|
+
* @param spokeProvider - EVM Provider
|
|
11904
|
+
* @param raw - Whether to return raw transaction data
|
|
11905
|
+
*/
|
|
11906
|
+
static withdraw<R extends boolean = false>(vault: Address$1, assets: bigint, receiver: Address$1, owner: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
|
|
11907
|
+
/**
|
|
11908
|
+
* Get the maximum amount of shares that can be redeemed
|
|
11909
|
+
* @param vault - ERC4626 vault address
|
|
11910
|
+
* @param owner - Address of the share owner
|
|
11911
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11912
|
+
* @returns Maximum redeem amount
|
|
11913
|
+
*/
|
|
11914
|
+
static getMaxRedeem(vault: Address$1, owner: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<bigint>>;
|
|
11915
|
+
/**
|
|
11916
|
+
* Preview the amount of assets that would be received for a redemption
|
|
11917
|
+
* @param vault - ERC4626 vault address
|
|
11918
|
+
* @param shares - Amount of shares to redeem
|
|
11919
|
+
* @param spokeProvider - EVM Spoke provider
|
|
11920
|
+
* @returns Expected assets to be received
|
|
11921
|
+
*/
|
|
11922
|
+
static previewRedeem(vault: Address$1, shares: bigint, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<bigint>>;
|
|
11923
|
+
/**
|
|
11924
|
+
* Redeem shares for assets
|
|
11925
|
+
* @param vault - ERC4626 vault address
|
|
11926
|
+
* @param shares - Amount of shares to redeem
|
|
11927
|
+
* @param receiver - Address that will receive the assets
|
|
11928
|
+
* @param owner - Address of the share owner
|
|
11929
|
+
* @param spokeProvider - EVM Provider
|
|
11930
|
+
* @param raw - Whether to return raw transaction data
|
|
11931
|
+
*/
|
|
11932
|
+
static redeem<R extends boolean = false>(vault: Address$1, shares: bigint, receiver: Address$1, owner: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
|
|
11933
|
+
/**
|
|
11934
|
+
* Encodes a deposit transaction for a vault.
|
|
11935
|
+
* @param vault - The address of the ERC4626 vault.
|
|
11936
|
+
* @param assets - The amount of assets to deposit.
|
|
11937
|
+
* @param receiver - The address that will receive the shares.
|
|
11938
|
+
* @returns The encoded contract call.
|
|
11939
|
+
*/
|
|
11940
|
+
static encodeDeposit(vault: Address$1, assets: bigint, receiver: Address$1): EvmContractCall;
|
|
11941
|
+
/**
|
|
11942
|
+
* Encodes a mint transaction for a vault.
|
|
11943
|
+
* @param vault - The address of the ERC4626 vault.
|
|
11944
|
+
* @param shares - The amount of shares to mint.
|
|
11945
|
+
* @param receiver - The address that will receive the shares.
|
|
11946
|
+
* @returns The encoded contract call.
|
|
11947
|
+
*/
|
|
11948
|
+
static encodeMint(vault: Address$1, shares: bigint, receiver: Address$1): EvmContractCall;
|
|
11949
|
+
/**
|
|
11950
|
+
* Encodes a withdraw transaction for a vault.
|
|
11951
|
+
* @param vault - The address of the ERC4626 vault.
|
|
11952
|
+
* @param assets - The amount of assets to withdraw.
|
|
11953
|
+
* @param receiver - The address that will receive the assets.
|
|
11954
|
+
* @param owner - The address of the share owner.
|
|
11955
|
+
* @returns The encoded contract call.
|
|
11956
|
+
*/
|
|
11957
|
+
static encodeWithdraw(vault: Address$1, assets: bigint, receiver: Address$1, owner: Address$1): EvmContractCall;
|
|
11958
|
+
/**
|
|
11959
|
+
* Encodes a redeem transaction for a vault.
|
|
11960
|
+
* @param vault - The address of the ERC4626 vault.
|
|
11961
|
+
* @param shares - The amount of shares to redeem.
|
|
11962
|
+
* @param receiver - The address that will receive the assets.
|
|
11963
|
+
* @param owner - The address of the share owner.
|
|
11964
|
+
* @returns The encoded contract call.
|
|
11965
|
+
*/
|
|
11966
|
+
static encodeRedeem(vault: Address$1, shares: bigint, receiver: Address$1, owner: Address$1): EvmContractCall;
|
|
11967
|
+
}
|
|
11968
|
+
|
|
11969
|
+
interface PermitDetails {
|
|
11970
|
+
token: Address$1;
|
|
11971
|
+
amount: bigint;
|
|
11972
|
+
expiration: number;
|
|
11973
|
+
nonce: number;
|
|
11974
|
+
}
|
|
11975
|
+
interface PermitSingle {
|
|
11976
|
+
details: PermitDetails;
|
|
11977
|
+
spender: Address$1;
|
|
11978
|
+
sigDeadline: bigint;
|
|
11979
|
+
}
|
|
11980
|
+
interface PermitBatch {
|
|
11981
|
+
details: PermitDetails[];
|
|
11982
|
+
spender: Address$1;
|
|
11983
|
+
sigDeadline: bigint;
|
|
11984
|
+
}
|
|
11985
|
+
interface AllowanceTransferDetails {
|
|
11986
|
+
from: Address$1;
|
|
11987
|
+
to: Address$1;
|
|
11988
|
+
amount: bigint;
|
|
11989
|
+
token: Address$1;
|
|
11990
|
+
}
|
|
11991
|
+
interface TokenSpenderPair {
|
|
11992
|
+
token: Address$1;
|
|
11993
|
+
spender: Address$1;
|
|
11994
|
+
}
|
|
11995
|
+
interface AllowanceInfo {
|
|
11996
|
+
amount: bigint;
|
|
11997
|
+
expiration: number;
|
|
11998
|
+
nonce: number;
|
|
11999
|
+
}
|
|
12000
|
+
declare class Permit2Service {
|
|
12001
|
+
private constructor();
|
|
12002
|
+
/**
|
|
12003
|
+
* Get allowance information for a user, token, and spender
|
|
12004
|
+
* @param permit2 - Permit2 contract address
|
|
12005
|
+
* @param user - User address
|
|
12006
|
+
* @param token - Token address
|
|
12007
|
+
* @param spender - Spender address
|
|
12008
|
+
* @param spokeProvider - EVM Spoke provider
|
|
12009
|
+
* @returns Allowance details including amount, expiration, and nonce
|
|
12010
|
+
*/
|
|
12011
|
+
static getAllowance(permit2: Address$1, user: Address$1, token: Address$1, spender: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<AllowanceInfo>>;
|
|
12012
|
+
/**
|
|
12013
|
+
* Check if a spender has sufficient Permit2 allowance
|
|
12014
|
+
* @param permit2 - Permit2 contract address
|
|
12015
|
+
* @param user - User address
|
|
12016
|
+
* @param token - Token address
|
|
12017
|
+
* @param spender - Spender address
|
|
12018
|
+
* @param amount - Required amount
|
|
12019
|
+
* @param spokeProvider - EVM Spoke provider
|
|
12020
|
+
* @returns True if allowance is sufficient and not expired
|
|
12021
|
+
*/
|
|
12022
|
+
static isAllowanceValid(permit2: Address$1, user: Address$1, token: Address$1, spender: Address$1, amount: bigint, spokeProvider: EvmSpokeProvider | SonicSpokeProvider | EvmHubProvider): Promise<Result<boolean>>;
|
|
12023
|
+
/**
|
|
12024
|
+
* Approve a spender to transfer tokens via Permit2
|
|
12025
|
+
* @param permit2 - Permit2 contract address
|
|
12026
|
+
* @param token - Token address
|
|
12027
|
+
* @param spender - Spender address
|
|
12028
|
+
* @param amount - Amount to approve (uint160)
|
|
12029
|
+
* @param expiration - Expiration timestamp
|
|
12030
|
+
* @param spokeProvider - EVM Provider
|
|
12031
|
+
* @param raw - Whether to return raw transaction data
|
|
12032
|
+
*/
|
|
12033
|
+
static approve<R extends boolean = false>(permit2: Address$1, token: Address$1, spender: Address$1, amount: bigint, expiration: number, spokeProvider: EvmSpokeProvider | SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
|
|
12034
|
+
/**
|
|
12035
|
+
* Execute a permit for a single token
|
|
12036
|
+
* @param permit2 - Permit2 contract address
|
|
12037
|
+
* @param owner - Owner address
|
|
12038
|
+
* @param permitSingle - Permit data for single token
|
|
12039
|
+
* @param signature - EIP-712 signature
|
|
12040
|
+
* @param spokeProvider - EVM Provider
|
|
12041
|
+
* @param raw - Whether to return raw transaction data
|
|
12042
|
+
*/
|
|
12043
|
+
static permit<R extends boolean = false>(permit2: Address$1, owner: Address$1, permitSingle: PermitSingle, signature: `0x${string}`, spokeProvider: EvmSpokeProvider | SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
|
|
12044
|
+
/**
|
|
12045
|
+
* Execute a permit for multiple tokens
|
|
12046
|
+
* @param permit2 - Permit2 contract address
|
|
12047
|
+
* @param owner - Owner address
|
|
12048
|
+
* @param permitBatch - Permit data for multiple tokens
|
|
12049
|
+
* @param signature - EIP-712 signature
|
|
12050
|
+
* @param spokeProvider - EVM Provider
|
|
12051
|
+
* @param raw - Whether to return raw transaction data
|
|
12052
|
+
*/
|
|
12053
|
+
static permitBatch<R extends boolean = false>(permit2: Address$1, owner: Address$1, permitBatch: PermitBatch, signature: `0x${string}`, spokeProvider: EvmSpokeProvider | SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
|
|
12054
|
+
/**
|
|
12055
|
+
* Transfer tokens from one address to another using Permit2
|
|
12056
|
+
* @param permit2 - Permit2 contract address
|
|
12057
|
+
* @param from - From address
|
|
12058
|
+
* @param to - To address
|
|
12059
|
+
* @param amount - Amount to transfer (uint160)
|
|
12060
|
+
* @param token - Token address
|
|
12061
|
+
* @param spokeProvider - EVM Provider
|
|
12062
|
+
* @param raw - Whether to return raw transaction data
|
|
12063
|
+
*/
|
|
12064
|
+
static transferFrom<R extends boolean = false>(permit2: Address$1, from: Address$1, to: Address$1, amount: bigint, token: Address$1, spokeProvider: EvmSpokeProvider | SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
|
|
12065
|
+
/**
|
|
12066
|
+
* Transfer multiple tokens in a batch using Permit2
|
|
12067
|
+
* @param permit2 - Permit2 contract address
|
|
12068
|
+
* @param transferDetails - Array of transfer details
|
|
12069
|
+
* @param spokeProvider - EVM Provider
|
|
12070
|
+
* @param raw - Whether to return raw transaction data
|
|
12071
|
+
*/
|
|
12072
|
+
static transferFromBatch<R extends boolean = false>(permit2: Address$1, transferDetails: AllowanceTransferDetails[], spokeProvider: EvmSpokeProvider | SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
|
|
9883
12073
|
/**
|
|
9884
|
-
*
|
|
9885
|
-
* @param
|
|
9886
|
-
* @param
|
|
9887
|
-
* @param
|
|
9888
|
-
* @param
|
|
9889
|
-
* @param spokeProvider - EVM Spoke provider
|
|
9890
|
-
* @return - True if spender is allowed to spend amount on behalf of owner
|
|
12074
|
+
* Lockdown approvals to prevent malicious usage
|
|
12075
|
+
* @param permit2 - Permit2 contract address
|
|
12076
|
+
* @param approvals - Array of token-spender pairs to lockdown
|
|
12077
|
+
* @param spokeProvider - EVM Provider
|
|
12078
|
+
* @param raw - Whether to return raw transaction data
|
|
9891
12079
|
*/
|
|
9892
|
-
static
|
|
12080
|
+
static lockdown<R extends boolean = false>(permit2: Address$1, approvals: TokenSpenderPair[], spokeProvider: EvmSpokeProvider | SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
|
|
9893
12081
|
/**
|
|
9894
|
-
*
|
|
9895
|
-
* @param
|
|
9896
|
-
* @param
|
|
12082
|
+
* Invalidate nonces to prevent replay attacks
|
|
12083
|
+
* @param permit2 - Permit2 contract address
|
|
12084
|
+
* @param token - Token address
|
|
9897
12085
|
* @param spender - Spender address
|
|
9898
|
-
* @param
|
|
12086
|
+
* @param newNonce - New nonce value
|
|
12087
|
+
* @param spokeProvider - EVM Provider
|
|
12088
|
+
* @param raw - Whether to return raw transaction data
|
|
9899
12089
|
*/
|
|
9900
|
-
static
|
|
12090
|
+
static invalidateNonces<R extends boolean = false>(permit2: Address$1, token: Address$1, spender: Address$1, newNonce: number, spokeProvider: EvmSpokeProvider | SonicSpokeProvider, raw?: R): PromiseEvmTxReturnType<R>;
|
|
9901
12091
|
/**
|
|
9902
|
-
* Encodes
|
|
12092
|
+
* Encodes an approve transaction for Permit2.
|
|
12093
|
+
* @param permit2 - The address of the Permit2 contract.
|
|
9903
12094
|
* @param token - The address of the token.
|
|
9904
|
-
* @param
|
|
9905
|
-
* @param amount - The amount
|
|
12095
|
+
* @param spender - The address of the spender.
|
|
12096
|
+
* @param amount - The amount to approve.
|
|
12097
|
+
* @param expiration - The expiration timestamp.
|
|
9906
12098
|
* @returns The encoded contract call.
|
|
9907
12099
|
*/
|
|
9908
|
-
static
|
|
12100
|
+
static encodeApprove(permit2: Address$1, token: Address$1, spender: Address$1, amount: bigint, expiration: number): EvmContractCall;
|
|
9909
12101
|
/**
|
|
9910
|
-
* Encodes a
|
|
9911
|
-
* @param
|
|
9912
|
-
* @param
|
|
9913
|
-
* @param
|
|
9914
|
-
* @param
|
|
12102
|
+
* Encodes a permit transaction for Permit2.
|
|
12103
|
+
* @param permit2 - The address of the Permit2 contract.
|
|
12104
|
+
* @param owner - The owner address.
|
|
12105
|
+
* @param permitSingle - The permit data.
|
|
12106
|
+
* @param signature - The signature.
|
|
9915
12107
|
* @returns The encoded contract call.
|
|
9916
12108
|
*/
|
|
9917
|
-
static
|
|
12109
|
+
static encodePermit(permit2: Address$1, owner: Address$1, permitSingle: PermitSingle, signature: `0x${string}`): EvmContractCall;
|
|
9918
12110
|
/**
|
|
9919
|
-
* Encodes
|
|
9920
|
-
* @param
|
|
9921
|
-
* @param
|
|
9922
|
-
* @param
|
|
12111
|
+
* Encodes a transferFrom transaction for Permit2.
|
|
12112
|
+
* @param permit2 - The address of the Permit2 contract.
|
|
12113
|
+
* @param from - The from address.
|
|
12114
|
+
* @param to - The to address.
|
|
12115
|
+
* @param amount - The amount to transfer.
|
|
12116
|
+
* @param token - The token address.
|
|
9923
12117
|
* @returns The encoded contract call.
|
|
9924
12118
|
*/
|
|
9925
|
-
static
|
|
12119
|
+
static encodeTransferFrom(permit2: Address$1, from: Address$1, to: Address$1, amount: bigint, token: Address$1): EvmContractCall;
|
|
12120
|
+
/**
|
|
12121
|
+
* Encodes a transferFromBatch transaction for Permit2.
|
|
12122
|
+
* @param permit2 - The address of the Permit2 contract.
|
|
12123
|
+
* @param transferDetails - Array of transfer details.
|
|
12124
|
+
* @returns The encoded contract call.
|
|
12125
|
+
*/
|
|
12126
|
+
static encodeTransferFromBatch(permit2: Address$1, transferDetails: AllowanceTransferDetails[]): EvmContractCall;
|
|
9926
12127
|
}
|
|
9927
12128
|
|
|
9928
12129
|
type NearSpokeDepositParams = {
|
|
@@ -9938,6 +12139,7 @@ type LegacybnUSDTokenAddress = (typeof bnUSDLegacyTokens)[number]['address'];
|
|
|
9938
12139
|
type LegacybnUSDToken = (typeof bnUSDLegacyTokens)[number];
|
|
9939
12140
|
type NewbnUSDChainId = (typeof newbnUSDSpokeChainIds)[number];
|
|
9940
12141
|
type MoneyMarketServiceConfig = Prettify<MoneyMarketConfig & PartnerFeeConfig & RelayerApiConfig>;
|
|
12142
|
+
type ClServiceConfig = Prettify<ConcentratedLiquidityConfig & RelayerApiConfig>;
|
|
9941
12143
|
type SwapServiceConfig = Prettify<SolverConfig & PartnerFeeConfig & RelayerApiConfig>;
|
|
9942
12144
|
type MigrationServiceConfig = Prettify<RelayerApiConfig>;
|
|
9943
12145
|
type BridgeServiceConfig = Optional<PartnerFeeConfig, 'partnerFee'>;
|
|
@@ -10034,6 +12236,9 @@ type FeeAmount = {
|
|
|
10034
12236
|
type OptionalFee = {
|
|
10035
12237
|
fee?: PartnerFee;
|
|
10036
12238
|
};
|
|
12239
|
+
type OptionalSkipSimulation = {
|
|
12240
|
+
skipSimulation?: boolean;
|
|
12241
|
+
};
|
|
10037
12242
|
type EvmTxReturnType<T extends boolean> = T extends true ? TransactionReceipt : Hex$1;
|
|
10038
12243
|
type IconContractAddress = `cx${string}`;
|
|
10039
12244
|
type IcxTokenType = (typeof spokeChainConfig)[typeof ICON_MAINNET_CHAIN_ID]['addresses']['wICX'] | (typeof spokeChainConfig)[typeof ICON_MAINNET_CHAIN_ID]['nativeToken'];
|
|
@@ -10044,9 +12249,9 @@ type Result<T, E = Error | unknown> = {
|
|
|
10044
12249
|
ok: false;
|
|
10045
12250
|
error: E;
|
|
10046
12251
|
};
|
|
10047
|
-
type SpokeDepositParams = EvmSpokeDepositParams | InjectiveSpokeDepositParams | IconSpokeDepositParams;
|
|
10048
|
-
type GetSpokeDepositParamsType<T extends SpokeProviderType> = T extends EvmSpokeProvider ? EvmSpokeDepositParams : T extends EvmRawSpokeProvider ? EvmSpokeDepositParams : T extends InjectiveSpokeProvider ? InjectiveSpokeDepositParams : T extends InjectiveRawSpokeProvider ? InjectiveSpokeDepositParams : T extends SuiSpokeProvider ? SuiSpokeDepositParams : T extends SuiRawSpokeProvider ? SuiSpokeDepositParams : T extends IconSpokeProvider ? IconSpokeDepositParams : T extends IconRawSpokeProvider ? IconSpokeDepositParams : T extends StellarSpokeProvider ? StellarSpokeDepositParams : T extends StellarRawSpokeProvider ? StellarSpokeDepositParams : T extends SolanaSpokeProvider ? SolanaSpokeDepositParams : T extends SolanaRawSpokeProvider ? SolanaSpokeDepositParams : T extends SonicSpokeProvider ? SonicSpokeDepositParams : T extends SonicRawSpokeProvider ? SonicSpokeDepositParams : T extends BitcoinSpokeProvider ? BitcoinSpokeDepositParams : T extends BitcoinRawSpokeProvider ? BitcoinSpokeDepositParams : T extends NearSpokeProvider ? NearSpokeDepositParams : T extends NearRawSpokeProvider ? NearSpokeDepositParams : never;
|
|
10049
|
-
type GetAddressType<T extends SpokeProviderType> = T extends EvmSpokeProvider ? Address : T extends EvmRawSpokeProvider ? Address : T extends InjectiveSpokeProvider ? string : T extends InjectiveRawSpokeProvider ? string : T extends StellarSpokeProvider ? Hex$1 : T extends StellarRawSpokeProvider ? Hex$1 : T extends IconSpokeProvider ? IconAddress : T extends IconRawSpokeProvider ? IconAddress : T extends SuiSpokeProvider ? Hex$1 : T extends SuiRawSpokeProvider ? Hex$1 : T extends SolanaSpokeProvider ? Hex$1 : T extends SolanaRawSpokeProvider ? Hex$1 : T extends SonicSpokeProvider ? Address : T extends SonicRawSpokeProvider ? Address : T extends NearSpokeProvider ? Address : T extends NearRawSpokeProvider ? Address : never;
|
|
12252
|
+
type SpokeDepositParams = EvmSpokeDepositParams | InjectiveSpokeDepositParams | SuiSpokeDepositParams | IconSpokeDepositParams | StellarSpokeDepositParams | SolanaSpokeDepositParams | SonicSpokeDepositParams;
|
|
12253
|
+
type GetSpokeDepositParamsType<T extends SpokeProviderType> = T extends EvmSpokeProvider ? EvmSpokeDepositParams : T extends EvmRawSpokeProvider ? EvmSpokeDepositParams : T extends InjectiveSpokeProvider ? InjectiveSpokeDepositParams : T extends InjectiveRawSpokeProvider ? InjectiveSpokeDepositParams : T extends SuiSpokeProvider ? SuiSpokeDepositParams : T extends SuiRawSpokeProvider ? SuiSpokeDepositParams : T extends IconSpokeProvider ? IconSpokeDepositParams : T extends IconRawSpokeProvider ? IconSpokeDepositParams : T extends StellarSpokeProvider ? StellarSpokeDepositParams : T extends StellarRawSpokeProvider ? StellarSpokeDepositParams : T extends SolanaSpokeProvider ? SolanaSpokeDepositParams : T extends SolanaRawSpokeProvider ? SolanaSpokeDepositParams : T extends SonicSpokeProvider ? SonicSpokeDepositParams : T extends SonicRawSpokeProvider ? SonicSpokeDepositParams : T extends StacksSpokeProvider ? StacksSpokeDepositParams : T extends StacksRawSpokeProvider ? StacksSpokeDepositParams : T extends BitcoinSpokeProvider ? BitcoinSpokeDepositParams : T extends BitcoinRawSpokeProvider ? BitcoinSpokeDepositParams : T extends NearSpokeProvider ? NearSpokeDepositParams : T extends NearRawSpokeProvider ? NearSpokeDepositParams : never;
|
|
12254
|
+
type GetAddressType<T extends SpokeProviderType> = T extends EvmSpokeProvider ? Address : T extends EvmRawSpokeProvider ? Address : T extends InjectiveSpokeProvider ? string : T extends InjectiveRawSpokeProvider ? string : T extends StellarSpokeProvider ? Hex$1 : T extends StellarRawSpokeProvider ? Hex$1 : T extends IconSpokeProvider ? IconAddress : T extends IconRawSpokeProvider ? IconAddress : T extends SuiSpokeProvider ? Hex$1 : T extends SuiRawSpokeProvider ? Hex$1 : T extends SolanaSpokeProvider ? Hex$1 : T extends SolanaRawSpokeProvider ? Hex$1 : T extends SonicSpokeProvider ? Address : T extends SonicRawSpokeProvider ? Address : T extends StacksSpokeProvider ? string : T extends StacksRawSpokeProvider ? string : T extends NearSpokeProvider ? Address : T extends NearRawSpokeProvider ? Address : never;
|
|
10050
12255
|
type SolverConfigParams = Prettify<SolverConfig & Optional<PartnerFeeConfig, 'partnerFee'>> | Optional<PartnerFeeConfig, 'partnerFee'>;
|
|
10051
12256
|
type QuoteType = 'exact_input';
|
|
10052
12257
|
type SolverIntentQuoteRequest = {
|
|
@@ -10138,27 +12343,32 @@ type SuiRawTransaction = {
|
|
|
10138
12343
|
value: bigint;
|
|
10139
12344
|
data: Base64String;
|
|
10140
12345
|
};
|
|
12346
|
+
type StacksRawTransaction = {
|
|
12347
|
+
[key: string]: string | object | number;
|
|
12348
|
+
};
|
|
10141
12349
|
type EvmReturnType<Raw extends boolean> = Raw extends true ? EvmRawTransaction : Hex$1;
|
|
10142
12350
|
type SolanaReturnType<Raw extends boolean> = Raw extends true ? SolanaRawTransaction : string;
|
|
10143
12351
|
type StellarReturnType<Raw extends boolean> = Raw extends true ? StellarRawTransaction : string;
|
|
10144
12352
|
type IconReturnType<Raw extends boolean> = Raw extends true ? IconRawTransaction : Hex$1;
|
|
10145
12353
|
type SuiReturnType<Raw extends boolean> = Raw extends true ? SuiRawTransaction : string;
|
|
10146
12354
|
type InjectiveReturnType<Raw extends boolean> = Raw extends true ? InjectiveRawTransaction : string;
|
|
12355
|
+
type StacksReturnType<Raw extends boolean> = Raw extends true ? StacksRawTransaction : string;
|
|
10147
12356
|
type NearReturnType<Raw extends boolean> = Raw extends true ? NearRawTransaction : string;
|
|
10148
|
-
type HashTxReturnType = EvmReturnType<false> | SolanaReturnType<false> | IconReturnType<false> | SuiReturnType<false> | InjectiveReturnType<false> | StellarReturnType<false> | NearReturnType<false>;
|
|
10149
|
-
type RawTxReturnType = EvmRawTransaction | SolanaRawTransaction | InjectiveRawTransaction | IconRawTransaction | SuiRawTransaction | StellarRawTransaction | NearRawTransaction;
|
|
12357
|
+
type HashTxReturnType = EvmReturnType<false> | SolanaReturnType<false> | IconReturnType<false> | SuiReturnType<false> | InjectiveReturnType<false> | StellarReturnType<false> | StacksReturnType<false> | NearReturnType<false>;
|
|
12358
|
+
type RawTxReturnType = EvmRawTransaction | SolanaRawTransaction | InjectiveRawTransaction | IconRawTransaction | SuiRawTransaction | StellarRawTransaction | StacksRawTransaction | NearRawTransaction;
|
|
10150
12359
|
/**
|
|
10151
12360
|
* Return type for a transaction based on the given SpokeProvider or RawSpokeProvider.
|
|
10152
12361
|
* - If T extends RawSpokeProvider, Raw is forced to `true` (always returns raw tx type).
|
|
10153
12362
|
* - Otherwise, Raw parameter determines output type.
|
|
10154
12363
|
*/
|
|
10155
|
-
type TxReturnType<T extends SpokeProviderType, Raw extends boolean> = T extends RawSpokeProvider ? T['chainConfig']['chain']['type'] extends 'EVM' ? EvmReturnType<true> : T['chainConfig']['chain']['type'] extends 'SOLANA' ? SolanaReturnType<true> : T['chainConfig']['chain']['type'] extends 'STELLAR' ? StellarReturnType<true> : T['chainConfig']['chain']['type'] extends 'ICON' ? IconReturnType<true> : T['chainConfig']['chain']['type'] extends 'SUI' ? SuiReturnType<true> : T['chainConfig']['chain']['type'] extends 'INJECTIVE' ? InjectiveReturnType<true> : T['chainConfig']['chain']['type'] extends 'NEAR' ? NearReturnType<true> : RawTxReturnType : T extends SpokeProvider ? T['chainConfig']['chain']['type'] extends 'EVM' ? EvmReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'SOLANA' ? SolanaReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'STELLAR' ? StellarReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'ICON' ? IconReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'SUI' ? SuiReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'INJECTIVE' ? InjectiveReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'NEAR' ? NearReturnType<Raw> : Raw extends true ? RawTxReturnType : HashTxReturnType : Raw extends true ? RawTxReturnType : HashTxReturnType;
|
|
12364
|
+
type TxReturnType<T extends SpokeProviderType, Raw extends boolean> = T extends RawSpokeProvider ? T['chainConfig']['chain']['type'] extends 'EVM' ? EvmReturnType<true> : T['chainConfig']['chain']['type'] extends 'SOLANA' ? SolanaReturnType<true> : T['chainConfig']['chain']['type'] extends 'STELLAR' ? StellarReturnType<true> : T['chainConfig']['chain']['type'] extends 'ICON' ? IconReturnType<true> : T['chainConfig']['chain']['type'] extends 'SUI' ? SuiReturnType<true> : T['chainConfig']['chain']['type'] extends 'INJECTIVE' ? InjectiveReturnType<true> : T['chainConfig']['chain']['type'] extends 'STACKS' ? StacksReturnType<true> : T['chainConfig']['chain']['type'] extends 'NEAR' ? NearReturnType<true> : RawTxReturnType : T extends SpokeProvider ? T['chainConfig']['chain']['type'] extends 'EVM' ? EvmReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'SOLANA' ? SolanaReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'STELLAR' ? StellarReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'ICON' ? IconReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'SUI' ? SuiReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'INJECTIVE' ? InjectiveReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'STACKS' ? StacksReturnType<Raw> : T['chainConfig']['chain']['type'] extends 'NEAR' ? NearReturnType<Raw> : Raw extends true ? RawTxReturnType : HashTxReturnType : Raw extends true ? RawTxReturnType : HashTxReturnType;
|
|
10156
12365
|
type PromiseEvmTxReturnType<Raw extends boolean> = Promise<TxReturnType<EvmSpokeProvider, Raw>>;
|
|
10157
12366
|
type PromiseSolanaTxReturnType<Raw extends boolean> = Promise<TxReturnType<SolanaSpokeProvider, Raw>>;
|
|
10158
12367
|
type PromiseStellarTxReturnType<Raw extends boolean> = Promise<TxReturnType<StellarSpokeProvider, Raw>>;
|
|
10159
12368
|
type PromiseIconTxReturnType<Raw extends boolean> = Promise<TxReturnType<IconSpokeProvider, Raw>>;
|
|
10160
12369
|
type PromiseSuiTxReturnType<Raw extends boolean> = Promise<TxReturnType<SuiSpokeProvider, Raw>>;
|
|
10161
12370
|
type PromiseInjectiveTxReturnType<Raw extends boolean> = Promise<TxReturnType<InjectiveSpokeProvider, Raw>>;
|
|
12371
|
+
type PromiseStacksTxReturnType<Raw extends boolean> = Promise<TxReturnType<StacksSpokeProvider, Raw>>;
|
|
10162
12372
|
type PromiseNearTxReturnType<Raw extends boolean> = Promise<TxReturnType<NearSpokeProvider, Raw>>;
|
|
10163
12373
|
type PromiseNearRawTxReturnType<Raw extends boolean> = Promise<TxReturnType<NearSpokeProvider, Raw>>;
|
|
10164
12374
|
type PromiseTxReturnType<T extends SpokeProvider, Raw extends boolean> = T['chainConfig']['chain']['type'] extends 'EVM' ? Promise<TxReturnType<EvmSpokeProviderType, Raw>> : T['chainConfig']['chain']['type'] extends 'SOLANA' ? Promise<TxReturnType<SolanaSpokeProviderType, Raw>> : T['chainConfig']['chain']['type'] extends 'STELLAR' ? Promise<TxReturnType<StellarSpokeProviderType, Raw>> : T['chainConfig']['chain']['type'] extends 'ICON' ? Promise<TxReturnType<IconSpokeProviderType, Raw>> : T['chainConfig']['chain']['type'] extends 'SUI' ? Promise<TxReturnType<SuiSpokeProviderType, Raw>> : T['chainConfig']['chain']['type'] extends 'INJECTIVE' ? Promise<TxReturnType<InjectiveSpokeProviderType, Raw>> : T['chainConfig']['chain']['type'] extends 'NEAR' ? Promise<TxReturnType<NearSpokeProviderType, Raw>> : never;
|
|
@@ -10170,6 +12380,7 @@ type IconSpokeProviderType = IconSpokeProvider | IconRawSpokeProvider;
|
|
|
10170
12380
|
type SuiSpokeProviderType = SuiSpokeProvider | SuiRawSpokeProvider;
|
|
10171
12381
|
type InjectiveSpokeProviderType = InjectiveSpokeProvider | InjectiveRawSpokeProvider;
|
|
10172
12382
|
type SonicSpokeProviderType = SonicSpokeProvider | SonicRawSpokeProvider;
|
|
12383
|
+
type StacksSpokeProviderType = StacksSpokeProvider | StacksRawSpokeProvider;
|
|
10173
12384
|
type NearSpokeProviderType = NearSpokeProvider | NearRawSpokeProvider;
|
|
10174
12385
|
type Prettify<T> = {
|
|
10175
12386
|
[K in keyof T]: T[K];
|
|
@@ -10195,7 +12406,7 @@ type InjectiveGasEstimate = {
|
|
|
10195
12406
|
};
|
|
10196
12407
|
type GasEstimateType = EvmGasEstimate | SolanaGasEstimate | StellarGasEstimate | IconGasEstimate | SuiGasEstimate | InjectiveGasEstimate;
|
|
10197
12408
|
type GetEstimateGasReturnType<T extends SpokeProviderType> = T['chainConfig']['chain']['type'] extends 'EVM' ? EvmGasEstimate : T['chainConfig']['chain']['type'] extends 'SOLANA' ? SolanaGasEstimate : T['chainConfig']['chain']['type'] extends 'STELLAR' ? StellarGasEstimate : T['chainConfig']['chain']['type'] extends 'ICON' ? IconGasEstimate : T['chainConfig']['chain']['type'] extends 'SUI' ? SuiGasEstimate : T['chainConfig']['chain']['type'] extends 'INJECTIVE' ? InjectiveGasEstimate : GasEstimateType;
|
|
10198
|
-
type OptionalRaw<R extends boolean
|
|
12409
|
+
type OptionalRaw<R extends boolean> = {
|
|
10199
12410
|
raw?: R;
|
|
10200
12411
|
};
|
|
10201
12412
|
type OptionalTimeout = {
|
|
@@ -10214,6 +12425,14 @@ type RateLimitConfig = {
|
|
|
10214
12425
|
available: number;
|
|
10215
12426
|
};
|
|
10216
12427
|
type GetChainConfigType<T extends ChainType> = T extends 'EVM' ? EvmSpokeChainConfig : T extends 'SOLANA' ? SolanaChainConfig : T extends 'STELLAR' ? StellarSpokeChainConfig : T extends 'ICON' ? IconSpokeChainConfig : T extends 'SUI' ? SuiSpokeChainConfig : T extends 'INJECTIVE' ? InjectiveSpokeChainConfig : BaseSpokeChainConfig<T>;
|
|
12428
|
+
type RawDestinationParams = {
|
|
12429
|
+
toChainId: SpokeChainId;
|
|
12430
|
+
toAddress: string;
|
|
12431
|
+
};
|
|
12432
|
+
type SpokeProviderObjectType = {
|
|
12433
|
+
spokeProvider: SpokeProviderType;
|
|
12434
|
+
};
|
|
12435
|
+
type DestinationParamsType = RawDestinationParams | SpokeProviderObjectType;
|
|
10217
12436
|
type SonicAddressOrSpokeType = {
|
|
10218
12437
|
address: Address;
|
|
10219
12438
|
} | {
|
|
@@ -10601,6 +12820,7 @@ declare class ConfigService {
|
|
|
10601
12820
|
private supportedTokensPerChain;
|
|
10602
12821
|
private moneyMarketReserveAssetsSet;
|
|
10603
12822
|
private spokeChainIdsSet;
|
|
12823
|
+
private stakedATokenAddressesSet;
|
|
10604
12824
|
constructor({ backendApiService, config, sharedConfig }: ConfigServiceConstructorParams);
|
|
10605
12825
|
initialize(): Promise<Result<void>>;
|
|
10606
12826
|
getChains(): GetChainsApiResponse;
|
|
@@ -10632,7 +12852,12 @@ declare class ConfigService {
|
|
|
10632
12852
|
getSupportedSwapTokens(): GetSwapTokensApiResponse;
|
|
10633
12853
|
isNativeToken(chainId: SpokeChainId, token: Token | string): boolean;
|
|
10634
12854
|
findSupportedTokenBySymbol(chainId: SpokeChainId, symbol: string): XToken | undefined;
|
|
10635
|
-
|
|
12855
|
+
isValidStakedATokenAddress(address: Address): boolean;
|
|
12856
|
+
getOriginalAssetsFromVault(chainId: SpokeChainId, vault: Address): OriginalAssetAddress[];
|
|
12857
|
+
getSodaTokenAddress(chainId: SpokeChainId): string | undefined;
|
|
12858
|
+
getOriginalAssetAddressFromStakedATokenAddress: (chainId: SpokeChainId, address: Address) => OriginalAssetAddress;
|
|
12859
|
+
findTokenByOriginalAddress(originalAddress: OriginalAssetAddress, chainId: SpokeChainId): XToken | undefined;
|
|
12860
|
+
getDexPools(): PoolKey[];
|
|
10636
12861
|
isMoneyMarketSupportedToken(chainId: SpokeChainId, token: string): boolean;
|
|
10637
12862
|
isMoneyMarketReserveAsset(asset: Address): boolean;
|
|
10638
12863
|
isMoneyMarketReserveHubAsset(hubAsset: Address): boolean;
|
|
@@ -10710,6 +12935,9 @@ declare function sleep(ms: number): Promise<void>;
|
|
|
10710
12935
|
declare function isHubSpokeProvider(spokeProvider: SpokeProviderType, hubProvider: EvmHubProvider): boolean;
|
|
10711
12936
|
declare function constructRawSpokeProvider(config: RawSpokeProviderConfig): RawSpokeProvider;
|
|
10712
12937
|
|
|
12938
|
+
declare function waitForStacksTransaction(txid: string, rpc_url: string): Promise<boolean>;
|
|
12939
|
+
declare function serializeAddressData(address: string): Hex;
|
|
12940
|
+
|
|
10713
12941
|
type IcxMigrateParams = {
|
|
10714
12942
|
address: IcxTokenType;
|
|
10715
12943
|
amount: bigint;
|
|
@@ -11083,6 +13311,9 @@ declare function isIconSpokeProviderType(value: SpokeProviderType): value is Ico
|
|
|
11083
13311
|
declare function isIconSpokeProvider(value: SpokeProviderType): value is IconSpokeProvider;
|
|
11084
13312
|
declare function isSuiSpokeProviderType(value: SpokeProviderType): value is SuiSpokeProviderType;
|
|
11085
13313
|
declare function isSuiSpokeProvider(value: SpokeProviderType): value is SuiSpokeProvider;
|
|
13314
|
+
declare function isStacksSpokeProviderType(value: SpokeProviderType): value is StacksSpokeProviderType;
|
|
13315
|
+
declare function isStacksSpokeProvider(value: SpokeProviderType): value is StacksSpokeProvider;
|
|
13316
|
+
declare function isStacksRawSpokeProvider(value: unknown): value is StacksRawSpokeProvider;
|
|
11086
13317
|
declare function isConfiguredSolverConfig(value: SolverConfigParams): value is Prettify<SolverConfig & Optional<PartnerFeeConfig, 'partnerFee'>>;
|
|
11087
13318
|
declare function isConfiguredMoneyMarketConfig(value: MoneyMarketConfigParams): value is Prettify<MoneyMarketConfig & Optional<PartnerFeeConfig, 'partnerFee'>>;
|
|
11088
13319
|
declare function isIntentCreationFailedError(error: unknown): error is IntentError<'CREATION_FAILED'>;
|
|
@@ -11105,6 +13336,8 @@ declare function isUnifiedBnUSDMigrateParams(value: unknown): value is UnifiedBn
|
|
|
11105
13336
|
declare function isBalnMigrateParams(value: unknown): value is BalnMigrateParams;
|
|
11106
13337
|
declare function isIcxCreateRevertMigrationParams(value: unknown): value is IcxCreateRevertMigrationParams;
|
|
11107
13338
|
declare function isRawSpokeProvider(value: unknown): value is RawSpokeProvider;
|
|
13339
|
+
declare function isSpokeProvider(value: unknown): value is SpokeProvider;
|
|
13340
|
+
declare function isSpokeProviderType(value: unknown): value is SpokeProviderType;
|
|
11108
13341
|
declare function isEvmRawSpokeProvider(value: unknown): value is EvmRawSpokeProvider;
|
|
11109
13342
|
declare function isSolanaRawSpokeProvider(value: unknown): value is SolanaRawSpokeProvider;
|
|
11110
13343
|
declare function isStellarRawSpokeProvider(value: unknown): value is StellarRawSpokeProvider;
|
|
@@ -11115,11 +13348,14 @@ declare function isInjectiveRawSpokeProvider(value: unknown): value is Injective
|
|
|
11115
13348
|
declare function isSonicRawSpokeProvider(value: unknown): value is SonicRawSpokeProvider;
|
|
11116
13349
|
declare function isNearRawSpokeProvider(value: unknown): value is NearRawSpokeProvider;
|
|
11117
13350
|
declare function isAddressString(value: unknown): value is string;
|
|
13351
|
+
declare function isSpokeProviderObjectType(value: unknown): value is SpokeProviderObjectType;
|
|
13352
|
+
declare function isRawDestinationParams(value: unknown): value is RawDestinationParams;
|
|
11118
13353
|
declare function isEvmRawSpokeProviderConfig(value: RawSpokeProviderConfig): value is EvmRawSpokeProviderConfig;
|
|
11119
13354
|
declare function isSonicRawSpokeProviderConfig(value: RawSpokeProviderConfig): value is SonicRawSpokeProviderConfig;
|
|
11120
13355
|
declare function isStellarRawSpokeProviderConfig(value: RawSpokeProviderConfig): value is StellarRawSpokeProviderConfig;
|
|
11121
13356
|
declare function isSolanaRawSpokeProviderConfig(value: RawSpokeProviderConfig): value is SolanaRawSpokeProviderConfig;
|
|
11122
13357
|
declare function isNearRawSpokeProviderConfig(value: RawSpokeProviderConfig): value is NearRawSpokeProviderConfig;
|
|
13358
|
+
declare function isStacksRawSpokeProviderConfig(value: RawSpokeProviderConfig): value is StacksRawSpokeProviderConfig;
|
|
11123
13359
|
declare function isSubmitSwapTxResponse(value: unknown): value is SubmitSwapTxResponse;
|
|
11124
13360
|
declare function isSubmitSwapTxStatusResponse(value: unknown): value is SubmitSwapTxStatusResponse;
|
|
11125
13361
|
|
|
@@ -12176,4 +14412,587 @@ declare class MigrationService {
|
|
|
12176
14412
|
createRevertSodaToIcxMigrationIntent<S extends SonicSpokeProviderType = SonicSpokeProviderType, R extends boolean = false>(params: Omit<IcxCreateRevertMigrationParams, 'wICX'>, spokeProvider: S, raw?: R): Promise<Result<TxReturnType<S, R>, MigrationError<'CREATE_REVERT_MIGRATION_INTENT_FAILED'>>>;
|
|
12177
14413
|
}
|
|
12178
14414
|
|
|
12179
|
-
export { type AggregatedReserveData, type AllowanceResponse, type ApiResponse, type AssetEntry, type AutoSwapPreferences, type BackendApiConfig, BackendApiService, type Balance, type BalnLockParams, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BitcoinBaseSpokeProvider, BitcoinRawSpokeProvider, type BitcoinSpokeDepositParams, BitcoinSpokeProvider, type BitcoinSpokeProviderType, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinTransferToHubParams, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeError, type BridgeErrorCode, type BridgeExtraData, type BridgeOptionalExtraData, type BridgeParams, BridgeService, type BridgeServiceConfig, type BridgeServiceConstructorParams, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelUnstakeParams, type ClaimParams, type CombinedReserveData, type ComputedUserReserve, ConfigService, type ConfigServiceConfig, type ConfigServiceConstructorParams, type ConnMsg, type CreateBridgeIntentParams, type CreateIntentAutoSwapError, type CreateIntentParams, type CreateLimitOrderParams, type CustomProvider, CustomSorobanServer, CustomStellarAccount, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, type Default, type DepositSimulationParams, type DetailedLock, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, Erc20Service, EvmAssetManagerService, EvmBaseSpokeProvider, type EvmContractCall, type EvmDepositToDataParams, type EvmGasEstimate, EvmHubProvider, type EvmHubProviderConfig, type EvmHubProviderConstructorParams, type EvmInitializedConfig, EvmRawSpokeProvider, type EvmRawSpokeProviderConfig, type EvmReturnType, EvmSolverService, type EvmSpokeDepositParams, EvmSpokeProvider, type EvmSpokeProviderType, EvmSpokeService, type EvmTransferParams, type EvmTransferToHubParams, type EvmTxReturnType, type EvmUninitializedBrowserConfig, type EvmUninitializedConfig, type EvmUninitializedPrivateKeyConfig, EvmVaultTokenService, EvmWalletAbstraction, type EvmWithdrawAssetDataParams, type ExecuteIntentAutoSwapError, type ExecuteMsg, FEE_PERCENTAGE_SCALE, type FeeAmount, type FeeData, type FeeTokenApproveParams, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, type GasEstimateType, type GetAddressType, type GetChainConfigType, type GetEstimateGasReturnType, type GetIntentSubmitTxExtraDataParams, type GetMigrationFailedPayload, type GetMoneyMarketError, type GetMoneyMarketParams, type GetPacketParams, type GetPacketResponse, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeDepositParamsType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HashTxReturnType, HubService, type HubTxHash, ICON_TX_RESULT_WAIT_MAX_RETRY, type IRawSpokeProvider, type ISpokeProvider, type IWalletProvider, IconBaseSpokeProvider, type IconContractAddress, type IconGasEstimate, type IconJsonRpcVersion, IconRawSpokeProvider, type IconRawSpokeProviderConfig, type IconRawTransaction, type IconReturnType, type IconSpokeDepositParams, IconSpokeProvider, type IconSpokeProviderType, IconSpokeService, type IconTransferToHubParams, type IcxCreateRevertMigrationParams, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRawTransaction, type IcxRevertMigrationParams, type IcxTokenType, type IncentiveDataHumanized, type InjTokenInfo, Injective20Token, InjectiveBaseSpokeProvider, type InjectiveGasEstimate, InjectiveRawSpokeProvider, type InjectiveRawSpokeProviderConfig, type InjectiveReturnType, type InjectiveSpokeDepositParams, InjectiveSpokeProvider, type InjectiveSpokeProviderType, InjectiveSpokeService, type InjectiveTransferToHubParams, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapErrorData, type IntentAutoSwapResult, type IntentCancelFailedErrorData, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentCreationFailedErrorData, type IntentData, IntentDataType, type IntentDeliveryInfo, type IntentError, type IntentErrorCode, type IntentErrorData, IntentFilledEventAbi, type IntentFilledEventLog, type IntentPostExecutionFailedErrorData, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentSubmitTxFailedErrorData, type IntentWaitUntilIntentExecutedFailedErrorData, IntentsAbi, type JsonRpcPayloadResponse, LTV_PRECISION, type LegacybnUSDChainId, type LegacybnUSDToken, type LegacybnUSDTokenAddress, LendingPoolService, type LimitOrderParams, LockupMultiplier, LockupPeriod, MAX_UINT256, type MigrationAction, type MigrationError, type MigrationErrorCode, type MigrationErrorData, type MigrationFailedErrorData, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConfig, type MigrationServiceConstructorParams, type MigrationTokens, type MoneyMarketAction, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowFailedError, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketConfigParams, MoneyMarketDataService, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketExtraData, type MoneyMarketOptionalExtraData, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayFailedError, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConfig, type MoneyMarketServiceConstructorParams, type MoneyMarketSubmitTxFailedError, type MoneyMarketSupplyFailedError, type MoneyMarketSupplyParams, type MoneyMarketUnknownError, type MoneyMarketUnknownErrorCode, type MoneyMarketWithdrawFailedError, type MoneyMarketWithdrawParams, NearBaseSpokeProvider, NearRawSpokeProvider, type NearRawSpokeProviderConfig, type NearReturnType, NearSpokeProvider, type NearSpokeProviderType, type NearTransactionFailure, type NearTransactionResult, type NewbnUSDChainId, type OnDemandPayload, type Optional, type OptionalFee, type OptionalRaw, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerFee, type PartnerFeeAmount, type PartnerFeeClaimAssetBalance, PartnerFeeClaimService, type PartnerFeeClaimServiceConfig, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapParams, type PartnerFeeConfig, type PartnerFeePercentage, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, type Payload, type PoolBaseCurrencyHumanized, type Prettify, type PromiseEvmTxReturnType, type PromiseIconTxReturnType, type PromiseInjectiveTxReturnType, type PromiseNearRawTxReturnType, type PromiseNearTxReturnType, type PromiseSolanaTxReturnType, type PromiseStellarTxReturnType, type PromiseSuiTxReturnType, type PromiseTxReturnType, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, type QuoteType, RAY, RAY_DECIMALS, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiConfig, RadfiProvider, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawSpokeProvider, type RawSpokeProviderConfig, type RawTxReturnType, type RelayAction, type RelayError, type RelayErrorCode, type RelayExtraData, type RelayOptionalExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayerApiConfig, type RequestConfig, type RequestOverrideConfig, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResponseAddressType, type ResponseSigningType, type Result, type RewardInfoHumanized, SECONDS_PER_YEAR, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_PRIORITY_FEE, type SetSwapPreferenceError, type SetSwapPreferenceParams, Sodax, type SodaxConfig, SolanaBaseSpokeProvider, type SolanaGasEstimate, SolanaRawSpokeProvider, type SolanaRawSpokeProviderConfig, type SolanaRawTransaction, type SolanaReturnType, type SolanaSpokeDepositParams, SolanaSpokeProvider, type SolanaSpokeProviderType, SolanaSpokeService, type SolanaTransferToHubParams, SolverApiService, type SolverConfigParams, type SolverErrorResponse, type SolverExecutionRequest, type SolverExecutionResponse, SolverIntentErrorCode, type SolverIntentQuoteRequest, type SolverIntentQuoteResponse, type SolverIntentQuoteResponseRaw, SolverIntentStatusCode, type SolverIntentStatusRequest, type SolverIntentStatusResponse, type SonicAddressOrSpokeType, SonicBaseSpokeProvider, SonicRawSpokeProvider, type SonicRawSpokeProviderConfig, type SonicSpokeDepositParams, SonicSpokeProvider, type SonicSpokeProviderType, SonicSpokeService, type SpokeDepositParams, type SpokeProvider, type SpokeProviderType, SpokeService, type SpokeTokenSymbols, type SpokeTxHash, type StakeParams, type StakingAction, type StakingConfig, type StakingError, type StakingErrorCode, type StakingInfo, StakingLogic, type StakingParams, StakingService, type StakingServiceConstructorParams, type State, StellarBaseSpokeProvider, type StellarGasEstimate, StellarRawSpokeProvider, type StellarRawSpokeProviderConfig, type StellarReturnType, type StellarSpokeDepositParams, StellarSpokeProvider, type StellarSpokeProviderType, StellarSpokeService, type StellarTransferToHubParams, type SubmitTxExtraData, type SubmitTxParams, type SubmitTxResponse, SuiBaseSpokeProvider, type SuiGasEstimate, SuiRawSpokeProvider, type SuiRawSpokeProviderConfig, type SuiRawTransaction, type SuiReturnType, type SuiSpokeDepositParams, SuiSpokeProvider, type SuiSpokeProviderType, SuiSpokeService, type SuiTransferToHubParams, SupportedMigrationTokens, type SwapParams, SwapService, type SwapServiceConfig, type SwapServiceConstructorParams, type TxReturnType, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UnifiedBnUSDMigrateParams, type UnknownIntentAutoSwapError, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakeSodaRequest, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type UserUnstakeInfo, VAULT_TOKEN_DECIMALS, type VaultReserves, type VerifyTxHashRawConfig, type VerifyTxHashRawConfigType, type VerifyTxHashRawEvmConfig, type VerifyTxHashRawNearConfig, type VerifyTxHashRawSolanaConfig, type VerifyTxHashRawStellarConfig, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitIntentAutoSwapError, type WaitUntilIntentExecutedPayload, WalletAbstractionService, type WalletMode, type WalletSimulationParams, type WithdrawInfo, adjustAmountByFee, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, connectionAbi, constructRawSpokeProvider, convertTransactionInstructionToRaw, deriveUserWalletAddress, encodeAddress, encodeContractCalls, erc20Abi, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getEvmViemChain, getHubChainConfig, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, isAddressString, isBalnMigrateParams, isBitcoinRawSpokeProvider, isBitcoinSpokeProvider, isBitcoinSpokeProviderType, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isCreateIntentAutoSwapError, isEvmHubChainConfig, isEvmInitializedConfig, isEvmRawSpokeProvider, isEvmRawSpokeProviderConfig, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmSpokeProviderType, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isHubSpokeProvider, isIconAddress, isIconRawSpokeProvider, isIconSpokeProvider, isIconSpokeProviderType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveRawSpokeProvider, isInjectiveSpokeProvider, isInjectiveSpokeProviderType, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketWithdrawUnknownError, isNearRawSpokeProvider, isNearRawSpokeProviderConfig, isNearSpokeProvider, isNearSpokeProviderType, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isRawSpokeProvider, isResponseAddressType, isResponseSigningType, isSetSwapPreferenceError, isSolanaNativeToken, isSolanaRawSpokeProvider, isSolanaRawSpokeProviderConfig, isSolanaSpokeProvider, isSolanaSpokeProviderType, isSolverErrorResponse, isSonicRawSpokeProvider, isSonicRawSpokeProviderConfig, isSonicSpokeProvider, isSonicSpokeProviderType, isStellarRawSpokeProvider, isStellarRawSpokeProviderConfig, isStellarSpokeProvider, isStellarSpokeProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiRawSpokeProvider, isSuiSpokeProvider, isSuiSpokeProviderType, isUnifiedBnUSDMigrateParams, isUnknownIntentAutoSwapError, isWaitIntentAutoSwapError, isWaitUntilIntentExecutedFailed, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizePsbtToBase64, normalizedToUsd, parseToStroops, parseTokenArrayFromJson, poolAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, sleep, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingRouterAbi, submitTransaction, uiPoolDataAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|
|
14415
|
+
type AssetServiceConfig = {
|
|
14416
|
+
concentratedLiquidityConfig: ConcentratedLiquidityConfig;
|
|
14417
|
+
};
|
|
14418
|
+
type AssetServiceConfigParams = AssetServiceConfig;
|
|
14419
|
+
type CreateAssetWithdrawParams = {
|
|
14420
|
+
poolToken: Address$1;
|
|
14421
|
+
asset: OriginalAssetAddress;
|
|
14422
|
+
amount: bigint;
|
|
14423
|
+
dst?: DestinationParamsType;
|
|
14424
|
+
};
|
|
14425
|
+
type CreateAssetDepositParams = {
|
|
14426
|
+
asset: OriginalAssetAddress;
|
|
14427
|
+
amount: bigint;
|
|
14428
|
+
poolToken: Address$1;
|
|
14429
|
+
dst?: DestinationParamsType;
|
|
14430
|
+
};
|
|
14431
|
+
type AssetWithdrawParams<S extends SpokeProviderType = SpokeProviderType> = {
|
|
14432
|
+
params: CreateAssetWithdrawParams;
|
|
14433
|
+
spokeProvider: S;
|
|
14434
|
+
};
|
|
14435
|
+
type AssetDepositParams<S extends SpokeProviderType = SpokeProviderType> = {
|
|
14436
|
+
params: CreateAssetDepositParams;
|
|
14437
|
+
spokeProvider: S;
|
|
14438
|
+
};
|
|
14439
|
+
type AssetServiceUnknownErrorCode = 'DEPOSIT_UNKNOWN_ERROR' | 'ALLOWANCE_CHECK_FAILED' | 'APPROVAL_FAILED';
|
|
14440
|
+
type GetAssetServiceParams<T extends AssetServiceUnknownErrorCode> = T extends 'DEPOSIT_UNKNOWN_ERROR' ? CreateAssetDepositParams : T extends 'ALLOWANCE_CHECK_FAILED' ? CreateAssetDepositParams : T extends 'APPROVAL_FAILED' ? CreateAssetDepositParams : CreateAssetDepositParams;
|
|
14441
|
+
type AssetServiceErrorCode = AssetServiceUnknownErrorCode | RelayErrorCode | 'CREATE_DEPOSIT_INTENT_FAILED' | 'CREATE_WITHDRAW_LIQUIDITY_INTENT_FAILED';
|
|
14442
|
+
type AssetServiceUnknownError<T extends AssetServiceUnknownErrorCode> = {
|
|
14443
|
+
error: unknown;
|
|
14444
|
+
payload: GetAssetServiceParams<T>;
|
|
14445
|
+
};
|
|
14446
|
+
type AssetServiceSubmitTxFailedError = {
|
|
14447
|
+
error: RelayError;
|
|
14448
|
+
payload: string;
|
|
14449
|
+
};
|
|
14450
|
+
type AssetServiceDepositFailedError = {
|
|
14451
|
+
error: unknown;
|
|
14452
|
+
payload: CreateAssetDepositParams;
|
|
14453
|
+
};
|
|
14454
|
+
type AssetServiceWithdrawFailedError = {
|
|
14455
|
+
error: unknown;
|
|
14456
|
+
payload: AssetWithdrawParams;
|
|
14457
|
+
};
|
|
14458
|
+
type AssetServiceAllowanceCheckFailedError = {
|
|
14459
|
+
error: unknown;
|
|
14460
|
+
payload: CreateAssetDepositParams;
|
|
14461
|
+
};
|
|
14462
|
+
type AssetServiceApprovalFailedError = {
|
|
14463
|
+
error: unknown;
|
|
14464
|
+
payload: CreateAssetDepositParams;
|
|
14465
|
+
};
|
|
14466
|
+
type GetAssetServiceError<T extends AssetServiceErrorCode> = T extends 'SUBMIT_TX_FAILED' ? AssetServiceSubmitTxFailedError : T extends 'RELAY_TIMEOUT' ? AssetServiceSubmitTxFailedError : T extends 'CREATE_DEPOSIT_INTENT_FAILED' ? AssetServiceDepositFailedError : T extends 'CREATE_WITHDRAW_LIQUIDITY_INTENT_FAILED' ? AssetServiceWithdrawFailedError : T extends 'ALLOWANCE_CHECK_FAILED' ? AssetServiceAllowanceCheckFailedError : T extends 'APPROVAL_FAILED' ? AssetServiceApprovalFailedError : T extends AssetServiceUnknownErrorCode ? AssetServiceUnknownError<T> : never;
|
|
14467
|
+
type AssetServiceError<T extends AssetServiceErrorCode> = {
|
|
14468
|
+
code: T;
|
|
14469
|
+
data: GetAssetServiceError<T>;
|
|
14470
|
+
};
|
|
14471
|
+
type AssetServiceConstructorParams = {
|
|
14472
|
+
config?: AssetServiceConfigParams;
|
|
14473
|
+
hubProvider: EvmHubProvider;
|
|
14474
|
+
relayerApiEndpoint?: HttpUrl;
|
|
14475
|
+
configService: ConfigService;
|
|
14476
|
+
};
|
|
14477
|
+
declare class AssetService {
|
|
14478
|
+
readonly config: AssetServiceConfig;
|
|
14479
|
+
private readonly relayerApiEndpoint;
|
|
14480
|
+
private readonly hubProvider;
|
|
14481
|
+
private readonly configService;
|
|
14482
|
+
constructor({ config, hubProvider, relayerApiEndpoint, configService }: AssetServiceConstructorParams);
|
|
14483
|
+
/**
|
|
14484
|
+
* Check whether sufficient allowance is available for an asset deposit action.
|
|
14485
|
+
* This determines whether a contract/manager can transfer the specified ERC20 asset on behalf of the user,
|
|
14486
|
+
* or whether approval or, for Stellar, trustlines are needed.
|
|
14487
|
+
*
|
|
14488
|
+
* For EVM-based chains, checks ERC20 allowance against the asset manager (for EvmSpokeProvider),
|
|
14489
|
+
* or against the user router contract (for SonicSpokeProvider on Sonic chains).
|
|
14490
|
+
* For Stellar, verifies if the sender's trustline is sufficient.
|
|
14491
|
+
* For all other chains, returns `true` (approval is not required).
|
|
14492
|
+
*
|
|
14493
|
+
* @param {AssetDepositParams<S>} params - Object containing:
|
|
14494
|
+
* - depositParams: Deposit input parameters (asset address, amount, etc.)
|
|
14495
|
+
* - spokeProvider: The provider instance for the originating chain
|
|
14496
|
+
* @returns {Promise<Result<boolean, AssetServiceError<'ALLOWANCE_CHECK_FAILED'>>>}
|
|
14497
|
+
* Resolves with Result.ok(true) if allowance/trustline is sufficient, or Result.ok(false) if not,
|
|
14498
|
+
* or Result.error if allowance/trustline check failed.
|
|
14499
|
+
*
|
|
14500
|
+
* @example
|
|
14501
|
+
* const result = await assetService.isAllowanceValid({
|
|
14502
|
+
* depositParams: { asset: '0x...', amount: 1000n },
|
|
14503
|
+
* spokeProvider,
|
|
14504
|
+
* });
|
|
14505
|
+
* if (!result.ok) {
|
|
14506
|
+
* // Handle error (e.g. result.error)
|
|
14507
|
+
* } else if (!result.value) {
|
|
14508
|
+
* // Approval or trustline is needed
|
|
14509
|
+
* }
|
|
14510
|
+
*/
|
|
14511
|
+
isAllowanceValid<S extends SpokeProvider = SpokeProvider>({ params, spokeProvider, }: AssetDepositParams<S>): Promise<Result<boolean, AssetServiceError<'ALLOWANCE_CHECK_FAILED'>>>;
|
|
14512
|
+
/**
|
|
14513
|
+
* Approves the amount spending for deposit actions.
|
|
14514
|
+
* @param params - The parameters for the asset transaction.
|
|
14515
|
+
* @param spokeProvider - The spoke provider.
|
|
14516
|
+
* @param raw - Whether to return the raw transaction hash instead of the transaction receipt
|
|
14517
|
+
* @returns {Promise<Result<TxReturnType<S, R>>>} - Returns the raw transaction payload or transaction hash
|
|
14518
|
+
*
|
|
14519
|
+
* @example
|
|
14520
|
+
* const result = await assetService.approve(
|
|
14521
|
+
* {
|
|
14522
|
+
* asset: '0x...', // asset address
|
|
14523
|
+
* amount: 1000n, // amount to deposit
|
|
14524
|
+
* },
|
|
14525
|
+
* spokeProvider, // EvmSpokeProvider or SonicSpokeProvider instance
|
|
14526
|
+
* true // Optional raw flag to return the raw transaction hash instead of the transaction receipt
|
|
14527
|
+
* );
|
|
14528
|
+
*
|
|
14529
|
+
*/
|
|
14530
|
+
approve<S extends SpokeProviderType, R extends boolean = false>({ params, spokeProvider, raw, }: Prettify<AssetDepositParams<S> & OptionalRaw<R>>): Promise<Result<TxReturnType<S, R>, AssetServiceError<'APPROVAL_FAILED'>>>;
|
|
14531
|
+
/**
|
|
14532
|
+
* Execute deposit action - wraps tokens and prepares for liquidity provision
|
|
14533
|
+
*/
|
|
14534
|
+
executeDeposit<S extends SpokeProviderType, R extends boolean = false>({ params, spokeProvider, raw, }: Prettify<AssetDepositParams<S> & OptionalRaw<R>>): Promise<Result<TxReturnType<S, R>, AssetServiceError<'CREATE_DEPOSIT_INTENT_FAILED'>> & RelayOptionalExtraData>;
|
|
14535
|
+
/**
|
|
14536
|
+
* Execute withdraw action - withdraws tokens from a position
|
|
14537
|
+
*/
|
|
14538
|
+
executeWithdraw<S extends SpokeProvider, R extends boolean = false>({ params, spokeProvider, raw, }: Prettify<AssetWithdrawParams<S> & OptionalRaw<R>>): Promise<Result<TxReturnType<S, R>, AssetServiceError<'CREATE_WITHDRAW_LIQUIDITY_INTENT_FAILED'>> & RelayOptionalExtraData>;
|
|
14539
|
+
/**
|
|
14540
|
+
* Check if the asset is SODA and the pool token is XSODA (requires stake/unstake if yes)
|
|
14541
|
+
* @param chainId - The chain id
|
|
14542
|
+
* @param asset - The asset address
|
|
14543
|
+
* @param poolToken - The pool token address
|
|
14544
|
+
* @returns True if the asset is SODA and the pool token is XSODA, false otherwise
|
|
14545
|
+
*/
|
|
14546
|
+
isSodaAsXSodaInPool({ chainId, asset, poolToken, }: {
|
|
14547
|
+
chainId: SpokeChainId;
|
|
14548
|
+
asset: OriginalAssetAddress;
|
|
14549
|
+
poolToken: Address$1;
|
|
14550
|
+
}): boolean;
|
|
14551
|
+
/**
|
|
14552
|
+
* Deposit tokens and wait for the transaction to be relayed to the hub.
|
|
14553
|
+
*
|
|
14554
|
+
* This method wraps {@link executeDeposit} and performs post-processing to relay
|
|
14555
|
+
* the resulting transaction to the hub. It returns both the spoke chain
|
|
14556
|
+
* transaction hash and the hub transaction hash (post-relay).
|
|
14557
|
+
*
|
|
14558
|
+
* @typeParam S - The type of SpokeProvider.
|
|
14559
|
+
* @param params - Parameters for the deposit operation:
|
|
14560
|
+
* - depositParams: Parameters for the deposit intent (asset, amount, poolToken, etc).
|
|
14561
|
+
* - spokeProvider: The spoke provider instance (EvmSpokeProvider or SonicSpokeProvider).
|
|
14562
|
+
* - timeout (optional): Timeout in ms to wait for hub relay (default: 60000).
|
|
14563
|
+
*
|
|
14564
|
+
* @returns A promise that resolves to a {@link Result} containing a tuple with
|
|
14565
|
+
* [spokeTxHash, hubTxHash] as value on success, or an {@link AssetServiceError} on failure.
|
|
14566
|
+
*
|
|
14567
|
+
* @example
|
|
14568
|
+
* const result = await assetService.deposit({
|
|
14569
|
+
* depositParams: {
|
|
14570
|
+
* asset: '0x...', // asset address
|
|
14571
|
+
* amount: 1000n, // amount to deposit
|
|
14572
|
+
* poolToken: '0x...', // pool token address
|
|
14573
|
+
* },
|
|
14574
|
+
* spokeProvider, // instance of EvmSpokeProvider or SonicSpokeProvider
|
|
14575
|
+
* timeout: 30000, // optional, in ms
|
|
14576
|
+
* });
|
|
14577
|
+
*
|
|
14578
|
+
* if (!result.ok) {
|
|
14579
|
+
* // handle error
|
|
14580
|
+
* } else {
|
|
14581
|
+
* const [spokeTxHash, hubTxHash] = result.value;
|
|
14582
|
+
* console.log('Deposit transaction hashes:', { spokeTxHash, hubTxHash });
|
|
14583
|
+
* }
|
|
14584
|
+
*/
|
|
14585
|
+
deposit<S extends SpokeProvider>({ params: depositParams, spokeProvider, timeout, }: Prettify<AssetDepositParams<S> & OptionalTimeout>): Promise<Result<[SpokeTxHash, HubTxHash], AssetServiceError<AssetServiceErrorCode>>>;
|
|
14586
|
+
/**
|
|
14587
|
+
* Withdraw and wait for the transaction to be relayed to the hub
|
|
14588
|
+
* This method wraps executeWithdraw and relays the transaction to the hub
|
|
14589
|
+
*
|
|
14590
|
+
* @example
|
|
14591
|
+
* const result = await assetService.withdraw(
|
|
14592
|
+
* {
|
|
14593
|
+
* asset: '0x...', // asset address
|
|
14594
|
+
* amount: 1000n, // amount to withdraw
|
|
14595
|
+
* poolToken: '0x...', // pool token address
|
|
14596
|
+
* },
|
|
14597
|
+
* spokeProvider, // EvmSpokeProvider or SonicSpokeProvider instance
|
|
14598
|
+
* 30000 // Optional timeout in milliseconds (default: 60000)
|
|
14599
|
+
* );
|
|
14600
|
+
*
|
|
14601
|
+
* if (!result.ok) {
|
|
14602
|
+
* // Handle error
|
|
14603
|
+
* }
|
|
14604
|
+
*
|
|
14605
|
+
* const [spokeTxHash, hubTxHash] = result.value;
|
|
14606
|
+
* console.log('Withdraw transaction hashes:', { spokeTxHash, hubTxHash });
|
|
14607
|
+
*/
|
|
14608
|
+
withdraw<S extends SpokeProvider>({ params, spokeProvider, timeout, }: Prettify<AssetWithdrawParams<S> & OptionalTimeout>): Promise<Result<[SpokeTxHash, HubTxHash], AssetServiceError<AssetServiceErrorCode>>>;
|
|
14609
|
+
getTokenWrapAction(address: OriginalAssetAddress, spokeChainId: SpokeChainId, amount: bigint, poolToken: Address$1, recipient: Address$1): Promise<EvmContractCall[]>;
|
|
14610
|
+
/**
|
|
14611
|
+
* Get the token unwrap action for a given asset
|
|
14612
|
+
* @param address - The address of the asset
|
|
14613
|
+
* @param dstChainId - The destination spoke chain id
|
|
14614
|
+
* @param amount - The amount of the wrapped assets
|
|
14615
|
+
* @param userAddress - The address of the user wallet
|
|
14616
|
+
* @param recipient - The address of the recipient
|
|
14617
|
+
* @returns The token unwrap action
|
|
14618
|
+
*/
|
|
14619
|
+
getTokenUnwrapAction(dstChainId: SpokeChainId, address: OriginalAssetAddress, amount: bigint, userAddress: Address$1, recipient: Hex): Promise<EvmContractCall[]>;
|
|
14620
|
+
/**
|
|
14621
|
+
* Helper method to convert assets to shares (wrapped amount)
|
|
14622
|
+
* EX BTC -> BTC deposited in moneymarket earning intrest.
|
|
14623
|
+
* @param dexToken - The ERC4626 token address
|
|
14624
|
+
* @param assetAmount - The amount of underlying assets
|
|
14625
|
+
* @returns The equivalent amount of shares
|
|
14626
|
+
*/
|
|
14627
|
+
getWrappedAmount(dexToken: Address$1, assetAmount: bigint): Promise<bigint>;
|
|
14628
|
+
/**
|
|
14629
|
+
* Helper method to convert shares to assets (unwrapped amount)
|
|
14630
|
+
* EX BTC deposited in moneymarket earning intrest -> BTC.
|
|
14631
|
+
* @param dexToken - The ERC4626 token address
|
|
14632
|
+
* @param shareAmount - The amount of shares
|
|
14633
|
+
* @returns The equivalent amount of underlying assets
|
|
14634
|
+
*/
|
|
14635
|
+
getUnwrappedAmount(dexToken: Address$1, shareAmount: bigint): Promise<bigint>;
|
|
14636
|
+
getDeposit(poolToken: Address$1, spokeProvider: SpokeProvider): Promise<bigint>;
|
|
14637
|
+
}
|
|
14638
|
+
|
|
14639
|
+
type ClMintPositionEventLog = {
|
|
14640
|
+
tokenId: bigint;
|
|
14641
|
+
};
|
|
14642
|
+
type PoolRewardConfig = {
|
|
14643
|
+
rewardCurrency: Address;
|
|
14644
|
+
rewardRatePerSecond: bigint;
|
|
14645
|
+
lastActionTimestamp: bigint;
|
|
14646
|
+
};
|
|
14647
|
+
type ApyRange = {
|
|
14648
|
+
minApy: number;
|
|
14649
|
+
maxApy: number;
|
|
14650
|
+
};
|
|
14651
|
+
type ConcentratedLiquidityClaimRewardsParams = {
|
|
14652
|
+
poolKey: PoolKey;
|
|
14653
|
+
tokenId: bigint;
|
|
14654
|
+
tickLower: bigint;
|
|
14655
|
+
tickUpper: bigint;
|
|
14656
|
+
};
|
|
14657
|
+
type ConcentratedLiquiditySupplyParams = {
|
|
14658
|
+
poolKey: PoolKey;
|
|
14659
|
+
tickLower: bigint;
|
|
14660
|
+
tickUpper: bigint;
|
|
14661
|
+
liquidity: bigint;
|
|
14662
|
+
amount0Max: bigint;
|
|
14663
|
+
amount1Max: bigint;
|
|
14664
|
+
sqrtPriceX96: bigint;
|
|
14665
|
+
};
|
|
14666
|
+
type ConcentratedLiquidityGetPoolDataParams = {
|
|
14667
|
+
token0: string;
|
|
14668
|
+
token1: string;
|
|
14669
|
+
fee: bigint;
|
|
14670
|
+
};
|
|
14671
|
+
type ConcentratedLiquidityWithdrawParams = {
|
|
14672
|
+
asset: OriginalAssetAddress;
|
|
14673
|
+
amount: bigint;
|
|
14674
|
+
};
|
|
14675
|
+
type ConcentratedLiquidityIncreaseLiquidityParams = {
|
|
14676
|
+
poolKey: PoolKey;
|
|
14677
|
+
tokenId: bigint;
|
|
14678
|
+
tickLower: bigint;
|
|
14679
|
+
tickUpper: bigint;
|
|
14680
|
+
liquidity: bigint;
|
|
14681
|
+
amount0Max: bigint;
|
|
14682
|
+
amount1Max: bigint;
|
|
14683
|
+
sqrtPriceX96: bigint;
|
|
14684
|
+
};
|
|
14685
|
+
type ConcentratedLiquidityDecreaseLiquidityParams = {
|
|
14686
|
+
poolKey: PoolKey;
|
|
14687
|
+
tokenId: bigint;
|
|
14688
|
+
liquidity: bigint;
|
|
14689
|
+
amount0Min: bigint;
|
|
14690
|
+
amount1Min: bigint;
|
|
14691
|
+
};
|
|
14692
|
+
type ConcentratedLiquidityParams = ConcentratedLiquiditySupplyParams | ConcentratedLiquidityIncreaseLiquidityParams | ConcentratedLiquidityDecreaseLiquidityParams | ConcentratedLiquidityWithdrawParams | ConcentratedLiquidityClaimRewardsParams;
|
|
14693
|
+
type SupplyLiquidityParams<S extends SpokeProviderType> = Prettify<{
|
|
14694
|
+
params: ConcentratedLiquiditySupplyParams;
|
|
14695
|
+
spokeProvider: S;
|
|
14696
|
+
}>;
|
|
14697
|
+
type IncreaseLiquidityParams<S extends SpokeProviderType> = Prettify<{
|
|
14698
|
+
params: ConcentratedLiquidityIncreaseLiquidityParams;
|
|
14699
|
+
spokeProvider: S;
|
|
14700
|
+
}>;
|
|
14701
|
+
type DecreaseLiquidityParams<S extends SpokeProviderType> = Prettify<{
|
|
14702
|
+
params: ConcentratedLiquidityDecreaseLiquidityParams;
|
|
14703
|
+
spokeProvider: S;
|
|
14704
|
+
}>;
|
|
14705
|
+
type ClaimRewardsParams<S extends SpokeProviderType> = Prettify<{
|
|
14706
|
+
params: ConcentratedLiquidityClaimRewardsParams;
|
|
14707
|
+
spokeProvider: S;
|
|
14708
|
+
}>;
|
|
14709
|
+
type ClPositionInfo = {
|
|
14710
|
+
poolKey: PoolKey;
|
|
14711
|
+
tickLower: number;
|
|
14712
|
+
tickUpper: number;
|
|
14713
|
+
liquidity: bigint;
|
|
14714
|
+
feeGrowthInside0LastX128: bigint;
|
|
14715
|
+
feeGrowthInside1LastX128: bigint;
|
|
14716
|
+
subscriber: Address;
|
|
14717
|
+
amount0: bigint;
|
|
14718
|
+
amount1: bigint;
|
|
14719
|
+
tickLowerPrice: Price<Token$1, Token$1>;
|
|
14720
|
+
tickUpperPrice: Price<Token$1, Token$1>;
|
|
14721
|
+
unclaimedFees0: bigint;
|
|
14722
|
+
unclaimedFees1: bigint;
|
|
14723
|
+
amount0Underlying?: bigint;
|
|
14724
|
+
amount1Underlying?: bigint;
|
|
14725
|
+
unclaimedFees0Underlying?: bigint;
|
|
14726
|
+
unclaimedFees1Underlying?: bigint;
|
|
14727
|
+
};
|
|
14728
|
+
/**
|
|
14729
|
+
* Token data with optional ERC4626 conversion information
|
|
14730
|
+
*/
|
|
14731
|
+
type TokenWithConversion = Token$1 & {
|
|
14732
|
+
isStatAToken: boolean;
|
|
14733
|
+
conversionRate?: bigint;
|
|
14734
|
+
underlyingToken?: Token$1;
|
|
14735
|
+
};
|
|
14736
|
+
/**
|
|
14737
|
+
* Extended token object with StatAToken metadata
|
|
14738
|
+
*/
|
|
14739
|
+
type EnrichedToken = {
|
|
14740
|
+
token: Token$1;
|
|
14741
|
+
isStatAToken: boolean;
|
|
14742
|
+
conversionRate?: bigint;
|
|
14743
|
+
underlyingToken?: Token$1;
|
|
14744
|
+
};
|
|
14745
|
+
interface ConcentratedLiquidityTokenInfo {
|
|
14746
|
+
symbol: string;
|
|
14747
|
+
name: string;
|
|
14748
|
+
decimals: number;
|
|
14749
|
+
address: Address;
|
|
14750
|
+
}
|
|
14751
|
+
interface PoolData {
|
|
14752
|
+
poolId: string;
|
|
14753
|
+
poolKey: {
|
|
14754
|
+
currency0: Address;
|
|
14755
|
+
currency1: Address;
|
|
14756
|
+
hooks: Address;
|
|
14757
|
+
poolManager: Address;
|
|
14758
|
+
fee: number;
|
|
14759
|
+
parameters: string;
|
|
14760
|
+
};
|
|
14761
|
+
sqrtPriceX96: bigint;
|
|
14762
|
+
currentTick: number;
|
|
14763
|
+
protocolFee: number;
|
|
14764
|
+
lpFee: number;
|
|
14765
|
+
price: Price<Token$1, Token$1>;
|
|
14766
|
+
totalLiquidity: bigint;
|
|
14767
|
+
feeTier: number;
|
|
14768
|
+
tickSpacing: number;
|
|
14769
|
+
token0: Token$1;
|
|
14770
|
+
token1: Token$1;
|
|
14771
|
+
token0IsStatAToken: boolean;
|
|
14772
|
+
token0ConversionRate?: bigint;
|
|
14773
|
+
token0UnderlyingToken?: Token$1;
|
|
14774
|
+
token1IsStatAToken: boolean;
|
|
14775
|
+
token1ConversionRate?: bigint;
|
|
14776
|
+
token1UnderlyingToken?: Token$1;
|
|
14777
|
+
isActive: boolean;
|
|
14778
|
+
createdAt?: number;
|
|
14779
|
+
rewardConfig?: PoolRewardConfig;
|
|
14780
|
+
}
|
|
14781
|
+
type PoolSpokeAssets = {
|
|
14782
|
+
token0: XToken;
|
|
14783
|
+
token1: XToken;
|
|
14784
|
+
};
|
|
14785
|
+
type ConcentratedLiquidityUnknownErrorCode = 'SUPPLY_LIQUIDITY_UNKNOWN_ERROR' | 'GET_POOL_DATA_UNKNOWN_ERROR' | 'WITHDRAW_LIQUIDITY_UNKNOWN_ERROR' | 'INCREASE_LIQUIDITY_UNKNOWN_ERROR' | 'DECREASE_LIQUIDITY_UNKNOWN_ERROR' | 'CLAIM_REWARDS_UNKNOWN_ERROR' | 'GET_POOL_REWARD_CONFIG_UNKNOWN_ERROR';
|
|
14786
|
+
type GetConcentratedLiquidityParams<T extends ConcentratedLiquidityUnknownErrorCode> = T extends 'SUPPLY_LIQUIDITY_UNKNOWN_ERROR' ? ConcentratedLiquiditySupplyParams : T extends 'GET_POOL_DATA_UNKNOWN_ERROR' ? ConcentratedLiquidityGetPoolDataParams : T extends 'WITHDRAW_LIQUIDITY_UNKNOWN_ERROR' ? ConcentratedLiquidityWithdrawParams : T extends 'INCREASE_LIQUIDITY_UNKNOWN_ERROR' ? ConcentratedLiquidityIncreaseLiquidityParams : T extends 'DECREASE_LIQUIDITY_UNKNOWN_ERROR' ? ConcentratedLiquidityDecreaseLiquidityParams : T extends 'CLAIM_REWARDS_UNKNOWN_ERROR' ? ConcentratedLiquidityClaimRewardsParams : T extends 'GET_POOL_REWARD_CONFIG_UNKNOWN_ERROR' ? PoolKey : never;
|
|
14787
|
+
type ConcentratedLiquidityErrorCode = ConcentratedLiquidityUnknownErrorCode | RelayErrorCode | 'CREATE_SUPPLY_LIQUIDITY_INTENT_FAILED' | 'GET_POOL_DATA_FAILED' | 'CREATE_WITHDRAW_LIQUIDITY_INTENT_FAILED' | 'CREATE_INCREASE_LIQUIDITY_INTENT_FAILED' | 'CREATE_DECREASE_LIQUIDITY_INTENT_FAILED' | 'CREATE_CLAIM_REWARDS_INTENT_FAILED' | 'GET_POOL_REWARD_CONFIG_FAILED';
|
|
14788
|
+
type ConcentratedLiquidityUnknownError<T extends ConcentratedLiquidityUnknownErrorCode> = {
|
|
14789
|
+
error: unknown;
|
|
14790
|
+
payload: GetConcentratedLiquidityParams<T>;
|
|
14791
|
+
};
|
|
14792
|
+
type ConcentratedLiquiditySubmitTxFailedError = {
|
|
14793
|
+
error: RelayError;
|
|
14794
|
+
payload: SpokeTxHash;
|
|
14795
|
+
};
|
|
14796
|
+
type ConcentratedLiquiditySupplyFailedError = {
|
|
14797
|
+
error: unknown;
|
|
14798
|
+
payload: ConcentratedLiquiditySupplyParams;
|
|
14799
|
+
};
|
|
14800
|
+
type ConcentratedLiquidityWithdrawFailedError = {
|
|
14801
|
+
error: unknown;
|
|
14802
|
+
payload: ConcentratedLiquidityWithdrawParams;
|
|
14803
|
+
};
|
|
14804
|
+
type ConcentratedLiquidityIncreaseLiquidityFailedError = {
|
|
14805
|
+
error: unknown;
|
|
14806
|
+
payload: ConcentratedLiquidityIncreaseLiquidityParams;
|
|
14807
|
+
};
|
|
14808
|
+
type ConcentratedLiquidityDecreaseLiquidityFailedError = {
|
|
14809
|
+
error: unknown;
|
|
14810
|
+
payload: ConcentratedLiquidityDecreaseLiquidityParams;
|
|
14811
|
+
};
|
|
14812
|
+
type ConcentratedLiquidityClaimRewardsFailedError = {
|
|
14813
|
+
error: unknown;
|
|
14814
|
+
payload: ConcentratedLiquidityClaimRewardsParams;
|
|
14815
|
+
};
|
|
14816
|
+
type ConcentratedLiquidityGetPoolRewardConfigFailedError = {
|
|
14817
|
+
error: unknown;
|
|
14818
|
+
payload: PoolKey;
|
|
14819
|
+
};
|
|
14820
|
+
type GetConcentratedLiquidityError<T extends ConcentratedLiquidityErrorCode> = T extends 'SUBMIT_TX_FAILED' ? ConcentratedLiquiditySubmitTxFailedError : T extends 'RELAY_TIMEOUT' ? ConcentratedLiquiditySubmitTxFailedError : T extends 'CREATE_SUPPLY_LIQUIDITY_INTENT_FAILED' ? ConcentratedLiquiditySupplyFailedError : T extends 'CREATE_WITHDRAW_LIQUIDITY_INTENT_FAILED' ? ConcentratedLiquidityWithdrawFailedError : T extends 'CREATE_INCREASE_LIQUIDITY_INTENT_FAILED' ? ConcentratedLiquidityIncreaseLiquidityFailedError : T extends 'CREATE_DECREASE_LIQUIDITY_INTENT_FAILED' ? ConcentratedLiquidityDecreaseLiquidityFailedError : T extends 'CREATE_CLAIM_REWARDS_INTENT_FAILED' ? ConcentratedLiquidityClaimRewardsFailedError : T extends 'GET_POOL_REWARD_CONFIG_FAILED' ? ConcentratedLiquidityGetPoolRewardConfigFailedError : T extends ConcentratedLiquidityUnknownErrorCode ? ConcentratedLiquidityUnknownError<T> : never;
|
|
14821
|
+
type ConcentratedLiquidityError<T extends ConcentratedLiquidityErrorCode> = {
|
|
14822
|
+
code: T;
|
|
14823
|
+
data: GetConcentratedLiquidityError<T>;
|
|
14824
|
+
};
|
|
14825
|
+
type ConcentratedLiquidityExtraData = {
|
|
14826
|
+
address: Hex;
|
|
14827
|
+
payload: Hex;
|
|
14828
|
+
};
|
|
14829
|
+
type ConcentratedLiquidityOptionalExtraData = {
|
|
14830
|
+
data?: ConcentratedLiquidityExtraData;
|
|
14831
|
+
};
|
|
14832
|
+
type ClServiceConstructorParams = {
|
|
14833
|
+
hubProvider: EvmHubProvider;
|
|
14834
|
+
relayerApiEndpoint?: HttpUrl;
|
|
14835
|
+
configService: ConfigService;
|
|
14836
|
+
};
|
|
14837
|
+
/**
|
|
14838
|
+
* Concetration Liquidity Service provides a high-level interface for concentrated liquidity operations
|
|
14839
|
+
* including supply liquidity, increase liquidity, decrease liquidit position.
|
|
14840
|
+
*/
|
|
14841
|
+
declare class ClService {
|
|
14842
|
+
readonly config: ClServiceConfig;
|
|
14843
|
+
private readonly relayerApiEndpoint;
|
|
14844
|
+
private readonly hubProvider;
|
|
14845
|
+
private readonly configService;
|
|
14846
|
+
constructor({ hubProvider, relayerApiEndpoint, configService }: ClServiceConstructorParams);
|
|
14847
|
+
getAssetsForPool(spokeProvider: SpokeProviderType, poolKey: PoolKey): PoolSpokeAssets;
|
|
14848
|
+
/**
|
|
14849
|
+
* Execute supply liquidity action - creates a new concentrated liquidity position
|
|
14850
|
+
*/
|
|
14851
|
+
executeSupplyLiquidity<S extends SpokeProviderType, R extends boolean = false>(params: ConcentratedLiquiditySupplyParams, spokeProvider: S, raw?: R, skipSimulation?: boolean): Promise<Result<TxReturnType<S, R>, ConcentratedLiquidityError<'CREATE_SUPPLY_LIQUIDITY_INTENT_FAILED'>> & RelayOptionalExtraData>;
|
|
14852
|
+
/**
|
|
14853
|
+
* Get the mint position event log from the hub transaction hash
|
|
14854
|
+
* @param hubTxHash - The hub transaction hash
|
|
14855
|
+
* @returns The mint position event log
|
|
14856
|
+
*/
|
|
14857
|
+
getMintPositionEvent(hubTxHash: Hash$1): Promise<ClMintPositionEventLog>;
|
|
14858
|
+
executeIncreaseLiquidity<S extends SpokeProviderType, R extends boolean = false>(params: ConcentratedLiquidityIncreaseLiquidityParams, spokeProvider: S, raw?: R, skipSimulation?: boolean): Promise<Result<TxReturnType<S, R>, ConcentratedLiquidityError<'CREATE_INCREASE_LIQUIDITY_INTENT_FAILED'>> & RelayOptionalExtraData>;
|
|
14859
|
+
executeDecreaseLiquidity<S extends SpokeProviderType, R extends boolean = false>(params: ConcentratedLiquidityDecreaseLiquidityParams, spokeProvider: S, raw?: R, skipSimulation?: boolean): Promise<Result<TxReturnType<S, R>, ConcentratedLiquidityError<'CREATE_DECREASE_LIQUIDITY_INTENT_FAILED'>> & RelayOptionalExtraData>;
|
|
14860
|
+
permit2Approve(token: Address, contract: Address): EvmContractCall[];
|
|
14861
|
+
/**
|
|
14862
|
+
* Supply liquidity and wait for the transaction to be relayed to the hub
|
|
14863
|
+
* This method wraps executeSupplyLiquidity and relays the transaction to the hub
|
|
14864
|
+
*/
|
|
14865
|
+
supplyLiquidity<S extends SpokeProvider>({ params, spokeProvider, timeout, skipSimulation, }: Prettify<SupplyLiquidityParams<S> & OptionalTimeout & OptionalSkipSimulation>): Promise<Result<[SpokeTxHash, HubTxHash], ConcentratedLiquidityError<ConcentratedLiquidityErrorCode>>>;
|
|
14866
|
+
/**
|
|
14867
|
+
* Increase liquidity and wait for the transaction to be relayed to the hub
|
|
14868
|
+
* This method wraps executeIncreaseLiquidity and relays the transaction to the hub
|
|
14869
|
+
*/
|
|
14870
|
+
increaseLiquidity<S extends SpokeProvider>({ params, spokeProvider, timeout, }: Prettify<IncreaseLiquidityParams<S> & OptionalTimeout>): Promise<Result<[SpokeTxHash, HubTxHash], ConcentratedLiquidityError<ConcentratedLiquidityErrorCode>>>;
|
|
14871
|
+
/**
|
|
14872
|
+
* Decrease liquidity and wait for the transaction to be relayed to the hub
|
|
14873
|
+
* This method wraps executeDecreaseLiquidity and relays the transaction to the hub
|
|
14874
|
+
*/
|
|
14875
|
+
decreaseLiquidity<S extends SpokeProvider>({ params, spokeProvider, timeout, }: Prettify<DecreaseLiquidityParams<S> & OptionalTimeout>): Promise<Result<[SpokeTxHash, HubTxHash], ConcentratedLiquidityError<ConcentratedLiquidityErrorCode>>>;
|
|
14876
|
+
/**
|
|
14877
|
+
* Fetch pool reward configuration from the hook contract
|
|
14878
|
+
* @param poolKey - The pool key containing the hook address
|
|
14879
|
+
* @param publicClient - The viem public client for reading from the chain
|
|
14880
|
+
* @returns The pool reward configuration
|
|
14881
|
+
*/
|
|
14882
|
+
getPoolRewardConfig(poolKey: PoolKey, publicClient: PublicClient<HttpTransport>): Promise<Result<PoolRewardConfig, ConcentratedLiquidityError<'GET_POOL_REWARD_CONFIG_FAILED'>>>;
|
|
14883
|
+
/**
|
|
14884
|
+
* Execute claim rewards action - triggers reward distribution by calling decrease liquidity with 0 value
|
|
14885
|
+
*/
|
|
14886
|
+
executeClaimRewards<S extends SpokeProviderType, R extends boolean = false>(params: ConcentratedLiquidityClaimRewardsParams, spokeProvider: S, raw?: R, skipSimulation?: boolean): Promise<Result<TxReturnType<S, R>, ConcentratedLiquidityError<'CREATE_CLAIM_REWARDS_INTENT_FAILED'>> & RelayOptionalExtraData>;
|
|
14887
|
+
/**
|
|
14888
|
+
* Claim rewards and wait for the transaction to be relayed to the hub
|
|
14889
|
+
* This method wraps executeClaimRewards and relays the transaction to the hub
|
|
14890
|
+
*/
|
|
14891
|
+
claimRewards<S extends SpokeProvider>({ params, spokeProvider, timeout, skipSimulation, }: Prettify<ClaimRewardsParams<S> & OptionalTimeout & OptionalSkipSimulation>): Promise<Result<[SpokeTxHash, HubTxHash], ConcentratedLiquidityError<ConcentratedLiquidityErrorCode>>>;
|
|
14892
|
+
getPools(): PoolKey[];
|
|
14893
|
+
/**
|
|
14894
|
+
* Fetch token information (symbol, name, decimals) from ERC20 contract
|
|
14895
|
+
*/
|
|
14896
|
+
private getTokenInfo;
|
|
14897
|
+
/**
|
|
14898
|
+
* Check if a token address is a StatAToken (ERC4626 wrapped token)
|
|
14899
|
+
*/
|
|
14900
|
+
private isStatAToken;
|
|
14901
|
+
/**
|
|
14902
|
+
* Get conversion rate for a StatAToken (1 share = X underlying assets)
|
|
14903
|
+
* Returns conversion rate with 1e18 precision
|
|
14904
|
+
*/
|
|
14905
|
+
private getStatATokenConversionRate;
|
|
14906
|
+
/**
|
|
14907
|
+
* Get enriched token data with StatAToken conversion information
|
|
14908
|
+
*/
|
|
14909
|
+
private getTokenEnrichmentData;
|
|
14910
|
+
/**
|
|
14911
|
+
* Fetch comprehensive pool data including real-time state
|
|
14912
|
+
* This method provides all the data the UI needs in a single call
|
|
14913
|
+
*
|
|
14914
|
+
* @example
|
|
14915
|
+
* ```typescript
|
|
14916
|
+
* const poolData = await concentratedLiquidityService.getPoolData(
|
|
14917
|
+
* poolKey,
|
|
14918
|
+
* publicClient
|
|
14919
|
+
* );g
|
|
14920
|
+
|
|
14921
|
+
* ```
|
|
14922
|
+
*/
|
|
14923
|
+
getPoolData(poolKey: PoolKey<'CL'>, publicClient: PublicClient<HttpTransport>): Promise<PoolData>;
|
|
14924
|
+
/**
|
|
14925
|
+
* Get position information for a given token ID
|
|
14926
|
+
*
|
|
14927
|
+
* @example
|
|
14928
|
+
* ```typescript
|
|
14929
|
+
* const positionInfo = await concentratedLiquidityService.getPositionInfo(
|
|
14930
|
+
* tokenId,
|
|
14931
|
+
* publicClient
|
|
14932
|
+
* );
|
|
14933
|
+
*
|
|
14934
|
+
* console.log('Position data:', {
|
|
14935
|
+
* poolKey: positionInfo.poolKey,
|
|
14936
|
+
* tickRange: `${positionInfo.tickLower} to ${positionInfo.tickUpper}`,
|
|
14937
|
+
* liquidity: positionInfo.liquidity.toString(),
|
|
14938
|
+
* unclaimedFees: `${positionInfo.unclaimedFees0.toString()} / ${positionInfo.unclaimedFees1.toString()}`,
|
|
14939
|
+
* });
|
|
14940
|
+
* ```
|
|
14941
|
+
*/
|
|
14942
|
+
getPositionInfo(tokenId: bigint, publicClient: PublicClient<HttpTransport>): Promise<ClPositionInfo>;
|
|
14943
|
+
/**
|
|
14944
|
+
* Helper: Calculate liquidity from token amounts
|
|
14945
|
+
* @param amount0 - Amount of token0
|
|
14946
|
+
* @param amount1 - Amount of token1
|
|
14947
|
+
* @param tickLower - Lower tick
|
|
14948
|
+
* @param tickUpper - Upper tick
|
|
14949
|
+
* @param currentTick - Current pool tick
|
|
14950
|
+
* @returns The liquidity value
|
|
14951
|
+
*/
|
|
14952
|
+
static calculateLiquidityFromAmounts(amount0: bigint, amount1: bigint, tickLower: bigint, tickUpper: bigint, currentTick: bigint): bigint;
|
|
14953
|
+
/**
|
|
14954
|
+
* Helper: Calculate token1 amount needed given token0 amount and price range
|
|
14955
|
+
* @param amount0 - Amount of token0
|
|
14956
|
+
* @param tickLower - Lower tick
|
|
14957
|
+
* @param tickUpper - Upper tick
|
|
14958
|
+
* @param currentTick - Current pool tick
|
|
14959
|
+
* @returns The required amount of token1
|
|
14960
|
+
*/
|
|
14961
|
+
static calculateAmount1FromAmount0(amount0: bigint, tickLower: bigint, tickUpper: bigint, currentTick: bigint): bigint;
|
|
14962
|
+
/**
|
|
14963
|
+
* Helper: Calculate token0 amount needed given token1 amount and price range
|
|
14964
|
+
* @param amount1 - Amount of token1
|
|
14965
|
+
* @param tickLower - Lower tick
|
|
14966
|
+
* @param tickUpper - Upper tick
|
|
14967
|
+
* @param currentTick - Current pool tick
|
|
14968
|
+
* @returns The required amount of token0
|
|
14969
|
+
*/
|
|
14970
|
+
static calculateAmount0FromAmount1(amount1: bigint, tickLower: bigint, tickUpper: bigint, currentTick: bigint): bigint;
|
|
14971
|
+
/**
|
|
14972
|
+
* Helper: Convert price to nearest valid tick
|
|
14973
|
+
* @param price - The price as a number
|
|
14974
|
+
* @param token0 - The base token
|
|
14975
|
+
* @param token1 - The quote token
|
|
14976
|
+
* @param tickSpacing - The tick spacing for the pool
|
|
14977
|
+
* @returns The nearest valid tick
|
|
14978
|
+
*/
|
|
14979
|
+
static priceToTick(price: number, token0: Token$1, token1: Token$1, tickSpacing: number): bigint;
|
|
14980
|
+
}
|
|
14981
|
+
|
|
14982
|
+
type DexServiceConfig = {
|
|
14983
|
+
assetServiceConfig?: AssetServiceConfig;
|
|
14984
|
+
};
|
|
14985
|
+
type DexServiceConstructorParams = {
|
|
14986
|
+
configService: ConfigService;
|
|
14987
|
+
hubProvider: EvmHubProvider;
|
|
14988
|
+
relayerApiEndpoint?: HttpUrl;
|
|
14989
|
+
config?: DexServiceConfig;
|
|
14990
|
+
};
|
|
14991
|
+
declare class DexService {
|
|
14992
|
+
readonly assetService: AssetService;
|
|
14993
|
+
readonly clService: ClService;
|
|
14994
|
+
readonly configService: ConfigService;
|
|
14995
|
+
constructor(params: DexServiceConstructorParams);
|
|
14996
|
+
}
|
|
14997
|
+
|
|
14998
|
+
export { type AggregatedReserveData, type AllowanceInfo, type AllowanceResponse, type AllowanceTransferDetails, type ApiResponse, type ApyRange, type AssetDepositParams, type AssetEntry, AssetService, type AssetServiceAllowanceCheckFailedError, type AssetServiceApprovalFailedError, type AssetServiceConfig, type AssetServiceConstructorParams, type AssetServiceDepositFailedError, type AssetServiceError, type AssetServiceErrorCode, type AssetServiceSubmitTxFailedError, type AssetServiceUnknownError, type AssetServiceUnknownErrorCode, type AssetServiceWithdrawFailedError, type AssetWithdrawParams, type AutoSwapPreferences, type BackendApiConfig, BackendApiService, type Balance, type BalnLockParams, type BalnMigrateParams, type BalnSwapAbi, BalnSwapService, type BalnSwapServiceConstructorParams, type BaseCurrencyInfo, BigIntToHex, type BigNumberValue, BigNumberZeroDecimal, BitcoinBaseSpokeProvider, BitcoinRawSpokeProvider, type BitcoinSpokeDepositParams, BitcoinSpokeProvider, type BitcoinSpokeProviderType, BitcoinSpokeService, type BitcoinTransactionResult, type BitcoinTransferToHubParams, type BitcoinUTXO, BnUSDMigrationService, type BnUSDMigrationServiceConstructorParams, type BnUSDRevertMigrationParams, type BorrowInfo, type BridgeError, type BridgeErrorCode, type BridgeExtraData, type BridgeOptionalExtraData, type BridgeParams, BridgeService, type BridgeServiceConfig, type BridgeServiceConstructorParams, type CalculateAllReserveIncentivesRequest, type CalculateAllUserIncentivesRequest, type CalculateCompoundedRateRequest, type CallResponse, type CancelUnstakeParams, type ClMintPositionEventLog, type ClPositionInfo, ClService, type ClServiceConfig, type ClServiceConstructorParams, type ClaimParams, type ClaimRewardsParams, type CombinedReserveData, type ComputedUserReserve, type ConcentratedLiquidityClaimRewardsFailedError, type ConcentratedLiquidityClaimRewardsParams, type ConcentratedLiquidityDecreaseLiquidityFailedError, type ConcentratedLiquidityDecreaseLiquidityParams, type ConcentratedLiquidityError, type ConcentratedLiquidityErrorCode, type ConcentratedLiquidityExtraData, type ConcentratedLiquidityGetPoolDataParams, type ConcentratedLiquidityGetPoolRewardConfigFailedError, type ConcentratedLiquidityIncreaseLiquidityFailedError, type ConcentratedLiquidityIncreaseLiquidityParams, type ConcentratedLiquidityOptionalExtraData, type ConcentratedLiquidityParams, type ConcentratedLiquiditySubmitTxFailedError, type ConcentratedLiquiditySupplyFailedError, type ConcentratedLiquiditySupplyParams, type ConcentratedLiquidityTokenInfo, type ConcentratedLiquidityUnknownError, type ConcentratedLiquidityUnknownErrorCode, type ConcentratedLiquidityWithdrawFailedError, type ConcentratedLiquidityWithdrawParams, ConfigService, type ConfigServiceConfig, type ConfigServiceConstructorParams, type ConnMsg, type CreateAssetDepositParams, type CreateAssetWithdrawParams, type CreateBridgeIntentParams, type CreateIntentAutoSwapError, type CreateIntentParams, type CreateLimitOrderParams, type CustomProvider, CustomSorobanServer, CustomStellarAccount, DEFAULT_BACKEND_API_ENDPOINT, DEFAULT_BACKEND_API_HEADERS, DEFAULT_BACKEND_API_TIMEOUT, DEFAULT_DEADLINE_OFFSET, DEFAULT_MAX_RETRY, DEFAULT_RELAYER_API_ENDPOINT, DEFAULT_RELAY_TX_TIMEOUT, DEFAULT_RETRY_DELAY_MS, type DecreaseLiquidityParams, type Default, type DepositSimulationParams, type DestinationParamsType, type DetailedLock, DexService, type DexServiceConfig, type DexServiceConstructorParams, type EModeCategory, type EModeCategoryHumanized, type EModeData, type EModeDataString, type EmodeDataHumanized, type EnrichedToken, Erc20Service, Erc4626Service, EvmAssetManagerService, EvmBaseSpokeProvider, type EvmContractCall, type EvmDepositToDataParams, type EvmGasEstimate, EvmHubProvider, type EvmHubProviderConfig, type EvmHubProviderConstructorParams, type EvmInitializedConfig, EvmRawSpokeProvider, type EvmRawSpokeProviderConfig, type EvmReturnType, EvmSolverService, type EvmSpokeDepositParams, EvmSpokeProvider, type EvmSpokeProviderType, EvmSpokeService, type EvmTransferParams, type EvmTransferToHubParams, type EvmTxReturnType, type EvmUninitializedBrowserConfig, type EvmUninitializedConfig, type EvmUninitializedPrivateKeyConfig, EvmVaultTokenService, EvmWalletAbstraction, type EvmWithdrawAssetDataParams, type ExecuteIntentAutoSwapError, type ExecuteMsg, FEE_PERCENTAGE_SCALE, type FeeAmount, type FeeData, type FeeTokenApproveParams, type FormatReserveRequest, type FormatReserveResponse, type FormatReserveUSDRequest, type FormatReserveUSDResponse, type FormatReservesAndIncentivesUSDRequest, type FormatReservesUSDRequest, type FormatUserSummaryAndIncentivesRequest, type FormatUserSummaryAndIncentivesResponse, type FormatUserSummaryRequest, type FormatUserSummaryResponse, type FormattedReserveEMode, type GasEstimateType, type GetAddressType, type GetAssetServiceError, type GetAssetServiceParams, type GetChainConfigType, type GetConcentratedLiquidityError, type GetConcentratedLiquidityParams, type GetEstimateGasReturnType, type GetIntentSubmitTxExtraDataParams, type GetMigrationFailedPayload, type GetMoneyMarketError, type GetMoneyMarketParams, type GetPacketParams, type GetPacketResponse, type GetRelayRequestParamType, type GetRelayResponse, type GetSpokeDepositParamsType, type GetTransactionPacketsParams, type GetTransactionPacketsResponse, HALF_RAY, HALF_WAD, type HanaWalletRequestEvent, type HanaWalletResponseEvent, type HashTxReturnType, HubService, type HubTxHash, ICON_TX_RESULT_WAIT_MAX_RETRY, type IRawSpokeProvider, type ISpokeProvider, type IWalletProvider, IconBaseSpokeProvider, type IconContractAddress, type IconGasEstimate, type IconJsonRpcVersion, IconRawSpokeProvider, type IconRawSpokeProviderConfig, type IconRawTransaction, type IconReturnType, type IconSpokeDepositParams, IconSpokeProvider, type IconSpokeProviderType, IconSpokeService, type IconTransferToHubParams, type IcxCreateRevertMigrationParams, type IcxMigrateParams, IcxMigrationService, type IcxMigrationServiceConstructorParams, type IcxRawTransaction, type IcxRevertMigrationParams, type IcxTokenType, type IncentiveDataHumanized, type IncreaseLiquidityParams, type InjTokenInfo, Injective20Token, InjectiveBaseSpokeProvider, type InjectiveGasEstimate, InjectiveRawSpokeProvider, type InjectiveRawSpokeProviderConfig, type InjectiveReturnType, type InjectiveSpokeDepositParams, InjectiveSpokeProvider, type InjectiveSpokeProviderType, InjectiveSpokeService, type InjectiveTransferToHubParams, type InstantUnstakeParams, type InstantiateMsg, type Intent, type IntentAutoSwapErrorData, type IntentAutoSwapResult, type IntentCancelFailedErrorData, IntentCreatedEventAbi, type IntentCreatedEventLog, type IntentCreationFailedErrorData, type IntentData, IntentDataType, type IntentDeliveryInfo, type IntentError, type IntentErrorCode, type IntentErrorData, IntentFilledEventAbi, type IntentFilledEventLog, type IntentPostExecutionFailedErrorData, type IntentRelayRequest, type IntentRelayRequestParams, type IntentResponse, type IntentState, type IntentSubmitTxFailedErrorData, type IntentWaitUntilIntentExecutedFailedErrorData, IntentsAbi, type JsonRpcPayloadResponse, LTV_PRECISION, type LegacybnUSDChainId, type LegacybnUSDToken, type LegacybnUSDTokenAddress, LendingPoolService, type LimitOrderParams, LockupMultiplier, LockupPeriod, MAX_UINT256, type MigrationAction, type MigrationError, type MigrationErrorCode, type MigrationErrorData, type MigrationFailedErrorData, type MigrationParams, type MigrationRevertParams, MigrationService, type MigrationServiceConfig, type MigrationServiceConstructorParams, type MigrationTokens, MintPositionEventAbi, type MintPositionEventLog, type MoneyMarketAction, type MoneyMarketAsset, type MoneyMarketAssetBorrowers, type MoneyMarketAssetSuppliers, type MoneyMarketBorrowFailedError, type MoneyMarketBorrowParams, type MoneyMarketBorrowers, type MoneyMarketConfigParams, MoneyMarketDataService, type MoneyMarketEncodeBorrowParams, type MoneyMarketEncodeRepayParams, type MoneyMarketEncodeRepayWithATokensParams, type MoneyMarketEncodeSupplyParams, type MoneyMarketEncodeWithdrawParams, type MoneyMarketError, type MoneyMarketErrorCode, type MoneyMarketExtraData, type MoneyMarketOptionalExtraData, type MoneyMarketParams, type MoneyMarketPosition, type MoneyMarketRepayFailedError, type MoneyMarketRepayParams, MoneyMarketService, type MoneyMarketServiceConfig, type MoneyMarketServiceConstructorParams, type MoneyMarketSubmitTxFailedError, type MoneyMarketSupplyFailedError, type MoneyMarketSupplyParams, type MoneyMarketUnknownError, type MoneyMarketUnknownErrorCode, type MoneyMarketWithdrawFailedError, type MoneyMarketWithdrawParams, NearBaseSpokeProvider, NearRawSpokeProvider, type NearRawSpokeProviderConfig, type NearReturnType, NearSpokeProvider, type NearSpokeProviderType, type NearTransactionFailure, type NearTransactionResult, type NewbnUSDChainId, type OnDemandPayload, type Optional, type OptionalFee, type OptionalRaw, type OptionalSkipSimulation, type OptionalTimeout, type OrderbookResponse, type PacketData, type PartnerFee, type PartnerFeeAmount, type PartnerFeeClaimAssetBalance, PartnerFeeClaimService, type PartnerFeeClaimServiceConfig, type PartnerFeeClaimServiceConstructorParams, type PartnerFeeClaimSwapParams, type PartnerFeeConfig, type PartnerFeePercentage, PartnerService, type PartnerServiceConfig, type PartnerServiceConstructorParams, type Payload, Permit2Service, type PermitBatch, type PermitDetails, type PermitSingle, type PoolBaseCurrencyHumanized, type PoolData, type PoolRewardConfig, type PoolSpokeAssets, type Prettify, type PromiseEvmTxReturnType, type PromiseIconTxReturnType, type PromiseInjectiveTxReturnType, type PromiseNearRawTxReturnType, type PromiseNearTxReturnType, type PromiseSolanaTxReturnType, type PromiseStacksTxReturnType, type PromiseStellarTxReturnType, type PromiseSuiTxReturnType, type PromiseTxReturnType, ProtocolIntentsAbi, type QueryMsg, type QueryResponse, type QuoteType, RAY, RAY_DECIMALS, type RadfiAuthResult, type RadfiBuildTxResponse, type RadfiConfig, type RadfiMaxSpentResponse, RadfiProvider, type RadfiTradingWallet, type RadfiUtxo, type RadfiUtxoListResponse, type RadfiWalletBalance, type RateLimitConfig, type RawDestinationParams, type RawSpokeProvider, type RawSpokeProviderConfig, type RawTxReturnType, type RelayAction, type RelayError, type RelayErrorCode, type RelayExtraData, type RelayOptionalExtraData, type RelayRequestDetail, type RelayRequestSigning, type RelayTxStatus, type RelayerApiConfig, type RequestConfig, type RequestOverrideConfig, type ReserveCalculationData, type ReserveData, type ReserveDataHumanized, type ReserveDataLegacy, type ReserveDataWithPrice, type ReserveEMode, type ReserveIncentiveDict, type ReservesDataHumanized, type ReservesIncentiveDataHumanized, type ResponseAddressType, type ResponseSigningType, type Result, type RewardInfoHumanized, SECONDS_PER_YEAR, STELLAR_DEFAULT_TX_TIMEOUT_SECONDS, STELLAR_PRIORITY_FEE, type SetSwapPreferenceError, type SetSwapPreferenceParams, Sodax, type SodaxConfig, SolanaBaseSpokeProvider, type SolanaGasEstimate, SolanaRawSpokeProvider, type SolanaRawSpokeProviderConfig, type SolanaRawTransaction, type SolanaReturnType, type SolanaSpokeDepositParams, SolanaSpokeProvider, type SolanaSpokeProviderType, SolanaSpokeService, type SolanaTransferToHubParams, SolverApiService, type SolverConfigParams, type SolverErrorResponse, type SolverExecutionRequest, type SolverExecutionResponse, SolverIntentErrorCode, type SolverIntentQuoteRequest, type SolverIntentQuoteResponse, type SolverIntentQuoteResponseRaw, SolverIntentStatusCode, type SolverIntentStatusRequest, type SolverIntentStatusResponse, type SonicAddressOrSpokeType, SonicBaseSpokeProvider, SonicRawSpokeProvider, type SonicRawSpokeProviderConfig, type SonicSpokeDepositParams, SonicSpokeProvider, type SonicSpokeProviderType, SonicSpokeService, type SpokeDepositParams, type SpokeProvider, type SpokeProviderObjectType, type SpokeProviderType, SpokeService, type SpokeTokenSymbols, type SpokeTxHash, StacksRawSpokeProvider, type StacksRawSpokeProviderConfig, type StacksRawTransaction, type StacksReturnType, type StacksSpokeDepositParams, StacksSpokeProvider, type StacksSpokeProviderType, StacksSpokeService, type StakeParams, type StakingAction, type StakingConfig, type StakingError, type StakingErrorCode, type StakingInfo, StakingLogic, type StakingParams, StakingService, type StakingServiceConstructorParams, StatATokenAddresses, type State, StellarBaseSpokeProvider, type StellarGasEstimate, StellarRawSpokeProvider, type StellarRawSpokeProviderConfig, type StellarReturnType, type StellarSpokeDepositParams, StellarSpokeProvider, type StellarSpokeProviderType, StellarSpokeService, type StellarTransferToHubParams, type SubmitTxExtraData, type SubmitTxParams, type SubmitTxResponse, SuiBaseSpokeProvider, type SuiGasEstimate, SuiRawSpokeProvider, type SuiRawSpokeProviderConfig, type SuiRawTransaction, type SuiReturnType, type SuiSpokeDepositParams, SuiSpokeProvider, type SuiSpokeProviderType, SuiSpokeService, type SuiTransferToHubParams, type SupplyLiquidityParams, SupportedMigrationTokens, type SwapParams, SwapService, type SwapServiceConfig, type SwapServiceConstructorParams, type TokenSpenderPair, type TokenWithConversion, type TxReturnType, USD_DECIMALS, type UiPoolDataProviderInterface, UiPoolDataProviderService, type UnifiedBnUSDMigrateParams, type UnknownIntentAutoSwapError, type UnstakeParams, type UnstakeRequest, type UnstakeRequestWithPenalty, type UnstakeSodaRequest, type UnstakingInfo, type UserIncentiveData, type UserIncentiveDataHumanized, type UserIncentiveDict, type UserIntentsResponse, type UserReserveCalculationData, type UserReserveData, type UserReserveDataHumanized, type UserReserveDataString, type UserReservesIncentivesDataHumanized, type UserRewardInfoHumanized, type UserUnstakeInfo, VAULT_TOKEN_DECIMALS, type VaultReserves, type VerifyTxHashRawConfig, type VerifyTxHashRawConfigType, type VerifyTxHashRawEvmConfig, type VerifyTxHashRawNearConfig, type VerifyTxHashRawSolanaConfig, type VerifyTxHashRawStellarConfig, WAD, WAD_RAY_RATIO, WEI_DECIMALS, type WaitIntentAutoSwapError, type WaitUntilIntentExecutedPayload, WalletAbstractionService, type WalletMode, type WalletSimulationParams, type WithdrawInfo, adjustAmountByFee, assetManagerAbi, balnSwapAbi, binomialApproximatedRayPow, bnUSDLegacySpokeChainIds, bnUSDLegacyTokens, bnUSDNewTokens, calculateAllReserveIncentives, calculateAllUserIncentives, calculateAvailableBorrowsMarketReferenceCurrency, calculateCompoundedInterest, calculateCompoundedRate, calculateFeeAmount, calculateHealthFactorFromBalances, calculateHealthFactorFromBalancesBigUnits, calculateLinearInterest, calculatePercentageFeeAmount, clPoolAbi, clPoolManagerAbi, clPositionManagerAbi, clQuoterAbi, clRouterAbi, clTickLensAbi, connectionAbi, constructRawSpokeProvider, convertTransactionInstructionToRaw, defaultHookAbi, deriveUserWalletAddress, dexPools, encodeAddress, encodeContractCalls, erc20Abi, erc4626Abi, formatBasisPoints, formatEModeCategory, formatEModes, formatPercentage, formatReserve, formatReserveUSD, formatReserves, formatReservesAndIncentives, formatUserSummary, formatUserSummaryAndIncentives, getAllLegacybnUSDTokens, getAndFormatReserveEModes, getCompoundedBalance, getConcentratedLiquidityConfig, getEvmViemChain, getHubChainConfig, getIconAddressBytes, getLinearBalance, getMarketReferenceCurrencyAndUsdBalance, getPacket, getRandomBytes, getReserveNormalizedIncome, getReservesEModes, getSolanaAddressBytes, getTransactionPackets, hexToBigInt, hexToSolanaAddress, hyper, isAddressString, isBalnMigrateParams, isBitcoinRawSpokeProvider, isBitcoinSpokeProvider, isBitcoinSpokeProviderType, isConfiguredMoneyMarketConfig, isConfiguredSolverConfig, isCreateIntentAutoSwapError, isEvmHubChainConfig, isEvmInitializedConfig, isEvmRawSpokeProvider, isEvmRawSpokeProviderConfig, isEvmSpokeChainConfig, isEvmSpokeProvider, isEvmSpokeProviderType, isEvmUninitializedBrowserConfig, isEvmUninitializedConfig, isEvmUninitializedPrivateKeyConfig, isHubSpokeProvider, isIconAddress, isIconRawSpokeProvider, isIconSpokeProvider, isIconSpokeProviderType, isIcxCreateRevertMigrationParams, isIcxMigrateParams, isInjectiveRawSpokeProvider, isInjectiveSpokeProvider, isInjectiveSpokeProviderType, isIntentCreationFailedError, isIntentCreationUnknownError, isIntentPostExecutionFailedError, isIntentRelayChainId, isIntentSubmitTxFailedError, isJsonRpcPayloadResponse, isLegacybnUSDChainId, isLegacybnUSDToken, isMoneyMarketBorrowUnknownError, isMoneyMarketCreateBorrowIntentFailedError, isMoneyMarketCreateRepayIntentFailedError, isMoneyMarketCreateSupplyIntentFailedError, isMoneyMarketCreateWithdrawIntentFailedError, isMoneyMarketRelayTimeoutError, isMoneyMarketRepayUnknownError, isMoneyMarketSubmitTxFailedError, isMoneyMarketSupplyUnknownError, isMoneyMarketWithdrawUnknownError, isNearRawSpokeProvider, isNearRawSpokeProviderConfig, isNearSpokeProvider, isNearSpokeProviderType, isNewbnUSDChainId, isNewbnUSDToken, isPartnerFeeAmount, isPartnerFeePercentage, isRawDestinationParams, isRawSpokeProvider, isResponseAddressType, isResponseSigningType, isSetSwapPreferenceError, isSolanaNativeToken, isSolanaRawSpokeProvider, isSolanaRawSpokeProviderConfig, isSolanaSpokeProvider, isSolanaSpokeProviderType, isSolverErrorResponse, isSonicRawSpokeProvider, isSonicRawSpokeProviderConfig, isSonicSpokeProvider, isSonicSpokeProviderType, isSpokeProvider, isSpokeProviderObjectType, isSpokeProviderType, isStacksRawSpokeProvider, isStacksRawSpokeProviderConfig, isStacksSpokeProvider, isStacksSpokeProviderType, isStellarRawSpokeProvider, isStellarRawSpokeProviderConfig, isStellarSpokeProvider, isStellarSpokeProviderType, isSubmitSwapTxResponse, isSubmitSwapTxStatusResponse, isSuiRawSpokeProvider, isSuiSpokeProvider, isSuiSpokeProviderType, isUnifiedBnUSDMigrateParams, isUnknownIntentAutoSwapError, isWaitIntentAutoSwapError, isWaitUntilIntentExecutedFailed, mintPositionParamsAbi, modifyLiquidityParamsAbi, nativeToUSD, newbnUSDSpokeChainIds, normalize, normalizeBN, normalizePsbtToBase64, normalizedToUsd, pancakeSwapInfinityDefaultHookAbi, pancakeSwapInfinityPoolManagerAbi, pancakeSwapInfinityPositionManagerAbi, parseToStroops, parseTokenArrayFromJson, permit2Abi, poolAbi, poolKeyAbi, randomUint256, rayDiv, rayMul, rayPow, rayToWad, relayTxAndWaitPacket, requestAddress, requestJsonRpc, requestSigning, retry, serializeAddressData, sleep, sonicWalletFactoryAbi, spokeAssetManagerAbi, stakedSodaAbi, stakingRouterAbi, stataTokenFactoryAbi, submitTransaction, swapExactInSingleParamsAbi, uiPoolDataAbi, universalRouterAbi, valueToBigNumber, valueToZDBigNumber, variableDebtTokenAbi, vaultTokenAbi, wadToRay, waitForStacksTransaction, waitForTransactionReceipt, waitUntilIntentExecuted, walletFactoryAbi, wrappedSonicAbi };
|