mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2024-11-22 09:46:58 +01:00
Minor fixes
This commit is contained in:
parent
7f49f67cda
commit
95f39ed23e
@ -75,7 +75,7 @@ const tx = driver.Transaction.makeCreateTransaction(
|
|||||||
const txSigned = driver.Transaction.signTransaction(tx, alice.privateKey);
|
const txSigned = driver.Transaction.signTransaction(tx, alice.privateKey);
|
||||||
|
|
||||||
// send it off to BigchainDB
|
// send it off to BigchainDB
|
||||||
let conn = driver.Connection(PATH);
|
let conn = new driver.Connection(PATH, { 'Content-Type': 'application/json' });
|
||||||
conn.postTransaction(txSigned)
|
conn.postTransaction(txSigned)
|
||||||
.then(() => conn.getStatus(txSigned.id))
|
.then(() => conn.getStatus(txSigned.id))
|
||||||
.then((res) => console.log('Transaction status:', res.status));
|
.then((res) => console.log('Transaction status:', res.status));
|
||||||
|
7
dist/bundle/bundle.js
vendored
7
dist/bundle/bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/bundle/bundle.min.js
vendored
2
dist/bundle/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/bundle/bundle.min.js.map
vendored
2
dist/bundle/bundle.min.js.map
vendored
File diff suppressed because one or more lines are too long
9
dist/node/connection/index.js
vendored
9
dist/node/connection/index.js
vendored
@ -1,5 +1,9 @@
|
|||||||
'use strict';
|
'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 _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; }; }();
|
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;
|
return Connection;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
exports.default = Connection;
|
||||||
|
module.exports = exports['default'];
|
4
dist/node/index.js
vendored
4
dist/node/index.js
vendored
@ -15,7 +15,7 @@ var _Transaction = _interopRequireWildcard(_transaction);
|
|||||||
|
|
||||||
var _connection = require('./connection');
|
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; } }
|
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.Ed25519Keypair = _Ed25519Keypair3.default;
|
||||||
exports.Transaction = _Transaction;
|
exports.Transaction = _Transaction;
|
||||||
exports.Connection = _Connection;
|
exports.Connection = _connection2.default;
|
@ -1,7 +1,7 @@
|
|||||||
import request from '../request';
|
import request from '../request';
|
||||||
|
|
||||||
|
|
||||||
class Connection {
|
export default class Connection {
|
||||||
constructor(path, headers) {
|
constructor(path, headers) {
|
||||||
this.path = path;
|
this.path = path;
|
||||||
this.headers = headers;
|
this.headers = headers;
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
export Ed25519Keypair from './Ed25519Keypair';
|
export Ed25519Keypair from './Ed25519Keypair';
|
||||||
|
|
||||||
export * as Transaction from './transaction';
|
export * as Transaction from './transaction';
|
||||||
export * as Connection from './connection';
|
export Connection from './connection';
|
||||||
|
Loading…
Reference in New Issue
Block a user