Expand description
agent-pay - L402 + DID-signed invoices for agent-to-agent Lightning payments.
Rust port of @p-vbordei/agent-pay.
Passes the same conformance vectors (C1-missing, C1-bad-sig, C2, C3, C4).
Re-exports§
pub use bolt11::parse_invoice;pub use bolt11::ParsedInvoice;pub use client::fetch_with_l402;pub use client::FetchFn;pub use client::FetchOptions;pub use client::FetchResponse;pub use envelope::sign_invoice_envelope;pub use envelope::sign_receipt;pub use envelope::verify_invoice_envelope;pub use envelope::verify_receipt;pub use envelope::InvoiceEnvelope;pub use envelope::ReceiptEnvelope;pub use envelope::SignInvoiceOpts;pub use envelope::SignReceiptOpts;pub use error::Error;pub use jcs::canonical_json;pub use jcs::jcs_hash;pub use jws::sign_compact;pub use jws::verify_compact;pub use jws::ResolveKey;pub use keys::did_key_from_public_key;pub use keys::ed25519_sign;pub use keys::ed25519_verify;pub use keys::generate_key_pair;pub use keys::public_key_from_did_key;pub use keys::verification_method_id;pub use keys::KeyPair;pub use lightning::Invoice;pub use lightning::InvoiceCreateRequest;pub use lightning::InvoiceLookup;pub use lightning::LightningNode;pub use lightning::PaymentResult;pub use memory_node::MemoryLedger;pub use memory_node::MemoryNode;pub use replay::ReplayCache;pub use server::InnerHandler;pub use server::Paywall;pub use server::PaywallOptions;pub use server::PaywallResponse;pub use token::issue_token;pub use token::verify_token;pub use token::TokenPayload;
Modules§
- bolt11
- BOLT11 parsing wrapper (uses the
lightning-invoicecrate). - client
- L402-aware HTTP client. Mirrors fetchWithL402 from the TS reference.
- envelope
- DID-signed envelopes for invoices and receipts.
- error
- jcs
- RFC 8785 JSON Canonicalization Scheme + SHA-256 hash.
- jws
- Compact JWS over Ed25519 with JCS-canonical payload.
- keys
- lightning
- Lightning node abstraction.
- lnd_
rest - LND REST adapter (BYO node).
- memory_
node - In-memory mock Lightning node (mirrors the TS memory-node).
- replay
- Cache to reject replayed preimages within their invoice’s TTL.
- server
- Paywall server: emits 402 challenges, validates L402 Authorization.
- token
- HMAC-signed macaroon-style L402 tokens.