mirror of
https://github.com/status-im/nim-codex.git
synced 2025-02-10 09:46:38 +00:00
- rename `ContractId` to `SlotId` - rename `Proving.contracts` to `Proving.slots` - change signatures of `isSlotCancelled` and `isCancelled` to use `SlotId` and `RequestId` types, respectively. - change all references to `RequestId`, `SlotId`
53 lines
1.6 KiB
Nim
53 lines
1.6 KiB
Nim
import pkg/chronos
|
|
import pkg/stint
|
|
import pkg/upraises
|
|
import ./periods
|
|
import ../../contracts/requests
|
|
|
|
export chronos
|
|
export stint
|
|
export periods
|
|
export requests
|
|
|
|
type
|
|
Proofs* = ref object of RootObj
|
|
Subscription* = ref object of RootObj
|
|
OnProofSubmitted* = proc(id: SlotId, proof: seq[byte]) {.gcsafe, upraises:[].}
|
|
|
|
method periodicity*(proofs: Proofs):
|
|
Future[Periodicity] {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method isSlotCancelled*(proofs: Proofs,
|
|
id: SlotId): Future[bool] {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method isCancelled*(proofs: Proofs,
|
|
id: RequestId): Future[bool] {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method isProofRequired*(proofs: Proofs,
|
|
id: SlotId): Future[bool] {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method willProofBeRequired*(proofs: Proofs,
|
|
id: SlotId): Future[bool] {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method getProofEnd*(proofs: Proofs,
|
|
id: SlotId): Future[UInt256] {.base, async.} =
|
|
raiseAssert("not implemented")
|
|
|
|
method submitProof*(proofs: Proofs,
|
|
id: SlotId,
|
|
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")
|