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 {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);
23 Bytom.wasmPath = wasmPath;
24 this.serverHttp = new serverHttp(serverHost);
26 this.sdk.keys = new keysSDK();
27 this.sdk.accounts = new accountsSDK(this.serverHttp);
28 this.sdk.transaction = new transactionSDK(this.serverHttp);
29 this.sdk.wallet = new walletSDK(this);