Use an enum for Coin/NetworkId

It originally wasn't an enum so software which had yet to update before an
integration wouldn't error (as now enums are strictly typed). The strict typing
is preferable though.
This commit is contained in:
Luke Parker
2023-04-18 02:01:53 -04:00
parent 6f3b5f4535
commit 9da0eb69c7
15 changed files with 97 additions and 70 deletions

View File

@@ -28,9 +28,10 @@ other properties). The network's key is used for all coins on that network.
| Network | Curve | ID |
|----------|-----------|----|
| Bitcoin | Secp256k1 | 0 |
| Ethereum | Secp256k1 | 1 |
| Monero | Ed25519 | 2 |
| Serai | Ristretto | 0 |
| Bitcoin | Secp256k1 | 1 |
| Ethereum | Secp256k1 | 2 |
| Monero | Ed25519 | 3 |
### Coins