@catalabs/catalyst-sdk
Version:
Catalyst AMM SDK
61 lines • 4.7 kB
TypeScript
import type { PermitBatchData, PermitBatchTransferFrom, PermitData, Witness } from './evm/permit2/interfaces';
import type { TypedDataDomain, TypedDataField } from 'ethers';
import { ExecutionInstructions, PriceQuote } from '@catalabs/catalyst-api-client';
import { CatalystNetwork } from './enums/catalyst-network.enum';
import { SdkResult } from './interfaces';
import { DeployVaultOptions } from './interfaces/deploy-vault-options.interface';
import { IDescriberModule } from './interfaces/describer-module.interface';
import { SdkResponse } from './interfaces/sdk-response.interface';
import { SendAssetOptions } from './interfaces/send-asset-options.interface';
import { ITokensModule } from './interfaces/tokens-module.interface';
import { ITokensModuleExtended } from './interfaces/tokens-module-extended.interface';
import { IVaultsModule } from './interfaces/vaults-module.interface';
import { RegistryModule } from './modules/registry.module';
import { CciFeeData, GasFeeData } from './types';
import { TransactionOptions } from './types/transaction-options';
import { CatalystAddresses } from './utils/interfaces/catalyst-addresses.interface';
export declare abstract class CatalystSDK implements IVaultsModule, ITokensModule {
catalystNetwork: CatalystNetwork;
static readonly CATALYST_VERSION = "v1";
readonly addresses: CatalystAddresses;
constructor(catalystNetwork: CatalystNetwork);
abstract get registryModule(): RegistryModule;
abstract get describerModule(): IDescriberModule;
abstract get tokensModule(): ITokensModuleExtended;
abstract get vaultsModule(): IVaultsModule;
address?: string;
abstract getGasFeeData(): Promise<GasFeeData>;
abstract getCciFeeData(toChains: string[]): Promise<CciFeeData>;
abstract signMessage(message: string): Promise<string>;
abstract signTypedData(domain: TypedDataDomain, types: Record<string, TypedDataField[]>, value: Record<string, any>): Promise<string>;
abstract deployVault(options: DeployVaultOptions): Promise<SdkResult<string>>;
abstract setConnection(vault: string, toVault: string, channelId: string, isActive: boolean): Promise<SdkResponse>;
abstract finishSetup(vault: string): Promise<SdkResponse>;
abstract sendAsset(options: SendAssetOptions): Promise<SdkResponse>;
abstract sendAssetWithRouter(instructions: ExecutionInstructions, gasAmount?: bigint, options?: TransactionOptions): Promise<SdkResponse>;
abstract estimateGasForExecuteInstructions(instructions: ExecutionInstructions, gasAmount?: bigint, options?: TransactionOptions): Promise<bigint>;
abstract sendAssetWithRouterFromQuote(quote: PriceQuote): Promise<SdkResponse>;
abstract sendAssetFromQuote(quote: PriceQuote, toAccount: string, fallbackUser: string, callData?: string): Promise<SdkResponse>;
abstract depositMixed(vault: string, tokenAmounts: bigint[], minOut: bigint): Promise<SdkResponse>;
abstract withdrawAll(vault: string, poolTokens: bigint, minOut: bigint[]): Promise<SdkResponse>;
abstract withdrawMixed(vault: string, poolTokens: bigint, withdrawRatio: bigint[], minOut: bigint[]): Promise<SdkResponse>;
abstract calcSendAsset(vault: string, from: string, amount: bigint): Promise<bigint>;
abstract calcReceiveAsset(vault: string, to: string, units: bigint): Promise<bigint>;
abstract getUnitCapacity(vault: string): Promise<bigint>;
abstract getBalance(address: string): Promise<bigint>;
abstract checkBalance(token: string, owner: string): Promise<bigint>;
abstract checkBalances(tokens: string[], owner: string): Promise<Record<string, bigint>>;
abstract checkAllowance(token: string, owner: string, spender: string): Promise<bigint>;
abstract increaseAllowance(token: string, spender: string, amount: bigint, options?: TransactionOptions): Promise<SdkResponse>;
abstract checkPermitAmount(token: string, owner: string, spender: string): Promise<bigint>;
abstract ensurePermit2Allowance(token: string, options?: TransactionOptions): Promise<SdkResponse | undefined>;
abstract generatePermitData(token: string, spender: string, amount?: bigint): Promise<PermitData>;
abstract generatePermitBatchData(assets: {
token: string;
amount?: bigint;
}[], spender: string): Promise<PermitBatchData>;
abstract signPermitBatchTransferFrom(permit: PermitBatchTransferFrom, witness?: Witness): Promise<string>;
abstract revoke(token: string, spender: string): Promise<SdkResponse>;
abstract ensureAllowance(token: string, owner: string, spender: string, amount: bigint, options?: TransactionOptions): Promise<SdkResponse | undefined>;
}
//# sourceMappingURL=catalyst-sdk.d.ts.map