@qwed-ai/finance
v1.0.0
Published
TypeScript wrapper for QWED-Finance - Deterministic verification for banking AI
Maintainers
Readme
@qwed-ai/finance
TypeScript SDK for QWED-Finance - Deterministic verification for banking AI.
Installation
npm install @qwed-ai/financePrerequisite: Python 3.11+ with qwed-finance installed:
pip install qwed-financeUsage
import { FinanceVerifier, ComplianceGuard, UCPVerifier } from '@qwed-ai/finance';
// Verify NPV calculation
const verifier = new FinanceVerifier();
const npvResult = await verifier.verifyNPV([-1000, 300, 400, 500], 0.1, "$180");
console.log(npvResult.verified); // true
console.log(npvResult.computed_value); // "$180.42"
// Check AML compliance
const compliance = new ComplianceGuard();
const amlResult = await compliance.checkAML(15000, "US");
console.log(amlResult.needs_flagging); // true (over $10k threshold)
// Verify payment token
const ucp = new UCPVerifier();
const paymentResult = await ucp.verifyPaymentToken({
amount: 5000,
currency: "USD",
customer_country: "US",
kyc_verified: true
});
console.log(paymentResult.can_proceed); // trueAPI
FinanceVerifier
verifyNPV(cashflows, rate, llmOutput)- Verify NPV calculationverifyLoanPayment(principal, annualRate, months)- Verify loan payment
ComplianceGuard
checkAML(amount, countryCode)- Check AML compliance
UCPVerifier
verifyPaymentToken(tokenData)- Verify payment token
License
Apache 2.0
