-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
1,179 additions
and
465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2023-, Edge & Node, GraphOps, and Semiotic Labs. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
fn main() { | ||
println!("cargo:rerun-if-changed=proto"); | ||
tonic_build::configure() | ||
.out_dir("src/proto") | ||
.include_file("mod.rs") | ||
.protoc_arg("--experimental_allow_proto3_optional") | ||
.compile_protos(&["proto/dips.proto"], &["proto"]) | ||
.expect("Failed to compile dips proto(s)"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright 2023-, Edge & Node, GraphOps, and Semiotic Labs. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
syntax = "proto3"; | ||
|
||
package graphprotocol.indexer.dips; | ||
|
||
service AgreementService { | ||
rpc CreateAgreement(CreateAgreementRequest) returns (CreateAgreementResponse); | ||
rpc CancelAgreement(CancelAgreementRequest) returns (AgreementCanellationResponse); | ||
rpc GetAgreementById(GetAgreementByIdRequest) returns (GetAgreementByIdResponse); | ||
rpc GetPrice(PriceRequest) returns (PriceResponse); | ||
} | ||
|
||
message GetAgreementByIdRequest { | ||
|
||
} | ||
|
||
message GetAgreementByIdResponse { | ||
|
||
} | ||
|
||
message CreateAgreementRequest { | ||
string id = 1; | ||
bytes signed_voucher = 2; | ||
} | ||
|
||
message CancelAgreementRequest { | ||
string id = 1; | ||
bytes signed_voucher = 2; | ||
} | ||
|
||
message CreateAgreementResponse { | ||
string uuid = 1; | ||
} | ||
|
||
message AgreementCanellationResponse { | ||
string uuid = 1; | ||
} | ||
|
||
message PriceRequest { | ||
ProtocolNetwork protocol = 1; | ||
string chain_id = 2; | ||
} | ||
|
||
message PriceResponse { | ||
optional Price price = 1; | ||
} | ||
|
||
message Price { | ||
string price_per_block = 1; | ||
string chain_id = 2; | ||
ProtocolNetwork protocol = 3; | ||
} | ||
|
||
enum ProtocolNetwork { | ||
UNKNOWN = 0; | ||
EVM = 1; | ||
} |
Oops, something went wrong.