@catalabs/catalyst-sdk
Version:
Catalyst AMM SDK
62 lines • 4.22 kB
TypeScript
import type { PermitData } from './interfaces/permit-data.interface';
import { ExecutionInstructions, PriceQuote } from '@catalabs/catalyst-api-client';
import { ethers } from 'ethers-v5';
import { CatalystSDK } from './catalyst-sdk';
import { EvmDescriberModuleV5 } from './evm/evm-describers.module-v5';
import { EvmRegistryModuleV5 } from './evm/evm-registry.module-v5';
import { EvmTokensModuleV5 } from './evm/evm-tokens.module-v5';
import { EvmVaultsModuleV5 } from './evm/evm-vaults.module-v5';
import { SdkResult } from './interfaces';
import { DeployVaultOptions } from './interfaces/deploy-vault-options.interface';
import { EvmOptionsV5 } from './interfaces/evm-options-v5.interface';
import { PermitBatchData } from './interfaces/permit-batch-data.interface';
import { SdkResponse } from './interfaces/sdk-response.interface';
import { SendAssetOptions } from './interfaces/send-asset-options.interface';
import { EvmProviderV5 } from './types/evm-provider-v5';
import { EvmSignerV5 } from './types/evm-signer-v5';
import { FeeData } from './types/fee-data';
import { TransactionOptions } from './types/transaction-options';
export declare class EvmSDKV5 extends CatalystSDK {
#private;
provider: EvmProviderV5;
signer?: EvmSignerV5;
readonly registryModule: EvmRegistryModuleV5;
readonly describerModule: EvmDescriberModuleV5;
readonly tokensModule: EvmTokensModuleV5;
readonly vaultsModule: EvmVaultsModuleV5;
constructor(options: EvmOptionsV5);
getFeeData(): Promise<FeeData>;
signMessage(message: string): Promise<string>;
signTypedData(domain: ethers.TypedDataDomain, types: Record<string, ethers.TypedDataField[]>, value: Record<string, any>): Promise<string>;
deployVault(options: DeployVaultOptions): Promise<SdkResult<string>>;
setConnection(vault: string, toVault: string, channelId: string, isActive: boolean): Promise<SdkResponse>;
finishSetup(vault: string): Promise<SdkResponse>;
sendAsset(options: SendAssetOptions): Promise<SdkResponse>;
sendAssetWithRouter(instructions: ExecutionInstructions, gasAmount?: bigint, options?: TransactionOptions): Promise<SdkResponse>;
estimateGasForExecuteInstructions(instructions: ExecutionInstructions, gasAmount?: bigint, options?: TransactionOptions): Promise<bigint>;
sendAssetWithRouterFromQuote(quote: PriceQuote): Promise<SdkResponse>;
sendAssetFromQuote(quote: PriceQuote, toAccount: string, fallbackUser: string, callData?: string): Promise<SdkResponse>;
calcSendAsset(vault: string, from: string, amount: bigint): Promise<bigint>;
calcReceiveAsset(vault: string, to: string, units: bigint): Promise<bigint>;
depositMixed(vault: string, tokenAmounts: bigint[], minOut: bigint): Promise<SdkResponse>;
withdrawAll(vault: string, poolTokens: bigint, minOut: bigint[]): Promise<SdkResponse>;
withdrawMixed(vault: string, poolTokens: bigint, withdrawRatio: bigint[], minOut: bigint[]): Promise<SdkResponse>;
getUnitCapacity(vault: string): Promise<bigint>;
getBalance(address: string): Promise<bigint>;
checkBalance(token: string, owner: string): Promise<bigint>;
checkBalances(tokens: string[], owner: string): Promise<Record<string, bigint>>;
checkAllowance(token: string, owner: string, spender: string): Promise<bigint>;
increaseAllowance(token: string, spender: string, amount: bigint, options?: TransactionOptions): Promise<SdkResponse>;
checkPermitAmount(token: string, owner: string, spender: string): Promise<bigint>;
ensurePermit2Allowance(token: string, options?: TransactionOptions): Promise<SdkResponse | undefined>;
generatePermitData(token: string, spender: string, amount?: bigint): Promise<PermitData>;
generatePermitBatchData(assets: {
token: string;
amount?: bigint;
}[], spender: string): Promise<PermitBatchData>;
revoke(token: string, spender: string): Promise<SdkResponse>;
updateProvider(options: EvmOptionsV5): void;
connectSigner(signer: EvmSignerV5): Promise<void>;
ensureAllowance(token: string, owner: string, spender: string, amount: bigint, options?: TransactionOptions): Promise<SdkResponse | undefined>;
}
//# sourceMappingURL=evm-sdk-v5.d.ts.map