Pre-alphaWork in progress
Skip to content

personal_sign ​

Signs a message with an account in the node’s keystore, prefixed as an Ethereum signed message.

Geth reference · All supported methods

Parameters ​

Parameters are positional, in the order below.

ParameterTypeRequiredDescription
MessageHexadecimal bytesYesThe message to sign.
Address20-byte addressYesThe account to sign with.
PassphraseStringNoThe account’s passphrase, if it is locked.

Return value ​

The signature as hexadecimal bytes.

Example ​

Replace <gateway-url> with your gateway base URL and <service-url> with the chain’s service path, such as service/ethereum.

sh
curl -X POST "<gateway-url>/<service-url>" \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"personal_sign","params":["0xdeadbeaf","0xc94770007dda54cF92009BFF0dE90c06F603a09f","<passphrase>"]}'

Illustrative response; values depend on the selected network and request:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b"
}

Unstoppable Infrastructure.