Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Adjusting types to not require data in action from nodeos response #924

Merged
merged 6 commits into from
May 17, 2021

Conversation

bradlhart
Copy link
Contributor

@bradlhart bradlhart commented Apr 29, 2021

Change Description

Following a change on nodeos, the transaction objects returned from nodeos could possibly not include data variable in the action objects. The organization of the types was adjusted to clarify that there is a Transaction object that is sent to nodeos that includes the data variable, whereas a Transaction object returned from nodeos might not include the data variable.

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

New types will be automatically generated and added to documentation when the documentation is published. No new written documentation in this specific PR.

@venu-block1
Copy link

I'm not quite sure I follow why the exporting of interfaces is moved from api-interfaces to rpc-interfaces.

@bradlhart
Copy link
Contributor Author

I'm not quite sure I follow why the exporting of interfaces is moved from api-interfaces to rpc-interfaces.

The reason why I moved these types is simply because the eosjs-api-interfaces.ts should include interfaces for using the API object (there's a transaction here for sending to nodeos), whereas the eosjs-rpc-interfaces.ts includes interfaces coming from nodeos through the api plugins (the transaction coming from nodeos).

@venu-block1
Copy link

venu-block1 commented May 7, 2021

My understanding is that the two interfaces are distinguished by their utility, and not by the direction of message flow. Api interface is for transacting (there can be messages in both directions for transacting), and Rpc interface is for fetching state information (message flow from chain to user). So, both interfaces can have transaction related message flow from chain to the user depending on the utility.

@venu-block1
Copy link

As we have new interfaces in eosjs-rpc-interfaces.ts, the documentation needs to be updated. Please check "Documentation Additions" and notify devrel.

@bradlhart bradlhart merged commit 82f1a1e into develop May 17, 2021
@bradlhart bradlhart deleted the optional_returned_data branch May 17, 2021 19:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants