wire localhost screen
This commit is contained in:
parent
671875e67f
commit
c2cab40a2e
21 changed files with 1553 additions and 590 deletions
65
proto/wizard/wizard_methods.proto
Normal file
65
proto/wizard/wizard_methods.proto
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package wizard_methods;
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
import "wizard_structs.proto";
|
||||
|
||||
option go_package = "github.com/shocknet/lightning.pub";
|
||||
option (file_options) = {
|
||||
supported_http_methods:["post", "get"];
|
||||
supported_auths:{
|
||||
id: "guest"
|
||||
name: "Guest"
|
||||
context:[]
|
||||
};
|
||||
};
|
||||
|
||||
message MethodQueryOptions {
|
||||
repeated string items = 1;
|
||||
}
|
||||
|
||||
extend google.protobuf.MethodOptions { // TODO: move this stuff to dep repo?
|
||||
string auth_type = 50003;
|
||||
string http_method = 50004;
|
||||
string http_route = 50005;
|
||||
MethodQueryOptions query = 50006;
|
||||
bool nostr = 50007;
|
||||
bool batch = 50008;
|
||||
|
||||
}
|
||||
|
||||
message ProtoFileOptions {
|
||||
message SupportedAuth {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
bool encrypted = 3;
|
||||
map<string,string> context = 4;
|
||||
}
|
||||
repeated SupportedAuth supported_auths = 1;
|
||||
repeated string supported_http_methods = 2;
|
||||
}
|
||||
|
||||
extend google.protobuf.FileOptions {
|
||||
ProtoFileOptions file_options = 50004;
|
||||
}
|
||||
|
||||
service Wizard {
|
||||
// <Guest>
|
||||
rpc WizardState(wizard_structs.Empty) returns (wizard_structs.StateResponse){
|
||||
option (auth_type) = "Guest";
|
||||
option (http_method) = "get";
|
||||
option (http_route) = "/wizard/state";
|
||||
};
|
||||
rpc WizardConfig(wizard_structs.ConfigRequest) returns (wizard_structs.ConfigResponse){
|
||||
option (auth_type) = "Guest";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/wizard/config";
|
||||
};
|
||||
rpc WizardConfirm(wizard_structs.ConfirmRequest) returns (wizard_structs.ConfirmResponse){
|
||||
option (auth_type) = "Guest";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/wizard/confirm";
|
||||
};
|
||||
// </Guest>
|
||||
}
|
||||
32
proto/wizard/wizard_structs.proto
Normal file
32
proto/wizard/wizard_structs.proto
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package wizard_structs;
|
||||
|
||||
option go_package = "github.com/shocknet/lightning.pub";
|
||||
|
||||
message Empty {}
|
||||
|
||||
message StateResponse {
|
||||
bool already_initialized = 1;
|
||||
}
|
||||
message ConfigRequest {
|
||||
string source_name = 1;
|
||||
string relay_url = 2;
|
||||
bool automate_liquidity = 3;
|
||||
bool push_backups_to_nostr = 4;
|
||||
}
|
||||
|
||||
|
||||
message ConfigResponse {
|
||||
bool already_initialized = 1;
|
||||
repeated string seed = 2;
|
||||
string confirmation_id = 3;
|
||||
}
|
||||
|
||||
message ConfirmRequest {
|
||||
string confirmation_id = 1;
|
||||
}
|
||||
|
||||
message ConfirmResponse {
|
||||
string admin_key = 1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue