GithubHelp home page GithubHelp logo

bitcoin-coinify-client's Introduction

Bitcoin Coinify Javascript Client Build Status Coverage Status

This is used by My-Wallet-V3.

Install

npm install bitcoin-coinify-client --save

Usage

Three things are needed:

  1. delegate object (see example) with functions that provide the following:
  • save() -> e.g. function () { return JSON.stringify(this._coinify); }
  • email() -> String : the users email address
  • isEmailVerified() -> Boolean : whether the users email is verified
  • getToken() -> stringify : JSON web token {email: '[email protected]'}
  • monitorAddress(address, callback) : callback(amount) if btc received
  • checkAddress(address) : look for existing transaction at address
  • getReceiveAddress(trade) : return the trades receive address
  • reserveReceiveAddress()
  • releaseReceiveAddress()
  • serializeExtraFields(obj, trade) : e.g. obj.account_index = ...
  • deserializeExtraFields(obj, trade)
  1. Coinify partner identifier
var object = {user: 1, offline_token: 'token'};
var coinify = new Coinify(object, delegate);
coinify.partnerId = ...;
coinify.delegate.save.bind(coinify.delegate)();
delegate.trades = coinify.trades
// "{"user":1,"offline_token":"token"}"

To see a demo switch to Node 7.2 or higher and run:

nvm use 7.2
node demo.js

Development

Modifying bitcoin-exchange-client

To use a local version of bitcoin-exchange-client, create a symlink:

cd ..
rm -rf bitcoin-coinify-client/node_modules/bitcoin-exchange-client
ln -s ../../bitcoin-exchange-client bitcoin-coinify-client/node_modules/bitcoin-exchange-client

Testing inside my-wallet-v3

To use a local version of this repo inside my-wallet-v3, create a symlink:

cd ..
rm -rf My-Wallet-V3/node_modules/bitcoin-coinify-client
ln -s ../../bitcoin-coinify-client My-Wallet-V3/node_modules/bitcoin-coinify-client

Note that Grunt won't detect these changes.

Release

Change version in package.json.

git commit -a -m "v0.1.0"
git push
git tag -s v0.1.0
git push --tags
make changelog

Add the relevant sections of Changelog.md to the tag on Github and mark it as pre-release.

npm publish

bitcoin-coinify-client's People

Contributors

sjors avatar thore3 avatar jtormey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.