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 🙏

© 2025 – Pkg Stats / Ryan Hefner

aqua-js-sdk

v3.2.1-45

Published

A TypeScript SDK Library for Aqua Protocol for data accounting

Readme

Aqua Verifier

JS Client for external verifier.

  • An npm library
  • a cli tool to verify aqaua chain json file

Usage

Ensure to use the same semantic version as the Aqua protocol version you are using for example

  • use version 1.2.XX with aqua protocol version 1.2.

Installation

npm install aqua-js-sdk

React Native Compatibility

As of version 3.2.1-24, aqua-js-sdk provides React Native compatibility. To use the SDK in a React Native environment:

// Import the React Native compatible version
import Aquafier from 'aqua-js-sdk/react-native';

The React Native version provides platform-specific implementations for:

  • HTTP server functionality (mocked in React Native)
  • Crypto operations
  • File system operations
  • Internet connectivity checks

Limitations in React Native

  • HTTP server functionality is not available in React Native. Methods that require a local HTTP server (like WitnessEth.nodeWitnessMetamask) will show a warning and may not work as expected.
  • File system operations require the react-native-fs package for full functionality.
  • For crypto operations, the library uses crypto-browserify in React Native environments.

Usage

// For web applications (React, Vue, Angular, etc.)

import Aquafier from 'aqua-js-sdk/web';

// For Node.js applications

import Aquafier, {FileObject} from 'aqua-js-sdk';


let aquafier = new Aquafier();

// using node fs module or browser FILE object
// create an aqua file object 
let fileObject : FileObject = {
  fileName: "sample.txt",
  fileContent: "i am a sampl text",
  path: "/sample.txt" // optional if in browser environment
}
let aquaTreeObjectResult = await aquafier.createGenesisRevision(fileObject);

if(isErr(aquaTreeObjectResult)){
    console.err(" ---- An error occured  ---- ");
    aquaTreeObjectResult.logData.forEach((e) => console.log(e));
    return
}
let aquaTreeObject = aquaTreeObjectResult.data

// aquaTreeObject can be saved in db or aqua.json

Requirements

Node.js v20.9.0

local development

You can use the library without having to instal it from npm

  1. run npm install
  2. run npm run build
  3. run npm link

in you aqua-container or any other project run npm link aqua-verifier . optional to unlink remove this library npm unlink aqua-verifier

Testing

Ensure to create credentials.json file in src the contents should be

{
    "mnemonic": "",
    "nostr_sk": "",
    "did_key": "",
    "alchemy_key": "",
    "witness_eth_network": "",
    "witness_method": ""
}

Purpose of each property :

  1. mnemonic enables us to construct your wallet address The menemonic could be from metamask or a cli wallet.
  2. nostr_sk is needed as it you can witne via nostr
  3. Aqua provides the ability to sign via did, to use did a did key is required.
  4. when verifying a witness the alchemy key enables aqua to do an alchemy loopkup of the transaction hash.
  5. witness_eth_network is used to switch networks ie among : mainnet, sepolia, holesky.
  6. witness_method is used to instruct aqua to use metamask or cli when witness, ie in some everonments metamask is not available , cli will use menomonic from credentials to construct a wallet.

Run npm test to ru tests

Running a single file test

Run aquafier tests

npm test -- ./tests/aquafier.test.ts

or

Run p12 tests

npm test -- ./tests/p12.test.ts