caelum0x 1075b4b5e8 feat(mint): App Store direct deposits (Server Notifications v2 + Server API)
Notifications and their transactions are Apple JWS verified against a
pinned root (Apple Root CA - G3 by SHA-256): x5c chain links, validity,
Apple's marker extensions and the ES256 signature. Bundle id and
environment must match; ONE_TIME_CHARGE, SUBSCRIBED and DID_RENEW mint
USD prices to the transaction's appAccountToken; REFUND and REVOKE
reverse. Re-confirmation calls the App Store Server API with an ES256
token from the app's key and refuses revoked or foreign transactions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 19:46:18 +03:00

44 lines
1.5 KiB
TOML

[package]
name = "mint-payments"
version.workspace = true
edition.workspace = true
license.workspace = true
# `mint-payments` is the ONLY crate that talks to provider HTTP APIs and the
# ONLY crate that knows provider signature schemes. `mint-reserve` (the `Ramp`
# trait), `mint-server` (routing/mint) and `mint-store` stay provider-agnostic.
#
# NO axum dependency: the webhook verification fns take raw `&[u8]` bodies +
# borrowed header values (via the `Headers` seam), so the crate is axum-free and
# unit-testable. The thin axum glue (Bytes/HeaderMap → verifier → reserve.mint)
# lives in `mint-server`.
[dependencies]
mint-core = { workspace = true }
mint-reserve = { workspace = true }
async-trait = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
hmac = { workspace = true }
sha2 = { workspace = true }
hex = { workspace = true }
base64 = { workspace = true }
subtle = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
# Seller credentials sealed at rest (Wave P PY2.3). Already in Cargo.lock via rustls.
ring = "0.17"
# App Store JWS: x5c chain parsing and signature checks (ring backend).
x509-parser = { version = "0.18", features = ["verify"] }
[dev-dependencies]
rcgen = "0.14"
tokio = { workspace = true, features = ["full"] }
wiremock = "0.6"
serde_json = { workspace = true }
hex = { workspace = true }
base64 = { workspace = true }
mint-core = { workspace = true }
mint-reserve = { workspace = true }