REST client for Deon Digital CSL service


1821.0.05 months ago3 years agoMinified + gzip package size for @deondigital/api-client in KB


Build Status

REST client for Deon Digital's API


21.0.0 - 2021-05-28

  • Added types for ReifiedPattern.

20.0.0 - 2021-04-09

  • Added InstantiationDetails.entryPoint and InstantiationDetails.argument fields.
  • Added EventPredicate.eventName field.
  • Add warnings to BadRequestError.
  • Added support for the CordaContract data type.
  • Renamed the ExternalObject.mkContract function to ExternalObject.mkStringContract.
  • Added novateContract command for contracts.

19.0.0 - 2021-02-17

  • Renamed the DateTime CSL type to Instant.
  • Added support for new date/time types.
  • Added description and termination time as parameters to termination command.
  • Changed declarationExpressionArguments to declarationExpressionArgument. It is now a single value instead of a list of values.
  • Moved instantiationTime into instantiationDetails in the Contract interface.

18.0.0 - 2021-01-20

  • Added support to expose entrypoint signatures.
  • Added unitName field to GuardError to indicate which file a guard error occurred in when using multi-file projects.
  • Added a terminate command, which disallows applying further events on a contract.
  • Added support for contract entrypoint.

17.1.0 - 2020-11-05

  • Add support for CSL contract lambdas.

17.0.0 - 2020-10-16

  • Parameterize Case over type of body.
  • Added endpoint for /csl/ontology.
  • Added support for the unit type, represented as the empty tuple.

16.1.0 - 2020-09-10

  • Added support for CSL's built-in Set type.
  • Added support for retrieving and working with residual contracts.
  • Added support for warnings from the type checker.
  • Fix bug where refresh is needed after instantiating a contract, by correcting the ContractUpdate type.

16.0.1 - 2020-05-28

  • Fix bug in representation of ExternalObject.CordaAgent.

16.0.0 - 2020-05-20

  • The API is now split up into two parts: an anonymous API that does not require authentication and an identified API that does. The "authentication" is for now just a header that states which of the known identities of the ledger backed that performs a given request.

15.0.0 - 2020-05-07

  • Removed the ContractApi.tree endpoint and ContractTree type.
  • Introduced the ExternalObject.CordaAgent type for handling agent types coming from Corda backends
  • Renamed mkAgentValue and ExternalObject.mkAgent to mkStringAgentValue and ExternalObject.mkStringAgent respectively to closer match the generated object.

14.2.0 - 2020-04-15

  • The Duration type is now a class with equals and hashCode methods. This makes it possible to use it with the containers in immutable-js.

14.1.2 - 2020-03-27

  • Aligned error codes with current version of the API webservice.

14.1.1 - 2020-03-09

  • Tags are now always returned when applying events.

14.1.0 - 2020-02-21

  • Support for built-in CSL Map type.

14.0.0 - 2020-02-10

  • Added the function reportWithName in the DeclarationsApi for calling the new endpoint /declarations/${id}/namedReport.
  • Added types for Exp, Type, and AgentMatcher. Updated EventPredicate to use these types.

13.0.0 - 2020-01-28

  • The functions for calling reports, report and reportOnContract, have been moved to the DeclarationsApi. The latter has been renamed reportOnDeclaration and now takes a declaration id instead of a contract id.
  • The Contract interface now contains the list of participants that the contract was instantiated with.
  • The peers field in InstantiationInput is now an ExternalObject.
  • The field peers has been removed from the NodeInfoOutput interface.

12.2.0 - 2020-01-09

  • Add CallError, CSLError, and SerializationError to possible CheckError types.
  • Handle the more structured BadRequestError from Deon API v0.53.0.
  • Correct the Duration validation logic to match the intended format. Now supports PnDTnHnMnS instead of PnYnMnDTnHnMnS, to follow the duration libraries in Java and Haskell.

12.0.0 - 2019-10-18

  • Remove Pseudo and replace it with ExternalObject which is equivalent except that it doesn't require the specification of "bound names".
  • Change ContractId to Contract everywhere for consistency with Agent.
  • Remove ContractIdentifier and AgentIdentifier. Where type safety is wanted, use ExternalObject.StringContract and ExternalObject.StringAgent.

11.0.0 - 2019-09-27

  • Remove InstantiationArgument and SelfContractId as this is not supported with the removal of getEvents.

10.3.0 - 2019-08-05

  • Added Contracts.getEvents for the new GET /contracts/{id}/events endpoint.

10.2.0 - 2019-05-24

  • Removed support for database values as they were removed from the query language.

10.1.0 - 2019-05-15

  • Added support for the database values used in the new query language.

10.0.0 - 2019-02-25

  • Improved error handling for CslApi.check and CslApi.checkExpression.
  • Changed the representation of floating point values to be string rather than number. With version v0.35.0 of the server we use decimal128 rather than binary64 for floating point numbers, and decimal128 cannot be represented in a TypeScript number.

9.0.0 - 2019-02-25

  • Use new data model for CheckError from Deon API v0.29.0.

8.0.0 - 2019-02-19

  • API change for DeonRestClient constructor: hook now has type (r: Promise<Response>) => Promise<Response> and can catch rejected promises.

7.0.0 - 2019-01-03

  • AgentValue now has a proper AgentIdentifier instead of a string.

6.1.1 - 2018-12-20

  • Corrected error when publishing npm package

6.1.0 - 2018-12-20

  • Added TupleValue that handles tupled-values in CSL.

6.0.0 - 2018-11-29

  • Breaking: Signed is now generic since its CSL type is polymorphic.

5.0.0 - 2018-11-21

  • Breaking: PseudoValues now take string as boundName instead of QualifiedName.

4.0.0 - 2018-10-29

  • Breaking: Use new PseudoValue constructor to represent pseudo-syntactic values.

3.5.1 - 2018-10-25

  • Fixed a bug when (de)serializing elliptic curve names.

3.5.0 - 2018-10-12

  • Added SignedValue and PublicKeyValue that models signed data. There are also functions to construct such values using OpenSSL generated keys in the PEM format.

3.4.0 - 2018-10-04

  • Added a ContractIdValue that holds information about instantiated contracts. This value is returned from POST /contracts.

3.3.0 - 2018-09-21

  • Add support for SelfContractId instantiation argument, which resolves to the id of the contract that is being instantiated. Requires Deon API version 0.22.0.
  • Added mock versions of the APIs to assist in testing with mocking frameworks.

3.2.0 - 2018-08-30

  • Expose ISO8601 duration parsing functionality.
  • Support for duration primitive datatype.
  • (Note: Requires Deon-api version 0.22.0) Introduced a NodeInfo.getAgents() that wraps the api call /agents, to request agent values from the back end.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.