Sign Message
sign_message
The sign_message method allows you to prove ownership of a specific wallet address. A unique digital signature is provided for the message being signed. This signature, along with the original message and the wallet address, can then be verified, confirming that the message originated from the owner of the address and has not been altered.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| coin | string | ✓ | The coin to sign a message with. |
| message | string | ✓ | The message you want to sign. |
| address | string | – | HD wallets only. A standard AddressPath object. The path to the address for signing the message. If not provided, the account_id, chain, and address_id will default to 0. |
Response Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| signature | string | ✓ | The signature generated for the message. |
📌 Examples
Basic Usage
POST Sign Message
sign_message {
"userpass": "RPC_UserP@SSW0RD",
"method": "sign_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion"
}
} curl --url "http://127.0.0.1:7783" --data '{
"userpass": "RPC_UserP@SSW0RD",
"method": "sign_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion"
}
}' import requests
import json
url = "http://127.0.0.1:7783"
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "sign_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion"
}
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2)) const payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "sign_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion"
}
};
const response = await fetch("http://127.0.0.1:7783", {
method: "POST",
body: JSON.stringify(payload),
});
console.log(await response.json()); <?php
$payload = <<<'JSON'
{
"userpass": "RPC_UserP@SSW0RD",
"method": "sign_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion"
}
}
JSON;
$ch = curl_init("http://127.0.0.1:7783");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response; package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{"userpass":"RPC_UserP@SSW0RD","method":"sign_message","mmrpc":"2.0","id":0,"params":{"coin":"DOC","message":"Between subtle shading and the absence of light lies the nuance illusion"}}`)
resp, err := http.Post("http://127.0.0.1:7783", "application/json", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
} require 'net/http'
require 'json'
require 'uri'
uri = URI("http://127.0.0.1:7783")
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "sign_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion"
}
}
response = Net::HTTP.post(uri, payload.to_json, 'Content-Type' => 'application/json')
puts JSON.pretty_generate(JSON.parse(response.body)) Show Sign Message Response
Response (success)
{
"mmrpc": "2.0",
"result": {
"signature": "H43eTmJxBKEPiHkrCe/8NsRidkKCIkXDxLyp30Ez/RwoApGdg89Hlvj9mTMSPGp8om5297zvdL8EVx3IdIe2swY="
},
"id": 0
} HD Wallet with Derivation Path
POST Sign Message (HD Wallet)
sign_message {
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"derivation_path": "m/84'/2'/0'/0/1"
}
},
"id": 2
} curl --url "http://127.0.0.1:7783" --data '{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"derivation_path": "m/84'/2'/0'/0/1"
}
},
"id": 2
}' import requests
import json
url = "http://127.0.0.1:7783"
payload = {
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"derivation_path": "m/84'/2'/0'/0/1"
}
},
"id": 2
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2)) const payload = {
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"derivation_path": "m/84'/2'/0'/0/1"
}
},
"id": 2
};
const response = await fetch("http://127.0.0.1:7783", {
method: "POST",
body: JSON.stringify(payload),
});
console.log(await response.json()); <?php
$payload = <<<'JSON'
{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"derivation_path": "m/84'/2'/0'/0/1"
}
},
"id": 2
}
JSON;
$ch = curl_init("http://127.0.0.1:7783");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response; package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{"userpass":"RPC_UserP@SSW0RD","mmrpc":"2.0","method":"sign_message","params":{"coin":"KMD","message":"Very little worth knowing is taught by fear.","address":{"derivation_path":"m/84'/2'/0'/0/1"}},"id":2}`)
resp, err := http.Post("http://127.0.0.1:7783", "application/json", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
} require 'net/http'
require 'json'
require 'uri'
uri = URI("http://127.0.0.1:7783")
payload = {
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"derivation_path": "m/84'/2'/0'/0/1"
}
},
"id": 2
}
response = Net::HTTP.post(uri, payload.to_json, 'Content-Type' => 'application/json')
puts JSON.pretty_generate(JSON.parse(response.body)) Show Sign Message (HD Wallet) Response
Response (HD, success)
{
"mmrpc": "2.0",
"result": {
"signature": "H8Jk+O21IJ0ob3pchrBkJdlXeObrMAKuABlCtW4JySOUUfxg7K8Vl/H3E4gdtwXqhbCu7vv+NYoIhq/bmjtBlkc="
},
"id": 2
} HD Wallet with Account and Address ID
POST HD Wallet with Account and Address ID
sign_message {
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"account_id": 0,
"chain": "External",
"address_id": 1
}
},
"id": 2
} curl --url "http://127.0.0.1:7783" --data '{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"account_id": 0,
"chain": "External",
"address_id": 1
}
},
"id": 2
}' import requests
import json
url = "http://127.0.0.1:7783"
payload = {
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"account_id": 0,
"chain": "External",
"address_id": 1
}
},
"id": 2
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2)) const payload = {
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"account_id": 0,
"chain": "External",
"address_id": 1
}
},
"id": 2
};
const response = await fetch("http://127.0.0.1:7783", {
method: "POST",
body: JSON.stringify(payload),
});
console.log(await response.json()); <?php
$payload = <<<'JSON'
{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"account_id": 0,
"chain": "External",
"address_id": 1
}
},
"id": 2
}
JSON;
$ch = curl_init("http://127.0.0.1:7783");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response; package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{"userpass":"RPC_UserP@SSW0RD","mmrpc":"2.0","method":"sign_message","params":{"coin":"KMD","message":"Very little worth knowing is taught by fear.","address":{"account_id":0,"chain":"External","address_id":1}},"id":2}`)
resp, err := http.Post("http://127.0.0.1:7783", "application/json", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
} require 'net/http'
require 'json'
require 'uri'
uri = URI("http://127.0.0.1:7783")
payload = {
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "sign_message",
"params": {
"coin": "KMD",
"message": "Very little worth knowing is taught by fear.",
"address": {
"account_id": 0,
"chain": "External",
"address_id": 1
}
},
"id": 2
}
response = Net::HTTP.post(uri, payload.to_json, 'Content-Type' => 'application/json')
puts JSON.pretty_generate(JSON.parse(response.body)) Show Sign Message (HD Wallet, Account/Address ID) Response
Response (HD, success)
{
"mmrpc": "2.0",
"result": {
"signature": "H8Jk+O21IJ0ob3pchrBkJdlXeObrMAKuABlCtW4JySOUUfxg7K8Vl/H3E4gdtwXqhbCu7vv+NYoIhq/bmjtBlkc="
},
"id": 2
} Error Types
| Parameter | Type | Required | Description |
|---|---|---|---|
| PrefixNotFound | string | – | sign_message_prefix is not set in coin config file |
| CoinIsNotFound | string | – | Specified coin is not found |
| SigningError | string | – | Error attempting to sign message |
| InvalidRequest | string | – | Message signing is not supported by the given coin type |
| InternalError | string | – | An internal error occurred during the signing process |
Show Error Responses
⚠️ Error Responses
PrefixNotFound
{
"mmrpc": "2.0",
"error": "sign_message_prefix is not set in coin config",
"error_path": "eth",
"error_trace": "eth:2332]",
"error_type": "PrefixNotFound",
"id": null
}InternalError
{
"mmrpc": "2.0",
"error": "Internal error: No such coin: as",
"error_path": "lp_coins",
"error_trace": "lp_coins:5122] lp_coins:5034]",
"error_type": "InternalError",
"error_data": "No such coin: SHEKEL",
"id": null
}