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

obyte-http-client

v0.0.2

Published

## Install ``yarn add obyte-http-client``

Downloads

11

Readme

Obyte http client

Install

yarn add obyte-http-client

Use

import obyte from "obyte-http-client"

Example

1. Create an instance

import obyte from "obyte-http-client";

export default new obyte.Client({
  testnet: true
});

2. Use

import obyteClientInstance from "..."; 

const witnesses = obyteClientInstance.getWitnesses();

Methods

getWitnesses - Returns list of the current witnesses.

const witnesses = obyteClientInstance.getWitnesses(); // use cache

const witnesses = obyteClientInstance.getWitnesses(true); // update every time

getPeers - Returns the list of the current peers.

const peers = obyteClientInstance.getPeers();

getJoint - Request data of a specific unit.

const joint = obyteClientInstance.getJoint('k37Xlns198EHCtubX5X0kqbrnC9XYVTa0aFpR78gidM=');

getLastMci - Get the last main chain index of the node you logged to.

const last_mci = obyteClientInstance.getLastMci();

getHistory - Get the history of one or multiple addresses.

const history = obyteClientInstance.getHistory(["ULQA63NGEZACP4N7ZMBUBISH6ZTCUS2Q"]);

getAttestation - Get attestation unit id from a specific attested value.

const attestation = obyteClientInstance.getAttestation("H5EZTQE7ABFH27AUDTQFMZIALANK6RBG", "email", "[email protected]");

getAttestation - Get all attestations of a specific address.

const attestations = obyteClientInstance.getAttestations("ULQA63NGEZACP4N7ZMBUBISH6ZTCUS2Q");

getDefinition - Get an address definition.

const definition = obyteClientInstance.getDefinition("TMWNLXR42CKIP4A774BQGNVBZAPHY7GH");

getBalances - Get balances from one or multiple addresses (max 100).

const balances = obyteClientInstance.getBalances(["TMWNLXR42CKIP4A774BQGNVBZAPHY7GH"]);

getProfileUnits - Get profile unit ids from one or multiple addresses (max 100).

const profile_units = obyteClientInstance.getProfileUnits(["TMWNLXR42CKIP4A774BQGNVBZAPHY7GH"]);

getDataFeed

const data = obyteClientInstance.getDataFeed(["I2ADHGP4HL6J37NQAD73J7E5SKFIXJOT"], "timestamp", "none");

dryRunAa - Calculates the predicted outcome of an Autonomous Agent with a sample transaction.

const trigger = {
  address: 'K237YYRMBYWCJBLSZGLJTXLZVVEXLI2Y', // sent from address
  outputs: {
    'base': 10000 // default AA bounce fee in bytes
  },
  data: {
    'vest': true
  }
};

const result = obyteClientInstance.dryRunAa("TSDLQPZTSVDNC63G7YROC26CYCCZC4GO", trigger);

getAaStateVars - Get state variables of an Autonomous Agent.

const state_vars = obyteClientInstance.getAaStateVars("TSDLQPZTSVDNC63G7YROC26CYCCZC4GO", "proposal_1");

getAasByBaseAas - Get Autonomous Agents that are based on some Autonomous Agent.

const aas = obyteClientInstance.getAasByBaseAas("QFM5ECICVHZKRVTW3EMVTUSYJ6P2WLDY"); // or ["QFM5ECICVHZKRVTW3EMVTUSYJ6P2WLDY"]

getAaResponses - Get latest Autonomous Agent responses.

const responses = obyteClientInstance.getAaResponses("PVMCXUZBEHCFWOLXUDQVNCQZ476LNEW4"); // or ["PVMCXUZBEHCFWOLXUDQVNCQZ476LNEW4"]

getAaResponseChain

const response_chain = obyteClientInstance.getAaResponseChain("QjJsukONZ57VBVtLk/0ak1jMYNW0vw7q0So95KBJH2k=");

executeGetter - Execute AA getter function

const result = obyteClientInstance.executeGetter("VLKI3XMMX5YULOBA6ZXBXDPI6TXF6V3D", "get_exchange_result", [0, 100]);

Donations

To support our work, donate through kivach.org.

Kivach