Examples & Guides
This section provides complete, working examples for common use cases with the YieldFi SDK.
Available Examples
Complete Authentication Flow - Full wallet authentication implementation
Vault Operations - Querying vaults and managing assets
Transaction History - Working with transaction data
Contract Integration - Integrating with smart contracts
Quick Example
import { YieldFiSDK } from "yieldfi-sdk";
// Initialize and authenticate
const sdk = await YieldFiSDK.create({ gatewayUrl: "https://gw.yield.fi" });
// ... authentication code ...
// Query vaults
const vaults = await sdk.vault.getVaults({ chainId: 1 });
// Get transactions
const transactions = await sdk.vault.getTransactions(
{ chainId: 1 },
accessToken
);Next Steps
Browse the examples above for complete implementation guides!
Last updated