/** * Copyright 2019 the orbs-ethereum-contracts authors * This file is part of the orbs-ethereum-contracts library in the Orbs project. * * This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. * The above notice should be included in all copies or substantial portions of the software. */ import Web3 from 'web3'; import { PromiEvent, TransactionReceipt } from 'web3-core'; import { IStakingService, IUnstakingStatus, StakingServiceEventCallback } from './IStakingService'; import { TUnsubscribeFunction } from '../contractsTypes/contractTypes'; export declare class StakingService implements IStakingService { private web3; private readonly stakingContractAddress; private stakingContract; constructor(web3: Web3, stakingContractAddress?: string); setFromAccount(address: string): void; getStakingContractAddress(): string; stake(amount: bigint): PromiEvent; unstake(amount: bigint): PromiEvent; restake(): PromiEvent; withdraw(): PromiEvent; readTotalStakedInFullOrbs(): Promise; readStakeBalanceOf(stakeOwner: string): Promise; readTotalStakedTokens(): Promise; readUnstakeStatus(stakeOwner: string): Promise; subscribeToStakedEvent(stakeOwner: string, callback: StakingServiceEventCallback): TUnsubscribeFunction; subscribeToUnstakedEvent(stakeOwner: string, callback: StakingServiceEventCallback): TUnsubscribeFunction; subscribeToRestakedEvent(stakeOwner: string, callback: StakingServiceEventCallback): TUnsubscribeFunction; subscribeToWithdrewEvent(stakeOwner: string, callback: StakingServiceEventCallback): TUnsubscribeFunction; /** * Dev Note : O.L : This function should be extracted and isolated for testing purpose. * Dev Note #2 : All the events of the 'Staking contract' have exactly the same signature. */ private subscribeToStakingContractEvent; }