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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ironfish/sdk

v2.7.0

Published

SDK for running and interacting with an Iron Fish node

Downloads

1,311

Readme

Ironfish

codecov

Ironfish contains the implementation of the Ironfish node and all relevant components that run it including the Blockchain, MemPool, RPC layer, PeerNetwork, and more.

Components

Accounts

An account store used to manage, create, and update Ironfish accounts.

Config

This represents the IronfishConfig and all of its options. It's a hierarchical config system that has 3 levels of options. If you use config.get() or config.config then you'll always get the top-level config options.

-> config
 -> overrides
    * contains all the overrides, these usually come from the CLI
  -> loaded
     * contains all the values loaded from the users config file
   -> defaults
      * contains all the default values in the config

FileSystem

This is an abstraction on top of any file system related APIs like path and fs in node. It makes it so you can perform file and file system related methods in a way that works in the browser and node. NodeFileSystem is one implementation that works for node.

RpcServer

This is the server that handles clients connecting and making requests against the RPC routes. This server doesn't have much logic of its own, but it contains a set of adapters that each implement a transport mechanism.

When the RpcServer starts, so do the transports. They accept messages from clients, construct Requests, and route them into the routing layer which executes the proper route.

RpcAdapter

An adapter exists to represent a single transport layer. For example, in an HTTP adapter you might listen on port 80 for requests, construct RPC layer Request objects, and feed them into the routing layer, then render the RPC responses as HTTP responses. See IPCAdapter for an example of how to implement an adapter.

Logger

By default, the log level is set to only display info.

Change the logLevel in the config file, from *:info to *:debug if you want verbose logs.

IronfishSDK

This project contains the IronfishSdk, which is just a simple wrapper around the ironfish components like Blockchain, Config, Accounts. You can use the individual components whenever you feel like it, though the SDK is aimed at making usage easier.

SDK Example

// Initialize the SDK
const sdk = await IronfishSdk.init()

// Get a config option from the SDK
console.log(await sdk.config.get('blockGraffiti'))

// Start a node from the SDK
const node = sdk.node()
node.start()

// List all accounts from the wallet
console.log(node.wallet.accounts)