From 8447625cfaa8bb1973427a0e989ef16143cc204a Mon Sep 17 00:00:00 2001 From: Aleksey Proshutisnkiy Date: Thu, 31 Aug 2023 11:57:17 +0300 Subject: [PATCH] feat(workers): add Worker.get_worker_id [NET-523] (#51) --- workers.aqua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/workers.aqua b/workers.aqua index 84b66d1..df6a34d 100644 --- a/workers.aqua +++ b/workers.aqua @@ -10,6 +10,10 @@ service DealWorker("worker"): -- Throws an error if worker doesn't exist. get_peer_id(deal_id: ?string) -> PeerId + -- Returns worker peer id associated with `deal_id`. + -- Returns nil if worker doesn't exist. + get_peer_id_opt(deal_id: ?string) -> PeerId + -- Removes worker with all deployed spells and services. -- Throws an error if worker doesn't exist. -- Worker can be removed only by worker creator or worker itself. @@ -24,8 +28,13 @@ service Worker("worker"): -- Returns worker peer id associated with `init_peer_id`. -- Throws an error if worker doesn't exist. + -- WILL BE DEPRECATED SOON, use `get_worker_id` instead. get_peer_id() -> PeerId + -- Returns worker peer id associated with `init_peer_id`. + -- Returns nil if worker doesn't exist. + get_worker_id() -> ?PeerId + -- Removes worker with all deployed spells and services. -- Throws an error if worker doesn't exist. -- Worker can be removed only by worker creator or worker itself.