commit 285063fdfceaedef9e3f35535999b4744fdce3c1
parent 91512aa0f99f2f635002037500fec6e48c29e304
Author: William Casarin <jb55@jb55.com>
Date: Tue, 1 Nov 2022 16:38:19 -0700
sync schemas
Diffstat:
4 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,3 +1,8 @@
+schemas:
+ ./sync-schemas.xonsh
+
dist:
rsync -avzP ./ charon:public/runes/
+
+
diff --git a/rune-workshop.js b/rune-workshop.js
@@ -292,7 +292,7 @@ function update_command(r)
command_el.value = build_command(r)
}
-function restriction(v, old=true) {
+function restriction(v, old=false) {
if (old) {
return v
} else {
diff --git a/schemas.json b/schemas.json
@@ -1 +1 @@
-{"addgossip": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["message"], "properties": {"message": {"type": "hex", "description": "The raw, hex-encoded, gossip message to add to the local gossip view."}}}, "autocleaninvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"expired_by": {"type": "u64", "description": "How long an invoice must be expired (seconds) before we delete it."}, "cycle_seconds": {"type": "u64", "description": "The interval (in seconds) between cleaning expired invoices"}}}, "checkmessage": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["message", "zbase"], "properties": {"message": {"type": "string", "description": "Message to be checked against the signature."}, "zbase": {"type": "string", "description": "The Zbase32 encoded signature to verify."}, "pubkey": {"type": "pubkey", "description": "The Zbase32 encoded signature to verify."}}}, "close": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["id"], "properties": {"id": {"type": "string", "description": "peer id, channel id or short_channel_id"}, "unilateraltimeout": {"type": "u32", "description": ""}, "destination": {"type": "string", "description": ""}, "fee_negotiation_step": {"type": "string", "description": ""}, "wrong_funding": {"type": "txid", "description": ""}, "force_lease_closed": {"type": "boolean", "description": ""}, "feerange": {"type": "array", "items": {"type": "feerate"}, "description": ""}}}, "commando": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["peer_id", "method"], "properties": {"peer_id": {"type": "pubkey", "description": "peer to command"}, "method": {"type": "string", "description": "method to invoke on peer"}, "params": {"oneOf": [{"type": "array", "description": "array of positional parameters"}, {"type": "object", "description": "parameters for method"}]}, "rune": {"type": "string", "description": "rune to authorize the command"}}}, "commando-rune": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"rune": {"type": "string", "description": "optional rune to add to"}, "restrictions": {"oneOf": [{"type": "array", "description": "array of restrictions to add to rune", "items": {"type": "string"}}, {"type": "string", "description": "single restrictions to add to rune, or readonly."}]}}}, "connect": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["id"], "properties": {"id": {"type": "string", "description": ""}, "host": {"type": "string", "description": "The hostname of the node."}, "port": {"type": "u16", "description": "Port to try connecting to"}}}, "createinvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["invstring", "label", "preimage"], "properties": {"invstring": {"type": "string", "description": ""}, "label": {"type": "string", "description": ""}, "preimage": {"type": "hex", "description": ""}}}, "createonion": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["hops", "assocdata"], "properties": {"hops": {"type": "array", "description": "", "items": {"type": "object", "additionalProperties": false, "required": ["pubkey", "payload"], "properties": {"pubkey": {"type": "pubkey"}, "payload": {"type": "hex"}}}}, "assocdata": {"type": "hex", "description": ""}, "session_key": {"type": "secret"}, "onion_size": {"type": "u16"}}}, "datastore": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["key"], "properties": {"key": {"oneOf": [{"type": "array", "description": "key is an array of values (though a single value is treated as a one-element array), to form a heirarchy. Using the first element of the key as the plugin name (e.g. [ 'summary' ]) is recommended. A key can either have children or a value, never both: parents are created and removed automatically.", "items": {"type": "string"}}, {"type": "string"}]}, "string": {"type": "string", "description": ""}, "hex": {"type": "hex", "description": ""}, "mode": {"type": "string", "enum": ["must-create", "must-replace", "create-or-replace", "must-append", "create-or-append"], "description": ""}, "generation": {"type": "u64", "description": "If specified, means that the update will fail if the previously-existing data is not exactly that generation. This allows for simple atomicity. This is only legal with mode \u201cmust-replace\u201d or \u201cmust-append\u201d."}}}, "deldatastore": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["key"], "properties": {"key": {"oneOf": [{"type": "array", "description": "key is an array of values (though a single value is treated as a one-element array), to form a heirarchy. Using the first element of the key as the plugin name (e.g. [ 'summary' ]) is recommended. A key can either have children or a value, never both: parents are created and removed automatically.", "items": {"type": "string"}}, {"type": "string"}]}, "generation": {"type": "u64", "description": "If specified, means that the update will fail if the previously-existing data is not exactly that generation. This allows for simple atomicity. This is only legal with mode \u201cmust-replace\u201d or \u201cmust-append\u201d."}}}, "delexpiredinvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"maxexpirytime": {"type": "u64", "description": ""}}}, "delinvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["label", "status"], "properties": {"label": {"oneOf": [{"type": "string", "description": ""}, {"type": "integer", "description": ""}]}, "status": {"type": "string", "enum": ["paid", "expired", "unpaid"]}, "desconly": {"type": "boolean"}}}, "disconnect": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["id"], "properties": {"id": {"type": "pubkey"}, "force": {"type": "boolean"}}}, "emergencyrecover": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {}}, "feerates": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["style"], "properties": {"style": {"type": "string", "enum": ["perkb", "perkw"]}}}, "fundchannel": {"$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"}, "feerate": {"type": "feerate"}, "announce": {"type": "boolean"}, "minconf": {"type": "u32"}, "push_msat": {"type": "msat"}, "close_to": {"type": "string"}, "request_amt": {"type": "msat"}, "compact_lease": {"type": "string"}, "utxos": {"type": "array", "items": {"type": "outpoint"}}, "mindepth": {"description": "Number of confirmations required before we consider the channel active", "type": "u32"}}}, "fundpsbt": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["satoshi", "feerate", "startweight"], "properties": {"satoshi": {"type": "msat"}, "feerate": {"type": "feerate"}, "startweight": {"type": "u32"}, "minconf": {"type": "u32"}, "reserve": {"type": "u32", "description": "reserve is a number: if non-zero number then reserveinputs is called (successfully, with exclusive true) on the returned PSBT for this number of blocks (default: 72)."}, "locktime": {"type": "u32"}, "min_witness_weight": {"type": "u32"}, "excess_as_change": {"type": "boolean"}}}, "getinfo": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {}}, "getroute": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": ["id", "amount_msat", "riskfactor"], "properties": {"id": {"type": "pubkey", "description": ""}, "amount_msat": {"type": "msat", "description": ""}, "riskfactor": {"type": "u64", "description": ""}, "cltv": {"type": "number", "description": ""}, "fromid": {"type": "pubkey", "description": ""}, "fuzzpercent": {"type": "u32", "description": ""}, "exclude": {"type": "array", "description": "", "items": {"type": "string"}}, "maxhops": {"type": "u32", "description": ""}}}, "invoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["amount_msat", "label", "description"], "properties": {"amount_msat": {"type": "msat_or_any", "description": ""}, "description": {"type": "string", "description": ""}, "label": {"oneOf": [{"type": "string", "description": ""}, {"type": "integer", "description": ""}]}, "expiry": {"type": "u64", "description": ""}, "fallbacks": {"type": "array", "description": "", "items": {"type": "string"}}, "preimage": {"type": "hex", "description": ""}, "exposeprivatechannels": {"oneOf": [{"type": "boolean", "description": ""}, {"type": "array", "items": {"type": "short_channel_id"}}, {"type": "short_channel_id"}]}, "cltv": {"type": "u32", "description": ""}, "deschashonly": {"type": "boolean", "description": ""}}}, "keysend": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["destination", "amount_msat"], "properties": {"destination": {"type": "pubkey"}, "amount_msat": {"type": "msat"}, "label": {"type": "string"}, "maxfeepercent": {"type": "number"}, "retry_for": {"type": "u32"}, "maxdelay": {"type": "u32"}, "exemptfee": {"type": "msat"}, "routehints": {"type": "array", "items": {"type": "array", "items": {"type": "object", "additionalProperties": false, "required": ["id", "scid", "feebase", "feeprop", "expirydelta"], "properties": {"id": {"type": "pubkey"}, "scid": {"type": "short_channel_id"}, "feebase": {"type": "msat"}, "feeprop": {"type": "u32"}, "expirydelta": {"type": "u16"}}}}}, "extratlvs": {"type": "object", "additionalProperties": true, "required": []}}}, "listchannels": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"short_channel_id": {"type": "short_channel_id", "description": "If short_channel_id is a short channel id, then only known channels with a matching short_channel_id are returned. Otherwise, it must be null."}, "source": {"type": "pubkey", "description": "If source is a node id, then only channels leading from that node id are returned."}, "destination": {"type": "pubkey", "description": "If destination is a node id, then only channels leading to that node id are returned."}}}, "listdatastore": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"key": {"oneOf": [{"type": "array", "description": "key is an array of values (though a single value is treated as a one-element array), to form a heirarchy. Using the first element of the key as the plugin name (e.g. [ 'summary' ]) is recommended. A key can either have children or a value, never both: parents are created and removed automatically.", "items": {"type": "string"}}, {"type": "string", "description": ""}]}}}, "listforwards": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "properties": {"status": {"type": "string", "enum": ["offered", "settled", "local_failed", "failed"]}, "in_channel": {"type": "short_channel_id"}, "out_channel": {"type": "short_channel_id"}}}, "listfunds": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"spent": {"type": "boolean", "description": "Should outputs that are already spent be included in the result?"}}}, "listinvoices": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"label": {"oneOf": [{"type": "string", "description": ""}, {"type": "integer", "description": ""}]}, "invstring": {"type": "string", "description": ""}, "payment_hash": {"type": "hex", "description": ""}, "offer_id": {"type": "string", "description": ""}}}, "listnodes": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"id": {"type": "pubkey"}}}, "listpays": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"bolt11": {"type": "string"}, "payment_hash": {"type": "hash"}, "status": {"type": "string", "enum": ["pending", "complete", "failed"]}}}, "listpeers": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"id": {"type": "pubkey", "description": "If supplied, limits the result to just the peer with the given ID, if it exists."}, "level": {"type": "string", "description": "Supplying level will show log entries related to that peer at the given log level. Valid log levels are \u201cio\u201d, \u201cdebug\u201d, \u201cinfo\u201d, and \u201cunusual\u201d."}}}, "listsendpays": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"bolt11": {"type": "string"}, "payment_hash": {"type": "hash"}, "status": {"type": "string", "enum": ["pending", "complete", "failed"]}}}, "listtransactions": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {}}, "makesecret": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["hex"], "properties": {"hex": {"type": "hex", "description": "This will be used for deriving the secret"}}}, "newaddr": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"addresstype": {"type": "string", "enum": ["bech32", "p2sh-segwit", "all"]}}}, "pay": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["bolt11"], "properties": {"bolt11": {"type": "string"}, "amount_msat": {"type": "msat"}, "label": {"type": "string"}, "riskfactor": {"type": "number"}, "maxfeepercent": {"type": "number"}, "retry_for": {"type": "u16"}, "maxdelay": {"type": "u16"}, "exemptfee": {"type": "msat"}, "localofferid": {"type": "hex"}, "exclude": {"type": "array", "items": {"oneOf": [{"type": "short_channel_id_dir"}, {"type": "pubkey"}]}}, "maxfee": {"type": "msat"}, "description": {"type": "string"}}}, "ping": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": ["id"], "additionalProperties": false, "properties": {"id": {"type": "pubkey"}, "len": {"type": "number"}, "pongbytes": {"type": "number"}}}, "recoverchannel": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["scb"], "scb": {"type": "array", "description": "SCB of the channels in an array", "items": {"type": "hexstr"}}}, "sendonion": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["onion", "first_hop", "payment_hash"], "properties": {"onion": {"type": "hex"}, "first_hop": {"type": "object", "required": ["id", "amount_msat", "delay"], "properties": {"id": {"type": "pubkey"}, "amount_msat": {"type": "msat"}, "delay": {"type": "u16"}}}, "payment_hash": {"type": "hash"}, "label": {"type": "string"}, "shared_secrets": {"type": "array", "items": {"type": "secret"}}, "partid": {"type": "u16"}, "bolt11": {"type": "string"}, "amount_msat": {"type": "msat"}, "destination": {"type": "pubkey"}, "localofferid": {"type": "hash"}, "groupid": {"type": "u64"}}}, "sendpay": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["route", "payment_hash"], "properties": {"route": {"type": "array", "items": {"type": "object", "required": ["amount_msat", "id", "delay", "channel"], "properties": {"amount_msat": {"type": "msat"}, "msatoshi": {"deprecated": "true"}, "id": {"type": "pubkey"}, "delay": {"type": "u16"}, "channel": {"type": "short_channel_id"}}}}, "payment_hash": {"type": "hash"}, "label": {"type": "string"}, "amount_msat": {"type": "msat"}, "bolt11": {"type": "string"}, "payment_secret": {"type": "secret"}, "partid": {"type": "u16"}, "localofferid": {"type": "hex"}, "groupid": {"type": "u64"}}}, "sendpsbt": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["psbt"], "properties": {"psbt": {"type": "string"}, "reserve": {"type": "boolean"}}}, "signmessage": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": ["message"], "additionalProperties": false, "properties": {"message": {"type": "string"}}}, "signpsbt": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["psbt"], "properties": {"psbt": {"type": "string"}, "signonly": {"type": "array", "items": {"type": "u32"}}}}, "staticbackup": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {}}, "stop": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {}}, "txdiscard": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["txid"], "properties": {"txid": {"type": "txid"}}}, "txprepare": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["outputs"], "properties": {"outputs": {"type": "array", "items": {"type": "outputdesc"}}, "feerate": {"type": "feerate"}, "minconf": {"type": "u32"}, "utxos": {"type": "array", "items": {"type": "outpoint"}}}}, "txsend": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["txid"], "properties": {"txid": {"type": "txid"}}}, "utxopsbt": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["satoshi", "feerate", "startweight", "utxos"], "properties": {"satoshi": {"type": "msat"}, "feerate": {"type": "feerate"}, "startweight": {"type": "u32"}, "utxos": {"type": "array", "items": {"type": "outpoint"}}, "reserve": {"type": "u32", "description": "reserve is a number: if non-zero number then reserveinputs is called (successfully, with exclusive true) on the returned PSBT for this number of blocks (default: 72)."}, "reservedok": {"type": "boolean"}, "locktime": {"type": "u32"}, "min_witness_weight": {"type": "u32"}, "excess_as_change": {"type": "boolean"}}}, "waitanyinvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"lastpay_index": {"type": "u64"}, "timeout": {"type": "u64"}}}, "waitinvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["label"], "properties": {"label": {"type": "string"}}}, "waitsendpay": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["payment_hash"], "properties": {"payment_hash": {"type": "hash"}, "timeout": {"type": "u32"}, "partid": {"type": "u64"}, "groupid": {"type": "u64"}}}, "withdraw": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["destination"], "properties": {"destination": {"type": "string"}, "satoshi": {"type": "msat_or_all"}, "feerate": {"type": "feerate"}, "minconf": {"type": "u16"}, "utxos": {"type": "array", "items": {"type": "outpoint"}}}}}-
\ No newline at end of file
+{"addgossip": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["message"], "properties": {"message": {"type": "hex", "description": "The raw, hex-encoded, gossip message to add to the local gossip view."}}}, "autocleaninvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"expired_by": {"type": "u64", "description": "How long an invoice must be expired (seconds) before we delete it."}, "cycle_seconds": {"type": "u64", "description": "The interval (in seconds) between cleaning expired invoices"}}}, "autoclean-status": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"subsystem": {"type": "string", "enum": ["succeededforwards", "failedforwards", "succeededpays", "failedpays", "paidinvoices", "expiredinvoices"], "description": "What subsystem to ask about"}}}, "batching": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["enable"], "properties": {"enable": {"type": "boolean", "description": "Whether to enable or disable transaction batching"}}}, "checkmessage": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["message", "zbase"], "properties": {"message": {"type": "string", "description": "Message to be checked against the signature."}, "zbase": {"type": "string", "description": "The Zbase32 encoded signature to verify."}, "pubkey": {"type": "pubkey", "description": "The Zbase32 encoded signature to verify."}}}, "close": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["id"], "properties": {"id": {"type": "string", "description": "peer id, channel id or short_channel_id"}, "unilateraltimeout": {"type": "u32", "description": ""}, "destination": {"type": "string", "description": ""}, "fee_negotiation_step": {"type": "string", "description": ""}, "wrong_funding": {"type": "outpoint", "description": ""}, "force_lease_closed": {"type": "boolean", "description": ""}, "feerange": {"type": "array", "items": {"type": "feerate"}, "description": ""}}}, "commando": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["peer_id", "method"], "properties": {"peer_id": {"type": "pubkey", "description": "peer to command"}, "method": {"type": "string", "description": "method to invoke on peer"}, "params": {"oneOf": [{"type": "array", "description": "array of positional parameters"}, {"type": "object", "description": "parameters for method"}]}, "rune": {"type": "string", "description": "rune to authorize the command"}}}, "commando-rune": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"rune": {"type": "string", "description": "optional rune to add to"}, "restrictions": {"oneOf": [{"type": "array", "description": "array of restrictions to add to rune", "items": {"type": "array", "items": {"type": "string"}}}, {"type": "string", "enum": ["readonly"], "description": "readonly string to indicate standard readonly restrictions."}]}}}, "connect": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["id"], "properties": {"id": {"type": "string", "description": ""}, "host": {"type": "string", "description": "The hostname of the node."}, "port": {"type": "u16", "description": "Port to try connecting to"}}}, "createinvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["invstring", "label", "preimage"], "properties": {"invstring": {"type": "string", "description": ""}, "label": {"type": "string", "description": ""}, "preimage": {"type": "hex", "description": ""}}}, "createonion": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["hops", "assocdata"], "properties": {"hops": {"type": "array", "description": "", "items": {"type": "object", "additionalProperties": false, "required": ["pubkey", "payload"], "properties": {"pubkey": {"type": "pubkey"}, "payload": {"type": "hex"}}}}, "assocdata": {"type": "hex", "description": ""}, "session_key": {"type": "secret"}, "onion_size": {"type": "u16"}}}, "datastore": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["key"], "properties": {"key": {"oneOf": [{"type": "array", "description": "key is an array of values (though a single value is treated as a one-element array), to form a heirarchy. Using the first element of the key as the plugin name (e.g. [ 'summary' ]) is recommended. A key can either have children or a value, never both: parents are created and removed automatically.", "items": {"type": "string"}}, {"type": "string"}]}, "string": {"type": "string", "description": ""}, "hex": {"type": "hex", "description": ""}, "mode": {"type": "string", "enum": ["must-create", "must-replace", "create-or-replace", "must-append", "create-or-append"], "description": ""}, "generation": {"type": "u64", "description": "If specified, means that the update will fail if the previously-existing data is not exactly that generation. This allows for simple atomicity. This is only legal with mode \u201cmust-replace\u201d or \u201cmust-append\u201d."}}}, "deldatastore": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["key"], "properties": {"key": {"oneOf": [{"type": "array", "description": "key is an array of values (though a single value is treated as a one-element array), to form a heirarchy. Using the first element of the key as the plugin name (e.g. [ 'summary' ]) is recommended. A key can either have children or a value, never both: parents are created and removed automatically.", "items": {"type": "string"}}, {"type": "string"}]}, "generation": {"type": "u64", "description": "If specified, means that the update will fail if the previously-existing data is not exactly that generation. This allows for simple atomicity. This is only legal with mode \u201cmust-replace\u201d or \u201cmust-append\u201d."}}}, "delexpiredinvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"maxexpirytime": {"type": "u64", "description": ""}}}, "delforward": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "properties": {"in_channel": {"type": "short_channel_id"}, "in_htlc_id": {"type": "u64"}, "status": {"type": "string", "enum": ["settled", "local_failed", "failed"]}}}, "delinvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["label", "status"], "properties": {"label": {"oneOf": [{"type": "string", "description": ""}, {"type": "integer", "description": ""}]}, "status": {"type": "string", "enum": ["paid", "expired", "unpaid"]}, "desconly": {"type": "boolean"}}}, "delpay": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": ["payment_hash", "status"], "additionalProperties": false, "properties": {"payment_hash": {"type": "hex", "description": "the hash of the *payment_preimage* which will prove payment", "maxLength": 64, "minLength": 64}, "status": {"type": "string", "enum": ["complete", "failed"]}, "partid": {"type": "u64"}, "groupid": {"type": "u64"}}}, "disconnect": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["id"], "properties": {"id": {"type": "pubkey"}, "force": {"type": "boolean"}}}, "emergencyrecover": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {}}, "feerates": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["style"], "properties": {"style": {"type": "string", "enum": ["perkb", "perkw"]}}}, "fundchannel": {"$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"}, "feerate": {"type": "feerate"}, "announce": {"type": "boolean"}, "minconf": {"type": "u32"}, "push_msat": {"type": "msat"}, "close_to": {"type": "string"}, "request_amt": {"type": "msat"}, "compact_lease": {"type": "string"}, "utxos": {"type": "array", "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"}}}, "fundpsbt": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["satoshi", "feerate", "startweight"], "properties": {"satoshi": {"type": "msat_or_all"}, "feerate": {"type": "feerate"}, "startweight": {"type": "u32"}, "minconf": {"type": "u32"}, "reserve": {"type": "u32", "description": "reserve is a number: if non-zero number then reserveinputs is called (successfully, with exclusive true) on the returned PSBT for this number of blocks (default: 72)."}, "locktime": {"type": "u32"}, "min_witness_weight": {"type": "u32"}, "excess_as_change": {"type": "boolean"}}}, "getinfo": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {}}, "getroute": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": ["id", "amount_msat", "riskfactor"], "properties": {"id": {"type": "pubkey", "description": ""}, "amount_msat": {"type": "msat", "description": ""}, "riskfactor": {"type": "u64", "description": ""}, "cltv": {"type": "number", "description": ""}, "fromid": {"type": "pubkey", "description": ""}, "fuzzpercent": {"type": "u32", "description": ""}, "exclude": {"type": "array", "description": "", "items": {"type": "string"}}, "maxhops": {"type": "u32", "description": ""}}}, "invoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["amount_msat", "label", "description"], "properties": {"amount_msat": {"type": "msat_or_any", "description": ""}, "description": {"type": "string", "description": ""}, "label": {"oneOf": [{"type": "string", "description": ""}, {"type": "integer", "description": ""}]}, "expiry": {"type": "u64", "description": ""}, "fallbacks": {"type": "array", "description": "", "items": {"type": "string"}}, "preimage": {"type": "hex", "description": ""}, "exposeprivatechannels": {"oneOf": [{"type": "boolean", "description": ""}, {"type": "array", "items": {"type": "short_channel_id"}}, {"type": "short_channel_id"}]}, "cltv": {"type": "u32", "description": ""}, "deschashonly": {"type": "boolean", "description": ""}}}, "keysend": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["destination", "amount_msat"], "properties": {"destination": {"type": "pubkey"}, "amount_msat": {"type": "msat"}, "label": {"type": "string"}, "maxfeepercent": {"type": "number"}, "retry_for": {"type": "u32"}, "maxdelay": {"type": "u32"}, "exemptfee": {"type": "msat"}, "routehints": {"type": "array", "items": {"type": "array", "items": {"type": "object", "additionalProperties": false, "required": ["id", "scid", "feebase", "feeprop", "expirydelta"], "properties": {"id": {"type": "pubkey"}, "scid": {"type": "short_channel_id"}, "feebase": {"type": "msat"}, "feeprop": {"type": "u32"}, "expirydelta": {"type": "u16"}}}}}, "extratlvs": {"type": "object", "additionalProperties": true, "required": []}}}, "listchannels": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"short_channel_id": {"type": "short_channel_id", "description": "If short_channel_id is a short channel id, then only known channels with a matching short_channel_id are returned. Otherwise, it must be null."}, "source": {"type": "pubkey", "description": "If source is a node id, then only channels leading from that node id are returned."}, "destination": {"type": "pubkey", "description": "If destination is a node id, then only channels leading to that node id are returned."}}}, "listdatastore": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"key": {"oneOf": [{"type": "array", "description": "key is an array of values (though a single value is treated as a one-element array), to form a heirarchy. Using the first element of the key as the plugin name (e.g. [ 'summary' ]) is recommended. A key can either have children or a value, never both: parents are created and removed automatically.", "items": {"type": "string"}}, {"type": "string", "description": ""}]}}}, "listforwards": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "properties": {"status": {"type": "string", "enum": ["offered", "settled", "local_failed", "failed"]}, "in_channel": {"type": "short_channel_id"}, "out_channel": {"type": "short_channel_id"}}}, "listfunds": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"spent": {"type": "boolean", "description": "Should outputs that are already spent be included in the result?"}}}, "listhtlcs": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "properties": {"id": {"type": "string", "description": "channel id or short_channel_id"}}}, "listinvoices": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"label": {"oneOf": [{"type": "string", "description": ""}, {"type": "integer", "description": ""}]}, "invstring": {"type": "string", "description": ""}, "payment_hash": {"type": "hex", "description": ""}, "offer_id": {"type": "string", "description": ""}}}, "listnodes": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"id": {"type": "pubkey"}}}, "listpays": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"bolt11": {"type": "string"}, "payment_hash": {"type": "hash"}, "status": {"type": "string", "enum": ["pending", "complete", "failed"]}}}, "listpeers": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"id": {"type": "pubkey", "description": "If supplied, limits the result to just the peer with the given ID, if it exists."}, "level": {"type": "string", "description": "Supplying level will show log entries related to that peer at the given log level. Valid log levels are \u201cio\u201d, \u201cdebug\u201d, \u201cinfo\u201d, and \u201cunusual\u201d."}}}, "listsendpays": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"bolt11": {"type": "string"}, "payment_hash": {"type": "hash"}, "status": {"type": "string", "enum": ["pending", "complete", "failed"]}}}, "listtransactions": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {}}, "makesecret": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"hex": {"type": "hex", "description": "This will be used for deriving the secret"}, "string": {"type": "string", "description": "This will be used for deriving the secret"}}}, "newaddr": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {"addresstype": {"type": "string", "enum": ["bech32", "p2sh-segwit", "all"]}}}, "pay": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["bolt11"], "properties": {"bolt11": {"type": "string"}, "amount_msat": {"type": "msat"}, "label": {"type": "string"}, "riskfactor": {"type": "number"}, "maxfeepercent": {"type": "number"}, "retry_for": {"type": "u16"}, "maxdelay": {"type": "u16"}, "exemptfee": {"type": "msat"}, "localofferid": {"type": "hex"}, "exclude": {"type": "array", "items": {"oneOf": [{"type": "short_channel_id_dir"}, {"type": "pubkey"}]}}, "maxfee": {"type": "msat"}, "description": {"type": "string"}}}, "ping": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": ["id"], "additionalProperties": false, "properties": {"id": {"type": "pubkey"}, "len": {"type": "number"}, "pongbytes": {"type": "number"}}}, "recoverchannel": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["scb"], "scb": {"type": "array", "description": "SCB of the channels in an array", "items": {"type": "hexstr"}}}, "sendonion": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["onion", "first_hop", "payment_hash"], "properties": {"onion": {"type": "hex"}, "first_hop": {"type": "object", "required": ["id", "amount_msat", "delay"], "properties": {"id": {"type": "pubkey"}, "amount_msat": {"type": "msat"}, "delay": {"type": "u16"}}}, "payment_hash": {"type": "hash"}, "label": {"type": "string"}, "shared_secrets": {"type": "array", "items": {"type": "secret"}}, "partid": {"type": "u16"}, "bolt11": {"type": "string"}, "amount_msat": {"type": "msat"}, "destination": {"type": "pubkey"}, "localofferid": {"type": "hash"}, "groupid": {"type": "u64"}}}, "sendpay": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["route", "payment_hash"], "properties": {"route": {"type": "array", "items": {"type": "object", "required": ["amount_msat", "id", "delay", "channel"], "properties": {"amount_msat": {"type": "msat"}, "msatoshi": {"deprecated": "true"}, "id": {"type": "pubkey"}, "delay": {"type": "u16"}, "channel": {"type": "short_channel_id"}}}}, "payment_hash": {"type": "hash"}, "label": {"type": "string"}, "amount_msat": {"type": "msat"}, "bolt11": {"type": "string"}, "payment_secret": {"type": "secret"}, "partid": {"type": "u16"}, "localofferid": {"type": "hex"}, "groupid": {"type": "u64"}}}, "sendpsbt": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["psbt"], "properties": {"psbt": {"type": "string"}, "reserve": {"type": "boolean"}}}, "setchannel": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["id"], "properties": {"id": {"type": "string"}, "feebase": {"type": "msat"}, "feeppm": {"type": "u32"}, "htlcmin": {"type": "msat"}, "htlcmax": {"type": "msat"}, "enforcedelay": {"type": "u32"}}}, "signmessage": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": ["message"], "additionalProperties": false, "properties": {"message": {"type": "string"}}}, "signpsbt": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["psbt"], "properties": {"psbt": {"type": "string"}, "signonly": {"type": "array", "items": {"type": "u32"}}}}, "staticbackup": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "required": [], "additionalProperties": false, "properties": {}}, "stop": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {}}, "txdiscard": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["txid"], "properties": {"txid": {"type": "txid"}}}, "txprepare": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["outputs"], "properties": {"outputs": {"type": "array", "items": {"type": "outputdesc"}}, "feerate": {"type": "feerate"}, "minconf": {"type": "u32"}, "utxos": {"type": "array", "items": {"type": "outpoint"}}}}, "txsend": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["txid"], "properties": {"txid": {"type": "txid"}}}, "utxopsbt": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["satoshi", "feerate", "startweight", "utxos"], "properties": {"satoshi": {"type": "msat"}, "feerate": {"type": "feerate"}, "startweight": {"type": "u32"}, "utxos": {"type": "array", "items": {"type": "outpoint"}}, "reserve": {"type": "u32", "description": "reserve is a number: if non-zero number then reserveinputs is called (successfully, with exclusive true) on the returned PSBT for this number of blocks (default: 72)."}, "reservedok": {"type": "boolean"}, "locktime": {"type": "u32"}, "min_witness_weight": {"type": "u32"}, "excess_as_change": {"type": "boolean"}}}, "waitanyinvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": [], "properties": {"lastpay_index": {"type": "u64"}, "timeout": {"type": "u64"}}}, "waitinvoice": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["label"], "properties": {"label": {"type": "string"}}}, "waitsendpay": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["payment_hash"], "properties": {"payment_hash": {"type": "hash"}, "timeout": {"type": "u32"}, "partid": {"type": "u64"}, "groupid": {"type": "u64"}}}, "withdraw": {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "required": ["destination"], "properties": {"destination": {"type": "string"}, "satoshi": {"type": "msat_or_all"}, "feerate": {"type": "feerate"}, "minconf": {"type": "u16"}, "utxos": {"type": "array", "items": {"type": "outpoint"}}}}}+
\ No newline at end of file
diff --git a/sync-schemas.xonsh b/sync-schemas.xonsh
@@ -5,7 +5,7 @@ import json
import sys
# fetch latest
-rm -rf lightning-master
+rm -rf lightning-master lightning.tar.gz
curl -sL https://github.com/ElementsProject/lightning/archive/master.tar.gz > lightning.tar.gz
tar xf lightning.tar.gz
@@ -24,3 +24,5 @@ print("Writing schemas.json", file=sys.stderr)
with open("schemas.json", "w") as f:
f.write(json.dumps(out))
+
+rm -rf lightning-master lightning.tar.gz