This modifies DecodeAddressV0 to reject any attempts to decode strings
that are larger than the max possible size early since there is no
reason to waste time and memory doing the base 58 decode when it is
guaranteed to be invalid anyway.
It also adds an associated test to ensure proper functionality.
This modifies the code to use the opcode definitions in txscript now
that the previous cyclic dependency no longer applies since txscript no
longer depends on stdaddr.
This updates the index subscriber catchup function to update
subscriptions directly with notification instead of going through the
Run lifecycle process which avoids a case of receiving out of sync
index notifications while catch up is in progress.
Multiple typos in error type tests and review issues have also been
fixed in this commit.
An address is conceptually a human-readable string encoding of a
payment script, so the two methods String and PaymentScript should be
sufficient to provide basic address functionality. This also avoids
some stutter/repetition (e.g. ma.Address().Address()) in wallet code,
where wrapper types are used around the Address interface, and
additionally allows the wrapper types to implement the stdaddr.Address
interface directly while still providing their own Address method to
return the underlying interface type.
This modifies the RewardCommitmentScript method of the StakeAddress
interface to accept the vote and revoke fee limits separately instead of
expecting the caller to have already encoded it properly.
This simplifies the creation of the reward commitment script since there
is not currently any other method available anywhere to independently
encode the limits properly and it is not a particularly trivial
encoding.
Finally, the tests and example are updated accordingly.
This moves the new stdaddr package from the internal staging area to the
txscript module and updates the relevant paths and package README.md
accordingly.