Skip to content

Commit

Permalink
gogo protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
gohumble committed May 7, 2024
1 parent 624416c commit 9acdc74
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 29 deletions.
7 changes: 1 addition & 6 deletions buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,5 @@ deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 74015a8aeb8445aa9e3e1454cb54bc35
commit: 14bdc09318b24694992b8c84f63e3681
digest: shake256:7149cf5e9955c692d381e557830555d4e93f205a0f1b8e2dfdae46d029369aa3fc1980e35df0d310f7cc3b622f93e19ad276769a283a967dd3065ddfd3a40e13
- remote: buf.build
owner: srikrsna
repository: protoc-gen-gotag
commit: 7a85d3ad2e7642c198480e92bf730c14
digest: shake256:059f136681cd47abe2d6e83d20b9594071c481572d16cebfafbc81ba3d3e7924aef6974f99da53d67a01d033e30b7bf57985a206b4e856fc82508545de84a70c
1 change: 0 additions & 1 deletion buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ lint:
- DEFAULT
deps:
- buf.build/googleapis/googleapis
- buf.build/srikrsna/protoc-gen-gotag
- buf.build/gogo/protobuf
2 changes: 1 addition & 1 deletion cashu.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";

package cashu.v1;
option go_package = "github.com/cashu/rpc/cashu";
option go_package = "gen/go/cashurpc";

import "keys.proto";
import "swap.proto";
Expand Down
2 changes: 1 addition & 1 deletion info.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package cashu.v1;
import "mint.proto";
option go_package = "github.com/cashu/rpc/info";
option go_package = "gen/go/cashurpc";

enum MethodType {
method_unspecified = 0;
Expand Down
5 changes: 2 additions & 3 deletions keys.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
syntax = "proto3";
import "tagger/tagger.proto";
package cashu.v1;
option go_package = "github.com/cashu/rpc/keys";
option go_package = "gen/go/cashurpc";


message KeysResponse{
repeated Keyset keysets = 1 [(tagger.tags) = "json:\"keysets\""];
repeated Keyset keysets = 1;
}
message KeysRequest{

Expand Down
2 changes: 1 addition & 1 deletion melt.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ syntax = "proto3";
import "mint.proto";
import "proofs.proto";
package cashu.v1;
option go_package = "github.com/cashu/rpc/melt";
option go_package = "gen/go/cashurpc";

message GetQuoteBolt11StateRequest {
string quote_id = 1;
Expand Down
2 changes: 1 addition & 1 deletion message.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";
package cashu.v1;
option go_package = "github.com/cashu/rpc/message";
option go_package = "gen/go/cashurpc";

message BlindedMessage {
uint64 amount = 1;
Expand Down
15 changes: 7 additions & 8 deletions mint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ syntax = "proto3";

import "message.proto";
import "signature.proto";
import "tagger/tagger.proto";
import "gogoproto/gogo.proto";
package cashu.v1;
option go_package = "github.com/cashu/rpc/mint";
option go_package = "gen/go/cashurpc";


enum UnitType {
Expand All @@ -20,16 +19,16 @@ message PostMintQuoteBolt11Request {
}

message PostMintQuoteBolt11Response {
string quote = 1 [json_name = "quote"];
string request = 2 [json_name = "request"];
bool paid = 3 [json_name = "paid",(gogoproto.jsontag) = "paid"];
int64 expiry = 4 [json_name = "expiry",(gogoproto.jsontag) = "expiry"];
string quote = 1 [(gogoproto.jsontag) = "quotes",(gogoproto.moretags) = "xml=\"dawg\"" ];
string request = 2[(gogoproto.jsontag) = "request"];
bool paid = 3 [(gogoproto.jsontag) = "paid"];
int64 expiry = 4 [(gogoproto.jsontag) = "exp"];
}


message PostMintBolt11Request {
string quote = 1 [(tagger.tags) = "json:\"quote\""];
repeated BlindedMessage outputs = 3 [(tagger.tags) = "json:\"outputs\""];
string quote = 1 ;
repeated BlindedMessage outputs = 3;
}


Expand Down
3 changes: 2 additions & 1 deletion proofs.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
syntax = "proto3";

package cashu.v1;
option go_package = "github.com/cashu/rpc/proofs";
option go_package = "gen/go/cashurpc";

message Proof {
uint64 amount = 1;
string id = 2;
Expand Down
2 changes: 1 addition & 1 deletion signature.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";
package cashu.v1;
option go_package = "github.com/cashu/rpc/signature";
option go_package = "gen/go/cashurpc";

message BlindedSignature {
string id = 1;
Expand Down
2 changes: 1 addition & 1 deletion state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "message.proto";
import "signature.proto";

package cashu.v1;
option go_package = "github.com/cashu/rpc/state";
option go_package = "gen/go/cashurpc";

message PostCheckStateRequest {
repeated string secrets = 1;
Expand Down
2 changes: 1 addition & 1 deletion swap.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "proofs.proto";
import "message.proto";
import "signature.proto";
package cashu.v1;
option go_package = "github.com/cashu/rpc/swap";
option go_package = "gen/go/cashurpc";

message SwapResponse {
repeated BlindedSignature signatures = 1;
Expand Down
4 changes: 1 addition & 3 deletions token.proto
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
syntax = "proto3";
import "tagger/tagger.proto";


import "proofs.proto";
package cashu.v1;
option go_package = "github.com/cashu/rpc/token";
option go_package = "gen/go/cashurpc";


message TokenV3 {
Expand Down

0 comments on commit 9acdc74

Please sign in to comment.