core-lightning/cln-grpc/proto/node.proto

942 lines
22 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package cln;
// This file was automatically derived from the JSON-RPC schemas in
// `doc/schemas`. Do not edit this file manually as it would get
// overwritten.
import "primitives.proto";
service Node {
rpc Getinfo(GetinfoRequest) returns (GetinfoResponse) {}
rpc ListPeers(ListpeersRequest) returns (ListpeersResponse) {}
rpc ListFunds(ListfundsRequest) returns (ListfundsResponse) {}
rpc SendPay(SendpayRequest) returns (SendpayResponse) {}
rpc ListChannels(ListchannelsRequest) returns (ListchannelsResponse) {}
rpc AddGossip(AddgossipRequest) returns (AddgossipResponse) {}
rpc AutoCleanInvoice(AutocleaninvoiceRequest) returns (AutocleaninvoiceResponse) {}
rpc CheckMessage(CheckmessageRequest) returns (CheckmessageResponse) {}
rpc Close(CloseRequest) returns (CloseResponse) {}
2022-01-26 18:42:49 +01:00
rpc ConnectPeer(ConnectRequest) returns (ConnectResponse) {}
2022-04-01 06:12:45 +02:00
rpc CreateInvoice(CreateinvoiceRequest) returns (CreateinvoiceResponse) {}
2022-04-01 06:12:45 +02:00
rpc Datastore(DatastoreRequest) returns (DatastoreResponse) {}
rpc CreateOnion(CreateonionRequest) returns (CreateonionResponse) {}
2022-04-01 06:12:45 +02:00
rpc DelDatastore(DeldatastoreRequest) returns (DeldatastoreResponse) {}
2022-04-01 06:12:45 +02:00
rpc DelExpiredInvoice(DelexpiredinvoiceRequest) returns (DelexpiredinvoiceResponse) {}
rpc DelInvoice(DelinvoiceRequest) returns (DelinvoiceResponse) {}
rpc Invoice(InvoiceRequest) returns (InvoiceResponse) {}
2022-04-01 06:12:45 +02:00
rpc ListDatastore(ListdatastoreRequest) returns (ListdatastoreResponse) {}
2022-04-01 06:12:45 +02:00
rpc ListInvoices(ListinvoicesRequest) returns (ListinvoicesResponse) {}
rpc SendOnion(SendonionRequest) returns (SendonionResponse) {}
rpc ListSendPays(ListsendpaysRequest) returns (ListsendpaysResponse) {}
rpc ListTransactions(ListtransactionsRequest) returns (ListtransactionsResponse) {}
rpc Pay(PayRequest) returns (PayResponse) {}
rpc ListNodes(ListnodesRequest) returns (ListnodesResponse) {}
rpc WaitAnyInvoice(WaitanyinvoiceRequest) returns (WaitanyinvoiceResponse) {}
rpc WaitInvoice(WaitinvoiceRequest) returns (WaitinvoiceResponse) {}
rpc WaitSendPay(WaitsendpayRequest) returns (WaitsendpayResponse) {}
rpc NewAddr(NewaddrRequest) returns (NewaddrResponse) {}
rpc Withdraw(WithdrawRequest) returns (WithdrawResponse) {}
rpc KeySend(KeysendRequest) returns (KeysendResponse) {}
}
message GetinfoRequest {
}
message GetinfoResponse {
bytes id = 1;
string alias = 2;
bytes color = 3;
uint32 num_peers = 4;
uint32 num_pending_channels = 5;
uint32 num_active_channels = 6;
uint32 num_inactive_channels = 7;
string version = 8;
string lightning_dir = 9;
uint32 blockheight = 11;
string network = 12;
Amount fees_collected_msat = 13;
repeated GetinfoAddress address = 14;
repeated GetinfoBinding binding = 15;
optional string warning_bitcoind_sync = 16;
optional string warning_lightningd_sync = 17;
}
message GetinfoOur_features {
bytes init = 1;
bytes node = 2;
bytes channel = 3;
bytes invoice = 4;
}
message GetinfoAddress {
// Getinfo.address[].type
enum GetinfoAddressType {
DNS = 0;
IPV4 = 1;
IPV6 = 2;
TORV2 = 3;
TORV3 = 4;
WEBSOCKET = 5;
}
GetinfoAddressType item_type = 1;
uint32 port = 2;
optional string address = 3;
}
message GetinfoBinding {
// Getinfo.binding[].type
enum GetinfoBindingType {
LOCAL_SOCKET = 0;
IPV4 = 1;
IPV6 = 2;
TORV2 = 3;
TORV3 = 4;
}
GetinfoBindingType item_type = 1;
optional string address = 2;
optional uint32 port = 3;
optional string socket = 4;
}
message ListpeersRequest {
optional bytes id = 1;
optional string level = 2;
}
message ListpeersResponse {
2022-04-01 06:12:45 +02:00
repeated ListpeersPeers peers = 1;
}
message ListpeersPeers {
bytes id = 1;
bool connected = 2;
repeated ListpeersPeersLog log = 3;
repeated ListpeersPeersChannels channels = 4;
repeated string netaddr = 5;
optional bytes features = 6;
}
message ListpeersPeersLog {
// ListPeers.peers[].log[].type
enum ListpeersPeersLogType {
SKIPPED = 0;
BROKEN = 1;
UNUSUAL = 2;
INFO = 3;
DEBUG = 4;
IO_IN = 5;
IO_OUT = 6;
}
ListpeersPeersLogType item_type = 1;
optional uint32 num_skipped = 2;
optional string time = 3;
optional string source = 4;
optional string log = 5;
optional bytes node_id = 6;
optional bytes data = 7;
}
message ListpeersPeersChannels {
// ListPeers.peers[].channels[].state
enum ListpeersPeersChannelsState {
OPENINGD = 0;
CHANNELD_AWAITING_LOCKIN = 1;
CHANNELD_NORMAL = 2;
CHANNELD_SHUTTING_DOWN = 3;
CLOSINGD_SIGEXCHANGE = 4;
CLOSINGD_COMPLETE = 5;
AWAITING_UNILATERAL = 6;
FUNDING_SPEND_SEEN = 7;
ONCHAIN = 8;
DUALOPEND_OPEN_INIT = 9;
DUALOPEND_AWAITING_LOCKIN = 10;
}
ListpeersPeersChannelsState state = 1;
optional bytes scratch_txid = 2;
optional string owner = 4;
optional string short_channel_id = 5;
optional bytes channel_id = 6;
optional bytes funding_txid = 7;
optional uint32 funding_outnum = 8;
optional string initial_feerate = 9;
optional string last_feerate = 10;
optional string next_feerate = 11;
optional uint32 next_fee_step = 12;
repeated ListpeersPeersChannelsInflight inflight = 13;
optional bytes close_to = 14;
optional bool private = 15;
ChannelSide opener = 16;
optional ChannelSide closer = 17;
repeated string features = 18;
optional Amount to_us_msat = 20;
optional Amount min_to_us_msat = 21;
optional Amount max_to_us_msat = 22;
optional Amount total_msat = 23;
optional Amount fee_base_msat = 24;
optional uint32 fee_proportional_millionths = 25;
optional Amount dust_limit_msat = 26;
optional Amount max_total_htlc_in_msat = 27;
optional Amount their_reserve_msat = 28;
optional Amount our_reserve_msat = 29;
optional Amount spendable_msat = 30;
optional Amount receivable_msat = 31;
optional Amount minimum_htlc_in_msat = 32;
optional uint32 their_to_self_delay = 33;
optional uint32 our_to_self_delay = 34;
optional uint32 max_accepted_htlcs = 35;
repeated string status = 37;
optional uint64 in_payments_offered = 38;
optional Amount in_offered_msat = 39;
optional uint64 in_payments_fulfilled = 40;
optional Amount in_fulfilled_msat = 41;
optional uint64 out_payments_offered = 42;
optional Amount out_offered_msat = 43;
optional uint64 out_payments_fulfilled = 44;
optional Amount out_fulfilled_msat = 45;
repeated ListpeersPeersChannelsHtlcs htlcs = 46;
optional string close_to_addr = 47;
}
message ListpeersPeersChannelsFeerate {
uint32 perkw = 1;
uint32 perkb = 2;
}
message ListpeersPeersChannelsInflight {
bytes funding_txid = 1;
uint32 funding_outnum = 2;
string feerate = 3;
Amount total_funding_msat = 4;
Amount our_funding_msat = 5;
bytes scratch_txid = 6;
}
message ListpeersPeersChannelsFunding {
Amount local_msat = 1;
Amount remote_msat = 2;
Amount pushed_msat = 3;
}
message ListpeersPeersChannelsHtlcs {
// ListPeers.peers[].channels[].htlcs[].direction
enum ListpeersPeersChannelsHtlcsDirection {
IN = 0;
OUT = 1;
}
// ListPeers.peers[].channels[].htlcs[].state
enum ListpeersPeersChannelsHtlcsState {
SENT_ADD_HTLC = 0;
SENT_ADD_COMMIT = 1;
RCVD_ADD_REVOCATION = 2;
RCVD_ADD_ACK_COMMIT = 3;
SENT_ADD_ACK_REVOCATION = 4;
RCVD_REMOVE_HTLC = 5;
RCVD_REMOVE_COMMIT = 6;
SENT_REMOVE_REVOCATION = 7;
SENT_REMOVE_ACK_COMMIT = 8;
RCVD_REMOVE_ACK_REVOCATION = 9;
}
ListpeersPeersChannelsHtlcsDirection direction = 1;
uint64 id = 2;
Amount amount_msat = 3;
uint32 expiry = 4;
bytes payment_hash = 5;
optional bool local_trimmed = 6;
optional string status = 7;
ListpeersPeersChannelsHtlcsState state = 8;
}
message ListfundsRequest {
optional bool spent = 1;
}
message ListfundsResponse {
2022-04-01 06:12:45 +02:00
repeated ListfundsOutputs outputs = 1;
repeated ListfundsChannels channels = 2;
}
message ListfundsOutputs {
// ListFunds.outputs[].status
enum ListfundsOutputsStatus {
UNCONFIRMED = 0;
CONFIRMED = 1;
SPENT = 2;
}
bytes txid = 1;
uint32 output = 2;
Amount amount_msat = 3;
bytes scriptpubkey = 4;
optional string address = 5;
optional bytes redeemscript = 6;
ListfundsOutputsStatus status = 7;
optional uint32 blockheight = 8;
}
message ListfundsChannels {
bytes peer_id = 1;
Amount our_amount_msat = 2;
Amount amount_msat = 3;
bytes funding_txid = 4;
uint32 funding_output = 5;
bool connected = 6;
ChannelState state = 7;
optional string short_channel_id = 8;
}
message SendpayRequest {
repeated SendpayRoute route = 1;
bytes payment_hash = 2;
optional string label = 3;
optional Amount msatoshi = 4;
optional string bolt11 = 5;
optional bytes payment_secret = 6;
optional uint32 partid = 7;
}
message SendpayResponse {
// SendPay.status
enum SendpayStatus {
PENDING = 0;
COMPLETE = 1;
}
uint64 id = 1;
optional uint64 groupid = 2;
bytes payment_hash = 3;
SendpayStatus status = 4;
optional Amount amount_msat = 5;
optional bytes destination = 6;
uint64 created_at = 7;
Amount amount_sent_msat = 8;
optional string label = 9;
optional uint64 partid = 10;
optional string bolt11 = 11;
optional string bolt12 = 12;
optional bytes payment_preimage = 13;
optional string message = 14;
}
message SendpayRoute {
Amount msatoshi = 1;
bytes id = 2;
uint32 delay = 3;
string channel = 4;
}
message ListchannelsRequest {
optional string short_channel_id = 1;
optional bytes source = 2;
optional bytes destination = 3;
}
message ListchannelsResponse {
2022-04-01 06:12:45 +02:00
repeated ListchannelsChannels channels = 1;
}
message ListchannelsChannels {
bytes source = 1;
bytes destination = 2;
string short_channel_id = 3;
bool public = 4;
Amount amount_msat = 5;
uint32 message_flags = 6;
uint32 channel_flags = 7;
bool active = 8;
uint32 last_update = 9;
uint32 base_fee_millisatoshi = 10;
uint32 fee_per_millionth = 11;
uint32 delay = 12;
Amount htlc_minimum_msat = 13;
optional Amount htlc_maximum_msat = 14;
bytes features = 15;
}
message AddgossipRequest {
bytes message = 1;
}
message AddgossipResponse {
}
message AutocleaninvoiceRequest {
optional uint64 expired_by = 1;
optional uint64 cycle_seconds = 2;
}
message AutocleaninvoiceResponse {
2022-04-01 06:12:45 +02:00
bool enabled = 1;
optional uint64 expired_by = 2;
optional uint64 cycle_seconds = 3;
}
message CheckmessageRequest {
string message = 1;
string zbase = 2;
optional bytes pubkey = 3;
}
message CheckmessageResponse {
2022-04-01 06:12:45 +02:00
bool verified = 1;
optional bytes pubkey = 2;
}
message CloseRequest {
bytes id = 1;
optional uint32 unilateraltimeout = 2;
optional string destination = 3;
optional string fee_negotiation_step = 4;
optional bytes wrong_funding = 5;
optional bool force_lease_closed = 6;
}
message CloseResponse {
// Close.type
enum CloseType {
MUTUAL = 0;
UNILATERAL = 1;
UNOPENED = 2;
}
2022-04-01 06:12:45 +02:00
CloseType item_type = 1;
optional bytes tx = 2;
optional bytes txid = 3;
}
2022-01-26 18:42:49 +01:00
message ConnectRequest {
bytes id = 1;
optional string host = 2;
optional uint32 port = 3;
}
message ConnectResponse {
// Connect.direction
enum ConnectDirection {
IN = 0;
OUT = 1;
}
bytes id = 1;
bytes features = 2;
ConnectDirection direction = 3;
}
message ConnectAddress {
// Connect.address.type
enum ConnectAddressType {
LOCAL_SOCKET = 0;
IPV4 = 1;
IPV6 = 2;
TORV2 = 3;
TORV3 = 4;
}
ConnectAddressType item_type = 1;
optional string socket = 2;
optional string address = 3;
optional uint32 port = 4;
}
2022-04-01 06:12:45 +02:00
2022-04-01 06:12:45 +02:00
message CreateinvoiceRequest {
string invstring = 1;
string label = 2;
bytes preimage = 3;
}
message CreateinvoiceResponse {
// CreateInvoice.status
enum CreateinvoiceStatus {
PAID = 0;
EXPIRED = 1;
UNPAID = 2;
}
string label = 1;
optional string bolt11 = 2;
optional string bolt12 = 3;
bytes payment_hash = 4;
optional Amount amount_msat = 5;
CreateinvoiceStatus status = 6;
string description = 7;
uint64 expires_at = 8;
optional uint64 pay_index = 9;
optional Amount amount_received_msat = 10;
optional uint64 paid_at = 11;
optional bytes payment_preimage = 12;
optional bytes local_offer_id = 13;
optional string payer_note = 14;
}
2022-04-01 06:12:45 +02:00
message DatastoreRequest {
// Datastore.mode
enum DatastoreMode {
MUST_CREATE = 0;
MUST_REPLACE = 1;
CREATE_OR_REPLACE = 2;
MUST_APPEND = 3;
CREATE_OR_APPEND = 4;
}
repeated string key = 1;
optional bytes hex = 2;
optional DatastoreMode mode = 3;
optional uint64 generation = 4;
}
message DatastoreResponse {
repeated string key = 1;
optional uint64 generation = 2;
optional bytes hex = 3;
optional string string = 4;
}
message CreateonionRequest {
repeated CreateonionHops hops = 1;
bytes assocdata = 2;
optional bytes session_key = 3;
optional uint32 onion_size = 4;
}
message CreateonionResponse {
bytes onion = 1;
repeated bytes shared_secrets = 2;
}
message CreateonionHops {
bytes pubkey = 1;
bytes payload = 2;
}
2022-04-01 06:12:45 +02:00
message DeldatastoreRequest {
repeated string key = 1;
optional uint64 generation = 2;
}
message DeldatastoreResponse {
repeated string key = 1;
optional uint64 generation = 2;
optional bytes hex = 3;
optional string string = 4;
}
2022-04-01 06:12:45 +02:00
message DelexpiredinvoiceRequest {
uint32 maxexpirytime = 1;
}
message DelexpiredinvoiceResponse {
}
message DelinvoiceRequest {
// DelInvoice.status
enum DelinvoiceStatus {
PAID = 0;
EXPIRED = 1;
UNPAID = 2;
}
string label = 1;
DelinvoiceStatus status = 2;
}
message DelinvoiceResponse {
// DelInvoice.status
enum DelinvoiceStatus {
PAID = 0;
EXPIRED = 1;
UNPAID = 2;
}
string label = 1;
optional string bolt11 = 2;
optional string bolt12 = 3;
optional Amount amount_msat = 4;
optional string description = 5;
bytes payment_hash = 6;
DelinvoiceStatus status = 7;
uint64 expires_at = 8;
optional bytes local_offer_id = 9;
optional string payer_note = 10;
}
message InvoiceRequest {
Amount msatoshi = 1;
string description = 2;
string label = 3;
repeated string fallbacks = 4;
optional bytes preimage = 5;
optional uint32 cltv = 6;
}
message InvoiceResponse {
string bolt11 = 1;
bytes payment_hash = 2;
bytes payment_secret = 3;
uint64 expires_at = 4;
optional string warning_capacity = 5;
optional string warning_offline = 6;
optional string warning_deadends = 7;
optional string warning_private_unused = 8;
optional string warning_mpp = 9;
}
2022-04-01 06:12:45 +02:00
message ListdatastoreRequest {
repeated string key = 1;
}
message ListdatastoreResponse {
repeated ListdatastoreDatastore datastore = 1;
}
message ListdatastoreDatastore {
repeated string key = 1;
optional uint64 generation = 2;
optional bytes hex = 3;
optional string string = 4;
}
2022-04-01 06:12:45 +02:00
message ListinvoicesRequest {
optional string label = 1;
optional string invstring = 2;
optional bytes payment_hash = 3;
optional string offer_id = 4;
}
message ListinvoicesResponse {
repeated ListinvoicesInvoices invoices = 1;
}
message ListinvoicesInvoices {
// ListInvoices.invoices[].status
enum ListinvoicesInvoicesStatus {
UNPAID = 0;
PAID = 1;
EXPIRED = 2;
}
string label = 1;
string description = 2;
bytes payment_hash = 3;
ListinvoicesInvoicesStatus status = 4;
uint64 expires_at = 5;
optional Amount amount_msat = 6;
optional string bolt11 = 7;
optional string bolt12 = 8;
optional bytes local_offer_id = 9;
optional string payer_note = 10;
optional uint64 pay_index = 11;
optional Amount amount_received_msat = 12;
optional uint64 paid_at = 13;
optional bytes payment_preimage = 14;
}
message SendonionRequest {
bytes onion = 1;
}
message SendonionResponse {
// SendOnion.status
enum SendonionStatus {
PENDING = 0;
COMPLETE = 1;
}
uint64 id = 1;
bytes payment_hash = 2;
SendonionStatus status = 3;
optional Amount amount_msat = 4;
optional bytes destination = 5;
uint64 created_at = 6;
Amount amount_sent_msat = 7;
optional string label = 8;
optional string bolt11 = 9;
optional string bolt12 = 10;
optional bytes payment_preimage = 11;
optional string message = 12;
}
message SendonionFirst_hop {
bytes id = 1;
Amount amount_msat = 2;
uint32 delay = 3;
}
message ListsendpaysRequest {
// ListSendPays.status
enum ListsendpaysStatus {
PENDING = 0;
COMPLETE = 1;
FAILED = 2;
}
optional string bolt11 = 1;
optional bytes payment_hash = 2;
optional ListsendpaysStatus status = 3;
}
message ListsendpaysResponse {
repeated ListsendpaysPayments payments = 1;
}
message ListsendpaysPayments {
// ListSendPays.payments[].status
enum ListsendpaysPaymentsStatus {
PENDING = 0;
FAILED = 1;
COMPLETE = 2;
}
uint64 id = 1;
optional uint64 groupid = 2;
bytes payment_hash = 3;
ListsendpaysPaymentsStatus status = 4;
optional Amount amount_msat = 5;
optional bytes destination = 6;
uint64 created_at = 7;
Amount amount_sent_msat = 8;
optional string label = 9;
optional string bolt11 = 10;
optional string bolt12 = 11;
optional bytes payment_preimage = 12;
optional bytes erroronion = 13;
}
message ListtransactionsRequest {
}
message ListtransactionsResponse {
repeated ListtransactionsTransactions transactions = 1;
}
message ListtransactionsTransactions {
bytes hash = 1;
bytes rawtx = 2;
uint32 blockheight = 3;
uint32 txindex = 4;
optional string channel = 6;
uint32 locktime = 7;
uint32 version = 8;
repeated ListtransactionsTransactionsInputs inputs = 9;
repeated ListtransactionsTransactionsOutputs outputs = 10;
}
message ListtransactionsTransactionsInputs {
// ListTransactions.transactions[].inputs[].type
enum ListtransactionsTransactionsInputsType {
THEIRS = 0;
DEPOSIT = 1;
WITHDRAW = 2;
CHANNEL_FUNDING = 3;
CHANNEL_MUTUAL_CLOSE = 4;
CHANNEL_UNILATERAL_CLOSE = 5;
CHANNEL_SWEEP = 6;
CHANNEL_HTLC_SUCCESS = 7;
CHANNEL_HTLC_TIMEOUT = 8;
CHANNEL_PENALTY = 9;
CHANNEL_UNILATERAL_CHEAT = 10;
}
bytes txid = 1;
uint32 index = 2;
uint32 sequence = 3;
optional ListtransactionsTransactionsInputsType item_type = 4;
optional string channel = 5;
}
message ListtransactionsTransactionsOutputs {
// ListTransactions.transactions[].outputs[].type
enum ListtransactionsTransactionsOutputsType {
THEIRS = 0;
DEPOSIT = 1;
WITHDRAW = 2;
CHANNEL_FUNDING = 3;
CHANNEL_MUTUAL_CLOSE = 4;
CHANNEL_UNILATERAL_CLOSE = 5;
CHANNEL_SWEEP = 6;
CHANNEL_HTLC_SUCCESS = 7;
CHANNEL_HTLC_TIMEOUT = 8;
CHANNEL_PENALTY = 9;
CHANNEL_UNILATERAL_CHEAT = 10;
}
uint32 index = 1;
Amount msat = 2;
bytes scriptPubKey = 3;
optional ListtransactionsTransactionsOutputsType item_type = 4;
optional string channel = 5;
}
message PayRequest {
string bolt11 = 1;
optional Amount msatoshi = 2;
optional string label = 3;
optional float riskfactor = 8;
optional float maxfeepercent = 4;
optional uint32 retry_for = 5;
optional uint32 maxdelay = 6;
optional float exemptfee = 7;
}
message PayResponse {
// Pay.status
enum PayStatus {
COMPLETE = 0;
PENDING = 1;
FAILED = 2;
}
bytes payment_preimage = 1;
optional bytes destination = 2;
bytes payment_hash = 3;
sint64 created_at = 4;
uint32 parts = 5;
Amount amount_msat = 6;
Amount amount_sent_msat = 7;
optional string warning_partial_completion = 8;
PayStatus status = 9;
}
message ListnodesRequest {
optional bytes id = 1;
}
message ListnodesResponse {
repeated ListnodesNodes nodes = 1;
}
message ListnodesNodes {
bytes nodeid = 1;
optional uint32 last_timestamp = 2;
optional string alias = 3;
optional bytes color = 4;
optional bytes features = 5;
repeated ListnodesNodesAddresses addresses = 6;
}
message ListnodesNodesAddresses {
// ListNodes.nodes[].addresses[].type
enum ListnodesNodesAddressesType {
DNS = 0;
IPV4 = 1;
IPV6 = 2;
TORV2 = 3;
TORV3 = 4;
WEBSOCKET = 5;
}
ListnodesNodesAddressesType item_type = 1;
uint32 port = 2;
optional string address = 3;
}
message WaitanyinvoiceRequest {
optional sint64 lastpay_index = 1;
optional sint64 timeout = 2;
}
message WaitanyinvoiceResponse {
// WaitAnyInvoice.status
enum WaitanyinvoiceStatus {
PAID = 0;
EXPIRED = 1;
}
string label = 1;
string description = 2;
bytes payment_hash = 3;
WaitanyinvoiceStatus status = 4;
uint64 expires_at = 5;
optional Amount amount_msat = 6;
optional string bolt11 = 7;
optional string bolt12 = 8;
optional uint64 pay_index = 9;
optional Amount amount_received_msat = 10;
optional uint64 paid_at = 11;
optional bytes payment_preimage = 12;
}
message WaitinvoiceRequest {
string label = 1;
}
message WaitinvoiceResponse {
// WaitInvoice.status
enum WaitinvoiceStatus {
PAID = 0;
EXPIRED = 1;
}
string label = 1;
string description = 2;
bytes payment_hash = 3;
WaitinvoiceStatus status = 4;
uint64 expires_at = 5;
optional Amount amount_msat = 6;
optional string bolt11 = 7;
optional string bolt12 = 8;
optional uint64 pay_index = 9;
optional Amount amount_received_msat = 10;
optional uint64 paid_at = 11;
optional bytes payment_preimage = 12;
}
message WaitsendpayRequest {
bytes payment_hash = 1;
optional uint32 partid = 2;
optional uint32 timeout = 3;
}
message WaitsendpayResponse {
// WaitSendPay.status
enum WaitsendpayStatus {
COMPLETE = 0;
}
uint64 id = 1;
optional uint64 groupid = 2;
bytes payment_hash = 3;
WaitsendpayStatus status = 4;
optional Amount amount_msat = 5;
optional bytes destination = 6;
uint64 created_at = 7;
Amount amount_sent_msat = 8;
optional string label = 9;
optional uint64 partid = 10;
optional string bolt11 = 11;
optional string bolt12 = 12;
optional bytes payment_preimage = 13;
}
message NewaddrRequest {
// NewAddr.addresstype
enum NewaddrAddresstype {
BECH32 = 0;
P2SH_SEGWIT = 1;
}
optional NewaddrAddresstype addresstype = 1;
}
message NewaddrResponse {
optional string bech32 = 1;
optional string p2sh_segwit = 2;
}
message WithdrawRequest {
bytes destination = 1;
optional Amount satoshi = 2;
optional uint32 minconf = 3;
repeated Utxo utxos = 4;
}
message WithdrawResponse {
bytes tx = 1;
bytes txid = 2;
string psbt = 3;
}
message KeysendRequest {
bytes destination = 1;
Amount msatoshi = 2;
optional string label = 3;
optional float maxfeepercent = 4;
optional sint64 retry_for = 5;
optional sint64 maxdelay = 6;
optional Amount exemptfee = 7;
}
message KeysendResponse {
// KeySend.status
enum KeysendStatus {
COMPLETE = 0;
}
bytes payment_preimage = 1;
optional bytes destination = 2;
bytes payment_hash = 3;
sint64 created_at = 4;
uint32 parts = 5;
Amount amount_msat = 6;
Amount amount_sent_msat = 7;
optional string warning_partial_completion = 8;
KeysendStatus status = 9;
}