quicknode-sdk 0.1.1__tar.gz → 0.2.1__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.
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/Cargo.lock +37 -31
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/Cargo.toml +1 -1
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/PKG-INFO +25 -20
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/Cargo.toml +1 -1
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/README.md +14 -12
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/examples/webhooks_e2e.rs +40 -4
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/webhooks/mod.rs +41 -28
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/webhooks/webhook.rs +463 -54
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/python/src/lib.rs +20 -4
- quicknode_sdk-0.2.1/crates/python/src/webhooks_template.rs +229 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/pyproject.toml +2 -2
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/python/README.md +24 -19
- {quicknode_sdk-0.1.1/python/sdk → quicknode_sdk-0.2.1/python/quicknode_sdk}/__init__.py +1 -1
- {quicknode_sdk-0.1.1/python/sdk → quicknode_sdk-0.2.1/python/quicknode_sdk}/__init__.pyi +35 -3
- {quicknode_sdk-0.1.1/python/sdk → quicknode_sdk-0.2.1/python/quicknode_sdk}/_core/__init__.pyi +246 -16
- {quicknode_sdk-0.1.1/python/sdk → quicknode_sdk-0.2.1/python/quicknode_sdk}/init_manual_override.pyi +35 -3
- quicknode_sdk-0.1.1/crates/python/src/webhooks_template.rs +0 -116
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/LICENSE +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/LICENSE +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/examples/admin.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/examples/admin_e2e.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/examples/kvstore_e2e.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/examples/streams.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/examples/streams_e2e.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/billing.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/bulk.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/chains.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/endpoint_metrics.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/endpoint_rate_limits.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/endpoint_security.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/endpoint_urls.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/endpoints.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/logs.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/mod.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/tags.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/teams.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/admin/usage.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/config.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/errors.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/kvstore/mod.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/lib.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/streams/mod.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/core/src/streams/stream.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/python/Cargo.toml +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/python/src/errors.rs +0 -0
- {quicknode_sdk-0.1.1 → quicknode_sdk-0.2.1}/crates/python/src/streams_destination.rs +0 -0
- {quicknode_sdk-0.1.1/python/sdk → quicknode_sdk-0.2.1/python/quicknode_sdk}/py.typed +0 -0
|
@@ -107,15 +107,15 @@ dependencies = [
|
|
|
107
107
|
"quote",
|
|
108
108
|
"regex",
|
|
109
109
|
"rustc-hash 2.1.2",
|
|
110
|
-
"shlex",
|
|
110
|
+
"shlex 1.3.0",
|
|
111
111
|
"syn",
|
|
112
112
|
]
|
|
113
113
|
|
|
114
114
|
[[package]]
|
|
115
115
|
name = "bitflags"
|
|
116
|
-
version = "2.
|
|
116
|
+
version = "2.12.1"
|
|
117
117
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
118
|
-
checksum = "
|
|
118
|
+
checksum = "84d7ced0ae9557296835c32bf1b1e02b44c746701f898460fb000d7eaa84f00a"
|
|
119
119
|
dependencies = [
|
|
120
120
|
"serde_core",
|
|
121
121
|
]
|
|
@@ -168,14 +168,14 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
|
|
|
168
168
|
|
|
169
169
|
[[package]]
|
|
170
170
|
name = "cc"
|
|
171
|
-
version = "1.2.
|
|
171
|
+
version = "1.2.63"
|
|
172
172
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
173
|
-
checksum = "
|
|
173
|
+
checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f"
|
|
174
174
|
dependencies = [
|
|
175
175
|
"find-msvc-tools",
|
|
176
176
|
"jobserver",
|
|
177
177
|
"libc",
|
|
178
|
-
"shlex",
|
|
178
|
+
"shlex 2.0.1",
|
|
179
179
|
]
|
|
180
180
|
|
|
181
181
|
[[package]]
|
|
@@ -343,9 +343,9 @@ dependencies = [
|
|
|
343
343
|
|
|
344
344
|
[[package]]
|
|
345
345
|
name = "ctor"
|
|
346
|
-
version = "1.0.
|
|
346
|
+
version = "1.0.7"
|
|
347
347
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
348
|
-
checksum = "
|
|
348
|
+
checksum = "01334b89b69ff726750c5ce5073fc8bd860e99aa9a8fc5ca11b04730e3aee97a"
|
|
349
349
|
|
|
350
350
|
[[package]]
|
|
351
351
|
name = "darling"
|
|
@@ -757,9 +757,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
|
|
|
757
757
|
|
|
758
758
|
[[package]]
|
|
759
759
|
name = "hyper"
|
|
760
|
-
version = "1.10.
|
|
760
|
+
version = "1.10.1"
|
|
761
761
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
762
|
-
checksum = "
|
|
762
|
+
checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498"
|
|
763
763
|
dependencies = [
|
|
764
764
|
"atomic-waker",
|
|
765
765
|
"bytes",
|
|
@@ -1155,9 +1155,9 @@ checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
|
|
|
1155
1155
|
|
|
1156
1156
|
[[package]]
|
|
1157
1157
|
name = "log"
|
|
1158
|
-
version = "0.4.
|
|
1158
|
+
version = "0.4.31"
|
|
1159
1159
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1160
|
-
checksum = "
|
|
1160
|
+
checksum = "113b30b4cd05f7c06868fdb2854f66a7b9fece9a48425351cd532e810d74024f"
|
|
1161
1161
|
|
|
1162
1162
|
[[package]]
|
|
1163
1163
|
name = "lru-slab"
|
|
@@ -1227,9 +1227,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
|
|
1227
1227
|
|
|
1228
1228
|
[[package]]
|
|
1229
1229
|
name = "mio"
|
|
1230
|
-
version = "1.2.
|
|
1230
|
+
version = "1.2.1"
|
|
1231
1231
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1232
|
-
checksum = "
|
|
1232
|
+
checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda"
|
|
1233
1233
|
dependencies = [
|
|
1234
1234
|
"libc",
|
|
1235
1235
|
"wasi",
|
|
@@ -1700,7 +1700,7 @@ dependencies = [
|
|
|
1700
1700
|
|
|
1701
1701
|
[[package]]
|
|
1702
1702
|
name = "quicknode-sdk"
|
|
1703
|
-
version = "0.
|
|
1703
|
+
version = "0.2.1"
|
|
1704
1704
|
dependencies = [
|
|
1705
1705
|
"bon",
|
|
1706
1706
|
"config",
|
|
@@ -2029,9 +2029,9 @@ dependencies = [
|
|
|
2029
2029
|
|
|
2030
2030
|
[[package]]
|
|
2031
2031
|
name = "rustls-native-certs"
|
|
2032
|
-
version = "0.8.
|
|
2032
|
+
version = "0.8.4"
|
|
2033
2033
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2034
|
-
checksum = "
|
|
2034
|
+
checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d"
|
|
2035
2035
|
dependencies = [
|
|
2036
2036
|
"openssl-probe",
|
|
2037
2037
|
"rustls-pki-types",
|
|
@@ -2177,7 +2177,7 @@ dependencies = [
|
|
|
2177
2177
|
|
|
2178
2178
|
[[package]]
|
|
2179
2179
|
name = "sdk-node"
|
|
2180
|
-
version = "0.
|
|
2180
|
+
version = "0.2.1"
|
|
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.
|
|
2192
|
+
version = "0.2.1"
|
|
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.
|
|
2203
|
+
version = "0.2.1"
|
|
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.
|
|
2211
|
+
version = "0.2.1"
|
|
2212
2212
|
dependencies = [
|
|
2213
2213
|
"magnus",
|
|
2214
2214
|
"quicknode-sdk",
|
|
@@ -2373,6 +2373,12 @@ version = "1.3.0"
|
|
|
2373
2373
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2374
2374
|
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
2375
2375
|
|
|
2376
|
+
[[package]]
|
|
2377
|
+
name = "shlex"
|
|
2378
|
+
version = "2.0.1"
|
|
2379
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2380
|
+
checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
|
|
2381
|
+
|
|
2376
2382
|
[[package]]
|
|
2377
2383
|
name = "simd_cesu8"
|
|
2378
2384
|
version = "1.1.1"
|
|
@@ -2409,9 +2415,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
|
|
2409
2415
|
|
|
2410
2416
|
[[package]]
|
|
2411
2417
|
name = "socket2"
|
|
2412
|
-
version = "0.6.
|
|
2418
|
+
version = "0.6.4"
|
|
2413
2419
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2414
|
-
checksum = "
|
|
2420
|
+
checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51"
|
|
2415
2421
|
dependencies = [
|
|
2416
2422
|
"libc",
|
|
2417
2423
|
"windows-sys 0.61.2",
|
|
@@ -2743,9 +2749,9 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
|
|
|
2743
2749
|
|
|
2744
2750
|
[[package]]
|
|
2745
2751
|
name = "typenum"
|
|
2746
|
-
version = "1.20.
|
|
2752
|
+
version = "1.20.1"
|
|
2747
2753
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2748
|
-
checksum = "
|
|
2754
|
+
checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
|
2749
2755
|
|
|
2750
2756
|
[[package]]
|
|
2751
2757
|
name = "ucd-trie"
|
|
@@ -2813,9 +2819,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
|
2813
2819
|
|
|
2814
2820
|
[[package]]
|
|
2815
2821
|
name = "unicode-segmentation"
|
|
2816
|
-
version = "1.13.
|
|
2822
|
+
version = "1.13.3"
|
|
2817
2823
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2818
|
-
checksum = "
|
|
2824
|
+
checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
|
|
2819
2825
|
|
|
2820
2826
|
[[package]]
|
|
2821
2827
|
name = "unicode-width"
|
|
@@ -3303,18 +3309,18 @@ dependencies = [
|
|
|
3303
3309
|
|
|
3304
3310
|
[[package]]
|
|
3305
3311
|
name = "zerocopy"
|
|
3306
|
-
version = "0.8.
|
|
3312
|
+
version = "0.8.50"
|
|
3307
3313
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3308
|
-
checksum = "
|
|
3314
|
+
checksum = "3b065d4f0e55f82fae73202e189638116a87c55ab6b8e6c2721e13dd9d854ad1"
|
|
3309
3315
|
dependencies = [
|
|
3310
3316
|
"zerocopy-derive",
|
|
3311
3317
|
]
|
|
3312
3318
|
|
|
3313
3319
|
[[package]]
|
|
3314
3320
|
name = "zerocopy-derive"
|
|
3315
|
-
version = "0.8.
|
|
3321
|
+
version = "0.8.50"
|
|
3316
3322
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3317
|
-
checksum = "
|
|
3323
|
+
checksum = "0b631b19d36a892ab55420c92dbc83ccd79274f25be714855d3074aa71cab639"
|
|
3318
3324
|
dependencies = [
|
|
3319
3325
|
"proc-macro2",
|
|
3320
3326
|
"quote",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quicknode-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Classifier: Intended Audience :: Developers
|
|
5
5
|
Classifier: License :: OSI Approved :: MIT License
|
|
6
6
|
Classifier: Operating System :: POSIX :: Linux
|
|
@@ -28,6 +28,8 @@ Python bindings for the Quicknode SDK.
|
|
|
28
28
|
|
|
29
29
|
This is one of four language bindings published from the same Rust core. See the [project README](https://github.com/quicknode/sdk/blob/main/README.md) for the polyglot overview, development setup, and release process.
|
|
30
30
|
|
|
31
|
+
> **Pre-1.0**: While on `0.x`, releases may contain breaking changes. Check the [release notes](https://github.com/quicknode/sdk/releases) before upgrading.
|
|
32
|
+
|
|
31
33
|
## Table of Contents
|
|
32
34
|
|
|
33
35
|
- [Installation](#installation)
|
|
@@ -82,7 +84,7 @@ Construct the SDK once, then reach into the four sub-clients (`admin`, `streams`
|
|
|
82
84
|
```python
|
|
83
85
|
# Python
|
|
84
86
|
import asyncio
|
|
85
|
-
from
|
|
87
|
+
from quicknode_sdk import QuicknodeSdk
|
|
86
88
|
|
|
87
89
|
async def main():
|
|
88
90
|
qn = QuicknodeSdk.from_env()
|
|
@@ -100,7 +102,7 @@ There are two ways to configure the SDK.
|
|
|
100
102
|
|
|
101
103
|
```python
|
|
102
104
|
# Python
|
|
103
|
-
from
|
|
105
|
+
from quicknode_sdk import QuicknodeSdk, SdkFullConfig, HttpConfig
|
|
104
106
|
qn = QuicknodeSdk(SdkFullConfig(api_key="your-key", http=HttpConfig(timeout_secs=30)))
|
|
105
107
|
```
|
|
106
108
|
|
|
@@ -135,7 +137,7 @@ quicknode-sdk-<language>/<sdk-version> (<os>-<arch>; <language>-<runtime-version
|
|
|
135
137
|
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
138
|
|
|
137
139
|
```python
|
|
138
|
-
from
|
|
140
|
+
from quicknode_sdk import QuicknodeSdk, SdkFullConfig, HttpConfig
|
|
139
141
|
|
|
140
142
|
qn = QuicknodeSdk(
|
|
141
143
|
SdkFullConfig(
|
|
@@ -1108,7 +1110,7 @@ Creates a new stream that delivers filtered data to the configured destination.
|
|
|
1108
1110
|
|
|
1109
1111
|
```python
|
|
1110
1112
|
# Python
|
|
1111
|
-
from
|
|
1113
|
+
from quicknode_sdk import WebhookAttributes, StreamWebhookDestination
|
|
1112
1114
|
|
|
1113
1115
|
stream = await qn.streams.create_stream(
|
|
1114
1116
|
name="My Stream",
|
|
@@ -1274,20 +1276,20 @@ Accessed as `qn.webhooks`. Creates webhooks from filter templates and manages th
|
|
|
1274
1276
|
| `HyperliquidWalletEventsFilter` | `hyperliquidWalletEventsFilter` |
|
|
1275
1277
|
| `StellarWalletTransactionsSourceAccountFilter` | `stellarWalletTransactionsSourceAccountFilter` |
|
|
1276
1278
|
|
|
1277
|
-
`TemplateArgs` carries the arguments
|
|
1279
|
+
`TemplateArgs` carries the arguments. Each template supports two input forms — inline values (`*Args(*Template(...))`) or a reference to a pre-created list by name (`*ByListArgs(*ByListTemplate(...))`):
|
|
1278
1280
|
|
|
1279
|
-
|
|
|
1281
|
+
| Template | Inline class (fields) | ByList class (fields) |
|
|
1280
1282
|
|---|---|---|
|
|
1281
|
-
|
|
|
1282
|
-
|
|
|
1283
|
-
|
|
|
1284
|
-
|
|
|
1285
|
-
|
|
|
1286
|
-
|
|
|
1287
|
-
|
|
|
1288
|
-
|
|
|
1283
|
+
| EVM wallet filter | `EvmWalletFilterArgs(EvmWalletFilterTemplate(wallets=[...]))` | `EvmWalletFilterByListArgs(EvmWalletFilterByListTemplate(wallets_list_name=...))` |
|
|
1284
|
+
| EVM contract events | `EvmContractEventsArgs(EvmContractEventsTemplate(contracts=[...], event_hashes=[...]))` | `EvmContractEventsByListArgs(EvmContractEventsByListTemplate(contracts_list_name=..., event_hashes_list_name=...))` |
|
|
1285
|
+
| EVM ABI filter | `EvmAbiFilterArgs(EvmAbiFilterTemplate(abi="...", contracts=[...]))` | `EvmAbiFilterByListArgs(EvmAbiFilterByListTemplate(abi_json="...", contracts_list_name=...))` |
|
|
1286
|
+
| Solana wallet filter | `SolanaWalletFilterArgs(SolanaWalletFilterTemplate(accounts=[...]))` | `SolanaWalletFilterByListArgs(SolanaWalletFilterByListTemplate(accounts_list_name=...))` |
|
|
1287
|
+
| Bitcoin wallet filter | `BitcoinWalletFilterArgs(BitcoinWalletFilterTemplate(wallets=[...]))` | `BitcoinWalletFilterByListArgs(BitcoinWalletFilterByListTemplate(wallets_list_name=...))` |
|
|
1288
|
+
| XRPL wallet filter | `XrplWalletFilterArgs(XrplWalletFilterTemplate(wallets=[...]))` | `XrplWalletFilterByListArgs(XrplWalletFilterByListTemplate(wallets_list_name=...))` |
|
|
1289
|
+
| Hyperliquid wallet events | `HyperliquidWalletEventsFilterArgs(HyperliquidWalletEventsFilterTemplate(wallets=[...]))` | `HyperliquidWalletEventsFilterByListArgs(HyperliquidWalletEventsFilterByListTemplate(wallets_list_name=...))` |
|
|
1290
|
+
| Stellar wallet transactions | `StellarWalletTransactionsFilterArgs(StellarWalletTransactionsFilterTemplate(wallets=[...]))` | `StellarWalletTransactionsFilterByListArgs(StellarWalletTransactionsFilterByListTemplate(wallets_list_name=...))` |
|
|
1289
1291
|
|
|
1290
|
-
`WebhookDestinationAttributes`: `url` (required), `
|
|
1292
|
+
`WebhookDestinationAttributes`: `url` (required), `compression` (required — `"none"` | `"gzip"`), `security_token` (optional — auto-generated if omitted).
|
|
1291
1293
|
|
|
1292
1294
|
`WebhookStartFrom`: `Last` (resume from last delivered block) or `Latest` (start from newest).
|
|
1293
1295
|
|
|
@@ -1331,12 +1333,15 @@ Creates a webhook from a predefined filter template.
|
|
|
1331
1333
|
|
|
1332
1334
|
```python
|
|
1333
1335
|
# Python
|
|
1334
|
-
from
|
|
1336
|
+
from quicknode_sdk import EvmWalletFilterArgs, EvmWalletFilterTemplate, WebhookDestinationAttributes
|
|
1335
1337
|
|
|
1336
1338
|
webhook = await qn.webhooks.create_webhook_from_template(
|
|
1337
1339
|
name="Wallet Webhook",
|
|
1338
1340
|
network="ethereum-mainnet",
|
|
1339
|
-
destination_attributes=WebhookDestinationAttributes(
|
|
1341
|
+
destination_attributes=WebhookDestinationAttributes(
|
|
1342
|
+
url="https://webhook.site/...",
|
|
1343
|
+
compression="none",
|
|
1344
|
+
),
|
|
1340
1345
|
template_args=EvmWalletFilterArgs(
|
|
1341
1346
|
EvmWalletFilterTemplate(wallets=["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"])
|
|
1342
1347
|
),
|
|
@@ -1641,11 +1646,11 @@ subclass to branch on transport vs. API semantics.
|
|
|
1641
1646
|
| `ApiError` | non-2xx HTTP response | `status`, `body` |
|
|
1642
1647
|
| `DecodeError` | 2xx response but JSON parse failed | `body` |
|
|
1643
1648
|
|
|
1644
|
-
Class names: Importable from `
|
|
1649
|
+
Class names: Importable from `quicknode_sdk`: `QuicknodeError`, `ConfigError`, `HttpError`, `TimeoutError`, `ConnectionError`, `ApiError`, `DecodeError`.
|
|
1645
1650
|
|
|
1646
1651
|
```python
|
|
1647
1652
|
# Python
|
|
1648
|
-
from
|
|
1653
|
+
from quicknode_sdk import ApiError, TimeoutError
|
|
1649
1654
|
try:
|
|
1650
1655
|
await qn.admin.show_endpoint("missing")
|
|
1651
1656
|
except ApiError as e:
|
|
@@ -4,6 +4,8 @@ The core Rust crate for the Quicknode SDK.
|
|
|
4
4
|
|
|
5
5
|
This is one of four language bindings published from the same Rust core. See the [project README](https://github.com/quicknode/sdk/blob/main/README.md) for the polyglot overview, development setup, and release process.
|
|
6
6
|
|
|
7
|
+
> **Pre-1.0**: While on `0.x`, releases may contain breaking changes. Check the [release notes](https://github.com/quicknode/sdk/releases) before upgrading.
|
|
8
|
+
|
|
7
9
|
## Table of Contents
|
|
8
10
|
|
|
9
11
|
- [Installation](#installation)
|
|
@@ -1307,20 +1309,20 @@ Accessed as `qn.webhooks`. Creates webhooks from filter templates and manages th
|
|
|
1307
1309
|
| `HyperliquidWalletEventsFilter` | `hyperliquidWalletEventsFilter` |
|
|
1308
1310
|
| `StellarWalletTransactionsSourceAccountFilter` | `stellarWalletTransactionsSourceAccountFilter` |
|
|
1309
1311
|
|
|
1310
|
-
`TemplateArgs` carries the arguments
|
|
1312
|
+
`TemplateArgs` carries the arguments. Each template supports two input forms — inline values or a reference to a pre-created list by name. Construct one per template via the variant + the appropriate input enum (`<Template>Input::Inline | ByList`):
|
|
1311
1313
|
|
|
1312
|
-
|
|
|
1314
|
+
| Variant | Inline struct (fields) | ByList struct (fields) |
|
|
1313
1315
|
|---|---|---|
|
|
1314
|
-
| `
|
|
1315
|
-
| `
|
|
1316
|
-
| `
|
|
1317
|
-
| `
|
|
1318
|
-
| `
|
|
1319
|
-
| `
|
|
1320
|
-
| `
|
|
1321
|
-
| `
|
|
1316
|
+
| `EvmWalletFilter` | `EvmWalletFilterTemplate { wallets: string[] }` | `EvmWalletFilterByListTemplate { wallets_list_name: string }` |
|
|
1317
|
+
| `EvmContractEvents` | `EvmContractEventsTemplate { contracts: string[], event_hashes: string[] }` | `EvmContractEventsByListTemplate { contracts_list_name: string, event_hashes_list_name?: string }` |
|
|
1318
|
+
| `EvmAbiFilter` | `EvmAbiFilterTemplate { abi: string, contracts: string[] }` | `EvmAbiFilterByListTemplate { abi_json: string, contracts_list_name?: string }` |
|
|
1319
|
+
| `SolanaWalletFilter` | `SolanaWalletFilterTemplate { accounts: string[] }` | `SolanaWalletFilterByListTemplate { accounts_list_name: string }` |
|
|
1320
|
+
| `BitcoinWalletFilter` | `BitcoinWalletFilterTemplate { wallets: string[] }` | `BitcoinWalletFilterByListTemplate { wallets_list_name: string }` |
|
|
1321
|
+
| `XrplWalletFilter` | `XrplWalletFilterTemplate { wallets: string[] }` | `XrplWalletFilterByListTemplate { wallets_list_name: string }` |
|
|
1322
|
+
| `HyperliquidWalletEventsFilter` | `HyperliquidWalletEventsFilterTemplate { wallets: string[] }` | `HyperliquidWalletEventsFilterByListTemplate { wallets_list_name: string }` |
|
|
1323
|
+
| `StellarWalletTransactionsSourceAccountFilter` | `StellarWalletTransactionsFilterTemplate { wallets: string[] }` | `StellarWalletTransactionsFilterByListTemplate { wallets_list_name: string }` |
|
|
1322
1324
|
|
|
1323
|
-
`WebhookDestinationAttributes`: `url` (required), `
|
|
1325
|
+
`WebhookDestinationAttributes`: `url` (required), `compression` (required — `"none"` | `"gzip"`), `security_token` (optional — auto-generated if omitted).
|
|
1324
1326
|
|
|
1325
1327
|
`WebhookStartFrom`: `Last` (resume from last delivered block) or `Latest` (start from newest).
|
|
1326
1328
|
|
|
@@ -1374,7 +1376,7 @@ let params = CreateWebhookFromTemplateParams {
|
|
|
1374
1376
|
destination_attributes: WebhookDestinationAttributes {
|
|
1375
1377
|
url: "https://webhook.site/...".to_string(),
|
|
1376
1378
|
security_token: None,
|
|
1377
|
-
compression:
|
|
1379
|
+
compression: "none".to_string(),
|
|
1378
1380
|
},
|
|
1379
1381
|
template_args,
|
|
1380
1382
|
};
|
|
@@ -2,9 +2,9 @@ use std::{thread, time::Duration};
|
|
|
2
2
|
|
|
3
3
|
use quicknode_sdk::{
|
|
4
4
|
webhooks::{
|
|
5
|
-
ActivateWebhookParams, CreateWebhookFromTemplateParams,
|
|
6
|
-
GetWebhooksParams, TemplateArgs, UpdateWebhookParams,
|
|
7
|
-
WebhookStartFrom,
|
|
5
|
+
ActivateWebhookParams, CreateWebhookFromTemplateParams, EvmContractEventsTemplate,
|
|
6
|
+
EvmWalletFilterTemplate, GetWebhooksParams, TemplateArgs, UpdateWebhookParams,
|
|
7
|
+
WebhookDestinationAttributes, WebhookStartFrom,
|
|
8
8
|
},
|
|
9
9
|
QuicknodeSdk, SdkFullConfig,
|
|
10
10
|
};
|
|
@@ -44,7 +44,7 @@ async fn main() {
|
|
|
44
44
|
destination_attributes: WebhookDestinationAttributes {
|
|
45
45
|
url: "https://webhook.site/ae19071a-2dcc-4035-9cdf-406dcb4719ef".to_string(),
|
|
46
46
|
security_token: None,
|
|
47
|
-
compression:
|
|
47
|
+
compression: "none".to_string(),
|
|
48
48
|
},
|
|
49
49
|
template_args,
|
|
50
50
|
};
|
|
@@ -98,6 +98,42 @@ async fn main() {
|
|
|
98
98
|
println!("deleted: {id}");
|
|
99
99
|
thread::sleep(Duration::from_secs(1));
|
|
100
100
|
|
|
101
|
+
// Exercise the evm-contract-events template, which carries the multi-word
|
|
102
|
+
// `event_hashes` field. The API expects `eventHashes` on the wire.
|
|
103
|
+
let contract_events_args = TemplateArgs::EvmContractEvents(EvmContractEventsTemplate {
|
|
104
|
+
contracts: vec!["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48".to_string()],
|
|
105
|
+
event_hashes: vec![
|
|
106
|
+
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef".to_string(),
|
|
107
|
+
],
|
|
108
|
+
});
|
|
109
|
+
let contract_events_params = CreateWebhookFromTemplateParams {
|
|
110
|
+
name: "E2E Test Webhook (evmContractEvents)".to_string(),
|
|
111
|
+
network: "ethereum-mainnet".to_string(),
|
|
112
|
+
notification_email: None,
|
|
113
|
+
destination_attributes: WebhookDestinationAttributes {
|
|
114
|
+
url: "https://webhook.site/ae19071a-2dcc-4035-9cdf-406dcb4719ef".to_string(),
|
|
115
|
+
security_token: None,
|
|
116
|
+
compression: "none".to_string(),
|
|
117
|
+
},
|
|
118
|
+
template_args: contract_events_args,
|
|
119
|
+
};
|
|
120
|
+
let ce_webhook = qn
|
|
121
|
+
.webhooks
|
|
122
|
+
.create_webhook_from_template(&contract_events_params)
|
|
123
|
+
.await
|
|
124
|
+
.expect("create_webhook_from_template (evmContractEvents) failed");
|
|
125
|
+
println!(
|
|
126
|
+
"created (evmContractEvents): {} | {}",
|
|
127
|
+
ce_webhook.id, ce_webhook.status
|
|
128
|
+
);
|
|
129
|
+
thread::sleep(Duration::from_secs(1));
|
|
130
|
+
qn.webhooks
|
|
131
|
+
.delete_webhook(&ce_webhook.id)
|
|
132
|
+
.await
|
|
133
|
+
.expect("delete_webhook (evmContractEvents) failed");
|
|
134
|
+
println!("deleted (evmContractEvents): {}", ce_webhook.id);
|
|
135
|
+
thread::sleep(Duration::from_secs(1));
|
|
136
|
+
|
|
101
137
|
let after = qn
|
|
102
138
|
.webhooks
|
|
103
139
|
.list_webhooks(&GetWebhooksParams::default())
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
pub mod webhook;
|
|
2
2
|
|
|
3
3
|
pub use webhook::{
|
|
4
|
-
ActivateWebhookParams,
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
ActivateWebhookParams, BitcoinWalletFilterByListTemplate, BitcoinWalletFilterInput,
|
|
5
|
+
BitcoinWalletFilterTemplate, CreateWebhookFromTemplateParams, EvmAbiFilterByListTemplate,
|
|
6
|
+
EvmAbiFilterInput, EvmAbiFilterTemplate, EvmContractEventsByListTemplate,
|
|
7
|
+
EvmContractEventsInput, EvmContractEventsTemplate, EvmWalletFilterByListTemplate,
|
|
8
|
+
EvmWalletFilterInput, EvmWalletFilterTemplate, GetWebhooksParams,
|
|
9
|
+
HyperliquidWalletEventsFilterByListTemplate, HyperliquidWalletEventsFilterInput,
|
|
10
|
+
HyperliquidWalletEventsFilterTemplate, ListWebhooksResponse, SolanaWalletFilterByListTemplate,
|
|
11
|
+
SolanaWalletFilterInput, SolanaWalletFilterTemplate,
|
|
12
|
+
StellarWalletTransactionsFilterByListTemplate, StellarWalletTransactionsFilterInput,
|
|
7
13
|
StellarWalletTransactionsFilterTemplate, TemplateArgs, UpdateWebhookParams,
|
|
8
14
|
UpdateWebhookTemplateParams, Webhook, WebhookDestinationAttributes,
|
|
9
15
|
WebhookEnabledCountResponse, WebhookPageInfo, WebhookStartFrom, WebhookTemplateId,
|
|
10
|
-
XrplWalletFilterTemplate,
|
|
16
|
+
XrplWalletFilterByListTemplate, XrplWalletFilterInput, XrplWalletFilterTemplate,
|
|
11
17
|
};
|
|
12
18
|
|
|
13
19
|
use crate::{config::WebhooksConfig, errors::SdkError, SdkConfig};
|
|
@@ -255,8 +261,8 @@ impl WebhooksApiClient {
|
|
|
255
261
|
|
|
256
262
|
/// Creates a new webhook from a predefined filter template. Requires a
|
|
257
263
|
/// descriptive name, a target blockchain network, and destination
|
|
258
|
-
/// attributes (URL,
|
|
259
|
-
///
|
|
264
|
+
/// attributes (URL, compression — `gzip` or `none`, and an optional
|
|
265
|
+
/// security token — auto-generated when omitted). `template_args` carries
|
|
260
266
|
/// template-specific configuration such as wallet addresses or contract
|
|
261
267
|
/// filters. An optional `notification_email` receives alerts if the
|
|
262
268
|
/// webhook terminates.
|
|
@@ -633,9 +639,10 @@ mod tests {
|
|
|
633
639
|
.mount(&server)
|
|
634
640
|
.await;
|
|
635
641
|
let sdk = make_sdk(format!("{}/", server.uri()));
|
|
636
|
-
let template_args =
|
|
637
|
-
|
|
638
|
-
|
|
642
|
+
let template_args =
|
|
643
|
+
TemplateArgs::EvmWalletFilter(EvmWalletFilterInput::Inline(EvmWalletFilterTemplate {
|
|
644
|
+
wallets: vec!["0xabc".to_string()],
|
|
645
|
+
}));
|
|
639
646
|
let params = CreateWebhookFromTemplateParams {
|
|
640
647
|
name: "test-webhook".to_string(),
|
|
641
648
|
network: "ethereum-mainnet".to_string(),
|
|
@@ -643,7 +650,7 @@ mod tests {
|
|
|
643
650
|
destination_attributes: WebhookDestinationAttributes {
|
|
644
651
|
url: "https://example.com/hook".to_string(),
|
|
645
652
|
security_token: None,
|
|
646
|
-
compression:
|
|
653
|
+
compression: "none".to_string(),
|
|
647
654
|
},
|
|
648
655
|
template_args,
|
|
649
656
|
};
|
|
@@ -664,9 +671,10 @@ mod tests {
|
|
|
664
671
|
.mount(&server)
|
|
665
672
|
.await;
|
|
666
673
|
let sdk = make_sdk(format!("{}/", server.uri()));
|
|
667
|
-
let template_args =
|
|
668
|
-
|
|
669
|
-
|
|
674
|
+
let template_args =
|
|
675
|
+
TemplateArgs::EvmWalletFilter(EvmWalletFilterInput::Inline(EvmWalletFilterTemplate {
|
|
676
|
+
wallets: vec!["0xabc".to_string()],
|
|
677
|
+
}));
|
|
670
678
|
let params = CreateWebhookFromTemplateParams {
|
|
671
679
|
name: "test-webhook".to_string(),
|
|
672
680
|
network: "ethereum-mainnet".to_string(),
|
|
@@ -674,7 +682,7 @@ mod tests {
|
|
|
674
682
|
destination_attributes: WebhookDestinationAttributes {
|
|
675
683
|
url: "https://example.com/hook".to_string(),
|
|
676
684
|
security_token: None,
|
|
677
|
-
compression:
|
|
685
|
+
compression: "none".to_string(),
|
|
678
686
|
},
|
|
679
687
|
template_args,
|
|
680
688
|
};
|
|
@@ -695,9 +703,10 @@ mod tests {
|
|
|
695
703
|
.mount(&server)
|
|
696
704
|
.await;
|
|
697
705
|
let sdk = make_sdk(format!("{}/", server.uri()));
|
|
698
|
-
let template_args =
|
|
699
|
-
|
|
700
|
-
|
|
706
|
+
let template_args =
|
|
707
|
+
TemplateArgs::EvmWalletFilter(EvmWalletFilterInput::Inline(EvmWalletFilterTemplate {
|
|
708
|
+
wallets: vec!["0xabc".to_string()],
|
|
709
|
+
}));
|
|
701
710
|
let params = UpdateWebhookTemplateParams {
|
|
702
711
|
name: None,
|
|
703
712
|
notification_email: None,
|
|
@@ -725,9 +734,10 @@ mod tests {
|
|
|
725
734
|
.mount(&server)
|
|
726
735
|
.await;
|
|
727
736
|
let sdk = make_sdk(format!("{}/", server.uri()));
|
|
728
|
-
let template_args =
|
|
729
|
-
|
|
730
|
-
|
|
737
|
+
let template_args =
|
|
738
|
+
TemplateArgs::EvmWalletFilter(EvmWalletFilterInput::Inline(EvmWalletFilterTemplate {
|
|
739
|
+
wallets: vec!["0xabc".to_string()],
|
|
740
|
+
}));
|
|
731
741
|
let params = UpdateWebhookTemplateParams {
|
|
732
742
|
name: Some("new-name".to_string()),
|
|
733
743
|
notification_email: None,
|
|
@@ -758,10 +768,12 @@ mod tests {
|
|
|
758
768
|
.mount(&server)
|
|
759
769
|
.await;
|
|
760
770
|
let sdk = make_sdk(format!("{}/", server.uri()));
|
|
761
|
-
let template_args = TemplateArgs::EvmContractEvents(
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
771
|
+
let template_args = TemplateArgs::EvmContractEvents(EvmContractEventsInput::Inline(
|
|
772
|
+
EvmContractEventsTemplate {
|
|
773
|
+
contracts: vec!["0xa0b8".to_string()],
|
|
774
|
+
event_hashes: vec!["0xabcd".to_string()],
|
|
775
|
+
},
|
|
776
|
+
));
|
|
765
777
|
let params = CreateWebhookFromTemplateParams {
|
|
766
778
|
name: "test-webhook".to_string(),
|
|
767
779
|
network: "ethereum-mainnet".to_string(),
|
|
@@ -769,7 +781,7 @@ mod tests {
|
|
|
769
781
|
destination_attributes: WebhookDestinationAttributes {
|
|
770
782
|
url: "https://example.com/hook".to_string(),
|
|
771
783
|
security_token: None,
|
|
772
|
-
compression:
|
|
784
|
+
compression: "none".to_string(),
|
|
773
785
|
},
|
|
774
786
|
template_args,
|
|
775
787
|
};
|
|
@@ -788,9 +800,10 @@ mod tests {
|
|
|
788
800
|
.mount(&server)
|
|
789
801
|
.await;
|
|
790
802
|
let sdk = make_sdk(format!("{}/", server.uri()));
|
|
791
|
-
let template_args =
|
|
792
|
-
|
|
793
|
-
|
|
803
|
+
let template_args =
|
|
804
|
+
TemplateArgs::EvmWalletFilter(EvmWalletFilterInput::Inline(EvmWalletFilterTemplate {
|
|
805
|
+
wallets: vec!["0xabc".to_string()],
|
|
806
|
+
}));
|
|
794
807
|
let params = UpdateWebhookTemplateParams {
|
|
795
808
|
name: None,
|
|
796
809
|
notification_email: None,
|