ZKP2P
  • Introduction
    • 🐣ZKP2P
  • User Guides
    • For Buyers
      • Complete Guide to Onboarding with ZKP2P
      • Handling Verification Issues as a Buyer
    • For Sellers
      • How to Provide Liquidity and Sell USDC
      • How to Update USDC Conversion Rates
      • Handling Manual Releases as a Seller
      • TradingView Links for Setting Conversion Rates
      • Calculating APR
  • Developer
    • 📔The ZKP2P V2 Protocol
    • 📜Smart Contracts
      • Escrow
        • IEscrow
      • IPaymentVerifier
      • ⛓️Deployments
    • 🌎PeerAuth Extension
      • 🖥️zkTLS
    • Gating Service
    • 🤝Integrate ZKP2P
    • 🏗️Build a New Provider
    • 🔓Security
    • 😬Risks
    • 🤔FAQ
    • 🦺Privacy and Safety
  • 🔖Resources
    • 👨‍💻Team
    • 🐦Twitter
    • 💻Github
    • 💬Telegram
    • 💹ZKP2P
Powered by GitBook
On this page
  • Overview
  • Structs
  • External Functions
  1. Developer
  2. Smart Contracts

IPaymentVerifier

Overview

The IPaymentVerifier interface contract verifies off-chain payment proofs. This enables on-chain actions (such as releasing escrowed funds) once a valid proof that a payment occurred is provided. Verifiers can be added to the Escrow which unlock new payment platforms and currencies that users can transact with

Structs

struct VerifyPaymentData {
        bytes paymentProof;                     // Payment proof
        address depositToken;                   // Address of deposit token
        uint256 amount;                         // Amount of deposit token
        uint256 timestamp;                      // Timestamp of payment
        string payeeDetails;                    // Payee details
        bytes32 fiatCurrency;                   // Fiat currency
        uint256 conversionRate;                 // Conversion rate of deposit token to fiat currency
        bytes data;                             // Additional data
}

Additional data may include mail server key hash if using zkEmail, notary public key for TLSNotary or witness proxy for TLSProxy (Reclaim)

External Functions

verifyPayment

function verifyPayment(
    IPaymentVerifier.VerifyPaymentData calldata _verifyPaymentData
)
    external
    override
    returns (bool, bytes32)

Description: Override function that must be implemented when adding a new Verifier. The escrow contract calls this method to confirm that a payment was indeed made according to the provided proof. If successful:

  • The payment is nullified (cannot be claimed again).

  • Returns a boolean indicating success and the intentHash.


PreviousIEscrowNextDeployments

Last updated 4 months ago

📜