[bisq-network/bisq] List Ndau (XND) (#3110)

Peter Goodspeed-Niklaus notifications at github.com
Mon Oct 14 10:51:26 UTC 2019


coriolinus commented on this pull request.



> +import bisq.asset.AddressValidationResult;
+import bisq.asset.AddressValidator;
+import bisq.asset.Coin;
+import bisq.asset.RegexAddressValidator;
+
+
+public class Ndau extends Coin {
+
+    // note: ndau addresses contain an internal checksum which was deemed too complicated to include here.
+    // this regex performs superficial validation, but there is a large space of addresses marked valid
+    // by this regex which are not in fact valid ndau addresses. For actual ndau address validation,
+    // use the Address class in github.com/oneiro-ndev/ndauj (java) or github.com/oneiro-ndev/ndaumath/pkg/address (go).
+    private static AddressValidator validator = new RegexAddressValidator("nd[anexbm][abcdefghijkmnpqrstuvwxyz23456789]{45}");
+
+    public Ndau() {
+        super("ndau", "XND", Ndau.validator, Network.MAINNET);

Stet: style guide rules for this asset mandate lowercase usage. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3110#discussion_r334424181
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191014/c5783e21/attachment.html>


More information about the bisq-github mailing list