githubEdit

eth_signTransaction - Arbitrum

Example code for the eth_signTransaction JSON RPC method. Сomplete guide on how to use eth_signTransaction JSON RPC in GetBlock Web3 documentation.

This method signs a transaction using the private key of the given account without broadcasting. This method requires the signing account to be unlocked or controlled by a wallet provider.

circle-info

This method requires the account to be unlocked on the node or handled by a wallet provider such as MetaMask.

Parameters

Field
Type
Required
Description

from

string

Yes

The address signing the transaction. Must be unlocked or controlled by a wallet.

to

string

Yes

Receiver address. Null if deploying a smart contract.

gas

string

no

Gas limit for execution.

gasPrice

string

no

Gas price in wei.

maxPriorityFeePerGas

string

no

EIP 1559 priority fee.

maxFeePerGas

string

Yes

EIP 1559 max total fee.

value

string

Yes

Amount of ETH sent, in wei. .

data

string

Yes

Hex encoded input data for contract interaction. .

nonce

string

Yes

Nonce number for the transaction. .

Request

curl --location 'https://go.getblock.us/<ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
   "jsonrpc": "2.0",
    "method": "eth_signTransaction",
    "params": [
        {
            "from":  "0xd1af2dac4e0a9d1f58b99e2f42bc0320ed74a7cd",
        
            "to": "0xd26ea0f03100358b2ebd4c9638f042aada9a1bcf",
            "gas": "0x76c0",
            "gasPrice": "0x9184e72a000",
            "nonce": "0x3c",
            "value": "0x9184e72a",
            "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
        }],
    "id": "getblock.io"
}'

Response

Reponse Parameter Definition

Field
Type
Description

raw

string

Signed raw transaction in hex. Can be broadcast using eth_sendRawTransaction.

tx.from

string

Address that signed the transaction.

tx.to

string or null

Recipient address or null for contract deployment.

tx.nonce

string

Nonce used for the transaction.

tx.gas

string

Gas limit.

tx.gasPrice

string

Gas price in wei for legacy transactions.

tx.maxPriorityFeePerGas

string

Priority fee (EIP 1559).

tx.maxFeePerGas

string

Maximum total fee (EIP 1559).

tx.value

string

Amount of ETH sent in wei.

tx.data

string

Encoded call data or contract bytecode.

tx.chainId

string

Chain identifier for replay protection.

tx.v

string

Recovery ID used to verify the signature.

tx.r

string

First half of the signature.

tx.s

string

Second half of the signature.

Use case

The eth_signTransaction method helps developers to:

  • Prepare transactions before broadcasting them

  • Build cold wallet or multisig-style signing workflows

  • Use relayers or batch processors that require signed payloads

  • Enable advanced transaction flows where signing and sending occur separately

  • Allow hardware wallets or custodial services to authorize a transaction before submission

  • Support meta transaction systems and gas-sponsored flows

Error handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS_TOKEN.

-3200

Unknown account

  • Invalid account address

  • user rejected request

  • message must be hex or string

Integration with Web3

The eth_sign method enables developers to:

  • Sign transactions without broadcasting them

  • Deliver signed raw transactions to relayers

Last updated

Was this helpful?