Types

All TypeScript types exported from @yo-protocol/core.

Client Config

interface YoClientConfig {
  chainId: SupportedChainId  // 1 | 8453
  publicClient?: PublicClient
  walletClient?: WalletClient
  partnerId?: number          // Gateway partner attribution ID (default: 0)
}

Vault Types

interface VaultState {
  address: Address
  name: string
  symbol: string
  decimals: number
  totalAssets: bigint
  totalSupply: bigint
  asset: Address
  assetDecimals: number
  exchangeRate: bigint
}

interface VaultConfig {
  address: Address
  name: string
  symbol: VaultId
  underlying: {
    symbol: string
    decimals: number
    address: Record<number, Address>
  }
  chains: readonly number[]
}

type VaultId = 'yoETH' | 'yoBTC' | 'yoUSD' | 'yoEUR' | 'yoGOLD' | 'yoUSDT'

User Types

Action Results

Action Params

API Types