Builder

class Builder
Input data necessary to create a signed transaction.
Legacy and EIP2718/EIP1559 transactions supported, see TransactionMode.
Protobuf type TW.Ethereum.Proto.SigningInput

Functions

Link copied to clipboard
Chain identifier (uint256, serialized little endian)
bytes chain_id = 1;
Link copied to clipboard
Gas limit (uint256, serialized little endian)
bytes gas_limit = 5;
Link copied to clipboard
Gas price (uint256, serialized little endian)
Relevant for legacy transactions only (disregarded for enveloped/EIP1559)
bytes gas_price = 4;
Link copied to clipboard
Maximum fee (uint256, serialized little endian)
Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy)
bytes max_fee_per_gas = 7;
Link copied to clipboard
Maximum optional inclusion fee (aka tip) (uint256, serialized little endian)
Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy)
bytes max_inclusion_fee_per_gas = 6;
Link copied to clipboard
Nonce (uint256, serialized little endian)
bytes nonce = 2;
Link copied to clipboard
The secret private key used for signing (32 bytes).
bytes private_key = 9;
Link copied to clipboard
Recipient's address.
string to_address = 8;
Link copied to clipboard
The payload transaction
.TW.Ethereum.Proto.Transaction transaction = 10;
Link copied to clipboard
Transaction version selector: Legacy or enveloped, has impact on fee structure.
Default is Legacy (value 0)
.TW.Ethereum.Proto.TransactionMode tx_mode = 3;
Link copied to clipboard
UserOperation for ERC-4337 wallets
.TW.Ethereum.Proto.UserOperation user_operation = 11;
Link copied to clipboard
open fun getChainId(): ByteString
Chain identifier (uint256, serialized little endian)
bytes chain_id = 1;
Link copied to clipboard
open fun getGasLimit(): ByteString
Gas limit (uint256, serialized little endian)
bytes gas_limit = 5;
Link copied to clipboard
open fun getGasPrice(): ByteString
Gas price (uint256, serialized little endian)
Relevant for legacy transactions only (disregarded for enveloped/EIP1559)
bytes gas_price = 4;
Link copied to clipboard
open fun getMaxFeePerGas(): ByteString
Maximum fee (uint256, serialized little endian)
Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy)
bytes max_fee_per_gas = 7;
Link copied to clipboard
open fun getMaxInclusionFeePerGas(): ByteString
Maximum optional inclusion fee (aka tip) (uint256, serialized little endian)
Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy)
bytes max_inclusion_fee_per_gas = 6;
Link copied to clipboard
open fun getNonce(): ByteString
Nonce (uint256, serialized little endian)
bytes nonce = 2;
Link copied to clipboard
open fun getPrivateKey(): ByteString
The secret private key used for signing (32 bytes).
bytes private_key = 9;
Link copied to clipboard
open fun getToAddress(): String
Recipient's address.
string to_address = 8;
Link copied to clipboard
open fun getToAddressBytes(): ByteString
Recipient's address.
string to_address = 8;
Link copied to clipboard
open fun getTransaction(): Transaction
The payload transaction
.TW.Ethereum.Proto.Transaction transaction = 10;
Link copied to clipboard
open fun getTxMode(): TransactionMode
Transaction version selector: Legacy or enveloped, has impact on fee structure.
Default is Legacy (value 0)
.TW.Ethereum.Proto.TransactionMode tx_mode = 3;
Link copied to clipboard
open fun getTxModeValue(): Int
Transaction version selector: Legacy or enveloped, has impact on fee structure.
Default is Legacy (value 0)
.TW.Ethereum.Proto.TransactionMode tx_mode = 3;
Link copied to clipboard
open fun getUserOperation(): UserOperation
UserOperation for ERC-4337 wallets
.TW.Ethereum.Proto.UserOperation user_operation = 11;
Link copied to clipboard
The payload transaction
.TW.Ethereum.Proto.Transaction transaction = 10;
Link copied to clipboard
UserOperation for ERC-4337 wallets
.TW.Ethereum.Proto.UserOperation user_operation = 11;
Link copied to clipboard
open fun mergeTransaction(value: Transaction): Ethereum.SigningInput.Builder
The payload transaction
.TW.Ethereum.Proto.Transaction transaction = 10;
Link copied to clipboard
open fun mergeUserOperation(value: UserOperation): Ethereum.SigningInput.Builder
UserOperation for ERC-4337 wallets
.TW.Ethereum.Proto.UserOperation user_operation = 11;
Link copied to clipboard
open fun setChainId(value: ByteString): Ethereum.SigningInput.Builder
Chain identifier (uint256, serialized little endian)
bytes chain_id = 1;
Link copied to clipboard
open fun setGasLimit(value: ByteString): Ethereum.SigningInput.Builder
Gas limit (uint256, serialized little endian)
bytes gas_limit = 5;
Link copied to clipboard
open fun setGasPrice(value: ByteString): Ethereum.SigningInput.Builder
Gas price (uint256, serialized little endian)
Relevant for legacy transactions only (disregarded for enveloped/EIP1559)
bytes gas_price = 4;
Link copied to clipboard
open fun setMaxFeePerGas(value: ByteString): Ethereum.SigningInput.Builder
Maximum fee (uint256, serialized little endian)
Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy)
bytes max_fee_per_gas = 7;
Link copied to clipboard
Maximum optional inclusion fee (aka tip) (uint256, serialized little endian)
Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy)
bytes max_inclusion_fee_per_gas = 6;
Link copied to clipboard
open fun setNonce(value: ByteString): Ethereum.SigningInput.Builder
Nonce (uint256, serialized little endian)
bytes nonce = 2;
Link copied to clipboard
open fun setPrivateKey(value: ByteString): Ethereum.SigningInput.Builder
The secret private key used for signing (32 bytes).
bytes private_key = 9;
Link copied to clipboard
Recipient's address.
string to_address = 8;
Link copied to clipboard
Recipient's address.
string to_address = 8;
Link copied to clipboard
open fun setTransaction(builderForValue: Builder): Ethereum.SigningInput.Builder
open fun setTransaction(value: Transaction): Ethereum.SigningInput.Builder
The payload transaction
.TW.Ethereum.Proto.Transaction transaction = 10;
Link copied to clipboard
open fun setTxMode(value: TransactionMode): Ethereum.SigningInput.Builder
Transaction version selector: Legacy or enveloped, has impact on fee structure.
Default is Legacy (value 0)
.TW.Ethereum.Proto.TransactionMode tx_mode = 3;
Link copied to clipboard
Transaction version selector: Legacy or enveloped, has impact on fee structure.
Default is Legacy (value 0)
.TW.Ethereum.Proto.TransactionMode tx_mode = 3;
Link copied to clipboard
open fun setUserOperation(builderForValue: Builder): Ethereum.SigningInput.Builder
open fun setUserOperation(value: UserOperation): Ethereum.SigningInput.Builder
UserOperation for ERC-4337 wallets
.TW.Ethereum.Proto.UserOperation user_operation = 11;