mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
96 lines
2.8 KiB
JSON
96 lines
2.8 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"rpc": "signmessage",
|
|
"title": "Command to create a signature from this node",
|
|
"description": [
|
|
"The **signmessage** RPC command creates a digital signature of *message* using this node's secret key. A receiver who knows your node's *id* and the *message* can be sure that the resulting signature could only be created by something with access to this node's secret key."
|
|
],
|
|
"request": {
|
|
"required": [
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"description": [
|
|
"Less than 65536 characters long message to be signed by the node."
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"required": [
|
|
"signature",
|
|
"recid",
|
|
"zbase"
|
|
],
|
|
"properties": {
|
|
"signature": {
|
|
"type": "hex",
|
|
"description": [
|
|
"The signature."
|
|
],
|
|
"minLength": 128,
|
|
"maxLength": 128
|
|
},
|
|
"recid": {
|
|
"type": "hex",
|
|
"description": [
|
|
"The recovery id (0, 1, 2 or 3)."
|
|
],
|
|
"minLength": 2,
|
|
"maxLength": 2
|
|
},
|
|
"zbase": {
|
|
"type": "string",
|
|
"description": [
|
|
"*signature* and *recid* encoded in a style compatible with **lnd**'s [SignMessageRequest](https://api.lightning.community/#grpc-request- signmessagerequest)."
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"author": [
|
|
"Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible."
|
|
],
|
|
"see_also": [
|
|
"lightning-checkmessage(7)"
|
|
],
|
|
"resources": [
|
|
"Main web site: <https://github.com/ElementsProject/lightning>",
|
|
"",
|
|
"[SignMessageRequest](https://api.lightning.community/#grpc-request-signmessagerequest)"
|
|
],
|
|
"examples": [
|
|
{
|
|
"request": {
|
|
"id": "example:signmessage#1",
|
|
"method": "signmessage",
|
|
"params": {
|
|
"message": "this is a test!"
|
|
}
|
|
},
|
|
"response": {
|
|
"signature": "9ea05929890e40489edbd5fe0552d22bcffe00bbd29da4fcf93ed5d8f1973e421509071a64935231a126637e3615225ddda86d2d0926ae537d9c3be149f9b21f",
|
|
"recid": "00",
|
|
"zbase": "d6xkysjjtr8ry1r65xk9hbk14eih99oyzxjj5j8h9r9pms8t1h9rrfejyhpgjr41ggo1ca56gak1rzq7ibs14njgi3jz58b5hfr9uco9"
|
|
}
|
|
},
|
|
{
|
|
"request": {
|
|
"id": "example:signmessage#2",
|
|
"method": "signmessage",
|
|
"params": {
|
|
"message": "message for you"
|
|
}
|
|
},
|
|
"response": {
|
|
"signature": "8149401781108c1c2fda12d91969bfe2306afe06c387394d47a83a85a14702a16b6fcd0060693da436ff1c2b25cc470d7db68fe45d833733d8dca660a3f4d67d",
|
|
"recid": "00",
|
|
"zbase": "d6yw1oyzoreea8bx5ejp1gmjz9tdy4z6y5baqqkpe6wdibpbehbkn45x3wygy4j7wo5x68bmrzgrqdm7s486ezcdgh37tzfgcnt9jiu7"
|
|
}
|
|
}
|
|
]
|
|
}
|