UNPKG

yamaswap-sdk

Version:
67 lines (61 loc) 2.63 kB
import { D as DexClient, E as ETFInfo } from './client-CvL_psQz.js'; import { DexClientEVM } from './evm.js'; import { E as ETFCreateParams, M as MintETFTokenParams } from './params-D5pUAaOi.js'; export { A as AnchorWallet, a as ETFBurnParams, b as ETFCreateResult, c as MintETFResult } from './params-D5pUAaOi.js'; import * as anchor from '@coral-xyz/anchor'; import { PublicKey } from '@solana/web3.js'; import { Account } from '@solana/spl-token'; import 'ethers'; declare function deriveEtfTokenMintAccount(program: anchor.Program, seeds: (string | PublicKey)[]): [anchor.web3.PublicKey, number]; declare function getSavedContractAddresses(): { hardhat: { TWAP: string; CETO: string; ETFROUTER: string; ETFFACTORY: string; }; localhost: { TWAP: string; CETO: string; ETFROUTER: string; ETFFACTORY: string; WETH: string; }; arbitrumSepolia: { TWAP: string; CETO: string; ETFROUTER: string; ETFFACTORY: string; WETH: string; }; sepolia: { TWAP: string; CETO: string; ETFROUTER: string; ETFFACTORY: string; WETH: string; }; }; declare class DexSDKError extends Error { constructor(message: string); } declare class ETFNotExistsError extends DexSDKError { constructor(message: string); } declare class ETFExistsError extends DexSDKError { constructor(message: string); } declare class ETFInsufficientBalanceError extends DexSDKError { constructor(message: string); } declare class ETFInvalidParamsError extends DexSDKError { constructor(message: string); } declare function checkATAExists(client: DexClient, tokens: PublicKey[], owner: PublicKey, isContract?: boolean): Promise<Account | undefined>; declare function checkBalance(client: DexClient, etfAddress: PublicKey, owner: PublicKey, requiredAmount: number): Promise<void>; declare function checkETFExists(client: DexClient, etfAddress: PublicKey): Promise<ETFInfo>; declare function validateETFCreateParams(params: ETFCreateParams): void; declare function validateMintETFParams(params: MintETFTokenParams): void; declare const getEVMClient: () => Promise<typeof DexClientEVM>; declare const getSolanaClient: () => Promise<typeof DexClient>; export { DexSDKError, ETFCreateParams, ETFExistsError, ETFInsufficientBalanceError, ETFInvalidParamsError, ETFNotExistsError, MintETFTokenParams, checkATAExists, checkBalance, checkETFExists, deriveEtfTokenMintAccount, getEVMClient, getSavedContractAddresses, getSolanaClient, validateETFCreateParams, validateMintETFParams };