UNPKG

toshi

Version:

node.js wrapper for the toshi bitcoin node

37 lines (26 loc) 856 B
// Generated by CoffeeScript 1.8.0 (function() { var Block, Request; Request = require('./request'); module.exports = Block = (function() { function Block(url) { this.request = new Request(url); } Block.prototype.paginate = function(params, cb) { return this.request.get('blocks', params, cb); }; Block.prototype.get = function(hash, cb) { return this.request.get('blocks/' + hash, cb); }; Block.prototype.height = function(height, cb) { return this.request.get('blocks/' + height, cb); }; Block.prototype.latest = function(cb) { return this.request.get('blocks/latest', cb); }; Block.prototype.transactions = function(hash, params, cb) { return this.request.get('blocks/' + hash + '/transactions', params, cb); }; return Block; })(); }).call(this);