quicknode-sdk 0.2.0__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.
Files changed (47) hide show
  1. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/Cargo.lock +13 -13
  2. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/Cargo.toml +1 -1
  3. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/PKG-INFO +16 -13
  4. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/Cargo.toml +1 -1
  5. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/README.md +12 -12
  6. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/examples/webhooks_e2e.rs +40 -4
  7. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/webhooks/mod.rs +41 -28
  8. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/webhooks/webhook.rs +463 -54
  9. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/python/src/lib.rs +20 -4
  10. quicknode_sdk-0.2.1/crates/python/src/webhooks_template.rs +229 -0
  11. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/pyproject.toml +1 -1
  12. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/python/README.md +15 -12
  13. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/python/quicknode_sdk/__init__.pyi +32 -0
  14. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/python/quicknode_sdk/_core/__init__.pyi +246 -16
  15. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/python/quicknode_sdk/init_manual_override.pyi +32 -0
  16. quicknode_sdk-0.2.0/crates/python/src/webhooks_template.rs +0 -116
  17. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/LICENSE +0 -0
  18. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/LICENSE +0 -0
  19. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/examples/admin.rs +0 -0
  20. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/examples/admin_e2e.rs +0 -0
  21. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/examples/kvstore_e2e.rs +0 -0
  22. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/examples/streams.rs +0 -0
  23. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/examples/streams_e2e.rs +0 -0
  24. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/billing.rs +0 -0
  25. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/bulk.rs +0 -0
  26. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/chains.rs +0 -0
  27. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/endpoint_metrics.rs +0 -0
  28. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/endpoint_rate_limits.rs +0 -0
  29. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/endpoint_security.rs +0 -0
  30. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/endpoint_urls.rs +0 -0
  31. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/endpoints.rs +0 -0
  32. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/logs.rs +0 -0
  33. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/mod.rs +0 -0
  34. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/tags.rs +0 -0
  35. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/teams.rs +0 -0
  36. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/admin/usage.rs +0 -0
  37. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/config.rs +0 -0
  38. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/errors.rs +0 -0
  39. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/kvstore/mod.rs +0 -0
  40. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/lib.rs +0 -0
  41. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/streams/mod.rs +0 -0
  42. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/core/src/streams/stream.rs +0 -0
  43. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/python/Cargo.toml +0 -0
  44. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/python/src/errors.rs +0 -0
  45. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/crates/python/src/streams_destination.rs +0 -0
  46. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/python/quicknode_sdk/__init__.py +0 -0
  47. {quicknode_sdk-0.2.0 → quicknode_sdk-0.2.1}/python/quicknode_sdk/py.typed +0 -0
@@ -113,9 +113,9 @@ dependencies = [
113
113
 
114
114
  [[package]]
115
115
  name = "bitflags"
116
- version = "2.11.1"
116
+ version = "2.12.1"
117
117
  source = "registry+https://github.com/rust-lang/crates.io-index"
118
- checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
118
+ checksum = "84d7ced0ae9557296835c32bf1b1e02b44c746701f898460fb000d7eaa84f00a"
119
119
  dependencies = [
120
120
  "serde_core",
121
121
  ]
@@ -1155,9 +1155,9 @@ checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
1155
1155
 
1156
1156
  [[package]]
1157
1157
  name = "log"
1158
- version = "0.4.30"
1158
+ version = "0.4.31"
1159
1159
  source = "registry+https://github.com/rust-lang/crates.io-index"
1160
- checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5"
1160
+ checksum = "113b30b4cd05f7c06868fdb2854f66a7b9fece9a48425351cd532e810d74024f"
1161
1161
 
1162
1162
  [[package]]
1163
1163
  name = "lru-slab"
@@ -1700,7 +1700,7 @@ dependencies = [
1700
1700
 
1701
1701
  [[package]]
1702
1702
  name = "quicknode-sdk"
1703
- version = "0.2.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.3"
2032
+ version = "0.8.4"
2033
2033
  source = "registry+https://github.com/rust-lang/crates.io-index"
2034
- checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63"
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.2.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.2.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.2.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.2.0"
2211
+ version = "0.2.1"
2212
2212
  dependencies = [
2213
2213
  "magnus",
2214
2214
  "quicknode-sdk",
@@ -2819,9 +2819,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
2819
2819
 
2820
2820
  [[package]]
2821
2821
  name = "unicode-segmentation"
2822
- version = "1.13.2"
2822
+ version = "1.13.3"
2823
2823
  source = "registry+https://github.com/rust-lang/crates.io-index"
2824
- checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c"
2824
+ checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
2825
2825
 
2826
2826
  [[package]]
2827
2827
  name = "unicode-width"
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["crates/core", "crates/python"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.2.0"
6
+ version = "0.2.1"
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.2.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
@@ -1276,20 +1276,20 @@ Accessed as `qn.webhooks`. Creates webhooks from filter templates and manages th
1276
1276
  | `HyperliquidWalletEventsFilter` | `hyperliquidWalletEventsFilter` |
1277
1277
  | `StellarWalletTransactionsSourceAccountFilter` | `stellarWalletTransactionsSourceAccountFilter` |
1278
1278
 
1279
- `TemplateArgs` carries the arguments; construct one per template via the factory methods:
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(...))`):
1280
1280
 
1281
- | Factory | Argument struct | Fields |
1281
+ | Template | Inline class (fields) | ByList class (fields) |
1282
1282
  |---|---|---|
1283
- | `evm_wallet_filter` | `EvmWalletFilterTemplate` | `wallets: string[]` |
1284
- | `evm_contract_events` | `EvmContractEventsTemplate` | `contracts: string[]`, `event_hashes?: string[]` |
1285
- | `evm_abi_filter` | `EvmAbiFilterTemplate` | `abi: string` (JSON), `contracts: string[]` |
1286
- | `solana_wallet_filter` | `SolanaWalletFilterTemplate` | `accounts: string[]` |
1287
- | `bitcoin_wallet_filter` | `BitcoinWalletFilterTemplate` | `wallets: string[]` |
1288
- | `xrpl_wallet_filter` | `XrplWalletFilterTemplate` | `wallets: string[]` |
1289
- | `hyperliquid_wallet_events_filter` | `HyperliquidWalletEventsFilterTemplate` | `wallets: string[]` |
1290
- | `stellar_wallet_transactions_filter` | `StellarWalletTransactionsFilterTemplate` | `source_accounts: string[]` |
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=...))` |
1291
1291
 
1292
- `WebhookDestinationAttributes`: `url` (required), `security_token` (optionalauto-generated if omitted), `compression` (optional — `"none"` | `"gzip"`).
1292
+ `WebhookDestinationAttributes`: `url` (required), `compression` (required`"none"` | `"gzip"`), `security_token` (optional — auto-generated if omitted).
1293
1293
 
1294
1294
  `WebhookStartFrom`: `Last` (resume from last delivered block) or `Latest` (start from newest).
1295
1295
 
@@ -1338,7 +1338,10 @@ from quicknode_sdk import EvmWalletFilterArgs, EvmWalletFilterTemplate, WebhookD
1338
1338
  webhook = await qn.webhooks.create_webhook_from_template(
1339
1339
  name="Wallet Webhook",
1340
1340
  network="ethereum-mainnet",
1341
- destination_attributes=WebhookDestinationAttributes(url="https://webhook.site/..."),
1341
+ destination_attributes=WebhookDestinationAttributes(
1342
+ url="https://webhook.site/...",
1343
+ compression="none",
1344
+ ),
1342
1345
  template_args=EvmWalletFilterArgs(
1343
1346
  EvmWalletFilterTemplate(wallets=["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"])
1344
1347
  ),
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "quicknode-sdk"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  edition.workspace = true
5
5
  license.workspace = true
6
6
  description = "Core library for quicknode sdk"
@@ -1309,20 +1309,20 @@ Accessed as `qn.webhooks`. Creates webhooks from filter templates and manages th
1309
1309
  | `HyperliquidWalletEventsFilter` | `hyperliquidWalletEventsFilter` |
1310
1310
  | `StellarWalletTransactionsSourceAccountFilter` | `stellarWalletTransactionsSourceAccountFilter` |
1311
1311
 
1312
- `TemplateArgs` carries the arguments; construct one per template via the factory methods:
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`):
1313
1313
 
1314
- | Factory | Argument struct | Fields |
1314
+ | Variant | Inline struct (fields) | ByList struct (fields) |
1315
1315
  |---|---|---|
1316
- | `evm_wallet_filter` | `EvmWalletFilterTemplate` | `wallets: string[]` |
1317
- | `evm_contract_events` | `EvmContractEventsTemplate` | `contracts: string[]`, `event_hashes?: string[]` |
1318
- | `evm_abi_filter` | `EvmAbiFilterTemplate` | `abi: string` (JSON), `contracts: string[]` |
1319
- | `solana_wallet_filter` | `SolanaWalletFilterTemplate` | `accounts: string[]` |
1320
- | `bitcoin_wallet_filter` | `BitcoinWalletFilterTemplate` | `wallets: string[]` |
1321
- | `xrpl_wallet_filter` | `XrplWalletFilterTemplate` | `wallets: string[]` |
1322
- | `hyperliquid_wallet_events_filter` | `HyperliquidWalletEventsFilterTemplate` | `wallets: string[]` |
1323
- | `stellar_wallet_transactions_filter` | `StellarWalletTransactionsFilterTemplate` | `source_accounts: string[]` |
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 }` |
1324
1324
 
1325
- `WebhookDestinationAttributes`: `url` (required), `security_token` (optionalauto-generated if omitted), `compression` (optional — `"none"` | `"gzip"`).
1325
+ `WebhookDestinationAttributes`: `url` (required), `compression` (required`"none"` | `"gzip"`), `security_token` (optional — auto-generated if omitted).
1326
1326
 
1327
1327
  `WebhookStartFrom`: `Last` (resume from last delivered block) or `Latest` (start from newest).
1328
1328
 
@@ -1376,7 +1376,7 @@ let params = CreateWebhookFromTemplateParams {
1376
1376
  destination_attributes: WebhookDestinationAttributes {
1377
1377
  url: "https://webhook.site/...".to_string(),
1378
1378
  security_token: None,
1379
- compression: None,
1379
+ compression: "none".to_string(),
1380
1380
  },
1381
1381
  template_args,
1382
1382
  };
@@ -2,9 +2,9 @@ use std::{thread, time::Duration};
2
2
 
3
3
  use quicknode_sdk::{
4
4
  webhooks::{
5
- ActivateWebhookParams, CreateWebhookFromTemplateParams, EvmWalletFilterTemplate,
6
- GetWebhooksParams, TemplateArgs, UpdateWebhookParams, WebhookDestinationAttributes,
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: None,
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, BitcoinWalletFilterTemplate, CreateWebhookFromTemplateParams,
5
- EvmAbiFilterTemplate, EvmContractEventsTemplate, EvmWalletFilterTemplate, GetWebhooksParams,
6
- HyperliquidWalletEventsFilterTemplate, ListWebhooksResponse, SolanaWalletFilterTemplate,
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, optional security token auto-generated when omitted,
259
- /// and optional compression `gzip` or `none`). `template_args` carries
264
+ /// attributes (URL, compression `gzip` or `none`, and an optional
265
+ /// security tokenauto-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 = TemplateArgs::EvmWalletFilter(EvmWalletFilterTemplate {
637
- wallets: vec!["0xabc".to_string()],
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: None,
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 = TemplateArgs::EvmWalletFilter(EvmWalletFilterTemplate {
668
- wallets: vec!["0xabc".to_string()],
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: None,
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 = TemplateArgs::EvmWalletFilter(EvmWalletFilterTemplate {
699
- wallets: vec!["0xabc".to_string()],
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 = TemplateArgs::EvmWalletFilter(EvmWalletFilterTemplate {
729
- wallets: vec!["0xabc".to_string()],
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(EvmContractEventsTemplate {
762
- contracts: vec!["0xa0b8".to_string()],
763
- event_hashes: Some(vec!["0xabcd".to_string()]),
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: None,
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 = TemplateArgs::EvmWalletFilter(EvmWalletFilterTemplate {
792
- wallets: vec!["0xabc".to_string()],
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,