mirror of
https://github.com/fluencelabs/aqua-playground
synced 2025-04-01 08:21:19 +00:00
20 lines
377 B
Plaintext
20 lines
377 B
Plaintext
|
service Peer("peer"):
|
||
|
is_connected: string -> bool
|
||
|
|
||
|
service Op("op"):
|
||
|
identity: -> ()
|
||
|
|
||
|
data User:
|
||
|
peer_id: string
|
||
|
relay_id: string
|
||
|
name: string
|
||
|
|
||
|
service Test("test"):
|
||
|
getUserList: -> []User
|
||
|
doSomething: -> bool
|
||
|
|
||
|
func betterMessage(relay: string):
|
||
|
on relay:
|
||
|
isOnline <- Peer.is_connected(relay)
|
||
|
if isOnline:
|
||
|
Test.doSomething()
|