the api object is filled with auto-generated methods.
It makes some sense once you've learnt the details but is not that great when you haven't.
api.query - reads from storage
api.tx - makes a transaction
api.derive - generally compound queries, could do anything read/write
api.rpc - generally triggers calculations + reads on node side, can also do things like test run a contract, set local node session keys
We could look to group & present these in a nicer way to the user.
Might allow us some affordance to breaking changes also if the underlying generated api changes
cc @Amy-Centrality
the
apiobject is filled with auto-generated methods.It makes some sense once you've learnt the details but is not that great when you haven't.
api.query- reads from storageapi.tx- makes a transactionapi.derive- generally compound queries, could do anything read/writeapi.rpc- generally triggers calculations + reads on node side, can also do things like test run a contract, set local node session keysWe could look to group & present these in a nicer way to the user.
Might allow us some affordance to breaking changes also if the underlying generated api changes
cc @Amy-Centrality