()
| 142 | |
| 143 | /** Removes the private key and disables x402 */ |
| 144 | export function removeX402PrivateKey(): void { |
| 145 | saveGlobalConfig((config) => { |
| 146 | const { x402PrivateKey: _, ...rest } = config as Record<string, unknown> |
| 147 | return rest as typeof config |
| 148 | }) |
| 149 | saveX402Config({ enabled: false, address: undefined }) |
| 150 | logForDebugging('[x402] Wallet removed') |
| 151 | } |
| 152 | |
| 153 | /** Gets the wallet address without exposing the private key */ |
| 154 | export function getX402WalletAddress(): string | undefined { |
no test coverage detected