core-lightning/doc/schemas/fundchannel.request.json
Rusty Russell d7cc1e4a17 doc: Updated parameter descriptions for *.request.json
Added descriptions for rpc command parameters

This also performs the following fixes:
1. delforward parameters are compulsory (required).
2. disableinvoicerequest request added `added` field.
3. invoice request order fixed (label then description, not vice-versa!).
4. listpeers log levels are a proper enum
5. description parameter documented for sendonion requests.
6. deprecatred amount_msat removed from sendpay request.
7. sendpay request partid type fixed to u64 (was u16!)
8. sendpay request localinvreqid type tightened to hash (was hex)
9. sendpay request payment_metadata and description fields documented.
10. sendpsbt request reserve type fixed to u32 (was boolean)
11. utxopsbt request satoshi type fixed to msat_or_all (was msat)
12. withdraw request parameter satoshi is compulsory (required)
13. fundchannel_start request amount is sat, not msat_or_all.
14. openchannel_init request amount is sat, not msat
15. openchannel_init close_to is a string, not hex.
16: invoice labels can be strings OR numbers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-19 14:58:59 +10:30

69 lines
3.4 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"amount"
],
"properties": {
"id": {
"type": "pubkey",
"description": "id is the peer id obtained from connect"
},
"amount": {
"type": "msat_or_all",
"description": "the amount in satoshis taken from the internal wallet to fund the channel (but if we have any anchor channels, this will always leave at least `min-emergency-msat` as change). The string *all* can be used to specify all available funds (or 16777215 satoshi if more is available and large channels were not negotiated with the peer). Otherwise, it is in satoshi precision; it can be a whole number, a whole number ending in *sat*, a whole number ending in *000msat*, or a number with 1 to 8 decimal places ending in *btc*. The value cannot be less than the dust limit, currently set to 546, nor more than 16777215 satoshi (unless large channels were negotiated with the peer)"
},
"feerate": {
"type": "feerate",
"description": "used for the opening transaction and (unless *option_anchors_zero_fee_htlc_tx* is negotiated), as initial feerate for commitment and HTLC transactions (see NOTES in lightning-feerates(7)). The default is *normal*"
},
"announce": {
"type": "boolean",
"description": "whether to announce this channel or not. An unannounced channel is considered private. Defaults to *True*"
},
"minconf": {
"type": "u32",
"description": "the minimum number of confirmations that used outputs should have. Default is 1"
},
"push_msat": {
"type": "msat",
"description": "the amount of millisatoshis to push to the channel peer at open. Note that this is a gift to the peer -- these satoshis are added to the initial balance of the peer at channel start and are largely unrecoverable once pushed"
},
"close_to": {
"type": "string",
"description": "a Bitcoin address to which the channel funds should be sent to on close. Only valid if both peers have negotiated `option_upfront_shutdown_script`. Returns `close_to` set to closing script iff is negotiated"
},
"request_amt": {
"type": "msat",
"description": "an amount of liquidity you'd like to lease from the peer. If peer supports `option_will_fund`, indicates to them to include this much liquidity into the channel. Must also pass in *compact_lease*"
},
"compact_lease": {
"type": "string",
"description": "a compact represenation of the peer's expected channel lease terms. If the peer's terms don't match this set, we will fail to open the channel"
},
"utxos": {
"type": "array",
"description": "the utxos to be used to fund the channel, as an array of `txid:vout`",
"items": {
"type": "outpoint"
}
},
"mindepth": {
"description": "Number of confirmations required before we consider the channel active",
"type": "u32"
},
"reserve": {
"type": "msat",
"description": "the amount we want the peer to maintain on its side of the channel. Default is 1% of the funding amount. It can be a whole number, a whole number ending in *sat*, a whole number ending in *000msat*, or a number with 1 to 8 decimal places ending in *btc*"
},
"channel_type": {
"added": "v24.02",
"type": "array",
"items": {
"type": "u32"
}
}
}
}