mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
cln-grpc: Add the connect
method
This commit is contained in:
parent
646901f588
commit
d90aafeed6
456
.msggen.json
456
.msggen.json
@ -5,6 +5,24 @@
|
||||
"unilateral": 1,
|
||||
"unopened": 2
|
||||
},
|
||||
"ConnectAddressType": {
|
||||
"ipv4": 1,
|
||||
"ipv6": 2,
|
||||
"local socket": 0,
|
||||
"torv2": 3,
|
||||
"torv3": 4
|
||||
},
|
||||
"ConnectDirection": {
|
||||
"in": 0,
|
||||
"out": 1
|
||||
},
|
||||
"DatastoreMode": {
|
||||
"create-or-append": 4,
|
||||
"create-or-replace": 2,
|
||||
"must-append": 3,
|
||||
"must-create": 0,
|
||||
"must-replace": 1
|
||||
},
|
||||
"GetinfoAddressType": {
|
||||
"dns": 0,
|
||||
"ipv4": 1,
|
||||
@ -65,170 +83,278 @@
|
||||
}
|
||||
},
|
||||
"grpc-field-map": {
|
||||
"AddGossip.message": 1,
|
||||
"AutoCleanInvoice.cycle_seconds": 2,
|
||||
"AutoCleanInvoice.enabled": 3,
|
||||
"AutoCleanInvoice.expired_by": 1,
|
||||
"CheckMessage.message": 1,
|
||||
"CheckMessage.pubkey": 3,
|
||||
"CheckMessage.verified": 4,
|
||||
"CheckMessage.zbase": 2,
|
||||
"Close.destination": 3,
|
||||
"Close.fee_negotiation_step": 4,
|
||||
"Close.force_lease_closed": 6,
|
||||
"Close.id": 1,
|
||||
"Close.tx": 8,
|
||||
"Close.txid": 9,
|
||||
"Close.type": 7,
|
||||
"Close.unilateraltimeout": 2,
|
||||
"Close.wrong_funding": 5,
|
||||
"Getinfo.address[]": 14,
|
||||
"Getinfo.address[].address": 3,
|
||||
"Getinfo.address[].port": 2,
|
||||
"Getinfo.address[].type": 1,
|
||||
"Getinfo.alias": 2,
|
||||
"Getinfo.binding[]": 15,
|
||||
"Getinfo.binding[].address": 2,
|
||||
"Getinfo.binding[].port": 3,
|
||||
"Getinfo.binding[].socket": 4,
|
||||
"Getinfo.binding[].type": 1,
|
||||
"Getinfo.blockheight": 11,
|
||||
"Getinfo.color": 3,
|
||||
"Getinfo.fees_collected_msat": 13,
|
||||
"Getinfo.id": 1,
|
||||
"Getinfo.lightning-dir": 9,
|
||||
"Getinfo.network": 12,
|
||||
"Getinfo.num_active_channels": 6,
|
||||
"Getinfo.num_inactive_channels": 7,
|
||||
"Getinfo.num_peers": 4,
|
||||
"Getinfo.num_pending_channels": 5,
|
||||
"Getinfo.our_features": 10,
|
||||
"Getinfo.our_features.channel": 3,
|
||||
"Getinfo.our_features.init": 1,
|
||||
"Getinfo.our_features.invoice": 4,
|
||||
"Getinfo.our_features.node": 2,
|
||||
"Getinfo.version": 8,
|
||||
"Getinfo.warning_bitcoind_sync": 16,
|
||||
"Getinfo.warning_lightningd_sync": 17,
|
||||
"ListChannels.channels[]": 4,
|
||||
"ListChannels.channels[].active": 8,
|
||||
"ListChannels.channels[].amount_msat": 5,
|
||||
"ListChannels.channels[].base_fee_millisatoshi": 10,
|
||||
"ListChannels.channels[].channel_flags": 7,
|
||||
"ListChannels.channels[].delay": 12,
|
||||
"ListChannels.channels[].destination": 2,
|
||||
"ListChannels.channels[].features": 15,
|
||||
"ListChannels.channels[].fee_per_millionth": 11,
|
||||
"ListChannels.channels[].htlc_maximum_msat": 14,
|
||||
"ListChannels.channels[].htlc_minimum_msat": 13,
|
||||
"ListChannels.channels[].last_update": 9,
|
||||
"ListChannels.channels[].message_flags": 6,
|
||||
"ListChannels.channels[].public": 4,
|
||||
"ListChannels.channels[].short_channel_id": 3,
|
||||
"ListChannels.channels[].source": 1,
|
||||
"ListChannels.destination": 3,
|
||||
"ListChannels.short_channel_id": 1,
|
||||
"ListChannels.source": 2,
|
||||
"ListFunds.channels[]": 3,
|
||||
"ListFunds.channels[].amount_msat": 3,
|
||||
"ListFunds.channels[].connected": 6,
|
||||
"ListFunds.channels[].funding_output": 5,
|
||||
"ListFunds.channels[].funding_txid": 4,
|
||||
"ListFunds.channels[].our_amount_msat": 2,
|
||||
"ListFunds.channels[].peer_id": 1,
|
||||
"ListFunds.channels[].short_channel_id": 8,
|
||||
"ListFunds.channels[].state": 7,
|
||||
"ListFunds.outputs[]": 2,
|
||||
"ListFunds.outputs[].address": 5,
|
||||
"ListFunds.outputs[].amount_msat": 3,
|
||||
"ListFunds.outputs[].blockheight": 8,
|
||||
"ListFunds.outputs[].output": 2,
|
||||
"ListFunds.outputs[].redeemscript": 6,
|
||||
"ListFunds.outputs[].scriptpubkey": 4,
|
||||
"ListFunds.outputs[].status": 7,
|
||||
"ListFunds.outputs[].txid": 1,
|
||||
"ListFunds.spent": 1,
|
||||
"ListPeers.id": 1,
|
||||
"ListPeers.level": 2,
|
||||
"ListPeers.peers[]": 3,
|
||||
"ListPeers.peers[].channels[]": 4,
|
||||
"ListPeers.peers[].channels[].channel_id": 6,
|
||||
"ListPeers.peers[].channels[].close_to": 14,
|
||||
"ListPeers.peers[].channels[].close_to_addr": 47,
|
||||
"ListPeers.peers[].channels[].closer": 17,
|
||||
"ListPeers.peers[].channels[].dust_limit_msat": 26,
|
||||
"ListPeers.peers[].channels[].features[]": 18,
|
||||
"ListPeers.peers[].channels[].fee_base_msat": 24,
|
||||
"ListPeers.peers[].channels[].fee_proportional_millionths": 25,
|
||||
"ListPeers.peers[].channels[].feerate": 3,
|
||||
"ListPeers.peers[].channels[].feerate.perkb": 2,
|
||||
"ListPeers.peers[].channels[].feerate.perkw": 1,
|
||||
"ListPeers.peers[].channels[].funding": 19,
|
||||
"ListPeers.peers[].channels[].funding.local_msat": 1,
|
||||
"ListPeers.peers[].channels[].funding.pushed_msat": 3,
|
||||
"ListPeers.peers[].channels[].funding.remote_msat": 2,
|
||||
"ListPeers.peers[].channels[].funding_outnum": 8,
|
||||
"ListPeers.peers[].channels[].funding_txid": 7,
|
||||
"ListPeers.peers[].channels[].htlcs[]": 46,
|
||||
"ListPeers.peers[].channels[].htlcs[].amount_msat": 3,
|
||||
"ListPeers.peers[].channels[].htlcs[].direction": 1,
|
||||
"ListPeers.peers[].channels[].htlcs[].expiry": 4,
|
||||
"ListPeers.peers[].channels[].htlcs[].id": 2,
|
||||
"ListPeers.peers[].channels[].htlcs[].local_trimmed": 6,
|
||||
"ListPeers.peers[].channels[].htlcs[].payment_hash": 5,
|
||||
"ListPeers.peers[].channels[].htlcs[].state": 8,
|
||||
"ListPeers.peers[].channels[].htlcs[].status": 7,
|
||||
"ListPeers.peers[].channels[].in_fulfilled_msat": 41,
|
||||
"ListPeers.peers[].channels[].in_offered_msat": 39,
|
||||
"ListPeers.peers[].channels[].in_payments_fulfilled": 40,
|
||||
"ListPeers.peers[].channels[].in_payments_offered": 38,
|
||||
"ListPeers.peers[].channels[].inflight[]": 13,
|
||||
"ListPeers.peers[].channels[].inflight[].feerate": 3,
|
||||
"ListPeers.peers[].channels[].inflight[].funding_outnum": 2,
|
||||
"ListPeers.peers[].channels[].inflight[].funding_txid": 1,
|
||||
"ListPeers.peers[].channels[].inflight[].our_funding_msat": 5,
|
||||
"ListPeers.peers[].channels[].inflight[].scratch_txid": 6,
|
||||
"ListPeers.peers[].channels[].inflight[].total_funding_msat": 4,
|
||||
"ListPeers.peers[].channels[].initial_feerate": 9,
|
||||
"ListPeers.peers[].channels[].last_feerate": 10,
|
||||
"ListPeers.peers[].channels[].max_accepted_htlcs": 35,
|
||||
"ListPeers.peers[].channels[].max_to_us_msat": 22,
|
||||
"ListPeers.peers[].channels[].max_total_htlc_in_msat": 27,
|
||||
"ListPeers.peers[].channels[].min_to_us_msat": 21,
|
||||
"ListPeers.peers[].channels[].minimum_htlc_in_msat": 32,
|
||||
"ListPeers.peers[].channels[].next_fee_step": 12,
|
||||
"ListPeers.peers[].channels[].next_feerate": 11,
|
||||
"ListPeers.peers[].channels[].opener": 16,
|
||||
"ListPeers.peers[].channels[].our_reserve_msat": 29,
|
||||
"ListPeers.peers[].channels[].our_to_self_delay": 34,
|
||||
"ListPeers.peers[].channels[].out_fulfilled_msat": 45,
|
||||
"ListPeers.peers[].channels[].out_offered_msat": 43,
|
||||
"ListPeers.peers[].channels[].out_payments_fulfilled": 44,
|
||||
"ListPeers.peers[].channels[].out_payments_offered": 42,
|
||||
"ListPeers.peers[].channels[].owner": 4,
|
||||
"ListPeers.peers[].channels[].private": 15,
|
||||
"ListPeers.peers[].channels[].receivable_msat": 31,
|
||||
"ListPeers.peers[].channels[].scratch_txid": 2,
|
||||
"ListPeers.peers[].channels[].short_channel_id": 5,
|
||||
"ListPeers.peers[].channels[].spendable_msat": 30,
|
||||
"ListPeers.peers[].channels[].state": 1,
|
||||
"ListPeers.peers[].channels[].state_changes[]": 36,
|
||||
"ListPeers.peers[].channels[].status[]": 37,
|
||||
"ListPeers.peers[].channels[].their_reserve_msat": 28,
|
||||
"ListPeers.peers[].channels[].their_to_self_delay": 33,
|
||||
"ListPeers.peers[].channels[].to_us_msat": 20,
|
||||
"ListPeers.peers[].channels[].total_msat": 23,
|
||||
"ListPeers.peers[].connected": 2,
|
||||
"ListPeers.peers[].features": 6,
|
||||
"ListPeers.peers[].id": 1,
|
||||
"ListPeers.peers[].log[]": 3,
|
||||
"ListPeers.peers[].log[].data": 7,
|
||||
"ListPeers.peers[].log[].log": 5,
|
||||
"ListPeers.peers[].log[].node_id": 6,
|
||||
"ListPeers.peers[].log[].num_skipped": 2,
|
||||
"ListPeers.peers[].log[].source": 4,
|
||||
"ListPeers.peers[].log[].time": 3,
|
||||
"ListPeers.peers[].log[].type": 1,
|
||||
"ListPeers.peers[].netaddr[]": 5
|
||||
"AddgossipRequest": {
|
||||
"AddGossip.message": 1
|
||||
},
|
||||
"AutocleaninvoiceRequest": {
|
||||
"AutoCleanInvoice.cycle_seconds": 2,
|
||||
"AutoCleanInvoice.expired_by": 1
|
||||
},
|
||||
"AutocleaninvoiceResponse": {
|
||||
"AutoCleanInvoice.cycle_seconds": 3,
|
||||
"AutoCleanInvoice.enabled": 1,
|
||||
"AutoCleanInvoice.expired_by": 2
|
||||
},
|
||||
"CheckmessageRequest": {
|
||||
"CheckMessage.message": 1,
|
||||
"CheckMessage.pubkey": 3,
|
||||
"CheckMessage.zbase": 2
|
||||
},
|
||||
"CheckmessageResponse": {
|
||||
"CheckMessage.pubkey": 2,
|
||||
"CheckMessage.verified": 1
|
||||
},
|
||||
"CloseRequest": {
|
||||
"Close.destination": 3,
|
||||
"Close.fee_negotiation_step": 4,
|
||||
"Close.force_lease_closed": 6,
|
||||
"Close.id": 1,
|
||||
"Close.unilateraltimeout": 2,
|
||||
"Close.wrong_funding": 5
|
||||
},
|
||||
"CloseResponse": {
|
||||
"Close.tx": 2,
|
||||
"Close.txid": 3,
|
||||
"Close.type": 1
|
||||
},
|
||||
"ConnectAddress": {
|
||||
"Connect.address.address": 3,
|
||||
"Connect.address.port": 4,
|
||||
"Connect.address.socket": 2,
|
||||
"Connect.address.type": 1
|
||||
},
|
||||
"ConnectRequest": {
|
||||
"Connect.host": 2,
|
||||
"Connect.id": 1,
|
||||
"Connect.port": 3
|
||||
},
|
||||
"ConnectResponse": {
|
||||
"Connect.address": 4,
|
||||
"Connect.direction": 3,
|
||||
"Connect.features": 2,
|
||||
"Connect.id": 1
|
||||
},
|
||||
"DatastoreRequest": {
|
||||
"Datastore.generation": 4,
|
||||
"Datastore.hex": 2,
|
||||
"Datastore.key[]": 1,
|
||||
"Datastore.mode": 3
|
||||
},
|
||||
"DatastoreResponse": {
|
||||
"Datastore.generation": 2,
|
||||
"Datastore.hex": 3,
|
||||
"Datastore.key[]": 1,
|
||||
"Datastore.string": 4
|
||||
},
|
||||
"DeldatastoreRequest": {
|
||||
"DelDatastore.generation": 2,
|
||||
"DelDatastore.key[]": 1
|
||||
},
|
||||
"DeldatastoreResponse": {
|
||||
"DelDatastore.generation": 2,
|
||||
"DelDatastore.hex": 3,
|
||||
"DelDatastore.key[]": 1,
|
||||
"DelDatastore.string": 4
|
||||
},
|
||||
"GetinfoAddress": {
|
||||
"Getinfo.address[].address": 3,
|
||||
"Getinfo.address[].port": 2,
|
||||
"Getinfo.address[].type": 1
|
||||
},
|
||||
"GetinfoBinding": {
|
||||
"Getinfo.binding[].address": 2,
|
||||
"Getinfo.binding[].port": 3,
|
||||
"Getinfo.binding[].socket": 4,
|
||||
"Getinfo.binding[].type": 1
|
||||
},
|
||||
"GetinfoOur_features": {
|
||||
"Getinfo.our_features.channel": 3,
|
||||
"Getinfo.our_features.init": 1,
|
||||
"Getinfo.our_features.invoice": 4,
|
||||
"Getinfo.our_features.node": 2
|
||||
},
|
||||
"GetinfoResponse": {
|
||||
"Getinfo.address[]": 14,
|
||||
"Getinfo.alias": 2,
|
||||
"Getinfo.binding[]": 15,
|
||||
"Getinfo.blockheight": 11,
|
||||
"Getinfo.color": 3,
|
||||
"Getinfo.fees_collected_msat": 13,
|
||||
"Getinfo.id": 1,
|
||||
"Getinfo.lightning-dir": 9,
|
||||
"Getinfo.network": 12,
|
||||
"Getinfo.num_active_channels": 6,
|
||||
"Getinfo.num_inactive_channels": 7,
|
||||
"Getinfo.num_peers": 4,
|
||||
"Getinfo.num_pending_channels": 5,
|
||||
"Getinfo.our_features": 10,
|
||||
"Getinfo.version": 8,
|
||||
"Getinfo.warning_bitcoind_sync": 16,
|
||||
"Getinfo.warning_lightningd_sync": 17
|
||||
},
|
||||
"ListchannelsChannels": {
|
||||
"ListChannels.channels[].active": 8,
|
||||
"ListChannels.channels[].amount_msat": 5,
|
||||
"ListChannels.channels[].base_fee_millisatoshi": 10,
|
||||
"ListChannels.channels[].channel_flags": 7,
|
||||
"ListChannels.channels[].delay": 12,
|
||||
"ListChannels.channels[].destination": 2,
|
||||
"ListChannels.channels[].features": 15,
|
||||
"ListChannels.channels[].fee_per_millionth": 11,
|
||||
"ListChannels.channels[].htlc_maximum_msat": 14,
|
||||
"ListChannels.channels[].htlc_minimum_msat": 13,
|
||||
"ListChannels.channels[].last_update": 9,
|
||||
"ListChannels.channels[].message_flags": 6,
|
||||
"ListChannels.channels[].public": 4,
|
||||
"ListChannels.channels[].short_channel_id": 3,
|
||||
"ListChannels.channels[].source": 1
|
||||
},
|
||||
"ListchannelsRequest": {
|
||||
"ListChannels.destination": 3,
|
||||
"ListChannels.short_channel_id": 1,
|
||||
"ListChannels.source": 2
|
||||
},
|
||||
"ListchannelsResponse": {
|
||||
"ListChannels.channels[]": 1
|
||||
},
|
||||
"ListdatastoreDatastore": {
|
||||
"ListDatastore.datastore[].generation": 2,
|
||||
"ListDatastore.datastore[].hex": 3,
|
||||
"ListDatastore.datastore[].key[]": 1,
|
||||
"ListDatastore.datastore[].string": 4
|
||||
},
|
||||
"ListdatastoreRequest": {
|
||||
"ListDatastore.key[]": 1
|
||||
},
|
||||
"ListdatastoreResponse": {
|
||||
"ListDatastore.datastore[]": 1
|
||||
},
|
||||
"ListfundsChannels": {
|
||||
"ListFunds.channels[].amount_msat": 3,
|
||||
"ListFunds.channels[].connected": 6,
|
||||
"ListFunds.channels[].funding_output": 5,
|
||||
"ListFunds.channels[].funding_txid": 4,
|
||||
"ListFunds.channels[].our_amount_msat": 2,
|
||||
"ListFunds.channels[].peer_id": 1,
|
||||
"ListFunds.channels[].short_channel_id": 8,
|
||||
"ListFunds.channels[].state": 7
|
||||
},
|
||||
"ListfundsOutputs": {
|
||||
"ListFunds.outputs[].address": 5,
|
||||
"ListFunds.outputs[].amount_msat": 3,
|
||||
"ListFunds.outputs[].blockheight": 8,
|
||||
"ListFunds.outputs[].output": 2,
|
||||
"ListFunds.outputs[].redeemscript": 6,
|
||||
"ListFunds.outputs[].scriptpubkey": 4,
|
||||
"ListFunds.outputs[].status": 7,
|
||||
"ListFunds.outputs[].txid": 1
|
||||
},
|
||||
"ListfundsRequest": {
|
||||
"ListFunds.spent": 1
|
||||
},
|
||||
"ListfundsResponse": {
|
||||
"ListFunds.channels[]": 2,
|
||||
"ListFunds.outputs[]": 1
|
||||
},
|
||||
"ListpeersPeers": {
|
||||
"ListPeers.peers[].channels[]": 4,
|
||||
"ListPeers.peers[].connected": 2,
|
||||
"ListPeers.peers[].features": 6,
|
||||
"ListPeers.peers[].id": 1,
|
||||
"ListPeers.peers[].log[]": 3,
|
||||
"ListPeers.peers[].netaddr[]": 5
|
||||
},
|
||||
"ListpeersPeersChannels": {
|
||||
"ListPeers.peers[].channels[].channel_id": 6,
|
||||
"ListPeers.peers[].channels[].close_to": 14,
|
||||
"ListPeers.peers[].channels[].close_to_addr": 47,
|
||||
"ListPeers.peers[].channels[].closer": 17,
|
||||
"ListPeers.peers[].channels[].dust_limit_msat": 26,
|
||||
"ListPeers.peers[].channels[].features[]": 18,
|
||||
"ListPeers.peers[].channels[].fee_base_msat": 24,
|
||||
"ListPeers.peers[].channels[].fee_proportional_millionths": 25,
|
||||
"ListPeers.peers[].channels[].feerate": 3,
|
||||
"ListPeers.peers[].channels[].funding": 19,
|
||||
"ListPeers.peers[].channels[].funding_outnum": 8,
|
||||
"ListPeers.peers[].channels[].funding_txid": 7,
|
||||
"ListPeers.peers[].channels[].htlcs[]": 46,
|
||||
"ListPeers.peers[].channels[].in_fulfilled_msat": 41,
|
||||
"ListPeers.peers[].channels[].in_offered_msat": 39,
|
||||
"ListPeers.peers[].channels[].in_payments_fulfilled": 40,
|
||||
"ListPeers.peers[].channels[].in_payments_offered": 38,
|
||||
"ListPeers.peers[].channels[].inflight[]": 13,
|
||||
"ListPeers.peers[].channels[].initial_feerate": 9,
|
||||
"ListPeers.peers[].channels[].last_feerate": 10,
|
||||
"ListPeers.peers[].channels[].max_accepted_htlcs": 35,
|
||||
"ListPeers.peers[].channels[].max_to_us_msat": 22,
|
||||
"ListPeers.peers[].channels[].max_total_htlc_in_msat": 27,
|
||||
"ListPeers.peers[].channels[].min_to_us_msat": 21,
|
||||
"ListPeers.peers[].channels[].minimum_htlc_in_msat": 32,
|
||||
"ListPeers.peers[].channels[].next_fee_step": 12,
|
||||
"ListPeers.peers[].channels[].next_feerate": 11,
|
||||
"ListPeers.peers[].channels[].opener": 16,
|
||||
"ListPeers.peers[].channels[].our_reserve_msat": 29,
|
||||
"ListPeers.peers[].channels[].our_to_self_delay": 34,
|
||||
"ListPeers.peers[].channels[].out_fulfilled_msat": 45,
|
||||
"ListPeers.peers[].channels[].out_offered_msat": 43,
|
||||
"ListPeers.peers[].channels[].out_payments_fulfilled": 44,
|
||||
"ListPeers.peers[].channels[].out_payments_offered": 42,
|
||||
"ListPeers.peers[].channels[].owner": 4,
|
||||
"ListPeers.peers[].channels[].private": 15,
|
||||
"ListPeers.peers[].channels[].receivable_msat": 31,
|
||||
"ListPeers.peers[].channels[].scratch_txid": 2,
|
||||
"ListPeers.peers[].channels[].short_channel_id": 5,
|
||||
"ListPeers.peers[].channels[].spendable_msat": 30,
|
||||
"ListPeers.peers[].channels[].state": 1,
|
||||
"ListPeers.peers[].channels[].state_changes[]": 36,
|
||||
"ListPeers.peers[].channels[].status[]": 37,
|
||||
"ListPeers.peers[].channels[].their_reserve_msat": 28,
|
||||
"ListPeers.peers[].channels[].their_to_self_delay": 33,
|
||||
"ListPeers.peers[].channels[].to_us_msat": 20,
|
||||
"ListPeers.peers[].channels[].total_msat": 23
|
||||
},
|
||||
"ListpeersPeersChannelsFeerate": {
|
||||
"ListPeers.peers[].channels[].feerate.perkb": 2,
|
||||
"ListPeers.peers[].channels[].feerate.perkw": 1
|
||||
},
|
||||
"ListpeersPeersChannelsFunding": {
|
||||
"ListPeers.peers[].channels[].funding.local_msat": 1,
|
||||
"ListPeers.peers[].channels[].funding.pushed_msat": 3,
|
||||
"ListPeers.peers[].channels[].funding.remote_msat": 2
|
||||
},
|
||||
"ListpeersPeersChannelsHtlcs": {
|
||||
"ListPeers.peers[].channels[].htlcs[].amount_msat": 3,
|
||||
"ListPeers.peers[].channels[].htlcs[].direction": 1,
|
||||
"ListPeers.peers[].channels[].htlcs[].expiry": 4,
|
||||
"ListPeers.peers[].channels[].htlcs[].id": 2,
|
||||
"ListPeers.peers[].channels[].htlcs[].local_trimmed": 6,
|
||||
"ListPeers.peers[].channels[].htlcs[].payment_hash": 5,
|
||||
"ListPeers.peers[].channels[].htlcs[].state": 8,
|
||||
"ListPeers.peers[].channels[].htlcs[].status": 7
|
||||
},
|
||||
"ListpeersPeersChannelsInflight": {
|
||||
"ListPeers.peers[].channels[].inflight[].feerate": 3,
|
||||
"ListPeers.peers[].channels[].inflight[].funding_outnum": 2,
|
||||
"ListPeers.peers[].channels[].inflight[].funding_txid": 1,
|
||||
"ListPeers.peers[].channels[].inflight[].our_funding_msat": 5,
|
||||
"ListPeers.peers[].channels[].inflight[].scratch_txid": 6,
|
||||
"ListPeers.peers[].channels[].inflight[].total_funding_msat": 4
|
||||
},
|
||||
"ListpeersPeersLog": {
|
||||
"ListPeers.peers[].log[].data": 7,
|
||||
"ListPeers.peers[].log[].log": 5,
|
||||
"ListPeers.peers[].log[].node_id": 6,
|
||||
"ListPeers.peers[].log[].num_skipped": 2,
|
||||
"ListPeers.peers[].log[].source": 4,
|
||||
"ListPeers.peers[].log[].time": 3,
|
||||
"ListPeers.peers[].log[].type": 1
|
||||
},
|
||||
"ListpeersRequest": {
|
||||
"ListPeers.id": 1,
|
||||
"ListPeers.level": 2
|
||||
},
|
||||
"ListpeersResponse": {
|
||||
"ListPeers.peers[]": 1
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -8,8 +8,8 @@ impl From<JAmount> for Amount {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Amount> for JAmount {
|
||||
fn from(a: Amount) -> Self {
|
||||
JAmount::from_msat(a.msat)
|
||||
impl From<&Amount> for JAmount {
|
||||
fn from(a: &Amount) -> Self {
|
||||
JAmount::from_msat(a.msat)
|
||||
}
|
||||
}
|
||||
|
@ -296,4 +296,94 @@ async fn connect_peer(
|
||||
|
||||
}
|
||||
|
||||
async fn datastore(
|
||||
&self,
|
||||
request: tonic::Request<pb::DatastoreRequest>,
|
||||
) -> Result<tonic::Response<pb::DatastoreResponse>, tonic::Status> {
|
||||
let req = request.into_inner();
|
||||
let req: requests::DatastoreRequest = (&req).into();
|
||||
debug!("Client asked for getinfo");
|
||||
let mut rpc = ClnRpc::new(&self.rpc_path)
|
||||
.await
|
||||
.map_err(|e| Status::new(Code::Internal, e.to_string()))?;
|
||||
let result = rpc.call(Request::Datastore(req))
|
||||
.await
|
||||
.map_err(|e| Status::new(
|
||||
Code::Unknown,
|
||||
format!("Error calling method Datastore: {:?}", e)))?;
|
||||
match result {
|
||||
Response::Datastore(r) => Ok(
|
||||
tonic::Response::new((&r).into())
|
||||
),
|
||||
r => Err(Status::new(
|
||||
Code::Internal,
|
||||
format!(
|
||||
"Unexpected result {:?} to method call Datastore",
|
||||
r
|
||||
)
|
||||
)),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async fn del_datastore(
|
||||
&self,
|
||||
request: tonic::Request<pb::DeldatastoreRequest>,
|
||||
) -> Result<tonic::Response<pb::DeldatastoreResponse>, tonic::Status> {
|
||||
let req = request.into_inner();
|
||||
let req: requests::DeldatastoreRequest = (&req).into();
|
||||
debug!("Client asked for getinfo");
|
||||
let mut rpc = ClnRpc::new(&self.rpc_path)
|
||||
.await
|
||||
.map_err(|e| Status::new(Code::Internal, e.to_string()))?;
|
||||
let result = rpc.call(Request::DelDatastore(req))
|
||||
.await
|
||||
.map_err(|e| Status::new(
|
||||
Code::Unknown,
|
||||
format!("Error calling method DelDatastore: {:?}", e)))?;
|
||||
match result {
|
||||
Response::DelDatastore(r) => Ok(
|
||||
tonic::Response::new((&r).into())
|
||||
),
|
||||
r => Err(Status::new(
|
||||
Code::Internal,
|
||||
format!(
|
||||
"Unexpected result {:?} to method call DelDatastore",
|
||||
r
|
||||
)
|
||||
)),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async fn list_datastore(
|
||||
&self,
|
||||
request: tonic::Request<pb::ListdatastoreRequest>,
|
||||
) -> Result<tonic::Response<pb::ListdatastoreResponse>, tonic::Status> {
|
||||
let req = request.into_inner();
|
||||
let req: requests::ListdatastoreRequest = (&req).into();
|
||||
debug!("Client asked for getinfo");
|
||||
let mut rpc = ClnRpc::new(&self.rpc_path)
|
||||
.await
|
||||
.map_err(|e| Status::new(Code::Internal, e.to_string()))?;
|
||||
let result = rpc.call(Request::ListDatastore(req))
|
||||
.await
|
||||
.map_err(|e| Status::new(
|
||||
Code::Unknown,
|
||||
format!("Error calling method ListDatastore: {:?}", e)))?;
|
||||
match result {
|
||||
Response::ListDatastore(r) => Ok(
|
||||
tonic::Response::new((&r).into())
|
||||
),
|
||||
r => Err(Status::new(
|
||||
Code::Internal,
|
||||
format!(
|
||||
"Unexpected result {:?} to method call ListDatastore",
|
||||
r
|
||||
)
|
||||
)),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Binary file not shown.
@ -53,10 +53,10 @@ def load_jsonrpc_service():
|
||||
"Connect",
|
||||
# "createinvoice",
|
||||
# "createonion",
|
||||
# "datastore",
|
||||
"Datastore",
|
||||
# "decodepay",
|
||||
# "decode",
|
||||
# "deldatastore",
|
||||
"DelDatastore",
|
||||
# "delexpiredinvoice",
|
||||
# "delinvoice",
|
||||
# "delpay",
|
||||
@ -79,7 +79,7 @@ def load_jsonrpc_service():
|
||||
# "keysend",
|
||||
# "listchannels",
|
||||
# "listconfigs",
|
||||
# "listdatastore",
|
||||
"ListDatastore",
|
||||
# "listforwards",
|
||||
# "listfunds",
|
||||
# "listinvoices",
|
||||
|
35
doc/schemas/datastore.request.json
Normal file
35
doc/schemas/datastore.request.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"key"
|
||||
],
|
||||
"properties": {
|
||||
"key": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"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 “must-replace” or “must-append”."
|
||||
}
|
||||
}
|
||||
}
|
20
doc/schemas/deldatastore.request.json
Normal file
20
doc/schemas/deldatastore.request.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"key"
|
||||
],
|
||||
"properties": {
|
||||
"key": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"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 “must-replace” or “must-append”."
|
||||
}
|
||||
}
|
||||
}
|
16
doc/schemas/listdatastore.request.json
Normal file
16
doc/schemas/listdatastore.request.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"key"
|
||||
],
|
||||
"properties": {
|
||||
"key": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user