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

zenzo-sdk-nodejs

v1.1.0

Published

The ZENZO SDK for Node.js

Downloads

8

Readme

ZENZO Node.js SDK

JavaScript Style Guide

Notice: This module and API is in early development and may change in the future.

ZENZO Arcade Official Website

Getting Started

Install the ZENZO NPM Package with:

npm i zenzo-sdk-nodejs

Also, require the module in your Node.js application with:

const ZENZO = require("zenzo-sdk-nodejs")

Using the API

Authentication

To authenticate with the ZENZO SDK, visit the Arcade Dashboard, hit the hidden "Developer Mode" button in the bottom-right of the page and copy your API key under your Deposit box. Throw it into the authenticator method, like the following:

ZENZO.auth("api-key")

Arcade SDK

The Arcade SDK is a partition of the ZENZO SDK that interacts with the Arcade's main service, this can be used for getting or manipulating account-related data, platform statistics, uptime, and more.

Ping

// Ping the Arcade, a response of "Pong!" will come back if the Arcade is alive and well
ZENZO.ping().then(res => {
  console.log(res) // Pong!
})

Regen

ZENZO.regen().then(res => {
  console.log(res.content) // New API Key
})

Forge SDK

The Forge SDK is a partition of the ZENZO SDK that interacts with the Arcade Forge, a service for providing multi-platform, secure and valuable items and content within games. Using the Forge, you can create in-game items that are worth real monetary value, as all Forge items are backed by a specified amount of ZNZ, locked away until the item is either Smelted or Crafted.

The Forge can, for example:

  • Allow gamers to create and introduce truly custom in-game items.

  • Allow gamers to 'own' their items entirely and permanently.

  • Allow game developers to create a network of games where the items within them can be transferred between them, effortlessly.

List

An endpoint that gets an array containing all items owned by the API key's account.

ZENZO.forgelist().then(res => {
  console.log(res.content) // JSON array of items
})

Create

An endpoint that creates a Forge item with a specified value, name and image. The value of the item will be deducted from the API's account balance. If it cannot afford to create an item, an error will be thrown.

ZENZO.forgecreate(10, "ZNZ Kitty", "https://cdn.crowdfundinsider.com/wp-content/uploads/2018/04/CryptoKittie-mascot-Lola.png").then(res => {
  console.log(res.content) // JSON object of the item
})

Smelt

An endpoint that smelts (destroys) a Forge item, the value of the item will be converted back into blockchain ZNZ and added to the API's account balance.

ZENZO.forgesmelt("item-id").then(res => {
  console.log(res.message) // Human-readable response
})

Craft

An endpoint that crafts a new Forge item out of two older Forge items. The new item will have the combined value of both previous items, while the Name and Image can be customized again.

ZENZO.forgecraft("item_one-id", "item_two-id", "crafted-item-name", "crafted-item-image-url").then(res => {
  console.log(res.message) // Human-readable response
  console.log(res.content) // JSON object of the item
})

Transfers

An endpoint that transfers an item from the API's account to another Arcade account.

ZENZO.forgetransfer("item-id", "user-id").then(res => {
  console.log(res.message) // Human-readable response
})

Example Node.js files can be found in the /examples directory within the repository.