How to use coinpayments - 2 common examples

To help you get started, we’ve selected a few coinpayments examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github secret-tech / backend-ico-dashboard / src / services / coinpayments / coinpayments.client.ts View on Github external
import { injectable, inject } from 'inversify';
import { CoinpaymentsTransactionResult } from '../../entities/coinpayments.transaction.result';
import config from '../../config';

export const CoinPayments = require('coinpayments');
const { promisify } = require('util');

const rates = promisify(CoinPayments.prototype.rates);
const createTransaction = promisify(CoinPayments.prototype.createTransaction);
const convertCoins = promisify(CoinPayments.prototype.convertCoins);
const getTx = promisify(CoinPayments.prototype.getTx);
const getTxMulti = promisify(CoinPayments.prototype.getTxMulti);

export interface ConversionOptions {
  amount: string|number;
  from: string;
  to: string;
  address?: string;
}

export interface ConversionResult {
  id: string;
}

export interface ExchangeRateOptions {
  short?: number;
  accepted?: number;
}
github secret-tech / backend-ico-dashboard / src / services / coinpayments / coinpayments.client.ts View on Github external
import { injectable, inject } from 'inversify';
import { CoinpaymentsTransactionResult } from '../../entities/coinpayments.transaction.result';
import config from '../../config';

export const CoinPayments = require('coinpayments');
const { promisify } = require('util');

const rates = promisify(CoinPayments.prototype.rates);
const createTransaction = promisify(CoinPayments.prototype.createTransaction);
const convertCoins = promisify(CoinPayments.prototype.convertCoins);
const getTx = promisify(CoinPayments.prototype.getTx);
const getTxMulti = promisify(CoinPayments.prototype.getTxMulti);

export interface ConversionOptions {
  amount: string|number;
  from: string;
  to: string;
  address?: string;
}

export interface ConversionResult {
  id: string;
}

coinpayments

CoinPayments is a cloud wallet solution that offers an easy way to integrate a checkout system for numerous cryptocurrencies. Coinpayments now also offers coin conversion via Shapeshift.io.

MIT
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis

Popular coinpayments functions