2 Commits

Author SHA1 Message Date
Julian Strobl
3fe9c018cd
Introduce Liquid network parameters (#64)
Up to know we just use the Bitcoin mainnet parameters
`chaincfg.MainNetParams` for Liquid. That's okay, because we use them
for creating and verifying extended private and public keys. Those only
depend on `HDPrivateKeyID` and `HDPublicKeyID`, which are the same for
Bitcoin and Liquid networks.

The only real difference is the `HDCoinType` used for key derivation,
which we want to use in the future. So it is a good idea to introduce
this value now.

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-08-11 12:05:58 +02:00
Julian Strobl
1383d0aaa6
Add extended public key as IssuerPlanetmint (#62)
* Fix package and domain name

Signed-off-by: Julian Strobl <jmastr@mailbox.org>

* Add extended public key as `IssuerPlanetmint`

This patch introduces parts of the `chaincfg` for Planetmint and
especially the magic bytes that produces extended keys with the prefix
`pmpr` for a Planetmint extended private key and `pmpb` for a Planetmint
extended public key.

// Closes https://github.com/rddl-network/issues/issues/30

Signed-off-by: Julian Strobl <jmastr@mailbox.org>

* Validate Planetmint extended public key during machine attestation

Signed-off-by: Julian Strobl <jmastr@mailbox.org>

* [lint] Fix error return value is not checked

Signed-off-by: Julian Strobl <jmastr@mailbox.org>

---------

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-08-11 09:14:52 +02:00