1 import keysApi from './api/keys.js';
2 import accountsApi from './api/accounts.js';
3 import transactionsApi from './api/transactions.js';
4 import keysSDK from './sdk/keys.js';
5 import accountsSDK from './sdk/accounts.js';
6 import transactionSDK from './sdk/transaction.js';
7 import walletSDK from './sdk/wallet.js';
8 import querySDK from './sdk/query.js';
9 import {serverHttp, http} from './http.js';
11 function Bytom(serverHost, wasmPath, baseURL, token) {
12 this.install = function(Vue) {
13 Vue.prototype.$Bytom = this;
17 this.http = new http(baseURL, token);
18 this.keys = new keysApi(this.http);
19 this.accounts = new accountsApi(this.http);
20 this.transactions = new transactionsApi(this.http);
24 Bytom.wasmPath = wasmPath;
25 this.serverHttp = new serverHttp(serverHost);
27 this.sdk.keys = new keysSDK();
28 this.sdk.accounts = new accountsSDK(this);
29 this.sdk.transaction = new transactionSDK(this);
30 this.sdk.wallet = new walletSDK(this);
31 this.sdk.query = new querySDK(this);
40 Bytom.prototype.getNetType = function() {
47 * @param {String} net net type (main test)
49 Bytom.prototype.setNetType = function(net) {