fabric-chaincode-node icon indicating copy to clipboard operation
fabric-chaincode-node copied to clipboard

Implement and test `getMultipleStates` method for Stub API.

Open ArunRawat404 opened this issue 5 months ago • 0 comments
trafficstars

Issue

#453

Description

This PR implements the getMultipleStates method to ChaincodeStub and includes the following updates:

  1. Implementation of getMultipleStates(...keys) method to retrieve multiple state values from the given keys.
  2. Handler support for this via handleGetMultipleStates and handleOneSendGetMultipleStates in handler.js.
  3. Unit tests for getMultipleStates to verify:
    • It returns correct results when keys are provided.
    • It returns an empty array when no keys are passed.
    • It throws on handler rejection.

This method mirrors functionality found in fabric-chaincode-go

ArunRawat404 avatar May 23 '25 18:05 ArunRawat404