[Cashtab] [Chronik] [Tx Gen] Token transaction refactor - part 1 createToken
Summary:
T2503
Refactor the createToken function to utilize the newly landed generateTxInput & generateTxOutput utility functions, as well as the new approach of signing input UTXOs, building tx and broadcasting via the chronik client.
At this point in the diff avoid burning tokens because that's still being broadcasted via bch-api, which will confuse chronik and result in 'Invalid SLP burns' errors when trying to create another token.
Test Plan:
npm test and ensure the chronikfied unit tests all pass
npm start
create a new token with no image and ensure successful creation (check decimals, supply...) and able to be sent
verify via explorer that the XEC change (if exists) is returned to the creator
create a new token with an image and ensure successful creation (check decimals, supply...) and able to be sent
Reviewers: bytesofman, #bitcoin_abc
Reviewed By: bytesofman, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D12299