quicknode-sdk 0.1.0a25__tar.gz → 0.1.0a29__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/Cargo.lock +37 -37
  2. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/Cargo.toml +1 -1
  3. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/PKG-INFO +41 -1
  4. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/Cargo.toml +1 -1
  5. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/README.md +34 -0
  6. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/examples/admin_e2e.rs +29 -0
  7. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/mod.rs +1 -0
  8. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/config.rs +48 -2
  9. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/kvstore/mod.rs +6 -4
  10. quicknode_sdk-0.1.0a29/crates/core/src/lib.rs +346 -0
  11. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/webhooks/mod.rs +39 -0
  12. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/webhooks/webhook.rs +4 -0
  13. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/python/src/lib.rs +34 -4
  14. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/pyproject.toml +1 -1
  15. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/python/README.md +40 -0
  16. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/python/sdk/__init__.py +5 -25
  17. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/python/sdk/_core/__init__.pyi +21 -1
  18. quicknode_sdk-0.1.0a25/crates/core/src/lib.rs +0 -152
  19. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/LICENSE +0 -0
  20. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/LICENSE +0 -0
  21. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/examples/admin.rs +0 -0
  22. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/examples/kvstore_e2e.rs +0 -0
  23. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/examples/streams.rs +0 -0
  24. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/examples/streams_e2e.rs +0 -0
  25. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/examples/webhooks_e2e.rs +0 -0
  26. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/billing.rs +0 -0
  27. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/bulk.rs +0 -0
  28. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/chains.rs +0 -0
  29. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/endpoint_metrics.rs +0 -0
  30. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/endpoint_rate_limits.rs +0 -0
  31. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/endpoint_security.rs +0 -0
  32. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/endpoint_urls.rs +0 -0
  33. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/endpoints.rs +0 -0
  34. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/logs.rs +0 -0
  35. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/tags.rs +0 -0
  36. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/teams.rs +0 -0
  37. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/admin/usage.rs +0 -0
  38. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/errors.rs +0 -0
  39. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/streams/mod.rs +0 -0
  40. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/core/src/streams/stream.rs +0 -0
  41. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/python/Cargo.toml +0 -0
  42. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/python/src/errors.rs +0 -0
  43. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/python/src/streams_destination.rs +0 -0
  44. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/crates/python/src/webhooks_template.rs +0 -0
  45. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/python/sdk/__init__.pyi +0 -0
  46. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/python/sdk/init_manual_override.pyi +0 -0
  47. {quicknode_sdk-0.1.0a25 → quicknode_sdk-0.1.0a29}/python/sdk/py.typed +0 -0
@@ -156,9 +156,9 @@ dependencies = [
156
156
 
157
157
  [[package]]
158
158
  name = "bumpalo"
159
- version = "3.20.2"
159
+ version = "3.20.3"
160
160
  source = "registry+https://github.com/rust-lang/crates.io-index"
161
- checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
161
+ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
162
162
 
163
163
  [[package]]
164
164
  name = "bytes"
@@ -420,9 +420,9 @@ dependencies = [
420
420
 
421
421
  [[package]]
422
422
  name = "displaydoc"
423
- version = "0.2.5"
423
+ version = "0.2.6"
424
424
  source = "registry+https://github.com/rust-lang/crates.io-index"
425
- checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
425
+ checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f"
426
426
  dependencies = [
427
427
  "proc-macro2",
428
428
  "quote",
@@ -712,9 +712,9 @@ checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
712
712
 
713
713
  [[package]]
714
714
  name = "http"
715
- version = "1.4.0"
715
+ version = "1.4.1"
716
716
  source = "registry+https://github.com/rust-lang/crates.io-index"
717
- checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
717
+ checksum = "8be7462df143984c4598a256ef469b251d7d7f9e271135073e78fc535414f3d0"
718
718
  dependencies = [
719
719
  "bytes",
720
720
  "itoa",
@@ -757,9 +757,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
757
757
 
758
758
  [[package]]
759
759
  name = "hyper"
760
- version = "1.9.0"
760
+ version = "1.10.0"
761
761
  source = "registry+https://github.com/rust-lang/crates.io-index"
762
- checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca"
762
+ checksum = "eb92f162bf56536459fc83c79b974bb12837acfed43d6bc370a7916d0ae15ecc"
763
763
  dependencies = [
764
764
  "atomic-waker",
765
765
  "bytes",
@@ -1088,9 +1088,9 @@ dependencies = [
1088
1088
 
1089
1089
  [[package]]
1090
1090
  name = "js-sys"
1091
- version = "0.3.98"
1091
+ version = "0.3.99"
1092
1092
  source = "registry+https://github.com/rust-lang/crates.io-index"
1093
- checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08"
1093
+ checksum = "142bc4740e452c1e57ade0cbc129f139c9093e354346f0872ef985f4f5cf5f11"
1094
1094
  dependencies = [
1095
1095
  "cfg-if",
1096
1096
  "futures-util",
@@ -1155,9 +1155,9 @@ checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
1155
1155
 
1156
1156
  [[package]]
1157
1157
  name = "log"
1158
- version = "0.4.29"
1158
+ version = "0.4.30"
1159
1159
  source = "registry+https://github.com/rust-lang/crates.io-index"
1160
- checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
1160
+ checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5"
1161
1161
 
1162
1162
  [[package]]
1163
1163
  name = "lru-slab"
@@ -1206,9 +1206,9 @@ dependencies = [
1206
1206
 
1207
1207
  [[package]]
1208
1208
  name = "memchr"
1209
- version = "2.8.0"
1209
+ version = "2.8.1"
1210
1210
  source = "registry+https://github.com/rust-lang/crates.io-index"
1211
- checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
1211
+ checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8"
1212
1212
 
1213
1213
  [[package]]
1214
1214
  name = "memoffset"
@@ -1700,7 +1700,7 @@ dependencies = [
1700
1700
 
1701
1701
  [[package]]
1702
1702
  name = "quicknode-sdk"
1703
- version = "0.1.0-alpha.25"
1703
+ version = "0.1.0-alpha.29"
1704
1704
  dependencies = [
1705
1705
  "bon",
1706
1706
  "config",
@@ -1917,9 +1917,9 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
1917
1917
 
1918
1918
  [[package]]
1919
1919
  name = "reqwest"
1920
- version = "0.13.3"
1920
+ version = "0.13.4"
1921
1921
  source = "registry+https://github.com/rust-lang/crates.io-index"
1922
- checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0"
1922
+ checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3"
1923
1923
  dependencies = [
1924
1924
  "base64",
1925
1925
  "bytes",
@@ -2177,7 +2177,7 @@ dependencies = [
2177
2177
 
2178
2178
  [[package]]
2179
2179
  name = "sdk-node"
2180
- version = "0.1.0-alpha.25"
2180
+ version = "0.1.0-alpha.29"
2181
2181
  dependencies = [
2182
2182
  "napi",
2183
2183
  "napi-build",
@@ -2189,7 +2189,7 @@ dependencies = [
2189
2189
 
2190
2190
  [[package]]
2191
2191
  name = "sdk-python"
2192
- version = "0.1.0-alpha.25"
2192
+ version = "0.1.0-alpha.29"
2193
2193
  dependencies = [
2194
2194
  "pyo3",
2195
2195
  "pyo3-async-runtimes",
@@ -2200,7 +2200,7 @@ dependencies = [
2200
2200
 
2201
2201
  [[package]]
2202
2202
  name = "sdk-python-stubs"
2203
- version = "0.1.0-alpha.25"
2203
+ version = "0.1.0-alpha.29"
2204
2204
  dependencies = [
2205
2205
  "pyo3-stub-gen",
2206
2206
  "sdk-python",
@@ -2208,7 +2208,7 @@ dependencies = [
2208
2208
 
2209
2209
  [[package]]
2210
2210
  name = "sdk-ruby"
2211
- version = "0.1.0-alpha.25"
2211
+ version = "0.1.0-alpha.29"
2212
2212
  dependencies = [
2213
2213
  "magnus",
2214
2214
  "quicknode-sdk",
@@ -2917,9 +2917,9 @@ dependencies = [
2917
2917
 
2918
2918
  [[package]]
2919
2919
  name = "wasm-bindgen"
2920
- version = "0.2.121"
2920
+ version = "0.2.122"
2921
2921
  source = "registry+https://github.com/rust-lang/crates.io-index"
2922
- checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790"
2922
+ checksum = "3ed04576f974d2b2fba0f38c51dbc5518011e38c36bf1143164be765528fd409"
2923
2923
  dependencies = [
2924
2924
  "cfg-if",
2925
2925
  "once_cell",
@@ -2930,9 +2930,9 @@ dependencies = [
2930
2930
 
2931
2931
  [[package]]
2932
2932
  name = "wasm-bindgen-futures"
2933
- version = "0.4.71"
2933
+ version = "0.4.72"
2934
2934
  source = "registry+https://github.com/rust-lang/crates.io-index"
2935
- checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8"
2935
+ checksum = "9473dbd2991ae90b6291c3c32c30c6187ac49aa32f9905d1cce280ec1e110b0f"
2936
2936
  dependencies = [
2937
2937
  "js-sys",
2938
2938
  "wasm-bindgen",
@@ -2940,9 +2940,9 @@ dependencies = [
2940
2940
 
2941
2941
  [[package]]
2942
2942
  name = "wasm-bindgen-macro"
2943
- version = "0.2.121"
2943
+ version = "0.2.122"
2944
2944
  source = "registry+https://github.com/rust-lang/crates.io-index"
2945
- checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578"
2945
+ checksum = "916151b09da36bd82f6615cbf3a419e2f0ba23a03c6160e8e92eb6bd4aa1dec6"
2946
2946
  dependencies = [
2947
2947
  "quote",
2948
2948
  "wasm-bindgen-macro-support",
@@ -2950,9 +2950,9 @@ dependencies = [
2950
2950
 
2951
2951
  [[package]]
2952
2952
  name = "wasm-bindgen-macro-support"
2953
- version = "0.2.121"
2953
+ version = "0.2.122"
2954
2954
  source = "registry+https://github.com/rust-lang/crates.io-index"
2955
- checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2"
2955
+ checksum = "299047362ccbfce148b67ab7e73349f77748e00c8296f9542adfad2ad82c5c5e"
2956
2956
  dependencies = [
2957
2957
  "bumpalo",
2958
2958
  "proc-macro2",
@@ -2963,18 +2963,18 @@ dependencies = [
2963
2963
 
2964
2964
  [[package]]
2965
2965
  name = "wasm-bindgen-shared"
2966
- version = "0.2.121"
2966
+ version = "0.2.122"
2967
2967
  source = "registry+https://github.com/rust-lang/crates.io-index"
2968
- checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441"
2968
+ checksum = "9a929b2c61f11ba3e9bc35b50c1f25cb38e0e892c0c231ae2b8cf78d5dad4437"
2969
2969
  dependencies = [
2970
2970
  "unicode-ident",
2971
2971
  ]
2972
2972
 
2973
2973
  [[package]]
2974
2974
  name = "web-sys"
2975
- version = "0.3.98"
2975
+ version = "0.3.99"
2976
2976
  source = "registry+https://github.com/rust-lang/crates.io-index"
2977
- checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa"
2977
+ checksum = "6d621441cfc37b84979402712047321980c178f299193a3589d05b99e8763436"
2978
2978
  dependencies = [
2979
2979
  "js-sys",
2980
2980
  "wasm-bindgen",
@@ -3303,18 +3303,18 @@ dependencies = [
3303
3303
 
3304
3304
  [[package]]
3305
3305
  name = "zerocopy"
3306
- version = "0.8.48"
3306
+ version = "0.8.49"
3307
3307
  source = "registry+https://github.com/rust-lang/crates.io-index"
3308
- checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9"
3308
+ checksum = "bce33a6288fa3f072a8c2c7d0f2fdbb90e28298f0135c1f99b96c3db2efcc60b"
3309
3309
  dependencies = [
3310
3310
  "zerocopy-derive",
3311
3311
  ]
3312
3312
 
3313
3313
  [[package]]
3314
3314
  name = "zerocopy-derive"
3315
- version = "0.8.48"
3315
+ version = "0.8.49"
3316
3316
  source = "registry+https://github.com/rust-lang/crates.io-index"
3317
- checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4"
3317
+ checksum = "8fd425244944f4ab65ccff928e7323354c5a018c75838362fdce749dfad2ee1e"
3318
3318
  dependencies = [
3319
3319
  "proc-macro2",
3320
3320
  "quote",
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["crates/core", "crates/python"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.1.0-alpha.25"
6
+ version = "0.1.0-alpha.29"
7
7
  edition = "2021"
8
8
  license = "MIT"
9
9
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quicknode-sdk
3
- Version: 0.1.0a25
3
+ Version: 0.1.0a29
4
4
  Classifier: Intended Audience :: Developers
5
5
  Classifier: License :: OSI Approved :: MIT License
6
6
  Classifier: Operating System :: POSIX :: Linux
@@ -33,6 +33,7 @@ This is one of four language bindings published from the same Rust core. See the
33
33
  - [Installation](#installation)
34
34
  - [Quick Start](#quick-start)
35
35
  - [Configuration](#configuration)
36
+ - [Platform Support](#platform-support)
36
37
  - [API Reference](#api-reference)
37
38
  - [Admin Client](#admin-client)
38
39
  - [Endpoints](#endpoints)
@@ -121,6 +122,45 @@ Environment variables (prefix `QN_SDK__`, separator `__`):
121
122
  | `QN_SDK__STREAMS__BASE_URL` | no | `https://api.quicknode.com/streams/rest/v1/` | Override streams base URL |
122
123
  | `QN_SDK__WEBHOOKS__BASE_URL` | no | `https://api.quicknode.com/webhooks/rest/v1/` | Override webhooks base URL |
123
124
  | `QN_SDK__KVSTORE__BASE_URL` | no | `https://api.quicknode.com/kv/rest/v1/` | Override KV store base URL |
125
+ | `QN_SDK__HTTP__HEADERS__<NAME>` | no | — | Custom HTTP header sent on every request. Overrides SDK-managed headers (see below). |
126
+
127
+ ### Custom headers and `User-Agent`
128
+
129
+ Every outbound HTTP request includes an auto-generated `User-Agent` of the form:
130
+
131
+ ```
132
+ quicknode-sdk-<language>/<sdk-version> (<os>-<arch>; <language>-<runtime-version>)
133
+ ```
134
+
135
+ You can attach arbitrary headers via `HttpConfig.headers`. **These headers OVERRIDE any SDK-managed header with the same name**, including `User-Agent`, `x-api-key`, `Accept`, and `Content-Type`. Use this to inject correlation IDs, proxy auth, or to replace the default `User-Agent`. Header names are matched case-insensitively.
136
+
137
+ ```python
138
+ from sdk import QuicknodeSdk, SdkFullConfig, HttpConfig
139
+
140
+ qn = QuicknodeSdk(
141
+ SdkFullConfig(
142
+ api_key="your-key",
143
+ http=HttpConfig(headers={
144
+ "X-Correlation-Id": "abc-123",
145
+ "User-Agent": "my-app/1.0", # overrides SDK default
146
+ }),
147
+ )
148
+ )
149
+ ```
150
+
151
+ ## Platform Support
152
+
153
+ Precompiled wheels are published for:
154
+
155
+ | Platform | Targets |
156
+ |---|---|
157
+ | Linux (glibc) | `x86_64`, `aarch64` — glibc **2.17+** (manylinux2014) |
158
+ | Linux (musl) | `x86_64`, `aarch64` — Alpine and other musl distros |
159
+ | macOS | Apple Silicon (`arm64`) |
160
+
161
+ Linux glibc wheels are built against glibc 2.17 so they load on any distro from 2014 onward — RHEL 7+, Ubuntu 14.04+, Debian 8+, Amazon Linux 2+, SLES 12+, Fedora 19+. If `pip install quicknode-sdk` resolves to a source distribution on your platform, you're on something we don't have a prebuilt wheel for — see the matrix above.
162
+
163
+ **Not supported:** RHEL/CentOS 6 (glibc 2.12), Debian 7 (glibc 2.13), Ubuntu 12.04 (glibc 2.15), SLES 11 (glibc 2.11), Intel macOS, Windows.
124
164
 
125
165
  ## API Reference
126
166
 
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "quicknode-sdk"
3
- version = "0.1.0-alpha.25"
3
+ version = "0.1.0-alpha.29"
4
4
  edition.workspace = true
5
5
  license.workspace = true
6
6
  description = "Core library for quicknode sdk"
@@ -9,6 +9,7 @@ This is one of four language bindings published from the same Rust core. See the
9
9
  - [Installation](#installation)
10
10
  - [Quick Start](#quick-start)
11
11
  - [Configuration](#configuration)
12
+ - [Platform Support](#platform-support)
12
13
  - [API Reference](#api-reference)
13
14
  - [Admin Client](#admin-client)
14
15
  - [Endpoints](#endpoints)
@@ -96,6 +97,39 @@ Environment variables (prefix `QN_SDK__`, separator `__`):
96
97
  | `QN_SDK__STREAMS__BASE_URL` | no | `https://api.quicknode.com/streams/rest/v1/` | Override streams base URL |
97
98
  | `QN_SDK__WEBHOOKS__BASE_URL` | no | `https://api.quicknode.com/webhooks/rest/v1/` | Override webhooks base URL |
98
99
  | `QN_SDK__KVSTORE__BASE_URL` | no | `https://api.quicknode.com/kv/rest/v1/` | Override KV store base URL |
100
+ | `QN_SDK__HTTP__HEADERS__<NAME>` | no | — | Custom HTTP header sent on every request. Overrides SDK-managed headers (see below). |
101
+
102
+ ### Custom headers and `User-Agent`
103
+
104
+ Every outbound HTTP request includes an auto-generated `User-Agent` of the form:
105
+
106
+ ```
107
+ quicknode-sdk-<language>/<sdk-version> (<os>-<arch>; <language>-<runtime-version>)
108
+ ```
109
+
110
+ You can attach arbitrary headers via `HttpConfig.headers`. **These headers OVERRIDE any SDK-managed header with the same name**, including `User-Agent`, `x-api-key`, `Accept`, and `Content-Type`. Use this to inject correlation IDs, proxy auth, or to replace the default `User-Agent`. Header names are matched case-insensitively.
111
+
112
+ ```rust
113
+ use std::collections::HashMap;
114
+ use quicknode_sdk::{HttpConfig, QuicknodeSdk, SdkFullConfig};
115
+
116
+ let mut headers = HashMap::new();
117
+ headers.insert("X-Correlation-Id".to_string(), "abc-123".to_string());
118
+ headers.insert("User-Agent".to_string(), "my-app/1.0".to_string()); // overrides SDK default
119
+
120
+ let qn = QuicknodeSdk::new(
121
+ &SdkFullConfig::builder()
122
+ .api_key("your-key")
123
+ .http(HttpConfig { headers: Some(headers), ..Default::default() })
124
+ .build(),
125
+ )?;
126
+ ```
127
+
128
+ ## Platform Support
129
+
130
+ `quicknode-sdk` is a pure-Rust source crate — it builds wherever `rustc` and `reqwest` are supported. It is regularly tested on Linux (glibc) and macOS (Apple Silicon). Windows is not tested.
131
+
132
+ If you are using one of the language bindings (`quicknode-sdk` on PyPI, `@quicknode/sdk` on npm, `quicknode_sdk` on RubyGems), see that package's README for the precompiled-binary platform matrix.
99
133
 
100
134
  ## API Reference
101
135
 
@@ -857,6 +857,34 @@ async fn main() {
857
857
  other => eprintln!("expected Api 404 from delete_rate_limit_override, got {other:?}"),
858
858
  }
859
859
 
860
+ // Custom headers smoke test — construct an SDK that overrides User-Agent
861
+ // and adds a correlation header. We don't verify what reaches the wire
862
+ // here; we just confirm the config is accepted and an API call succeeds.
863
+ let mut custom_headers = std::collections::HashMap::new();
864
+ custom_headers.insert("User-Agent".to_string(), "qn-e2e-rust/1.0".to_string());
865
+ custom_headers.insert("X-E2E-Correlation".to_string(), "rust-smoke".to_string());
866
+ let with_headers = SdkFullConfig {
867
+ api_key: config.api_key.clone(),
868
+ http: Some(HttpConfig {
869
+ timeout_secs: None,
870
+ pool_max_idle_per_host: None,
871
+ headers: Some(custom_headers),
872
+ }),
873
+ admin: config.admin.clone(),
874
+ streams: None,
875
+ webhooks: None,
876
+ kvstore: None,
877
+ };
878
+ let headered = QuicknodeSdk::new(&with_headers).expect("build sdk with custom headers");
879
+ match headered
880
+ .admin
881
+ .get_endpoints(&GetEndpointsRequest::builder().limit(1).build())
882
+ .await
883
+ {
884
+ Ok(_) => println!("custom-headers smoke: ok"),
885
+ Err(e) => eprintln!("custom-headers smoke error: {e}"),
886
+ }
887
+
860
888
  // 2) Timeout path — unreachable base URL + 1s timeout forces a timeout
861
889
  // from reqwest, which maps to SdkError::Http with http_kind() == Timeout.
862
890
  let blackhole = SdkFullConfig {
@@ -864,6 +892,7 @@ async fn main() {
864
892
  http: Some(HttpConfig {
865
893
  timeout_secs: Some(1),
866
894
  pool_max_idle_per_host: None,
895
+ headers: None,
867
896
  }),
868
897
  admin: Some(AdminConfig {
869
898
  base_url: Some("http://10.255.255.1/".to_string()),
@@ -3667,6 +3667,7 @@ mod tests {
3667
3667
  http: Some(HttpConfig {
3668
3668
  timeout_secs: Some(-1),
3669
3669
  pool_max_idle_per_host: None,
3670
+ headers: None,
3670
3671
  }),
3671
3672
  admin: None,
3672
3673
  streams: None,
@@ -17,6 +17,13 @@ use crate::errors::SdkError;
17
17
  pub struct HttpConfig {
18
18
  pub timeout_secs: Option<i64>,
19
19
  pub pool_max_idle_per_host: Option<i32>,
20
+ /// Custom HTTP headers added to every outbound request.
21
+ ///
22
+ /// **These headers OVERRIDE any SDK-managed header with the same name**,
23
+ /// including `User-Agent`, `x-api-key`, `Accept`, and `Content-Type`.
24
+ /// Header names are matched case-insensitively. Use this to override the
25
+ /// auto-generated User-Agent or inject correlation IDs, proxy auth, etc.
26
+ pub headers: Option<std::collections::HashMap<String, String>>,
20
27
  }
21
28
 
22
29
  #[cfg(feature = "python")]
@@ -24,15 +31,35 @@ pub struct HttpConfig {
24
31
  #[pymethods]
25
32
  impl HttpConfig {
26
33
  #[new]
27
- #[pyo3(signature = (timeout_secs=None, pool_max_idle_per_host=None))]
28
- pub fn new(timeout_secs: Option<i64>, pool_max_idle_per_host: Option<i32>) -> Self {
34
+ #[pyo3(signature = (timeout_secs=None, pool_max_idle_per_host=None, headers=None))]
35
+ pub fn new(
36
+ timeout_secs: Option<i64>,
37
+ pool_max_idle_per_host: Option<i32>,
38
+ headers: Option<std::collections::HashMap<String, String>>,
39
+ ) -> Self {
29
40
  HttpConfig {
30
41
  timeout_secs,
31
42
  pool_max_idle_per_host,
43
+ headers,
32
44
  }
33
45
  }
34
46
  }
35
47
 
48
+ /// Identifies the language and runtime making SDK calls. Each binding crate
49
+ /// (Python, Node, Ruby) constructs this and passes it through
50
+ /// [`SdkConfig::new_with_client_info`] so the SDK's auto-generated
51
+ /// `User-Agent` reflects the actual caller, not the underlying Rust core.
52
+ #[derive(Debug, Clone)]
53
+ pub struct ClientInfo {
54
+ /// Short language identifier, e.g. `"python"`, `"node"`, `"ruby"`, `"rust"`.
55
+ pub language: String,
56
+ /// Runtime version of the language, e.g. `"3.12.4"`, `"20.10.0"`, `"3.3.0"`.
57
+ pub language_version: String,
58
+ /// Version string of the language-specific SDK package — read from the
59
+ /// language's own manifest (PyPI version, npm version, gem version).
60
+ pub sdk_version: String,
61
+ }
62
+
36
63
  #[cfg_attr(feature = "python", gen_stub_pyclass)]
37
64
  #[cfg_attr(feature = "python", pyclass(get_all, set_all))]
38
65
  #[cfg_attr(feature = "node", napi(object))]
@@ -238,4 +265,23 @@ mod tests {
238
265
  Err(SdkError::Config(_))
239
266
  ));
240
267
  }
268
+
269
+ #[test]
270
+ fn from_env_headers_round_trip() {
271
+ let cfg = build_config(&[
272
+ ("api_key", "k"),
273
+ ("http.headers.x-correlation-id", "abc"),
274
+ ("http.headers.user-agent", "custom-ua/1.0"),
275
+ ]);
276
+ let config = SdkFullConfig::from_config(cfg).unwrap();
277
+ let headers = config.http.unwrap().headers.unwrap();
278
+ assert_eq!(
279
+ headers.get("x-correlation-id").map(String::as_str),
280
+ Some("abc")
281
+ );
282
+ assert_eq!(
283
+ headers.get("user-agent").map(String::as_str),
284
+ Some("custom-ua/1.0")
285
+ );
286
+ }
241
287
  }
@@ -77,6 +77,7 @@ pub struct GetSetsParams {
77
77
  #[cfg_attr(feature = "node", napi(object))]
78
78
  #[cfg_attr(not(feature = "node"), derive(Clone))]
79
79
  #[derive(Debug, Serialize, Deserialize)]
80
+ #[serde(rename_all = "camelCase")]
80
81
  pub struct BulkSetsParams {
81
82
  /// Key/value pairs to add.
82
83
  #[serde(skip_serializing_if = "Option::is_none")]
@@ -131,6 +132,7 @@ pub struct GetListParams {
131
132
  #[cfg_attr(feature = "node", napi(object))]
132
133
  #[cfg_attr(not(feature = "node"), derive(Clone))]
133
134
  #[derive(Debug, Default, Serialize, Deserialize)]
135
+ #[serde(rename_all = "camelCase")]
134
136
  pub struct UpdateListParams {
135
137
  /// Items to add to the list.
136
138
  #[serde(skip_serializing_if = "Option::is_none")]
@@ -947,7 +949,7 @@ mod tests {
947
949
  Mock::given(method("POST"))
948
950
  .and(path("/sets/bulk"))
949
951
  .and(body_json(serde_json::json!({
950
- "add_sets": {"k1": "v1"}
952
+ "addSets": {"k1": "v1"}
951
953
  })))
952
954
  .respond_with(
953
955
  ResponseTemplate::new(201)
@@ -973,7 +975,7 @@ mod tests {
973
975
  Mock::given(method("POST"))
974
976
  .and(path("/sets/bulk"))
975
977
  .and(body_json(serde_json::json!({
976
- "delete_sets": ["k1", "k2"]
978
+ "deleteSets": ["k1", "k2"]
977
979
  })))
978
980
  .respond_with(
979
981
  ResponseTemplate::new(201)
@@ -1254,8 +1256,8 @@ mod tests {
1254
1256
  Mock::given(method("PATCH"))
1255
1257
  .and(path("/lists/my-list"))
1256
1258
  .and(body_json(serde_json::json!({
1257
- "add_items": ["c"],
1258
- "remove_items": ["a"]
1259
+ "addItems": ["c"],
1260
+ "removeItems": ["a"]
1259
1261
  })))
1260
1262
  .respond_with(
1261
1263
  ResponseTemplate::new(200)