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

@partisiablockchain/blockchain-api-transaction-client

v6.111.0

Published

This library contains three different clients for interaction with the Partisia Blockchain. These are

Downloads

2,318

Readme

Blockchain Clients

This library contains three different clients for interaction with the Partisia Blockchain. These are

  • ChainControllerApi - Used to get information of contracts and accounts from the blockchain
  • ShardControllerApi - Used to get information of blocks and transaction from the blockchain
  • BlockchainTransactionClient - Client used to help build, sign, and send transactions to the blockchain

The ChainControllerApi and ShardControllerApi clients are generated from the OpenAPI spec found here. The BlockchainTransactionClient is instead built on top of the other clients and uses them to build, sign and send transactions.

ChainControllerApi

You can create a ChainControllerApi targeting a specific reader url as follows

const chainController = new ChainControllerApi(
  new Configuration({basePath: "https://node1.testnet.partisiablockchain.com"})
);

Get generic chain information

const chain = await chainController.getChain();

Get the latest state of a contract

const state = await chainController.getContract({
  address: "02e1e09358e543e8b1cf97d5e19d5b287983cee8f6",
});

Get an AvlTreeMap value from a contract

const avlValue = await chainController.getContractAvlValue({
  address: "02e1e09358e543e8b1cf97d5e19d5b287983cee8f6",
  treeId: 0,
  key: "00e72e44eab933faaf1fd4ce94bb57e08bff98a1ed"
});

Get account data

const account = await chainController.getAccount({
  address: "02e1e09358e543e8b1cf97d5e19d5b287983cee8f6",
});

ShardControllerApi

A ShardControllerApi is created the same way as a ChainControllerApi

const shardController = new ShardControllerApi(
  new Configuration({basePath: "https://node1.testnet.partisiablockchain.com"})
);

Get latest block for a specific shard

const block = await shardController.getLatestBlock({shardId: "Shard0"});

Get transaction information

const transaction = await shardController.getTransaction({
  shardId: "Shard0",
  transactionId: "9356779565b80548a1cd07800d2e2508e530f39cbd7eb71e057acf7bcb18ce0b",
});

BlockchainTransactionClient

When creating a transaction client you have to provide a way to generate signature. This is done through the interface SenderAuthentication. The most basic implementation of this is the SenderAuthenticationKeyPair which uses a private key to sign with. Other ways to sign includes wallets such as Metamask Snap, or Parti Wallet.

const senderAuthentication = SenderAuthenticationKeyPair.fromString(privateKey);
const transactionSender = BlockchainTransactionClient.create(
  "https://node1.testnet.partisiablockchain.com",
  senderAuthentication
);

Sign and send a transaction

const transaction: Transaction = {address: contractAddress, rpc: actionRpc};
const sentTransaction = await transactionSender.signAndSend(transaction, gasCost);

Wait for spawned events of a transaction

const transactionTree = await transactionSender.waitForSpawnedEvents(sentTransaction);