availproject / availup
- суббота, 6 апреля 2024 г. в 00:00:07
To run an Avail light client, simply run the following command:
curl -sL1 avail.sh | bashor, with wget:
wget --https-only --secure-protocol=TLSv1_2 --quiet -O - avail.sh | bashYou can pass additional flags to the script like:
curl -sL1 avail.sh | bash -s -- --network goldbergCurrently available flags are:
network: can be one of the following: [goldberg, local]config: path to the configuration file, availup will generate a config if this flag is not specified
identity: path to the identity file, availup will generate a config if this flag is not specified
app_id: application ID to run the light client (defaults to 0)
upgrade: takes y and yes as valid arguments, indicating that the avail-light binary should be upgraded
force_wsl: takes y and yes as valid arguments, the script exits on WSL systems by default. This flag can
removed in the future.You can use a custom config by passing it to availup as a flag:
# create the config:
touch ~/config.yml
# edit the config:
nano ~/config.yml
# and rerunning the script:
curl -sL1 avail.sh | bash -s -- --config ~/config.yml
⚠️ It is not recommended to modify the default config stored in~/.avail/config/config.ymlas that gets wiped on each run.
If you have a seed phrase that you'd like to use instead of the generated one, you can modify
~/.avail/identity/identity.toml, alternatively, you can pass it as a flag:
# edit default identity
nano ~/.avail/identity/identity.toml
# the script picks up the new identity automatically:
curl -sL1 avail.sh | bash
# create a new identity
touch ~/identity.toml
nano ~/identity.toml
# the script uses the identity at the path
curl -sL1 avail.sh | bash -s -- --identity ~/identity.tomlℹ️ The script persists your identity file between runs. Deleting the file will cause a new one to be generated on the next run.
Alternatively, you can pass a specific application ID with availup:
rm ~/.avail/goldberg/config.yml
# and rerunning the script with flags:
curl -sL1 avail.sh | bash -s -- --app_id 1ℹ️ Adding an app ID disables the LC mode and runs your client in an app-specific mode, this might not be your intention.
To upgrade the light client to the latest supported version, you can simply pass the --upgrade flag like:
curl -sL1 avail.sh | bash -s -- --upgrade yℹ️ Upgrading the LC only works if the binary was installed with the latest
availupscript or cargo.
To run the light client on WSL systems, use the --force_wsl flag like:
curl -sL1 avail.sh | bash -s -- --force_wsl yℹ️ Running this flag on any other system does nothing.