New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

coinforbarter-node

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coinforbarter-node

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

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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
  • Getting Started
  • Usage
  • Services and Methods
  • Deployment
  • Built Using
  • CoinForBarter API References

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

Keywords

FAQs

Package last updated on 10 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc