2️Retrieve Info & Data
1. Retrieve Address Information
Get Account Address:
account.address account.getPublicKey()
Retrieve Address Keypair:
account.keypair
Get Address Derivation Path:
account.getDerivationPath()
Retrieve Address Coin Info Across Objects:
account.getAllCoins(prettyPrint = true) // Fetches details of all coins held across different objects
Get Specific Token Info:
account.getCoins(coinType = "0x2::sui::SUI") // Fetches objects for a specific token type (e.g., SUI)
Get Address Merged Coin Balance:
account.getWalletBalance(prettyPrint = true) // Merges and displays the balance for the entire wallet
Retrieve All Accounts From Mnemonic:
client.getAllAccounts()
2. Retrieve NAVI-Related Position Information
Get NAVI Portfolio:
account.getNAVIPortfolio(address = account.address, prettyPrint = true) // Retrieves NAVI positions for the specified address, or defaults to the account address
Get NAVI Health Factor:
account.getHealthFactor(address = account.address) // Retrieves health factor; you can input any address
Get Available NAVI Rewards:
client.getAddressAvailableRewards(address = account.address, option = [1,])
Retrieve Rewards Claimed History:
client.getUserRewardHistory(userAddress, page = 1, size = 400) // Fetches reward claim history for a specified user
3. Retrieve Pool Information
Get Pool Information (Including Oracle Prices):
import { USDC } from 'navi-sdk/dist/address' client.getPoolInfo(USDC) // Leave empty to retrieve info for all pools
Get Reserve Information:
client.getReserves(USDC) // Leave empty to retrieve reserves for all pools
Get Boosted APR Information:
import { getPoolsApy } from 'navi-sdk/dist/libs/PTB' await getPoolsApy(SuiClient) // Fetches and computes the APR for the pools
Get Borrow Fee Information:
import { getBorrowFee } from 'navi-sdk/dist/libs/PTB' await getBorrowFee(SuiClient) // Fetches the borrowing fee percentage, which is now handled by the contract
Get Current Rules Information:
import { getCurrentRules } from 'navi-sdk/dist/libs/PTB' await getCurrentRules(SuiClient) // The getCurrentRules function fetches the current incentive v3 rules, // groups them by asset type, // and returns structured data containing each asset's reward rules, conditions, and status. // Each rule represents how to release a specific reward coin.
4. Get Coin Setup Information
Coin Setup Details:
import { Sui, USDT, WETH, vSui, haSui, CETUS, NAVX, WBTC, AUSD, wUSDC, nUSDC, ETH, USDY, NS, LorenzoBTC, DEEP, FDUSD, BLUE, BUCK, suiUSDT } from 'navi-sdk' Sui.symbol Sui.address Sui.decimal
Last updated