1.0.0 • Published 5 months ago
kriya-portfolio-sdk v1.0.0
Kriya Portfolio SDK
A TypeScript SDK for fetching portfolio positions data from the Kriya protocol.
Installation
npm install kriya-portfolio-sdk
Usage
import { KriyaPortfolioSDK } from "kriya-portfolio-sdk";
// Initialize the SDK with your RPC URL
const sdk = new KriyaPortfolioSDK("YOUR_RPC_URL");
// Example: Fetch V2 positions
const address = "YOUR_WALLET_ADDRESS";
const v2Positions = await sdk.getV2Positions(address);
// Example: Fetch V2 staked positions
const v2StakedPositions = await sdk.getV2StakedPositions(address);
// Example: Fetch V3 positions
const v3Positions = await sdk.getV3Positions(address);
// Example: Fetch LL Vault positions
const llVaultPositions = await sdk.getLLVaultsPositions(address);
// Example: Fetch CLMM Vault positions
const clmmVaultPositions = await sdk.getClmmVaultsPositions(address);
// Helper methods
const v2Pools = await sdk.getV2Pools();
const v3Pools = await sdk.getV3Pools();
const tokens = await sdk.getTokens();
const llVaults = await sdk.getLLVaults();
const clmmVaults = await sdk.getClmmVaults();
Features
- Fetch V2 pool positions and staked positions
- Fetch V3 positions
- Fetch Leveraged Lending (LL) vault positions
- Fetch Concentrated Liquidity (CLMM) vault positions
- Helper methods to fetch pools, tokens, and vaults data
Types
The SDK exports TypeScript types for all entities:
Pool
,Token
- Pool and token typesV2PositionType
,V2StakedPosition
- V2 position typesV3PositionType
- V3 position typeLLVaultInfo
,ClmmVaultInfo
- Vault info typesLLVaultPositionType
,ClmmVaultPositionType
- Vault position types
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1.0.0
5 months ago