doc: add missing schema for currencyconvert API.
What changed, and why it matters
This commit only adds missing documentation (a JSON schema and manual page references) for an existing RPC command called currencyconvert. It does not change any executable code, network behavior, or security logic. There is no security issue here.
No action required; this is a documentation-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds doc/schemas/currencyconvert.json and registers it in contrib/msggen/msggen/schema.json, doc/Makefile, and doc/index.rst. The schema describes request/response fields for the currencyconvert RPC. No runtime code is modified; no bug, vulnerability, or behavior change is introduced.
Changed components
documentationRPC schema generationInspect captured patch +114 / −0
diff --git a/contrib/msggen/msggen/schema.json b/contrib/msggen/msggen/schema.json
index 9323bed1..dbdd5553 100644
--- a/contrib/msggen/msggen/schema.json
+++ b/contrib/msggen/msggen/schema.json
@@ -7237,6 +7237,62 @@
}
]
},
+ "currencyconvert.json": {
+ "$schema": "../rpc-schema-draft.json",
+ "type": "object",
+ "rpc": "currencyconvert",
+ "title": "Command to convert a fiat amount into millisatoshis",
+ "added": "v26.04",
+ "description": [
+ "The **currencyconvert** RPC command converts a given amount in a given currency into millisatoshis.",
+ "It uses the median of the available exchange-rate sources for the requested currency."
+ ],
+ "request": {
+ "required": [
+ "amount",
+ "currency"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "amount": {
+ "type": "number",
+ "description": [
+ "The amount, expressed in the given currency, to convert into millisatoshis."
+ ]
+ },
+ "currency": {
+ "type": "string",
+ "description": [
+ "The ISO-4217 currency code (e.g. USD) to convert from.",
+ "The plugin normalizes this value to uppercase before querying sources."
+ ]
+ }
+ }
+ },
+ "response": {
+ "required": [
+ "msat"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "msat": {
+ "type": "msat",
+ "description": [
+ "The converted amount in millisatoshis, computed using the median result from the available sources."
+ ]
+ }
+ }
+ },
+ "author": [
+ "daywalker90 is mainly responsible."
+ ],
+ "see_also": [
+ "lightning-currencyrates(7)"
+ ],
+ "resources": [
+ "Main web site: [https://github.com/ElementsProject/lightning](https://github.com/ElementsProject/lightning)"
+ ]
+ },
"currencyrate.json": {
"$schema": "../rpc-schema-draft.json",
"type": "object",
diff --git a/doc/Makefile b/doc/Makefile
index 0e180122..858b366f 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -42,6 +42,7 @@ MARKDOWNPAGES := doc/addgossip.7 \
doc/createinvoice.7 \
doc/createonion.7 \
doc/createrune.7 \
+ doc/currencyconvert.7 \
doc/currencyrate.7 \
doc/datastore.7 \
doc/datastoreusage.7 \
diff --git a/doc/index.rst b/doc/index.rst
index 79baaaf1..ba126b1c 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -50,6 +50,7 @@ Core Lightning Documentation
createinvoice <createinvoice.7.md>
createonion <createonion.7.md>
createrune <createrune.7.md>
+ currencyconvert <currencyconvert.7.md>
currencyrate <currencyrate.7.md>
datastore <datastore.7.md>
datastoreusage <datastoreusage.7.md>
diff --git a/doc/schemas/currencyconvert.json b/doc/schemas/currencyconvert.json
new file mode 100644
index 00000000..bbe780c9
--- /dev/null
+++ b/doc/schemas/currencyconvert.json
@@ -0,0 +1,56 @@
+{
+ "$schema": "../rpc-schema-draft.json",
+ "type": "object",
+ "rpc": "currencyconvert",
+ "title": "Command to convert a fiat amount into millisatoshis",
+ "added": "v26.04",
+ "description": [
+ "The **currencyconvert** RPC command converts a given amount in a given currency into millisatoshis.",
+ "It uses the median of the available exchange-rate sources for the requested currency."
+ ],
+ "request": {
+ "required": [
+ "amount",
+ "currency"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "amount": {
+ "type": "number",
+ "description": [
+ "The amount, expressed in the given currency, to convert into millisatoshis."
+ ]
+ },
+ "currency": {
+ "type": "string",
+ "description": [
+ "The ISO-4217 currency code (e.g. USD) to convert from.",
+ "The plugin normalizes this value to uppercase before querying sources."
+ ]
+ }
+ }
+ },
+ "response": {
+ "required": [
+ "msat"
+ ],
+ "additionalProperties": false,
+ "properties": {
+ "msat": {
+ "type": "msat",
+ "description": [
+ "The converted amount in millisatoshis, computed using the median result from the available sources."
+ ]
+ }
+ }
+ },
+ "author": [
+ "daywalker90 is mainly responsible."
+ ],
+ "see_also": [
+ "lightning-currencyrates(7)"
+ ],
+ "resources": [
+ "Main web site: [https://github.com/ElementsProject/lightning](https://github.com/ElementsProject/lightning)"
+ ]
+}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.