import type { Filter, Log } from '@ethersproject/abstract-provider'; import type { LogDescription } from '@ethersproject/abi'; import { type EventFilter } from 'ethers'; import { type AnyColonyClient } from './clients/Core/exports.js'; import { type ContractClient, type ColonyRoles } from './types.js'; interface LogOptions { fromBlock?: number; toBlock?: number; blockHash?: string; } /** * Format role events into an Array of all roles in the colony * * E.g.: * ```typescript * [{ * address: 0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef // user address * domains: [{ // all domains the user has a role in * domainId: 1, // domainId for the roles * roles: [1, 2, 3] // Array of `ColonyRole` * }] * }] * ``` */ export declare const formatColonyRoles: (roleSetEvents: LogDescription[], recoveryRoleSetEvents: LogDescription[]) => Promise; /** * Get raw (unparsed logs) from filter * * Example: * ```typescript * // Gets the logs for the `ColonyFundsClaimed` event (not filtered) * const filter = colonyClient.filters.ColonyFundsClaimed(null, null, null); * const logs = await getLogs(colonyClient, filter); * ``` * * @param client - Any of the intantiated contract clients * @param filter - ethers compatible Filter object * @param options - Configuration options to filter logs * * @returns ethers Log array */ export declare const getLogs: (client: ContractClient, filter: Filter, options?: LogOptions) => Promise; /** * Get parsed event data from filter * * Example: * ```typescript * // Gets the logs for the `ColonyFundsClaimed` event (not filtered) * const filter = colonyClient.filters.ColonyFundsClaimed(null, null, null); * const events = await getEvents(colonyClient, filter); * ``` * * @param client - Any of the intantiated contract clients * @param filter - ethers compatible Filter object * @param options - Configuration options to filter logs * * @returns Parsed ethers LogDescription array (events) */ export declare const getEvents: (client: ContractClient, filter: Filter, options?: LogOptions) => Promise; /** * Get multiple events from multiple filters * * @remarks only works when all events are emitted by the same contract! * * @param client - Any of the intantiated contract clients * @param filters - Array of ethers compatible Filter objects * @param options - Configuration options to filter logs * * @returns Parsed ethers LogDescription array (events) */ export declare const getMultipleEvents: (client: ContractClient, filters: EventFilter[], options?: LogOptions) => Promise; /** * Get an array of all roles in the colony * * @param client - Any ColonyClient * * @returns Array of user roles in a colony (see above) fetching it's own network events */ export declare const getColonyRoles: (client: AnyColonyClient, options?: LogOptions) => Promise; export declare const getHistoricColonyRoles: (client: AnyColonyClient, fromBlock?: number, toBlock?: number) => Promise; export {};