import { HexString } from '../types/index.js'; import { PoolMetadataInput, ShareClassInput } from '../types/poolInput.js'; import { PoolMetadata } from '../types/poolMetadata.js'; import type { Query } from '../types/query.js'; import { AssetId, CentrifugeId, PoolId, ShareClassId } from '../utils/types.js'; import { Entity } from './Entity.js'; import { PoolNetwork } from './PoolNetwork.js'; import { PoolReports } from './Reports/PoolReports.js'; import { ShareClass } from './ShareClass.js'; import { type CrosschainMessagesFilter } from './crosschainMessages.js'; /** * In-flight state of a cross-chain adapter change. `'Enabled'` / `'Disabled'` * is the target state of a change triggered on the hub but not yet confirmed on * the spoke; `null` means the adapter is settled (no change in transit). */ export type AdapterProgress = 'Enabled' | 'Disabled' | null; /** Per-adapter live + in-flight state for a pool, as returned by {@link Pool.adapterStatus}. */ export type AdapterStatus = { address: HexString; /** Indexer adapter name, e.g. `chainlink`, `layerZero`, `axelar`, `wormhole`. */ name: string; /** The live, confirmed state on the queried (spoke) chain. */ isEnabled: boolean; crosschainInProgress: AdapterProgress; }; export declare class Pool extends Entity { id: PoolId; get centrifugeId(): CentrifugeId; get reports(): PoolReports; /** * Query the details of the pool. * @returns The pool metadata, id, shareClasses and currency. */ details(): Query<{ id: PoolId; currency: { name: string; symbol: string; decimals: number; }; metadata: PoolMetadata | null; shareClasses: { shareClass: ShareClass; details: { id: ShareClassId; name: string; symbol: string; totalIssuance: import("../index.js").Balance; pricePerShare: import("../index.js").Price; priceComputedAt: Date | null; nav: import("../index.js").Balance; navPerNetwork: { centrifugeId: number; totalIssuance: import("../index.js").Balance; pricePerShare: import("../index.js").Price; nav: import("../index.js").Balance; address: `0x${string}`; }[]; icon: import("../types/poolMetadata.js").FileType | null; minInitialInvestment: number | null; apyPercentage: number | null; apy: import("../types/poolMetadata.js").ApyMode | import("../types/poolMetadata.js").LegacyApyMode | null; defaultAccounts: { asset: number | null; equity: number | null; gain: number | null; loss: number | null; expense: number | null; liability: number | null; }; }; }[]; }>; metadata(): Query; shareClasses(): Query; shareClass(scId: ShareClassId): Query; shareClassesDetails(): Query<{ id: ShareClassId; name: string; symbol: string; totalIssuance: import("../index.js").Balance; pricePerShare: import("../index.js").Price; priceComputedAt: Date | null; nav: import("../index.js").Balance; navPerNetwork: { centrifugeId: number; totalIssuance: import("../index.js").Balance; pricePerShare: import("../index.js").Price; nav: import("../index.js").Balance; address: `0x${string}`; }[]; icon: import("../types/poolMetadata.js").FileType | null; minInitialInvestment: number | null; apyPercentage: number | null; apy: import("../types/poolMetadata.js").ApyMode | import("../types/poolMetadata.js").LegacyApyMode | null; defaultAccounts: { asset: number | null; equity: number | null; gain: number | null; loss: number | null; expense: number | null; liability: number | null; }; }[]>; /** * Get the managers on the Hub. * These managers that can manage the pool, approve deposits, update prices, etc. */ poolManagers(): Query<{ address: `0x${string}`; }[]>; /** * Get the managers on the Balance Sheet. * These managers can transfer funds to and from the balance sheet. */ balanceSheetManagers(): Query<{ address: `0x${string}`; centrifugeId: number; type: string; }[]>; /** * Check if an address is a manager of the pool. * @param address - The address to check */ isPoolManager(address: HexString): Query; /** * Check if an address is a Balance Sheet manager of the pool. * @param centrifugeId - The centrifuge ID of the network to check * @param address - The address to check */ isBalanceSheetManager(centrifugeId: CentrifugeId, address: HexString): Query; /** * Get all networks where a pool can potentially be deployed. */ networks(): Query; /** * Get a specific network where a pool can potentially be deployed. * @param centrifugeId - The centrifuge ID of the network */ network(centrifugeId: CentrifugeId): Query; /** * Deploy share classes to multiple networks in a single hub transaction. * @param deployments - A list of target networks with share classes to deploy */ deployToNetworks(deployments: { centrifugeId: CentrifugeId; shareClasses: { id: ShareClassId; hook: HexString; }[]; }[]): import("../types/transaction.js").Transaction | undefined; /** * Get the networks where a pool is active. It doesn't mean that any vaults are deployed there necessarily. */ activeNetworks(): Query; /** List the workflows whitelisted for a strategist, across chains. */ listWorkflows(opts: { strategist: HexString; }): Promise<{ workflowRef: string; name: string; group?: string; chainId: number; centrifugeId: number; runtimeVariables: string[]; }[]>; /** * Run one whitelisted workflow by `workflowRef`. Resolves the chain + OnchainPM and the * proof tree from the strategist's policy, then submits via the OnchainPM. Awaiting the * returned promise executes the transaction (or simulates it when `simulate` is set). */ executeWorkflow(input: { strategist: HexString; workflowRef: string; runtimeValues?: Record; scId?: HexString; }, options?: { simulate?: boolean; }): Promise; /** * Plan an accounting update: every `account`-group workflow whitelisted for the strategist, * grouped per chain. Returns one handle per chain whose `execute()`/`simulate()` build and * submit that chain's atomic multicall. Multi-chain pools yield multiple handles. */ planAccountingUpdate(opts: { strategist: HexString; }): Promise<{ centrifugeId: number; workflowRefs: string[]; execute: () => unknown; simulate: () => unknown; }[]>; /** * Whitelist a workflow for a strategist. Reads the current policy from the pool metadata, * appends (or replaces) the entry, and updates both the metadata and the OnchainPM Merkle * root for the workflow's chain in one transaction. Awaiting the result submits it. */ addToPolicy(input: { strategist: HexString; workflowRef: string; configurableValues?: Record; excludedActions?: number[]; scId?: HexString; }): Promise; /** Remove a whitelisted workflow from a strategist's policy (metadata + on-chain root). */ removeFromPolicy(input: { strategist: HexString; workflowRef: string; scId?: HexString; }): Promise; /** * Get a specific vault for a given network, share class, and asset. * @param centrifugeId - The centrifuge ID of the network * @param scId - The share class ID * @param asset - The asset address or ID */ vault(centrifugeId: CentrifugeId, scId: ShareClassId, asset: HexString | AssetId): Query; /** * Get the currency of the pool. */ currency(): Query<{ name: string; symbol: string; decimals: number; }>; /** * Get the decimals of the pool, which is the precision of the share class tokens * and pool-denominated balances. May differ from the pool currency decimals. */ decimals(): Query; /** * Update pool metadata. */ updateMetadata(metadata: PoolMetadata): import("../types/transaction.js").Transaction; update(metadataInput: (Partial | null) | undefined, updatedShareClasses: ({ id: ShareClassId; } & ShareClassInput)[], addedShareClasses?: ShareClassInput[]): import("../types/transaction.js").Transaction; /** * Update pool managers. */ updatePoolManagers(updates: { address: HexString; canManage: boolean; }[]): import("../types/transaction.js").Transaction; /** * Update balance sheet managers. */ updateBalanceSheetManagers(updates: { centrifugeId: CentrifugeId; address: HexString; canManage: boolean; }[]): import("../types/transaction.js").Transaction; /** * Update an OracleValuation feeder on the hub chain for this pool. */ updateOracleValuationFeeder(oracleValuation: HexString, centrifugeId: CentrifugeId, feeder: HexString, canFeed: boolean): import("../types/transaction.js").Transaction; /** * Set adapters for multiple networks at once. */ setAdapters(updates: { centrifugeId: CentrifugeId; localAdapters: HexString[]; remoteAdapters: HexString[]; threshold?: number; recoveryIndex?: number; }[]): import("../types/transaction.js").Transaction; /** * Get the configured adapter set and signature threshold for this pool on a * specific network. Reads the MultiAdapter on the pool's hub chain. * * Use `centrifuge.globalAdapters(hub, target)` for the default (pool 0) set. * * @param centrifugeId - The centrifuge ID of the destination network */ adapters(centrifugeId: CentrifugeId): Query<{ adapters: `0x${string}`[]; threshold: number; }>; /** * Per-adapter live + in-flight state for this pool on the spoke→hub route, * from the indexer. `isEnabled` is the set confirmed live on the spoke; * `crosschainInProgress` flags an adapter whose enable/disable was triggered * on the hub but has not yet been confirmed on the spoke (`null` once settled). * * Unlike `adapters()` — which reads the hub MultiAdapter and so reports a * triggered change as already active — this reflects what is actually live * versus still in transit. * * @param centrifugeId - The centrifuge ID of the spoke network */ adapterStatus(centrifugeId: CentrifugeId): Query; /** * Query cross-chain messages (indexer-side: `CrosschainPayload`) for this * pool. Without a filter, returns the most recent batch across all routes * and statuses; `filter.status` is the common case (e.g. `'InTransit'` for * pending in-flight messages). * * Use `filter.include` to opt into nested data (pool, token, blockchains, * inner messages, adapter participations). For paginating very long lists, * pass `before`/`after` cursors from a previous page's `pageInfo`. */ crosschainMessages(filter?: Omit): Query; createAccounts(accounts: { accountId: bigint; isDebitNormal: boolean; }[]): import("../types/transaction.js").Transaction; getEscrowAddress(): Query<`0x${string}`>; } //# sourceMappingURL=Pool.d.ts.map