|
|
@@ -15,13 +15,15 @@ const index_1 = require("./index");
|
|
|
const storage_node_1 = require("./storage-node");
|
|
|
const webclient_node_1 = require("./webclient-node");
|
|
|
const host = 'http://127.0.0.1:8082';
|
|
|
+const ipfsHost = 'http://127.0.0.1:5001';
|
|
|
const crypto_node_1 = __importDefault(require("./../src/crypto-node"));
|
|
|
-const bankClient = new index_1.BankClient(host, 'https://distributing.fun', new storage_node_1.StorageNode('bankClient'), new webclient_node_1.WebClientNode(), new crypto_node_1.default());
|
|
|
+const bankClient = new index_1.BankClient(host, ipfsHost, new storage_node_1.StorageNode('bankClient'), new webclient_node_1.WebClientNode(), new crypto_node_1.default());
|
|
|
(() => __awaiter(this, void 0, void 0, function* () {
|
|
|
yield bankClient.bootstrap();
|
|
|
const peerId = yield bankClient.getPub();
|
|
|
console.log('peerId', peerId);
|
|
|
- // const balance = await bankClient.getBalance();
|
|
|
+ const balance = yield bankClient.getBalance();
|
|
|
+ console.log('my balance', balance);
|
|
|
// const uploadResult = await bankClient.upload({
|
|
|
// fileData: 't2',
|
|
|
// fileName: 't3.txt',
|
|
|
@@ -29,7 +31,6 @@ const bankClient = new index_1.BankClient(host, 'https://distributing.fun', new
|
|
|
// title: '442a',
|
|
|
// text: 'txt'
|
|
|
// });
|
|
|
- // console.log('my balance', balance);
|
|
|
// console.log('upl', uploadResult);
|
|
|
// await bankClient.appendBank('bank:qmlink/📥', uploadResult);
|
|
|
// console.log('added.');
|
|
|
@@ -55,8 +56,8 @@ const bankClient = new index_1.BankClient(host, 'https://distributing.fun', new
|
|
|
// console.log('subscribed');
|
|
|
// const starting = await bankClient.retrievePrivate('QmXRkCwxqecBMXs4DQucS9w85pW16i26tdKcZHExt9z8s5', '📤');
|
|
|
// console.log('inbox contents', starting);
|
|
|
- const items = yield bankClient.getItemsForCommaList('1563498096_SL_bafkreiaocpbrzrc45xdkmnwobospujpewrb4t4hk2thqqs5kldtehy62qu');
|
|
|
- console.log('items', items);
|
|
|
+ // const items = await bankClient.getItemsForCommaList('1563498096_SL_bafkreiaocpbrzrc45xdkmnwobospujpewrb4t4hk2thqqs5kldtehy62qu');
|
|
|
+ // console.log('items', items);
|
|
|
// setTimeout(async () => {
|
|
|
// const uploadResult = await bankClient.upload({
|
|
|
// type: 'file',
|