0.0.7 • Published 9 years ago

razrbit v0.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

Official SDKs: Android | iOS | Javascript | PHP | Ruby

LUXSTACK Bitcoin Platform and SDKs — build, test and scale bitcoin apps faster. Plug in our powerful SDKs to supercharge your bitcoin toolbox.

Razrbit SDK for Javascript (Beta)

Installation

Node JS

npm install razrbit

Browser

1) Include the dist/razrbit.min.js script in your page

2) Set your website's domain in the settings page of the dashboard

Usage

var Razrbit = require("razrbit");

var client = new Razrbit("myId", "mySecret");

client.wallet.createNewAddress(function (err, result) {
        if (err) return console.error(err);
        console.log("New bitcoin address: " + result.address);
});

API

Wallet

Razrbit.wallet.createNewAddress(cb(err, result))

Creates a new bitcoin address in your wallet

Razrbit.wallet.sendAmount(fromPrivateKey, toAddress, amount, cb(err))

Sends bitcoin from one of your addresses to the destination addresses. amount is in bits.

Razrbit.wallet.getBalanceFromAddress(address, cb(err, amount))

Returns the balance of the given address in bits.

Explorer

Razrbit.explorer.block(hash, cb(err, block))

Retrieve details about a given block

Razrbit.explorer.transaction(hash, cb(err, transaction))

Retrieve details about a given transaction

Razrbit.explorer.address(address, cb(err, addressDetails))

Retrieve details about a given address

Razrbit.explorer.addressUnspentOutputs(address, cb(err, amount))

Returns the list of unspent outputs for a given address

Network

Razrbit.network.difficulty(cb(err, difficulty))

Retrieve the current network difficulty

Razrbit.network.pushTransaction(transaction, cb(err, transaction))

Push a transaction on the network

Markets

currencyCode is a valid ISO 4217 code such as USD or EUR.

Razrbit.markets.price(currencyCode, cb(err, price))

Returns the current bitcoin price

Razrbit.markets.dayPrice(currencyCode, cb(err, price))

Returns the day price

Razrbit.markets.dayPrice(currencyCode, date, cb(err, price))

Returns the historical price at the given date. date must be a date in the yyyy-mm-dd format.

Notifications

Razrbit.notifications.address(address, email, cb(err))

Setup a notification email for a given address

Razrbit.notifications.block(hash, email, cb(err))

Setup a notification email for a given block

Razrbit.notifications.transaction(hash, email, cb(err))

Setup a notification email for a given transaction

Testing

Add your credentials to test/credentials.json, then run either npm test or mocha.

Support

Feel free to request a feature and make suggestions for our product team.

License

Code released under the MIT license.

Copyright 2012-2014 LUXSTACK Inc. Razrbit is a trademark maintained by LUXSTACK Inc.

LUXSTACK Bitcoin SDKs for other platforms

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago