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

Function getX402PrivateKey

src/services/x402/config.ts:88–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86
87/** Retrieves the private key from environment or global config */
88export function getX402PrivateKey(): string | undefined {
89 // Environment variable takes precedence (for CI/automation)
90 if (process.env.X402_PRIVATE_KEY) {
91 return process.env.X402_PRIVATE_KEY
92 }
93 const config = getGlobalConfig()
94 return (config as Record<string, unknown>).x402PrivateKey as string | undefined
95}
96
97/** Checks if x402 payments are configured and enabled */
98export function isX402Enabled(): boolean {

Callers 2

handlePaymentRequiredFunction · 0.85
isX402EnabledFunction · 0.85

Calls 1

getGlobalConfigFunction · 0.85

Tested by

no test coverage detected