import BigNumber from 'bignumber.js'; import { HistoricSettlement, PortfolioBalance, PortfolioCollection } from '../../../api/entities/Portfolio/types'; import { BaseAsset, Context, Entity, FungibleAsset, Identity, NftCollection } from '../../../internal'; import { Asset, MoveFundsParams, NoArgsProcedureMethod, PaginationOptions, ProcedureMethod, ResultSet } from '../../../types'; export interface UniqueIdentifiers { did: string; id?: BigNumber | undefined; } export interface HumanReadable { did: string; id?: string | undefined; } /** * Represents a base Portfolio for a specific Identity in the Polymesh blockchain */ export declare abstract class Portfolio extends Entity { /** * @hidden * Check if a value is of type {@link UniqueIdentifiers} */ static isUniqueIdentifiers(identifier: unknown): identifier is UniqueIdentifiers; /** * Identity of the Portfolio's owner */ owner: Identity; /** * internal Portfolio identifier (unused for default Portfolio) */ protected _id?: BigNumber | undefined; /** * @hidden */ constructor(identifiers: UniqueIdentifiers, context: Context); /** * Return whether an Identity is the Portfolio owner * * @param args.identity - defaults to the signing Identity */ isOwnedBy(args?: { identity: string | Identity; }): Promise; /** * Return whether an Identity is the Portfolio custodian * * @param args.identity - optional, defaults to the signing Identity */ isCustodiedBy(args?: { identity: string | Identity; }): Promise; /** * Returns whether or not this Portfolio has pre-approved a particular asset */ isAssetPreApproved(asset: BaseAsset | string): Promise; /** * Returns a list of all assets this Portfolio has pre-approved. These assets will not require affirmation when being received in settlements */ preApprovedAssets(paginationOpts?: PaginationOptions): Promise>; /** * Retrieve the balances of all fungible assets in this Portfolio * * @param args.assets - array of FungibleAssets (or tickers) for which to fetch balances (optional, all balances are retrieved if not passed) */ getAssetBalances(args?: { assets: (string | FungibleAsset)[]; }): Promise; /** * Retrieve the NFTs held in this portfolio * * @param args.collections - array of NftCollection (or tickers) for which to fetch holdings (optional, all holdings are retrieved if not passed) */ getCollections(args?: { collections: (string | NftCollection)[]; }): Promise; /** * Moves funds from this Portfolio to another one owned by the same Identity * * @note required role: * - Portfolio Custodian */ moveFunds: ProcedureMethod; /** * Returns the custody of the portfolio to the portfolio owner unilaterally * * @note required role: * - Portfolio Custodian */ quitCustody: NoArgsProcedureMethod; /** * Pre-approves receiving an asset for this Portfolio. Receiving this asset in a settlement will not require manual affirmation */ preApproveAsset: ProcedureMethod<{ asset: BaseAsset | string; }, void>; /** * Removes pre-approval of an asset for this Portfolio */ removeAssetPreApproval: ProcedureMethod<{ asset: BaseAsset | string; }, void>; /** * Retrieve the custodian Identity of this Portfolio * * @note if no custodian is set, the owner Identity is returned */ getCustodian(): Promise; /** * Retrieve a list of transactions where this portfolio was involved. Can be filtered using parameters * * @param filters.account - Account involved in the settlement * @param filters.ticker - ticker involved in the transaction * * @note uses the middlewareV2 */ getTransactionHistory(filters?: { account?: string; ticker?: string; assetId?: string; }): Promise; /** * Return the Portfolio ID and owner DID */ toHuman(): HumanReadable; } //# sourceMappingURL=index.d.ts.map