Verify KYC results on the backend before Bitcoin SEND
Overview
The browser should never be the source of truth for identity approval. Verification belongs on a trusted backend, using the provider's documented verifier and keys.
Go pseudocode (illustrative, not a provider SDK)
type Approval struct { UserID string; ExpiresAt int64; Scope string }
func AllowSend(userID string, approval Approval, now int64) bool {
return approval.UserID == userID && approval.Scope == "send" && now < approval.ExpiresAt
}
The example checks only a previously verified approval. A production service must first validate the provider's signature or ZK proof, challenge, issuer, audience, expiry and replay protection. It must also authenticate the user and authorize each transfer.
Only a permitted backend operation should call the documented WAB Engine SEND endpoint. Do not invent Engine JSON field names: use the installed API contract.
Failure modes
Reject expired approvals, replayed proofs, wrong-account binding, provider outages, and unverifiable results. Log a non-sensitive reason, not passport data or BTC KEY.
Related ASK
Can WAB Engine work with external KYC providers?
https://thamer.org/ask/ask-can-wab-engine-use-kyc-provider
How can developers restrict Bitcoin SEND until KYC approval?
https://thamer.org/ask/ask-restrict-bitcoin-send-until-kyc
