This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
Releases: ipld/js-ipld
Releases · ipld/js-ipld
v0.19.2
v0.19.1
v0.19.0
Code Refactoring
BREAKING CHANGES
- Not all IPLD Formats are included by default
By default only the ipld-dag-cbor, ipld-dag-pb and [raw]
IPLD Formats are included. If you want to use other IPLD Formats
you need to pass them into the constructor.
The code to restore the old behaviour could look like this:
const ipldBitcoin = require('ipld-bitcoin')
const ipldDagCbor = require('ipld-dag-cbor')
const ipldDagPb = require('ipld-dag-pb')
const ipldEthAccountSnapshot = require('ipld-ethereum').ethAccountSnapshot
const ipldEthBlock = require('ipld-ethereum').ethBlock
const ipldEthBlockList = require('ipld-ethereum').ethBlockList
const ipldEthStateTrie = require('ipld-ethereum').ethStateTrie
const ipldEthStorageTrie = require('ipld-ethereum').ethStorageTrie
const ipldEthTrie = require('ipld-ethereum').ethTxTrie
const ipldEthTx = require('ipld-ethereum').ethTx
const ipldGit = require('ipld-git')
const ipldRaw = require('ipld-raw')
const ipldZcash = require('ipld-zcash')
…
const ipld = new Ipld({
blockService: blockService,
formats: [
ipldBitcoin, ipldDagCbor, ipldDagPb, ipldEthAccountSnapshot,
ipldEthBlock, ipldEthBlockList, ipldEthStateTrie, ipldEthStorageTrie,
ipldEthTrie, ipldEthTx, ipldGit, ipldRaw, ipldZcash
]
})
- The IPLD constructor is no longer taking a BlockService as its
only parameter, but an objects object withblockService
as a
key.
You need to upgrade your code if you initialize IPLD.
Prior to this change:
const ipld = new Ipld(blockService)
Now:
const ipld = new Ipld({blockService: blockService})