Open DenisCarriere opened 1 year ago
Adding a few notes here on how we'll probably handle this, since it's the only issue open related to multiple methods of pushing transactions.
What we'll probably need is some sort of optional BroadcastPlugin
, with a default being loaded in so the current experience doesn't change at all. Optionally, developers could specify a new plugin that modifies the behavior of how transactions are broadcast. These plugins would allow the use of send_transaction2
or any future broadcasting endpoint, or potentially the ability to do failover or broadcast mirroring to multiple endpoints at the same time.
The BroadcastPlugin
interface will need to be defined, taking in a signed transaction and then returning a standardized response from the API to indicate success/failure, along with error handling
Allow Wharfkit session to use
send_transaction2
(push retry functionality)params:
retry_trx
: trueretry_trx_num_blocks
: numberCurrently using
send_transaction
https://github.com/wharfkit/session/blob/9e8512d2a35bf4eb657f150fa72da7d60c55654c/src/session.ts#L470send_transaction2
included in EOSIO core library https://github.com/greymass/eosio-core/blob/1de041c7824bfc472e23806eee5452182d711f1c/src/api/v1/chain.ts#L161