mirror of
https://github.com/fluencelabs/examples
synced 2025-06-26 16:21:36 +00:00
feat!: Replace old fluence-js with JS Client (#425)
This commit is contained in:
17
js-client-examples/hello-world/aqua/hello-world.aqua
Normal file
17
js-client-examples/hello-world/aqua/hello-world.aqua
Normal file
@ -0,0 +1,17 @@
|
||||
import Peer from "@fluencelabs/aqua-lib/builtin.aqua"
|
||||
|
||||
service HelloWorld("hello-world"):
|
||||
hello(str: string)
|
||||
getFortune() -> string
|
||||
|
||||
func sayHello():
|
||||
HelloWorld.hello("Hello, world!")
|
||||
|
||||
func tellFortune() -> string:
|
||||
res <- HelloWorld.getFortune()
|
||||
<- res
|
||||
|
||||
func getRelayTime() -> u64:
|
||||
on HOST_PEER_ID:
|
||||
ts <- Peer.timestamp_ms()
|
||||
<- ts
|
Reference in New Issue
Block a user