Add some default ESR options to the TransactContext
aaroncox opened this issue · comments
Every developer working with ESR payloads in a plugin shouldn't have to manually define these if they don't want:
We either need an easier way to create an ESR payload (a helper of some sort in the context) or to include those as a default so you can just pass them when creating an ESR object, like so:
const request = await SigningRequest.create(
{transaction: response.data.request[1]},
context.esrOptions
)
So will the context.esrOptions also house and allow overriding of the callback server (cb.anchor.link)?
Or that is going to be part of implementing the UI communication?
Yeah, that'll be a part of the UI communication, through the wallet plugins themselves.
ESR itself and the esrOptions
parameter above are just so that developers don't need to specify the encoding options: