🚀 Web3 SDK Quickstart

A step-by-step guide to integrate Elieura's decentralized identity solutions into your Web3 application.

📦 Installation

Add Elieura SDK to your project using NPM or Yarn:

npm install @elieura/web3-sdk

Next.js / React

Add SDK to your component for Ethereum-based DIDs and ZK proofs.

Vue.js

Import and register plugin for decentralized identity management.

🔧 SDK Initialization

Initialize the SDK with your Ethereum wallet and IPFS node connection:

const { Web3SDK } = require('@elieura/web3-sdk');

const sdk = new Web3SDK({
    walletAddress: '0xYourEthereumAddress',
    ipfsGateway: 'https://ipfs.example.com',
    chainId: 5 // Goerli testnet
});

Wallet Integration

Supports Web3 providers like MetaMask, WalletConnect, and Hardware wallets.

IPFS Integration

Automatically stores decentralized identifiers on IPFS with encryption.

📘 Basic Usage

Example: Generate a DID and request verification:

try {
    // Create Ethereum-based DID
    const did = await sdk.generateDid();
    
    // Anchor to blockchain
    const txHash = await sdk.anchorDid(did);
    
    // Request verification
    const verification = await sdk.requestVerification({
        type: 'KYC',
        provider: 'GovernmentID'
    });
    
    console.log('Verification response:', verification);
} catch (error) {
    console.error('Web3 SDK Error:', error);
}

⚙️ Advanced Integration

ZK-SNARKs Integration

Use our zero-knowledge proof system for identity verification without exposing private data.

const zkp = await sdk.generateZKProof({
    attribute: 'age',
    condition: { op: 'gte', value: 18 }
});

Smart Contract Interactions

Directly interact with Ethereum identity verification contracts.

const verified = await sdk.verifyCredential(
    credentialId, 
    { chainId: 137 }
);

Need More Help?

Found an issue or want to contribute? Check out our documentation or join our developer community.