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

zumservices-api-js

v1.0.1

Published

Node.JS wrapper for ZUM Services RESTFUL API.

Downloads

4

Readme

NPM

ZUM Service JS API Interface

This wrapper allows you to easily interact with the ZUM Services v1 API to quickly develop applications that interact with the ZumCoin Network. This entire project uses Javascript Promises to make things fast, easy, and safe.

Table of Contents

  1. Installation
  2. Intialization
  3. Documentation
  4. Methods

Installation

npm i --save @zumservices/zumservices-api-js

Intialization

const ZUMServices = require('zumservices-api-js')

const ZS = new ZUMServices({
  token: 'eyJhbGciOiJIUzUxMiIsInR5fCI6IkpXVCJ9.eyJuYW1lIjoidGVzdCIsImFwcElkIjo0LCJ1c2VySWQiOjYsInBlcm1pc3Npb25zIjpbIwFkZHJlc3M6bmV3Il0sImlhdCI6MTUzMjU4NTM2NywiZXhwIjoxNT25MTc3MzY3LCJhdWQiOiJ0dXJ0bGV3YWxsZXQuaW8iLCJpc3MiOiJUUlRMIFNlcnZpY2VzIiwianRpIjoiMzMioQ.AEHXmvTo8RfNuZ15Y3IGPRhZPaJxFSmOZvVv2YGN9L4We7bXslIPxhMv_n_5cNW8sIgE2Fr-46OTb5H5AFgpjA',
  timeout: 2000
})

Documentation

API documentation is available at https://zum.services/documentation

Methods

createAddress()

Create a new ZUM addresses

ZS.createAddress()

getAddress(address)

Get address details by address

ZS.getAddress("Zum1yfSrdpfiSNG5CtYmckgpGe1FiAc9gLCEZxKq29puNCX92DUkFYFfEGKugPS6EhWaJXmhAzhePGs3jXvNgK4NbWXG4yaGBHC")

deleteAddress(address)

Delete a selected ZUM addresses

ZS.deleteAdddress("Zum1yfSrdpfiSNG5CtYmckgpGe1FiAc9gLCEZxKq29puNCX92DUkFYFfEGKugPS6EhWaJXmhAzhePGs3jXvNgK4NbWXG4yaGBHC")

getAddresses()

View all addresses belonging to the specified token.

ZS.getAddresses()

scanAddress(address, blockIndex)

Scan an address for transactions between a 100 block range starting from the specified blockIndex.

ZS.scanAddress("Zum1yfSrdpfiSNG5CtYmckgpGe1FiAc9gLCEZxKq29puNCX92DUkFYFfEGKugPS6EhWaJXmhAzhePGs3jXvNgK4NbWXG4yaGBHC", 899093)

getAddressKeys(address)

Get the public and secret spend key of an address.

ZS.getAddressKeys("Zum1yfSrdpfiSNG5CtYmckgpGe1FiAc9gLCEZxKq29puNCX92DUkFYFfEGKugPS6EhWaJXmhAzhePGs3jXvNgK4NbWXG4yaGBHC")

integrateAddress(address, paymentId)

Create an integrated address with an address and payment ID.

ZS.integrateAddress("Zum1yfSrdpfiSNG5CtYmckgpGe1FiAc9gLCEZxKq29puNCX92DUkFYFfEGKugPS6EhWaJXmhAzhePGs3jXvNgK4NbWXG4yaGBHC", "7d89a2d16365a1198c46db5bbe1af03d2b503a06404f39496d1d94a0a46f8804")

getIntegratedAddresses(address)

Create an integrated address with an address and payment ID.

ZS.getIntegratedAddresses("Zum1yfSrdpfiSNG5CtYmckgpGe1FiAc9gLCEZxKq29puNCX92DUkFYFfEGKugPS6EhWaJXmhAzhePGs3jXvNgK4NbWXG4yaGBHC")

getFee(amount)

Calculate the ZUM Services fee for an amount specified in ZUM with two decimal points.

ZS.getFee(123.46)

createTransfer(sender, receiver, amount, fee, paymentId, extra)

Send a ZUM transaction with an address with the amount specified two decimal points.

ZS.createTransfer(
  "Zum1yfSrdpfiSNG5CtYmckgpGe1FiAc9gLCEZxKq29puNCX92DUkFYFfEGKugPS6EhWaJXmhAzhePGs3jXvNgK4NbWXG4yaGBHC",
  "Zum1yhbRwHsXj19c1hZgFzgxVcWDywsJcDKURDud83MqMNKoDTvKEDf6k7BoHnfCiPbj4kY2arEmQTwiVmhoELPv3UKhjYjCMcm",
  1234.56,
  12.34,
  "7d89a2d16365a1198c46db5bbe1af03d2b503a06404f39496d1d94a0a46f8804",
  "3938f915a11582f62d93f82f710df9203a029f929fd2f915f2701d947f920f99"
)

You can leave the last two fields (paymentId and extra) blank.

getTransfer(address)

Get a transaction details specified by transaction hash.

ZS.getTransfer("EohMUzR1DELyeQM9RVVwpmn5Y1DP0lh1b1ZpLQrfXQsgtvGHnDdJSG31nX2yESYZ")

getWallet()

Get wallet container info and health check.

ZS.getWallet()

getStatus()

Get the current status of the ZUM Services infrastructure.

ZS.getStatus()

License

Copyright (c) 2019 ZumCoin Development Team

Please see the included LICENSE file for more information.