DieMyst 8978b75bbf Merge remote-tracking branch 'origin/master' into examples
# Conflicts:
#	aqua-hll.jar
#	src/aqua/helloWorld.aqua
#	src/compiled/helloWorld.ts
#	src/index.ts
2021-04-15 11:42:55 +03:00
2021-04-12 09:48:09 +03:00
2021-04-12 09:48:09 +03:00
2021-04-12 09:48:09 +03:00
2021-04-14 17:48:17 +03:00
2021-04-14 22:53:15 +03:00
2021-04-12 09:48:09 +03:00

Aqua playground

Repository demonstrating the how to start writing aqua and integrate it into a typescript application

Getting started

Warning: java is required to be installed in order to use aqua compiler

Install dependencies

npm install

To compile the aqua files execute

npm run compile-aqua

To start the program execute

npm run cli

If everything works correctly the following should be printed into the console:


Relay external addresses:  [ '/ip4/165.227.164.206/tcp/7001', '/ip4/165.227.164.206/tcp/9001/ws' ]

Now try to uncomment the following lines in helloWorld.aqua and run the compiler once again

-- func getPeerExternalTimestamp(otherNodePeerId: string) -> u64:
--     on otherNodePeerId:
--         res <- Peer.timestamp_sec()
--     <- res

Now, the new function should appear in generated helloWorld.ts Uncomment everything in index.ts and run the program again.

The following should be printed to the console:

Relay external addresses:  [ '/ip4/165.227.164.206/tcp/7001', '/ip4/165.227.164.206/tcp/9001/ws' ]
Relay timestamp:  1618429933

Project structure

Aqua source files are located in src/aquadirectory.

Aqua files are compiled into .ts located in /src/compiled directory

References

- Documentation for the compiler can be found in the official repo: https://github.com/fluencelabs/aqua

Description
No description provided
Readme 66 MiB
Languages
TypeScript 97%
JavaScript 3%