import { TransactionObject } from 'web3/eth/types'; import { IConnection } from './Connection'; import { IEnrichedTransactionParameters } from './Transaction'; export interface ISafeLimit { limit: string; period: string; currentPeriod?: string; spent?: string; } /** * The limit-class of the wallet */ export declare class Limit { connection: IConnection; /** * initializes the class * @param connection The backend connection object. */ constructor(connection: IConnection); /** * Returns transaction parameters to change the a limit for a token * @param multisigInstanceAddress The address of the multisig instance. * @param limitModuleInstanceAddress The address of the module instance. * @param index The array index of the limit. * @param newAmount The new allowance. * @param token The ERC20 token contract address or the zero address for eth (default: eth). * @returns The created transaction parameters */ changeLimit(multisigInstanceAddress: string, limitModuleInstanceAddress: string, index: number, newAmount: string, token?: string): Promise; /** * Returns transaction parameters to add a limit to a token * @param limitModuleInstanceAddress The address of the module instance. * @param multisigInstanceAddress The address of the multisig instance. * @param limit The limit object. * @param token The ERC20 token contract address or the zero address for eth (default: eth). * @returns The transaction parameters to add a limit to a token */ addLimit(limitModuleInstanceAddress: string, multisigInstanceAddress: string, limit: ISafeLimit, token?: string): Promise; /** * Returns the max number of limits allowed per token * @param limitModuleInstanceAddress The address of the module instance * @returns the max number of limits allowed per token */ getMaxLimitNumber(limitModuleInstanceAddress: string): Promise; /** * Returns an array of Limits * @param limitModuleInstanceAddress The address of the module instance. * @param token The ERC20 token contract address or the zero address for eth (default: eth). * @returns An array of limits */ getLimits(limitModuleInstanceAddress: string, token?: string): Promise; /** * Returns transaction parameters to delete a limit from a token * @param limitModuleInstanceAddress The address of the module instance. * @param multisigInstanceAddress The address of the multisig instance. * @param index The array index of the limit. * @param token The ERC20 token contract address or the zero address for eth (default: eth). * @returns The transaction parameters to delete a limit from a token */ deleteLimit(limitModuleInstanceAddress: string, multisigInstanceAddress: string, index: number, token?: string): Promise; /** * Returns if the amount is under the limit for a token * @param limitModuleInstanceAddress The address of the module instance. * @param to The address of the receiving account. * @param amount The amount to transfer * @param token The ERC20 token contract address or the zero address for eth (default: eth). * @returns True if the amount is under the limit */ isUnderLimits(limitModuleInstanceAddress: string, to: string, amount: string, token?: string): Promise; /** * Sends a token from the default account if the amount is under the limit. * @param limitModuleInstanceAddress The address of the module instance. * @param to The address of the receiving account. * @param amount The amount to transfer. * @param token The ERC20 token contract address or the zero address for eth (default: eth). * @returns The transaction parameters to send a transaction under limit */ sendUnderLimit(limitModuleInstanceAddress: string, to: string, amount: string, token?: string): Promise>; /** * Check limit usage of wallet address based on the contollerWaleltCustodyModule * @param controllerWalletCustodyModuleAddress The address of the module instance. * @param walletAddress The multisig wallet address * @param amount The amount to transfer. * @param nonce The transaction nonce of wallet * @param token The ERC20 token contract address or the zero address for eth (default: eth). * @returns true if the transaction would pass */ checkLimitUsage(controllerWalletCustodyModuleAddress: string, walletAddress: string, amount: string, nonce: string, token?: string): Promise; } export default Limit;