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

web3exchange-api

v0.0.4

Published

API for web3 exchange

Downloads

2

Readme

Web3 Exchange API

Install

npm i web3exchange-api

How to use

Generate the private key here or another place trusted by you.

Get Address


var builder = require('web3exchange-api');

var privateKey = "cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4";
var apiUrl = "http://ethnamed.io:8081";

var address = builder.getAddress(privateKey);

Contact to API's admin and privide him your address He have to put your public address into the config.json/recaptcha/whitelist on the server

Init the API


var builder = require('web3exchange-api');

var privateKey = "cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4";
var apiUrl = "http://ethnamed.io:8081";

builder.createApi({ apiUrl, privateKey }, (err, api)=> {

    api.convert({ from, to, value, address }, cb);
    
});

Crypto To Fiat


var request = {
    clientid: api.createClientid(),
    from: "ETH",
    to: "USD",
    value: "1", //ETH
    address: "0000 0000 0000 0000"
}

var cb = (err, data) {
    //Send 1 ETH Here
    console.log(data.address);
}

api.convert(request, cb);

Fiat To Crypto


var request = {
    clientid: api.createClientid(),
    from: "USD",
    to: "ETH",
    value: "100", //USD
    address: "0xbd7ac0f279dc56b61fb10faeaa7fd8da54e92408" //Your ETH address to receive coins
}

var cb = (err, data) {
    console.log(data.checkout_url);
}

api.convert(request, cb);

You can get an error KYC is required so please follow next steps


var request = {
    clientid: request.clientid,
    email: "[email protected]",
    clientid: ""
    firstname: "John",
    lastname: "Melburn"
    address: "8913 3rd Street Brooklyn, NY 11223",
    photo: "data:" // Encoded base64, please make sure that photo in correct format
    bill: "data:" // Encoded base64, please make sure that bill in correct format
}

var cb = (err, data) {
    console.log(data.checkout_url);
}

api.kyc(request, cb);

Here is information how to encode the image.