diff --git a/README.md b/README.md index 2e74716..04565f6 100644 --- a/README.md +++ b/README.md @@ -4,24 +4,41 @@ This repository holds shell scripts that Intersect uses to engage in Cardano on- ## Navigation -### Scripts +### Scripts -- [create-author-witness.sh](./scripts/create-author-witness.sh) - - Adds an author witness to CIP100/CIP108 metadata -- [create-human-readable-from-json.sh](./scripts/create-human-readable-from-json.sh) +#### 2025 Budget Scripts + +- [budget-check-metadata.sh](./scripts/budget-check-metadata.sh) + - Runs correctness and validity checks for budget treasury withdrawal CIP108 metadata. + - Uses a combination of the other scripts + +#### IPFS Scripts + +- [ipfs-check.sh](./scripts/ipfs-check.sh) + - Checks if a file is accessible via free IPFS gateways +- [ipfs-pin.sh](./scripts/ipfs-check.sh) + - Allows user to pin a file on a number of pinning services + - Optionally allows the user to check file's discoverability first + +#### CIP-108 Scripts + +- [cip-108-create-human-readable.sh](./scripts/cip-108-create-human-readable.sh) - Creates a markdown file from CIP108 metadata -- [hash.sh](./scripts/hash.sh) - - Performs a blake2b-256 hash -- [ipfs.sh](./scripts/ipfs.sh) - - Checks if a file is accessible via IPFS - - Allows user to pin a file on a number of pinning services -- [validate-cip-108.sh](./scripts/ipfs.sh) - - Compares CIP108 metadata against the established schema +- [cip-108-validate.sh](./scripts/cip-108-validate.sh) + - Compares CIP-108 metadata against the established schema - Applies a spell check to CIP108 metadata -- [verify-author-witness.sh](./scripts/verify-author-witness.sh) - - Checks the correctness of CIP108 metadata with a author(s) witness(es) -- [check-budget-metadata.sh](./scripts/check-budget-metadata.sh) - - Runs correctness and validity checks for budget treasury withdrawal CIP108 metadata. + +#### CIP-100 Author Scripts + +- [author-create-witness.sh](./scripts/author-create-witness.sh) + - Adds an author witness to CIP100/CIP108 metadata +- [author-verify-witness.sh](./scripts/author-verify-witness.sh) + - Checks the correctness of CIP100/CIP108 metadata with a author(s) witness(es) + +#### Other Scripts + +- [hash.sh](./scripts/hash.sh) + - Performs a blake2b-256 hash on provided file ### Documentation @@ -40,6 +57,12 @@ In order to run all of these scripts you will need - [ipfs](https://docs.ipfs.eth.link/install/command-line/) - jq +## Secrets + +Secrets can be stored via `./scripts/.env` and based on `./scripts/.env.example`. + +The only script that uses secrets is `ipfs-pin.sh`. + ## License See [License](./LICENSE). diff --git a/scripts/create-author-witness.sh b/scripts/author-create-witness.sh similarity index 100% rename from scripts/create-author-witness.sh rename to scripts/author-create-witness.sh diff --git a/scripts/verify-author-witness.sh b/scripts/author-verify-witness.sh similarity index 100% rename from scripts/verify-author-witness.sh rename to scripts/author-verify-witness.sh diff --git a/scripts/verify-budget-metadata.sh b/scripts/budget-check-metadata.sh similarity index 95% rename from scripts/verify-budget-metadata.sh rename to scripts/budget-check-metadata.sh index 413338d..902d8a1 100755 --- a/scripts/verify-budget-metadata.sh +++ b/scripts/budget-check-metadata.sh @@ -62,10 +62,10 @@ if [ -d "$input_path" ]; then echo "Author witnesses will be checked..." echo " " echo "Running validation $file" - ./scripts/validate-cip-108.sh "$file" + ./scripts/cip-108-validate.sh "$file" echo " " echo "Checking author for $file" - ./scripts/verify-author-witness.sh "$file" + ./scripts/author-verify-witness.sh "$file" echo " " # todo add more checks here diff --git a/scripts/create-human-readable-from-json.sh b/scripts/cip-108-create-human-readable.sh similarity index 100% rename from scripts/create-human-readable-from-json.sh rename to scripts/cip-108-create-human-readable.sh diff --git a/scripts/validate-cip-108.sh b/scripts/cip-108-validate.sh similarity index 100% rename from scripts/validate-cip-108.sh rename to scripts/cip-108-validate.sh diff --git a/scripts/check-ipfs.sh b/scripts/ipfs-check.sh similarity index 100% rename from scripts/check-ipfs.sh rename to scripts/ipfs-check.sh diff --git a/scripts/pin-to-ipfs.sh b/scripts/ipfs-pin.sh similarity index 98% rename from scripts/pin-to-ipfs.sh rename to scripts/ipfs-pin.sh index 3182aad..d9d63d8 100755 --- a/scripts/pin-to-ipfs.sh +++ b/scripts/ipfs-pin.sh @@ -92,9 +92,9 @@ echo "CID: $ipfs_cid" # If user wants to check if file is discoverable on IPFS if [ "$check_discoverable" = "true" ]; then - echo "Using ./scripts/check-ipfs.sh script to check if file is discoverable on IPFS..." + echo "Using ./scripts/ipfs-check.sh script to check if file is discoverable on IPFS..." # check if file is discoverable on IPFS - if ! ./scripts/check-ipfs.sh "$input_path"; then + if ! ./scripts/ipfs-check.sh "$input_path"; then echo "File is not discoverable on IPFS. Proceeding to pin it." else echo "File is already discoverable on IPFS. No need to pin it."