Incomplete Client Library for Frequency written in Kotlin. It wraps substrate-client-java with specific methods for interaction with the Frequency blockchain.
-
Install asdf tools version manager. Make sure to follow instructions for your shell (e.g. ZSH, Fish, etc.) and package manager (e.g. Homebrew)
- Install the Rust plugin.
- Install the Java plugin.
- Then, run
asdf installat the root of the repo to install tools listed in/.tool-versions. - Verify your local Java version matches what's in /.tool-versions. If they don't match check the
$PATHenv var to ensure~/.asdf/shimsdirectory has precedence over others.java -version cat .tool-versions
-
Install Docker Desktop, an application for managing Docker containers and images along with docker CLI tools.
Note: If using fish shell you'd need to update the $PATH manually with this command, so
dockerexecutables can be found and restart the shell:set -U fish_user_paths /Applications/Docker.app/Contents/Resources/bin $fish_user_paths
-
Build project.
./gradlew clean build
-
Publish compile artifacts to the local Maven cache, so other apps (e.g. Custodial Wallet) can consume it.
Please note, this step is optional and only needed if you, as a developer, made changes to it and want to see those changes in a consuming app. Otherwise, you can skip it if you are just trying to build things out for the first time../gradlew publishToMavenLocal
To delete compiled artifacts in local build directories:
./gradlew cleanTo verify all compiled artifacts have been deleted run this command in the repo root:
find . -type d -name "build"
---
(should be empty output)- Navigate to the
frequencyrust docs and find the definition:- For extrinsics, identify the function signature to see the types being used.
- For other data structures there is generally a
structdefinition.
- Create a new class:
- For extrinsics:
io.amplica.frequency.client.pallet.[module].call.[extrinsic].java - For return types:
io.amplica.frequency.client.pallet.[module].[type].java - For events:
io.amplica.frequency.client.pallet.[module].[module].java - For payloads:
io.amplica.frequency.signing_service.[payload].java- These are generally included inside extrinsics and signed over, e.g.,
AddKeyDataPayload
- These are generally included inside extrinsics and signed over, e.g.,
- For extrinsics:
- Enumerate the properties in the extrinsic, using the correct types:
AccountId->com.strategyobject.substrateclient.rpc.api.AccountIdBlockNumberFor<T>->MessageSourceId->io.amplica.frequency.client.pallet.msa.MessageSourceIdMultiSignature->longwith annotation@Scale(ScaleType.U32.class)byte(representing the signature type)com.strategyobject.substrateclient.crypto.SignatureData(representing signature data) ...
- Check that
mainis building https://github.com/AmplicaLabs/saas-frequency-client/actions - Go to main:
git checkout main && git pull --rebase - Look in
build.gradle.ktsfor the current version, in theory we are just removing SNAPSHOT here but check thatgit taghasn't already used that non-SNAPSHOT version - Once all that is settled remove
-SNAPSHOTand check that intomainwith a message something like "Preparing next release 1.0.9" - Monitor the build at https://github.com/AmplicaLabs/saas-frequency-client/actions and wait for it to finish successfully
- Tag the build for the next release, it should be
git tag vX.Y.Zwhere X.Y.Z match the non-SNAPSHOT version in step 3 that you just checked intobuild.gradle.kts - Push the tag up
git push --tags - Monitor the build at https://github.com/AmplicaLabs/saas-frequency-client/actions
- When it finishes successfully check that you have the published artifact at https://github.com/AmplicaLabs/saas-frequency-client/packages
- Update
build.gradle.ktsto whatever version for the next iteration and check that intomainwith a message something like "Preparing for next iteration 1.0.10-SNAPSHOT" - Monitor the build at https://github.com/AmplicaLabs/saas-frequency-client/actions until it succeeds and when that happens you are done