nim-dagger/dagger/market.nim

40 lines
1.2 KiB
Nim
Raw Normal View History

2022-03-23 12:57:48 +00:00
import pkg/chronos
import ./contracts/requests
import ./contracts/offers
2022-03-23 12:57:48 +00:00
export chronos
export requests
export offers
2022-03-23 12:57:48 +00:00
type
Market* = ref object of RootObj
2022-03-28 10:28:22 +00:00
Subscription* = ref object of RootObj
OnRequest* = proc(request: StorageRequest) {.gcsafe.}
OnOffer* = proc(offer: StorageOffer) {.gcsafe.}
2022-03-23 12:57:48 +00:00
method requestStorage*(market: Market, request: StorageRequest) {.base, async.} =
raiseAssert("not implemented")
2022-03-28 10:28:22 +00:00
method offerStorage*(market: Market, offer: StorageOffer) {.base, async.} =
raiseAssert("not implemented")
method selectOffer*(market: Market, id: array[32, byte]) {.base, async.} =
raiseAssert("not implemented")
method waitUntil*(market: Market, expiry: UInt256) {.base, async.} =
raiseAssert("not implemented")
method subscribeRequests*(market: Market,
callback: OnRequest):
Future[Subscription] {.base, async.} =
raiseAssert("not implemented")
method subscribeOffers*(market: Market,
requestId: array[32, byte],
callback: OnOffer):
Future[Subscription] {.base, async.} =
raiseAssert("not implemented")
method unsubscribe*(subscription: Subscription) {.base, async.} =
raiseAssert("not implemented")