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

coinforbarter-node

v1.0.7

Published

CoinForBarter Nodejs Library - Integrate and Manage cryptocurrency payments for goods and services

Downloads

60

Readme

CoinForBarter NodeJs Library

CoinForBarter Nodejs Library - Integrate and Manage cryptocurrency payments for goods and services

License, MIT npm, coinforbarter-node yarn, coinforbarter-node

Table of Contents


About


This is a NodeJs package for implementing CoinForBarter.

Getting Started


These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. See references for links to dashboard and API documentation.

Installation


$ npm install coinforbarter-node

# or
$ yarn add coinforbarter-node

Usage


const CoinForBarter = require('coinforbarter-node');

const publicKey = 'xxxxxxxxxxxxx';
const privateKey = 'xxxxxxxxxxxxx';
const secretHash = 'xxxxxxxxxxxxx';
const coinforbarter = new CoinForBarter(publicKey, privateKey, secretHash);

# An example to get all customers
const customers = coinforbarter.Customer.findAll();

Services and Methods


  1. Customer

This method handles all customers related to your account. The methods exposed by this service are listed below. See customer object properties

  • findAll

This method gets the list of all customers.

const query = {};
const getAllCustomers = async () => { 
      return await coinforbarter.Customer.findAll(query);
}

See list of query parameters

  • findOne

This method gets a particular customer by id.

const query = {};
const customerId = '';
const getCustomer = async (customerId) => { 
      return await coinforbarter.Customer.findOne(customerId);
}
  • create

This method creates a customer.

const params = {};
const createCustomer = async (params) => { 
      return await coinforbarter.Customer.create(params);
}

See customer parameters

  • update

This method updates a customer.

const params = {};
const createCustomer = async (params) => { 
      return await coinforbarter.Customer.update(params);
}

See customer update parameters

  1. BankAccount

  • getBankAccountName
  • create
  • findAll
  • findOne
  • makePrimary
  • getBanks
  1. Payment

    Methods
    • findOne
    • findAll
    • create
    • setCurrency
    • lockCurrency
    • getPaymentUpdates
    • cancel
  2. PaymentPlan

    Methods
    • findAll
    • findOne
    • create
    • update
  3. PaymentPlanSubscriber

    Methods
    • create
    • findOne
    • findAll
    • remove
  4. Payout

    Methods
    • findAll
    • findOne
  5. Transaction

    Methods
    • findAll
    • findOne
    • verify
    • events
    • getFee
    • webhook
  6. Transfer

    Methods
    • findAll
    • findOne
    • create
    • getFee
  7. WalletAddress

    Methods
    • create
    • findAll
    • findOne
    • makePrimary
  8. Webhook

    Methods
    • validate
  9. Misc

    Methods
    • getCountries
    • getBalance
    • getCurrencies

This SDK can be used closely with the official API Reference. All services and methods can be called this way


const customers = c4b.Customer.findAll();

i.e


 c4b:{
    [service]:method
 }

# I will do more on documenting each method till i can complete it 😂

Built Using


  • Typescript

CoinForBarter API References

Stay in Touch

Contributions are open, meta properties are not being returned yet by this SDK. You can send me an email via [email protected]