Interactive Mode
Prerequisites
- A Web3 wallet that the verification is performed against.
- A valid PureFi subscription, obtainable within the PureFi Dashboard
Verification Flow
Requirements:
- Customer Web App - an application designed by the party that uses its own Smart Contract (a.k.a Customer Smart Contract).
- PureFi Issuer Service - a service providing AML/KYC verifications for the users.
Flow:
Assuming that the user of the app is required to send funds to the Customer Smart Contract:
- The user triggers an action in the customer app.
- The customer app forms a data package and sends it to the Issuer Service.
- Issuer Service validates user subscription.
- Issuer Service performs a verification.
- If the verification is successful, the Issuer Service sends proof back to the Customer App.
- The customer app forms a transaction, and the user signs it with his web3 wallet.
- The transaction is broadcasted via a node and triggers the Customer Smart Contract.
- Customer Smart Contract verifies the proof via PureFi Router Contract.
Examples
Live Demo
In order to test the Flow, checkout this SDK Subscription Demo.
- Connect your MetaMask and make sure you have valid PureFi subscription (obtainable within the PureFi Dashboard)
- Have enough BNB in your wallet to pay for the gas fees associated with the transactions.
The demo is a dApp utilizing the UFIBuyerBSCWithCheck Smart Contract deployed on the BNB Smart Chain.
The demo first performs a wallet check and then initiates an interaction with the smart contract, which then sends a "Buy" order to UFI via the UFI/WBNB LP pair on the PancakeSwap DEX. The source code of the dApp along with all the details is available within this GitHub repository.
Smart Contract Examples
All the Smart Contract Examples are available within this GitHub folder