verifymessage - Litecoin

Example code for the verifymessage JSON-RPC method. Complete guide on how to use verifymessage JSON-RPC in GetBlock Web3 documentation.

Verify a signed message.

Parameters

Parameter
Type
Description

address

string

The litecoin address to use for the signature.

signature

string

The signature provided by the signer in base 64 encoding.

message

string

The message that was signed.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "verifymessage",
    "params": ["LTCaddress...", "signature...", "Hello World"],
    "id": "getblock.io"
}'

Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": true
}

Response Parameters

Field
Type
Description

result

boolean

If the signature is valid.

Use Case

The verifymessage method is essential for:

  • Signature verification

  • Authentication

  • Proof of ownership

  • Message authentication

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS-TOKEN.

Integration Notes

The verifymessage method helps developers build robust applications that interact with the Litecoin blockchain.

Was this helpful?