JS Client, scripts for signing , witnessiing and verifying revisiion
- configure remote domain (by default use localhost as domoain) to query REST API to verify page
- configure title name to select which page to verify
Minimum reuirement Node.js 14.x+
But it is recommended to run the latest Node.js.
install node here
npm install
npm run build
- follow usage command below
To notarize a file use the following command
./notarize.js <FILE_PATH>
ie
./notarize.js ./LICENSE
To sign a file use the following command
./notarize.js --sign [cli|metamask|did] <FILE_PATH>
ie
./notarize.js --sign cli ./LICENSE
To witness a file, use the following command
./notarize.js [--witness eth|--witness nostr|--witness tsa] <FILE_PATH>
ie
./notarize.js ./LICENSE --witness eth
To witness multiple aqua chains
ie
./notarize.js LICENSE,README.md --witness eth --vtree --type sepolia
To witness multiple file with specific revision ie
./notarize.js LICENSE@0x_specific_revision_,README.md@0x_specific_revision_ --witness eth --type cli --vtree
To verify an aqua chain use the following command
./verify.js <AQUA_CHAIN_FILE_PATH>
ie
./verify.js LICENSE.aqua.json
Use the -v
for result versboseness ie
./verify.js LICENSE.aqua.json -v
Use the --ignore-merkle-proof
for ignore verifying merkle proof of each revision. Verification is faster ie
./verify.js LICENSE.aqua.json --ignore-merkle-proof
This will delete the last revision from an aqua chain
./notarize.js --remove <FILE_PATH>
ie
./notarize.js --remove ./LICENSE
To link an Aqua chain to another use the --link
option as follows
./notarize.js <FILE_PATH> --link <FILE_PATH.aqua.json>
ie
./notarize.js --link ./LICENSE ./README.md.aqua.json
This will link README.md.aqua.json
to LICENSE
file and it will be written into LICENSE.aqua.json
file
To generate a content
revision you run the following command
./notarize.js --content ./LICENSE
To generate a content
revision you run the following command
./notarize.js --scalar ./LICENSE
To create a genesis form revision
./notarize.js example-form.json --form example-form.json
please note for genesis the filane name should be the same with form name
To create a form revision
./notarize.js LICENCE --form example-form.json
-
To delete a form entry
./form_updater.js example-form.json.aqua.json@abcd --delete age
-
to update a form entry ie undelete it
./form_updater.js example-form.json.aqua.json --update forms_age 200
- File Validation: Ensures the input file is a .aqua.json file and exists
- Form Key Detection: Can find exact matches (e.g., forms-name) Can find partial matches (e.g., name will match forms-name) Handles deleted fields (e.g., forms-name.deleted)
- Operations: --delete: Marks a form field as deleted by appending .deleted --update: Updates or restores a form field, removing the .deleted suffix if present
- Error Handling: Provides clear error messages for invalid inputs
- Non-destructive: Preserves the original structure while making changes
- ensure to install shareness in you local systems the sharenss path is set to
~/share/sharness/sharness.sh
then copy the shareness directory to tests. Check out sharness for more instructions - run
make test
- the output will be in test > trash *(the last part is dynamic based on the test)
- Hint : ensure your
tests/test-*.sh
file are excutablechmod +x tests/test-*