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

@gluwa/usc-sdk

v0.18.0

Published

Typescript SDK for the USC (Universal Smart Contracts) ecosystem on the Gluwa Creditcoin Network

Downloads

3,562

Readme

Creditcoin's Universal Smart Contract SDK

SDK for JS/TS used for interacting with the Creditcoin network through a variety of tools. To use it simply add the following package to your dependencies:

npm install @gluwa/usc-sdk

or with yarn

yarn add @gluwa/usc-sdk

IMPORTANT: all examples receive their input from environment variables. You have to define these values before executing them:

  • CREDITCOIN_RPC_URL - string - the URL to the Creditcoin chain, for example https://rpc.cc3-testnet.creditcoin.network
  • CREDITCOIN_PROOF_BUILDER_URL - string - the URL to the Creditcoin Proof Builder service, for example https://prover.cc3-testnet.creditcoin.network/
  • SOURCE_CHAIN_KEY - number - unique identifier of the source chain, e.g. Ethereum, on the Creditcoin chain. NOTE: this is different than chainId!
  • SOURCE_CHAIN_BLOCK_HEIGHT - number - the block height on the source chain, e.g. Ethereum, you are trying to inspect
  • SOURCE_CHAIN_TXN_HASH - string - a transaction hash on the source chain, e.g. Ethereum, you are trying to generate a proof for

Transaction verification

For verifying transaction inclusion the library has a series of components used to generate and validate inclusion proofs along with helper tools for tracking supported source chains from which transactions can be proven along with helpers for keeping track of block attestation and supported chain state on the targeted Creditcoin chain.

Supported chains and attestation information

The PrecompileChainInfoProvider interacts with Creditcoin's ChainInfo precompile contract to retrieve information about supported chains, attestation data, and continuity bounds. This component is essential for understanding the current state of cross-chain attestations. See examples/supported-chains-attestation-information.ts.

Proof building

The ProofBuilder provides a convenient way to build proofs by communicating with a remote dedicate service for it. This component handles HTTP communication and provides a clean interface for fetching pre-computed proofs. See examples/proof-generation.ts.

Proof validation

The PrecompileBlockProver provides on-chain verification capabilities for transaction proofs. It can verify both single transactions and batches of transactions using Merkle proofs and continuity proofs. See examples/proof-validation.ts.

Batch proof generation and validation

When working with multiple transactions at the same time you can use ProofBuilder.getBatchProof() and PrecompileBlockProver.verifyBatch() to generate and verify batch proofs instead of iterating over each transaction one at a time. See examples/batch-proof-validation.ts.

Complete end to end example

Here's an example showing how to use the proof generator components together: examples/end-to-end.ts.

Query Builder

The QueryBuilder is used to extract result segments from transactions which can be used to validate their contents. See tests/smoke/query.builder.test.ts for more context.

The Query Builder should be able to build a query and Build query from transactions with multiple events test scenarios - show how to:

  • Create a query builder
  • Use .setAbiProvider() to specify a ABI for a smart contract(s) to decode various calldata and events related to the contract
  • Use .addStaticField() to query specific fields from the transaction, e.g. TxFrom, TxTo, RxStatus
  • Use .eventBuilder() to query for specific events and fields inside these events
  • Use .addFunctionSignature() and .addFunctionArgument() to query for specific arguments passed as calldata
  • Call .build() to build the query and return the result segments fields which can be interrogated later