UNPKG

@meteraprotocol/sdk

Version:

SDK to interact with Metera's API & a UI component that will create orders into the Metera Protocol

76 lines (72 loc) 1.83 kB
import { UseDisclosureReturn } from '@chakra-ui/react'; export { ChakraProvider as MeteraProvider } from '@chakra-ui/react'; import { WalletApi, Network } from 'lucid-txpipe'; export { WalletApi } from 'lucid-txpipe'; type Portfolio = { id: string; name: string; ticker: string; imageUrl: string; createdAt: Date; policyId: string; onchainId: string; mtkUnit: string; featured: bigint; managerId: string; }; type Asset = { id: string; name: string; ticker: string; imageUrl: string; currencySymbol: string; mainnetUnit: string; mainnetFingerprint: string; decimals: number; riskScore: string; pairConversion: string; }; interface IAssetInPortfolio { asset: Asset; price: string; priceCreatedAt: Date; priceId: string; amount: bigint; weightNum: bigint; weightDenom: bigint; order: number; } interface IPortfolioState { portfolio: Portfolio; price: string; supply: bigint; platformFee: bigint; assets: IAssetInPortfolio[]; entryFee: bigint; exitFee: bigint; batcherFee: bigint; } interface WalletData { wallet: WalletApi; } interface WalletData { wallet: WalletApi; } interface IMintBurnProps { portfolio: IPortfolioState; type: 'mint' | 'burn'; apiBaseUrl: string; network: Network; wallet?: WalletData | null; disc?: UseDisclosureReturn; containerProps?: Partial<{ width: string; height: string; }>; background?: string; swapId?: string | null; primaryButtonColor?: string; hoverButtonColor?: string; } declare function MintBurn({ type: initialType, portfolio, disc, wallet, apiBaseUrl, background, containerProps, swapId, primaryButtonColor, hoverButtonColor, }: IMintBurnProps): JSX.Element; export { MintBurn };