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

noether-sdk

v0.1.1

Published

Official TypeScript SDK for the Noether decentralized perpetual exchange on Stellar / Soroban.

Readme

@noether/sdk

Official TypeScript SDK for the Noether decentralized perpetual exchange on Stellar / Soroban.

Type-safe, fetch-based, and split into focused sub-clients per resource. Works in Node 18+ and modern browsers.

Install

npm install @noether/sdk @stellar/stellar-sdk

@stellar/stellar-sdk is only required if you want to sign locally with a Keypair; for browser wallets you can plug Freighter / Stellar Wallets Kit signers directly into the SDK helpers.

Quick start — public reads

import { NoetherClient } from '@noether/sdk';

const client = new NoetherClient({ baseUrl: 'https://api.noether.exchange' });

const markets = await client.markets.list();
const btc = await client.oracle.getPrice('BTC');
console.log('BTC oracle:', btc.priceFloat, 'at', new Date(btc.timestamp * 1000));

Authed: account info

const client = new NoetherClient({
  baseUrl: 'https://api.noether.exchange',
  credentials: { keyId: 'nk_...', secret: '...' },
});

const me = await client.account.me();
const positions = await client.account.positions();

Issue an API key (one-shot)

import { Keypair } from '@stellar/stellar-sdk';

const kp = Keypair.fromSecret(process.env.STELLAR_SECRET!);
const issued = await client.issueKey({
  address: kp.publicKey(),
  signer: (challenge) => Buffer.from(kp.sign(challenge)),
  label: 'mm-bot-1',
});
console.log(issued.keyId, issued.secret); // store the secret immediately

Place an order — executeTrade

import { Networks, TransactionBuilder } from '@stellar/stellar-sdk';

const result = await client.executeTrade({
  request: {
    op: 'open_position',
    asset: 'XLM',
    collateral: 1000n * 10_000_000n, // 1000 USDC (7 decimals)
    leverage: 2,
    direction: 'Long',
  },
  signer: (xdr) => {
    const tx = TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
    tx.sign(kp);
    return tx.toXDR();
  },
});
console.log(result.submitted.hash, result.submitted.status);

executeTrade calls orders.prepare → asks your signer for the signed XDR → calls tx.submit and polls until SUCCESS / FAILED / timeout.

Sub-client cheatsheet

| Path | Method | Auth | |---------------------------------|----------------------------------------|------| | client.health.ping() | health probe | no | | client.markets.list() | all supported markets + oracle prices | no | | client.markets.get(asset) | single market detail | no | | client.oracle.getPrice(asset) | live oracle price | no | | client.oracle.getPrices() | all asset prices | no | | client.events.list(query) | raw indexer events (filterable) | no | | client.keys.create({...}) | challenge → sign → issue key | no | | client.keys.list() | own API keys | yes | | client.keys.revoke(keyId) | revoke own key | yes | | client.account.me() | identity / tier | yes | | client.account.positions() | position events for owner | yes | | client.account.orders() | order events for owner | yes | | client.orders.prepare(req) | build unsigned XDR | yes | | client.tx.submit(req) | submit signed XDR + poll | yes | | client.executeTrade({...}) | prepare + sign + submit one-shot | yes |

Errors

All API failures throw a typed subclass of NoetherError:

import { AuthError, RateLimitError, BadRequestError, ServerError } from '@noether/sdk';

try {
  await client.markets.get('DOGE');
} catch (err) {
  if (err instanceof BadRequestError) console.error('bad request:', err.body);
  else if (err instanceof RateLimitError) console.error('retry in', err.retryAfterSec);
  else if (err instanceof AuthError) console.error('auth failed');
  else if (err instanceof ServerError) console.error('server boom');
  else throw err;
}

Examples

Run with tsx:

npx tsx sdk-ts/examples/place-order.ts http://127.0.0.1:4000

Development

# from repo root
npm install
npm run build -w @noether/sdk         # tsup → dual ESM + CJS + .d.ts
npm run test -w @noether/sdk          # vitest unit tests
npm run typecheck -w @noether/sdk

Status

Phase 6 v0 covers the REST surface shipped through Phase 5. WebSocket sub-client lands in Phase 8 and will sit at client.ws.