open-standards/openpay/crates/op-server/Cargo.toml
Transaction Science 5efc6ed2c0
Some checks failed
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Has been cancelled
openpay: a sandbox rail for op-server, so a client can pay and refund in test
The reference server registered no rail unless it was given a live
USDC-on-Base hot wallet, so nothing could be approved against it without
moving real money; the deterministic acquirer it tests with was a
dev-dependency.

`OP_SANDBOX_RAIL=1` now registers a `sandbox-card` rail: op-driver-sdk's
DeterministicCardAcquirer behind a CardAdapter, routed by a PolicyRouter.
It approves and settles vault, wallet and EMV payments with psp_det_* ids,
does no I/O, and every attempt names its driver, so a client can tell a
simulated approval from a real one. A sandbox server never registers the
live usdc-base rail, whatever else is set (logged as an error).

Joule OS's `payments.pay` verb is tested against it: pay, then compensate
with a refund, both observed at a separate op-server process.

Tests: three config tests (approves and names the rail; never beside the
live rail; only `1`/`true` enable it) and one HTTP test (approved over
/v1/intents; same idempotency key gives the same payment). op-server: all
suites pass, clippy and rustfmt clean.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 15:44:04 -05:00

55 lines
1.8 KiB
TOML

[package]
name = "op-server"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "OpenPay HTTP API server: axum-based binary exposing the workspace surface (intents, refunds, disputes, settlement, audit) as REST endpoints."
[lib]
name = "op_server"
path = "src/lib.rs"
[[bin]]
name = "op-server"
path = "src/main.rs"
[dependencies]
op-core = { path = "../op-core" }
op-ledger = { path = "../op-ledger" }
op-orchestrator = { path = "../op-orchestrator" }
op-refund = { path = "../op-refund" }
op-dispute = { path = "../op-dispute" }
op-settlement = { path = "../op-settlement" }
op-subscriptions = { path = "../op-subscriptions" }
op-fx = { path = "../op-fx" }
op-graph = { path = "../op-graph" }
op-webhook = { path = "../op-webhook" }
op-reconciliation = { path = "../op-reconciliation" }
# `evm` feature pulls in the JSON-RPC EVM gateway + LocalKeyEvmSigner
# so the env-driven main can register a `usdc-base` rail when the
# operator supplies an RPC URL and a hot-wallet key.
op-rails-crypto = { path = "../op-rails-crypto", features = ["evm"] }
axum = { workspace = true }
tokio = { workspace = true }
tower = { workspace = true }
tower-http = { workspace = true }
http = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
uuid = { workspace = true }
# The deterministic card acquirer behind the opt-in sandbox rail
# (`OP_SANDBOX_RAIL=1`); it does no I/O and moves no money.
op-driver-sdk = { path = "../op-driver-sdk" }
[dev-dependencies]
http-body-util = { workspace = true }
tower = { workspace = true }
tokio = { workspace = true }
serde_json = { workspace = true }
uuid = { workspace = true }
op-rails-card = { path = "../op-rails-card" }