WP Manifestindependent plugin directory
manifest / utilities / rationale-publisher

Rationale Publisher

Publish CIP-108 Cardano vote rationales to your WordPress site

by CoffeePool (hix_coffeepool) · github.com/hixcoffeepool/rationale-publisher · website

0stars
0forks

Install

The author publishes release zips, so WP-CLI can install straight from GitHub:

wp plugin install https://github.com/hixcoffeepool/rationale-publisher/releases/download/v1.1.0/rationale-publisher.zip

Cardano Rationale Publisher for DReps

スクリーンショット 2026-08-24 11 29 36

A small WordPress plugin for Cardano DReps and SPOs: create a CIP‑108 governance vote rationale document and publish it to your own site's uploads folder — giving you a stable https:// URL to use as the vote anchor in any governance voting tool.

No IPFS, no third‑party hosting: the rationale lives on your own WordPress site.


Features

  • Create a CIP‑108 rationale from simple fields (summary, rationale, author, references).
  • Or upload an existing rationale.json and just host it.
  • Writes to wp-content/uploads/voting/ and returns the public URL (with a copy button).
  • Lists previously published files with their URLs.
  • REST endpoint (rationale-publisher/v1/save) for CLI / automation, gated by capability.
  • Runs entirely inside wp-admin — standard WordPress login, capability and nonce protection. No admin controls are ever exposed on public pages.
  • Works on any WordPress site — the URL is derived from your own uploads directory.

Requirements

  • WordPress 5.6+
  • PHP 7.2+ (uses the bundled json extension)
  • A user with the manage_options capability (site administrator)

Installation

  1. Download the latest clean ZIP from the Releases section. (Or Code → Download ZIP to get the source; note the extracted folder name will include -main.)
  2. In your WordPress dashboard, go to Plugins → Add New → Upload Plugin, choose the ZIP, then Install Now → Activate.
    • (Or copy the rationale-publisher folder into wp-content/plugins/.)
  3. Open Tools → Rationale Publisher.

Usage

  1. Go to Tools → Rationale Publisher.
  2. Fill in:
    • File name (optional; auto‑named if blank)
    • Author name (optional)
    • Summary (≤ 300 chars, optional)
    • Rationale (the main statement — required)
    • Reference URL / label (optional)
    • …or choose an existing .json file to upload instead.
  3. Click Publish. Copy the returned URL and paste it into your voting tool's Rationale URL field.

The file is written to …/wp-content/uploads/voting/<name>.json and served over HTTPS.

Output format (CIP‑108)

{
  "@context": { "...": "CIP-108 JSON-LD context" },
  "authors": [ { "name": "hix_coffeepool" } ],
  "body": {
    "summary": "Short summary of your position.",
    "rationaleStatement": "Full reasoning...",
    "references": [
      { "@type": "Other", "label": "My voting framework", "uri": "https://..." }
    ]
  },
  "hashAlgorithm": "blake2b-256"
}

Voting tools/wallets fetch this URL and store its blake2b‑256 hash as the vote anchor, so as long as the hosted bytes don't change, the hash stays valid.

REST API (optional, for automation)

POST /wp-json/rationale-publisher/v1/save — requires manage_options (use a WordPress Application Password for Basic auth).

curl -u "USER:APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"filename":"rationale_20260821","content":"{...json...}"}' \
  https://your-site.example/wp-json/rationale-publisher/v1/save

Response: { "url": "...", "filename": "...", "bytes": 1234 }.

Customization

Change the target subfolder (default voting) with a filter in your theme or a small mu‑plugin:

add_filter( 'crp_upload_subdir', function () { return 'rationale'; } );

Security

  • Every action requires the manage_options capability.
  • Admin form is protected by a WordPress nonce; the REST route by a capability check.
  • File names are strictly sanitized (path elements stripped, extension forced to .json).
  • Uploaded/generated content must be valid JSON and ≤ 100 KB.

Support

If this plugin is useful to you, a small ADA donation helps support ongoing development — thank you! ☕️

addr1q9nqdqme84qph3ptsnzkfks3h4h7qtpnqx3r7d0qsarrn2fld8c4cn4p63en0duu8y3qh4r0285w533fmglhaj4gs6vqeuc7y9 ​

License

GPL‑2.0‑or‑later. See LICENSE.

Credits

Built by CoffeePool (hix_coffeepool). Contributions welcome via issues / PRs.

Releases

1 release. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.1.0 latest
Aug 24, 2026 17d ago
rationale-publisher.zip
0