Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.92 KB

File metadata and controls

54 lines (38 loc) · 1.92 KB

Activating the Real CeloHT Integration

This repo ships as a clean, honest placeholder. Here's exactly what to do once CeloHT provides real technical details.

1. Credentials

Fill in .env:

  • CELOHT_API_BASE_URL — CeloHT's real API base URL
  • CELOHT_API_KEY — issued by CeloHT
  • CELOHT_NETWORK — celo-mainnet or celo-alfajores (testnet)
  • CELOHT_WEBHOOK_SECRET — if CeloHT sends signed webhook callbacks

2. CeloHTProvider.createIntent()

Replace the thrown error with a real call to CeloHT's API to create a payment request for CELO or USDm. Return whatever the checkout UI needs to complete payment — this depends entirely on what CeloHT's API gives back (a receiving address + amount, a signed payment link, a QR payload, etc.).

3. CeloHTProvider.verifyTransaction()

Replace the placeholder with real verification: either

  • a direct Celo blockchain lookup (confirm the transaction hash, sender, recipient, amount and asset match what was requested), or
  • a call to CeloHT's own verification/status endpoint, if they provide one.

This must run server-side. Never accept a client-reported "success" as confirmation.

4. wallet.ts

Wire connectWallet() and getWalletBalance() to CeloHT's actual wallet connection flow (however they expect a Celo-compatible wallet like Valora to be prompted).

5. Turn it on in checkout

Once isConfigured() returns true and both methods above are tested end-to-end (on Alfajores testnet first), remove the "coming soon" label from the CeloHT option in matchids-web's checkout — no other file in this repo or in matchids-payments needs to change.

Never do this

  • Never invent a contract address, ABI, or RPC endpoint to "fill in the blanks" before real values exist.
  • Never mark a Payment as confirmed anywhere except inside verifyTransaction()'s real, server-side check.
  • Never log a private key or full wallet seed anywhere in this codebase.