import BigNumber from 'bignumber.js'; import { AssetPermissions } from '../../../api/entities/Identity/AssetPermissions'; import { IdentityAuthorizations } from '../../../api/entities/Identity/IdentityAuthorizations'; import { Portfolios } from '../../../api/entities/Identity/Portfolios'; import { BaseAsset, Context, Entity, FungibleAsset, Venue } from '../../../internal'; import { AssetHoldersOrderBy, NftHoldersOrderBy } from '../../../middleware/types'; import { Asset, CheckRolesResult, DistributionWithDetails, GroupedInstructions, GroupedInvolvedInstructions, HeldNfts, HistoricalInstructionFilters, HistoricInstruction, MultiSigSigners, PaginationOptions, PermissionedAccount, ProcedureMethod, ReceiverAffirmationRequirement, ResultSet, Role, SubCallback, UnsubCallback } from '../../../types'; /** * Properties that uniquely identify an Identity */ export interface UniqueIdentifiers { did: string; } /** * Represents an Identity in the Polymesh blockchain */ export declare class Identity extends Entity { /** * @hidden * Checks if a value is of type {@link UniqueIdentifiers} */ static isUniqueIdentifiers(identifier: unknown): identifier is UniqueIdentifiers; /** * Identity ID as stored in the blockchain */ did: string; authorizations: IdentityAuthorizations; portfolios: Portfolios; assetPermissions: AssetPermissions; /** * Create an Identity entity * * @hidden */ constructor(identifiers: UniqueIdentifiers, context: Context); /** * Check whether this Identity possesses the specified Role */ hasRole(role: Role): Promise; /** * Retrieve the balance of a particular Asset by ticker * * @param args.ticker - Asset ticker * * @returns Promise that resolves to the Asset balance */ getAssetBalance(args: { ticker: string; }): Promise; /** * Retrieve the balance of a particular Asset by Asset ID * * @param args.assetId - Asset identifier * * @returns Promise that resolves to the Asset balance */ getAssetBalance(args: { assetId: string; }): Promise; /** * Retrieve the balance of a particular Asset by ticker (with subscription support) * * @param args.ticker - Asset ticker * @param callback - Callback function that receives balance updates * * @returns Promise that resolves to an unsubscribe function * * @note can be subscribed to, if connected to node using a web socket */ getAssetBalance(args: { ticker: string; }, callback: SubCallback): Promise; /** * Retrieve the balance of a particular Asset by Asset ID (with subscription support) * * @param args.assetId - Asset identifier * @param callback - Callback function that receives balance updates * * @returns Promise that resolves to an unsubscribe function * * @note can be subscribed to, if connected to node using a web socket */ getAssetBalance(args: { assetId: string; }, callback: SubCallback): Promise; /** * Check whether this Identity is Governance Committee member */ isGcMember(): Promise; /** * Check whether this Identity is a DID Registrar */ isDidRegistrar(): Promise; /** * Retrieve the primary Account associated with the Identity * * @returns Promise that resolves to the primary Account information */ getPrimaryAccount(): Promise; /** * Retrieve the primary Account associated with the Identity (with subscription support) * * @param callback - Callback function that receives primary Account updates * * @returns Promise that resolves to an unsubscribe function * * @note can be subscribed to, if connected to node using a web socket */ getPrimaryAccount(callback: SubCallback): Promise; /** * Retrieve a list of all Assets which were held at one point by this Identity * * @note uses the middlewareV2 * @note supports pagination */ getHeldAssets(opts?: { order?: AssetHoldersOrderBy; size?: BigNumber; start?: BigNumber | undefined; }): Promise>; /** * Retrieve a list of all NftCollections which were held at one point by this Identity * * @note uses the middlewareV2 * @note supports pagination */ getHeldNfts(opts?: { order?: NftHoldersOrderBy; size?: BigNumber; start?: BigNumber; }): Promise>; /** * Check whether this Identity possesses all specified roles */ checkRoles(roles: Role[]): Promise; /** * Get the list of Assets for which this Identity is a trusted claim issuer * * @note uses the middlewareV2 */ getTrustingAssets(): Promise; /** * Retrieve all Venues created by this Identity */ getVenues(): Promise; /** * Retrieve all Instructions where this Identity is either the custodian of one or more portfolios in the legs or owns one or more accounts in the legs, * grouped by status */ getInstructions(): Promise; /** * Get all the instructions grouped by status, where given portfolios are involved * * @hidden */ private assembleGroupedInstructions; /** * Retrieve all Instructions where this Identity is a participant (owner/custodian), * grouped by the role of the Identity and Instruction status */ getInvolvedInstructions(): Promise; /** * Check whether secondary Accounts are frozen * * @returns Promise that resolves to true if secondary accounts are frozen, false otherwise */ areSecondaryAccountsFrozen(): Promise; /** * Check whether secondary Accounts are frozen (with subscription support) * * @param callback - Callback function that receives frozen status updates * * @returns Promise that resolves to an unsubscribe function * * @note can be subscribed to, if connected to node using a web socket */ areSecondaryAccountsFrozen(callback: SubCallback): Promise; /** * Retrieve every Dividend Distribution for which this Identity is eligible and hasn't been paid * * @note uses the middleware * @note this query can be potentially **SLOW** depending on which Assets this Identity has held */ getPendingDistributions(): Promise; /** * Get the list of secondary Accounts related to the Identity * * @param paginationOpts - Options for pagination * * @returns Promise that resolves to a paginated result of secondary accounts * * @note supports pagination */ getSecondaryAccounts(paginationOpts?: PaginationOptions): Promise>; /** * Get the list of secondary Accounts related to the Identity (with subscription support) * * @param callback - Callback function that receives secondary account updates * * @returns Promise that resolves to an unsubscribe function * * @note can be subscribed to, if connected to node using a web socket */ getSecondaryAccounts(callback: SubCallback): Promise; /** * Get the list of secondary Accounts related to the Identity (with pagination and subscription support) * * @param paginationOpts - Options for pagination * @param callback - Callback function that receives secondary account updates * * @returns Promise that resolves to an unsubscribe function * * @note supports pagination * @note can be subscribed to, if connected to node using a web socket */ getSecondaryAccounts(paginationOpts: PaginationOptions, callback: SubCallback): Promise; /** * Determine whether this Identity exists on chain * * @note asset Identities aren't considered to exist for this check */ exists(): Promise; /** * Return the Identity's DID */ toHuman(): string; /** * Retrieve all Instructions that have been associated with this Identity's DID * * @note uses the middleware V2 * @note supports pagination * */ getHistoricalInstructions(filter?: Omit): Promise>; /** * Returns a list of all assets this Identity has pre-approved. These assets will not require affirmation when being received in settlements */ preApprovedAssets(paginationOpts?: PaginationOptions): Promise>; /** * Returns whether or not this Identity has pre-approved a particular asset */ isAssetPreApproved(asset: BaseAsset | string): Promise; /** * Returns whether or not this Identity has opted in to mandatory receiver affirmation. * When `true`, the identity must explicitly affirm incoming asset transfer in settlements * unless an asset level or portfolio level exemption applies. */ isMandatoryReceiverAffirmationEnabled(): Promise; /** * Enable or disable mandatory receiver affirmation for incoming settlement transfers. * When enabled (`ReceiverAffirmationRequirement.Required`), the signing identity must explicitly affirm * any incoming asset transfer unless an asset level or portfolio level exemption applies. * When disabled (`ReceiverAffirmationRequirement.Automatic`), all incoming transfers are auto-affirmed. */ setMandatoryReceiverAffirmation: ProcedureMethod<{ requirement: ReceiverAffirmationRequirement; }, void>; /** * Returns the list of MultiSig accounts along with their signatories this identity has responsibility for. * The roles possible are: * - Admin: The identity is able to unilaterally modify the MultiSig properties, such as the signers and signatures required for a proposal * - Payer: The identity's primary key will be deducted any POLYX fees the MultiSig may incur * * @note this query can be potentially **SLOW** depending on the number of MultiSigs present on the chain */ getMultiSigSigners(): Promise; /** * Returns the off chain authorization nonce for this Identity */ getOffChainAuthorizationNonce(): Promise; } //# sourceMappingURL=index.d.ts.map