@catalabs/catalyst-sdk
Version:
Catalyst AMM SDK
65 lines • 4.43 kB
TypeScript
import type { PermitBatchData, PermitBatchTransferFrom, PermitData, Witness } from './evm/permit2/interfaces';
import { ExecutionInstructions, PriceQuote } from '@catalabs/catalyst-api-client';
import { TypedDataDomain, TypedDataField } from 'ethers';
import { CatalystSDK } from './catalyst-sdk';
import { EvmDescriberModule } from './evm/evm-describers.module';
import { EvmRegistryModule } from './evm/evm-registry.module';
import { EvmTokensModule } from './evm/evm-tokens.module';
import { EvmVaultsModule } from './evm/evm-vaults.module';
import { SdkResult } from './interfaces';
import { DeployVaultOptions } from './interfaces/deploy-vault-options.interface';
import { EvmOptions } from './interfaces/evm-options.interface';
import { SdkResponse } from './interfaces/sdk-response.interface';
import { SendAssetOptions } from './interfaces/send-asset-options.interface';
import { CciFeeData, GasFeeData } from './types';
import { EvmProvider } from './types/evm-provider';
import { EvmSigner } from './types/evm-signer';
import { TransactionOptions } from './types/transaction-options';
export declare class EvmSDK extends CatalystSDK {
#private;
provider: EvmProvider;
signer?: EvmSigner;
readonly registryModule: EvmRegistryModule;
readonly describerModule: EvmDescriberModule;
readonly tokensModule: EvmTokensModule;
readonly vaultsModule: EvmVaultsModule;
constructor(options: EvmOptions);
getGasFeeData(): Promise<GasFeeData>;
getCciFeeData(toChainIds: string[]): Promise<CciFeeData>;
signMessage(message: string): Promise<string>;
signTypedData(domain: TypedDataDomain, types: Record<string, 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>;
estimateApprovalGasFee(token: string, spender: string, amount: bigint): Promise<bigint>;
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>;
signPermitBatchTransferFrom(permit: PermitBatchTransferFrom, witness?: Witness): Promise<string>;
revoke(token: string, spender: string): Promise<SdkResponse>;
updateProvider(options: EvmOptions): void;
connectSigner(signer: EvmSigner): Promise<void>;
ensureAllowance(token: string, owner: string, spender: string, amount: bigint, options?: TransactionOptions): Promise<SdkResponse | undefined>;
private getChainId;
}
//# sourceMappingURL=evm-sdk.d.ts.map