├── .github └── workflows │ └── gitleaks.yml ├── .gitignore ├── .gitmodules ├── .pre-commit-config.yaml ├── Cargo.toml ├── LICENSE ├── Makefile ├── PRECOMMIT.md ├── README.md ├── api ├── api.pb.go ├── api.pb.gw.go └── api_grpc.pb.go ├── build.rs ├── common └── common.pb.go ├── go.mod ├── go.sum ├── mev-protos-go ├── auth │ ├── auth.pb.go │ └── auth_grpc.pb.go ├── block │ └── block.pb.go ├── block_engine │ ├── block_engine.pb.go │ └── block_engine_grpc.pb.go ├── bundle │ └── bundle.pb.go ├── packet │ └── packet.pb.go ├── relayer │ ├── relayer.pb.go │ └── relayer_grpc.pb.go ├── searcher │ ├── searcher.pb.go │ └── searcher_grpc.pb.go ├── shared │ └── shared.pb.go ├── shredstream │ ├── shredstream.pb.go │ └── shredstream_grpc.pb.go └── trace_shred │ └── trace_shred.pb.go ├── proto ├── Dockerfile-go ├── Dockerfile-js ├── api.proto ├── common.proto ├── google │ ├── api │ │ ├── annotations.proto │ │ ├── field_behavior.proto │ │ ├── http.proto │ │ ├── httpbody.proto │ │ └── visibility.proto │ └── protobuf │ │ ├── any.proto │ │ ├── api.proto │ │ ├── descriptor.proto │ │ ├── duration.proto │ │ ├── empty.proto │ │ ├── field_mask.proto │ │ ├── source_context.proto │ │ ├── struct.proto │ │ ├── timestamp.proto │ │ ├── type.proto │ │ └── wrappers.proto ├── mev-protos │ ├── README.md │ ├── auth.proto │ ├── block.proto │ ├── block_engine.proto │ ├── bundle.proto │ ├── packet.proto │ ├── relayer.proto │ ├── searcher.proto │ ├── shared.proto │ ├── shredstream.proto │ └── trace_shred.proto └── protoc-gen-openapiv2 │ └── options │ ├── annotations.proto │ └── openapiv2.proto ├── python ├── README.md ├── pyproject.toml ├── requirements.txt └── src │ └── bxsolana_trader_proto │ ├── __init__.py │ ├── api.py │ ├── api │ └── __init__.py │ ├── common.py │ ├── common │ └── __init__.py │ ├── google │ ├── __init__.py │ ├── api.py │ └── api │ │ └── __init__.py │ ├── grpc │ ├── __init__.py │ └── gateway │ │ ├── __init__.py │ │ └── protoc_gen_openapiv2 │ │ ├── __init__.py │ │ ├── options.py │ │ └── options │ │ └── __init__.py │ └── packet.py ├── rust ├── README.md └── lib.rs └── swagger-ui /.github/workflows/gitleaks.yml: -------------------------------------------------------------------------------- 1 | name: gitleaks 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - develop 7 | - main 8 | workflow_dispatch: 9 | schedule: 10 | - cron: "0 4 * * *" 11 | jobs: 12 | scan: 13 | name: gitleaks 14 | runs-on: ubuntu-latest 15 | environment: develop 16 | steps: 17 | - uses: actions/checkout@v4 18 | with: 19 | fetch-depth: 0 20 | - uses: gitleaks/gitleaks-action@v2.3.7 21 | env: 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 23 | GITLEAKS_LICENSE: "${{ secrets.GITLEAKS_LICENSE }}" 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | python/dist 3 | python/build 4 | python/src/bxsolana_trader_proto.egg-info/ 5 | /python/.pypirc 6 | python/.venv 7 | target/ 8 | .venv 9 | .DS_Store 10 | 11 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries 12 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html 13 | Cargo.lock 14 | 15 | # These are backup files generated by rustfmt 16 | **/*.rs.bk 17 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "mev-protos"] 2 | path = mev-protos 3 | url = https://github.com/jito-labs/mev-protos 4 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/gitleaks/gitleaks 3 | rev: v8.21.1 4 | hooks: 5 | - id: gitleaks 6 | name: Detect hardcoded secrets 7 | args: ["detect", "--source=."] 8 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "solana-trader-proto" 3 | version = "0.2.7" 4 | edition = "2021" 5 | authors = ["support@bloxroute.com"] 6 | license = "MIT" 7 | description = "A Solana Trader API protocol implementation." 8 | documentation = "https://docs.bloxroute.com/solana/trader-api-v2" 9 | repository = "https://github.com/bloXroute-Labs/solana-trader-proto" 10 | homepage = "https://bloxroute.com/" 11 | readme = "README.md" 12 | keywords = ["solana", "blockchain", "trader", "grpc", "raydium"] 13 | categories = ["api-bindings"] 14 | include = ["**/*.rs", "Cargo.toml", "Cargo.lock", "README.md", "proto"] 15 | 16 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 17 | 18 | [lib] 19 | path = "rust/lib.rs" 20 | 21 | [dependencies] 22 | tonic = "0.12.3" 23 | prost = "0.13.3" 24 | prost-types = "0.13.3" 25 | serde = "1.0.214" 26 | serde_derive = "1.0.214" 27 | prost-wkt-types = "0.6.0" 28 | base64 = "0.22.1" 29 | regex = "1.11.1" 30 | 31 | [build-dependencies] 32 | tonic-build = "0.12.3" 33 | prost-build = "0.13.3" 34 | serde = "1.0.214" 35 | regex = "1.11.1" 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 bloXroute Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PB_GO_IMAGE_NAME=bloxroute/bdn-protobuf:v3.19.3-go 2 | 3 | .PHONY: all test integration fmt 4 | .PHONY: proto proto-build-gw proto-build-swagger proto-build-api proto-build-common-go 5 | .PHONY: proto-docker proto-docker-push-go proto-docker-build-go proto-docker-push-js proto-docker-build-js 6 | .PHONY: cred-github cred-solana data-accounts environment-dev 7 | 8 | all: clean proto 9 | 10 | clean: 11 | rm -rf js api common 12 | 13 | proto: proto-build-api-go proto-build-common-go proto-build-swagger proto-build-gw proto-build-api-python proto-build-api-rust 14 | 15 | proto-build-gw: 16 | docker run -v $(CURDIR)/api:/go/protobuf/out \ 17 | -v $(CURDIR)/proto:/go/protobuf/in $(PB_GO_IMAGE_NAME) \ 18 | protoc \ 19 | --grpc-gateway_out ../out \ 20 | --grpc-gateway_opt logtostderr=true \ 21 | --grpc-gateway_opt paths=source_relative \ 22 | api.proto 23 | 24 | proto-build-swagger: 25 | docker run -v $(CURDIR)/api:/go/protobuf/out \ 26 | -v $(CURDIR)/proto:/go/protobuf/in $(PB_GO_IMAGE_NAME) \ 27 | protoc --openapiv2_out ../out --openapiv2_opt logtostderr=true api.proto 28 | mv api/api.swagger.json swagger-ui 29 | 30 | proto-build-api-go: 31 | docker run -v $(CURDIR)/api:/go/protobuf/out \ 32 | -v $(CURDIR)/proto:/go/protobuf/in $(PB_GO_IMAGE_NAME) \ 33 | protoc --go_out=../out --go_opt=paths=source_relative --go-grpc_out=../out --go-grpc_opt=paths=source_relative api.proto 34 | 35 | proto-build-api-jito: 36 | docker run -v $(CURDIR)/mev-protos-go:/go/protobuf/out \ 37 | -v $(CURDIR)/proto/mev-protos:/go/protobuf/in $(PB_GO_IMAGE_NAME) \ 38 | protoc --go_out=../out --go_opt=paths=source_relative --go-grpc_out=../out --go-grpc_opt=paths=source_relative auth.proto block.proto block_engine.proto bundle.proto packet.proto relayer.proto searcher.proto shared.proto shredstream.proto trace_shred.proto 39 | 40 | proto-build-api-python: 41 | protoc \ 42 | -I $(CURDIR)/proto \ 43 | --python_betterproto_out=$(CURDIR)/python/src/bxsolana_trader_proto/ \ 44 | $(CURDIR)/proto/api.proto 45 | 46 | proto-build-api-rust: 47 | cargo build 48 | 49 | proto-build-common-go: 50 | docker run -v $(CURDIR)/common:/go/protobuf/out \ 51 | -v $(CURDIR)/proto:/go/protobuf/in $(PB_GO_IMAGE_NAME) \ 52 | protoc --go_out=../out --go_opt=paths=source_relative --go-grpc_out=../out --go-grpc_opt=paths=source_relative common.proto 53 | 54 | proto-docker: proto-docker-build-go proto-docker-build-js proto-docker-push-go proto-docker-push-js 55 | 56 | proto-docker-push-go: 57 | docker push $(PB_GO_IMAGE_NAME) 58 | 59 | proto-docker-build-go: 60 | cd proto && docker build . -f Dockerfile-go -t $(PB_GO_IMAGE_NAME) --platform linux/amd64 61 | 62 | 63 | -------------------------------------------------------------------------------- /PRECOMMIT.md: -------------------------------------------------------------------------------- 1 | # Pre-commit Setup Guide 2 | 3 | ## Overview 4 | 5 | This guide will help you set up `pre-commit` hooks for your project. Pre-commit hooks are useful for automatically running checks before committing code to ensure code quality, security, and consistency. 6 | TechOps has enabled general golang linters and gitleaks which should be enabled on each commit. 7 | 8 | ## Prerequisites 9 | 10 | - Python 3.6 or higher 11 | - `pip` (Python package installer) 12 | - `git` installed and configured 13 | 14 | ## Installation 15 | 16 | To install `pre-commit`, follow these steps: 17 | 18 | 1. **Install pre-commit** 19 | You can install `pre-commit` using `pip`: 20 | 21 | ``` 22 | pip install pre-commit 23 | ``` 24 | 25 | ## Sample Usage 26 | This is a sample run on a basic commit: 27 | ``` 28 | $ git commit -m "add precommit" 29 | Check Yaml...........................................(no files to check)Skipped 30 | Fix End of Files.........................................................Passed 31 | Trim Trailing Whitespace.................................................Passed 32 | Check for added large files..............................................Passed 33 | go fmt...............................................(no files to check)Skipped 34 | go imports...........................................(no files to check)Skipped 35 | golangci-lint........................................(no files to check)Skipped 36 | Detect hardcoded secrets.................................................Passed 37 | ``` 38 | 39 | You can also run `pre-commit` test on all files: 40 | ``` 41 | pre-commit run --all-files 42 | ``` 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Solana Trader Protobuf 2 | 3 | Protobuf definitions for bloXroute's Trader API service. 4 | 5 | In order to build proto files for different sdks, run `make all` 6 | 7 | Refer to python/README.md for building python proto files and uploading the python package -------------------------------------------------------------------------------- /build.rs: -------------------------------------------------------------------------------- 1 | use std::fs; 2 | use std::path::Path; 3 | use tonic_build::Builder; 4 | 5 | fn main() -> Result<(), Box> { 6 | let out_dir = std::env::var("OUT_DIR").unwrap(); 7 | println!("cargo:warning=Proto output dir: {}", out_dir); 8 | 9 | let builder = tonic_build::configure() 10 | .protoc_arg("--experimental_allow_proto3_optional") 11 | .build_server(false) 12 | .compile_well_known_types(true) 13 | .extern_path( 14 | ".google.protobuf.BytesValue", 15 | "::prost::alloc::vec::Vec", 16 | ) 17 | .extern_path( 18 | ".google.protobuf.StringValue", 19 | "::prost::alloc::string::String", 20 | ) 21 | .extern_path(".google.protobuf", "::prost_wkt_types") 22 | .type_attribute( 23 | ".", 24 | "#[derive(::serde_derive::Serialize, ::serde_derive::Deserialize)]", 25 | ) 26 | .type_attribute(".", "#[serde(rename_all = \"camelCase\")]"); 27 | 28 | let builder = add_field_attributes(builder); 29 | 30 | builder 31 | .compile_protos(&["proto/api.proto", "proto/common.proto"], &["proto"]) 32 | .unwrap(); 33 | 34 | // Add custom code snippet to the generated file. This will handle deserializing a string to a u64. 35 | // Several fields are annotated in the tonic build process to reference this function with a serde annotation. 36 | let code_snippet = r#"// This code snippet is custom inserted by the build script. 37 | // Since the generated code does not support deserializing a string to a u64, 38 | // we need to add a custom deserializer function and add in serde annotatotions to individual 39 | // fields below that need this. 40 | // See build.rs for more details. 41 | use serde::Deserialize; 42 | use base64::{Engine as _, engine::general_purpose}; 43 | 44 | pub fn string_to_u64<'de, D>(deserializer: D) -> Result 45 | where 46 | D: serde::Deserializer<'de>, 47 | { 48 | let s = String::deserialize(deserializer)?; 49 | s.parse::().map_err(serde::de::Error::custom) 50 | } 51 | pub fn string_to_i64<'de, D>(deserializer: D) -> Result 52 | where 53 | D: serde::Deserializer<'de>, 54 | { 55 | let s = String::deserialize(deserializer)?; 56 | s.parse::().map_err(serde::de::Error::custom) 57 | } 58 | pub fn string_to_u8s<'de, D>(deserializer: D) -> Result, D::Error> 59 | where 60 | D: serde::Deserializer<'de>, 61 | { 62 | let s = ::deserialize(deserializer).map_err(serde::de::Error::custom)?; 63 | general_purpose::STANDARD.decode(s).map_err(serde::de::Error::custom) 64 | 65 | } 66 | pub fn string_to_f64<'de, D>(deserializer: D) -> Result 67 | where 68 | D: serde::Deserializer<'de>, 69 | { 70 | let s = String::deserialize(deserializer)?; 71 | s.parse::().map_err(serde::de::Error::custom) 72 | } 73 | pub fn string_to_u64s<'de, D>(deserializer: D) -> Result, D::Error> 74 | where 75 | D: serde::Deserializer<'de>, 76 | { 77 | let s = Vec::::deserialize(deserializer)?; 78 | s.into_iter() 79 | .map(|item| item.parse::().map_err(serde::de::Error::custom)) 80 | .collect() 81 | } 82 | // End of custom code snippet 83 | "#; 84 | let generated_file_path = Path::new(&out_dir).join("api.rs"); 85 | let mut generated_code = fs::read_to_string(&generated_file_path)?; 86 | generated_code = format!("{}{}", code_snippet, generated_code); 87 | generated_code = modify_64bit_fields(generated_code); 88 | fs::write(generated_file_path, generated_code)?; 89 | 90 | Ok(()) 91 | } 92 | 93 | fn modify_64bit_fields(content: String) -> String { 94 | let re = regex::Regex::new(r"( *)(pub\s+)?(\w+\s*:\s*(?:::prost::alloc::vec::Vec<)?([ui](64|8)>?).*)").unwrap(); 95 | 96 | // Replace the field definition with the same definition plus `#[serde(deserialize_with = "...")]` 97 | re.replace_all(&content, |caps: ®ex::Captures| { 98 | let padding = &caps[1]; 99 | let access_modifier = &caps[2]; 100 | let field = &caps[3]; 101 | let mut field_type = String::from(&caps[4]); 102 | field_type = field_type.replace(">", "s"); 103 | 104 | format!( 105 | "{}#[serde(deserialize_with = \"string_to_{}\")]\n{}{}{}", 106 | padding, 107 | field_type, 108 | padding, 109 | access_modifier, 110 | field 111 | ) 112 | }).to_string() 113 | } 114 | 115 | fn add_field_attributes(builder: Builder) -> Builder { 116 | // TODO: Couldn't figure out how to just assign fields to a Vector and iterate over them 117 | // due to Rust ownership issues. So, just manually added each field. 118 | 119 | // Reference for how to format path parameter to select elements in proto file: 120 | // https://docs.rs/tonic-build/latest/tonic_build/struct.Config.html#method.btree_map 121 | 122 | builder 123 | // Field renames 124 | .field_attribute("programID", "#[serde(rename = \"programID\")]") 125 | .field_attribute("accountID", "#[serde(rename = \"accountID\")]") 126 | } 127 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bloXroute-Labs/solana-trader-proto 2 | 3 | go 1.23.0 4 | 5 | toolchain go1.24.3 6 | 7 | require ( 8 | github.com/golang/protobuf v1.5.4 9 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 10 | google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd 11 | google.golang.org/grpc v1.70.0 12 | google.golang.org/protobuf v1.36.5 13 | ) 14 | 15 | require ( 16 | golang.org/x/net v0.35.0 // indirect 17 | golang.org/x/sys v0.30.0 // indirect 18 | golang.org/x/text v0.22.0 // indirect 19 | 20 | ) 21 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 4 | github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= 5 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 6 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 7 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 8 | github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 9 | github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 10 | github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= 11 | github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 12 | github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 13 | github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 14 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 15 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 16 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 17 | github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= 18 | github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= 19 | github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= 20 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 21 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 22 | github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= 23 | github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 24 | github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= 25 | github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= 26 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 27 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 28 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 29 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 30 | github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 31 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 32 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 33 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 34 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 35 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 36 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 37 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 38 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 39 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= 40 | github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 41 | github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= 42 | github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 43 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 44 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 45 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 46 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 47 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 48 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 49 | github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 50 | github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= 51 | github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= 52 | github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 53 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= 54 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 55 | github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= 56 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= 57 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= 58 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 59 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 60 | github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= 61 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 62 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 63 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 64 | go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= 65 | go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= 66 | go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= 67 | go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= 68 | go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= 69 | go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= 70 | go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= 71 | go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= 72 | go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= 73 | go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= 74 | go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= 75 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 76 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 77 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 78 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 79 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 80 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 81 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 82 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 83 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 84 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 85 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 86 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 87 | golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 88 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 89 | golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= 90 | golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= 91 | golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= 92 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 93 | golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 94 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 95 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 96 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 97 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 98 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 99 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 100 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 101 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 102 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 103 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 104 | golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 105 | golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 106 | golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 107 | golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= 108 | golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 109 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 110 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 111 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 112 | golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 113 | golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= 114 | golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= 115 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 116 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 117 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 118 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 119 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 120 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 121 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 122 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 123 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 124 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 125 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 126 | google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 127 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 128 | google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= 129 | google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= 130 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 131 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 132 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= 133 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 134 | google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= 135 | google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 136 | google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= 137 | google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= 138 | google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= 139 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 140 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 141 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 142 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 143 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 144 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 145 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 146 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 147 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 148 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 149 | google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 150 | google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 151 | google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= 152 | google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= 153 | google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= 154 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 155 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 156 | gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 157 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 158 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 159 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 160 | -------------------------------------------------------------------------------- /mev-protos-go/auth/auth_grpc.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 | 3 | package auth 4 | 5 | import ( 6 | context "context" 7 | grpc "google.golang.org/grpc" 8 | codes "google.golang.org/grpc/codes" 9 | status "google.golang.org/grpc/status" 10 | ) 11 | 12 | // This is a compile-time assertion to ensure that this generated file 13 | // is compatible with the grpc package it is being compiled against. 14 | // Requires gRPC-Go v1.32.0 or later. 15 | const _ = grpc.SupportPackageIsVersion7 16 | 17 | // AuthServiceClient is the client API for AuthService service. 18 | // 19 | // For` semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 20 | type AuthServiceClient interface { 21 | /// Returns a challenge, client is expected to sign this challenge with an appropriate keypair in order to obtain access tokens. 22 | GenerateAuthChallenge(ctx context.Context, in *GenerateAuthChallengeRequest, opts ...grpc.CallOption) (*GenerateAuthChallengeResponse, error) 23 | /// Provides the client with the initial pair of auth tokens for API access. 24 | GenerateAuthTokens(ctx context.Context, in *GenerateAuthTokensRequest, opts ...grpc.CallOption) (*GenerateAuthTokensResponse, error) 25 | /// Call this method with a non-expired refresh token to obtain a new access token. 26 | RefreshAccessToken(ctx context.Context, in *RefreshAccessTokenRequest, opts ...grpc.CallOption) (*RefreshAccessTokenResponse, error) 27 | } 28 | 29 | type authServiceClient struct { 30 | cc grpc.ClientConnInterface 31 | } 32 | 33 | func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { 34 | return &authServiceClient{cc} 35 | } 36 | 37 | func (c *authServiceClient) GenerateAuthChallenge(ctx context.Context, in *GenerateAuthChallengeRequest, opts ...grpc.CallOption) (*GenerateAuthChallengeResponse, error) { 38 | out := new(GenerateAuthChallengeResponse) 39 | err := c.cc.Invoke(ctx, "/auth.AuthService/GenerateAuthChallenge", in, out, opts...) 40 | if err != nil { 41 | return nil, err 42 | } 43 | return out, nil 44 | } 45 | 46 | func (c *authServiceClient) GenerateAuthTokens(ctx context.Context, in *GenerateAuthTokensRequest, opts ...grpc.CallOption) (*GenerateAuthTokensResponse, error) { 47 | out := new(GenerateAuthTokensResponse) 48 | err := c.cc.Invoke(ctx, "/auth.AuthService/GenerateAuthTokens", in, out, opts...) 49 | if err != nil { 50 | return nil, err 51 | } 52 | return out, nil 53 | } 54 | 55 | func (c *authServiceClient) RefreshAccessToken(ctx context.Context, in *RefreshAccessTokenRequest, opts ...grpc.CallOption) (*RefreshAccessTokenResponse, error) { 56 | out := new(RefreshAccessTokenResponse) 57 | err := c.cc.Invoke(ctx, "/auth.AuthService/RefreshAccessToken", in, out, opts...) 58 | if err != nil { 59 | return nil, err 60 | } 61 | return out, nil 62 | } 63 | 64 | // AuthServiceServer is the server API for AuthService service. 65 | // All implementations must embed UnimplementedAuthServiceServer 66 | // for forward compatibility 67 | type AuthServiceServer interface { 68 | /// Returns a challenge, client is expected to sign this challenge with an appropriate keypair in order to obtain access tokens. 69 | GenerateAuthChallenge(context.Context, *GenerateAuthChallengeRequest) (*GenerateAuthChallengeResponse, error) 70 | /// Provides the client with the initial pair of auth tokens for API access. 71 | GenerateAuthTokens(context.Context, *GenerateAuthTokensRequest) (*GenerateAuthTokensResponse, error) 72 | /// Call this method with a non-expired refresh token to obtain a new access token. 73 | RefreshAccessToken(context.Context, *RefreshAccessTokenRequest) (*RefreshAccessTokenResponse, error) 74 | mustEmbedUnimplementedAuthServiceServer() 75 | } 76 | 77 | // UnimplementedAuthServiceServer must be embedded to have forward compatible implementations. 78 | type UnimplementedAuthServiceServer struct { 79 | } 80 | 81 | func (UnimplementedAuthServiceServer) GenerateAuthChallenge(context.Context, *GenerateAuthChallengeRequest) (*GenerateAuthChallengeResponse, error) { 82 | return nil, status.Errorf(codes.Unimplemented, "method GenerateAuthChallenge not implemented") 83 | } 84 | func (UnimplementedAuthServiceServer) GenerateAuthTokens(context.Context, *GenerateAuthTokensRequest) (*GenerateAuthTokensResponse, error) { 85 | return nil, status.Errorf(codes.Unimplemented, "method GenerateAuthTokens not implemented") 86 | } 87 | func (UnimplementedAuthServiceServer) RefreshAccessToken(context.Context, *RefreshAccessTokenRequest) (*RefreshAccessTokenResponse, error) { 88 | return nil, status.Errorf(codes.Unimplemented, "method RefreshAccessToken not implemented") 89 | } 90 | func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {} 91 | 92 | // UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. 93 | // Use of this interface is not recommended, as added methods to AuthServiceServer will 94 | // result in compilation errors. 95 | type UnsafeAuthServiceServer interface { 96 | mustEmbedUnimplementedAuthServiceServer() 97 | } 98 | 99 | func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) { 100 | s.RegisterService(&AuthService_ServiceDesc, srv) 101 | } 102 | 103 | func _AuthService_GenerateAuthChallenge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 104 | in := new(GenerateAuthChallengeRequest) 105 | if err := dec(in); err != nil { 106 | return nil, err 107 | } 108 | if interceptor == nil { 109 | return srv.(AuthServiceServer).GenerateAuthChallenge(ctx, in) 110 | } 111 | info := &grpc.UnaryServerInfo{ 112 | Server: srv, 113 | FullMethod: "/auth.AuthService/GenerateAuthChallenge", 114 | } 115 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 116 | return srv.(AuthServiceServer).GenerateAuthChallenge(ctx, req.(*GenerateAuthChallengeRequest)) 117 | } 118 | return interceptor(ctx, in, info, handler) 119 | } 120 | 121 | func _AuthService_GenerateAuthTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 122 | in := new(GenerateAuthTokensRequest) 123 | if err := dec(in); err != nil { 124 | return nil, err 125 | } 126 | if interceptor == nil { 127 | return srv.(AuthServiceServer).GenerateAuthTokens(ctx, in) 128 | } 129 | info := &grpc.UnaryServerInfo{ 130 | Server: srv, 131 | FullMethod: "/auth.AuthService/GenerateAuthTokens", 132 | } 133 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 134 | return srv.(AuthServiceServer).GenerateAuthTokens(ctx, req.(*GenerateAuthTokensRequest)) 135 | } 136 | return interceptor(ctx, in, info, handler) 137 | } 138 | 139 | func _AuthService_RefreshAccessToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 140 | in := new(RefreshAccessTokenRequest) 141 | if err := dec(in); err != nil { 142 | return nil, err 143 | } 144 | if interceptor == nil { 145 | return srv.(AuthServiceServer).RefreshAccessToken(ctx, in) 146 | } 147 | info := &grpc.UnaryServerInfo{ 148 | Server: srv, 149 | FullMethod: "/auth.AuthService/RefreshAccessToken", 150 | } 151 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 152 | return srv.(AuthServiceServer).RefreshAccessToken(ctx, req.(*RefreshAccessTokenRequest)) 153 | } 154 | return interceptor(ctx, in, info, handler) 155 | } 156 | 157 | // AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. 158 | // It's only intended for direct use with grpc.RegisterService, 159 | // and not to be introspected or modified (even as a copy) 160 | var AuthService_ServiceDesc = grpc.ServiceDesc{ 161 | ServiceName: "auth.AuthService", 162 | HandlerType: (*AuthServiceServer)(nil), 163 | Methods: []grpc.MethodDesc{ 164 | { 165 | MethodName: "GenerateAuthChallenge", 166 | Handler: _AuthService_GenerateAuthChallenge_Handler, 167 | }, 168 | { 169 | MethodName: "GenerateAuthTokens", 170 | Handler: _AuthService_GenerateAuthTokens_Handler, 171 | }, 172 | { 173 | MethodName: "RefreshAccessToken", 174 | Handler: _AuthService_RefreshAccessToken_Handler, 175 | }, 176 | }, 177 | Streams: []grpc.StreamDesc{}, 178 | Metadata: "auth.proto", 179 | } 180 | -------------------------------------------------------------------------------- /mev-protos-go/block/block.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // versions: 3 | // protoc-gen-go v1.26.0 4 | // protoc v3.19.3 5 | // source: block.proto 6 | 7 | package block 8 | 9 | import ( 10 | shared "github.com/bloXroute-Labs/solana-trader-proto/mev-protos-go/shared" 11 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 12 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 13 | reflect "reflect" 14 | sync "sync" 15 | ) 16 | 17 | const ( 18 | // Verify that this generated code is sufficiently up-to-date. 19 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 20 | // Verify that runtime/protoimpl is sufficiently up-to-date. 21 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 22 | ) 23 | 24 | // Condensed block helpful for getting data around efficiently internal to our system. 25 | type CondensedBlock struct { 26 | state protoimpl.MessageState 27 | sizeCache protoimpl.SizeCache 28 | unknownFields protoimpl.UnknownFields 29 | 30 | Header *shared.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` 31 | PreviousBlockhash string `protobuf:"bytes,2,opt,name=previous_blockhash,json=previousBlockhash,proto3" json:"previous_blockhash,omitempty"` 32 | Blockhash string `protobuf:"bytes,3,opt,name=blockhash,proto3" json:"blockhash,omitempty"` 33 | ParentSlot uint64 `protobuf:"varint,4,opt,name=parent_slot,json=parentSlot,proto3" json:"parent_slot,omitempty"` 34 | VersionedTransactions [][]byte `protobuf:"bytes,5,rep,name=versioned_transactions,json=versionedTransactions,proto3" json:"versioned_transactions,omitempty"` 35 | Slot uint64 `protobuf:"varint,6,opt,name=slot,proto3" json:"slot,omitempty"` 36 | Commitment string `protobuf:"bytes,7,opt,name=commitment,proto3" json:"commitment,omitempty"` 37 | } 38 | 39 | func (x *CondensedBlock) Reset() { 40 | *x = CondensedBlock{} 41 | if protoimpl.UnsafeEnabled { 42 | mi := &file_block_proto_msgTypes[0] 43 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 44 | ms.StoreMessageInfo(mi) 45 | } 46 | } 47 | 48 | func (x *CondensedBlock) String() string { 49 | return protoimpl.X.MessageStringOf(x) 50 | } 51 | 52 | func (*CondensedBlock) ProtoMessage() {} 53 | 54 | func (x *CondensedBlock) ProtoReflect() protoreflect.Message { 55 | mi := &file_block_proto_msgTypes[0] 56 | if protoimpl.UnsafeEnabled && x != nil { 57 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 58 | if ms.LoadMessageInfo() == nil { 59 | ms.StoreMessageInfo(mi) 60 | } 61 | return ms 62 | } 63 | return mi.MessageOf(x) 64 | } 65 | 66 | // Deprecated: Use CondensedBlock.ProtoReflect.Descriptor instead. 67 | func (*CondensedBlock) Descriptor() ([]byte, []int) { 68 | return file_block_proto_rawDescGZIP(), []int{0} 69 | } 70 | 71 | func (x *CondensedBlock) GetHeader() *shared.Header { 72 | if x != nil { 73 | return x.Header 74 | } 75 | return nil 76 | } 77 | 78 | func (x *CondensedBlock) GetPreviousBlockhash() string { 79 | if x != nil { 80 | return x.PreviousBlockhash 81 | } 82 | return "" 83 | } 84 | 85 | func (x *CondensedBlock) GetBlockhash() string { 86 | if x != nil { 87 | return x.Blockhash 88 | } 89 | return "" 90 | } 91 | 92 | func (x *CondensedBlock) GetParentSlot() uint64 { 93 | if x != nil { 94 | return x.ParentSlot 95 | } 96 | return 0 97 | } 98 | 99 | func (x *CondensedBlock) GetVersionedTransactions() [][]byte { 100 | if x != nil { 101 | return x.VersionedTransactions 102 | } 103 | return nil 104 | } 105 | 106 | func (x *CondensedBlock) GetSlot() uint64 { 107 | if x != nil { 108 | return x.Slot 109 | } 110 | return 0 111 | } 112 | 113 | func (x *CondensedBlock) GetCommitment() string { 114 | if x != nil { 115 | return x.Commitment 116 | } 117 | return "" 118 | } 119 | 120 | var File_block_proto protoreflect.FileDescriptor 121 | 122 | var file_block_proto_rawDesc = []byte{ 123 | 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x62, 124 | 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 125 | 0x74, 0x6f, 0x22, 0x91, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x64, 126 | 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x26, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 127 | 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x48, 128 | 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2d, 0x0a, 129 | 0x12, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 130 | 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, 0x65, 0x76, 0x69, 131 | 0x6f, 0x75, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 132 | 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 133 | 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 134 | 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 135 | 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x35, 0x0a, 0x16, 0x76, 136 | 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 137 | 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x15, 0x76, 0x65, 0x72, 138 | 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 139 | 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 140 | 0x52, 0x04, 0x73, 0x6c, 0x6f, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 141 | 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 142 | 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 143 | 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x6c, 0x6f, 0x58, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2d, 0x4c, 144 | 0x61, 0x62, 0x73, 0x2f, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2d, 0x74, 0x72, 0x61, 0x64, 0x65, 145 | 0x72, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x62, 0x06, 0x70, 146 | 0x72, 0x6f, 0x74, 0x6f, 0x33, 147 | } 148 | 149 | var ( 150 | file_block_proto_rawDescOnce sync.Once 151 | file_block_proto_rawDescData = file_block_proto_rawDesc 152 | ) 153 | 154 | func file_block_proto_rawDescGZIP() []byte { 155 | file_block_proto_rawDescOnce.Do(func() { 156 | file_block_proto_rawDescData = protoimpl.X.CompressGZIP(file_block_proto_rawDescData) 157 | }) 158 | return file_block_proto_rawDescData 159 | } 160 | 161 | var file_block_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 162 | var file_block_proto_goTypes = []interface{}{ 163 | (*CondensedBlock)(nil), // 0: block.CondensedBlock 164 | (*shared.Header)(nil), // 1: shared.Header 165 | } 166 | var file_block_proto_depIdxs = []int32{ 167 | 1, // 0: block.CondensedBlock.header:type_name -> shared.Header 168 | 1, // [1:1] is the sub-list for method output_type 169 | 1, // [1:1] is the sub-list for method input_type 170 | 1, // [1:1] is the sub-list for extension type_name 171 | 1, // [1:1] is the sub-list for extension extendee 172 | 0, // [0:1] is the sub-list for field type_name 173 | } 174 | 175 | func init() { file_block_proto_init() } 176 | func file_block_proto_init() { 177 | if File_block_proto != nil { 178 | return 179 | } 180 | if !protoimpl.UnsafeEnabled { 181 | file_block_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 182 | switch v := v.(*CondensedBlock); i { 183 | case 0: 184 | return &v.state 185 | case 1: 186 | return &v.sizeCache 187 | case 2: 188 | return &v.unknownFields 189 | default: 190 | return nil 191 | } 192 | } 193 | } 194 | type x struct{} 195 | out := protoimpl.TypeBuilder{ 196 | File: protoimpl.DescBuilder{ 197 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 198 | RawDescriptor: file_block_proto_rawDesc, 199 | NumEnums: 0, 200 | NumMessages: 1, 201 | NumExtensions: 0, 202 | NumServices: 0, 203 | }, 204 | GoTypes: file_block_proto_goTypes, 205 | DependencyIndexes: file_block_proto_depIdxs, 206 | MessageInfos: file_block_proto_msgTypes, 207 | }.Build() 208 | File_block_proto = out.File 209 | file_block_proto_rawDesc = nil 210 | file_block_proto_goTypes = nil 211 | file_block_proto_depIdxs = nil 212 | } 213 | -------------------------------------------------------------------------------- /mev-protos-go/packet/packet.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // versions: 3 | // protoc-gen-go v1.26.0 4 | // protoc v3.19.3 5 | // source: packet.proto 6 | 7 | package packet 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 | reflect "reflect" 13 | sync "sync" 14 | ) 15 | 16 | const ( 17 | // Verify that this generated code is sufficiently up-to-date. 18 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 | // Verify that runtime/protoimpl is sufficiently up-to-date. 20 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 | ) 22 | 23 | type PacketBatch struct { 24 | state protoimpl.MessageState 25 | sizeCache protoimpl.SizeCache 26 | unknownFields protoimpl.UnknownFields 27 | 28 | Packets []*Packet `protobuf:"bytes,1,rep,name=packets,proto3" json:"packets,omitempty"` 29 | } 30 | 31 | func (x *PacketBatch) Reset() { 32 | *x = PacketBatch{} 33 | if protoimpl.UnsafeEnabled { 34 | mi := &file_packet_proto_msgTypes[0] 35 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 36 | ms.StoreMessageInfo(mi) 37 | } 38 | } 39 | 40 | func (x *PacketBatch) String() string { 41 | return protoimpl.X.MessageStringOf(x) 42 | } 43 | 44 | func (*PacketBatch) ProtoMessage() {} 45 | 46 | func (x *PacketBatch) ProtoReflect() protoreflect.Message { 47 | mi := &file_packet_proto_msgTypes[0] 48 | if protoimpl.UnsafeEnabled && x != nil { 49 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 50 | if ms.LoadMessageInfo() == nil { 51 | ms.StoreMessageInfo(mi) 52 | } 53 | return ms 54 | } 55 | return mi.MessageOf(x) 56 | } 57 | 58 | // Deprecated: Use PacketBatch.ProtoReflect.Descriptor instead. 59 | func (*PacketBatch) Descriptor() ([]byte, []int) { 60 | return file_packet_proto_rawDescGZIP(), []int{0} 61 | } 62 | 63 | func (x *PacketBatch) GetPackets() []*Packet { 64 | if x != nil { 65 | return x.Packets 66 | } 67 | return nil 68 | } 69 | 70 | type Packet struct { 71 | state protoimpl.MessageState 72 | sizeCache protoimpl.SizeCache 73 | unknownFields protoimpl.UnknownFields 74 | 75 | Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` 76 | Meta *Meta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` 77 | } 78 | 79 | func (x *Packet) Reset() { 80 | *x = Packet{} 81 | if protoimpl.UnsafeEnabled { 82 | mi := &file_packet_proto_msgTypes[1] 83 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 84 | ms.StoreMessageInfo(mi) 85 | } 86 | } 87 | 88 | func (x *Packet) String() string { 89 | return protoimpl.X.MessageStringOf(x) 90 | } 91 | 92 | func (*Packet) ProtoMessage() {} 93 | 94 | func (x *Packet) ProtoReflect() protoreflect.Message { 95 | mi := &file_packet_proto_msgTypes[1] 96 | if protoimpl.UnsafeEnabled && x != nil { 97 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 98 | if ms.LoadMessageInfo() == nil { 99 | ms.StoreMessageInfo(mi) 100 | } 101 | return ms 102 | } 103 | return mi.MessageOf(x) 104 | } 105 | 106 | // Deprecated: Use Packet.ProtoReflect.Descriptor instead. 107 | func (*Packet) Descriptor() ([]byte, []int) { 108 | return file_packet_proto_rawDescGZIP(), []int{1} 109 | } 110 | 111 | func (x *Packet) GetData() []byte { 112 | if x != nil { 113 | return x.Data 114 | } 115 | return nil 116 | } 117 | 118 | func (x *Packet) GetMeta() *Meta { 119 | if x != nil { 120 | return x.Meta 121 | } 122 | return nil 123 | } 124 | 125 | type Meta struct { 126 | state protoimpl.MessageState 127 | sizeCache protoimpl.SizeCache 128 | unknownFields protoimpl.UnknownFields 129 | 130 | Size uint64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` 131 | Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` 132 | Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` 133 | Flags *PacketFlags `protobuf:"bytes,4,opt,name=flags,proto3" json:"flags,omitempty"` 134 | SenderStake uint64 `protobuf:"varint,5,opt,name=sender_stake,json=senderStake,proto3" json:"sender_stake,omitempty"` 135 | } 136 | 137 | func (x *Meta) Reset() { 138 | *x = Meta{} 139 | if protoimpl.UnsafeEnabled { 140 | mi := &file_packet_proto_msgTypes[2] 141 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 142 | ms.StoreMessageInfo(mi) 143 | } 144 | } 145 | 146 | func (x *Meta) String() string { 147 | return protoimpl.X.MessageStringOf(x) 148 | } 149 | 150 | func (*Meta) ProtoMessage() {} 151 | 152 | func (x *Meta) ProtoReflect() protoreflect.Message { 153 | mi := &file_packet_proto_msgTypes[2] 154 | if protoimpl.UnsafeEnabled && x != nil { 155 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 156 | if ms.LoadMessageInfo() == nil { 157 | ms.StoreMessageInfo(mi) 158 | } 159 | return ms 160 | } 161 | return mi.MessageOf(x) 162 | } 163 | 164 | // Deprecated: Use Meta.ProtoReflect.Descriptor instead. 165 | func (*Meta) Descriptor() ([]byte, []int) { 166 | return file_packet_proto_rawDescGZIP(), []int{2} 167 | } 168 | 169 | func (x *Meta) GetSize() uint64 { 170 | if x != nil { 171 | return x.Size 172 | } 173 | return 0 174 | } 175 | 176 | func (x *Meta) GetAddr() string { 177 | if x != nil { 178 | return x.Addr 179 | } 180 | return "" 181 | } 182 | 183 | func (x *Meta) GetPort() uint32 { 184 | if x != nil { 185 | return x.Port 186 | } 187 | return 0 188 | } 189 | 190 | func (x *Meta) GetFlags() *PacketFlags { 191 | if x != nil { 192 | return x.Flags 193 | } 194 | return nil 195 | } 196 | 197 | func (x *Meta) GetSenderStake() uint64 { 198 | if x != nil { 199 | return x.SenderStake 200 | } 201 | return 0 202 | } 203 | 204 | type PacketFlags struct { 205 | state protoimpl.MessageState 206 | sizeCache protoimpl.SizeCache 207 | unknownFields protoimpl.UnknownFields 208 | 209 | Discard bool `protobuf:"varint,1,opt,name=discard,proto3" json:"discard,omitempty"` 210 | Forwarded bool `protobuf:"varint,2,opt,name=forwarded,proto3" json:"forwarded,omitempty"` 211 | Repair bool `protobuf:"varint,3,opt,name=repair,proto3" json:"repair,omitempty"` 212 | SimpleVoteTx bool `protobuf:"varint,4,opt,name=simple_vote_tx,json=simpleVoteTx,proto3" json:"simple_vote_tx,omitempty"` 213 | TracerPacket bool `protobuf:"varint,5,opt,name=tracer_packet,json=tracerPacket,proto3" json:"tracer_packet,omitempty"` 214 | } 215 | 216 | func (x *PacketFlags) Reset() { 217 | *x = PacketFlags{} 218 | if protoimpl.UnsafeEnabled { 219 | mi := &file_packet_proto_msgTypes[3] 220 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 221 | ms.StoreMessageInfo(mi) 222 | } 223 | } 224 | 225 | func (x *PacketFlags) String() string { 226 | return protoimpl.X.MessageStringOf(x) 227 | } 228 | 229 | func (*PacketFlags) ProtoMessage() {} 230 | 231 | func (x *PacketFlags) ProtoReflect() protoreflect.Message { 232 | mi := &file_packet_proto_msgTypes[3] 233 | if protoimpl.UnsafeEnabled && x != nil { 234 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 235 | if ms.LoadMessageInfo() == nil { 236 | ms.StoreMessageInfo(mi) 237 | } 238 | return ms 239 | } 240 | return mi.MessageOf(x) 241 | } 242 | 243 | // Deprecated: Use PacketFlags.ProtoReflect.Descriptor instead. 244 | func (*PacketFlags) Descriptor() ([]byte, []int) { 245 | return file_packet_proto_rawDescGZIP(), []int{3} 246 | } 247 | 248 | func (x *PacketFlags) GetDiscard() bool { 249 | if x != nil { 250 | return x.Discard 251 | } 252 | return false 253 | } 254 | 255 | func (x *PacketFlags) GetForwarded() bool { 256 | if x != nil { 257 | return x.Forwarded 258 | } 259 | return false 260 | } 261 | 262 | func (x *PacketFlags) GetRepair() bool { 263 | if x != nil { 264 | return x.Repair 265 | } 266 | return false 267 | } 268 | 269 | func (x *PacketFlags) GetSimpleVoteTx() bool { 270 | if x != nil { 271 | return x.SimpleVoteTx 272 | } 273 | return false 274 | } 275 | 276 | func (x *PacketFlags) GetTracerPacket() bool { 277 | if x != nil { 278 | return x.TracerPacket 279 | } 280 | return false 281 | } 282 | 283 | var File_packet_proto protoreflect.FileDescriptor 284 | 285 | var file_packet_proto_rawDesc = []byte{ 286 | 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 287 | 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x37, 0x0a, 0x0b, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 288 | 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x28, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 289 | 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 290 | 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x22, 291 | 0x3e, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 292 | 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 293 | 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x61, 294 | 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 295 | 0x90, 0x01, 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 296 | 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 297 | 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 298 | 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 299 | 0x70, 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 300 | 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x50, 0x61, 0x63, 301 | 0x6b, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 302 | 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 303 | 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 304 | 0x6b, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x6c, 0x61, 305 | 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 306 | 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 307 | 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 308 | 0x09, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 309 | 0x70, 0x61, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x70, 0x61, 310 | 0x69, 0x72, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x76, 0x6f, 0x74, 311 | 0x65, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x69, 0x6d, 0x70, 312 | 0x6c, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x63, 313 | 0x65, 0x72, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 314 | 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x36, 0x5a, 315 | 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x6c, 0x6f, 0x58, 316 | 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 317 | 0x61, 0x2d, 0x74, 0x72, 0x61, 0x64, 0x65, 0x72, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 318 | 0x61, 0x63, 0x6b, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 319 | } 320 | 321 | var ( 322 | file_packet_proto_rawDescOnce sync.Once 323 | file_packet_proto_rawDescData = file_packet_proto_rawDesc 324 | ) 325 | 326 | func file_packet_proto_rawDescGZIP() []byte { 327 | file_packet_proto_rawDescOnce.Do(func() { 328 | file_packet_proto_rawDescData = protoimpl.X.CompressGZIP(file_packet_proto_rawDescData) 329 | }) 330 | return file_packet_proto_rawDescData 331 | } 332 | 333 | var file_packet_proto_msgTypes = make([]protoimpl.MessageInfo, 4) 334 | var file_packet_proto_goTypes = []interface{}{ 335 | (*PacketBatch)(nil), // 0: packet.PacketBatch 336 | (*Packet)(nil), // 1: packet.Packet 337 | (*Meta)(nil), // 2: packet.Meta 338 | (*PacketFlags)(nil), // 3: packet.PacketFlags 339 | } 340 | var file_packet_proto_depIdxs = []int32{ 341 | 1, // 0: packet.PacketBatch.packets:type_name -> packet.Packet 342 | 2, // 1: packet.Packet.meta:type_name -> packet.Meta 343 | 3, // 2: packet.Meta.flags:type_name -> packet.PacketFlags 344 | 3, // [3:3] is the sub-list for method output_type 345 | 3, // [3:3] is the sub-list for method input_type 346 | 3, // [3:3] is the sub-list for extension type_name 347 | 3, // [3:3] is the sub-list for extension extendee 348 | 0, // [0:3] is the sub-list for field type_name 349 | } 350 | 351 | func init() { file_packet_proto_init() } 352 | func file_packet_proto_init() { 353 | if File_packet_proto != nil { 354 | return 355 | } 356 | if !protoimpl.UnsafeEnabled { 357 | file_packet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 358 | switch v := v.(*PacketBatch); i { 359 | case 0: 360 | return &v.state 361 | case 1: 362 | return &v.sizeCache 363 | case 2: 364 | return &v.unknownFields 365 | default: 366 | return nil 367 | } 368 | } 369 | file_packet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 370 | switch v := v.(*Packet); i { 371 | case 0: 372 | return &v.state 373 | case 1: 374 | return &v.sizeCache 375 | case 2: 376 | return &v.unknownFields 377 | default: 378 | return nil 379 | } 380 | } 381 | file_packet_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 382 | switch v := v.(*Meta); i { 383 | case 0: 384 | return &v.state 385 | case 1: 386 | return &v.sizeCache 387 | case 2: 388 | return &v.unknownFields 389 | default: 390 | return nil 391 | } 392 | } 393 | file_packet_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 394 | switch v := v.(*PacketFlags); i { 395 | case 0: 396 | return &v.state 397 | case 1: 398 | return &v.sizeCache 399 | case 2: 400 | return &v.unknownFields 401 | default: 402 | return nil 403 | } 404 | } 405 | } 406 | type x struct{} 407 | out := protoimpl.TypeBuilder{ 408 | File: protoimpl.DescBuilder{ 409 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 410 | RawDescriptor: file_packet_proto_rawDesc, 411 | NumEnums: 0, 412 | NumMessages: 4, 413 | NumExtensions: 0, 414 | NumServices: 0, 415 | }, 416 | GoTypes: file_packet_proto_goTypes, 417 | DependencyIndexes: file_packet_proto_depIdxs, 418 | MessageInfos: file_packet_proto_msgTypes, 419 | }.Build() 420 | File_packet_proto = out.File 421 | file_packet_proto_rawDesc = nil 422 | file_packet_proto_goTypes = nil 423 | file_packet_proto_depIdxs = nil 424 | } 425 | -------------------------------------------------------------------------------- /mev-protos-go/relayer/relayer.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // versions: 3 | // protoc-gen-go v1.26.0 4 | // protoc v3.19.3 5 | // source: relayer.proto 6 | 7 | package relayer 8 | 9 | import ( 10 | packet "github.com/bloXroute-Labs/solana-trader-proto/mev-protos-go/packet" 11 | shared "github.com/bloXroute-Labs/solana-trader-proto/mev-protos-go/shared" 12 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 13 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 14 | reflect "reflect" 15 | sync "sync" 16 | ) 17 | 18 | const ( 19 | // Verify that this generated code is sufficiently up-to-date. 20 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 21 | // Verify that runtime/protoimpl is sufficiently up-to-date. 22 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 23 | ) 24 | 25 | type GetTpuConfigsRequest struct { 26 | state protoimpl.MessageState 27 | sizeCache protoimpl.SizeCache 28 | unknownFields protoimpl.UnknownFields 29 | } 30 | 31 | func (x *GetTpuConfigsRequest) Reset() { 32 | *x = GetTpuConfigsRequest{} 33 | if protoimpl.UnsafeEnabled { 34 | mi := &file_relayer_proto_msgTypes[0] 35 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 36 | ms.StoreMessageInfo(mi) 37 | } 38 | } 39 | 40 | func (x *GetTpuConfigsRequest) String() string { 41 | return protoimpl.X.MessageStringOf(x) 42 | } 43 | 44 | func (*GetTpuConfigsRequest) ProtoMessage() {} 45 | 46 | func (x *GetTpuConfigsRequest) ProtoReflect() protoreflect.Message { 47 | mi := &file_relayer_proto_msgTypes[0] 48 | if protoimpl.UnsafeEnabled && x != nil { 49 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 50 | if ms.LoadMessageInfo() == nil { 51 | ms.StoreMessageInfo(mi) 52 | } 53 | return ms 54 | } 55 | return mi.MessageOf(x) 56 | } 57 | 58 | // Deprecated: Use GetTpuConfigsRequest.ProtoReflect.Descriptor instead. 59 | func (*GetTpuConfigsRequest) Descriptor() ([]byte, []int) { 60 | return file_relayer_proto_rawDescGZIP(), []int{0} 61 | } 62 | 63 | type GetTpuConfigsResponse struct { 64 | state protoimpl.MessageState 65 | sizeCache protoimpl.SizeCache 66 | unknownFields protoimpl.UnknownFields 67 | 68 | Tpu *shared.Socket `protobuf:"bytes,1,opt,name=tpu,proto3" json:"tpu,omitempty"` 69 | TpuForward *shared.Socket `protobuf:"bytes,2,opt,name=tpu_forward,json=tpuForward,proto3" json:"tpu_forward,omitempty"` 70 | } 71 | 72 | func (x *GetTpuConfigsResponse) Reset() { 73 | *x = GetTpuConfigsResponse{} 74 | if protoimpl.UnsafeEnabled { 75 | mi := &file_relayer_proto_msgTypes[1] 76 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 77 | ms.StoreMessageInfo(mi) 78 | } 79 | } 80 | 81 | func (x *GetTpuConfigsResponse) String() string { 82 | return protoimpl.X.MessageStringOf(x) 83 | } 84 | 85 | func (*GetTpuConfigsResponse) ProtoMessage() {} 86 | 87 | func (x *GetTpuConfigsResponse) ProtoReflect() protoreflect.Message { 88 | mi := &file_relayer_proto_msgTypes[1] 89 | if protoimpl.UnsafeEnabled && x != nil { 90 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 91 | if ms.LoadMessageInfo() == nil { 92 | ms.StoreMessageInfo(mi) 93 | } 94 | return ms 95 | } 96 | return mi.MessageOf(x) 97 | } 98 | 99 | // Deprecated: Use GetTpuConfigsResponse.ProtoReflect.Descriptor instead. 100 | func (*GetTpuConfigsResponse) Descriptor() ([]byte, []int) { 101 | return file_relayer_proto_rawDescGZIP(), []int{1} 102 | } 103 | 104 | func (x *GetTpuConfigsResponse) GetTpu() *shared.Socket { 105 | if x != nil { 106 | return x.Tpu 107 | } 108 | return nil 109 | } 110 | 111 | func (x *GetTpuConfigsResponse) GetTpuForward() *shared.Socket { 112 | if x != nil { 113 | return x.TpuForward 114 | } 115 | return nil 116 | } 117 | 118 | type SubscribePacketsRequest struct { 119 | state protoimpl.MessageState 120 | sizeCache protoimpl.SizeCache 121 | unknownFields protoimpl.UnknownFields 122 | } 123 | 124 | func (x *SubscribePacketsRequest) Reset() { 125 | *x = SubscribePacketsRequest{} 126 | if protoimpl.UnsafeEnabled { 127 | mi := &file_relayer_proto_msgTypes[2] 128 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 129 | ms.StoreMessageInfo(mi) 130 | } 131 | } 132 | 133 | func (x *SubscribePacketsRequest) String() string { 134 | return protoimpl.X.MessageStringOf(x) 135 | } 136 | 137 | func (*SubscribePacketsRequest) ProtoMessage() {} 138 | 139 | func (x *SubscribePacketsRequest) ProtoReflect() protoreflect.Message { 140 | mi := &file_relayer_proto_msgTypes[2] 141 | if protoimpl.UnsafeEnabled && x != nil { 142 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 143 | if ms.LoadMessageInfo() == nil { 144 | ms.StoreMessageInfo(mi) 145 | } 146 | return ms 147 | } 148 | return mi.MessageOf(x) 149 | } 150 | 151 | // Deprecated: Use SubscribePacketsRequest.ProtoReflect.Descriptor instead. 152 | func (*SubscribePacketsRequest) Descriptor() ([]byte, []int) { 153 | return file_relayer_proto_rawDescGZIP(), []int{2} 154 | } 155 | 156 | type SubscribePacketsResponse struct { 157 | state protoimpl.MessageState 158 | sizeCache protoimpl.SizeCache 159 | unknownFields protoimpl.UnknownFields 160 | 161 | Header *shared.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` 162 | // Types that are assignable to Msg: 163 | // *SubscribePacketsResponse_Heartbeat 164 | // *SubscribePacketsResponse_Batch 165 | Msg isSubscribePacketsResponse_Msg `protobuf_oneof:"msg"` 166 | } 167 | 168 | func (x *SubscribePacketsResponse) Reset() { 169 | *x = SubscribePacketsResponse{} 170 | if protoimpl.UnsafeEnabled { 171 | mi := &file_relayer_proto_msgTypes[3] 172 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 173 | ms.StoreMessageInfo(mi) 174 | } 175 | } 176 | 177 | func (x *SubscribePacketsResponse) String() string { 178 | return protoimpl.X.MessageStringOf(x) 179 | } 180 | 181 | func (*SubscribePacketsResponse) ProtoMessage() {} 182 | 183 | func (x *SubscribePacketsResponse) ProtoReflect() protoreflect.Message { 184 | mi := &file_relayer_proto_msgTypes[3] 185 | if protoimpl.UnsafeEnabled && x != nil { 186 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 187 | if ms.LoadMessageInfo() == nil { 188 | ms.StoreMessageInfo(mi) 189 | } 190 | return ms 191 | } 192 | return mi.MessageOf(x) 193 | } 194 | 195 | // Deprecated: Use SubscribePacketsResponse.ProtoReflect.Descriptor instead. 196 | func (*SubscribePacketsResponse) Descriptor() ([]byte, []int) { 197 | return file_relayer_proto_rawDescGZIP(), []int{3} 198 | } 199 | 200 | func (x *SubscribePacketsResponse) GetHeader() *shared.Header { 201 | if x != nil { 202 | return x.Header 203 | } 204 | return nil 205 | } 206 | 207 | func (m *SubscribePacketsResponse) GetMsg() isSubscribePacketsResponse_Msg { 208 | if m != nil { 209 | return m.Msg 210 | } 211 | return nil 212 | } 213 | 214 | func (x *SubscribePacketsResponse) GetHeartbeat() *shared.Heartbeat { 215 | if x, ok := x.GetMsg().(*SubscribePacketsResponse_Heartbeat); ok { 216 | return x.Heartbeat 217 | } 218 | return nil 219 | } 220 | 221 | func (x *SubscribePacketsResponse) GetBatch() *packet.PacketBatch { 222 | if x, ok := x.GetMsg().(*SubscribePacketsResponse_Batch); ok { 223 | return x.Batch 224 | } 225 | return nil 226 | } 227 | 228 | type isSubscribePacketsResponse_Msg interface { 229 | isSubscribePacketsResponse_Msg() 230 | } 231 | 232 | type SubscribePacketsResponse_Heartbeat struct { 233 | Heartbeat *shared.Heartbeat `protobuf:"bytes,2,opt,name=heartbeat,proto3,oneof"` 234 | } 235 | 236 | type SubscribePacketsResponse_Batch struct { 237 | Batch *packet.PacketBatch `protobuf:"bytes,3,opt,name=batch,proto3,oneof"` 238 | } 239 | 240 | func (*SubscribePacketsResponse_Heartbeat) isSubscribePacketsResponse_Msg() {} 241 | 242 | func (*SubscribePacketsResponse_Batch) isSubscribePacketsResponse_Msg() {} 243 | 244 | var File_relayer_proto protoreflect.FileDescriptor 245 | 246 | var file_relayer_proto_rawDesc = []byte{ 247 | 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 248 | 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x1a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 249 | 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 250 | 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x54, 0x70, 0x75, 0x43, 0x6f, 251 | 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6a, 0x0a, 0x15, 252 | 0x47, 0x65, 0x74, 0x54, 0x70, 0x75, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 253 | 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x03, 0x74, 0x70, 0x75, 0x18, 0x01, 0x20, 0x01, 254 | 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 255 | 0x65, 0x74, 0x52, 0x03, 0x74, 0x70, 0x75, 0x12, 0x2f, 0x0a, 0x0b, 0x74, 0x70, 0x75, 0x5f, 0x66, 256 | 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 257 | 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0a, 0x74, 0x70, 258 | 0x75, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x73, 259 | 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 260 | 0x65, 0x73, 0x74, 0x22, 0xa9, 0x01, 0x0a, 0x18, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 261 | 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 262 | 0x12, 0x26, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 263 | 0x32, 0x0e, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 264 | 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x09, 0x68, 0x65, 0x61, 0x72, 265 | 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x68, 266 | 0x61, 0x72, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x48, 0x00, 267 | 0x52, 0x09, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x62, 268 | 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 269 | 0x6b, 0x65, 0x74, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 270 | 0x00, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x42, 0x05, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x32, 271 | 0xb8, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x50, 0x0a, 0x0d, 0x47, 272 | 0x65, 0x74, 0x54, 0x70, 0x75, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x72, 273 | 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x70, 0x75, 0x43, 0x6f, 0x6e, 274 | 0x66, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x65, 275 | 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x70, 0x75, 0x43, 0x6f, 0x6e, 0x66, 276 | 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 277 | 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 278 | 0x73, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x73, 279 | 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 280 | 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x53, 0x75, 281 | 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 282 | 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 283 | 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x6c, 0x6f, 0x58, 0x72, 0x6f, 0x75, 284 | 0x74, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2d, 0x74, 285 | 0x72, 0x61, 0x64, 0x65, 0x72, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 286 | 0x79, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 287 | } 288 | 289 | var ( 290 | file_relayer_proto_rawDescOnce sync.Once 291 | file_relayer_proto_rawDescData = file_relayer_proto_rawDesc 292 | ) 293 | 294 | func file_relayer_proto_rawDescGZIP() []byte { 295 | file_relayer_proto_rawDescOnce.Do(func() { 296 | file_relayer_proto_rawDescData = protoimpl.X.CompressGZIP(file_relayer_proto_rawDescData) 297 | }) 298 | return file_relayer_proto_rawDescData 299 | } 300 | 301 | var file_relayer_proto_msgTypes = make([]protoimpl.MessageInfo, 4) 302 | var file_relayer_proto_goTypes = []interface{}{ 303 | (*GetTpuConfigsRequest)(nil), // 0: relayer.GetTpuConfigsRequest 304 | (*GetTpuConfigsResponse)(nil), // 1: relayer.GetTpuConfigsResponse 305 | (*SubscribePacketsRequest)(nil), // 2: relayer.SubscribePacketsRequest 306 | (*SubscribePacketsResponse)(nil), // 3: relayer.SubscribePacketsResponse 307 | (*shared.Socket)(nil), // 4: shared.Socket 308 | (*shared.Header)(nil), // 5: shared.Header 309 | (*shared.Heartbeat)(nil), // 6: shared.Heartbeat 310 | (*packet.PacketBatch)(nil), // 7: packet.PacketBatch 311 | } 312 | var file_relayer_proto_depIdxs = []int32{ 313 | 4, // 0: relayer.GetTpuConfigsResponse.tpu:type_name -> shared.Socket 314 | 4, // 1: relayer.GetTpuConfigsResponse.tpu_forward:type_name -> shared.Socket 315 | 5, // 2: relayer.SubscribePacketsResponse.header:type_name -> shared.Header 316 | 6, // 3: relayer.SubscribePacketsResponse.heartbeat:type_name -> shared.Heartbeat 317 | 7, // 4: relayer.SubscribePacketsResponse.batch:type_name -> packet.PacketBatch 318 | 0, // 5: relayer.Relayer.GetTpuConfigs:input_type -> relayer.GetTpuConfigsRequest 319 | 2, // 6: relayer.Relayer.SubscribePackets:input_type -> relayer.SubscribePacketsRequest 320 | 1, // 7: relayer.Relayer.GetTpuConfigs:output_type -> relayer.GetTpuConfigsResponse 321 | 3, // 8: relayer.Relayer.SubscribePackets:output_type -> relayer.SubscribePacketsResponse 322 | 7, // [7:9] is the sub-list for method output_type 323 | 5, // [5:7] is the sub-list for method input_type 324 | 5, // [5:5] is the sub-list for extension type_name 325 | 5, // [5:5] is the sub-list for extension extendee 326 | 0, // [0:5] is the sub-list for field type_name 327 | } 328 | 329 | func init() { file_relayer_proto_init() } 330 | func file_relayer_proto_init() { 331 | if File_relayer_proto != nil { 332 | return 333 | } 334 | if !protoimpl.UnsafeEnabled { 335 | file_relayer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 336 | switch v := v.(*GetTpuConfigsRequest); i { 337 | case 0: 338 | return &v.state 339 | case 1: 340 | return &v.sizeCache 341 | case 2: 342 | return &v.unknownFields 343 | default: 344 | return nil 345 | } 346 | } 347 | file_relayer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 348 | switch v := v.(*GetTpuConfigsResponse); i { 349 | case 0: 350 | return &v.state 351 | case 1: 352 | return &v.sizeCache 353 | case 2: 354 | return &v.unknownFields 355 | default: 356 | return nil 357 | } 358 | } 359 | file_relayer_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 360 | switch v := v.(*SubscribePacketsRequest); i { 361 | case 0: 362 | return &v.state 363 | case 1: 364 | return &v.sizeCache 365 | case 2: 366 | return &v.unknownFields 367 | default: 368 | return nil 369 | } 370 | } 371 | file_relayer_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 372 | switch v := v.(*SubscribePacketsResponse); i { 373 | case 0: 374 | return &v.state 375 | case 1: 376 | return &v.sizeCache 377 | case 2: 378 | return &v.unknownFields 379 | default: 380 | return nil 381 | } 382 | } 383 | } 384 | file_relayer_proto_msgTypes[3].OneofWrappers = []interface{}{ 385 | (*SubscribePacketsResponse_Heartbeat)(nil), 386 | (*SubscribePacketsResponse_Batch)(nil), 387 | } 388 | type x struct{} 389 | out := protoimpl.TypeBuilder{ 390 | File: protoimpl.DescBuilder{ 391 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 392 | RawDescriptor: file_relayer_proto_rawDesc, 393 | NumEnums: 0, 394 | NumMessages: 4, 395 | NumExtensions: 0, 396 | NumServices: 1, 397 | }, 398 | GoTypes: file_relayer_proto_goTypes, 399 | DependencyIndexes: file_relayer_proto_depIdxs, 400 | MessageInfos: file_relayer_proto_msgTypes, 401 | }.Build() 402 | File_relayer_proto = out.File 403 | file_relayer_proto_rawDesc = nil 404 | file_relayer_proto_goTypes = nil 405 | file_relayer_proto_depIdxs = nil 406 | } 407 | -------------------------------------------------------------------------------- /mev-protos-go/relayer/relayer_grpc.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 | 3 | package relayer 4 | 5 | import ( 6 | context "context" 7 | grpc "google.golang.org/grpc" 8 | codes "google.golang.org/grpc/codes" 9 | status "google.golang.org/grpc/status" 10 | ) 11 | 12 | // This is a compile-time assertion to ensure that this generated file 13 | // is compatible with the grpc package it is being compiled against. 14 | // Requires gRPC-Go v1.32.0 or later. 15 | const _ = grpc.SupportPackageIsVersion7 16 | 17 | // RelayerClient is the client API for Relayer service. 18 | // 19 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 20 | type RelayerClient interface { 21 | // The relayer has TPU and TPU forward sockets that validators can leverage. 22 | // A validator can fetch this config and change its TPU and TPU forward port in gossip. 23 | GetTpuConfigs(ctx context.Context, in *GetTpuConfigsRequest, opts ...grpc.CallOption) (*GetTpuConfigsResponse, error) 24 | // Validators can subscribe to packets from the relayer and receive a multiplexed signal that contains a mixture 25 | // of packets and heartbeats 26 | SubscribePackets(ctx context.Context, in *SubscribePacketsRequest, opts ...grpc.CallOption) (Relayer_SubscribePacketsClient, error) 27 | } 28 | 29 | type relayerClient struct { 30 | cc grpc.ClientConnInterface 31 | } 32 | 33 | func NewRelayerClient(cc grpc.ClientConnInterface) RelayerClient { 34 | return &relayerClient{cc} 35 | } 36 | 37 | func (c *relayerClient) GetTpuConfigs(ctx context.Context, in *GetTpuConfigsRequest, opts ...grpc.CallOption) (*GetTpuConfigsResponse, error) { 38 | out := new(GetTpuConfigsResponse) 39 | err := c.cc.Invoke(ctx, "/relayer.Relayer/GetTpuConfigs", in, out, opts...) 40 | if err != nil { 41 | return nil, err 42 | } 43 | return out, nil 44 | } 45 | 46 | func (c *relayerClient) SubscribePackets(ctx context.Context, in *SubscribePacketsRequest, opts ...grpc.CallOption) (Relayer_SubscribePacketsClient, error) { 47 | stream, err := c.cc.NewStream(ctx, &Relayer_ServiceDesc.Streams[0], "/relayer.Relayer/SubscribePackets", opts...) 48 | if err != nil { 49 | return nil, err 50 | } 51 | x := &relayerSubscribePacketsClient{stream} 52 | if err := x.ClientStream.SendMsg(in); err != nil { 53 | return nil, err 54 | } 55 | if err := x.ClientStream.CloseSend(); err != nil { 56 | return nil, err 57 | } 58 | return x, nil 59 | } 60 | 61 | type Relayer_SubscribePacketsClient interface { 62 | Recv() (*SubscribePacketsResponse, error) 63 | grpc.ClientStream 64 | } 65 | 66 | type relayerSubscribePacketsClient struct { 67 | grpc.ClientStream 68 | } 69 | 70 | func (x *relayerSubscribePacketsClient) Recv() (*SubscribePacketsResponse, error) { 71 | m := new(SubscribePacketsResponse) 72 | if err := x.ClientStream.RecvMsg(m); err != nil { 73 | return nil, err 74 | } 75 | return m, nil 76 | } 77 | 78 | // RelayerServer is the server API for Relayer service. 79 | // All implementations must embed UnimplementedRelayerServer 80 | // for forward compatibility 81 | type RelayerServer interface { 82 | // The relayer has TPU and TPU forward sockets that validators can leverage. 83 | // A validator can fetch this config and change its TPU and TPU forward port in gossip. 84 | GetTpuConfigs(context.Context, *GetTpuConfigsRequest) (*GetTpuConfigsResponse, error) 85 | // Validators can subscribe to packets from the relayer and receive a multiplexed signal that contains a mixture 86 | // of packets and heartbeats 87 | SubscribePackets(*SubscribePacketsRequest, Relayer_SubscribePacketsServer) error 88 | mustEmbedUnimplementedRelayerServer() 89 | } 90 | 91 | // UnimplementedRelayerServer must be embedded to have forward compatible implementations. 92 | type UnimplementedRelayerServer struct { 93 | } 94 | 95 | func (UnimplementedRelayerServer) GetTpuConfigs(context.Context, *GetTpuConfigsRequest) (*GetTpuConfigsResponse, error) { 96 | return nil, status.Errorf(codes.Unimplemented, "method GetTpuConfigs not implemented") 97 | } 98 | func (UnimplementedRelayerServer) SubscribePackets(*SubscribePacketsRequest, Relayer_SubscribePacketsServer) error { 99 | return status.Errorf(codes.Unimplemented, "method SubscribePackets not implemented") 100 | } 101 | func (UnimplementedRelayerServer) mustEmbedUnimplementedRelayerServer() {} 102 | 103 | // UnsafeRelayerServer may be embedded to opt out of forward compatibility for this service. 104 | // Use of this interface is not recommended, as added methods to RelayerServer will 105 | // result in compilation errors. 106 | type UnsafeRelayerServer interface { 107 | mustEmbedUnimplementedRelayerServer() 108 | } 109 | 110 | func RegisterRelayerServer(s grpc.ServiceRegistrar, srv RelayerServer) { 111 | s.RegisterService(&Relayer_ServiceDesc, srv) 112 | } 113 | 114 | func _Relayer_GetTpuConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 115 | in := new(GetTpuConfigsRequest) 116 | if err := dec(in); err != nil { 117 | return nil, err 118 | } 119 | if interceptor == nil { 120 | return srv.(RelayerServer).GetTpuConfigs(ctx, in) 121 | } 122 | info := &grpc.UnaryServerInfo{ 123 | Server: srv, 124 | FullMethod: "/relayer.Relayer/GetTpuConfigs", 125 | } 126 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 127 | return srv.(RelayerServer).GetTpuConfigs(ctx, req.(*GetTpuConfigsRequest)) 128 | } 129 | return interceptor(ctx, in, info, handler) 130 | } 131 | 132 | func _Relayer_SubscribePackets_Handler(srv interface{}, stream grpc.ServerStream) error { 133 | m := new(SubscribePacketsRequest) 134 | if err := stream.RecvMsg(m); err != nil { 135 | return err 136 | } 137 | return srv.(RelayerServer).SubscribePackets(m, &relayerSubscribePacketsServer{stream}) 138 | } 139 | 140 | type Relayer_SubscribePacketsServer interface { 141 | Send(*SubscribePacketsResponse) error 142 | grpc.ServerStream 143 | } 144 | 145 | type relayerSubscribePacketsServer struct { 146 | grpc.ServerStream 147 | } 148 | 149 | func (x *relayerSubscribePacketsServer) Send(m *SubscribePacketsResponse) error { 150 | return x.ServerStream.SendMsg(m) 151 | } 152 | 153 | // Relayer_ServiceDesc is the grpc.ServiceDesc for Relayer service. 154 | // It's only intended for direct use with grpc.RegisterService, 155 | // and not to be introspected or modified (even as a copy) 156 | var Relayer_ServiceDesc = grpc.ServiceDesc{ 157 | ServiceName: "relayer.Relayer", 158 | HandlerType: (*RelayerServer)(nil), 159 | Methods: []grpc.MethodDesc{ 160 | { 161 | MethodName: "GetTpuConfigs", 162 | Handler: _Relayer_GetTpuConfigs_Handler, 163 | }, 164 | }, 165 | Streams: []grpc.StreamDesc{ 166 | { 167 | StreamName: "SubscribePackets", 168 | Handler: _Relayer_SubscribePackets_Handler, 169 | ServerStreams: true, 170 | }, 171 | }, 172 | Metadata: "relayer.proto", 173 | } 174 | -------------------------------------------------------------------------------- /mev-protos-go/shared/shared.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // versions: 3 | // protoc-gen-go v1.26.0 4 | // protoc v3.19.3 5 | // source: shared.proto 6 | 7 | package shared 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 | timestamppb "google.golang.org/protobuf/types/known/timestamppb" 13 | reflect "reflect" 14 | sync "sync" 15 | ) 16 | 17 | const ( 18 | // Verify that this generated code is sufficiently up-to-date. 19 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 20 | // Verify that runtime/protoimpl is sufficiently up-to-date. 21 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 22 | ) 23 | 24 | type Header struct { 25 | state protoimpl.MessageState 26 | sizeCache protoimpl.SizeCache 27 | unknownFields protoimpl.UnknownFields 28 | 29 | Ts *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=ts,proto3" json:"ts,omitempty"` 30 | } 31 | 32 | func (x *Header) Reset() { 33 | *x = Header{} 34 | if protoimpl.UnsafeEnabled { 35 | mi := &file_shared_proto_msgTypes[0] 36 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 37 | ms.StoreMessageInfo(mi) 38 | } 39 | } 40 | 41 | func (x *Header) String() string { 42 | return protoimpl.X.MessageStringOf(x) 43 | } 44 | 45 | func (*Header) ProtoMessage() {} 46 | 47 | func (x *Header) ProtoReflect() protoreflect.Message { 48 | mi := &file_shared_proto_msgTypes[0] 49 | if protoimpl.UnsafeEnabled && x != nil { 50 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 51 | if ms.LoadMessageInfo() == nil { 52 | ms.StoreMessageInfo(mi) 53 | } 54 | return ms 55 | } 56 | return mi.MessageOf(x) 57 | } 58 | 59 | // Deprecated: Use Header.ProtoReflect.Descriptor instead. 60 | func (*Header) Descriptor() ([]byte, []int) { 61 | return file_shared_proto_rawDescGZIP(), []int{0} 62 | } 63 | 64 | func (x *Header) GetTs() *timestamppb.Timestamp { 65 | if x != nil { 66 | return x.Ts 67 | } 68 | return nil 69 | } 70 | 71 | type Heartbeat struct { 72 | state protoimpl.MessageState 73 | sizeCache protoimpl.SizeCache 74 | unknownFields protoimpl.UnknownFields 75 | 76 | Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` 77 | } 78 | 79 | func (x *Heartbeat) Reset() { 80 | *x = Heartbeat{} 81 | if protoimpl.UnsafeEnabled { 82 | mi := &file_shared_proto_msgTypes[1] 83 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 84 | ms.StoreMessageInfo(mi) 85 | } 86 | } 87 | 88 | func (x *Heartbeat) String() string { 89 | return protoimpl.X.MessageStringOf(x) 90 | } 91 | 92 | func (*Heartbeat) ProtoMessage() {} 93 | 94 | func (x *Heartbeat) ProtoReflect() protoreflect.Message { 95 | mi := &file_shared_proto_msgTypes[1] 96 | if protoimpl.UnsafeEnabled && x != nil { 97 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 98 | if ms.LoadMessageInfo() == nil { 99 | ms.StoreMessageInfo(mi) 100 | } 101 | return ms 102 | } 103 | return mi.MessageOf(x) 104 | } 105 | 106 | // Deprecated: Use Heartbeat.ProtoReflect.Descriptor instead. 107 | func (*Heartbeat) Descriptor() ([]byte, []int) { 108 | return file_shared_proto_rawDescGZIP(), []int{1} 109 | } 110 | 111 | func (x *Heartbeat) GetCount() uint64 { 112 | if x != nil { 113 | return x.Count 114 | } 115 | return 0 116 | } 117 | 118 | type Socket struct { 119 | state protoimpl.MessageState 120 | sizeCache protoimpl.SizeCache 121 | unknownFields protoimpl.UnknownFields 122 | 123 | Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` 124 | Port int64 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` 125 | } 126 | 127 | func (x *Socket) Reset() { 128 | *x = Socket{} 129 | if protoimpl.UnsafeEnabled { 130 | mi := &file_shared_proto_msgTypes[2] 131 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 132 | ms.StoreMessageInfo(mi) 133 | } 134 | } 135 | 136 | func (x *Socket) String() string { 137 | return protoimpl.X.MessageStringOf(x) 138 | } 139 | 140 | func (*Socket) ProtoMessage() {} 141 | 142 | func (x *Socket) ProtoReflect() protoreflect.Message { 143 | mi := &file_shared_proto_msgTypes[2] 144 | if protoimpl.UnsafeEnabled && x != nil { 145 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 146 | if ms.LoadMessageInfo() == nil { 147 | ms.StoreMessageInfo(mi) 148 | } 149 | return ms 150 | } 151 | return mi.MessageOf(x) 152 | } 153 | 154 | // Deprecated: Use Socket.ProtoReflect.Descriptor instead. 155 | func (*Socket) Descriptor() ([]byte, []int) { 156 | return file_shared_proto_rawDescGZIP(), []int{2} 157 | } 158 | 159 | func (x *Socket) GetIp() string { 160 | if x != nil { 161 | return x.Ip 162 | } 163 | return "" 164 | } 165 | 166 | func (x *Socket) GetPort() int64 { 167 | if x != nil { 168 | return x.Port 169 | } 170 | return 0 171 | } 172 | 173 | var File_shared_proto protoreflect.FileDescriptor 174 | 175 | var file_shared_proto_rawDesc = []byte{ 176 | 0x0a, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 177 | 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 178 | 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 179 | 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 180 | 0x72, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 181 | 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 182 | 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x73, 0x22, 0x21, 0x0a, 183 | 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 184 | 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 185 | 0x22, 0x2c, 0x0a, 0x06, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 186 | 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 187 | 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x36, 188 | 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x6c, 0x6f, 189 | 0x58, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x6f, 0x6c, 0x61, 190 | 0x6e, 0x61, 0x2d, 0x74, 0x72, 0x61, 0x64, 0x65, 0x72, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 191 | 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 192 | } 193 | 194 | var ( 195 | file_shared_proto_rawDescOnce sync.Once 196 | file_shared_proto_rawDescData = file_shared_proto_rawDesc 197 | ) 198 | 199 | func file_shared_proto_rawDescGZIP() []byte { 200 | file_shared_proto_rawDescOnce.Do(func() { 201 | file_shared_proto_rawDescData = protoimpl.X.CompressGZIP(file_shared_proto_rawDescData) 202 | }) 203 | return file_shared_proto_rawDescData 204 | } 205 | 206 | var file_shared_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 207 | var file_shared_proto_goTypes = []interface{}{ 208 | (*Header)(nil), // 0: shared.Header 209 | (*Heartbeat)(nil), // 1: shared.Heartbeat 210 | (*Socket)(nil), // 2: shared.Socket 211 | (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp 212 | } 213 | var file_shared_proto_depIdxs = []int32{ 214 | 3, // 0: shared.Header.ts:type_name -> google.protobuf.Timestamp 215 | 1, // [1:1] is the sub-list for method output_type 216 | 1, // [1:1] is the sub-list for method input_type 217 | 1, // [1:1] is the sub-list for extension type_name 218 | 1, // [1:1] is the sub-list for extension extendee 219 | 0, // [0:1] is the sub-list for field type_name 220 | } 221 | 222 | func init() { file_shared_proto_init() } 223 | func file_shared_proto_init() { 224 | if File_shared_proto != nil { 225 | return 226 | } 227 | if !protoimpl.UnsafeEnabled { 228 | file_shared_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 229 | switch v := v.(*Header); i { 230 | case 0: 231 | return &v.state 232 | case 1: 233 | return &v.sizeCache 234 | case 2: 235 | return &v.unknownFields 236 | default: 237 | return nil 238 | } 239 | } 240 | file_shared_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 241 | switch v := v.(*Heartbeat); i { 242 | case 0: 243 | return &v.state 244 | case 1: 245 | return &v.sizeCache 246 | case 2: 247 | return &v.unknownFields 248 | default: 249 | return nil 250 | } 251 | } 252 | file_shared_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 253 | switch v := v.(*Socket); i { 254 | case 0: 255 | return &v.state 256 | case 1: 257 | return &v.sizeCache 258 | case 2: 259 | return &v.unknownFields 260 | default: 261 | return nil 262 | } 263 | } 264 | } 265 | type x struct{} 266 | out := protoimpl.TypeBuilder{ 267 | File: protoimpl.DescBuilder{ 268 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 269 | RawDescriptor: file_shared_proto_rawDesc, 270 | NumEnums: 0, 271 | NumMessages: 3, 272 | NumExtensions: 0, 273 | NumServices: 0, 274 | }, 275 | GoTypes: file_shared_proto_goTypes, 276 | DependencyIndexes: file_shared_proto_depIdxs, 277 | MessageInfos: file_shared_proto_msgTypes, 278 | }.Build() 279 | File_shared_proto = out.File 280 | file_shared_proto_rawDesc = nil 281 | file_shared_proto_goTypes = nil 282 | file_shared_proto_depIdxs = nil 283 | } 284 | -------------------------------------------------------------------------------- /mev-protos-go/shredstream/shredstream.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // versions: 3 | // protoc-gen-go v1.26.0 4 | // protoc v3.19.3 5 | // source: shredstream.proto 6 | 7 | package shredstream 8 | 9 | import ( 10 | shared "github.com/bloXroute-Labs/solana-trader-proto/mev-protos-go/shared" 11 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 12 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 13 | reflect "reflect" 14 | sync "sync" 15 | ) 16 | 17 | const ( 18 | // Verify that this generated code is sufficiently up-to-date. 19 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 20 | // Verify that runtime/protoimpl is sufficiently up-to-date. 21 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 22 | ) 23 | 24 | type Heartbeat struct { 25 | state protoimpl.MessageState 26 | sizeCache protoimpl.SizeCache 27 | unknownFields protoimpl.UnknownFields 28 | 29 | // don't trust IP:PORT from tcp header since it can be tampered over the wire 30 | // `socket.ip` must match incoming packet's ip. this prevents spamming an unwitting destination 31 | Socket *shared.Socket `protobuf:"bytes,1,opt,name=socket,proto3" json:"socket,omitempty"` 32 | // regions for shredstream proxy to receive shreds from 33 | // list of valid regions: https://jito-labs.gitbook.io/mev/systems/connecting/mainnet 34 | Regions []string `protobuf:"bytes,2,rep,name=regions,proto3" json:"regions,omitempty"` 35 | } 36 | 37 | func (x *Heartbeat) Reset() { 38 | *x = Heartbeat{} 39 | if protoimpl.UnsafeEnabled { 40 | mi := &file_shredstream_proto_msgTypes[0] 41 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 42 | ms.StoreMessageInfo(mi) 43 | } 44 | } 45 | 46 | func (x *Heartbeat) String() string { 47 | return protoimpl.X.MessageStringOf(x) 48 | } 49 | 50 | func (*Heartbeat) ProtoMessage() {} 51 | 52 | func (x *Heartbeat) ProtoReflect() protoreflect.Message { 53 | mi := &file_shredstream_proto_msgTypes[0] 54 | if protoimpl.UnsafeEnabled && x != nil { 55 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 56 | if ms.LoadMessageInfo() == nil { 57 | ms.StoreMessageInfo(mi) 58 | } 59 | return ms 60 | } 61 | return mi.MessageOf(x) 62 | } 63 | 64 | // Deprecated: Use Heartbeat.ProtoReflect.Descriptor instead. 65 | func (*Heartbeat) Descriptor() ([]byte, []int) { 66 | return file_shredstream_proto_rawDescGZIP(), []int{0} 67 | } 68 | 69 | func (x *Heartbeat) GetSocket() *shared.Socket { 70 | if x != nil { 71 | return x.Socket 72 | } 73 | return nil 74 | } 75 | 76 | func (x *Heartbeat) GetRegions() []string { 77 | if x != nil { 78 | return x.Regions 79 | } 80 | return nil 81 | } 82 | 83 | type HeartbeatResponse struct { 84 | state protoimpl.MessageState 85 | sizeCache protoimpl.SizeCache 86 | unknownFields protoimpl.UnknownFields 87 | 88 | // client must respond within `ttl_ms` to keep stream alive 89 | TtlMs uint32 `protobuf:"varint,1,opt,name=ttl_ms,json=ttlMs,proto3" json:"ttl_ms,omitempty"` 90 | } 91 | 92 | func (x *HeartbeatResponse) Reset() { 93 | *x = HeartbeatResponse{} 94 | if protoimpl.UnsafeEnabled { 95 | mi := &file_shredstream_proto_msgTypes[1] 96 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 97 | ms.StoreMessageInfo(mi) 98 | } 99 | } 100 | 101 | func (x *HeartbeatResponse) String() string { 102 | return protoimpl.X.MessageStringOf(x) 103 | } 104 | 105 | func (*HeartbeatResponse) ProtoMessage() {} 106 | 107 | func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message { 108 | mi := &file_shredstream_proto_msgTypes[1] 109 | if protoimpl.UnsafeEnabled && x != nil { 110 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 111 | if ms.LoadMessageInfo() == nil { 112 | ms.StoreMessageInfo(mi) 113 | } 114 | return ms 115 | } 116 | return mi.MessageOf(x) 117 | } 118 | 119 | // Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead. 120 | func (*HeartbeatResponse) Descriptor() ([]byte, []int) { 121 | return file_shredstream_proto_rawDescGZIP(), []int{1} 122 | } 123 | 124 | func (x *HeartbeatResponse) GetTtlMs() uint32 { 125 | if x != nil { 126 | return x.TtlMs 127 | } 128 | return 0 129 | } 130 | 131 | var File_shredstream_proto protoreflect.FileDescriptor 132 | 133 | var file_shredstream_proto_rawDesc = []byte{ 134 | 0x0a, 0x11, 0x73, 0x68, 0x72, 0x65, 0x64, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x70, 0x72, 135 | 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x73, 0x68, 0x72, 0x65, 0x64, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 136 | 0x1a, 0x0c, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4d, 137 | 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x73, 138 | 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x68, 139 | 0x61, 0x72, 0x65, 0x64, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x73, 0x6f, 0x63, 140 | 0x6b, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 141 | 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2a, 0x0a, 142 | 0x11, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 143 | 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x74, 0x6c, 0x5f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 144 | 0x28, 0x0d, 0x52, 0x05, 0x74, 0x74, 0x6c, 0x4d, 0x73, 0x32, 0x58, 0x0a, 0x0b, 0x53, 0x68, 0x72, 145 | 0x65, 0x64, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x49, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 146 | 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x16, 0x2e, 0x73, 0x68, 0x72, 0x65, 147 | 0x64, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 148 | 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x68, 0x72, 0x65, 0x64, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 149 | 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 150 | 0x65, 0x22, 0x00, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 151 | 0x6d, 0x2f, 0x62, 0x6c, 0x6f, 0x58, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 152 | 0x2f, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2d, 0x74, 0x72, 0x61, 0x64, 0x65, 0x72, 0x2d, 0x70, 153 | 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x68, 0x72, 0x65, 0x64, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 154 | 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 155 | } 156 | 157 | var ( 158 | file_shredstream_proto_rawDescOnce sync.Once 159 | file_shredstream_proto_rawDescData = file_shredstream_proto_rawDesc 160 | ) 161 | 162 | func file_shredstream_proto_rawDescGZIP() []byte { 163 | file_shredstream_proto_rawDescOnce.Do(func() { 164 | file_shredstream_proto_rawDescData = protoimpl.X.CompressGZIP(file_shredstream_proto_rawDescData) 165 | }) 166 | return file_shredstream_proto_rawDescData 167 | } 168 | 169 | var file_shredstream_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 170 | var file_shredstream_proto_goTypes = []interface{}{ 171 | (*Heartbeat)(nil), // 0: shredstream.Heartbeat 172 | (*HeartbeatResponse)(nil), // 1: shredstream.HeartbeatResponse 173 | (*shared.Socket)(nil), // 2: shared.Socket 174 | } 175 | var file_shredstream_proto_depIdxs = []int32{ 176 | 2, // 0: shredstream.Heartbeat.socket:type_name -> shared.Socket 177 | 0, // 1: shredstream.Shredstream.SendHeartbeat:input_type -> shredstream.Heartbeat 178 | 1, // 2: shredstream.Shredstream.SendHeartbeat:output_type -> shredstream.HeartbeatResponse 179 | 2, // [2:3] is the sub-list for method output_type 180 | 1, // [1:2] is the sub-list for method input_type 181 | 1, // [1:1] is the sub-list for extension type_name 182 | 1, // [1:1] is the sub-list for extension extendee 183 | 0, // [0:1] is the sub-list for field type_name 184 | } 185 | 186 | func init() { file_shredstream_proto_init() } 187 | func file_shredstream_proto_init() { 188 | if File_shredstream_proto != nil { 189 | return 190 | } 191 | if !protoimpl.UnsafeEnabled { 192 | file_shredstream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 193 | switch v := v.(*Heartbeat); i { 194 | case 0: 195 | return &v.state 196 | case 1: 197 | return &v.sizeCache 198 | case 2: 199 | return &v.unknownFields 200 | default: 201 | return nil 202 | } 203 | } 204 | file_shredstream_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 205 | switch v := v.(*HeartbeatResponse); i { 206 | case 0: 207 | return &v.state 208 | case 1: 209 | return &v.sizeCache 210 | case 2: 211 | return &v.unknownFields 212 | default: 213 | return nil 214 | } 215 | } 216 | } 217 | type x struct{} 218 | out := protoimpl.TypeBuilder{ 219 | File: protoimpl.DescBuilder{ 220 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 221 | RawDescriptor: file_shredstream_proto_rawDesc, 222 | NumEnums: 0, 223 | NumMessages: 2, 224 | NumExtensions: 0, 225 | NumServices: 1, 226 | }, 227 | GoTypes: file_shredstream_proto_goTypes, 228 | DependencyIndexes: file_shredstream_proto_depIdxs, 229 | MessageInfos: file_shredstream_proto_msgTypes, 230 | }.Build() 231 | File_shredstream_proto = out.File 232 | file_shredstream_proto_rawDesc = nil 233 | file_shredstream_proto_goTypes = nil 234 | file_shredstream_proto_depIdxs = nil 235 | } 236 | -------------------------------------------------------------------------------- /mev-protos-go/shredstream/shredstream_grpc.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 | 3 | package shredstream 4 | 5 | import ( 6 | context "context" 7 | grpc "google.golang.org/grpc" 8 | codes "google.golang.org/grpc/codes" 9 | status "google.golang.org/grpc/status" 10 | ) 11 | 12 | // This is a compile-time assertion to ensure that this generated file 13 | // is compatible with the grpc package it is being compiled against. 14 | // Requires gRPC-Go v1.32.0 or later. 15 | const _ = grpc.SupportPackageIsVersion7 16 | 17 | // ShredstreamClient is the client API for Shredstream service. 18 | // 19 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 20 | type ShredstreamClient interface { 21 | // RPC endpoint to send heartbeats to keep shreds flowing 22 | SendHeartbeat(ctx context.Context, in *Heartbeat, opts ...grpc.CallOption) (*HeartbeatResponse, error) 23 | } 24 | 25 | type shredstreamClient struct { 26 | cc grpc.ClientConnInterface 27 | } 28 | 29 | func NewShredstreamClient(cc grpc.ClientConnInterface) ShredstreamClient { 30 | return &shredstreamClient{cc} 31 | } 32 | 33 | func (c *shredstreamClient) SendHeartbeat(ctx context.Context, in *Heartbeat, opts ...grpc.CallOption) (*HeartbeatResponse, error) { 34 | out := new(HeartbeatResponse) 35 | err := c.cc.Invoke(ctx, "/shredstream.Shredstream/SendHeartbeat", in, out, opts...) 36 | if err != nil { 37 | return nil, err 38 | } 39 | return out, nil 40 | } 41 | 42 | // ShredstreamServer is the server API for Shredstream service. 43 | // All implementations must embed UnimplementedShredstreamServer 44 | // for forward compatibility 45 | type ShredstreamServer interface { 46 | // RPC endpoint to send heartbeats to keep shreds flowing 47 | SendHeartbeat(context.Context, *Heartbeat) (*HeartbeatResponse, error) 48 | mustEmbedUnimplementedShredstreamServer() 49 | } 50 | 51 | // UnimplementedShredstreamServer must be embedded to have forward compatible implementations. 52 | type UnimplementedShredstreamServer struct { 53 | } 54 | 55 | func (UnimplementedShredstreamServer) SendHeartbeat(context.Context, *Heartbeat) (*HeartbeatResponse, error) { 56 | return nil, status.Errorf(codes.Unimplemented, "method SendHeartbeat not implemented") 57 | } 58 | func (UnimplementedShredstreamServer) mustEmbedUnimplementedShredstreamServer() {} 59 | 60 | // UnsafeShredstreamServer may be embedded to opt out of forward compatibility for this service. 61 | // Use of this interface is not recommended, as added methods to ShredstreamServer will 62 | // result in compilation errors. 63 | type UnsafeShredstreamServer interface { 64 | mustEmbedUnimplementedShredstreamServer() 65 | } 66 | 67 | func RegisterShredstreamServer(s grpc.ServiceRegistrar, srv ShredstreamServer) { 68 | s.RegisterService(&Shredstream_ServiceDesc, srv) 69 | } 70 | 71 | func _Shredstream_SendHeartbeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 72 | in := new(Heartbeat) 73 | if err := dec(in); err != nil { 74 | return nil, err 75 | } 76 | if interceptor == nil { 77 | return srv.(ShredstreamServer).SendHeartbeat(ctx, in) 78 | } 79 | info := &grpc.UnaryServerInfo{ 80 | Server: srv, 81 | FullMethod: "/shredstream.Shredstream/SendHeartbeat", 82 | } 83 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 84 | return srv.(ShredstreamServer).SendHeartbeat(ctx, req.(*Heartbeat)) 85 | } 86 | return interceptor(ctx, in, info, handler) 87 | } 88 | 89 | // Shredstream_ServiceDesc is the grpc.ServiceDesc for Shredstream service. 90 | // It's only intended for direct use with grpc.RegisterService, 91 | // and not to be introspected or modified (even as a copy) 92 | var Shredstream_ServiceDesc = grpc.ServiceDesc{ 93 | ServiceName: "shredstream.Shredstream", 94 | HandlerType: (*ShredstreamServer)(nil), 95 | Methods: []grpc.MethodDesc{ 96 | { 97 | MethodName: "SendHeartbeat", 98 | Handler: _Shredstream_SendHeartbeat_Handler, 99 | }, 100 | }, 101 | Streams: []grpc.StreamDesc{}, 102 | Metadata: "shredstream.proto", 103 | } 104 | -------------------------------------------------------------------------------- /mev-protos-go/trace_shred/trace_shred.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // versions: 3 | // protoc-gen-go v1.26.0 4 | // protoc v3.19.3 5 | // source: trace_shred.proto 6 | 7 | package trace_shred 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 | timestamppb "google.golang.org/protobuf/types/known/timestamppb" 13 | reflect "reflect" 14 | sync "sync" 15 | ) 16 | 17 | const ( 18 | // Verify that this generated code is sufficiently up-to-date. 19 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 20 | // Verify that runtime/protoimpl is sufficiently up-to-date. 21 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 22 | ) 23 | 24 | type TraceShred struct { 25 | state protoimpl.MessageState 26 | sizeCache protoimpl.SizeCache 27 | unknownFields protoimpl.UnknownFields 28 | 29 | // source region, one of: https://jito-labs.gitbook.io/mev/systems/connecting/mainnet 30 | Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` 31 | // timestamp of creation 32 | CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` 33 | // monotonically increases, resets upon service restart 34 | SeqNum uint32 `protobuf:"varint,3,opt,name=seq_num,json=seqNum,proto3" json:"seq_num,omitempty"` 35 | } 36 | 37 | func (x *TraceShred) Reset() { 38 | *x = TraceShred{} 39 | if protoimpl.UnsafeEnabled { 40 | mi := &file_trace_shred_proto_msgTypes[0] 41 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 42 | ms.StoreMessageInfo(mi) 43 | } 44 | } 45 | 46 | func (x *TraceShred) String() string { 47 | return protoimpl.X.MessageStringOf(x) 48 | } 49 | 50 | func (*TraceShred) ProtoMessage() {} 51 | 52 | func (x *TraceShred) ProtoReflect() protoreflect.Message { 53 | mi := &file_trace_shred_proto_msgTypes[0] 54 | if protoimpl.UnsafeEnabled && x != nil { 55 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 56 | if ms.LoadMessageInfo() == nil { 57 | ms.StoreMessageInfo(mi) 58 | } 59 | return ms 60 | } 61 | return mi.MessageOf(x) 62 | } 63 | 64 | // Deprecated: Use TraceShred.ProtoReflect.Descriptor instead. 65 | func (*TraceShred) Descriptor() ([]byte, []int) { 66 | return file_trace_shred_proto_rawDescGZIP(), []int{0} 67 | } 68 | 69 | func (x *TraceShred) GetRegion() string { 70 | if x != nil { 71 | return x.Region 72 | } 73 | return "" 74 | } 75 | 76 | func (x *TraceShred) GetCreatedAt() *timestamppb.Timestamp { 77 | if x != nil { 78 | return x.CreatedAt 79 | } 80 | return nil 81 | } 82 | 83 | func (x *TraceShred) GetSeqNum() uint32 { 84 | if x != nil { 85 | return x.SeqNum 86 | } 87 | return 0 88 | } 89 | 90 | var File_trace_shred_proto protoreflect.FileDescriptor 91 | 92 | var file_trace_shred_proto_rawDesc = []byte{ 93 | 0x0a, 0x11, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 94 | 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x72, 0x65, 0x64, 95 | 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 96 | 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 97 | 0x6f, 0x22, 0x78, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x68, 0x72, 0x65, 0x64, 0x12, 98 | 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 99 | 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 100 | 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 101 | 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 102 | 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 103 | 0x41, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x71, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 104 | 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x42, 0x3b, 0x5a, 0x39, 0x67, 105 | 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x6c, 0x6f, 0x58, 0x72, 0x6f, 106 | 0x75, 0x74, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2d, 107 | 0x74, 0x72, 0x61, 0x64, 0x65, 0x72, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 108 | 0x63, 0x65, 0x5f, 0x73, 0x68, 0x72, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 109 | } 110 | 111 | var ( 112 | file_trace_shred_proto_rawDescOnce sync.Once 113 | file_trace_shred_proto_rawDescData = file_trace_shred_proto_rawDesc 114 | ) 115 | 116 | func file_trace_shred_proto_rawDescGZIP() []byte { 117 | file_trace_shred_proto_rawDescOnce.Do(func() { 118 | file_trace_shred_proto_rawDescData = protoimpl.X.CompressGZIP(file_trace_shred_proto_rawDescData) 119 | }) 120 | return file_trace_shred_proto_rawDescData 121 | } 122 | 123 | var file_trace_shred_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 124 | var file_trace_shred_proto_goTypes = []interface{}{ 125 | (*TraceShred)(nil), // 0: trace_shred.TraceShred 126 | (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp 127 | } 128 | var file_trace_shred_proto_depIdxs = []int32{ 129 | 1, // 0: trace_shred.TraceShred.created_at:type_name -> google.protobuf.Timestamp 130 | 1, // [1:1] is the sub-list for method output_type 131 | 1, // [1:1] is the sub-list for method input_type 132 | 1, // [1:1] is the sub-list for extension type_name 133 | 1, // [1:1] is the sub-list for extension extendee 134 | 0, // [0:1] is the sub-list for field type_name 135 | } 136 | 137 | func init() { file_trace_shred_proto_init() } 138 | func file_trace_shred_proto_init() { 139 | if File_trace_shred_proto != nil { 140 | return 141 | } 142 | if !protoimpl.UnsafeEnabled { 143 | file_trace_shred_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 144 | switch v := v.(*TraceShred); i { 145 | case 0: 146 | return &v.state 147 | case 1: 148 | return &v.sizeCache 149 | case 2: 150 | return &v.unknownFields 151 | default: 152 | return nil 153 | } 154 | } 155 | } 156 | type x struct{} 157 | out := protoimpl.TypeBuilder{ 158 | File: protoimpl.DescBuilder{ 159 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 160 | RawDescriptor: file_trace_shred_proto_rawDesc, 161 | NumEnums: 0, 162 | NumMessages: 1, 163 | NumExtensions: 0, 164 | NumServices: 0, 165 | }, 166 | GoTypes: file_trace_shred_proto_goTypes, 167 | DependencyIndexes: file_trace_shred_proto_depIdxs, 168 | MessageInfos: file_trace_shred_proto_msgTypes, 169 | }.Build() 170 | File_trace_shred_proto = out.File 171 | file_trace_shred_proto_rawDesc = nil 172 | file_trace_shred_proto_goTypes = nil 173 | file_trace_shred_proto_depIdxs = nil 174 | } 175 | -------------------------------------------------------------------------------- /proto/Dockerfile-go: -------------------------------------------------------------------------------- 1 | FROM golang:1.17 2 | ENV PROTOC_VERSION=3.19.3 3 | 4 | RUN apt-get update && apt-get install unzip 5 | 6 | RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ 7 | unzip -o /go/protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local bin/protoc && \ 8 | unzip -o /go/protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local include/* && \ 9 | rm -rf protoc-${PROTOC_VERSION}-linux-x86_64.zip 10 | 11 | RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26 && \ 12 | go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1 && \ 13 | go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.10 && \ 14 | go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.10 15 | 16 | RUN mkdir -p /go/protobuf/out 17 | RUN mkdir -p /go/protobuf/in 18 | 19 | WORKDIR "/go/protobuf/in" -------------------------------------------------------------------------------- /proto/Dockerfile-js: -------------------------------------------------------------------------------- 1 | FROM node:lts 2 | 3 | RUN npm install -g grpc-tools grpc_tools_node_protoc_ts 4 | RUN mkdir -p /home/node/out 5 | RUN mkdir -p /home/node/in 6 | 7 | WORKDIR "/home/node/in" 8 | -------------------------------------------------------------------------------- /proto/common.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | option go_package = "github.com/bloXroute-Labs/solana-trader-proto/common"; 3 | 4 | package common; 5 | 6 | enum OrderType { 7 | OT_MARKET = 0; 8 | OT_LIMIT = 1; // MARKET and LIMIT are mutually exclusive 9 | OT_IOC = 2; // immediate or cancel 10 | OT_POST = 3; 11 | } 12 | 13 | // perp types : limit, trigger_market, trigger_limit, market, oracle 14 | enum PerpOrderType { 15 | POT_UNKNOWN = 0; 16 | POT_MARKET = 1; 17 | POT_LIMIT = 2; 18 | POT_TRIGGER_MARKET = 3; 19 | POT_TRIGGER_LIMIT = 4; 20 | } 21 | 22 | enum PerpPositionSide { 23 | PS_UNKNOWN = 0; 24 | PS_LONG = 1; 25 | PS_SHORT = 2; 26 | } 27 | 28 | enum PostOnlyParams { 29 | PO_NONE = 0; 30 | PO_MUST_POST_ONLY = 1; 31 | PO_TRY_POST_ONLY = 2; 32 | } 33 | 34 | // don't use this in api.proto 35 | enum MarginContract { 36 | ALL_SPOTS = 0; // ALL 37 | SOL_SPOT = 1; // SOL 38 | USDC_SPOT = 2; // USDC 39 | MSOL_SPOT = 3; // MSOL 40 | WBTC_SPOT = 4; // WBTC 41 | WETH_SPOT = 5; // WETH 42 | USDT_SPOT = 6; // USDT 43 | } 44 | 45 | enum PerpContract { 46 | ALL = 0; 47 | SOL_PERP = 1; // SOL-PERP 48 | ETH_PERP = 2; // ETH-PERP 49 | BTC_PERP = 3; // BTC-PERP 50 | APT_PERP = 4; // APT-PERP 51 | BONK_PERP = 5; // 1MBONK-PERP 52 | MATIC_PERP = 6; // MATIC-PERP 53 | ARB_PERP = 7; // ARB-PERP 54 | DOGE_PERP = 8; // DOGE-PERP 55 | BNB_PERP = 9; // BNB-PERP 56 | SUI_PERP = 10; // SUI-PERP 57 | PEPE_PERP = 11; // PEPE-PERP 58 | OP_PERP = 12; // OP_PERP 59 | RNDR_PERP = 13; // RNDR_PERP 60 | XRP_PERP = 14; // XRP_PERP 61 | } 62 | 63 | enum PerpCollateralType { 64 | PCT_DEPOSIT = 0; 65 | PCT_WITHDRAWAL = 1; 66 | PCT_TRANSFER = 2; 67 | } 68 | 69 | enum PerpCollateralToken { 70 | PCTK_USDC = 0; 71 | PCTK_SOL = 1; 72 | } 73 | 74 | enum Infinity { 75 | INF_NOT = 0; 76 | INF_POSITIVE = 1; 77 | INF_NEGATIVE = 2; 78 | } 79 | 80 | message PriceImpactPercent { 81 | double percent = 1; 82 | Infinity infinity = 2; 83 | } 84 | 85 | message PriceImpactPercentV2 { 86 | double percent = 1; 87 | string infinity = 2; // NOT, NEGATIVE, POSITIVE 88 | } 89 | 90 | message Fee { 91 | float amount = 1; 92 | string mint = 2; 93 | float percent = 3; 94 | } 95 | 96 | -------------------------------------------------------------------------------- /proto/google/api/annotations.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.api; 18 | 19 | import "google/api/http.proto"; 20 | import "google/protobuf/descriptor.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "AnnotationsProto"; 25 | option java_package = "com.google.api"; 26 | option objc_class_prefix = "GAPI"; 27 | 28 | extend google.protobuf.MethodOptions { 29 | // See `HttpRule`. 30 | HttpRule http = 72295728; 31 | } -------------------------------------------------------------------------------- /proto/google/api/field_behavior.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.api; 18 | 19 | import "google/protobuf/descriptor.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "FieldBehaviorProto"; 24 | option java_package = "com.google.api"; 25 | option objc_class_prefix = "GAPI"; 26 | 27 | extend google.protobuf.FieldOptions { 28 | // A designation of a specific field behavior (required, output only, etc.) 29 | // in protobuf messages. 30 | // 31 | // Examples: 32 | // 33 | // string name = 1 [(google.api.field_behavior) = REQUIRED]; 34 | // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 35 | // google.protobuf.Duration ttl = 1 36 | // [(google.api.field_behavior) = INPUT_ONLY]; 37 | // google.protobuf.Timestamp expire_time = 1 38 | // [(google.api.field_behavior) = OUTPUT_ONLY, 39 | // (google.api.field_behavior) = IMMUTABLE]; 40 | repeated google.api.FieldBehavior field_behavior = 1052; 41 | } 42 | 43 | // An indicator of the behavior of a given field (for example, that a field 44 | // is required in requests, or given as output but ignored as input). 45 | // This **does not** change the behavior in protocol buffers itself; it only 46 | // denotes the behavior and may affect how API tooling handles the field. 47 | // 48 | // Note: This enum **may** receive new values in the future. 49 | enum FieldBehavior { 50 | // Conventional default for enums. Do not use this. 51 | FIELD_BEHAVIOR_UNSPECIFIED = 0; 52 | 53 | // Specifically denotes a field as optional. 54 | // While all fields in protocol buffers are optional, this may be specified 55 | // for emphasis if appropriate. 56 | OPTIONAL = 1; 57 | 58 | // Denotes a field as required. 59 | // This indicates that the field **must** be provided as part of the request, 60 | // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). 61 | REQUIRED = 2; 62 | 63 | // Denotes a field as output only. 64 | // This indicates that the field is provided in responses, but including the 65 | // field in a request does nothing (the server *must* ignore it and 66 | // *must not* throw an error as a result of the field's presence). 67 | OUTPUT_ONLY = 3; 68 | 69 | // Denotes a field as input only. 70 | // This indicates that the field is provided in requests, and the 71 | // corresponding field is not included in output. 72 | INPUT_ONLY = 4; 73 | 74 | // Denotes a field as immutable. 75 | // This indicates that the field may be set once in a request to create a 76 | // resource, but may not be changed thereafter. 77 | IMMUTABLE = 5; 78 | 79 | // Denotes that a (repeated) field is an unordered list. 80 | // This indicates that the service may provide the elements of the list 81 | // in any arbitrary order, rather than the order the user originally 82 | // provided. Additionally, the list's order may or may not be stable. 83 | UNORDERED_LIST = 6; 84 | 85 | // Denotes that this field returns a non-empty default value if not set. 86 | // This indicates that if the user provides the empty value in a request, 87 | // a non-empty value will be returned. The user will not be aware of what 88 | // non-empty value to expect. 89 | NON_EMPTY_DEFAULT = 7; 90 | } -------------------------------------------------------------------------------- /proto/google/api/httpbody.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.api; 18 | 19 | import "google/protobuf/any.proto"; 20 | 21 | option cc_enable_arenas = true; 22 | option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "HttpBodyProto"; 25 | option java_package = "com.google.api"; 26 | option objc_class_prefix = "GAPI"; 27 | 28 | // Message that represents an arbitrary HTTP body. It should only be used for 29 | // payload formats that can't be represented as JSON, such as raw binary or 30 | // an HTML page. 31 | // 32 | // 33 | // This message can be used both in streaming and non-streaming API methods in 34 | // the request as well as the response. 35 | // 36 | // It can be used as a top-level request field, which is convenient if one 37 | // wants to extract parameters from either the URL or HTTP template into the 38 | // request fields and also want access to the raw HTTP body. 39 | // 40 | // Example: 41 | // 42 | // message GetResourceRequest { 43 | // // A unique request id. 44 | // string request_id = 1; 45 | // 46 | // // The raw HTTP body is bound to this field. 47 | // google.api.HttpBody http_body = 2; 48 | // 49 | // } 50 | // 51 | // service ResourceService { 52 | // rpc GetResource(GetResourceRequest) 53 | // returns (google.api.HttpBody); 54 | // rpc UpdateResource(google.api.HttpBody) 55 | // returns (google.protobuf.Empty); 56 | // 57 | // } 58 | // 59 | // Example with streaming methods: 60 | // 61 | // service CaldavService { 62 | // rpc GetCalendar(stream google.api.HttpBody) 63 | // returns (stream google.api.HttpBody); 64 | // rpc UpdateCalendar(stream google.api.HttpBody) 65 | // returns (stream google.api.HttpBody); 66 | // 67 | // } 68 | // 69 | // Use of this type only changes how the request and response bodies are 70 | // handled, all other features will continue to work unchanged. 71 | message HttpBody { 72 | // The HTTP Content-Type header value specifying the content type of the body. 73 | string content_type = 1; 74 | 75 | // The HTTP request/response body as raw binary. 76 | bytes data = 2; 77 | 78 | // Application specific response metadata. Must be set in the first response 79 | // for streaming APIs. 80 | repeated google.protobuf.Any extensions = 3; 81 | } -------------------------------------------------------------------------------- /proto/google/api/visibility.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.api; 18 | 19 | import "google/protobuf/descriptor.proto"; 20 | 21 | option cc_enable_arenas = true; 22 | option go_package = "google.golang.org/genproto/googleapis/api/visibility;visibility"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "VisibilityProto"; 25 | option java_package = "com.google.api"; 26 | option objc_class_prefix = "GAPI"; 27 | 28 | extend google.protobuf.EnumOptions { 29 | // See `VisibilityRule`. 30 | google.api.VisibilityRule enum_visibility = 72295727; 31 | } 32 | 33 | extend google.protobuf.EnumValueOptions { 34 | // See `VisibilityRule`. 35 | google.api.VisibilityRule value_visibility = 72295727; 36 | } 37 | 38 | extend google.protobuf.FieldOptions { 39 | // See `VisibilityRule`. 40 | google.api.VisibilityRule field_visibility = 72295727; 41 | } 42 | 43 | extend google.protobuf.MessageOptions { 44 | // See `VisibilityRule`. 45 | google.api.VisibilityRule message_visibility = 72295727; 46 | } 47 | 48 | extend google.protobuf.MethodOptions { 49 | // See `VisibilityRule`. 50 | google.api.VisibilityRule method_visibility = 72295727; 51 | } 52 | 53 | extend google.protobuf.ServiceOptions { 54 | // See `VisibilityRule`. 55 | google.api.VisibilityRule api_visibility = 72295727; 56 | } 57 | 58 | // `Visibility` defines restrictions for the visibility of service 59 | // elements. Restrictions are specified using visibility labels 60 | // (e.g., PREVIEW) that are elsewhere linked to users and projects. 61 | // 62 | // Users and projects can have access to more than one visibility label. The 63 | // effective visibility for multiple labels is the union of each label's 64 | // elements, plus any unrestricted elements. 65 | // 66 | // If an element and its parents have no restrictions, visibility is 67 | // unconditionally granted. 68 | // 69 | // Example: 70 | // 71 | // visibility: 72 | // rules: 73 | // - selector: google.calendar.Calendar.EnhancedSearch 74 | // restriction: PREVIEW 75 | // - selector: google.calendar.Calendar.Delegate 76 | // restriction: INTERNAL 77 | // 78 | // Here, all methods are publicly visible except for the restricted methods 79 | // EnhancedSearch and Delegate. 80 | message Visibility { 81 | // A list of visibility rules that apply to individual API elements. 82 | // 83 | // **NOTE:** All service configuration rules follow "last one wins" order. 84 | repeated VisibilityRule rules = 1; 85 | } 86 | 87 | // A visibility rule provides visibility configuration for an individual API 88 | // element. 89 | message VisibilityRule { 90 | // Selects methods, messages, fields, enums, etc. to which this rule applies. 91 | // 92 | // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. 93 | string selector = 1; 94 | 95 | // A comma-separated list of visibility labels that apply to the `selector`. 96 | // Any of the listed labels can be used to grant the visibility. 97 | // 98 | // If a rule has multiple labels, removing one of the labels but not all of 99 | // them can break clients. 100 | // 101 | // Example: 102 | // 103 | // visibility: 104 | // rules: 105 | // - selector: google.calendar.Calendar.EnhancedSearch 106 | // restriction: INTERNAL, PREVIEW 107 | // 108 | // Removing INTERNAL from this restriction will break clients that rely on 109 | // this method and only had access to it through INTERNAL. 110 | string restriction = 2; 111 | } -------------------------------------------------------------------------------- /proto/google/protobuf/any.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option go_package = "github.com/golang/protobuf/ptypes/any"; 37 | option java_package = "com.google.protobuf"; 38 | option java_outer_classname = "AnyProto"; 39 | option java_multiple_files = true; 40 | option objc_class_prefix = "GPB"; 41 | 42 | // `Any` contains an arbitrary serialized protocol buffer message along with a 43 | // URL that describes the type of the serialized message. 44 | // 45 | // Protobuf library provides support to pack/unpack Any values in the form 46 | // of utility functions or additional generated methods of the Any type. 47 | // 48 | // Example 1: Pack and unpack a message in C++. 49 | // 50 | // Foo foo = ...; 51 | // Any any; 52 | // any.PackFrom(foo); 53 | // ... 54 | // if (any.UnpackTo(&foo)) { 55 | // ... 56 | // } 57 | // 58 | // Example 2: Pack and unpack a message in Java. 59 | // 60 | // Foo foo = ...; 61 | // Any any = Any.pack(foo); 62 | // ... 63 | // if (any.is(Foo.class)) { 64 | // foo = any.unpack(Foo.class); 65 | // } 66 | // 67 | // Example 3: Pack and unpack a message in Python. 68 | // 69 | // foo = Foo(...) 70 | // any = Any() 71 | // any.Pack(foo) 72 | // ... 73 | // if any.Is(Foo.DESCRIPTOR): 74 | // any.Unpack(foo) 75 | // ... 76 | // 77 | // Example 4: Pack and unpack a message in Go 78 | // 79 | // foo := &pb.Foo{...} 80 | // any, err := ptypes.MarshalAny(foo) 81 | // ... 82 | // foo := &pb.Foo{} 83 | // if err := ptypes.UnmarshalAny(any, foo); err != nil { 84 | // ... 85 | // } 86 | // 87 | // The pack methods provided by protobuf library will by default use 88 | // 'type.googleapis.com/full.type.name' as the type URL and the unpack 89 | // methods only use the fully qualified type name after the last '/' 90 | // in the type URL, for example "foo.bar.com/x/y.z" will yield type 91 | // name "y.z". 92 | // 93 | // 94 | // JSON 95 | // ==== 96 | // The JSON representation of an `Any` value uses the regular 97 | // representation of the deserialized, embedded message, with an 98 | // additional field `@type` which contains the type URL. Example: 99 | // 100 | // package google.profile; 101 | // message Person { 102 | // string first_name = 1; 103 | // string last_name = 2; 104 | // } 105 | // 106 | // { 107 | // "@type": "type.googleapis.com/google.profile.Person", 108 | // "firstName": , 109 | // "lastName": 110 | // } 111 | // 112 | // If the embedded message type is well-known and has a custom JSON 113 | // representation, that representation will be embedded adding a field 114 | // `value` which holds the custom JSON in addition to the `@type` 115 | // field. Example (for message [google.protobuf.Duration][]): 116 | // 117 | // { 118 | // "@type": "type.googleapis.com/google.protobuf.Duration", 119 | // "value": "1.212s" 120 | // } 121 | // 122 | message Any { 123 | // A URL/resource name that uniquely identifies the type of the serialized 124 | // protocol buffer message. This string must contain at least 125 | // one "/" character. The last segment of the URL's path must represent 126 | // the fully qualified name of the type (as in 127 | // `path/google.protobuf.Duration`). The name should be in a canonical form 128 | // (e.g., leading "." is not accepted). 129 | // 130 | // In practice, teams usually precompile into the binary all types that they 131 | // expect it to use in the context of Any. However, for URLs which use the 132 | // scheme `http`, `https`, or no scheme, one can optionally set up a type 133 | // server that maps type URLs to message definitions as follows: 134 | // 135 | // * If no scheme is provided, `https` is assumed. 136 | // * An HTTP GET on the URL must yield a [google.protobuf.Type][] 137 | // value in binary format, or produce an error. 138 | // * Applications are allowed to cache lookup results based on the 139 | // URL, or have them precompiled into a binary to avoid any 140 | // lookup. Therefore, binary compatibility needs to be preserved 141 | // on changes to types. (Use versioned type names to manage 142 | // breaking changes.) 143 | // 144 | // Note: this functionality is not currently available in the official 145 | // protobuf release, and it is not used for type URLs beginning with 146 | // type.googleapis.com. 147 | // 148 | // Schemes other than `http`, `https` (or the empty scheme) might be 149 | // used with implementation specific semantics. 150 | // 151 | string type_url = 1; 152 | 153 | // Must be a valid serialized protocol buffer of the above specified type. 154 | bytes value = 2; 155 | } 156 | -------------------------------------------------------------------------------- /proto/google/protobuf/api.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | import "google/protobuf/source_context.proto"; 36 | import "google/protobuf/type.proto"; 37 | 38 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 39 | option java_package = "com.google.protobuf"; 40 | option java_outer_classname = "ApiProto"; 41 | option java_multiple_files = true; 42 | option objc_class_prefix = "GPB"; 43 | option go_package = "google.golang.org/genproto/protobuf/api;api"; 44 | 45 | // Api is a light-weight descriptor for an API Interface. 46 | // 47 | // Interfaces are also described as "protocol buffer services" in some contexts, 48 | // such as by the "service" keyword in a .proto file, but they are different 49 | // from API Services, which represent a concrete implementation of an interface 50 | // as opposed to simply a description of methods and bindings. They are also 51 | // sometimes simply referred to as "APIs" in other contexts, such as the name of 52 | // this message itself. See https://cloud.google.com/apis/design/glossary for 53 | // detailed terminology. 54 | message Api { 55 | 56 | // The fully qualified name of this interface, including package name 57 | // followed by the interface's simple name. 58 | string name = 1; 59 | 60 | // The methods of this interface, in unspecified order. 61 | repeated Method methods = 2; 62 | 63 | // Any metadata attached to the interface. 64 | repeated Option options = 3; 65 | 66 | // A version string for this interface. If specified, must have the form 67 | // `major-version.minor-version`, as in `1.10`. If the minor version is 68 | // omitted, it defaults to zero. If the entire version field is empty, the 69 | // major version is derived from the package name, as outlined below. If the 70 | // field is not empty, the version in the package name will be verified to be 71 | // consistent with what is provided here. 72 | // 73 | // The versioning schema uses [semantic 74 | // versioning](http://semver.org) where the major version number 75 | // indicates a breaking change and the minor version an additive, 76 | // non-breaking change. Both version numbers are signals to users 77 | // what to expect from different versions, and should be carefully 78 | // chosen based on the product plan. 79 | // 80 | // The major version is also reflected in the package name of the 81 | // interface, which must end in `v`, as in 82 | // `google.feature.v1`. For major versions 0 and 1, the suffix can 83 | // be omitted. Zero major versions must only be used for 84 | // experimental, non-GA interfaces. 85 | // 86 | // 87 | string version = 4; 88 | 89 | // Source context for the protocol buffer service represented by this 90 | // message. 91 | SourceContext source_context = 5; 92 | 93 | // Included interfaces. See [Mixin][]. 94 | repeated Mixin mixins = 6; 95 | 96 | // The source syntax of the service. 97 | Syntax syntax = 7; 98 | } 99 | 100 | // Method represents a method of an API interface. 101 | message Method { 102 | 103 | // The simple name of this method. 104 | string name = 1; 105 | 106 | // A URL of the input message type. 107 | string request_type_url = 2; 108 | 109 | // If true, the request is streamed. 110 | bool request_streaming = 3; 111 | 112 | // The URL of the output message type. 113 | string response_type_url = 4; 114 | 115 | // If true, the response is streamed. 116 | bool response_streaming = 5; 117 | 118 | // Any metadata attached to the method. 119 | repeated Option options = 6; 120 | 121 | // The source syntax of this method. 122 | Syntax syntax = 7; 123 | } 124 | 125 | // Declares an API Interface to be included in this interface. The including 126 | // interface must redeclare all the methods from the included interface, but 127 | // documentation and options are inherited as follows: 128 | // 129 | // - If after comment and whitespace stripping, the documentation 130 | // string of the redeclared method is empty, it will be inherited 131 | // from the original method. 132 | // 133 | // - Each annotation belonging to the service config (http, 134 | // visibility) which is not set in the redeclared method will be 135 | // inherited. 136 | // 137 | // - If an http annotation is inherited, the path pattern will be 138 | // modified as follows. Any version prefix will be replaced by the 139 | // version of the including interface plus the [root][] path if 140 | // specified. 141 | // 142 | // Example of a simple mixin: 143 | // 144 | // package google.acl.v1; 145 | // service AccessControl { 146 | // // Get the underlying ACL object. 147 | // rpc GetAcl(GetAclRequest) returns (Acl) { 148 | // option (google.api.http).get = "/v1/{resource=**}:getAcl"; 149 | // } 150 | // } 151 | // 152 | // package google.storage.v2; 153 | // service Storage { 154 | // rpc GetAcl(GetAclRequest) returns (Acl); 155 | // 156 | // // Get a data record. 157 | // rpc GetData(GetDataRequest) returns (Data) { 158 | // option (google.api.http).get = "/v2/{resource=**}"; 159 | // } 160 | // } 161 | // 162 | // Example of a mixin configuration: 163 | // 164 | // apis: 165 | // - name: google.storage.v2.Storage 166 | // mixins: 167 | // - name: google.acl.v1.AccessControl 168 | // 169 | // The mixin construct implies that all methods in `AccessControl` are 170 | // also declared with same name and request/response types in 171 | // `Storage`. A documentation generator or annotation processor will 172 | // see the effective `Storage.GetAcl` method after inherting 173 | // documentation and annotations as follows: 174 | // 175 | // service Storage { 176 | // // Get the underlying ACL object. 177 | // rpc GetAcl(GetAclRequest) returns (Acl) { 178 | // option (google.api.http).get = "/v2/{resource=**}:getAcl"; 179 | // } 180 | // ... 181 | // } 182 | // 183 | // Note how the version in the path pattern changed from `v1` to `v2`. 184 | // 185 | // If the `root` field in the mixin is specified, it should be a 186 | // relative path under which inherited HTTP paths are placed. Example: 187 | // 188 | // apis: 189 | // - name: google.storage.v2.Storage 190 | // mixins: 191 | // - name: google.acl.v1.AccessControl 192 | // root: acls 193 | // 194 | // This implies the following inherited HTTP annotation: 195 | // 196 | // service Storage { 197 | // // Get the underlying ACL object. 198 | // rpc GetAcl(GetAclRequest) returns (Acl) { 199 | // option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; 200 | // } 201 | // ... 202 | // } 203 | message Mixin { 204 | // The fully qualified name of the interface which is included. 205 | string name = 1; 206 | 207 | // If non-empty specifies a path under which inherited HTTP paths 208 | // are rooted. 209 | string root = 2; 210 | } 211 | -------------------------------------------------------------------------------- /proto/google/protobuf/duration.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option cc_enable_arenas = true; 37 | option go_package = "github.com/golang/protobuf/ptypes/duration"; 38 | option java_package = "com.google.protobuf"; 39 | option java_outer_classname = "DurationProto"; 40 | option java_multiple_files = true; 41 | option objc_class_prefix = "GPB"; 42 | 43 | // A Duration represents a signed, fixed-length span of time represented 44 | // as a count of seconds and fractions of seconds at nanosecond 45 | // resolution. It is independent of any calendar and concepts like "day" 46 | // or "month". It is related to Timestamp in that the difference between 47 | // two Timestamp values is a Duration and it can be added or subtracted 48 | // from a Timestamp. Range is approximately +-10,000 years. 49 | // 50 | // # Examples 51 | // 52 | // Example 1: Compute Duration from two Timestamps in pseudo code. 53 | // 54 | // Timestamp start = ...; 55 | // Timestamp end = ...; 56 | // Duration duration = ...; 57 | // 58 | // duration.seconds = end.seconds - start.seconds; 59 | // duration.nanos = end.nanos - start.nanos; 60 | // 61 | // if (duration.seconds < 0 && duration.nanos > 0) { 62 | // duration.seconds += 1; 63 | // duration.nanos -= 1000000000; 64 | // } else if (duration.seconds > 0 && duration.nanos < 0) { 65 | // duration.seconds -= 1; 66 | // duration.nanos += 1000000000; 67 | // } 68 | // 69 | // Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 70 | // 71 | // Timestamp start = ...; 72 | // Duration duration = ...; 73 | // Timestamp end = ...; 74 | // 75 | // end.seconds = start.seconds + duration.seconds; 76 | // end.nanos = start.nanos + duration.nanos; 77 | // 78 | // if (end.nanos < 0) { 79 | // end.seconds -= 1; 80 | // end.nanos += 1000000000; 81 | // } else if (end.nanos >= 1000000000) { 82 | // end.seconds += 1; 83 | // end.nanos -= 1000000000; 84 | // } 85 | // 86 | // Example 3: Compute Duration from datetime.timedelta in Python. 87 | // 88 | // td = datetime.timedelta(days=3, minutes=10) 89 | // duration = Duration() 90 | // duration.FromTimedelta(td) 91 | // 92 | // # JSON Mapping 93 | // 94 | // In JSON format, the Duration type is encoded as a string rather than an 95 | // object, where the string ends in the suffix "s" (indicating seconds) and 96 | // is preceded by the number of seconds, with nanoseconds expressed as 97 | // fractional seconds. For example, 3 seconds with 0 nanoseconds should be 98 | // encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should 99 | // be expressed in JSON format as "3.000000001s", and 3 seconds and 1 100 | // microsecond should be expressed in JSON format as "3.000001s". 101 | // 102 | // 103 | message Duration { 104 | // Signed seconds of the span of time. Must be from -315,576,000,000 105 | // to +315,576,000,000 inclusive. Note: these bounds are computed from: 106 | // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 107 | int64 seconds = 1; 108 | 109 | // Signed fractions of a second at nanosecond resolution of the span 110 | // of time. Durations less than one second are represented with a 0 111 | // `seconds` field and a positive or negative `nanos` field. For durations 112 | // of one second or more, a non-zero value for the `nanos` field must be 113 | // of the same sign as the `seconds` field. Must be from -999,999,999 114 | // to +999,999,999 inclusive. 115 | int32 nanos = 2; 116 | } 117 | -------------------------------------------------------------------------------- /proto/google/protobuf/empty.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option go_package = "github.com/golang/protobuf/ptypes/empty"; 37 | option java_package = "com.google.protobuf"; 38 | option java_outer_classname = "EmptyProto"; 39 | option java_multiple_files = true; 40 | option objc_class_prefix = "GPB"; 41 | option cc_enable_arenas = true; 42 | 43 | // A generic empty message that you can re-use to avoid defining duplicated 44 | // empty messages in your APIs. A typical example is to use it as the request 45 | // or the response type of an API method. For instance: 46 | // 47 | // service Foo { 48 | // rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 49 | // } 50 | // 51 | // The JSON representation for `Empty` is empty JSON object `{}`. 52 | message Empty {} 53 | -------------------------------------------------------------------------------- /proto/google/protobuf/field_mask.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option java_package = "com.google.protobuf"; 37 | option java_outer_classname = "FieldMaskProto"; 38 | option java_multiple_files = true; 39 | option objc_class_prefix = "GPB"; 40 | option go_package = "google.golang.org/genproto/protobuf/field_mask;field_mask"; 41 | option cc_enable_arenas = true; 42 | 43 | // `FieldMask` represents a set of symbolic field paths, for example: 44 | // 45 | // paths: "f.a" 46 | // paths: "f.b.d" 47 | // 48 | // Here `f` represents a field in some root message, `a` and `b` 49 | // fields in the message found in `f`, and `d` a field found in the 50 | // message in `f.b`. 51 | // 52 | // Field masks are used to specify a subset of fields that should be 53 | // returned by a get operation or modified by an update operation. 54 | // Field masks also have a custom JSON encoding (see below). 55 | // 56 | // # Field Masks in Projections 57 | // 58 | // When used in the context of a projection, a response message or 59 | // sub-message is filtered by the API to only contain those fields as 60 | // specified in the mask. For example, if the mask in the previous 61 | // example is applied to a response message as follows: 62 | // 63 | // f { 64 | // a : 22 65 | // b { 66 | // d : 1 67 | // x : 2 68 | // } 69 | // y : 13 70 | // } 71 | // z: 8 72 | // 73 | // The result will not contain specific values for fields x,y and z 74 | // (their value will be set to the default, and omitted in proto text 75 | // output): 76 | // 77 | // 78 | // f { 79 | // a : 22 80 | // b { 81 | // d : 1 82 | // } 83 | // } 84 | // 85 | // A repeated field is not allowed except at the last position of a 86 | // paths string. 87 | // 88 | // If a FieldMask object is not present in a get operation, the 89 | // operation applies to all fields (as if a FieldMask of all fields 90 | // had been specified). 91 | // 92 | // Note that a field mask does not necessarily apply to the 93 | // top-level response message. In case of a REST get operation, the 94 | // field mask applies directly to the response, but in case of a REST 95 | // list operation, the mask instead applies to each individual message 96 | // in the returned resource list. In case of a REST custom method, 97 | // other definitions may be used. Where the mask applies will be 98 | // clearly documented together with its declaration in the API. In 99 | // any case, the effect on the returned resource/resources is required 100 | // behavior for APIs. 101 | // 102 | // # Field Masks in Update Operations 103 | // 104 | // A field mask in update operations specifies which fields of the 105 | // targeted resource are going to be updated. The API is required 106 | // to only change the values of the fields as specified in the mask 107 | // and leave the others untouched. If a resource is passed in to 108 | // describe the updated values, the API ignores the values of all 109 | // fields not covered by the mask. 110 | // 111 | // If a repeated field is specified for an update operation, new values will 112 | // be appended to the existing repeated field in the target resource. Note that 113 | // a repeated field is only allowed in the last position of a `paths` string. 114 | // 115 | // If a sub-message is specified in the last position of the field mask for an 116 | // update operation, then new value will be merged into the existing sub-message 117 | // in the target resource. 118 | // 119 | // For example, given the target message: 120 | // 121 | // f { 122 | // b { 123 | // d: 1 124 | // x: 2 125 | // } 126 | // c: [1] 127 | // } 128 | // 129 | // And an update message: 130 | // 131 | // f { 132 | // b { 133 | // d: 10 134 | // } 135 | // c: [2] 136 | // } 137 | // 138 | // then if the field mask is: 139 | // 140 | // paths: ["f.b", "f.c"] 141 | // 142 | // then the result will be: 143 | // 144 | // f { 145 | // b { 146 | // d: 10 147 | // x: 2 148 | // } 149 | // c: [1, 2] 150 | // } 151 | // 152 | // An implementation may provide options to override this default behavior for 153 | // repeated and message fields. 154 | // 155 | // In order to reset a field's value to the default, the field must 156 | // be in the mask and set to the default value in the provided resource. 157 | // Hence, in order to reset all fields of a resource, provide a default 158 | // instance of the resource and set all fields in the mask, or do 159 | // not provide a mask as described below. 160 | // 161 | // If a field mask is not present on update, the operation applies to 162 | // all fields (as if a field mask of all fields has been specified). 163 | // Note that in the presence of schema evolution, this may mean that 164 | // fields the client does not know and has therefore not filled into 165 | // the request will be reset to their default. If this is unwanted 166 | // behavior, a specific service may require a client to always specify 167 | // a field mask, producing an error if not. 168 | // 169 | // As with get operations, the location of the resource which 170 | // describes the updated values in the request message depends on the 171 | // operation kind. In any case, the effect of the field mask is 172 | // required to be honored by the API. 173 | // 174 | // ## Considerations for HTTP REST 175 | // 176 | // The HTTP kind of an update operation which uses a field mask must 177 | // be set to PATCH instead of PUT in order to satisfy HTTP semantics 178 | // (PUT must only be used for full updates). 179 | // 180 | // # JSON Encoding of Field Masks 181 | // 182 | // In JSON, a field mask is encoded as a single string where paths are 183 | // separated by a comma. Fields name in each path are converted 184 | // to/from lower-camel naming conventions. 185 | // 186 | // As an example, consider the following message declarations: 187 | // 188 | // message Profile { 189 | // User user = 1; 190 | // Photo photo = 2; 191 | // } 192 | // message User { 193 | // string display_name = 1; 194 | // string address = 2; 195 | // } 196 | // 197 | // In proto a field mask for `Profile` may look as such: 198 | // 199 | // mask { 200 | // paths: "user.display_name" 201 | // paths: "photo" 202 | // } 203 | // 204 | // In JSON, the same mask is represented as below: 205 | // 206 | // { 207 | // mask: "user.displayName,photo" 208 | // } 209 | // 210 | // # Field Masks and Oneof Fields 211 | // 212 | // Field masks treat fields in oneofs just as regular fields. Consider the 213 | // following message: 214 | // 215 | // message SampleMessage { 216 | // oneof test_oneof { 217 | // string name = 4; 218 | // SubMessage sub_message = 9; 219 | // } 220 | // } 221 | // 222 | // The field mask can be: 223 | // 224 | // mask { 225 | // paths: "name" 226 | // } 227 | // 228 | // Or: 229 | // 230 | // mask { 231 | // paths: "sub_message" 232 | // } 233 | // 234 | // Note that oneof type names ("test_oneof" in this case) cannot be used in 235 | // paths. 236 | // 237 | // ## Field Mask Verification 238 | // 239 | // The implementation of any API method which has a FieldMask type field in the 240 | // request should verify the included field paths, and return an 241 | // `INVALID_ARGUMENT` error if any path is unmappable. 242 | message FieldMask { 243 | // The set of field mask paths. 244 | repeated string paths = 1; 245 | } 246 | -------------------------------------------------------------------------------- /proto/google/protobuf/source_context.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option java_package = "com.google.protobuf"; 37 | option java_outer_classname = "SourceContextProto"; 38 | option java_multiple_files = true; 39 | option objc_class_prefix = "GPB"; 40 | option go_package = "google.golang.org/genproto/protobuf/source_context;source_context"; 41 | 42 | // `SourceContext` represents information about the source of a 43 | // protobuf element, like the file in which it is defined. 44 | message SourceContext { 45 | // The path-qualified name of the .proto file that contained the associated 46 | // protobuf element. For example: `"google/protobuf/source_context.proto"`. 47 | string file_name = 1; 48 | } 49 | -------------------------------------------------------------------------------- /proto/google/protobuf/struct.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option cc_enable_arenas = true; 37 | option go_package = "github.com/golang/protobuf/ptypes/struct;structpb"; 38 | option java_package = "com.google.protobuf"; 39 | option java_outer_classname = "StructProto"; 40 | option java_multiple_files = true; 41 | option objc_class_prefix = "GPB"; 42 | 43 | // `Struct` represents a structured data value, consisting of fields 44 | // which map to dynamically typed values. In some languages, `Struct` 45 | // might be supported by a native representation. For example, in 46 | // scripting languages like JS a struct is represented as an 47 | // object. The details of that representation are described together 48 | // with the proto support for the language. 49 | // 50 | // The JSON representation for `Struct` is JSON object. 51 | message Struct { 52 | // Unordered map of dynamically typed values. 53 | map fields = 1; 54 | } 55 | 56 | // `Value` represents a dynamically typed value which can be either 57 | // null, a number, a string, a boolean, a recursive struct value, or a 58 | // list of values. A producer of value is expected to set one of that 59 | // variants, absence of any variant indicates an error. 60 | // 61 | // The JSON representation for `Value` is JSON value. 62 | message Value { 63 | // The kind of value. 64 | oneof kind { 65 | // Represents a null value. 66 | NullValue null_value = 1; 67 | // Represents a double value. 68 | double number_value = 2; 69 | // Represents a string value. 70 | string string_value = 3; 71 | // Represents a boolean value. 72 | bool bool_value = 4; 73 | // Represents a structured value. 74 | Struct struct_value = 5; 75 | // Represents a repeated `Value`. 76 | ListValue list_value = 6; 77 | } 78 | } 79 | 80 | // `NullValue` is a singleton enumeration to represent the null value for the 81 | // `Value` type union. 82 | // 83 | // The JSON representation for `NullValue` is JSON `null`. 84 | enum NullValue { 85 | // Null value. 86 | NULL_VALUE = 0; 87 | } 88 | 89 | // `ListValue` is a wrapper around a repeated field of values. 90 | // 91 | // The JSON representation for `ListValue` is JSON array. 92 | message ListValue { 93 | // Repeated field of dynamically typed values. 94 | repeated Value values = 1; 95 | } 96 | -------------------------------------------------------------------------------- /proto/google/protobuf/timestamp.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option cc_enable_arenas = true; 37 | option go_package = "github.com/golang/protobuf/ptypes/timestamp"; 38 | option java_package = "com.google.protobuf"; 39 | option java_outer_classname = "TimestampProto"; 40 | option java_multiple_files = true; 41 | option objc_class_prefix = "GPB"; 42 | 43 | // A Timestamp represents a point in time independent of any time zone or local 44 | // calendar, encoded as a count of seconds and fractions of seconds at 45 | // nanosecond resolution. The count is relative to an epoch at UTC midnight on 46 | // January 1, 1970, in the proleptic Gregorian calendar which extends the 47 | // Gregorian calendar backwards to year one. 48 | // 49 | // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap 50 | // second table is needed for interpretation, using a [24-hour linear 51 | // smear](https://developers.google.com/time/smear). 52 | // 53 | // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By 54 | // restricting to that range, we ensure that we can convert to and from [RFC 55 | // 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. 56 | // 57 | // # Examples 58 | // 59 | // Example 1: Compute Timestamp from POSIX `time()`. 60 | // 61 | // Timestamp timestamp; 62 | // timestamp.set_seconds(time(NULL)); 63 | // timestamp.set_nanos(0); 64 | // 65 | // Example 2: Compute Timestamp from POSIX `gettimeofday()`. 66 | // 67 | // struct timeval tv; 68 | // gettimeofday(&tv, NULL); 69 | // 70 | // Timestamp timestamp; 71 | // timestamp.set_seconds(tv.tv_sec); 72 | // timestamp.set_nanos(tv.tv_usec * 1000); 73 | // 74 | // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 75 | // 76 | // FILETIME ft; 77 | // GetSystemTimeAsFileTime(&ft); 78 | // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 79 | // 80 | // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z 81 | // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. 82 | // Timestamp timestamp; 83 | // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); 84 | // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 85 | // 86 | // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 87 | // 88 | // long millis = System.currentTimeMillis(); 89 | // 90 | // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) 91 | // .setNanos((int) ((millis % 1000) * 1000000)).build(); 92 | // 93 | // 94 | // Example 5: Compute Timestamp from current time in Python. 95 | // 96 | // timestamp = Timestamp() 97 | // timestamp.GetCurrentTime() 98 | // 99 | // # JSON Mapping 100 | // 101 | // In JSON format, the Timestamp type is encoded as a string in the 102 | // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the 103 | // format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" 104 | // where {year} is always expressed using four digits while {month}, {day}, 105 | // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional 106 | // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), 107 | // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone 108 | // is required. A proto3 JSON serializer should always use UTC (as indicated by 109 | // "Z") when printing the Timestamp type and a proto3 JSON parser should be 110 | // able to accept both UTC and other timezones (as indicated by an offset). 111 | // 112 | // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 113 | // 01:30 UTC on January 15, 2017. 114 | // 115 | // In JavaScript, one can convert a Date object to this format using the 116 | // standard 117 | // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) 118 | // method. In Python, a standard `datetime.datetime` object can be converted 119 | // to this format using 120 | // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with 121 | // the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use 122 | // the Joda Time's [`ISODateTimeFormat.dateTime()`]( 123 | // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D 124 | // ) to obtain a formatter capable of generating timestamps in this format. 125 | // 126 | // 127 | message Timestamp { 128 | // Represents seconds of UTC time since Unix epoch 129 | // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 130 | // 9999-12-31T23:59:59Z inclusive. 131 | int64 seconds = 1; 132 | 133 | // Non-negative fractions of a second at nanosecond resolution. Negative 134 | // second values with fractions must still have non-negative nanos values 135 | // that count forward in time. Must be from 0 to 999,999,999 136 | // inclusive. 137 | int32 nanos = 2; 138 | } 139 | -------------------------------------------------------------------------------- /proto/google/protobuf/type.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | import "google/protobuf/any.proto"; 36 | import "google/protobuf/source_context.proto"; 37 | 38 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 39 | option cc_enable_arenas = true; 40 | option java_package = "com.google.protobuf"; 41 | option java_outer_classname = "TypeProto"; 42 | option java_multiple_files = true; 43 | option objc_class_prefix = "GPB"; 44 | option go_package = "google.golang.org/genproto/protobuf/ptype;ptype"; 45 | 46 | // A protocol buffer message type. 47 | message Type { 48 | // The fully qualified message name. 49 | string name = 1; 50 | // The list of fields. 51 | repeated Field fields = 2; 52 | // The list of types appearing in `oneof` definitions in this type. 53 | repeated string oneofs = 3; 54 | // The protocol buffer options. 55 | repeated Option options = 4; 56 | // The source context. 57 | SourceContext source_context = 5; 58 | // The source syntax. 59 | Syntax syntax = 6; 60 | } 61 | 62 | // A single field of a message type. 63 | message Field { 64 | // Basic field types. 65 | enum Kind { 66 | // Field type unknown. 67 | TYPE_UNKNOWN = 0; 68 | // Field type double. 69 | TYPE_DOUBLE = 1; 70 | // Field type float. 71 | TYPE_FLOAT = 2; 72 | // Field type int64. 73 | TYPE_INT64 = 3; 74 | // Field type uint64. 75 | TYPE_UINT64 = 4; 76 | // Field type int32. 77 | TYPE_INT32 = 5; 78 | // Field type fixed64. 79 | TYPE_FIXED64 = 6; 80 | // Field type fixed32. 81 | TYPE_FIXED32 = 7; 82 | // Field type bool. 83 | TYPE_BOOL = 8; 84 | // Field type string. 85 | TYPE_STRING = 9; 86 | // Field type group. Proto2 syntax only, and deprecated. 87 | TYPE_GROUP = 10; 88 | // Field type message. 89 | TYPE_MESSAGE = 11; 90 | // Field type bytes. 91 | TYPE_BYTES = 12; 92 | // Field type uint32. 93 | TYPE_UINT32 = 13; 94 | // Field type enum. 95 | TYPE_ENUM = 14; 96 | // Field type sfixed32. 97 | TYPE_SFIXED32 = 15; 98 | // Field type sfixed64. 99 | TYPE_SFIXED64 = 16; 100 | // Field type sint32. 101 | TYPE_SINT32 = 17; 102 | // Field type sint64. 103 | TYPE_SINT64 = 18; 104 | } 105 | 106 | // Whether a field is optional, required, or repeated. 107 | enum Cardinality { 108 | // For fields with unknown cardinality. 109 | CARDINALITY_UNKNOWN = 0; 110 | // For optional fields. 111 | CARDINALITY_OPTIONAL = 1; 112 | // For required fields. Proto2 syntax only. 113 | CARDINALITY_REQUIRED = 2; 114 | // For repeated fields. 115 | CARDINALITY_REPEATED = 3; 116 | }; 117 | 118 | // The field type. 119 | Kind kind = 1; 120 | // The field cardinality. 121 | Cardinality cardinality = 2; 122 | // The field number. 123 | int32 number = 3; 124 | // The field name. 125 | string name = 4; 126 | // The field type URL, without the scheme, for message or enumeration 127 | // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. 128 | string type_url = 6; 129 | // The index of the field type in `Type.oneofs`, for message or enumeration 130 | // types. The first type has index 1; zero means the type is not in the list. 131 | int32 oneof_index = 7; 132 | // Whether to use alternative packed wire representation. 133 | bool packed = 8; 134 | // The protocol buffer options. 135 | repeated Option options = 9; 136 | // The field JSON name. 137 | string json_name = 10; 138 | // The string value of the default value of this field. Proto2 syntax only. 139 | string default_value = 11; 140 | } 141 | 142 | // Enum type definition. 143 | message Enum { 144 | // Enum type name. 145 | string name = 1; 146 | // Enum value definitions. 147 | repeated EnumValue enumvalue = 2; 148 | // Protocol buffer options. 149 | repeated Option options = 3; 150 | // The source context. 151 | SourceContext source_context = 4; 152 | // The source syntax. 153 | Syntax syntax = 5; 154 | } 155 | 156 | // Enum value definition. 157 | message EnumValue { 158 | // Enum value name. 159 | string name = 1; 160 | // Enum value number. 161 | int32 number = 2; 162 | // Protocol buffer options. 163 | repeated Option options = 3; 164 | } 165 | 166 | // A protocol buffer option, which can be attached to a message, field, 167 | // enumeration, etc. 168 | message Option { 169 | // The option's name. For protobuf built-in options (options defined in 170 | // descriptor.proto), this is the short name. For example, `"map_entry"`. 171 | // For custom options, it should be the fully-qualified name. For example, 172 | // `"google.api.http"`. 173 | string name = 1; 174 | // The option's value packed in an Any message. If the value is a primitive, 175 | // the corresponding wrapper type defined in google/protobuf/wrappers.proto 176 | // should be used. If the value is an enum, it should be stored as an int32 177 | // value using the google.protobuf.Int32Value type. 178 | Any value = 2; 179 | } 180 | 181 | // The syntax in which a protocol buffer element is defined. 182 | enum Syntax { 183 | // Syntax `proto2`. 184 | SYNTAX_PROTO2 = 0; 185 | // Syntax `proto3`. 186 | SYNTAX_PROTO3 = 1; 187 | } 188 | -------------------------------------------------------------------------------- /proto/google/protobuf/wrappers.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Wrappers for primitive (non-message) types. These types are useful 32 | // for embedding primitives in the `google.protobuf.Any` type and for places 33 | // where we need to distinguish between the absence of a primitive 34 | // typed field and its default value. 35 | // 36 | // These wrappers have no meaningful use within repeated fields as they lack 37 | // the ability to detect presence on individual elements. 38 | // These wrappers have no meaningful use within a map or a oneof since 39 | // individual entries of a map or fields of a oneof can already detect presence. 40 | 41 | syntax = "proto3"; 42 | 43 | package google.protobuf; 44 | 45 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 46 | option cc_enable_arenas = true; 47 | option go_package = "github.com/golang/protobuf/ptypes/wrappers"; 48 | option java_package = "com.google.protobuf"; 49 | option java_outer_classname = "WrappersProto"; 50 | option java_multiple_files = true; 51 | option objc_class_prefix = "GPB"; 52 | 53 | // Wrapper message for `double`. 54 | // 55 | // The JSON representation for `DoubleValue` is JSON number. 56 | message DoubleValue { 57 | // The double value. 58 | double value = 1; 59 | } 60 | 61 | // Wrapper message for `float`. 62 | // 63 | // The JSON representation for `FloatValue` is JSON number. 64 | message FloatValue { 65 | // The float value. 66 | float value = 1; 67 | } 68 | 69 | // Wrapper message for `int64`. 70 | // 71 | // The JSON representation for `Int64Value` is JSON string. 72 | message Int64Value { 73 | // The int64 value. 74 | int64 value = 1; 75 | } 76 | 77 | // Wrapper message for `uint64`. 78 | // 79 | // The JSON representation for `UInt64Value` is JSON string. 80 | message UInt64Value { 81 | // The uint64 value. 82 | uint64 value = 1; 83 | } 84 | 85 | // Wrapper message for `int32`. 86 | // 87 | // The JSON representation for `Int32Value` is JSON number. 88 | message Int32Value { 89 | // The int32 value. 90 | int32 value = 1; 91 | } 92 | 93 | // Wrapper message for `uint32`. 94 | // 95 | // The JSON representation for `UInt32Value` is JSON number. 96 | message UInt32Value { 97 | // The uint32 value. 98 | uint32 value = 1; 99 | } 100 | 101 | // Wrapper message for `bool`. 102 | // 103 | // The JSON representation for `BoolValue` is JSON `true` and `false`. 104 | message BoolValue { 105 | // The bool value. 106 | bool value = 1; 107 | } 108 | 109 | // Wrapper message for `string`. 110 | // 111 | // The JSON representation for `StringValue` is JSON string. 112 | message StringValue { 113 | // The string value. 114 | string value = 1; 115 | } 116 | 117 | // Wrapper message for `bytes`. 118 | // 119 | // The JSON representation for `BytesValue` is JSON string. 120 | message BytesValue { 121 | // The bytes value. 122 | bytes value = 1; 123 | } 124 | -------------------------------------------------------------------------------- /proto/mev-protos/README.md: -------------------------------------------------------------------------------- 1 | # protos 2 | This repository contains public protobuf definitions for Jito Lab's MEV system. 3 | 4 | ## Usage 5 | Add this repo as a git submodule to your repo. Here's an example file tree in a Rust codebase: 6 | ``` 7 | your-rust-repo/ 8 | ├─ src/ 9 | │ ├─ gm/ 10 | │ │ ├─ lib.rs 11 | │ ├─ jito-protos/ 12 | │ │ ├─ protos/ 13 | │ │ │ ├─ *.proto 14 | | | |─ src/ 15 | | | | |─ lib.rs 16 | | | |─ build.rs 17 | ``` 18 | 19 | ```rust 20 | /// lib.rs 21 | 22 | pub mod proto_package { 23 | tonic::include_proto!("proto_package.proto"); 24 | } 25 | ``` 26 | 27 | ```rust 28 | /// build.rs 29 | 30 | use tonic_build::configure; 31 | 32 | fn main() { 33 | configure() 34 | .compile( 35 | &[ 36 | "protos/proto_package.proto", 37 | ], 38 | &["protos"], 39 | ) 40 | .unwrap(); 41 | } 42 | 43 | ``` 44 | -------------------------------------------------------------------------------- /proto/mev-protos/auth.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package auth; 4 | 5 | option go_package = "github.com/bloXroute-Labs/solana-trader-proto/auth"; 6 | 7 | import "google/protobuf/timestamp.proto"; 8 | 9 | enum Role { 10 | RELAYER = 0; 11 | SEARCHER = 1; 12 | VALIDATOR = 2; 13 | SHREDSTREAM_SUBSCRIBER = 3; 14 | } 15 | 16 | message GenerateAuthChallengeRequest { 17 | /// Role the client is attempting to generate tokens for. 18 | Role role = 1; 19 | 20 | /// Client's 32 byte pubkey. 21 | bytes pubkey = 2; 22 | } 23 | 24 | message GenerateAuthChallengeResponse { 25 | string challenge = 1; 26 | } 27 | 28 | message GenerateAuthTokensRequest { 29 | /// The pre-signed challenge. 30 | string challenge = 1; 31 | 32 | /// The signing keypair's corresponding 32 byte pubkey. 33 | bytes client_pubkey = 2; 34 | 35 | /// The 64 byte signature of the challenge signed by the client's private key. The private key must correspond to 36 | // the pubkey passed in the [GenerateAuthChallenge] method. The client is expected to sign the challenge token 37 | // prepended with their pubkey. For example sign(pubkey, challenge). 38 | bytes signed_challenge = 3; 39 | } 40 | 41 | message Token { 42 | /// The token. 43 | string value = 1; 44 | 45 | /// When the token will expire. 46 | google.protobuf.Timestamp expires_at_utc = 2; 47 | } 48 | 49 | message GenerateAuthTokensResponse { 50 | /// The token granting access to resources. 51 | Token access_token = 1; 52 | 53 | /// The token used to refresh the access_token. This has a longer TTL than the access_token. 54 | Token refresh_token = 2; 55 | } 56 | 57 | message RefreshAccessTokenRequest { 58 | /// Non-expired refresh token obtained from the [GenerateAuthTokens] method. 59 | string refresh_token = 1; 60 | } 61 | 62 | message RefreshAccessTokenResponse { 63 | /// Fresh access_token. 64 | Token access_token = 1; 65 | } 66 | 67 | /// This service is responsible for issuing auth tokens to clients for API access. 68 | service AuthService { 69 | /// Returns a challenge, client is expected to sign this challenge with an appropriate keypair in order to obtain access tokens. 70 | rpc GenerateAuthChallenge(GenerateAuthChallengeRequest) returns (GenerateAuthChallengeResponse) {} 71 | 72 | /// Provides the client with the initial pair of auth tokens for API access. 73 | rpc GenerateAuthTokens(GenerateAuthTokensRequest) returns (GenerateAuthTokensResponse) {} 74 | 75 | /// Call this method with a non-expired refresh token to obtain a new access token. 76 | rpc RefreshAccessToken(RefreshAccessTokenRequest) returns (RefreshAccessTokenResponse) {} 77 | } 78 | 79 | -------------------------------------------------------------------------------- /proto/mev-protos/block.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package block; 4 | import "mev-protos/shared.proto"; 5 | 6 | option go_package = "github.com/bloXroute-Labs/solana-trader-proto/block"; 7 | 8 | 9 | // Condensed block helpful for getting data around efficiently internal to our system. 10 | message CondensedBlock { 11 | shared.Header header = 1; 12 | string previous_blockhash = 2; 13 | string blockhash = 3; 14 | uint64 parent_slot = 4; 15 | repeated bytes versioned_transactions = 5; 16 | uint64 slot = 6; 17 | string commitment = 7; 18 | } 19 | -------------------------------------------------------------------------------- /proto/mev-protos/block_engine.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | import "mev-protos/packet.proto"; 4 | import "mev-protos/shared.proto"; 5 | import "mev-protos/bundle.proto"; 6 | 7 | option go_package = "github.com/bloXroute-Labs/solana-trader-proto/block_engine"; 8 | 9 | 10 | package block_engine; 11 | 12 | message SubscribePacketsRequest {} 13 | message SubscribePacketsResponse { 14 | shared.Header header = 1; 15 | packet.PacketBatch batch = 2; 16 | } 17 | 18 | message SubscribeBundlesRequest {} 19 | message SubscribeBundlesResponse { 20 | repeated bundle.BundleUuid bundles = 1; 21 | } 22 | 23 | message BlockBuilderFeeInfoRequest {} 24 | message BlockBuilderFeeInfoResponse { 25 | string pubkey = 1; 26 | 27 | // commission (0-100) 28 | uint64 commission = 2; 29 | } 30 | 31 | message AccountsOfInterest { 32 | // use * for all accounts 33 | repeated string accounts = 1; 34 | } 35 | 36 | message AccountsOfInterestRequest {} 37 | message AccountsOfInterestUpdate { 38 | repeated string accounts = 1; 39 | } 40 | 41 | message ProgramsOfInterestRequest {} 42 | message ProgramsOfInterestUpdate { 43 | repeated string programs = 1; 44 | } 45 | 46 | // A series of packets with an expiration attached to them. 47 | // The header contains a timestamp for when this packet was generated. 48 | // The expiry is how long the packet batches have before they expire and are forwarded to the validator. 49 | // This provides a more censorship resistant method to MEV than block engines receiving packets directly. 50 | message ExpiringPacketBatch { 51 | shared.Header header = 1; 52 | packet.PacketBatch batch = 2; 53 | uint32 expiry_ms = 3; 54 | } 55 | 56 | // Packets and heartbeats are sent over the same stream. 57 | // ExpiringPacketBatches have an expiration attached to them so the block engine can track 58 | // how long it has until the relayer forwards the packets to the validator. 59 | // Heartbeats contain a timestamp from the system and is used as a simple and naive time-sync mechanism 60 | // so the block engine has some idea on how far their clocks are apart. 61 | message PacketBatchUpdate { 62 | oneof msg { 63 | ExpiringPacketBatch batches = 1; 64 | shared.Heartbeat heartbeat = 2; 65 | } 66 | } 67 | 68 | message StartExpiringPacketStreamResponse { 69 | shared.Heartbeat heartbeat = 1; 70 | } 71 | 72 | /// Validators can connect to Block Engines to receive packets and bundles. 73 | service BlockEngineValidator { 74 | /// Validators can subscribe to the block engine to receive a stream of packets 75 | rpc SubscribePackets (SubscribePacketsRequest) returns (stream SubscribePacketsResponse) {} 76 | 77 | /// Validators can subscribe to the block engine to receive a stream of simulated and profitable bundles 78 | rpc SubscribeBundles (SubscribeBundlesRequest) returns (stream SubscribeBundlesResponse) {} 79 | 80 | // Block builders can optionally collect fees. This returns fee information if a block builder wants to 81 | // collect one. 82 | rpc GetBlockBuilderFeeInfo (BlockBuilderFeeInfoRequest) returns (BlockBuilderFeeInfoResponse) {} 83 | } 84 | 85 | /// Relayers can forward packets to Block Engines. 86 | /// Block Engines provide an AccountsOfInterest field to only send transactions that are of interest. 87 | service BlockEngineRelayer { 88 | /// The block engine feeds accounts of interest (AOI) updates to the relayer periodically. 89 | /// For all transactions the relayer receives, it forwards transactions to the block engine which write-lock 90 | /// any of the accounts in the AOI. 91 | rpc SubscribeAccountsOfInterest (AccountsOfInterestRequest) returns (stream AccountsOfInterestUpdate) {} 92 | 93 | rpc SubscribeProgramsOfInterest (ProgramsOfInterestRequest) returns (stream ProgramsOfInterestUpdate) {} 94 | 95 | // Validators can subscribe to packets from the relayer and receive a multiplexed signal that contains a mixture 96 | // of packets and heartbeats. 97 | // NOTE: This is a bi-directional stream due to a bug with how Envoy handles half closed client-side streams. 98 | // The issue is being tracked here: https://github.com/envoyproxy/envoy/issues/22748. In the meantime, the 99 | // server will stream heartbeats to clients at some reasonable cadence. 100 | rpc StartExpiringPacketStream (stream PacketBatchUpdate) returns (stream StartExpiringPacketStreamResponse) {} 101 | } 102 | -------------------------------------------------------------------------------- /proto/mev-protos/bundle.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | import "mev-protos/packet.proto"; 4 | import "mev-protos/shared.proto"; 5 | 6 | option go_package = "github.com/bloXroute-Labs/solana-trader-proto/bundle"; 7 | 8 | package bundle; 9 | 10 | message Bundle { 11 | shared.Header header = 2; 12 | repeated packet.Packet packets = 3; 13 | } 14 | 15 | message BundleUuid { 16 | bundle.Bundle bundle = 1; 17 | string uuid = 2; 18 | } 19 | 20 | /* Bundle Result Types */ 21 | 22 | // Indicates the bundle was accepted and forwarded to a validator. 23 | // NOTE: A single bundle may have multiple events emitted if forwarded to many validators. 24 | message Accepted { 25 | // Slot at which bundle was forwarded. 26 | uint64 slot = 1; 27 | 28 | // Validator identity bundle was forwarded to. 29 | string validator_identity = 2; 30 | } 31 | 32 | // Indicates the bundle was dropped and therefore not forwarded to any validator. 33 | message Rejected { 34 | oneof reason { 35 | StateAuctionBidRejected state_auction_bid_rejected = 1; 36 | WinningBatchBidRejected winning_batch_bid_rejected = 2; 37 | SimulationFailure simulation_failure = 3; 38 | InternalError internal_error = 4; 39 | DroppedBundle dropped_bundle = 5; 40 | } 41 | } 42 | 43 | // Indicates the bundle's bid was high enough to win its state auction. 44 | // However, not high enough relative to other state auction winners and therefore excluded from being forwarded. 45 | message WinningBatchBidRejected { 46 | // Auction's unique identifier. 47 | string auction_id = 1; 48 | // Bundle's simulated bid. 49 | uint64 simulated_bid_lamports = 2; 50 | optional string msg = 3; 51 | } 52 | 53 | // Indicates the bundle's bid was __not__ high enough to be included in its state auction's set of winners. 54 | message StateAuctionBidRejected { 55 | // Auction's unique identifier. 56 | string auction_id = 1; 57 | // Bundle's simulated bid. 58 | uint64 simulated_bid_lamports = 2; 59 | optional string msg = 3; 60 | } 61 | 62 | // Bundle dropped due to simulation failure. 63 | message SimulationFailure { 64 | // Signature of the offending transaction. 65 | string tx_signature = 1; 66 | optional string msg = 2; 67 | } 68 | 69 | // Bundle dropped due to an internal error. 70 | message InternalError { 71 | string msg = 1; 72 | } 73 | 74 | // Bundle dropped (e.g. because no leader upcoming) 75 | message DroppedBundle { 76 | string msg = 1; 77 | } 78 | 79 | message Finalized {} 80 | message Processed { 81 | string validator_identity = 1; 82 | uint64 slot = 2; 83 | /// Index within the block. 84 | uint64 bundle_index = 3; 85 | } 86 | message Dropped { 87 | DroppedReason reason = 1; 88 | } 89 | enum DroppedReason { 90 | BlockhashExpired = 0; 91 | // One or more transactions in the bundle landed on-chain, invalidating the bundle. 92 | PartiallyProcessed = 1; 93 | // This indicates bundle was processed but not finalized. This could occur during forks. 94 | NotFinalized = 2; 95 | } 96 | 97 | message BundleResult { 98 | // Bundle's Uuid. 99 | string bundle_id = 1; 100 | 101 | oneof result { 102 | // Indicated accepted by the block-engine and forwarded to a jito-solana validator. 103 | Accepted accepted = 2; 104 | // Rejected by the block-engine. 105 | Rejected rejected = 3; 106 | // Reached finalized commitment level. 107 | Finalized finalized = 4; 108 | // Reached a processed commitment level. 109 | Processed processed = 5; 110 | // Was accepted and forwarded by the block-engine but never landed on-chain. 111 | Dropped dropped = 6; 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /proto/mev-protos/packet.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "github.com/bloXroute-Labs/solana-trader-proto/packet"; 4 | 5 | 6 | package packet; 7 | 8 | message PacketBatch { 9 | repeated Packet packets = 1; 10 | } 11 | 12 | message Packet { 13 | bytes data = 1; 14 | Meta meta = 2; 15 | } 16 | 17 | message Meta { 18 | uint64 size = 1; 19 | string addr = 2; 20 | uint32 port = 3; 21 | PacketFlags flags = 4; 22 | uint64 sender_stake = 5; 23 | } 24 | 25 | message PacketFlags { 26 | bool discard = 1; 27 | bool forwarded = 2; 28 | bool repair = 3; 29 | bool simple_vote_tx = 4; 30 | bool tracer_packet = 5; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /proto/mev-protos/relayer.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | import "mev-protos/packet.proto"; 4 | import "mev-protos/shared.proto"; 5 | 6 | option go_package = "github.com/bloXroute-Labs/solana-trader-proto/relayer"; 7 | 8 | 9 | package relayer; 10 | 11 | message GetTpuConfigsRequest {} 12 | message GetTpuConfigsResponse { 13 | shared.Socket tpu = 1; 14 | shared.Socket tpu_forward = 2; 15 | } 16 | 17 | message SubscribePacketsRequest {} 18 | message SubscribePacketsResponse { 19 | shared.Header header = 1; 20 | oneof msg { 21 | shared.Heartbeat heartbeat = 2; 22 | packet.PacketBatch batch = 3; 23 | } 24 | } 25 | 26 | /// Relayers offer a TPU and TPU forward proxy for Solana validators. 27 | /// Validators can connect and fetch the TPU configuration for the relayer and start to advertise the 28 | /// relayer's information in gossip. 29 | /// They can also subscribe to packets which arrived on the TPU ports at the relayer 30 | service Relayer { 31 | // The relayer has TPU and TPU forward sockets that validators can leverage. 32 | // A validator can fetch this config and change its TPU and TPU forward port in gossip. 33 | rpc GetTpuConfigs (GetTpuConfigsRequest) returns (GetTpuConfigsResponse) {} 34 | 35 | // Validators can subscribe to packets from the relayer and receive a multiplexed signal that contains a mixture 36 | // of packets and heartbeats 37 | rpc SubscribePackets (SubscribePacketsRequest) returns (stream SubscribePacketsResponse) {} 38 | } 39 | -------------------------------------------------------------------------------- /proto/mev-protos/searcher.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package searcher; 4 | 5 | import "mev-protos/bundle.proto"; 6 | import "mev-protos/packet.proto"; 7 | 8 | import "google/protobuf/timestamp.proto"; 9 | 10 | option go_package = "github.com/bloXroute-Labs/solana-trader-proto/searcher"; 11 | 12 | 13 | message SlotList { 14 | repeated uint64 slots = 1; 15 | } 16 | 17 | message ConnectedLeadersResponse { 18 | // Mapping of validator pubkey to leader slots for the current epoch. 19 | map connected_validators = 1; 20 | } 21 | 22 | message SendBundleRequest { 23 | bundle.Bundle bundle = 1; 24 | } 25 | 26 | message SendBundleResponse { 27 | // server uuid for the bundle 28 | string uuid = 1; 29 | } 30 | 31 | message ProgramSubscriptionV0 { 32 | // Base58 encoded program id that transactions mention 33 | repeated string programs = 1; 34 | } 35 | 36 | message WriteLockedAccountSubscriptionV0 { 37 | // Base58 encoded account pubkey that transactions mention 38 | repeated string accounts = 1; 39 | } 40 | 41 | message MempoolSubscription { 42 | // Filter by program id or account pubkey 43 | oneof msg { 44 | ProgramSubscriptionV0 program_v0_sub = 1; 45 | WriteLockedAccountSubscriptionV0 wla_v0_sub = 2; 46 | /// field numbers upto (and incl) 9 are reserved 47 | } 48 | 49 | // Filters transactions to originate from specified regions. 50 | // Defaults to the currently connected region. 51 | repeated string regions = 10; 52 | } 53 | 54 | message PendingTxNotification { 55 | // server-side timestamp the transactions were generated at (for debugging/profiling purposes) 56 | google.protobuf.Timestamp server_side_ts = 1; 57 | // expiration time of the packet 58 | google.protobuf.Timestamp expiration_time = 2; 59 | // list of pending transactions 60 | repeated packet.Packet transactions = 3; 61 | } 62 | 63 | message NextScheduledLeaderRequest {} 64 | 65 | message NextScheduledLeaderResponse { 66 | // the current slot the backend is on 67 | uint64 current_slot = 1; 68 | 69 | // the slot and identity of the next leader 70 | uint64 next_leader_slot = 2; 71 | string next_leader_identity = 3; 72 | } 73 | 74 | message ConnectedLeadersRequest {} 75 | 76 | message ConnectedLeadersRegionedRequest { 77 | // Defaults to the currently connected region if no region provided. 78 | repeated string regions = 1; 79 | } 80 | message ConnectedLeadersRegionedResponse { 81 | map connected_validators = 1; 82 | } 83 | 84 | 85 | message GetTipAccountsRequest {} 86 | 87 | message GetTipAccountsResponse { 88 | repeated string accounts = 1; 89 | } 90 | 91 | message SubscribeBundleResultsRequest {} 92 | 93 | message GetRegionsRequest {} 94 | message GetRegionsResponse { 95 | // The region the client is currently connected to 96 | string current_region = 1; 97 | 98 | // Regions that are online and ready for connections 99 | // All regions: https://jito-labs.gitbook.io/mev/systems/connecting/mainnet 100 | repeated string available_regions = 2; 101 | } 102 | 103 | service SearcherService { 104 | // Searchers can invoke this endpoint to subscribe to their respective bundle results. 105 | // A success result would indicate the bundle won its state auction and was submitted to the validator. 106 | rpc SubscribeBundleResults (SubscribeBundleResultsRequest) returns (stream bundle.BundleResult) {} 107 | 108 | // Subscribe to mempool transactions based on a few filters 109 | rpc SubscribeMempool (MempoolSubscription) returns (stream PendingTxNotification) {} 110 | 111 | rpc SendBundle (SendBundleRequest) returns (SendBundleResponse) {} 112 | 113 | // Returns the next scheduled leader connected to the block engine. 114 | rpc GetNextScheduledLeader (NextScheduledLeaderRequest) returns (NextScheduledLeaderResponse) {} 115 | 116 | // Returns leader slots for connected jito validators during the current epoch. Only returns data for this region. 117 | rpc GetConnectedLeaders (ConnectedLeadersRequest) returns (ConnectedLeadersResponse) {} 118 | 119 | // Returns leader slots for connected jito validators during the current epoch. 120 | rpc GetConnectedLeadersRegioned (ConnectedLeadersRegionedRequest) returns (ConnectedLeadersRegionedResponse) {} 121 | 122 | // Returns the tip accounts searchers shall transfer funds to for the leader to claim. 123 | rpc GetTipAccounts (GetTipAccountsRequest) returns (GetTipAccountsResponse) {} 124 | 125 | // Returns region the client is directly connected to, along with all available regions 126 | rpc GetRegions (GetRegionsRequest) returns (GetRegionsResponse) {} 127 | } 128 | -------------------------------------------------------------------------------- /proto/mev-protos/shared.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | import "google/protobuf/timestamp.proto"; 4 | 5 | option go_package = "github.com/bloXroute-Labs/solana-trader-proto/shared"; 6 | 7 | 8 | package shared; 9 | 10 | message Header { 11 | google.protobuf.Timestamp ts = 1; 12 | } 13 | 14 | message Heartbeat { 15 | uint64 count = 1; 16 | } 17 | 18 | message Socket { 19 | string ip = 1; 20 | int64 port = 2; 21 | } 22 | -------------------------------------------------------------------------------- /proto/mev-protos/shredstream.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package shredstream; 4 | 5 | import "mev-protos/shared.proto"; 6 | 7 | option go_package = "github.com/bloXroute-Labs/solana-trader-proto/shredstream"; 8 | 9 | 10 | message Heartbeat { 11 | // don't trust IP:PORT from tcp header since it can be tampered over the wire 12 | // `socket.ip` must match incoming packet's ip. this prevents spamming an unwitting destination 13 | shared.Socket socket = 1; 14 | 15 | // regions for shredstream proxy to receive shreds from 16 | // list of valid regions: https://jito-labs.gitbook.io/mev/systems/connecting/mainnet 17 | repeated string regions = 2; 18 | } 19 | 20 | message HeartbeatResponse { 21 | // client must respond within `ttl_ms` to keep stream alive 22 | uint32 ttl_ms = 1; 23 | } 24 | 25 | service Shredstream { 26 | // RPC endpoint to send heartbeats to keep shreds flowing 27 | rpc SendHeartbeat (Heartbeat) returns (HeartbeatResponse) {} 28 | } 29 | -------------------------------------------------------------------------------- /proto/mev-protos/trace_shred.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package trace_shred; 4 | 5 | import "google/protobuf/timestamp.proto"; 6 | 7 | option go_package = "github.com/bloXroute-Labs/solana-trader-proto/trace_shred"; 8 | 9 | message TraceShred { 10 | // source region, one of: https://jito-labs.gitbook.io/mev/systems/connecting/mainnet 11 | string region = 1; 12 | // timestamp of creation 13 | google.protobuf.Timestamp created_at = 2; 14 | // monotonically increases, resets upon service restart 15 | uint32 seq_num = 3; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /proto/protoc-gen-openapiv2/options/annotations.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package grpc.gateway.protoc_gen_openapiv2.options; 4 | 5 | import "google/protobuf/descriptor.proto"; 6 | import "protoc-gen-openapiv2/options/openapiv2.proto"; 7 | 8 | option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"; 9 | 10 | extend google.protobuf.FileOptions { 11 | // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. 12 | // 13 | // All IDs are the same, as assigned. It is okay that they are the same, as they extend 14 | // different descriptor messages. 15 | Swagger openapiv2_swagger = 1042; 16 | } 17 | extend google.protobuf.MethodOptions { 18 | // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. 19 | // 20 | // All IDs are the same, as assigned. It is okay that they are the same, as they extend 21 | // different descriptor messages. 22 | Operation openapiv2_operation = 1042; 23 | } 24 | extend google.protobuf.MessageOptions { 25 | // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. 26 | // 27 | // All IDs are the same, as assigned. It is okay that they are the same, as they extend 28 | // different descriptor messages. 29 | Schema openapiv2_schema = 1042; 30 | } 31 | extend google.protobuf.ServiceOptions { 32 | // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. 33 | // 34 | // All IDs are the same, as assigned. It is okay that they are the same, as they extend 35 | // different descriptor messages. 36 | Tag openapiv2_tag = 1042; 37 | } 38 | extend google.protobuf.FieldOptions { 39 | // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. 40 | // 41 | // All IDs are the same, as assigned. It is okay that they are the same, as they extend 42 | // different descriptor messages. 43 | JSONSchema openapiv2_field = 1042; 44 | } -------------------------------------------------------------------------------- /python/README.md: -------------------------------------------------------------------------------- 1 | # solana-trader-proto-python package 2 | 3 | ## Running 4 | 5 | Install dependencies: 6 | ```shell 7 | pip install -r requirements.txt 8 | ``` 9 | 10 | You should probably create a separate `virtualenv` for this, since this project 11 | relies on a specific version of `betterproto`. 12 | 13 | ## Publishing 14 | 15 | ```shell 16 | python3 -m pip install --user --upgrade twine 17 | ``` 18 | 19 | upgrade the version in pyproject.toml 20 | 21 | ```shell 22 | make proto 23 | cd python 24 | rm -rf dist/ && python3 -m build 25 | ``` 26 | 27 | you can install package locally before uploading it to the pypi 28 | 29 | ```shell 30 | pip install dist/bxsolana_trader_proto-.tar.gz 31 | ``` 32 | 33 | now, you can upload the artifact to pypi 34 | 35 | ```shell 36 | python3 -m twine upload --repository pypi dist/* 37 | ``` 38 | 39 | ## Issues 40 | if you encounter any issues related to the above python3 commands refer to this page for steps to setup your local machine 41 | [https://packaging.python.org/en/latest/tutorials/packaging-projects/](https://packaging.python.org/en/latest/tutorials/packaging-projects/) -------------------------------------------------------------------------------- /python/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "bxsolana-trader-proto" 3 | version = "0.1.8" 4 | 5 | description = "proto-generated files for solana-trader-api" 6 | dependencies = [ 7 | "betterproto==v2.0.0b6" 8 | ] 9 | 10 | [build-system] 11 | requires = ["setuptools"] 12 | build-backend = "setuptools.build_meta" 13 | 14 | [tool.setuptools.packages.find] 15 | where = ["src"] 16 | namespaces = false 17 | 18 | [tool.black] 19 | line-length = 80 20 | preview = true 21 | -------------------------------------------------------------------------------- /python/requirements.txt: -------------------------------------------------------------------------------- 1 | . 2 | betterproto[compiler] @ git+https://github.com/danielgtaylor/python-betterproto@098989e 3 | -------------------------------------------------------------------------------- /python/src/bxsolana_trader_proto/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloXroute-Labs/solana-trader-proto/3c502d419f246539bcb57b89557528e882ccaea2/python/src/bxsolana_trader_proto/__init__.py -------------------------------------------------------------------------------- /python/src/bxsolana_trader_proto/common.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: common.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | 6 | import betterproto 7 | 8 | 9 | class OrderType(betterproto.Enum): 10 | OT_MARKET = 0 11 | OT_LIMIT = 1 12 | OT_IOC = 2 13 | OT_POST = 3 14 | 15 | 16 | class PerpOrderType(betterproto.Enum): 17 | """perp types : limit, trigger_market, trigger_limit, market, oracle""" 18 | 19 | POT_UNKNOWN = 0 20 | POT_MARKET = 1 21 | POT_LIMIT = 2 22 | POT_TRIGGER_MARKET = 3 23 | POT_TRIGGER_LIMIT = 4 24 | 25 | 26 | class PerpPositionSide(betterproto.Enum): 27 | PS_UNKNOWN = 0 28 | PS_LONG = 1 29 | PS_SHORT = 2 30 | 31 | 32 | class PostOnlyParams(betterproto.Enum): 33 | PO_NONE = 0 34 | PO_MUST_POST_ONLY = 1 35 | PO_TRY_POST_ONLY = 2 36 | 37 | 38 | class MarginContract(betterproto.Enum): 39 | """don't use this in api.proto""" 40 | 41 | ALL_SPOTS = 0 42 | SOL_SPOT = 1 43 | USDC_SPOT = 2 44 | MSOL_SPOT = 3 45 | WBTC_SPOT = 4 46 | WETH_SPOT = 5 47 | USDT_SPOT = 6 48 | 49 | 50 | class PerpContract(betterproto.Enum): 51 | ALL = 0 52 | SOL_PERP = 1 53 | ETH_PERP = 2 54 | BTC_PERP = 3 55 | APT_PERP = 4 56 | BONK_PERP = 5 57 | MATIC_PERP = 6 58 | ARB_PERP = 7 59 | DOGE_PERP = 8 60 | BNB_PERP = 9 61 | SUI_PERP = 10 62 | PEPE_PERP = 11 63 | OP_PERP = 12 64 | RNDR_PERP = 13 65 | XRP_PERP = 14 66 | 67 | 68 | class PerpCollateralType(betterproto.Enum): 69 | PCT_DEPOSIT = 0 70 | PCT_WITHDRAWAL = 1 71 | PCT_TRANSFER = 2 72 | 73 | 74 | class PerpCollateralToken(betterproto.Enum): 75 | PCTK_USDC = 0 76 | PCTK_SOL = 1 77 | 78 | 79 | class Infinity(betterproto.Enum): 80 | INF_NOT = 0 81 | INF_POSITIVE = 1 82 | INF_NEGATIVE = 2 83 | 84 | 85 | @dataclass 86 | class PriceImpactPercent(betterproto.Message): 87 | percent: float = betterproto.double_field(1) 88 | infinity: "Infinity" = betterproto.enum_field(2) 89 | 90 | 91 | @dataclass 92 | class PriceImpactPercentV2(betterproto.Message): 93 | percent: float = betterproto.double_field(1) 94 | infinity: str = betterproto.string_field(2) 95 | 96 | 97 | @dataclass 98 | class Fee(betterproto.Message): 99 | amount: float = betterproto.float_field(1) 100 | mint: str = betterproto.string_field(2) 101 | percent: float = betterproto.float_field(3) 102 | -------------------------------------------------------------------------------- /python/src/bxsolana_trader_proto/common/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: common.proto 3 | # plugin: python-betterproto 4 | # This file has been @generated 5 | 6 | from dataclasses import dataclass 7 | 8 | import betterproto 9 | 10 | 11 | class OrderType(betterproto.Enum): 12 | OT_MARKET = 0 13 | OT_LIMIT = 1 14 | OT_IOC = 2 15 | OT_POST = 3 16 | 17 | 18 | class PerpOrderType(betterproto.Enum): 19 | """perp types : limit, trigger_market, trigger_limit, market, oracle""" 20 | 21 | POT_UNKNOWN = 0 22 | POT_MARKET = 1 23 | POT_LIMIT = 2 24 | POT_TRIGGER_MARKET = 3 25 | POT_TRIGGER_LIMIT = 4 26 | 27 | 28 | class PerpPositionSide(betterproto.Enum): 29 | PS_UNKNOWN = 0 30 | PS_LONG = 1 31 | PS_SHORT = 2 32 | 33 | 34 | class PostOnlyParams(betterproto.Enum): 35 | PO_NONE = 0 36 | PO_MUST_POST_ONLY = 1 37 | PO_TRY_POST_ONLY = 2 38 | 39 | 40 | class MarginContract(betterproto.Enum): 41 | """don't use this in api.proto""" 42 | 43 | ALL_SPOTS = 0 44 | SOL_SPOT = 1 45 | USDC_SPOT = 2 46 | MSOL_SPOT = 3 47 | WBTC_SPOT = 4 48 | WETH_SPOT = 5 49 | USDT_SPOT = 6 50 | 51 | 52 | class PerpContract(betterproto.Enum): 53 | ALL = 0 54 | SOL_PERP = 1 55 | ETH_PERP = 2 56 | BTC_PERP = 3 57 | APT_PERP = 4 58 | BONK_PERP = 5 59 | MATIC_PERP = 6 60 | ARB_PERP = 7 61 | DOGE_PERP = 8 62 | BNB_PERP = 9 63 | SUI_PERP = 10 64 | PEPE_PERP = 11 65 | OP_PERP = 12 66 | RNDR_PERP = 13 67 | XRP_PERP = 14 68 | 69 | 70 | class PerpCollateralType(betterproto.Enum): 71 | PCT_DEPOSIT = 0 72 | PCT_WITHDRAWAL = 1 73 | PCT_TRANSFER = 2 74 | 75 | 76 | class PerpCollateralToken(betterproto.Enum): 77 | PCTK_USDC = 0 78 | PCTK_SOL = 1 79 | 80 | 81 | class Infinity(betterproto.Enum): 82 | INF_NOT = 0 83 | INF_POSITIVE = 1 84 | INF_NEGATIVE = 2 85 | 86 | 87 | @dataclass(eq=False, repr=False) 88 | class PriceImpactPercent(betterproto.Message): 89 | percent: float = betterproto.double_field(1) 90 | infinity: "Infinity" = betterproto.enum_field(2) 91 | 92 | 93 | @dataclass(eq=False, repr=False) 94 | class PriceImpactPercentV2(betterproto.Message): 95 | percent: float = betterproto.double_field(1) 96 | infinity: str = betterproto.string_field(2) 97 | 98 | 99 | @dataclass(eq=False, repr=False) 100 | class Fee(betterproto.Message): 101 | amount: float = betterproto.float_field(1) 102 | mint: str = betterproto.string_field(2) 103 | percent: float = betterproto.float_field(3) 104 | -------------------------------------------------------------------------------- /python/src/bxsolana_trader_proto/google/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloXroute-Labs/solana-trader-proto/3c502d419f246539bcb57b89557528e882ccaea2/python/src/bxsolana_trader_proto/google/__init__.py -------------------------------------------------------------------------------- /python/src/bxsolana_trader_proto/grpc/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloXroute-Labs/solana-trader-proto/3c502d419f246539bcb57b89557528e882ccaea2/python/src/bxsolana_trader_proto/grpc/__init__.py -------------------------------------------------------------------------------- /python/src/bxsolana_trader_proto/grpc/gateway/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloXroute-Labs/solana-trader-proto/3c502d419f246539bcb57b89557528e882ccaea2/python/src/bxsolana_trader_proto/grpc/gateway/__init__.py -------------------------------------------------------------------------------- /python/src/bxsolana_trader_proto/grpc/gateway/protoc_gen_openapiv2/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bloXroute-Labs/solana-trader-proto/3c502d419f246539bcb57b89557528e882ccaea2/python/src/bxsolana_trader_proto/grpc/gateway/protoc_gen_openapiv2/__init__.py -------------------------------------------------------------------------------- /python/src/bxsolana_trader_proto/packet.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: mev-protos/packet.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import List 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass 11 | class PacketBatch(betterproto.Message): 12 | packets: List["Packet"] = betterproto.message_field(1) 13 | 14 | 15 | @dataclass 16 | class Packet(betterproto.Message): 17 | data: bytes = betterproto.bytes_field(1) 18 | meta: "Meta" = betterproto.message_field(2) 19 | 20 | 21 | @dataclass 22 | class Meta(betterproto.Message): 23 | size: int = betterproto.uint64_field(1) 24 | addr: str = betterproto.string_field(2) 25 | port: int = betterproto.uint32_field(3) 26 | flags: "PacketFlags" = betterproto.message_field(4) 27 | sender_stake: int = betterproto.uint64_field(5) 28 | 29 | 30 | @dataclass 31 | class PacketFlags(betterproto.Message): 32 | discard: bool = betterproto.bool_field(1) 33 | forwarded: bool = betterproto.bool_field(2) 34 | repair: bool = betterproto.bool_field(3) 35 | simple_vote_tx: bool = betterproto.bool_field(4) 36 | tracer_packet: bool = betterproto.bool_field(5) 37 | -------------------------------------------------------------------------------- /rust/README.md: -------------------------------------------------------------------------------- 1 | # solana-trader-proto rust crate 2 | ## Publishing 3 | ### Setup 4 | 5 | We use the `bx-circle-ci` credentials for managing our [crates.io](crates.io) account. To login to [crates.io](crates.io), logout of your github account and log back in to github with the `bx-circle-ci` credentials from `1Password`. You can then navigate to [crates.io](crates.io) and select `login with Github`. 6 | 7 | The [crates.io](crates.io) site is where we manage API tokens for publishing our rust crates. You can navigate to the `bx-circle-ci` credentials page in `1Password` to get the latest [crates.io](crates.io) token. 8 | 9 | ### Steps 10 | 11 | 1. Start with a clean pull of the repo you would like to publish. 12 | 1. solana-trader-proto 13 | 2. solana-trader-client-rust 14 | 2. Run `cargo publish --dry-run` to see if you will have any issues publishing. 15 | 1. If you get an error mentioning files have not been checked into git and suggesting to use `--allow-dirty`, be sure to track down the folder/files that are causing the error and resolve before proceeding. 16 | 3. If `cargo publish --dry-run` is successful, run `cargo publish --token `. -------------------------------------------------------------------------------- /rust/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod api { 2 | tonic::include_proto!("api"); 3 | } 4 | 5 | pub mod common { 6 | tonic::include_proto!("common"); 7 | } 8 | --------------------------------------------------------------------------------