sarvalabs / js-moi-sdk

JavaScript library to interact with MOI Protocol via RPC API

Home Page:https://js-moi-sdk.docs.moi.technology/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Encode/Decode Argument and Returned Values

sarvalabs-harshrastogi opened this issue · comments

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.