sarvalabs / js-moi-sdk

JavaScript library to interact with MOI Protocol via RPC API
https://js-moi-sdk.docs.moi.technology/
Apache License 2.0
24 stars 2 forks source link

Encode/Decode Argument and Returned Values #62

Closed sarvalabs-harshrastogi closed 1 month ago

sarvalabs-harshrastogi commented 7 months ago

Encode/Decode Argument and Returned Values

Description

Currently, the SDK lacks functionality to encode arguments and decode returned values for methods of type routine or deployers. This limitation restricts developers from seamlessly passing raw arguments and receiving decoded responses.

Proposed Solution

To address this issue, we propose exposing a set of APIs within the SDK that would enable developers to pass raw arguments. The SDK should then be capable of polarizing (encoding) the arguments and depolarizing (decoding) the returned values based on the provided manifest.

This enhancement would streamline the development workflow by allowing developers to interact with the SDK using raw data formats, eliminating the need for manual encoding and decoding steps. The SDK would handle the necessary transformations transparently, ensuring compatibility with the underlying system and improving the overall developer experience.

sarvalabs-harshrastogi commented 1 month ago

closed #81