0.16.0 • Published 5 years ago

bitcoin-coinify-client v0.16.0

Weekly downloads
173
License
ISC
Repository
github
Last release
5 years ago

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: 'me@example.com'}
  • 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
0.16.0

5 years ago

0.15.0

5 years ago

0.14.0

5 years ago

0.13.0

5 years ago

0.12.0

5 years ago

0.11.0

5 years ago

0.10.0

5 years ago

0.9.0

5 years ago

0.8.0

6 years ago

0.7.6

6 years ago

0.7.5

6 years ago

0.7.4

6 years ago

0.7.3

7 years ago

0.7.2

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.9

7 years ago

0.6.8

7 years ago

0.6.7

7 years ago

0.6.6

7 years ago

0.6.5

7 years ago

0.6.4

7 years ago

0.6.3

7 years ago

0.6.2

7 years ago

0.6.1

7 years ago

0.6.1-dev.0

7 years ago

0.6.0

7 years ago

0.5.0

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.4.0-dev.5

7 years ago

0.4.0-dev.4

7 years ago

0.4.0-dev.3

7 years ago

0.4.0-dev.2

7 years ago

0.4.0-dev.1

7 years ago

0.4.0-dev.0

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago