fix linking

This commit is contained in:
boufni95 2024-10-16 16:11:40 +00:00
parent fb17b05441
commit 24e0c67775
10 changed files with 227 additions and 4 deletions

View file

@ -318,14 +318,19 @@ service LightningPub {
option (http_method) = "post";
option (http_route) = "/api/app/mock/blance/set";
}
rpc GetNPubLinkingState(structs.GetNPubLinking) returns (structs.NPubLinking) {
option (auth_type) = "App";
option (http_method) = "post";
option (http_route) = "/api/app/user/npub/token";
}
rpc RequestNPubLinkingToken(structs.RequestNPubLinkingTokenRequest) returns (structs.RequestNPubLinkingTokenResponse) {
option (auth_type) = "App";
option(http_method) = "post";
option (http_method) = "post";
option (http_route) = "/api/app/user/npub/token";
}
rpc ResetNPubLinkingToken(structs.RequestNPubLinkingTokenRequest) returns (structs.RequestNPubLinkingTokenResponse) {
option (auth_type) = "App";
option(http_method) = "post";
option (http_method) = "post";
option (http_route) = "/api/app/user/npub/token/reset";
}
// </App>

View file

@ -441,6 +441,18 @@ message RelaysMigration {
repeated string relays = 1;
}
message GetNPubLinking {
string user_identifier = 1;
}
message NPubLinking {
oneof state {
Empty unlinked = 1;
string linked_npub = 2;
string linking_token = 3;
}
}
message RequestNPubLinkingTokenRequest {
string user_identifier = 1;