Skip to content

Commit f0bf8c8

Browse files
authored
Adapt to quicknode-sdk 0.3: require JWT kid and webhook compression, support ByList templates (#42)
SDK 0.3 made several request fields non-optional and reshaped webhook template args: - CreateJwtRequest.kid is now required, so `--kid` is required on `qn endpoint security jwt add`. - WebhookDestinationAttributes.compression is now required, so `--compression` is required on `qn webhook create`; update/update-template require it only when `--url` is supplied. - Each TemplateArgs variant now wraps an Inline/ByList input enum. Added `--*-list-name` flags so a template can reference a saved list instead of inline values; supply the inline flag or the list-name flag, not both. - evm-contract-events event_hashes is now a required Vec. Updates the embedded `agent context` guide. Adds 4 webhook tests (ByList, evm-abi ByList, inline+list conflict, missing compression) and 2 JWT tests (add-with-kid, requires-kid). Full suite green.
1 parent 1782127 commit f0bf8c8

8 files changed

Lines changed: 493 additions & 110 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ name = "qn"
2121
path = "src/lib.rs"
2222

2323
[dependencies]
24-
quicknode-sdk = "0.1"
24+
quicknode-sdk = "0.3"
2525
clap = { version = "4", features = ["derive", "env", "wrap_help"] }
2626
clap_complete = "4"
2727
tokio = { version = "1", features = ["macros", "rt-multi-thread", "time"] }

src/commands/agent/context.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,18 @@ qn stream activate <id>
145145

146146
```sh
147147
qn webhook create --name wallet-watch --network ethereum-mainnet \
148-
--url https://hook.example.com --template evm-wallet \
148+
--url https://hook.example.com --compression none --template evm-wallet \
149149
--wallet 0xabc... # → id
150150
qn webhook show <id> # inspect before activating
151151
qn webhook activate <id>
152152
```
153153

154+
`--compression` (`gzip` or `none`) is required on create. Instead of inline
155+
values, a template can reference a saved list with the matching
156+
`--*-list-name` flag (e.g. `--wallets-list-name`, `--accounts-list-name`,
157+
`--contracts-list-name`); supply either the inline flag or the list-name flag,
158+
not both.
159+
154160
**KV put / get / list:**
155161

156162
```sh

src/commands/endpoint/security.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub struct JwtAddArgs {
167167
pub public_key_file: Option<PathBuf>,
168168
/// Key id (`kid`).
169169
#[arg(long)]
170-
pub kid: Option<String>,
170+
pub kid: String,
171171
/// Human-readable name.
172172
#[arg(long)]
173173
pub name: Option<String>,

0 commit comments

Comments
 (0)