"summary":"ComputeInputScript generates a complete InputIndex for the passed\ntransaction with the signature as defined within the passed SignDescriptor.\nThis method should be capable of generating the proper input script for\nboth regular p2wkh output and p2wkh outputs nested within a regular p2sh\noutput.",
"description":"Note that when using this method to sign inputs belonging to the wallet,\nthe only items of the SignDescriptor that need to be populated are pkScript\nin the TxOut field, the value in that same field, and finally the input\nindex.",
"operationId":"ComputeInputScript",
"responses":{
"200":{
"description":"A successful response.",
"schema":{
"$ref":"#/definitions/signrpcInputScriptResp"
}
},
"default":{
"description":"An unexpected error response",
"schema":{
"$ref":"#/definitions/runtimeError"
}
}
},
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/signrpcSignReq"
}
}
],
"tags":[
"Signer"
]
}
},
"/v2/signer/sharedkey":{
"post":{
"summary":"DeriveSharedKey returns a shared secret key by performing Diffie-Hellman key\nderivation between the ephemeral public key in the request and the node's\nkey specified in the key_loc parameter (or the node's identity private key\nif no key locator is specified):\nP_shared = privKeyNode * ephemeralPubkey\nThe resulting shared public key is serialized in the compressed format and\nhashed with sha256, resulting in the final key length of 256bit.",
"operationId":"DeriveSharedKey",
"responses":{
"200":{
"description":"A successful response.",
"schema":{
"$ref":"#/definitions/signrpcSharedKeyResponse"
}
},
"default":{
"description":"An unexpected error response",
"schema":{
"$ref":"#/definitions/runtimeError"
}
}
},
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/signrpcSharedKeyRequest"
}
}
],
"tags":[
"Signer"
]
}
},
"/v2/signer/signmessage":{
"post":{
"summary":"SignMessage signs a message with the key specified in the key locator. The\nreturned signature is fixed-size LN wire format encoded.",
"description":"The main difference to SignMessage in the main RPC is that a specific key is\nused to sign the message instead of the node identity private key.",
"operationId":"SignMessage",
"responses":{
"200":{
"description":"A successful response.",
"schema":{
"$ref":"#/definitions/signrpcSignMessageResp"
}
},
"default":{
"description":"An unexpected error response",
"schema":{
"$ref":"#/definitions/runtimeError"
}
}
},
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/signrpcSignMessageReq"
}
}
],
"tags":[
"Signer"
]
}
},
"/v2/signer/signraw":{
"post":{
"summary":"SignOutputRaw is a method that can be used to generated a signature for a\nset of inputs/outputs to a transaction. Each request specifies details\nconcerning how the outputs should be signed, which keys they should be\nsigned with, and also any optional tweaks. The return value is a fixed\n64-byte signature (the same format as we use on the wire in Lightning).",
"description":"If we are unable to sign using the specified keys, then an error will be\nreturned.",
"operationId":"SignOutputRaw",
"responses":{
"200":{
"description":"A successful response.",
"schema":{
"$ref":"#/definitions/signrpcSignResp"
}
},
"default":{
"description":"An unexpected error response",
"schema":{
"$ref":"#/definitions/runtimeError"
}
}
},
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/signrpcSignReq"
}
}
],
"tags":[
"Signer"
]
}
},
"/v2/signer/verifymessage":{
"post":{
"summary":"VerifyMessage verifies a signature over a message using the public key\nprovided. The signature must be fixed-size LN wire format encoded.",
"description":"The main difference to VerifyMessage in the main RPC is that the public key\nused to sign the message does not have to be a node known to the network.",
"description":"The ephemeral public key to use for the DH key derivation."
},
"key_loc":{
"$ref":"#/definitions/signrpcKeyLocator",
"description":"The optional key locator of the local key that should be used. If this\nparameter is not set then the node's identity private key will be used."
"description":"A descriptor that precisely describes *which* key to use for signing. This\nmay provide the raw public key directly, or require the Signer to re-derive\nthe key according to the populated derivation path.\n\nNote that if the key descriptor was obtained through walletrpc.DeriveKey,\nthen the key locator MUST always be provided, since the derived keys are not\npersisted unlike with DeriveNextKey."
"description":"derivedKey = privkey + sha256(perCommitmentPoint || pubKey) mod N",
"title":"A scalar value that will be added to the private key corresponding to the\nabove public key to obtain the private key to be used to sign this input.\nThis value is typically derived via the following computation:"
},
"double_tweak":{
"type":"string",
"format":"byte",
"description":"A private key that will be used in combination with its corresponding\nprivate key to derive the private key that is to be used to sign the target\ninput. Within the Lightning protocol, this value is typically the\ncommitment secret from a previously revoked commitment transaction. This\nvalue is in combination with two hash values, and the original private key\nto derive the private key to be used when signing.\n\nk = (privKey*sha256(pubKey || tweakPub) +\ntweakPriv*sha256(tweakPub || pubKey)) mod N"
},
"witness_script":{
"type":"string",
"format":"byte",
"description":"The full script required to properly redeem the output. This field will\nonly be populated if a p2wsh or a p2sh output is being signed."
},
"output":{
"$ref":"#/definitions/signrpcTxOut",
"description":"A description of the output being spent. The value and script MUST be\nprovided."
},
"sighash":{
"type":"integer",
"format":"int64",
"description":"The target sighash type that should be used when generating the final\nsighash, and signature."
},
"input_index":{
"type":"integer",
"format":"int32",
"description":"The target input within the transaction that should be signed."