import { Transaction } from "./transaction"; import { IAddress, IGasLimit, INonce } from "./interface"; import { INetworkConfig } from "./interfaceOfNetwork"; export declare class RelayedTransactionV2Builder { innerTransaction: Transaction | undefined; innerTransactionGasLimit: IGasLimit | undefined; relayerAddress: IAddress | undefined; relayerNonce: INonce | undefined; netConfig: INetworkConfig | undefined; /** * Sets the inner transaction to be used. It has to be already signed and with gasLimit set to 0. These checks * are performed on the build() method * * @param {Transaction} transaction The inner transaction to be used */ setInnerTransaction(transaction: Transaction): RelayedTransactionV2Builder; /** * Sets the gas limit to be used for the SC Call inside the inner transaction * * @param {IGasLimit} gasLimit The gas limit to be used. The inner transaction needs to have the gas limit set to 0, * so this field will specify the gas to be used for the SC call of the inner transaction */ setInnerTransactionGasLimit(gasLimit: IGasLimit): RelayedTransactionV2Builder; /** * Sets the network config to be used for building the relayed v2 transaction * * @param {INetworkConfig} netConfig The network configuration to be used */ setNetworkConfig(netConfig: INetworkConfig): RelayedTransactionV2Builder; /** * Sets the address of the relayer (the one that will actually pay the fee) * * @param relayerAddress */ setRelayerAddress(relayerAddress: IAddress): RelayedTransactionV2Builder; /** * (optional) Sets the nonce of the relayer * * @param relayerNonce */ setRelayerNonce(relayerNonce: INonce): RelayedTransactionV2Builder; /** * Tries to build the relayed v2 transaction based on the previously set fields. * It returns a transaction that isn't signed * * @throws ErrInvalidRelayedV2BuilderArguments * @throws ErrGasLimitShouldBe0ForInnerTransaction * @return Transaction */ build(): Transaction; }