UNPKG

lotus-sdk

Version:

Central repository for several classes of tools for integrating with, and building for, the Lotusia ecosystem

26 lines 1.38 kB
import type { SwapPool, SwapPhase, CreatePoolParams, ParticipantInput, PoolStats, GroupSizeStrategy } from './types.js'; import type { PublicKey } from '../../bitcore/publickey.js'; export declare class SwapPoolManager { private pools; constructor(); createPool(creatorPeerId: string, params: CreatePoolParams): string; addParticipant(poolId: string, peerId: string, publicKey: PublicKey, input: ParticipantInput, ownershipProof: Buffer, finalOutputEncrypted: Buffer, finalOutputCommitment: Buffer): number; removeParticipant(poolId: string, peerId: string): void; transitionPhase(poolId: string, newPhase: SwapPhase): void; abortPool(poolId: string, reason: string): void; getPool(poolId: string): SwapPool | undefined; getAllPools(): SwapPool[]; getPoolsByPhase(phase: SwapPhase): SwapPool[]; hasMinimumParticipants(poolId: string): boolean; allSetupsConfirmed(poolId: string): boolean; allDestinationsRevealed(poolId: string): boolean; allSettlementsConfirmed(poolId: string): boolean; getPoolStats(poolId: string): PoolStats | undefined; determineOptimalGroupSize(participantCount: number): GroupSizeStrategy; removePool(poolId: string): void; private _generatePoolId; private _estimateFeePerParticipant; private _calculateAnonymitySet; private _factorial; } //# sourceMappingURL=pool.d.ts.map