/// import { AnchorProvider, BN, Program, ProgramError, Wallet, web3 } from "@project-serum/anchor"; import { EuroPrimitive } from "./euro_primitive"; import { EuroMeta, ExpirationData, OptionType } from "./types"; export declare const MAINNET_FEE_OWNER_KEY: web3.PublicKey; export declare const DEVNET_FEE_OWNER_KEY: web3.PublicKey; export declare type SolCluster = web3.Cluster | "localnet"; /** * Given a connection to any node, return the cluster name */ export declare const getClusterNameFromConnection: (connection: web3.Connection) => Promise; /** * Given any Connection return the Fee owner. This is required for applications to */ export declare const getFeeOwnerForCluster: (connection: web3.Connection) => Promise; export declare const CONTRACT_TOKEN_DECIMALS = 4; export declare const CONTRACT_DECIMALS_BN: BN; export declare const contractAmountToUnderlyingAmount: (contractAmount: BN, underlyingAmountPerContract: BN) => BN; export declare const contractAmountToStableAmount: (contractAmount: BN, euroMeta: EuroMeta) => BN; export declare const calcValueInUnderlying: (euroMeta: EuroMeta, expirationData: ExpirationData, amountOfContracts: BN, optionType: OptionType) => BN; export declare const calcValueInStables: (euroMeta: EuroMeta, expirationData: ExpirationData, amountOfContracts: BN) => BN; export declare const parseTranactionError: (error: any) => ProgramError; /** * Load all of the ExpirationData accounts where price_set is false. * * @param program * @returns */ export declare const loadUnsetExpirationAccounts: (program: Program) => Promise>>[]>; /** * Fetch all of the EuroMeta accounts in the give Program. * * @param program - Tokenized Euro Anchor Program * @returns */ export declare const loadAllEuroMetaAccunts: (program: Program) => Promise>>[]>; /** * Generate a new anchor Program * * @param payer * @param jsonRpcUrl * @param programId */ export declare const createProgram: (payer: web3.Keypair, jsonRpcUrl: string, programId: web3.PublicKey) => Program; /** * Generate a new anchor Program from wallet * * @param wallet * @param jsonRpcUrl * @param programId */ export declare const createProgramFromWallet: (wallet: Wallet, jsonRpcUrl: string, programId: web3.PublicKey) => Program; /** * Generate a new anchor Program from an AnchorProvider * @param provider * @param programId * @returns */ export declare const createProgramFromProvider: (provider: AnchorProvider, programId: web3.PublicKey) => Program; //# sourceMappingURL=utils.d.ts.map