lightningd: change msatoshi args to amount_msat.

This is consistent with our output changes, and increases consistency.
It also keeps future sanity checks happy, that we only use JSON msat
helpers with '_msat' fields.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: `invoice`, `sendonion`, `sendpay`, `pay`, `keysend`, `fetchinvoice`, `sendinvoice`: `msatoshi` argument is now called `amount_msat` to match other fields.
Changelog-Deprecated: JSON-RPC: `invoice`, `sendonion`, `sendpay`, `pay`, `keysend`, `fetchinvoice`, `sendinvoice` `msatoshi` (use `amount_msat`)
This commit is contained in:
Rusty Russell
2022-06-19 16:50:11 +09:30
parent ca69e293d1
commit cd7e784d6f
25 changed files with 192 additions and 154 deletions

View File

@@ -3,7 +3,7 @@
"type": "object",
"required": [
"id",
"msatoshi",
"amount_msat",
"riskfactor"
],
"properties": {
@@ -11,7 +11,7 @@
"type": "pubkey",
"description": ""
},
"msatoshi": {
"amount_msat": {
"type": "msat",
"description": ""
},

View File

@@ -3,12 +3,12 @@
"type": "object",
"additionalProperties": false,
"required": [
"msatoshi",
"amount_msat",
"label",
"description"
],
"properties": {
"msatoshi": {
"amount_msat": {
"type": "msat_or_any",
"description": ""
},

View File

@@ -4,13 +4,13 @@
"additionalProperties": false,
"required": [
"destination",
"msatoshi"
"amount_msat"
],
"properties": {
"destination": {
"type": "pubkey"
},
"msatoshi": {
"amount_msat": {
"type": "msat"
},
"label": {

View File

@@ -9,7 +9,7 @@
"bolt11": {
"type": "string"
},
"msatoshi": {
"amount_msat": {
"type": "msat"
},
"label": {

View File

@@ -48,7 +48,7 @@
"bolt11": {
"type": "string"
},
"msatoshi": {
"amount_msat": {
"type": "msat"
},
"destination": {

View File

@@ -12,15 +12,17 @@
"items": {
"type": "object",
"required": [
"msatoshi",
"id",
"delay",
"channel"
],
"properties": {
"msatoshi": {
"amount_msat": {
"type": "msat"
},
"msatoshi": {
"deprecated": "true"
},
"id": {
"type": "pubkey"
},
@@ -39,7 +41,7 @@
"label": {
"type": "string"
},
"msatoshi": {
"amount_msat": {
"type": "msat"
},
"bolt11": {