2022-04-13 16:41:48 +00:00
|
|
|
import pkg/chronos
|
|
|
|
import pkg/stint
|
|
|
|
import pkg/upraises
|
|
|
|
import ./periods
|
2022-08-17 02:29:44 +00:00
|
|
|
from ../../contracts/requests import SlotId, RequestId
|
2022-04-13 16:41:48 +00:00
|
|
|
|
|
|
|
export chronos
|
|
|
|
export stint
|
|
|
|
export periods
|
2022-08-17 02:29:44 +00:00
|
|
|
export SlotId, RequestId
|
2022-04-13 16:41:48 +00:00
|
|
|
|
|
|
|
type
|
|
|
|
Proofs* = ref object of RootObj
|
|
|
|
Subscription* = ref object of RootObj
|
2022-08-17 02:29:44 +00:00
|
|
|
OnProofSubmitted* = proc(id: SlotId, proof: seq[byte]) {.gcsafe, upraises:[].}
|
2022-04-13 16:41:48 +00:00
|
|
|
|
|
|
|
method periodicity*(proofs: Proofs):
|
|
|
|
Future[Periodicity] {.base, async.} =
|
|
|
|
raiseAssert("not implemented")
|
|
|
|
|
|
|
|
method isProofRequired*(proofs: Proofs,
|
2022-08-17 02:29:44 +00:00
|
|
|
id: SlotId): Future[bool] {.base, async.} =
|
2022-04-13 16:41:48 +00:00
|
|
|
raiseAssert("not implemented")
|
|
|
|
|
|
|
|
method willProofBeRequired*(proofs: Proofs,
|
2022-08-17 02:29:44 +00:00
|
|
|
id: SlotId): Future[bool] {.base, async.} =
|
2022-04-13 16:41:48 +00:00
|
|
|
raiseAssert("not implemented")
|
|
|
|
|
|
|
|
method getProofEnd*(proofs: Proofs,
|
2022-08-17 02:29:44 +00:00
|
|
|
id: SlotId): Future[UInt256] {.base, async.} =
|
2022-04-13 16:41:48 +00:00
|
|
|
raiseAssert("not implemented")
|
|
|
|
|
|
|
|
method submitProof*(proofs: Proofs,
|
2022-08-17 02:29:44 +00:00
|
|
|
id: SlotId,
|
2022-04-13 16:41:48 +00:00
|
|
|
proof: seq[byte]) {.base, async.} =
|
|
|
|
raiseAssert("not implemented")
|
|
|
|
|
|
|
|
method subscribeProofSubmission*(proofs: Proofs,
|
|
|
|
callback: OnProofSubmitted):
|
|
|
|
Future[Subscription] {.base, async.} =
|
|
|
|
raiseAssert("not implemented")
|
|
|
|
|
|
|
|
method unsubscribe*(subscription: Subscription) {.base, async, upraises:[].} =
|
|
|
|
raiseAssert("not implemented")
|