hyperledger / iroha-javascript

JavaScript library for Iroha, a Distributed Ledger Technology (blockchain) platform.
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
94 stars 64 forks source link

Integrate supplementary Protocol Buffers (protobuf) parameters into the JS client to augment the extensibility and functionality of the data model within the designated oneof constructs, ensuring a more comprehensive representation and utilization of transaction related information #185

Open baziorek opened 4 months ago

baziorek commented 4 months ago

This is PR with changes from: https://github.com/hyperledger/iroha-javascript/pull/181

Incorporate additional Protocol Buffers (protobuf) parameters into the JS client, enhancing the extensibility and functionality of the data model within the specified 'oneof' constructs. This integration ensures a more comprehensive representation and utilization of transaction-related information, thereby expanding the capabilities and flexibility of the system.

Those changes are connected with: https://github.com/hyperledger/iroha/pull/4003 - this is part of internship project: https://wiki.hyperledger.org/pages/viewpage.action?pageId=80778614

baziorek commented 4 months ago

This code should be tested by somebody who knows TypedScript (or rather is fluent with TypedScript). There should be made similar steps as for iroha-python: https://github.com/hyperledger/iroha-python/pull/157#issuecomment-1925711836

  1. First of all server must be running. Here is instruction how to build its by its own: https://wiki.hyperledger.org/pages/viewpage.action?pageId=98731447 (official docker images are quite old, but required changes are new)
  2. The library from the branch should be installed git clone https://github.com/baziorek/iroha-javascript.git -b baziorek:proto_from_tomasz (not from official package repository)
  3. Then client must be prepared:
    1. Here is example code: https://github.com/hyperledger/iroha-javascript/blob/main/example/index.ts
    2. In the code we need only: 2 commands: https://iroha.readthedocs.io/en/main/develop/api/commands.html#add-asset-quantity and https://iroha.readthedocs.io/en/main/develop/api/commands.html#subtract-asset-quantity (they are not used in example), but with extra parameter "description". The next thing is to query transactions (it is in the example): https://github.com/baziorek/iroha-javascript/blob/968bd48c87de614da9a50b6b86dc839b274ce9a7/example/index.ts#L94
  4. If we see that newly introduced parameter "description" is available - it means that the PR is correct and can be merged.