# Interoperability fixtures
`solid-pod-rs-nip98.json` holds NIP-98 `Authorization` headers minted by an
independent implementation, `solid_pod_rs::auth::nip98::mint_with_payload`
and `authorization_header`, from the `solid-pod-rs` repository
(https://github.com/DreamLab-AI/solid-pod-rs) at commit
`f9f6324188eb3eac54704d8192b4842909f1ff0e`, built with
`default-features = false, features = ["std", "nip98-schnorr"]`.
- Generated: 2026-12-03, by a throwaway program outside this repository.
- SHA-256 of the JSON file: `dae7d5fa9564c90c58242d2bc8f1fef183679292a0812d95be819fd040a707ba`
- Signing key: the NIP-19 published example secret key
`67dea2ed018072d675f5415ecfaed7d2597555e202d85b3d65ea4e58d2d92ffa`
(public key `7e7e9c42a91bfef19fa929e5fda1b72e0ebc1a4c1141673e2794234d86addf4e`).
- `created_at`: 1764720000 for every case.
Each entry records the header, the method string passed to `mint_with_payload`
(it upper-cases it when signing), the URL, and the request body as base64
(`null` for no body). The case `body-without-payload-tag` was minted without
a body but is paired with one, and must be refused with `MissingPayloadTag`;
every other case must verify. The case `lowercase-method-input` records the
minting input `post`, while the signed `method` tag is `POST`; because methods
are compared byte for byte, it must be refused with `MethodMismatch` against
`post` and verify against `POST`. `tests/interop.rs` asserts all three.
The solid-pod-rs working tree was clean at that commit apart from one
untracked file outside the crate. The generator, in full (run with
`cargo run -q > solid-pod-rs-nip98.json`):
`Cargo.toml`:
```toml
[package]
name = "mint-fixtures"
version = "0.0.0"
edition = "2021"
publish = false
[workspace]
[dependencies]
solid-pod-rs = { path = "../solid-pod-rs/crates/solid-pod-rs", default-features = false, features = ["std", "nip98-schnorr"] }
serde_json = "1"
base64 = "0.22"
```
`src/main.rs`:
```rust
//! Generates NIP-98 authorisation fixtures with solid-pod-rs `mint_with_payload`.
use base64::Engine;
use solid_pod_rs::auth::nip98::{authorization_header, mint_with_payload};
fn main() {
// NIP-19 published example secret key (public test material).
let sk = "67dea2ed018072d675f5415ecfaed7d2597555e202d85b3d65ea4e58d2d92ffa";
let created_at = 1_764_720_000u64;
let apply_body: &[u8] = br#"{"node":"did:nostr:7e7e9c42a91bfef19fa929e5fda1b72e0ebc1a4c1141673e2794234d86addf4e","operation_id":"op-1","base_revision":3,"changes":[]}"#;
let cases: Vec<(&str, &str, &str, Option<&[u8]>)> = vec![
("get-no-body", "http://127.0.0.1:7070/api/v1/config", "GET", None),
("post-with-body", "http://127.0.0.1:7070/api/v1/config/apply", "POST", Some(apply_body)),
("lowercase-method-input", "http://localhost:7070/api/v1/backup", "post", Some(br#"{"node":"x","operation_id":"op-2"}"#)),
("query-string", "http://[::1]:7070/api/v1/audit/checkpoint?limit=10&after=a%20b", "GET", None),
("empty-body", "http://127.0.0.1:7070/api/v1/config/preview", "POST", Some(b"")),
("body-without-payload-tag", "http://127.0.0.1:7070/api/v1/config/apply", "POST", None),
];
let mut out = Vec::new();
for (name, url, method, body) in cases {
let token = mint_with_payload(url, method, body, sk, created_at).expect("mint");
// The last case: the request carries a body but the token was minted without one.
let request_body = if name == "body-without-payload-tag" { Some(apply_body) } else { body };
out.push(serde_json::json!({
"name": name,
"authorization": authorization_header(&token),
"method": method,
"url": url,
"body_base64": request_body.map(|b| base64::engine::general_purpose::STANDARD.encode(b)),
"created_at": created_at,
}));
}
println!("{}", serde_json::to_string_pretty(&out).expect("json"));
}
```