Docs
Bsc

eth_signTransaction - Sign trans...

Sign transaction on Binance Smart Chain - Note: Most RPC providers don't support this for security reasons.

Signs a transaction using an unlocked account on the node. Important: Most RPC providers don't support this method for security reasons, as it requires private keys to be stored on the server.

Security Considerations

  • This method requires an unlocked account on the node
  • Private keys must be available to the RPC server
  • Most production RPC providers disable this method
  • Use client-side signing libraries instead for better security

Request Parameters

Request

This method accepts no parameters.

Response Body

Response
resultOBJECT

`DATA` - The signed transaction data, ready for transmission via `eth_sendRawTransaction`.

Implementation Example

Bash
curl -X POST https://api-bsc-mainnet-full.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_signTransaction",
     "params": [{
       "from": "0x9b2055d370f73ec7d8a03e965129118dc8f5bf83",
       "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
       "gas": "0x76c0",
       "gasPrice": "0x9184e72a000",
       "value": "0x9184e72a",
       "nonce": "0x0"
     }],
    "id": 1
  }'
JavaScript
const response = await fetch('https://api-bsc-mainnet-full.n.dwellir.com/YOUR_API_KEY', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'eth_signTransaction',
    params: [{
      from: '0x9b2055d370f73ec7d8a03e965129118dc8f5bf83',
      to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
      gas: '0x76c0',
      gasPrice: '0x9184e72a000',
      value: '0x9184e72a'
    }],
    id: 1
  })
});

const data = await response.json();
console.log(data.result);