import BigNumber from 'bignumber.js'; import { AccountTypeInfo, HistoricPolyxTransaction } from '../../../api/entities/Account/types'; import { Subsidies } from '../../../api/entities/Subsidies'; import { Authorizations, Context, Entity, FungibleAsset, Identity, MultiSig, MultiSigProposal, NftCollection, Staking } from '../../../internal'; import { ExtrinsicsOrderBy } from '../../../middleware/types'; import { AccountBalance, AccountCollection, AssetHolderBalance, CheckPermissionsResult, ExtrinsicData, Permissions, ResultSet, SignerType, SimplePermissions, SubCallback, TxTag, UnsubCallback } from '../../../types'; /** * @hidden */ export interface UniqueIdentifiers { address: string; } /** * Represents an Account in the Polymesh blockchain. Accounts can hold POLYX, control Identities and vote on proposals (among other things) */ export declare class Account extends Entity { /** * @hidden * Check if a value is of type {@link UniqueIdentifiers} */ static isUniqueIdentifiers(identifier: unknown): identifier is UniqueIdentifiers; /** * Polymesh-specific address of the Account. Serves as an identifier */ address: string; /** * A hex representation of the cryptographic public key of the Account. This is consistent across * Substrate chains, while the address depends on the chain as well. */ key: string; authorizations: Authorizations; subsidies: Subsidies; staking: Staking; /** * @hidden */ constructor(identifiers: UniqueIdentifiers, context: Context); /** * Get the free/locked POLYX balance of the Account * * @returns Promise that resolves to the Account's POLYX balance information */ getBalance(): Promise; /** * Get the free/locked POLYX balance of the Account (with subscription support) * * @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 */ getBalance(callback: SubCallback): Promise; /** * Retrieve the Identity associated to this Account (null if there is none) */ getIdentity(): Promise; /** * Retrieve a list of transactions signed by this Account. Can be filtered using parameters * * @note if both `blockNumber` and `blockHash` are passed, only `blockNumber` is taken into account. * Also, for ordering by block_id, one should pass `ExtrinsicsOrderBy.BlockIdAsc` or `ExtrinsicsOrderBy.BlockIdDesc` * in order of their choice (since block ID is a string field in middleware v2) * * @param filters.tag - tag associated with the transaction * @param filters.success - whether the transaction was successful or not * @param filters.size - page size * @param filters.start - page offset * * @note uses the middleware v2 */ getTransactionHistory(filters?: { blockNumber?: BigNumber; blockHash?: string; tag?: TxTag; success?: boolean; size?: BigNumber; start?: BigNumber; orderBy?: ExtrinsicsOrderBy; }): Promise>; /** * Check whether this Account is frozen. If frozen, it cannot perform any Identity related action until the primary Account of the Identity unfreezes all secondary Accounts * * @note returns false if the Account isn't associated to any Identity */ isFrozen(): Promise; /** * Retrieve the Permissions this Account has as a Permissioned Account for its corresponding Identity * * @throws if there is no Identity associated with the Account */ getPermissions(): Promise; /** * Check if this Account possesses certain Permissions to act on behalf of its corresponding Identity * * @returns which permissions the Account is missing (if any) and the final result */ checkPermissions(permissions: SimplePermissions): Promise>; /** * Fetch the MultiSig this Account is part of. If this Account is not a signer on any MultiSig, return null */ getMultiSig(): Promise; /** * Determine whether this Account exists on chain */ exists(): Promise; /** * Return the Account's address */ toHuman(): string; /** * Retrieve the current nonce for this Account */ getCurrentNonce(): Promise; /** * Retrieve the type of Account, and its relation to an Identity, if applicable */ getTypeInfo(): Promise; /** * Returns POLYX transactions associated with this account * * @param filters.size - page size * @param filters.start - page offset * * @note uses the middleware */ getPolyxTransactions(filters: { size?: BigNumber; start?: BigNumber; }): Promise>; /** * Returns pending MultiSig proposals for this Account * * @note uses the middleware * @throws if the Account is not a signer on any MultiSig */ getPendingProposals(): Promise; /** * Returns all off chain receipts used by this Account */ getOffChainReceipts(): Promise; /** * Returns next assetID that will be generated for this Identity */ getNextAssetId(): Promise; /** * Retrieve the balances of all fungible assets in this Account * * @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 Account * * @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; } //# sourceMappingURL=index.d.ts.map