Update libaries to support chainid swap
Motivation: In the upcoming HF, we will also be changing the chainid.
The chainid is hardcoded into the various libraries such as hive-js. This chainid is hashed into the signature of transactions broadcast to the network. This prevents a transaction from being accepted on a network with a different chainid (note that this probably isn't strictly necessary as such a transaction seemingly couldn't be replayed on a different network anyways due to TAPOS, where the transaction has to reference an existing blockhash in the chain in order to be considered valid).
But since the chainid IS hashed into the transaction signature, the API libraries that generate transactions will need to know when to "switch" from using the current chainid to the new one, in order to broadcast transactions that will be accepted after the HF takes effect that changes the chainid.
The hardfork doesn't necessarily take place at a specific time/block because the hardfork doesn't go into effect until a supermajority of the witnesses vote for the hardfork, but it's known that it will be after the specified hardfork time. So prior to this time, API libraries can use the "old" chainid. After this time, they will need to ask the API node for the current chainid each time before they generate a new transaction, so that they generate the proper signature.
For libraries that maintain persistent state across calls, they can be set to stop asking for the new chain id after they are told that the chain id has changed. For libraries without persistent state, they will need to continue asking for the new chain id, and such libraries should eventually be updated further to eliminate the call to get the chain id, after the chain id swap time.
For this task to be completed, a new issue should be created in each library and a checkbox should be included here for that library (to be checked when the library is updated). Please edit this issue to add any missing libraries that generate transactions.
Data that libraries need to know:
- chainid: 0xBEEAB0DE + 56 zeros
- earliest time for the hardfork: To be determined
The earliest time for the hardfork has not yet been set, but library maintainers can use dummy values for testing purposes.