MCPcopy Index your code
hub / github.com/codeaashu/claude-code / addX402Payment

Function addX402Payment

src/services/x402/tracker.ts:18–24  ·  view source on GitHub ↗
(record: X402PaymentRecord)

Source from the content-addressed store, hash-verified

16
17/** Add a payment record to the session tracker */
18export function addX402Payment(record: X402PaymentRecord): void {
19 sessionPayments.push(record)
20 sessionTotalUSD += record.amountUSD
21 logForDebugging(
22 `[x402] Session total: $${sessionTotalUSD.toFixed(4)} (${sessionPayments.length} payments)`,
23 )
24}
25
26/** Get total USD spent via x402 in the current session */
27export function getX402SessionSpentUSD(): number {

Callers 1

handlePaymentRequiredFunction · 0.85

Calls 2

logForDebuggingFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected