eth_sign- Arbitrum

This method signs an arbitrary message using the private key of the given address.
The message is prefixed following the Ethereum signed message standard before hashing and signing.

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

Parameters

FieldTypeDescription
addressstringThe account address that signs the message. Must be unlocked or handled by a wallet.
messagestringThe raw message to sign (hex encoded or UTF-8 encoded).

Request

bashcurl --location 'https://shared.us-east-1.getblock.io/<ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
   "jsonrpc": "2.0",
    "method": "eth_sign",
  "params": [
    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "0x48656c6c6f20576f726c64"
  ],
    "id": "getblock.io"
}'
javascriptimport axios from 'axios'
let data = JSON.stringify({
    "jsonrpc": "2.0",
    "method": "eth_sign",
  "params": [
    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "0x48656c6c6f20576f726c64"
  ],
    "id": "getblock.io"
};

let config = {
  method: "post",
  maxBodyLength: Infinity,
  url: "https://shared.us-east-1.getblock.io/<ACCESS_TOKEN>",
  headers: {
    "Content-Type": "application/json",
  },
  data: data,
};

axios
  .request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });
pythonimport requests
import json

url = "https://shared.us-east-1.getblock.io/<ACESS_TOKEN>"

payload = json.dumps({
   "jsonrpc": "2.0",
    "method": "eth_sign",
  "params": [
    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "0x48656c6c6f20576f726c64"
  ],   
    "id": "getblock.io"
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
rs#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::builder()
        .build()?;

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("Content-Type", "application/json".parse()?);

    let data = r#"{
   "jsonrpc": "2.0",
    "method": "eth_sign",
  "params": [
    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "0x48656c6c6f20576f726c64"
  ],
    "id": "getblock.io"
}"#;

    let json: serde_json::Value = serde_json::from_str(&data)?;

    let request = client.request(reqwest::Method::POST, "https://shared.us-east-1.getblock.io/<ACCESS_TOKEN>")
        .headers(headers)
        .json(&json);

    let response = request.send().await?;
    let body = response.text().await?;

    println!("{}", body);

    Ok(())
}

Response

java{
    "jsonrpc": "2.0",
    "id": "getblock.io",
  "result": "0xbdfdd41c9ad20871e3ec6e9e...c73f338fd1b1c7784cf9c"
}

Reponse Parameter Definition

FieldDescriptionData Type
resultThe hash of the submitted transaction, as a hexadecimal string.String

Use case

The eth_sign method helps developers to:

  • Verify a user identity without sending a transaction
  • Implement login flows for dApps (Sign-in with Ethereum style)
  • Generate signatures for permit, authentication, and meta transactions
  • Build trustless systems where only message signatures (not transactions) are needed

Error handling

Status CodeError MessageCause
403ForbiddenMissing or invalid ACCESS_TOKEN.
-3200Unknown account<ul><li>Invalid account address</li><li>user rejected request</li><li>message must be hex or string</li></ul>

Integration with Web3

The eth_sign method enables developers to:

  • Implement secure message signing with intuitive UX
  • Build login or authorization flows for any dApp
  • Create contract interactions that rely on signed messages
  • Validate signed payloads on servers or smart contracts
  • Use MetaMask or WalletConnect to sign and broadcast actions securely
javascriptimport { ethers } from "ethers";
const RPC_URL = "https://shared.us-east-1.getblock.io/<ACCESS_TOKEN>";
const provider = new ethers.JsonRpcProvider(RPC_URL);
async function Call() {
  try {
     const result = await provider.send("eth_sign",
 [
    "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "0x48656c6c6f20576f726c64"
  ]);    
console.log("The result:", result);
    return result;
  } catch (error) {
    console.error("The error:", error);
    throw error;
  }
}