mirror of
https://github.com/logos-storage/logos-storage-nim-validator.git
synced 2026-01-02 21:43:06 +00:00
43 lines
937 B
Nim
43 lines
937 B
Nim
import ./storagerequest
|
|
import ./period
|
|
|
|
type
|
|
StorageProofInput* = object
|
|
requestId: StorageRequestId
|
|
slotIndex: uint32
|
|
period: Period
|
|
merkleRoot: array[32, byte]
|
|
challenge: array[32, byte]
|
|
|
|
func init*(
|
|
_: type StorageProofInput,
|
|
requestId: StorageRequestId,
|
|
slotIndex: uint32,
|
|
period: Period,
|
|
merkleRoot: array[32, byte],
|
|
challenge: array[32, byte]
|
|
): StorageProofInput =
|
|
StorageProofInput(
|
|
requestId: requestId,
|
|
slotIndex: slotIndex,
|
|
period: period,
|
|
merkleRoot: merkleRoot,
|
|
challenge: challenge
|
|
)
|
|
|
|
func requestId*(input: StorageProofInput): StorageRequestId =
|
|
input.requestId
|
|
|
|
func slotIndex*(input: StorageProofInput): uint32 =
|
|
input.slotIndex
|
|
|
|
func period*(input: StorageProofInput): Period =
|
|
input.period
|
|
|
|
func merkleRoot*(input: StorageProofInput): array[32, byte] =
|
|
input.merkleRoot
|
|
|
|
func challenge*(input: StorageProofInput): array[32, byte] =
|
|
input.challenge
|
|
|