mangrove.js icon indicating copy to clipboard operation
mangrove.js copied to clipboard

Uniform returned values for API functions that produce tx (comments welcome)

Open jkrivine opened this issue 3 years ago • 8 comments

Proposal, all API functions that produce a signed transaction should return immediately with a record of the form: {ret:Promise<human readable returned values>, receipt: Promise<ethers.TransactionResponse>}

Usage would be something like:

const {ret:values} = (await) api.f(...);
const {x:number, y: boolean} = await values;

jkrivine avatar Jan 26 '22 16:01 jkrivine