import { Address, App, SubscriptionHandler, ForwardingPath } from '@1hive/connect-core'; import { BigNumber } from 'ethers'; import { SubscriptionCallback, IHatchConnector } from '../types'; import Contribution from './Contribution'; import Contributor from './Contributor'; import GeneralConfig from './GeneralConfig'; declare class Hatch { #private; constructor(connector: IHatchConnector, app: App); /** * Disconnect the connector from the subgraph. */ disconnect(): Promise; /** * Fetch the GeneralConfig object that contains configuration data both of * the hatch and the hatch oracle. * @returns {Promise} A promise that resolves to a GeneralConfig * entity object. */ generalConfig(): Promise; /** * Subscribe to the GeneralConfig object updates that contains configuration data both * of the hatch and the hatch oracle. * @param {SubscriptionCallback} callback A callback function that * receives the updated general configuration data. * @returns {SubscriptionHandler} A function handler used to cancel the * subscription at any time. */ onGeneralConfig(callback: SubscriptionCallback): SubscriptionHandler; /** * Fetch multiple contributors. * @param {Object} param0 A filtering options object for the query. * @returns {Promise} A promise which resolves to an array of Contributor objects. */ contributors({ first, skip, orderBy, orderDirection, }?: { first?: number | undefined; skip?: number | undefined; orderBy?: string | undefined; orderDirection?: string | undefined; }): Promise; /** * Subscribe to multiple contributors data updates. * @param {Object} param0 A filtering options object for the query. * @param {SubscriptionCallback} callback A callback function that * receives the updated array of Contributor objects. * @returns {SubscriptionHandler} A function handler used to cancel the * subscription at any time. */ onContributors({ first, skip, orderBy, orderDirection }: { first?: number | undefined; skip?: number | undefined; orderBy?: string | undefined; orderDirection?: string | undefined; } | undefined, callback: SubscriptionCallback): SubscriptionHandler; /** * Fetch a single contributor. * @param {string} contributor A string that contains the contributor address. * @returns {Contributor} A promise that resolves to the searched contributor. */ contributor(contributor?: string): Promise; /** * Subscribe to a single contributor data updates. * @param {string} contributor The contributor address. * @param {SubscriptionCallback} callback A callback function that * receives the updated Contributor object data. * @returns {SubscriptionHandler} A function handler used to cancel the subscription * at any time. */ onContributor(contributor: string | undefined, callback: SubscriptionCallback): SubscriptionHandler; /** * Fetch multiple contributions. * @param {Object} param0 A filtering options object for the query. * @returns {Promise} A promise that resolves to an array of Contribution objects. */ contributions({ contributor, first, skip, orderBy, orderDirection, }?: { contributor?: string | undefined; first?: number | undefined; skip?: number | undefined; orderBy?: string | undefined; orderDirection?: string | undefined; }): Promise; /** * Subscribe to multiple contributions data updates. * @param {Object} param0 A filtering options object for the query. * @param {SubscriptionCallback): SubscriptionHandler; /** * Open the hatch. * @param {Address} signerAddress A string that contains the transaction signer address. * @returns {Promise} A promise that resolves to a ForwardingPath * object which contains all the transactions needed to be signed in order to open * the hatch. */ open(signerAddress: Address): Promise; /** * Close the hatch. * @param {Address} signerAddress A string that contains the transaction signer address. * @returns {Promise} A promise that resolves to a ForwardingPath * object which contains all the transactions needed to be signed in order to close * the hatch. */ close(signerAddress: Address): Promise; /** * Contribute to the hatch. * @param {Address} contributor The address of the * contributing entity. * @param {string} value A string that contains the amount of tokens to contribute. * @returns {Promise} A promise that resolves to a ForwardingPath object * which contains all the transactions needed to be signed in order to contribute to the hatch. */ contribute(contributor: Address, value: string): Promise; /** * Refund a contributor hatch contribution. * @param {Address} contributor The address of the contributor. * @param {number} vestedPurchaseId The id of the vested hatch tokens purchase. * @returns {Promise} A promise that resolves to a Forwarding Path * object which contains all the transactions needed to be signed in order to get * a refund from the hatch. */ refund(contributor: Address, vestedPurchaseId: number): Promise; reserveTokenBalance(): Promise; /** * Fetch a holder's contribution token balance. * @param {Address} account The account address. * @returns {Promise} A promise that resolves to the holder * token balance. */ contributionTokenBalance(account: Address): Promise; /** * Return the allowed amount of contribution tokens someone can contribute to the * hatch based on how much score tokens he has. * @param {Address} account The account address. * @returns {Promise} A promise that resolves to the allowed * contribution token amount. */ allowedContributionAmount(account: Address): Promise; /** * Fetch awarded hatch token amount based on the * impact hours formula. * @param {Address} account The account address. * @returns {Promise} A promise that resolves to the * contributor's awarded tokens amount */ awardedTokenAmount(account: Address): Promise; } export default Hatch; //# sourceMappingURL=Hatch.d.ts.map