The identifi-sdk is a professional integration toolkit designed for dApps and DEXs. It acts as a Sovereign Validation Middleware that intercepts transactions before execution to ensure identity integrity and protocol sustainability.
- Core Logic: Pre-Swap Validation
Unlike standard tools, our SDK operates in the Pre-Swap phase. It performs a "Three-Way Handshake" between the user, the platform, and the protocol:
-
Proof Retrieval: The SDK can fetch a stored IdentiFI Proof directly from the dApp’s database to ensure a seamless "One-Click" UX.
-
Cryptographic Cross-Check:
-
Genesis Sync: Validates if the
Genesis Walletlinked to the dApp profile matches the Genesis fingerprint inside the Proof. -
Strand Verification: Confirms if the current active wallet
(the Strand)has the authority to execute the swap. -
Fee Collection & Routing: Once validated, the SDK triggers the
IdentiFI Fee Contractto collect the protocol fee(0.066%)and then "pushes" the clean, authorized transaction to the DEX’s original router.
-
No-DB Requirement for Users: The user doesn't need to manually provide the proof every time; the SDK handles the link via the
dApp's existing infrastructure. -
Anti-Poisoning Protection: By validating the
Genesis-Strand link, we prevent unauthorized or malicious addresses from hijacking the swap flow.
Integrate the IdentiFI authority check directly into your swap logic.
The SDK handles the local decryption and validation before routing the transaction.
async function executeAuthorizedSwap(amount) {
// 1. Fetch the Proof from the dApp Database
const storedProof = await dAppApi.getUserProof(userAddress);
const wallet = (await window.ethereum.request({ method: 'eth_requestAccounts' }))[0];
// 2. Unseal & Validate via WASM (X-CORE Engine)
// Local decryption: No sensitive data ever leaves the user's browser
const isValid = unseal_vault(storedProof, wallet);
if (!isValid) throw new Error("Unauthorized: Identity/Genesis Mismatch");
// 3. User Authorization (EIP-191)
// The user signs a message to unlock the master signal for this session
const signature = await signer.signMessage("IdentiFI Protocol: Authorize X-Core Engine...");
// 4. Settlement & Routing
// Our contract collects the fee and pushes the swap to the final router
const tx = await identifiContract.settlement(
wallet,
amount,
signature, // Authority signal
{ value: protocolFee } // 0.066% revenue collection
);
return tx.wait();
}-
Unseal_vault: Performs the local
"handshake"between the stored data and the connected wallet without needing a central validator. -
Pre-Swap Interception: We collect the protocol revenue before the transaction reaches the DEX's liquidity router, securing the
0.066%fee. -
Sovereign Experience: The user
doesn'tneed to copy/paste anything; the SDK crosses the information automatically.
- Built to be compatible with modern Web3 stacks
(Ethers.js, Viem, Wagmi). It ensures that all heavy cryptographic lifting happens in memory, maintaining ourDatalessphilosophy.