UNPKG

@byzantine/operator-sdk

Version:

SDK for integrating operators with Byzantine Finance ecosystem

40 lines (39 loc) 1.52 kB
/** * OperatorNetworkOptInService * * Client for interacting with the Symbiotic Network Opt-In service * This service allows operators to opt into specific networks they want to validate */ import { ethers, TransactionResponse } from "ethers"; import { ChainsOptions } from "../../types"; export declare class OperatorNetworkOptInService { private readonly provider; private readonly signer; private readonly chainId; private contract; constructor(provider: ethers.Provider, signer: ethers.Signer, chainId: ChainsOptions); /** * Opt-in to a specific network * Allows an operator to indicate intention to validate for a network * * @param networkAddress - The address of the network to opt into * @returns Transaction response */ optIn(networkAddress: string): Promise<TransactionResponse>; /** * Opt-out from a specific network * Allows an operator to stop validating for a network * * @param networkAddress - The address of the network to opt out from * @returns Transaction response */ optOut(networkAddress: string): Promise<TransactionResponse>; /** * Check if an operator is opted-in to a specific network * * @param operatorAddress - The address of the operator to check * @param networkAddress - The address of the network to check * @returns Boolean indicating if the operator is opted in */ isOptedIn(operatorAddress: string, networkAddress: string): Promise<boolean>; }