import { ResultAsync, Result } from "neverthrow"; import { Subject } from "rxjs"; import { ActiveStateChannel } from "../ActiveStateChannel"; import { Balances } from "../Balances"; import { ChainId } from "../ChainId"; import { ControlClaim } from "../ControlClaim"; import { BlockchainUnavailableError, InvalidParametersError, ProxyError, GovernanceSignerUnavailableError, CoreInitializationErrors } from "../errors"; import { EthereumAccountAddress } from "../EthereumAccountAddress"; import { GatewayUrl } from "../GatewayUrl"; import { PullPayment } from "../PullPayment"; import { PushPayment } from "../PushPayment"; import { ProviderId } from "../ProviderId"; import { InitializeStatus } from "../InitializeStatus"; import { ChainInformation } from "../ChainInformation"; import { IHypernetPayments } from "../interfaces/IHypernetPayments"; import { IHypernetGovernance } from "../interfaces/IHypernetGovernance"; import { IHypernetRegistries } from "../interfaces/IHypernetRegistries"; /** * HypernetCore is a single instance of the Hypernet Protocol, representing a single * user account. The user can be /both/ a consumer and a provider. */ export interface IHypernetCore { initialized(chainId?: ChainId): ResultAsync; waitInitialized(chainId?: ChainId): ResultAsync; /** * Probably can be removed, but leaving as a reminder in case we need to solve * the multiple-instance-of-Hypernet-core issue */ inControl(): Result; /** * This returns the linked Ethereum accounts via your installed wallet (ie: Metamask) */ getEthereumAccounts(): ResultAsync; /** * This must be called before most other calls; it is used to specify what account addres * hypernet core will be representing. * @param account The address that says who this instance of HypernetCore is representing. */ initialize(chainId?: ChainId): ResultAsync; getInitializationStatus(): ResultAsync; providePrivateCredentials(privateKey: string | null, mnemonic: string | null): ResultAsync; provideProviderId(providerId: ProviderId): ResultAsync; rejectProviderIdRequest(): ResultAsync; getBlockNumber(): ResultAsync; retrieveChainInformationList(): ResultAsync, ProxyError>; retrieveGovernanceChainInformation(): ResultAsync; initializeForChainId(chainId: ChainId): ResultAsync; switchProviderNetwork(chainId: ChainId): ResultAsync; getMainProviderChainId(): ResultAsync; payments: IHypernetPayments; governance: IHypernetGovernance; registries: IHypernetRegistries; /** * Observables for seeing what's going on */ onControlClaimed: Subject; onControlYielded: Subject; onPushPaymentSent: Subject; onPullPaymentSent: Subject; onPushPaymentUpdated: Subject; onPullPaymentUpdated: Subject; onPushPaymentReceived: Subject; onPullPaymentReceived: Subject; onPushPaymentDelayed: Subject; onPullPaymentDelayed: Subject; onPushPaymentCanceled: Subject; onPullPaymentCanceled: Subject; onBalancesChanged: Subject; onCeramicAuthenticationStarted: Subject; onCeramicAuthenticationSucceeded: Subject; onCeramicFailed: Subject; onGatewayAuthorized: Subject; onGatewayDeauthorizationStarted: Subject; onAuthorizedGatewayUpdated: Subject; onAuthorizedGatewayActivationFailed: Subject; onGatewayIFrameDisplayRequested: Subject; onGatewayIFrameCloseRequested: Subject; onCoreIFrameDisplayRequested: Subject; onCoreIFrameCloseRequested: Subject; onInitializationRequired: Subject; onPrivateCredentialsRequested: Subject; onWalletConnectOptionsDisplayRequested: Subject; onStateChannelCreated: Subject; onChainConnected: Subject; onGovernanceChainConnected: Subject; onChainChanged: Subject; onAccountChanged: Subject; onGovernanceChainChanged: Subject; onGovernanceAccountChanged: Subject; onGovernanceSignerUnavailable: Subject; } export declare const IHypernetCoreType: unique symbol; //# sourceMappingURL=IHypernetCore.d.ts.map