nim-codex/codex/market.nim

51 lines
1.7 KiB
Nim
Raw Normal View History

2022-03-23 12:57:48 +00:00
import pkg/chronos
import pkg/upraises
2022-06-15 12:12:34 +00:00
import pkg/questionable
2022-03-23 12:57:48 +00:00
import ./contracts/requests
export chronos
2022-06-15 12:12:34 +00:00
export questionable
2022-03-23 12:57:48 +00:00
export requests
type
Market* = ref object of RootObj
2022-03-28 10:28:22 +00:00
Subscription* = ref object of RootObj
OnRequest* = proc(id: array[32, byte], ask: StorageAsk) {.gcsafe, upraises:[].}
OnFulfillment* = proc(requestId: array[32, byte]) {.gcsafe, upraises: [].}
2022-03-23 12:57:48 +00:00
2022-07-04 12:14:56 +00:00
method getSigner*(market: Market): Future[Address] {.base, async.} =
raiseAssert("not implemented")
method requestStorage*(market: Market,
request: StorageRequest):
Future[StorageRequest] {.base, async.} =
2022-03-23 12:57:48 +00:00
raiseAssert("not implemented")
2022-03-28 10:28:22 +00:00
2022-06-15 12:12:34 +00:00
method getRequest*(market: Market,
id: array[32, byte]):
Future[?StorageRequest] {.base, async.} =
raiseAssert("not implemented")
2022-07-04 10:11:18 +00:00
method getHost*(market: Market,
requestId: array[32, byte]): Future[?Address] {.base, async.} =
raiseAssert("not implemented")
method fulfillRequest*(market: Market,
requestId: array[32, byte],
proof: seq[byte]) {.base, async.} =
2022-03-28 10:28:22 +00:00
raiseAssert("not implemented")
method subscribeRequests*(market: Market,
callback: OnRequest):
Future[Subscription] {.base, async.} =
raiseAssert("not implemented")
method subscribeFulfillment*(market: Market,
requestId: array[32, byte],
callback: OnFulfillment):
Future[Subscription] {.base, async.} =
2022-03-29 09:20:07 +00:00
raiseAssert("not implemented")
method unsubscribe*(subscription: Subscription) {.base, async, upraises:[].} =
2022-03-28 10:28:22 +00:00
raiseAssert("not implemented")