v1.0.0
Changed
- (period) BREAKING: include previous period hash into period inclusion proofs. This is default now and thus proofs for older periods will change. If you need to regenerate proof for old (legacy) periods, you can provide
{ excludePrevHashFromProof: true }
object as a third argument to Period constructor (see below) (#166) - (helpers) third argument of
getProof
changed fromfallbackValidatorData
to period options object (see below). Useful for older periods which the nodes has no period data for and for periods you want to regenerate the old proof for (#166)
Fixed
- (tx) allow NFTs and NSTs with "0" value. Needed to solve the bigger issue in the node: leapdao/meta#205 (#169)
Added
-
(period) optional third constructor argument with period options (#166):
type PeriodOptions = { validatorData?: { slotId: number; validatorAddress: string | Buffer | number; casBitmap?: string | Buffer | number; }; excludePrevHashFromProof?: Boolean; };
validatorData
— validator data to use for this period in case there is no validator data available on the nodes. If not specified and no data on the node, error will be thrown.
excludePrevHashFromProof
— whether to skip including previous period hash in a period proof. Defaults to false — the prev period hash will be included (breaking change).
Upgrading from 0.37+ to 1.0.0:
- getProof third argument structure should be changed (see above)
- use
{ excludePrevHashFromProof: true }
as a third constructor argument for Period if you need the period to yield the same proof as it was before at some point (see above)