Nonlinear Programming Methods

    coinforbarter-node
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.7 • Public • Published

    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 tochukwu@coinforbarter.com

    Install

    npm i coinforbarter-node

    DownloadsWeekly Downloads

    3

    Version

    1.0.7

    License

    MIT

    Unpacked Size

    205 kB

    Total Files

    150

    Last publish

    Collaborators

    • t-kings