1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-12-29 08:07:51 +01:00

Minor fixes

This commit is contained in:
Tim Daubenschütz 2017-05-11 18:51:30 +02:00
parent 7f49f67cda
commit 95f39ed23e
8 changed files with 19 additions and 11 deletions

View File

@ -75,7 +75,7 @@ const tx = driver.Transaction.makeCreateTransaction(
const txSigned = driver.Transaction.signTransaction(tx, alice.privateKey);
// send it off to BigchainDB
let conn = driver.Connection(PATH);
let conn = new driver.Connection(PATH, { 'Content-Type': 'application/json' });
conn.postTransaction(txSigned)
.then(() => conn.getStatus(txSigned.id))
.then((res) => console.log('Transaction status:', res.status));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,9 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
@ -212,4 +216,7 @@ var Connection = function () {
}]);
return Connection;
}();
}();
exports.default = Connection;
module.exports = exports['default'];

4
dist/node/index.js vendored
View File

@ -15,7 +15,7 @@ var _Transaction = _interopRequireWildcard(_transaction);
var _connection = require('./connection');
var _Connection = _interopRequireWildcard(_connection);
var _connection2 = _interopRequireDefault(_connection);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@ -23,4 +23,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
exports.Ed25519Keypair = _Ed25519Keypair3.default;
exports.Transaction = _Transaction;
exports.Connection = _Connection;
exports.Connection = _connection2.default;

View File

@ -1,7 +1,7 @@
import request from '../request';
class Connection {
export default class Connection {
constructor(path, headers) {
this.path = path;
this.headers = headers;

View File

@ -2,4 +2,4 @@
export Ed25519Keypair from './Ed25519Keypair';
export * as Transaction from './transaction';
export * as Connection from './connection';
export Connection from './connection';