Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Generate new protos for registering sidecar endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitalturtle committed Nov 5, 2021
1 parent 2789f80 commit 587fb46
Show file tree
Hide file tree
Showing 7 changed files with 950 additions and 540 deletions.
1,238 changes: 698 additions & 540 deletions lnrpc/lightning.pb.go

Large diffs are not rendered by default.

81 changes: 81 additions & 0 deletions lnrpc/lightning.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions lnrpc/lightning.pb.json.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions lnrpc/lightning.proto
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,16 @@ service Lightning {
*/
rpc SubscribeCustomMessages (SubscribeCustomMessagesRequest)
returns (stream CustomMessage);

/*
RegisterSidecarRequest is step 2/4 of the sidecar negotiation between the
provider (the trader submitting the bid order) and the recipient (the trader
receiving the sidecar channel).
This step must be run by the recipient. The result is a sidecar ticket with
the recipient's node information and channel funding multisig pubkey filled
in. The ticket returned by this call will have the state "registered".
*/
rpc RegisterSidecar (RegisterSidecarRequest) returns (SidecarTicket);
}

message SubscribeCustomMessagesRequest {
Expand Down Expand Up @@ -4357,3 +4367,31 @@ message InterceptFeedback {
*/
bytes replacement_serialized = 3;
}

message SidecarTicket {
/*
The complete sidecar ticket in its string encoded form which is base58
encoded, has a human readable prefix ('sidecar...') and a checksum built in.
The string encoded version will only be used on the trader side of the API.
All requests to the auctioneer expect the ticket to be in its raw, tlv
encoded byte form.
*/
string ticket = 1;
}

message RegisterSidecarRequest {
/*
The sidecar ticket to register and add the node and channel funding
information to. The ticket must be in the state "offered".
*/
string ticket = 1;

/*
If this value is True, then the daemon will attempt to finish negotiating
the details of the sidecar channel automatically in the background. The
progress of the ticket can be monitored using the SidecarState RPC. In
addition, if this flag is set, then this method will _block_ until the
sidecar negotiation either finishes or breaks down.
*/
bool auto_negotiate = 2;
}
55 changes: 55 additions & 0 deletions lnrpc/lightning.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2109,6 +2109,39 @@
]
}
},
"/v1/sidecar/register": {
"post": {
"summary": "RegisterSidecarRequest is step 2/4 of the sidecar negotiation between the\nprovider (the trader submitting the bid order) and the recipient (the trader\nreceiving the sidecar channel).\nThis step must be run by the recipient. The result is a sidecar ticket with\nthe recipient's node information and channel funding multisig pubkey filled\nin. The ticket returned by this call will have the state \"registered\".",
"operationId": "Lightning_RegisterSidecar",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/lnrpcSidecarTicket"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/lnrpcRegisterSidecarRequest"
}
}
],
"tags": [
"Lightning"
]
}
},
"/v1/signmessage": {
"post": {
"summary": "lncli: `signmessage`\nSignMessage signs a message with this node's private key. The returned\nsignature string is `zbase32` encoded and pubkey recoverable, meaning that\nonly the message digest and signature are needed for verification.",
Expand Down Expand Up @@ -5896,6 +5929,19 @@
}
}
},
"lnrpcRegisterSidecarRequest": {
"type": "object",
"properties": {
"ticket": {
"type": "string",
"description": "The sidecar ticket to register and add the node and channel funding\ninformation to. The ticket must be in the state \"offered\"."
},
"auto_negotiate": {
"type": "boolean",
"description": "If this value is True, then the daemon will attempt to finish negotiating\nthe details of the sidecar channel automatically in the background. The\nprogress of the ticket can be monitored using the SidecarState RPC. In\naddition, if this flag is set, then this method will _block_ until the\nsidecar negotiation either finishes or breaks down."
}
}
},
"lnrpcResolution": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -6296,6 +6342,15 @@
}
}
},
"lnrpcSidecarTicket": {
"type": "object",
"properties": {
"ticket": {
"type": "string",
"description": "The complete sidecar ticket in its string encoded form which is base58\nencoded, has a human readable prefix ('sidecar...') and a checksum built in.\nThe string encoded version will only be used on the trader side of the API.\nAll requests to the auctioneer expect the ticket to be in its raw, tlv\nencoded byte form."
}
}
},
"lnrpcSignMessageRequest": {
"type": "object",
"properties": {
Expand Down
3 changes: 3 additions & 0 deletions lnrpc/lightning.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,6 @@ http:
body: "*"
- selector: lnrpc.Lightning.SubscribeCustomMessages
get: "/v1/custommessage/subscribe"
- selector: lnrpc.Lightning.RegisterSidecar
post: "/v1/sidecar/register"
body: "*"
50 changes: 50 additions & 0 deletions lnrpc/lightning_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 587fb46

Please sign in to comment.