The latest version of js-bigchaindb-driver contains breaking changes to its external API. In this document, we enumerate all changes to allow you to make upgrades efficiently.
Note that upgrading the js-bigchaindb-driver to v0.3.0 was done to enable functionality included in the latest (v1.0) BigchainDB release. A full list of BigchainDB v1.0's breaking changes can be found here. Note that v1.0 contains breaking changes to its core data models.
This document will just go into the very specific breaking changes affecting the JavaScript driver.
// old
export default function makeOutput(condition, amount = 1) {}
// new
export default function makeOutput(condition, amount = '1') {}
All conditions or fulfillments passed manually to the driver now need to comply with ILP's Crypto-Condition version 2 specification. For more information, see the updated specification or checkout the latest reference implementation of Crypto-Conditions in JavaScript.
// old
new Connection(PATH).listBlocks({ tx_id, status })
// new
new Connection(PATH).listBlocks(transactionId, status)
// old
new Connection(PATH).listOutputs({ public_key, unspent })
// new
new Connection(PATH).listOutputs(publicKey, spent)
NOTE: The unspent
flag has been inversed. This is inline with breaking
changes to BigchainDB
v1.0.
// old
new Connection(PATH).listTransactions({ asset_id, operation })
// new
new Connection(PATH).listTransactions(assetId, operation)
// new
new Connection(PATH).searchAssets(search)
A querying interface to text-search all assets in BigchainDB. For more documentation, see BigchainDB's HTTP API.
The driver is now bundled automatically each time we publish it to npm.com. We
now ship packages for commonjs
, commonjs2
, amd
, umd
, window
and
node.js. Thanks to unpkg.com, we're also able to provide all these packages on
a CDN. A link to all the bundles can be found
here.
A few notes:
- Adjust version number in link as appropriate
- only include
bigchaindb-driver.*.min.js
, but now everythingbundle.*
. This is a known issue.