Skip to content

Commit 1bf15da

Browse files
committed
feat(gRPC): add grpc client, types and proto-build
1 parent 37ee5c8 commit 1bf15da

145 files changed

Lines changed: 26240 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/license.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
runs-on: self-hosted-x64
1616
steps:
1717
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
18-
- run: cargo license-template --template .license_template
18+
- run: cargo license-template --template .license_template --ignore .license_ignore

.license_ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Generated protobuf files from Google
2+
crates/iota-sdk-grpc-types/src/proto/generated/google.*

Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ members = [
66
"crates/iota-sdk-ffi",
77
"crates/iota-sdk-graphql-client",
88
"crates/iota-sdk-graphql-client-build",
9+
"crates/iota-sdk-grpc-client",
10+
"crates/iota-sdk-grpc-proto-build",
11+
"crates/iota-sdk-grpc-types",
912
"crates/iota-sdk-transaction-builder",
1013
"crates/iota-sdk-types",
1114
"crates/iota-sdk/examples/polling-indexer",
@@ -25,11 +28,14 @@ bnum = "0.12.0"
2528
cynic = "3.7.3"
2629
derive_more = "2.0"
2730
eyre = "0.6"
31+
futures = "0.3.29"
2832
hex = "0.4.3"
2933
itertools = "0.13.0"
3034
paste = "1.0.15"
3135
primitive-types = { version = "0.14", features = ["impl-serde"] }
3236
proptest = { version = "1.6.0", default-features = false }
37+
prost = "0.14"
38+
prost-types = "0.14"
3339
rand = "0.8.5"
3440
rand_core = "0.6.4"
3541
reqwest = { version = "0.12", default-features = false }
@@ -40,6 +46,7 @@ strum = "0.27.2"
4046
test-strategy = "0.4.0"
4147
thiserror = "2.0"
4248
tokio = "1.40.0"
49+
tonic = "0.14"
4350
tracing = "0.1.37"
4451
variadics_please = "1.1"
4552
wasm-bindgen-test = "0.3"
@@ -48,6 +55,9 @@ wasm-bindgen-test = "0.3"
4855
iota-crypto = { version = "0.0.1-alpha.1", package = "iota-sdk-crypto", path = "crates/iota-sdk-crypto", default-features = false }
4956
iota-graphql-client = { version = "0.0.1-alpha.1", package = "iota-sdk-graphql-client", path = "crates/iota-sdk-graphql-client", default-features = false }
5057
iota-graphql-client-build = { version = "0.0.1-alpha.1", package = "iota-sdk-graphql-client-build", path = "crates/iota-sdk-graphql-client-build", default-features = false }
58+
iota-grpc-client = { version = "0.0.1-alpha.1", package = "iota-sdk-grpc-client", path = "crates/iota-sdk-grpc-client", default-features = false }
59+
iota-grpc-proto-build = { version = "0.0.1-alpha.1", package = "iota-sdk-grpc-proto-build", path = "crates/iota-sdk-grpc-proto-build", default-features = false }
60+
iota-grpc-types = { version = "0.0.1-alpha.1", package = "iota-sdk-grpc-types", path = "crates/iota-sdk-grpc-types", default-features = false }
5161
iota-sdk = { version = "3.0.0-alpha.1", package = "iota-sdk", path = "crates/iota-sdk", default-features = false }
5262
iota-transaction-builder = { version = "0.0.1-alpha.1", package = "iota-sdk-transaction-builder", path = "crates/iota-sdk-transaction-builder", default-features = false }
5363
iota-types = { version = "0.0.1-alpha.1", package = "iota-sdk-types", path = "crates/iota-sdk-types", default-features = false }

crates/iota-sdk-graphql-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bcs.workspace = true
1818
chrono = "0.4.26"
1919
cynic.workspace = true
2020
derive_more = { workspace = true, features = ["from"] }
21-
futures = "0.3.29"
21+
futures.workspace = true
2222
reqwest = { workspace = true, features = ["rustls-tls", "json"] }
2323
serde.workspace = true
2424
serde_json.workspace = true
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[package]
2+
name = "iota-sdk-grpc-client"
3+
version = "0.0.1-alpha.1"
4+
authors = ["IOTA Foundation <[email protected]>"]
5+
edition = "2024"
6+
license = "Apache-2.0"
7+
publish = false
8+
9+
[lints]
10+
workspace = true
11+
12+
[dependencies]
13+
# external dependencies
14+
async-stream = "0.3"
15+
base64 = "0.22"
16+
futures.workspace = true
17+
http = "1.4"
18+
prost.workspace = true
19+
serde.workspace = true
20+
thiserror.workspace = true
21+
tonic = { workspace = true, features = ["zstd"] }
22+
23+
# internal dependencies
24+
iota-grpc-types.workspace = true
25+
iota-types.workspace = true
26+
27+
[features]
28+
default = ["tls-ring", "tls-native-roots"]
29+
tls-ring = ["tonic/tls-ring"]
30+
tls-native-roots = ["tonic/tls-native-roots"]
31+
tls-webpki-roots = ["tonic/tls-webpki-roots"]

0 commit comments

Comments
 (0)