npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@leapwallet/ondo-gm-core

v1.0.1

Published

Core package providing fundamental building blocks for Ondo protocol integration - transaction clients, query utilities, state management, and TypeScript types

Readme

@leapwallet/ondo-gm-core

Core package providing fundamental building blocks for Ondo protocol integration - transaction clients, query utilities, state management, and TypeScript types.

Features

  • 🔧 Transaction Clients: Prepare and execute Ondo protocol transactions
  • 📊 Query Utilities: TanStack Query configurations for API data fetching
  • 🏪 State Management: MobX-based state stores for application data
  • 📝 TypeScript Types: Comprehensive type definitions for all Ondo protocol entities

Installation

npm install @leapwallet/ondo-gm-core
# or
pnpm add @leapwallet/ondo-gm-core
# or
yarn add @leapwallet/ondo-gm-core

Quick Start

Basic Setup

import { OndoGMApi } from '@leapwallet/ondo-gm-core';

// Initialize the API client
const apiClient = new OndoGMApi({
  baseUrl: 'https://api.ondo.finance',
});

Query Utilities

The core package provides pre-configured query options for use with TanStack Query:

import { useQuery } from '@tanstack/react-query';

import { getAssetPriceQuery, getAssetsQuery } from '@leapwallet/ondo-gm-core';

// Fetch all asset prices
const assetsQuery = getAssetsQuery(apiClient);
const { data: assets } = useQuery(assetsQuery);

// Fetch specific asset price
const assetPriceQuery = getAssetPriceQuery(apiClient, {
  asset: 'USDC',
});
const { data: price } = useQuery(assetPriceQuery);

Transaction Client

import { ChainType, type TransactionParams } from '@leapwallet/ondo-gm-core';

// Prepare transaction parameters
const transactionParams: TransactionParams = {
  chainId: '1',
  fromAddress: '0x...',
  toAddress: '0x...',
  amount: '1000000', // 1 USDC (6 decimals)
  // ... other required fields
};

// Transaction preparation and execution would be handled by chain-specific clients
// (see @leapwallet/ondo-gm-evm-client for EVM implementation)

State Management

import { OndoGMState } from '@leapwallet/ondo-gm-core';

// Access the global state store
const store = OndoGMState.baseState;

// The state is observable with MobX
// Use with @leapwallet/ondo-gm-react-adapter for React integration

API Reference

Query Functions

  • getAssetsQuery(apiClient, options?) - Fetch all asset prices
  • getAssetPriceQuery(apiClient, query) - Fetch specific asset price
  • getMarketQuery(apiClient, query) - Fetch market data
  • getOHLCQuery(apiClient, query) - Fetch OHLC (candlestick) data
  • getAccountQuery(apiClient, query) - Fetch account information

Transaction Types

  • ChainType - Supported blockchain types (ETHEREUM, SOLANA)
  • TransactionParams - Parameters for transaction preparation
  • PreparedTransaction<T> - Prepared transaction with gas estimates

State Stores

  • OndoGMState.baseState - Global application state store

Type Definitions

The package exports comprehensive TypeScript types for all Ondo protocol entities, generated from the OpenAPI specification.

import type { Account, Asset, Attestation, Market, OHLCData } from '@leapwallet/ondo-gm-core';

Integration with Other Packages

This core package is designed to work seamlessly with other packages in the Ondo SDK:

  • @leapwallet/ondo-gm-react-adapter - React hooks and providers
  • @leapwallet/ondo-gm-evm-client - EVM blockchain client
  • @leapwallet/ondo-gm-react-ui - Pre-built UI components

Dependencies

  • @tanstack/query-core - Query state management
  • mobx - Reactive state management

License

ISC