import { MetalEnvironment, HolderResponse, PortfolioSummary, PresaleResponse } from './client'; import { BuyPresaleParams, BuyTokensParams, CreatePresaleParams, CreateHolderOptions, SellTokensParams, TransferParams } from './server'; interface ServerConfig { publicApiKey: string; secretApiKey: string; } /** * Server-side SDK for Metal Presales * This class contains all methods including those that require the secret API key. * It should only be used in server-side environments. */ export declare class MetalPresalesServer { private publicApiKey; private secretApiKey; constructor({ publicApiKey, secretApiKey }: ServerConfig); /** * Public API methods */ getHolder(userId: string, environment?: MetalEnvironment): Promise; getHolderWithPortfolio(userId: string, environment?: MetalEnvironment): Promise<{ holder: HolderResponse; portfolio: PortfolioSummary; }>; getPresale(presaleId: string, environment?: MetalEnvironment): Promise; /** * Server-side only methods that require secret key */ getOrCreateHolder(userId: string, options?: CreateHolderOptions, environment?: MetalEnvironment): Promise; listPresales(environment?: MetalEnvironment): Promise<{ name: string; id: `0x${string}`; participants: { userAddress: `0x${string}`; usdcAmount: number; }[]; tokenInfo: { name: string; symbol: string; imageUrl: string; }; }[]>; getActivePresales(environment?: MetalEnvironment): Promise; createPresale(presale: CreatePresaleParams, environment?: MetalEnvironment): Promise<{ signerId: string; orgId: string; id: string; chainId: 8453; status: "completed" | "pending" | "active" | "ended"; participants: []; createdAt: string; } & CreatePresaleParams>; buyPresale(holderId: string, params: BuyPresaleParams, environment?: MetalEnvironment): Promise<{ success: true; }>; transfer(holderId: string, params: TransferParams, environment?: MetalEnvironment): Promise<{ success: true; transactionHash: `0x${string}`; from: `0x${string}`; to: `0x${string}`; amount: number; tokenAddress: `0x${string}`; }>; quoteBuyTokens(holderId: string, params: BuyTokensParams, environment?: MetalEnvironment): Promise<{ tokenQuantity: number; dollarValue: number; }>; buyTokens(holderId: string, params: BuyTokensParams, environment?: MetalEnvironment): Promise<{ success: true; status: "completed"; transactionHash: `0x${string}`; from: `0x${string}`; tokenAddress: `0x${string}`; blockNumber: number; blockHash: `0x${string}`; }>; quoteSellTokens(holderId: string, params: SellTokensParams, environment?: MetalEnvironment): Promise<{ tokenQuantity: number; dollarValue: number; }>; sellTokens(holderId: string, params: SellTokensParams, environment?: MetalEnvironment): Promise<{ success: true; status: "completed"; transactionHash: `0x${string}`; from: `0x${string}`; tokenAddress: `0x${string}`; blockNumber: number; blockHash: `0x${string}`; }>; getTokenWithHolders(tokenAddress: string, environment?: MetalEnvironment): Promise<{ id: `0x${string}`; address: `0x${string}`; name: string; symbol: string; totalSupply: number; startingAppSupply: number; remainingAppSupply: number; merchantSupply: number; merchantAddress: `0x${string}`; price: number; holders: { id: `0x${string}`; address: `0x${string}`; balance: number; value: number; }[]; }[]>; } export type { HolderResponse, PortfolioSummary, PresaleResponse, } from './client'; export type { CreatePresaleParams, CreateHolderOptions, BuyPresaleParams, BuyTokensParams, SellTokensParams, TransferParams, } from './server'; //# sourceMappingURL=server-sdk.d.ts.map