2022-07-20 05:45:07 +00:00
|
|
|
# Constants
|
|
|
|
|
|
|
|
### Types
|
|
|
|
|
|
|
|
These are the list of types used to represent various properties within the
|
|
|
|
protocol.
|
|
|
|
|
2023-01-05 03:52:41 +00:00
|
|
|
| Alias | Type |
|
|
|
|
|------------------------|--------------------------------|
|
|
|
|
| Amount | u64 |
|
|
|
|
| Coin | u32 |
|
|
|
|
| Session | u32 |
|
|
|
|
| Validator Set Index | u16 |
|
|
|
|
| Validator Set Instance | (Session, Validator Set Index) |
|
|
|
|
| Key | Vec\<u8> |
|
2022-07-20 05:45:07 +00:00
|
|
|
|
|
|
|
### Networks
|
|
|
|
|
2023-01-05 03:52:41 +00:00
|
|
|
Every network connected to Serai operates over a specific curve. The processor
|
|
|
|
generates a distinct set of keys per network. Beyond the key-generation itself
|
|
|
|
being isolated, the generated keys are further bound to their respective
|
|
|
|
networks via an additive offset created by hashing the network's name (among
|
|
|
|
other properties). The network's key is used for all coins on that network.
|
2022-07-20 05:45:07 +00:00
|
|
|
|
2022-07-20 06:56:58 +00:00
|
|
|
Networks are not acknowledged by the Serai network, solely by the processor.
|
|
|
|
|
2023-01-05 03:52:41 +00:00
|
|
|
| Network | Curve |
|
|
|
|
|----------|-----------|
|
|
|
|
| Bitcoin | Secp256k1 |
|
|
|
|
| Ethereum | Secp256k1 |
|
|
|
|
| Monero | Ed25519 |
|
2022-07-20 05:45:07 +00:00
|
|
|
|
|
|
|
### Coins
|
|
|
|
|
|
|
|
Coins exist over a network and have a distinct integer ID.
|
|
|
|
|
2022-07-20 06:56:58 +00:00
|
|
|
| Coin | Network | ID |
|
|
|
|
|----------|----------|----|
|
|
|
|
| Bitcoin | Bitcoin | 0 |
|
2023-01-05 03:52:41 +00:00
|
|
|
| Ether | Ethereum | 1 |
|
|
|
|
| DAI | Ethereum | 2 |
|
|
|
|
| Monero | Monero | 3 |
|