You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var address = "unixuHLc4UoAjwLpkQHUWy2NpT5LV4tUqJFnFVNyLaeqBfq22";
var publicKey = Utils.GetPublicKeyFrom(address);
var value = new U256();
int p = 0;
value.Decode(publicKey.Reverse().ToArray(), ref p);
Console.WriteLine(value.Value); // -26843990603843339315797176730311565364345939525783601353920003531657203886725
U256 should never be negative.
The text was updated successfully, but these errors were encountered:
NetStandard 2.0 doesn't support the isUnsigned option. The trade-off is to mimic a larger array to achieve a BigInteger with the most significant bit not set. However, this leads to an inconsistency between the BigInteger value and the byte representation.
I'm unsure if we should address this, as the use case seems quite constructed and likely irrelevant.
* fixed wrong indexing bitseq
updated nodetest to allow specific rpcs
* Reverse and FromBitString and ToBitString moved to static utils.
* fixed comment
* fixed comment
* fixed for versions bigger then NET2.0 #97
* added the negative number test
* next release
* removed old enum extension from usage
U256 should never be negative.
The text was updated successfully, but these errors were encountered: