Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitcoin-sfox-client

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitcoin-sfox-client

Buy and sell Bitcoin using SFOX API.

  • 0.4.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Bitcoin SFOX Javascript Client Build Status Coverage Status

This is used by My-Wallet-V3.

Install

npm install bitcoin-sfox-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._sfox); }
  • email() -> String : the users email address
  • isEmailVerified() -> Boolean : whether the users email is verified
  • getEmailToken() -> 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()
  • commitReceiveAddress()
  • releaseReceiveAddress()
  • serializeExtraFields(obj, trade) : e.g. obj.account_index = ...
  • deserializeExtraFields(obj, trade)
  1. SFOX API key
var object = {user: 1, offline_token: 'token'};
var sfox = new SFOX(object, delegate);
sfox.api.apiKey = ...;
sfox.delegate.save.bind(sfox.delegate)();
// "{"user":1, ...}"

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-sfox-client
ln -s ../../bitcoin-sfox-client My-Wallet-V3/node_modules/bitcoin-sfox-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

Keywords

FAQs

Package last updated on 27 Sep 2018

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