blocktrail /
blocktrail-sdk-nodejs
| 1 | var APIClient = require('./lib/api_client'); |
||
| 2 | var blocktrail = require('./lib/blocktrail'); |
||
| 3 | |||
| 4 | Object.keys(blocktrail).forEach(function(key) { |
||
| 5 | APIClient[key] = blocktrail[key]; |
||
| 6 | }); |
||
| 7 | |||
| 8 | /* |
||
| 9 | * we used APIClient as base export so that people can client require('blocktrail') |
||
| 10 | * but that's deprecated and they should require('blocktrail').BlocktrailSDK now, but leaving it for now |
||
| 11 | */ |
||
| 12 | |||
| 13 | APIClient.q = require('q'); |
||
| 14 | APIClient.BlocktrailSDK = APIClient; |
||
| 15 | APIClient.Wallet = require('./lib/wallet'); |
||
| 16 | APIClient.Request = require('./lib/request'); |
||
| 17 | APIClient.Encryption = require('./lib/encryption'); |
||
| 18 | APIClient.KeyDerivation = require('./lib/keyderivation'); |
||
| 19 | APIClient.EncryptionMnemonic = require('./lib/encryption_mnemonic'); |
||
| 20 | APIClient.useWebworker = require('./lib/use-webworker'); |
||
| 21 | |||
| 22 | APIClient.WalletSweeper = require('./lib/wallet_sweeper'); |
||
| 23 | APIClient.UnspentOutputFinder = require('./lib/unspent_output_finder'); |
||
| 24 | |||
| 25 | // data service providers, for wallet recovery |
||
| 26 | APIClient.BlocktrailBitcoinService = require('./lib/services/blocktrail_bitcoin_service'); |
||
| 27 | APIClient.InsightBitcoinService = require('./lib/services/insight_bitcoin_service'); |
||
| 28 | |||
| 29 | // expose these for using in the browser |
||
| 30 | APIClient.randomBytes = require('randombytes'); |
||
| 31 | APIClient.lodash = require('lodash'); |
||
| 32 | APIClient.CryptoJS = require('crypto-js'); |
||
| 33 | APIClient.debug = require('debug'); |
||
| 34 | APIClient.bip39 = require('bip39'); |
||
| 35 | APIClient.bip39wordlist = require('bip39/wordlists/en.json'); |
||
| 36 | APIClient.bitcoin = require('bitcoinjs-lib'); |
||
| 37 | APIClient.superagent = require('superagent'); |
||
| 38 | APIClient.Buffer = Buffer; |
||
|
0 ignored issues
–
show
|
|||
| 39 | APIClient.VERSION = require('./lib/pkginfo').VERSION; |
||
| 40 | |||
| 41 | exports = module.exports = APIClient; |
||
| 42 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.