# Altcoin params headers format

**URL:** <https://bisq.community/t/altcoin-params-headers-format/2758>\
**Category:** Development\
**Created:** [August 25, 2017, 12:39am UTC](https://bisq.community/t/altcoin-params-headers-format/2758 "2017-08-25T00:39:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![smrtz](https://bisq.community/letter_avatar/smrtz/32/6_22734026db12803ebb3e059622ac3534.png) [@smrtz](https://bisq.community/u/smrtz)\
**Post date:** [August 25, 2017, 12:39am UTC](https://bisq.community/t/altcoin-params-headers-format/2758/1 "2017-08-25T00:39:54Z")

</div>

Apologies if this belongs in the Altcoin section. Just let me know and I’ll move it.

Hey guys! I’m working on getting a submission ready for ZenCash support, and I’ve got everything together except fort the pull request. I’ve got it compiling, but it’s failing the test cases…

I’m using `Address.fromBase58` to decode and verify the `input` object, and I’ve created the `.../params/ZenCashParams.java` file. I’m pretty sure it’s failing because I’ve set `addressHeader` and `p2shHeader` incorrectly. Our coin uses several prefixes for both types of addresses, “zn” and “t1” for normal, and “zs” and “t3” for multisig, so I’ve created two new `int`s and added them all to the `acceptableAddressCodes` array. The `int`s are the the prefix in hex form converted to decimal and then concatenated together:

```auto
public ZenCashParams() {
    super();
    addressHeader = 32137; // "zn"(0x20,0x89)
    int addressHeadeOld = 28184; // "t1"(0x1C,0xB8)
    p2shHeader = 31150; // "zs"(0x20,0x96)
    int p2shHeaderOld = 28189; // "t3"(0x1C,0xBD)
    acceptableAddressCodes = new int[]{addressHeader, addressHeaderOld, p2shHeader, p2shHeaderOld};

```

Is this the proper approach for handling multiple header options, and am I converting them properly?

Thanks!

---

<div class="post-metadata">

**Author:** ![smrtz](https://bisq.community/letter_avatar/smrtz/32/6_22734026db12803ebb3e059622ac3534.png) [@smrtz](https://bisq.community/u/smrtz)\
**Post date:** [August 28, 2017, 11:37pm UTC](https://bisq.community/t/altcoin-params-headers-format/2758/2 "2017-08-28T23:37:50Z")

</div>

It looks like the problem is that Address constructor expects that the address version is only one byte? I’ll switch to Bse58.decodeChecked(encoded);.

---

<div class="post-metadata">

**Author:** ![smrtz](https://bisq.community/letter_avatar/smrtz/32/6_22734026db12803ebb3e059622ac3534.png) [@smrtz](https://bisq.community/u/smrtz)\
**Post date:** [September 4, 2017, 11:25pm UTC](https://bisq.community/t/altcoin-params-headers-format/2758/3 "2017-09-04T23:25:27Z")

</div>

Flagging this post for closure since I was able to figure it out. Our fork now builds and passes all the test cases:

> <https://github.com/bisq-network/bisq/pull/916>

---

<div class="post-metadata">

**Author:** ![alexej996](https://bisq.community/user_avatar/bisq.community/alexej996/32/491_2.png) [@alexej996](https://bisq.community/u/alexej996)\
**Post date:** [September 5, 2017, 9:37am UTC](https://bisq.community/t/altcoin-params-headers-format/2758/4 "2017-09-05T09:37:24Z")

</div>


