Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Latest commit

 

History

History
397 lines (239 loc) · 23 KB

CHANGELOG.md

File metadata and controls

397 lines (239 loc) · 23 KB

0.21.0 (2021-10-12)

Features

Bug Fixes

  • building indices on arrays using prefixItems (#343)

BREAKING CHANGES

  • stateTransition.validateStructure renamed to stateTransition.validateBasic and doesn't perfom signature validation
  • stateTransition.validateData renamed to stateTransition.validateState
  • validation errors are changed
  • removed old data triggers
  • old serialized data is not compatible

0.20.1 (2021-07-14)

Features

  • remove verify SML flag triggers (#324)

0.20.0 (2021-07-08)

Features

  • add metadata to document, data contract and identity (#318)
  • prevent possible ReDoS attacks for Data Contracts (#311, #317, #315)
  • strcit data contract JSON schema validation (#310, #312)

BREAKING CHANGES

  • dependencies is not supported. Use dependentRequired and dependentSchema instead
  • additionalitems is not supported. Use items: false and prefixItems instead
  • patternProperties is prohibited for Data Contract
  • error messages and properties are changed according to the new JSON Schema spec
  • pattern keyword accept only RE2 compatible regular expressions
  • Document type and properties minimum length is 3 chars
  • definitions is now defined using $defs keyword
  • JSON Schema strict validation is enabled. Previous contract schemas invalid in case they are not respecting strict mode constraints (reference this link for more information)
  • usage of if, then, else, allOf, anyOf, oneOf, patternProperties in document properties is prohibited
  • .initialize() must be called before using DashPlatformProtocol

0.19.2 (2021-05-20)

Bug Fixes

  • Cbor not decoding buffers properly in browsers (#306)

0.19.1 (2021-05-04)

Bug Fixes

  • topLevelIdentity.getId is not a function (#306)

0.19.0 (2021-04-30)

Features

  • add data triggers for feature flags documents (#297, #302)
  • ChainLock Asset Lock proof (#296)
  • use verifyInstantLock instead of fetchSMLStore (#294)

BREAKING CHANGES

  • AssetLock class was removed.
  • InstantAssetLockProof requires transaction and outputIndex property.
  • IdentityCreateTransition schema changed. assetLock property renamed to assetLockProof and expect InstantAssetLockProof or ChainAssetLockProof. transaction and outputIndex properties are removed.
  • IdentityTopUpTransition schema changed. assetLock property renamed to assetLockProof and expect InstantAssetLockProof or ChainAssetLockProof. transaction and outputIndex properties are removed.

0.18.0 (2021-03-03)

Features

  • get modified data ids from state transitions (#290)

Bug Fixes

  • BLS was throwing an error inside uncaughtException handler (#293)

0.17.0 (2020-12-29)

Features

  • dashpay data triggers (#285)
  • update dashcore-lib (#271, #283, #287)
  • fund identity with Asset Lock Proofs (#276, #277, #280)
  • limit publicKeys items to 32 (#278)

Bug Fixes

  • fs not found error on deploy (#273)

BREAKING CHANGES

  • Identity Create and Topup Transitions expect Asset Lock object instead of asset lock outpoint
  • identity.create and identity.createIdentityTopUpTransition expect asset lock transaction, output, and proof instead of outpoint
  • renamed skipAssetLockConfirmationValidation DPP option to skipAssetLockProofSignatureVerification
  • identity allows only 32 public keys

0.16.0 (2020-10-26)

Features

  • use Buffers for binary data (#238, #240, #241, #246, #247, #261, #262, #263, #266)
  • Identifier property type (#252, #265, #267, #268)
  • byteArray JSON Schema keyword instead of contentEncoding (#245, #248, #251, #254, #260)
  • use 32 random bytes instead of blockchain address for entropy (#250, #259)
  • validate and store all identity keys instead of the first one (#234, [#237], #242)
  • validate document upon creation (#255)
  • hash methods responds with Buffer (#249)
  • introduce a BLS identity key type (#239)
  • add revision property to identity (#235)
  • isEnabled property removed from Identity Public Key #236

BREAKING CHANGES

  • Node.JS 10 and lower are not supported
  • data models use Buffers instead of strings for binary fields
  • serialize methods renamed to toBuffer
  • createFromSerialized methods renamed to createFromBuffer
  • StateRepository accept Identifier and Buffer instead of strings
  • identifiers like document, data contract and identity IDs are instances Identifier (compatible with Buffer)
  • contentEncoding keyword isn't supported anymore. Use byteArray: true with type: array to store binary data
  • Data Contract and Document entropy is now a random 32 bytes instead of blockchain address
  • identity and identity create transition can't contain duplicate public keys anymore
  • DocumentFactory#create throws an error if specified data is not valid
  • hash methods respond with Buffer instead of hex encoded string
  • ECDSA Public key (type 0) must be a 33 long byte array.
  • Identity's revision is required
  • Identity Public Key's isEnabled is not accepted
  • Data created or serialized by previous is incompatible

0.15.0 (2020-09-04)

Features

  • protocol versioning (#217)
  • document binary properties (#199, #211, #215, #218, #213)
  • handle unique and alias identities in DPNS data triggers (#201)
  • add data trigger condition to check allowing subdomain rules (#224, #228)
  • reject replace and delete actions for DPNS preorder document (#210)

Bug Fixes

  • empty where conditions were sent during unique indices validation (#222)
  • duplicate key error in case of unique index on optional fields (#230)
  • invalid arguments were submitted to search for parent domain (#226)
  • invalid where clause was sent, invalid query error was not handled by unique index validation method (#220)
  • undefined in data contract schema id (#209)
  • data contract fixture was not isolated properly (#207)
  • schema with key or id already exists (#203)

BREAKING CHANGES

  • protocolVersion property equals to 0 is required for all data structures
  • Document now awaits DataContract as a second argument in constructor
  • DocumentsBatchTransition now awaits DataContract as a second argument in constructor
  • a document compound unique index shouldn't contain both required and optional properties
  • a document with a compound unique index must contain all indexed properties or non of them
  • only second-level DPNS domain owner is allowed to create its subdomains
  • DPNS preorder document is immutable now. Modification and deletion of preorder are restricted.
  • getDocumentsFixture.dataContract is not available anymore
  • DPNS data trigger expect dashUniqueIdentityId and dashAliasIdentityId records, instead of oboslete dashIdentity

0.14.0 (2020-07-22)

Bug Fixes

  • missing indexed string property constraint validation (#196)
  • error when the indexed field has an undefined value (#194)
  • conflicting schema ids in AJV cache (#187)

Features

  • add createdAt and updatedAt timestamps to Document (#192)
  • disable unsupported JSON Schema conditions (#193)

Documentation

  • readme standard updates (#189)

BREAKING CHANGES

  • Indexed strings should have maxLength constraint not greater than 1024 chars
  • JSON Schema conditions (allOf, if, ...) are not allowed in Document JSON Schema

0.13.1 (2020-06-15)

Bug Fixes

  • conflicting schema ids in AJV cache (#187)

0.13.0 (2020-06-08)

Bug Fixes

  • document validation after validation the contract with the same id (#166)

Features

  • support documents from multiple contracts in Documents Batch Transition (#159)
  • add hash method to IdentityPublicKey (#170, #173)
  • StateRepository#fetchTransaction responses with verbose data (#169)
  • check asset lock transaction is confirmed (#168, #184)
  • introduce Identity Topup Transition (#167, #178, #180)
  • validate first identity public key uniqueness (#175)

Code Refactoring

  • rename LockTransaction to AssetLockTransaction (#177)

BREAKING CHANGES

  • the first public key in Identity should be unique
  • expect StateRepository#fetchTransaction to respond with verbose transaction

0.12.1 (2020-04-22)

Bug Fixes

  • data trigger should accept document transition (#164)

0.12.0 (2020-04-17)

Bug Fixes

  • do not allow to change ownerId and entropy (bff5807)
  • json schema for signaturePublicKeyId (#161)
  • wrong entropy size (#157)
  • data contract definitions might be null or undefined (#153)
  • identity existence validation in data contract structure validation (#149)
  • state transition signature validation in data contract structure validation (#150)

Code Refactoring

  • rename $rev to $revision (#140)
  • rename userId to ownerId (b9a5e83)
  • remove type from Identity (227dc4d)
  • remove version from Data Contract (f856ecc)
  • rename $ownerId to ownerId in Data Contract (#160)
  • rename $contractId to $dataContractId in Document (158)
  • split document model and it's state transitions (#126, #156)
  • store document ID as a part of the document (3d10a01)
  • Data Contract Create Transition now accepts raw data (#136)
  • start types and indices from 0 instead of 1 (#155)
  • put JSON Schemas into order (#135)

Features

  • implement apply state transition function (#138, #139, #142, #141, #147, #143)
  • generate Data Contract ID from ownerId and entropy (4c0dae1)
  • introduce balance to Identities (#137, b13a9bb, #146)
  • validate ST size is less than 16 Kb (ff7aa51, 70c3c54)
  • validate state transition fee (48c9fda, #145, 0cb1d6f)
  • create Identity factory now accepts locked out point and public keys (#151)
  • getDataContractFixture accepts ownerId (#148)
  • implement create identity create transition factory (#152)
  • introduce signByPrivateKey and verifySignatureByPublicKey methods to ST (4eb5cdc)
  • verbose invalid data errors (#134)

BREAKING CHANGES

  • Data Contract ID is ownerId + entropy. You don't need to create an additional identity anymore.
  • Data Contract Create Transition now accepts raw data
  • size of serialized state transition must be less than 16 Kb
  • type removed from Identity due to Data Contract doesn't require it anymore
  • version removed from Data Contract
  • userId renamed to ownerId
  • Documents State Transition renamed to and it's structure is changed
  • applyStateTransition methods no longer a part of identity, data contract and document facades
  • renamed $rev field to $revision in raw document model
  • applyIdentityStateTransition is now asynchronous
  • Documents State Transition is now happening through separate state transition classes and renamed to Documents Batch Transition. Hence document class no longer have $action field. $action is now starting from 0. $entropy field is now a part of document create state transition. createStateTransition method of a document factory now accepts a map with actions as keys (create, replace, delete) and document arrays as values respectively.
  • create Identity factory accepts locked out point and public keys instead of ID and IndentityPublicKey
  • types and indices now starts from 0 instead of 1
  • Data Provider renamed to State Repository and store/remove functions introduced

0.11.1 (2020-03-17)

Bug Fixes

  • documents validate against wrong Data Contract (0db6e44)

0.11.0 (2020-03-09)

Bug Fixes

  • missing public key during ST signature validation (667402d)
  • add npmignore (c2e5f5d)
  • prevent to update dependencies with major version 0 to minor versions (ea7de93)

Features

  • catch decode errors and rethrow consensus error (892be82)
  • limit data contract schema max depth (f78df33)
  • limit serialized Data Contract size to 15Kb (7c95197)
  • remove Data Contract restriction option (0edd6ff)
  • validate documents JSON Schemas during data contract validation (d88817d)
  • ensure maxItems with uniqueItems for large non-scalar arrays (3364325)
  • ensure maxLength in case of pattern or format (297c754)
  • ensure all arrays items are defined (43d7b8f)
  • ensure all object properties are defined (d9f71df)
  • limit number of allowed indices (5adff5d)
  • validateData method accept raw data too (e72a627)
  • prevent of defining propertyNames (c40663f)
  • prevent of defining remote $ref (34bdb3f)
  • prevent of using default keyword in Data Contract (7629878)
  • throw error if 16Kb reached for payload in encode function (c6aba8b)
  • accept JsonSchemaValidator as an option (ee1bb0f)

BREAKING CHANGES

  • Data Contract schema max depth is now limited by 500
  • Serialized Data Contract size is now limited to 15Kb
  • validate, createFromSerialized, createFromObject methods of Data Contract Factory are now async
  • items and additionalItems are required for arrays
  • properties and additionalProperties are required for objects
  • number of indices limited to 10
  • number of unique indices limited to 3
  • number of properties in an index limited to 10
  • required maxItems with uniqueItems for large non-scalar arrays
  • required maxLength in case of pattern or format
  • propertyNames keyword is restricted in document schema
  • default keyword is restricted in Data Contract
  • encode function throws error if payload is bigger than 16Kb