///
import { EthereumAddress, EthereumPrivateKey, EthereumSignature, EthereumTransactionAction } from '../../../models';
import { EthereumMultisigPluginTransaction } from '../ethereumMultisigPlugin';
import { EthereumGnosisMultisigTransactionOptions, EthereumMultisigRawTransaction, GnosisSafeSignature, GnosisSafeRawTransaction, GnosisSafeTransaction } from './models';
export declare class GnosisSafeMultisigPluginTransaction implements EthereumMultisigPluginTransaction {
private _multisigOptions;
private _chainUrl;
private _owners;
private _threshold;
private _multisigAddress;
private _parentRawTransaction;
private _rawGnosisTransaction;
private _transactionHash;
requiresParentTransaction: boolean;
constructor(options: EthereumGnosisMultisigTransactionOptions, chainUrl: string);
/** Allows parent class to (re)initialize options */
init(): Promise;
get multisigOptions(): EthereumGnosisMultisigTransactionOptions;
/** Same as rawTransaction, except signatures.
* To be used with gnosis utils, which expects this format for serializations
*/
get safeTransaction(): GnosisSafeTransaction;
/** Whether the raw transaction body has been set or prepared */
get hasParentTransaction(): boolean;
/** Get the raw transaction (either regular or multisig) */
get parentRawTransaction(): EthereumMultisigRawTransaction;
/** Whether the raw transaction body has been set or prepared */
get hasRawTransaction(): boolean;
get rawTransaction(): GnosisSafeRawTransaction;
get multisigAddress(): EthereumAddress;
get owners(): EthereumAddress[];
get threshold(): number;
/** buffer encoding of transaction hash to be signed */
get signBuffer(): Buffer;
get chainUrl(): string;
get multisigContract(): any;
/** Returns address, for which, a matching signature must be included in signatures */
get missingSignatures(): EthereumAddress[];
/** Signatures array of safeTransaction that will be passed in executeSafeTransaction */
get gnosisSignatures(): GnosisSafeSignature[];
/** Signatures - implementation required by interface */
get signatures(): EthereumSignature[];
/** Returns array of the required addresses for a transaction/multisig transaction
* Returns the from address in the action or addresses from multisig options for multisig transaction
*/
get requiredAuthorizations(): EthereumAddress[];
private assertSignatureOwnerValidAndUnique;
private assertValidOptions;
/** Checks if signature addresses match with multisig owners and adds to the signatures array */
addSignatures(signatures: EthereumSignature[]): Promise;
/** Alternative (optional) way of adding a 'signature' to the Gnosis contract/transaction
* May be called for one or more privateKeys and adds signatures to contract on-chain
* Add a 'placeholder' signature into signatures array (placeholder is returned from approveSafeTransaction)
* The placeholder signature(s) is needed to be sent when executing the gnosis TX on-chain
*/
addApprovalSignatureToGnosisContract(privateKeys: EthereumPrivateKey[]): Promise;
/** Determine the Nonce to use for the transaction - automatically advances by Gnosis contract if needed */
getNonce(): Promise;
/** Whether there is an attached signature for the provided address */
hasSignatureForAddress(address: EthereumAddress): boolean;
setTransactionHash(): Promise;
/** Ensures that the value comforms to a well-formed signature */
toSignature(value: any): GnosisSafeSignature;
/** Verify and set multisigAddress, owners and threshold.
* Set safeTransaction from GnosisSafeRawTransaction or EthereumTransactionAction that has passed from ethTransaction class.
*/
setTransaction(transaction: EthereumTransactionAction | GnosisSafeRawTransaction): Promise;
sign(privateKeys: EthereumPrivateKey[]): Promise;
/** Generates ethereum chain transaction properties (to, data..) from safeTransaction body */
private setParentTransactionIfReady;
validate(): Promise;
/** Throws if no raw transaction body */
private assertHasRaw;
}