diff --git a/internal/crypto/constants.go b/internal/crypto/constants.go new file mode 100644 index 0000000..1aeb486 --- /dev/null +++ b/internal/crypto/constants.go @@ -0,0 +1,9 @@ +package crypto + +const ( + HashSize = 32 + BandersnatchSize = 32 + Ed25519PublicSize = 32 + Ed25519PrivateSize = 64 + BLSSize = 144 +) diff --git a/internal/crypto/hash.go b/internal/crypto/hash.go new file mode 100644 index 0000000..e519686 --- /dev/null +++ b/internal/crypto/hash.go @@ -0,0 +1,3 @@ +package crypto + +type Hash [HashSize]byte diff --git a/internal/crypto/keys.go b/internal/crypto/keys.go new file mode 100644 index 0000000..27cc119 --- /dev/null +++ b/internal/crypto/keys.go @@ -0,0 +1,8 @@ +package crypto + +import ( + "crypto/ed25519" +) + +type Ed25519PublicKey ed25519.PublicKey +type Ed25519PrivateKey ed25519.PrivateKey diff --git a/internal/state/state.go b/internal/state/state.go new file mode 100644 index 0000000..a268c97 --- /dev/null +++ b/internal/state/state.go @@ -0,0 +1,4 @@ +package state + +type State struct { +} diff --git a/internal/time/constants.go b/internal/time/constants.go new file mode 100644 index 0000000..186c1e8 --- /dev/null +++ b/internal/time/constants.go @@ -0,0 +1,9 @@ +package time + +import "time" + +const ( + TimeslotsPerEpoch = 600 + TimeslotDuration = 6 * time.Second + EpochDuration = TimeslotsPerEpoch * TimeslotDuration +) diff --git a/internal/time/epoch.go b/internal/time/epoch.go new file mode 100644 index 0000000..9dc60b0 --- /dev/null +++ b/internal/time/epoch.go @@ -0,0 +1,3 @@ +package time + +type Epoch uint32 diff --git a/internal/time/timeslot.go b/internal/time/timeslot.go new file mode 100644 index 0000000..2b3b77e --- /dev/null +++ b/internal/time/timeslot.go @@ -0,0 +1,3 @@ +package time + +type Timeslot uint32