-
Notifications
You must be signed in to change notification settings - Fork 26
/
main.js
42 lines (35 loc) · 1.69 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
var APIClient = require('./lib/api_client');
var blocktrail = require('./lib/blocktrail');
Object.keys(blocktrail).forEach(function(key) {
APIClient[key] = blocktrail[key];
});
/*
* we used APIClient as base export so that people can client require('blocktrail')
* but that's deprecated and they should require('blocktrail').BlocktrailSDK now, but leaving it for now
*/
APIClient.q = require('q');
APIClient.BlocktrailSDK = APIClient;
APIClient.Wallet = require('./lib/wallet');
APIClient.Request = require('./lib/request');
APIClient.Encryption = require('./lib/encryption');
APIClient.KeyDerivation = require('./lib/keyderivation');
APIClient.EncryptionMnemonic = require('./lib/encryption_mnemonic');
APIClient.useWebworker = require('./lib/use-webworker');
APIClient.WalletSweeper = require('./lib/wallet_sweeper');
APIClient.UnspentOutputFinder = require('./lib/unspent_output_finder');
// data service providers, for wallet recovery
APIClient.BlocktrailBitcoinService = require('./lib/services/blocktrail_bitcoin_service');
APIClient.InsightBitcoinService = require('./lib/services/insight_bitcoin_service');
APIClient.SPVBridgeBitcoinService = require('./lib/services/spv_bridge_bitcoin_service');
// expose these for using in the browser
APIClient.randomBytes = require('randombytes');
APIClient.lodash = require('lodash');
APIClient.CryptoJS = require('crypto-js');
APIClient.debug = require('debug');
APIClient.bip39 = require('bip39');
APIClient.bip39wordlist = require('bip39/wordlists/en.json');
APIClient.bitcoin = require('bitcoinjs-lib');
APIClient.superagent = require('superagent');
APIClient.Buffer = Buffer;
APIClient.VERSION = require('./lib/pkginfo').VERSION;
exports = module.exports = APIClient;