@glideco/smart-router
v0.1.0
Published
Pure-function smart payment router for Glide. Selects the optimal payment rail per intent (cheapest-first with latency tiebreaker, internal-vault free-path, principal-policy filter, 4-attempt failover). The hot-path is IO-free; deps inject quote + executi
Downloads
42
Maintainers
Readme
@glideco/smart-router
glide.pay() smart router with internal-vault optimization. Pure-function routing core that takes pre-quoted rail candidates and produces a sorted candidate list with policy filtering, internal-vault short-circuit (free same-tenant hops), and side-effecting connector exclusion from failover.
Pure functions, no IO.
Install
npm install @glideco/smart-routerUsage
import { routePayment } from '@glideco/smart-router';
const decision = routePayment({
intent,
candidates,
is_internal_vault: false,
policy: { crypto_only: false, fiat_only: false },
});License
MIT
