import { AccountType } from '../types/holdings.js'; import { HexString } from '../types/index.js'; import { AddressMap } from '../utils/AddressMap.js'; import { Balance, Price } from '../utils/BigInt.js'; import { AssetId, CentrifugeId, ShareClassId } from '../utils/types.js'; import { BalanceSheet } from './BalanceSheet.js'; import { Entity } from './Entity.js'; import type { Pool } from './Pool.js'; import { Vault } from './Vault.js'; /** * Query and interact with a share class, which allows querying total issuance, NAV per share, * and allows interactions related to asynchronous deposits and redemptions. */ export declare class ShareClass extends Entity { pool: Pool; id: ShareClassId; /** * Query the details of the share class. * @returns The details of the share class, including name, symbol, total issuance, NAV per share and relavant metadata from the pool metadata. */ details(): import("../index.js").Query<{ id: ShareClassId; name: string; symbol: string; totalIssuance: Balance; pricePerShare: Price; priceComputedAt: Date | null; nav: Balance; navPerNetwork: { centrifugeId: number; totalIssuance: Balance; pricePerShare: Price; nav: Balance; address: `0x${string}`; }[]; icon: import("../index.js").FileType | null; minInitialInvestment: number | null; apyPercentage: number | null; apy: "target" | "7day" | "30day" | "90day" | "ytd" | "sinceInception" | "automatic" | null; defaultAccounts: { asset: number | null; equity: number | null; gain: number | null; loss: number | null; expense: number | null; liability: number | null; }; }>; balanceSheet(centrifugeId: CentrifugeId): import("../index.js").Query; deploymentPerNetwork(): import("../index.js").Query<{ centrifugeId: number; shareTokenAddress: `0x${string}`; restrictionManagerAddress: `0x${string}`; valuation: `0x${string}`; }[]>; navPerNetwork(): import("../index.js").Query<{ centrifugeId: number; totalIssuance: Balance; pricePerShare: Price; nav: Balance; address: `0x${string}`; }[]>; /** * Query the vaults of the share class. * @param centrifugeId The optional centrifuge ID to query the vaults on. * @param includeUnlinked Whether to include unlinked vaults. * @returns Vaults of the share class. */ vaults(centrifugeId?: CentrifugeId, includeUnlinked?: boolean): import("../index.js").Query; /** * Query all the balances of the share class (from BalanceSheet and Holdings). */ balances(centrifugeId?: CentrifugeId): import("../index.js").Query<{ assetId: AssetId; amount: Balance; value: Balance; price: Price; asset: { decimals: number; address: `0x${string}`; tokenId: bigint; name: string; symbol: string; centrifugeId: CentrifugeId; }; holding: { valuation: `0x${string}`; amount: Balance; value: Balance; isLiability: boolean; accounts: { 0: bigint | null; 1: bigint | null; 2: bigint | null; 3: bigint | null; 4: bigint | null; 5: bigint | null; }; } | null | undefined; }[]>; /** * Get the pending and approved amounts for deposits and redemptions for each asset. */ pendingAmounts(): import("../index.js").Query<{ byVault: { assetId: AssetId; centrifugeId: number; pendingDeposit: Balance; pendingRedeem: Balance; pendingIssuances: { amount: Balance; approvedAt: Date | null; epoch: number; }[]; pendingIssuancesTotal: Balance; pendingRevocations: { amount: Balance; approvedAt: Date | null; epoch: number; approvedAtTxHash?: string | null; }[]; pendingRevocationsTotal: Balance; queuedInvest: Balance; queuedRedeem: Balance; assetPrice: Price; depositEpoch: number; redeemEpoch: number; issueEpoch: number; revokeEpoch: number; }[]; shareClassTotals: { pendingInvestments: Balance; pendingRedemptions: Balance; approvedInvestments: Balance; approvedRedemptions: Balance; }; }>; /** * Check if an address is a member of the share class. * @param address Address to check * @param centrifugeId Centrifuge ID of the network on which to check the member */ member(address: HexString, centrifugeId: CentrifugeId): import("../index.js").Query<{ isMember: boolean; validUntil: Date; } | { isMember: boolean; validUntil: Date; }>; /** * Create a holding for a registered asset in the share class. * @param assetId - Asset ID of the asset to create a holding for * @param valuation - Valuation of the asset * @param isLiability - Whether the holding is a liability or not * @param accounts - Accounts to use for the holding. An asset or expense account will be created if not provided. * Other accounts are expected to be provided or to exist in the pool metadata. */ createHolding(assetId: AssetId, valuation: HexString, isLiability: Liability, accounts?: Liability extends true ? { [key in AccountType.Expense | AccountType.Liability]?: number; } : { [key in AccountType.Asset | AccountType.Equity | AccountType.Loss | AccountType.Gain]?: number; }): import("../types/transaction.js").Transaction; updateSharePrice(pricePerShare: Price, updatedAt?: Date): import("../types/transaction.js").Transaction; setMaxAssetPriceAge(assetId: AssetId, maxPriceAge: number): import("../types/transaction.js").Transaction; setMaxSharePriceAge(centrifugeId: CentrifugeId, maxPriceAge: number): import("../types/transaction.js").Transaction; notifyAssetPrice(assetId: AssetId): import("../types/transaction.js").Transaction; notifySharePrice(centrifugeId: CentrifugeId): import("../types/transaction.js").Transaction; /** * Approve deposits and issue shares for the given assets. * @param assets - Array of assets to approve deposits and/or issue shares for * `issuePricePerShare` can be a single price for all epochs or an array of prices for each epoch to be issued for. */ approveDepositsAndIssueShares(assets: ({ assetId: AssetId; } & ({ approveAssetAmount: Balance; approvePricePerAsset: Balance; } | { issuePricePerShare?: Price | Price[]; }))[]): import("../types/transaction.js").Transaction; /** * Approve redeems and revoke shares for the given assets. * @param assets - Array of assets to approve redeems and/or revoke shares for * `approveShareAmount` can be a single amount for all epochs or an array of amounts for each epoch to be revoked. */ approveRedeemsAndRevokeShares(assets: ({ assetId: AssetId; } & ({ approveShareAmount: Balance; approvePricePerAsset: Balance; } | { revokePricePerShare: Price | Price[]; }))[]): import("../types/transaction.js").Transaction; /** * Claim a deposit on the Hub side for the given asset and investor after the shares have been issued. * This will send a message to the Spoke that will allow the investor to claim their shares. */ claimDeposit(assetId: AssetId, investor: HexString): import("../types/transaction.js").Transaction; /** * Claim a redemption on the Hub side for the given asset and investor after the shares have been revoked. * This will send a message to the Spoke that will allow the investor to claim their redeemed currency. */ claimRedeem(assetId: AssetId, investor: HexString): import("../types/transaction.js").Transaction; /** * Update a member of the share class. * @param address Address of the investor * @param validUntil Time in seconds from Unix epoch until the investor is valid * @param centrifugeId Centrifuge ID of the network on which to update the member */ updateMember(address: HexString, validUntil: number, centrifugeId: CentrifugeId): import("../types/transaction.js").Transaction; /** * Batch update a list of members of the share class. * @param members Array of members to update, each with address, validUntil and centrifugeId * @param members.address Address of the investor * @param members.validUntil Time in seconds from Unix epoch until the investor is valid * @param members.centrifugeId Centrifuge ID of the network on which to update the member */ updateMembers(members: { address: HexString; validUntil: number; centrifugeId: CentrifugeId; }[]): import("../types/transaction.js").Transaction; /** * Retrieve all holders of the share class. * @param options Optional pagination and filter options object * @param options.limit Number of results to return (default: 20) * @param options.offset Offset for pagination (default: 0) * @param options.orderBy Order by field (default: "balance") * @param options.orderDirection Order direction (default: "desc") * @param options.filter Optional filter criteria * @param options.filter.balance_gt Investor minimum position amount filter * @param options.filter.holderAddress Filter by holder address (partial text match) * @param options.filter.centrifugeIds Filter by centrifuge IDs (array of centrifuge IDs) */ holders(options?: { limit?: number; offset?: number; orderBy?: string; orderDirection?: string; filter?: { balance_gt?: bigint; holderAddress?: string; centrifugeIds?: string[]; }; }): import("../index.js").Query<{ investors: { address: `0x${string}`; amount: Balance; centrifugeId: number; createdAt: string; holdings: Balance; isFrozen: boolean; outstandingInvest: Balance; outstandingRedeem: Balance; queuedInvest: Balance; queuedRedeem: Balance; isWhitelisted: boolean; }[]; pageInfo: { hasNextPage: boolean; hasPreviousPage: boolean; startCursor: string; endCursor: string; }; totalCount: number; }>; /** * Retrieve only whitelisted holders of the share class. * @param options Optional pagination options object for whitelisted investors query * @param options.limit Number of results to return (default: 20) * @param options.offset Offset for pagination (default: 0) */ whitelistedHolders(options?: { limit: number; offset?: number; }): import("../index.js").Query<{ investors: { address: `0x${string}`; amount: Balance; centrifugeId: number; createdAt: string; holdings: Balance; isFrozen: boolean; outstandingInvest: Balance; outstandingRedeem: Balance; queuedInvest: Balance; queuedRedeem: Balance; isWhitelisted: boolean; }[]; pageInfo: { hasNextPage: boolean; hasPreviousPage: boolean; startCursor: string; endCursor: string; }; totalCount: number; }>; /** * Retrieve investor orders of the share class. * @returns Investor orders */ investorOrders(): import("../index.js").Query>; /** * Freeze a member of the share class. * @param address Address to freeze * @param centrifugeId Centrifuge ID of the network on which to freeze the member */ freezeMember(address: HexString, centrifugeId: CentrifugeId): import("../types/transaction.js").Transaction; /** * Unfreeze a member of the share class * @param address Address to unfreeze * @param centrifugeId Centrifuge ID of the network on which to unfreeze the member */ unfreezeMember(address: HexString, centrifugeId: CentrifugeId): import("../types/transaction.js").Transaction; /** * Get the pending and claimable investment/redeem amounts for all investors * in a given share class (per vault/chain) */ investmentsByVault(centrifugeId: CentrifugeId): import("../index.js").Query<{ investor: HexString; assetId: AssetId; centrifugeId: number; epoch: number; epochType: "deposit" | "issue" | "redeem" | "revoke"; investorAmount: Balance; totalEpochAmount: Balance; claimableDepositShares?: Balance; claimableRedeemAssets?: Balance; pendingIssuances: any[]; pendingRevocations: any[]; }[]>; /** * Get closed investment orders * @returns Closed investment orders where shares have been issued */ closedInvestments(): import("../index.js").Query; /** * Get closed redemption orders * @returns Closed redemption orders where shares have been revoked */ closedRedemptions(): import("../index.js").Query; /** * Get detailed invest order information including per-user breakdowns with helper methods. * @returns Invest order data with helper methods for efficient lookups */ investOrdersDetails(): import("../index.js").Query<{ getPendingInvestsByVault: (assetId: AssetId | string, centrifugeId: CentrifugeId) => (Omit<{ assetId: AssetId; centrifugeId: number; account: HexString; investor: HexString; pendingAmount: string; queuedAmount: string; }, "pendingAmount" | "queuedAmount"> & { pendingAmount: Balance; queuedAmount: Balance; })[]; getApprovedInvestsByVaultAndEpoch: (assetId: AssetId | string, centrifugeId: CentrifugeId, epoch: number) => { assetId: AssetId; centrifugeId: number; account: HexString; investor: HexString; index: number; approvedAt: Date | null; approvedAtTxHash: string | null; approvedAmount: Balance; issuedAt: Date | null; createdAtTxHash: string | null; }[]; getQueuedInvestByAsset: (assetId: AssetId | string) => Balance | undefined; getAssetPrice: (assetId: AssetId | string) => Price | undefined; }>; /** * Get detailed redeem order information including per-user breakdowns with helper methods. * @returns Redeem order data with helper methods for efficient lookups */ redeemOrdersDetails(): import("../index.js").Query<{ getPendingRedeemsByVault: (assetId: AssetId | string, centrifugeId: CentrifugeId) => { assetId: AssetId; centrifugeId: number; account: HexString; investor: HexString; pendingAmount: Balance; queuedAmount: Balance; createdAtTxHash: string | null; updatedAtTxHash: string | null; tokenId: string; }[]; getApprovedRedeemsByVaultAndEpoch: (assetId: AssetId | string, centrifugeId: CentrifugeId, epoch: number) => { assetId: AssetId; centrifugeId: number; account: HexString; investor: HexString; index: number; approvedAt: Date | null; approvedAmount: Balance; revokedAt: Date | null; }[]; getQueuedRedeemByAsset: (assetId: AssetId | string) => Balance | undefined; getAssetPrice: (assetId: AssetId | string) => Price | undefined; }>; /** * Get the valuation contract address for this share class on a specific chain. * @param centrifugeId */ valuation(centrifugeId: CentrifugeId): import("../index.js").Query<`0x${string}`>; /** * Set the default valuation contract for this share class on a specific chain. * @param centrifugeId - The centrifuge ID where the valuation should be updated * @param valuation - The address of the valuation contract */ updateValuation(centrifugeId: CentrifugeId, valuation: HexString): import("../types/transaction.js").Transaction; /** * Update the hook for this share class on a specific chain. * @param centrifugeId - The centrifuge ID where the hook should be updated * @param hook - The address of the new hook contract */ updateHook(centrifugeId: CentrifugeId, hook: HexString): import("../types/transaction.js").Transaction; /** * Update both (or one of) the hook and valuation for this share class on a specific chain in a single transaction. * @param centrifugeId - The centrifuge ID where the updates should be applied * @param hook - The address of the new hook contract (optional) * @param valuation - The address of the new valuation contract (optional) */ updateHookAndValuation(centrifugeId: CentrifugeId, hook?: HexString, valuation?: HexString): import("../types/transaction.js").Transaction; /** * Check whether cross-chain transfers are enabled for this share class by verifying * that chain representative addresses are whitelisted as members on each other's chains. * Only checks chains that use the fullRestrictionsHook, since other hooks don't restrict * cross-chain transfers. * * @returns Observable of boolean — true if all fullRestrictionsHook chain pairs have * each other's representative addresses whitelisted, or if there are fewer * than 2 such chains (nothing to restrict). */ crossChainTransferStatus(): import("../index.js").Query; /** * Check which destination networks are valid for a cross-chain share transfer from a given source chain. * * For each deployed destination network, validates: * 1. The share token and hook (restriction manager) are deployed on both source and destination * 2. On the source chain: `checkTransferRestriction(sender, address(uint160(destinationCentrifugeId)), 0)` * — verifies the destination chain's representative address is a valid receiver * 3. On the destination chain: `checkTransferRestriction(address(uint160(sourceCentrifugeId)), receiver, 0)` * — verifies the receiver can receive tokens on the destination chain * * @param sourceCentrifugeId - The chain the shares would be transferred from * @param receiver - The address that would receive shares on the destination chain * @returns Observable of a map: destination centrifugeId → whether the transfer is allowed */ allowedCrosschainTransferDestinations(sourceCentrifugeId: CentrifugeId, receiver: HexString): import("../index.js").Query>; /** * Transfer shares cross-chain. Burns shares on the source chain and mints them on the destination chain. * @param sourceCentrifugeId - The chain where the shares currently exist * @param destinationCentrifugeId - The chain to transfer shares to * @param receiver - The address to receive shares on the destination chain * @param amount - Amount of shares to transfer (as bigint, raw on-chain value) */ crosschainTransferShares(sourceCentrifugeId: CentrifugeId, destinationCentrifugeId: CentrifugeId, receiver: HexString, amount: bigint): import("../types/transaction.js").Transaction; } //# sourceMappingURL=ShareClass.d.ts.map