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

@syra-ai/sdk

v0.2.1

Published

Typed TypeScript client for Syra machine money — x402 pay-per-call APIs, auto-pay wallets, and agent treasury on Solana, Base & Algorand.

Downloads

221

Readme

@syra-ai/sdk

Typed TypeScript client for Syra machine money

Pay-per-call x402 APIs · auto-pay wallets · agent treasury
Solana · Base · Algorand

npm version License: MIT Docs API

Docs · Marketplace · OpenAPI · Agent guide · GitHub


What this package does

@syra-ai/sdk is the official TypeScript client for the Syra API gateway. It wraps HTTP calls to Syra’s machine-money rails and handles x402 payment (HTTP 402 → sign → retry) so agents and apps can call paid routes without custom payment plumbing.

| Capability | Detail | |------------|--------| | Auto-pay client | createSyraPaidClient() wires Solana / Base / Algorand signers | | Manual signer | Pass a custom SyraPaymentSigner for production wallets | | Low-level fetch | @syra-ai/sdk/payment — x402-wrapped fetch only | | Pillars | Discover Earn / Treasury / Invest / Spend / Grow via /pillars | | Typed responses | All methods return { success, data?, error? } |

For agents: prefer createSyraPaidClient + env payer keys. Discovery: GET https://api.syraa.fun/.well-known/x402 and llms-full.txt.


Install

npm install @syra-ai/sdk

Requirements: Node.js ≥ 18


Quick start (auto-pay)

import { createSyraPaidClient } from "@syra-ai/sdk";

// Reads SYRA_PAYER_KEYPAIR (Solana) or SYRA_EVM_PAYER_PRIVATE_KEY (Base) from env
const syra = await createSyraPaidClient({
  baseUrl: "https://api.syraa.fun",
});

const news = await syra.get("/news", { ticker: "BTC" });
if (news.success) {
  console.log(news.data);
}

Payment env vars

| Rail | Environment | |------|-------------| | Solana (default) | SYRA_PAYER_KEYPAIR — base58 or JSON byte array | | Base | X402_PREFERRED_NETWORK=base + SYRA_EVM_PAYER_PRIVATE_KEY | | Algorand | X402_PREFERRED_NETWORK=algorand + SYRA_ALGORAND_PAYER_PRIVATE_KEY |

Inline payer (scripts / tests)

const syra = await createSyraPaidClient({
  payer: { solanaKeypair: process.env.MY_KEY! },
  // or: payer: { evmPrivateKey: "0x...", network: "base" }
});

Manual payment signer

Production routes return HTTP 402 with x402 requirements. Provide a SyraPaymentSigner that returns the PAYMENT-SIGNATURE header value.

Without a signer or paid fetch, request() returns { success: false, error: "HTTP 402" } after the first 402.

import { createSyraClient, type SyraPaymentSigner } from "@syra-ai/sdk";

const signer: SyraPaymentSigner = {
  async signPayment(challenge, context) {
    // Build x402 payment proof — return header value only
    return "...";
  },
};

const syra = createSyraClient({ signer });

Low-level paid fetch

Use @syra-ai/sdk/payment when you only need x402-wrapped fetch:

import { getPaidFetch, hasPaidFetchConfigured } from "@syra-ai/sdk/payment";

if (hasPaidFetchConfigured()) {
  const paidFetch = await getPaidFetch();
  const res = await paidFetch("https://api.syraa.fun/news?ticker=BTC");
}

Pillars & discovery

const pillars = await syra.get("/pillars");
// Earn, Treasury, Invest, Spend, Grow

import { SYRA_HIGH_VALUE_ROUTES } from "@syra-ai/sdk";

const route = SYRA_HIGH_VALUE_ROUTES.sentiment;
await syra.get(route.path, route.params);

Client API

| Method | Description | |--------|-------------| | createSyraPaidClient(options) | Factory with x402 auto-pay | | createSyraClient(options) | Factory — baseUrl, optional signer, headers | | client.get(path, params?) | GET with query params | | client.post(path, body?) | POST JSON body | | client.request(method, path, options?) | Low-level; handles 402 + retry after pay |

Response shape: { success: boolean; data?: T; error?: string }


Related packages

| Package | Role | |---------|------| | @syra-ai/mcp-server | MCP tools for Cursor / Claude — npx -y @syra-ai/mcp-server | | @syra-ai/x402-payer | Standalone x402 sign / retry helper | | Syra monorepo | Source, API, docs, web |

| Resource | URL | |----------|-----| | Marketplace | syraa.fun/marketplace | | OpenAPI | api.syraa.fun/openapi.json | | x402 discovery | api.syraa.fun/.well-known/x402 | | Agent docs | api.syraa.fun/llms-full.txt | | Human docs | docs.syraa.fun |


Development (monorepo)

git clone https://github.com/ikhwanhsn/syra_agent.git
cd syra_agent/syra-sdk
npm install
npm run build

From repo root:

npm install
npm run build:packages

License

MIT © Syra