import BigNumber from 'bignumber.js'; import { Account, Context, TransferPolyxParams } from "./internal"; import { EventIdEnum as EventId, ModuleIdEnum as ModuleId } from "./middleware/types"; import { EventIdentifier, ExtrinsicData, NetworkProperties, ProcedureMethod, SubCallback, TxTag, UnsubCallback } from "./types"; /** * Handles all Network related functionality, including querying for historical events from middleware */ export declare class Network { private context; /** * @hidden */ constructor(context: Context); /** * Retrieve the number of the latest block in the chain */ getLatestBlock(): Promise; /** * Fetch the current network version (i.e. 3.1.0) */ getVersion(): Promise; /** * Retrieve the chain's SS58 format */ getSs58Format(): BigNumber; /** * Retrieve information for the current network */ getNetworkProperties(): Promise; /** * Retrieve the protocol fees associated with running a specific transaction * * @param args.tag - transaction tag (i.e. TxTags.asset.CreateAsset or "asset.createAsset") */ getProtocolFees(args: { tag: TxTag; }): Promise; /** * Get the treasury wallet address */ getTreasuryAccount(): Account; /** * Get the Treasury POLYX balance * * @note can be subscribed to */ getTreasuryBalance(): Promise; getTreasuryBalance(callback: SubCallback): Promise; /** * Transfer an amount of POLYX to a specified Account */ transferPolyx: ProcedureMethod; /** * Retrieve a single event by any of its indexed arguments. Can be filtered using parameters * * @param opts.moduleId - type of the module to fetch * @param opts.eventId - type of the event to fetch * @param opts.eventArg0 - event parameter value to filter by in position 0 * @param opts.eventArg1 - event parameter value to filter by in position 1 * @param opts.eventArg2 - event parameter value to filter by in position 2 * * @note uses the middleware */ getEventByIndexedArgs(opts: { moduleId: ModuleId; eventId: EventId; eventArg0?: string; eventArg1?: string; eventArg2?: string; }): Promise; /** * Retrieve a list of events. Can be filtered using parameters * * @param opts.moduleId - type of the module to fetch * @param opts.eventId - type of the event to fetch * @param opts.eventArg0 - event parameter value to filter by in position 0 * @param opts.eventArg1 - event parameter value to filter by in position 1 * @param opts.eventArg2 - event parameter value to filter by in position 2 * @param opts.size - page size * @param opts.start - page offset * * @note uses the middleware */ getEventsByIndexedArgs(opts: { moduleId: ModuleId; eventId: EventId; eventArg0?: string; eventArg1?: string; eventArg2?: string; size?: BigNumber; start?: BigNumber; }): Promise; /** * Retrieve a transaction by hash * * @param opts.txHash - hash of the transaction * * @note uses the middleware */ getTransactionByHash(opts: { txHash: string; }): Promise; } //# sourceMappingURL=Network.d.ts.map