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

@cedra-labs/ts-sdk

v2.2.8

Published

Cedra TypeScript SDK

Readme

TypeScript SDK for Cedra

License Discord NPM Package Version Node Version NPM bundle size NPM Package Downloads

The TypeScript SDK allows you to connect, explore, and interact with the Cedra blockchain. You can use it to request data, send transactions, set up test environments, and more!

Prerequisites

  • Node.js: Version 16.0 or higher
  • npm/yarn/pnpm: A package manager for installing dependencies
  • TypeScript (optional): For TypeScript projects, ensure your tsconfig.json uses "moduleResolution": "node"

Essential Links

Network Information

| Network | RPC Endpoint | Chain ID | Faucet | |---------|-------------|----------|--------| | Testnet | https://testnet.cedra.dev/v1 | TBD | Available via CLI | | Mainnet | Coming Soon | TBD | N/A | | Devnet | https://devnet.cedra.dev/v1 | TBD | Available via CLI |

Installation

For use in Node.js or a web application

Install with your favorite package manager such as npm, yarn, or pnpm:

pnpm install @cedra-labs/ts-sdk

For use in a browser (<= version 1.9.1 only)

You can add the SDK to your web application using a script tag:

<script src="https://unpkg.com/@cedra-labs/ts-sdk/dist/browser/index.global.js"></script>

Then, the SDK can be accessed through window.cedraSDK.

Quick Start for Newcomers

Follow these steps to connect to Cedra blockchain and make your first transaction:

Step 1: Install the SDK

npm install @cedra-labs/ts-sdk
# or
yarn add @cedra-labs/ts-sdk
# or
pnpm install @cedra-labs/ts-sdk

Step 2: Connect to the Network

Create an Cedra client to connect to the blockchain:

import { Cedra, CedraConfig, Network } from "@cedra-labs/ts-sdk"

// You can use CedraConfig to choose which network to connect to
const config = new CedraConfig({ network: Network.TESTNET });
// Cedra is the main entrypoint for all functions
const cedra = new Cedra(config);

// Verify connection
const ledgerInfo = await cedra.getLedgerInfo();
console.log("Connected to Cedra blockchain!");
console.log("Chain ID:", ledgerInfo.chain_id);
console.log("Latest block:", ledgerInfo.block_height);

Step 3: Create Your First Account

import { Account } from "@cedra-labs/ts-sdk";

// Generate a new account
const account = Account.generate();
console.log("New account address:", account.accountAddress);

// Fund it with test tokens
await cedra.fundAccount({
  accountAddress: account.accountAddress,
  amount: 100_000_000, // 1 CEDRA
});

Step 4: Send Your First Transaction

See the complete example in the Transfer examples section below.

Reading Data From Onchain


// Check account balance
const accountInfo = await cedra.getAccountInfo({ accountAddress: "0x123" });
console.log("Account balance:", accountInfo.coin.value);

// Get account modules
const modules = await cedra.getAccountModules({ accountAddress: "0x123" });

// Get owned tokens
const tokens = await cedra.getAccountOwnedTokens({ accountAddress: "0x123" });

// Get recent transactions
const transactions = await cedra.getAccountTransactions({ accountAddress: "0x123" });

Next Steps

Learn more from the official Cedra documentation:

Troubleshooting

TypeScript Import Errors

If you see import errors, ensure your tsconfig.json uses:

{
  "compilerOptions": {
    "moduleResolution": "node"
  }
}

Connection Issues

  • Timeout errors: Increase timeout in CedraConfig or check network connectivity
  • Rate limiting: Implement exponential backoff for retries
  • Invalid endpoint: Verify you're using the correct network endpoint

Common Errors

  • INSUFFICIENT_BALANCE: Account needs more tokens. Use the faucet on testnet.
  • SEQUENCE_NUMBER_MISMATCH: Transaction ordering issue. Fetch latest account state.
  • MODULE_NOT_FOUND: Smart contract not deployed at specified address.

Contributing

We welcome contributions! Please:

  1. Check existing issues or create a new one to discuss your idea
  2. Fork the repository and create a pull request
  3. Follow our contributing guidelines

For questions or support, join our Discord community.

Running unit tests

To run a unit test in this repo, for example, the keyless end-to-end unit test in tests/e2e/api/keyless.test.ts:

pnpm jest keyless.test.ts