import { IConnection } from './Connection'; export interface IChallenge { challenger: string; nextOwner: string; interval: string; startOfChallenge: string; } /** * Challenge-class of the wallet */ export declare class Challenge { connection: IConnection; /** * initializes the class * @param connection The backend connection object. */ constructor(connection: IConnection); /** * Creates a new challenge on an owner. Can only be called by a `challenger`. * @param moduleInstanceAddress The CustodyModule instance address * @param ownerToChallenge The owner who will be challenged * @param successor The successor who will get the roles of the ownerToChallenge if the challenge succeeds * @returns The transaction-receipt */ challengeOwner(moduleInstanceAddress: string, ownerToChallenge: string, successor: string): Promise; /** * Allows an owner to respond to a challenge on themselves. Once a challenge is responded to the challenge is removed. * If a challenge is responded to after the challenge interval is up the challenge will not be removed. * @param moduleInstanceAddress The Custody Module instance address * @returns The transaction-receipt */ respondToChallenge(moduleInstanceAddress: string): Promise; /** * Allows a challenger to remove a challenge on an owner. Can only be called by a challenger. * @param moduleInstanceAddress The Custody Module instance address * @param owner The owner who has been challenged * @returns The transaction-receipt */ removeChallenge(moduleInstanceAddress: string, owner: string): Promise; /** * Allows the roles of an owner to be transferred if the challenge interval * has expired. This function cna be called by any account. * @param moduleInstanceAddress The backend connection object * @param ownerToTransfer The Custody module instance address * @returns The owner whose challenge has finished the challenge interval has expired */ transferOwnership(moduleInstanceAddress: string, ownerToTransfer: string): Promise; /** * Gets a challenge of an owner. If there is no active challenge an empty challenge object will be returned. * @param moduleInstanceAddress The IAMO Safe instance address * @param owner The owner to get the challenge of * @returns the challenge object */ getChallenge(moduleInstanceAddress: string, owner: string): Promise; /** * Returns if the owner has an active challenge. * @param multisigInstanceAddress The IAMO Safe instance address * @param owner The owner to check * @returns true if the owner has an active challenge */ hasActiveChallenge(multisigInstanceAddress: string, owner: string): Promise; /** * Joins a challenge (Can only be done by challenger). This reduces a challenge interval by * 90% per each challenger that joins a challenge. * @param moduleInstanceAddress The Custody module instance address * @param owner The owner who is being challenged * @returns The transaction-receipt */ joinChallenge(moduleInstanceAddress: string, owner: string): Promise; /** * Gets the interval of a challenger. * @param instanceAddress The IAMO Safe instance address * @param challenger The challenger to get the interval of * @returns the challengers interval */ getChallengerInterval(instanceAddress: string, challenger: string): Promise; } export default Challenge;