forked from blockchain/My-Wallet-V3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
44 lines (39 loc) · 1.49 KB
/
index.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
43
44
'use strict';
require('es6-promise').polyfill();
require('isomorphic-fetch');
var Buffer = require('buffer').Buffer;
// This fixes a bug with Safari < 8 and the Browserify Buffer shim used in Crypto-browserify/randombytes
// See: https://github.com/feross/buffer/issues/63
try {
if (navigator && navigator.vendor &&
navigator.vendor.indexOf('Apple') > -1) {
var versionStart = navigator.userAgent.toLowerCase().indexOf('applewebkit') + 12;
var version = navigator.userAgent.substr(versionStart, 1);
if (version && typeof (parseInt(version, 10)) === 'number' && parseInt(version, 10) < 6) {
Buffer.TYPED_ARRAY_SUPPORT = true;
}
}
} catch (e) {
}
module.exports = {
Buffer: Buffer,
MyWallet: require('./src/wallet'),
WalletStore: require('./src/wallet-store'),
WalletCrypto: require('./src/wallet-crypto'),
Payment: require('./src/payment'),
ImportExport: require('./src/import-export'),
BlockchainSettingsAPI: require('./src/blockchain-settings-api'),
Helpers: require('./src/helpers'),
API: require('./src/api'),
Tx: require('./src/wallet-transaction'),
Shared: require('./src/shared'),
WalletTokenEndpoints: require('./src/wallet-token-endpoints'),
WalletNetwork: require('./src/wallet-network'),
RNG: require('./src/rng'),
Transaction: require('./src/transaction'),
Address: require('./src/address'),
Metadata: require('./src/metadata'),
Bitcoin: require('bitcoinjs-lib'),
External: require('./src/external'),
BuySell: require('./src/buy-sell')
};