Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ openapi
opentelemetry
overprovisioned
pageobject
pathlib
Pbkdf2
pbxproj
Pdart
Expand Down
1 change: 1 addition & 0 deletions signed_docs/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
36 changes: 36 additions & 0 deletions signed_docs/Earthfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-libs/rust:catalyst-signed-doc/v0.0.10-mk-signed-docs-key-type AS cat-libs-rust

ARG --global REGISTRY="harbor.shared-services.projectcatalyst.io/ghcr"

package:
FROM ${REGISTRY}/astral-sh/uv:python3.13-bookworm-slim

WORKDIR /app

ARG tag='latest'

COPY cat-libs-rust+build/mk_signed_doc .
ENV MK_SIGNED_DOC_PATH="./mk_signed_doc"

COPY pyproject.toml .
COPY uv.lock .
COPY setup_fund.py .

COPY --dir dev .

COPY entrypoint.sh .
RUN chmod +x entrypoint.sh

ENTRYPOINT ["/app/entrypoint.sh"]

SAVE IMAGE setup-fund-documents:${tag}

docker:
FROM +package

ARG container="setup-fund-documents"
ARG tag="latest"

SAVE IMAGE ${container}:${tag}
19 changes: 19 additions & 0 deletions signed_docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Catalyst Signed Documents importer scripts

> A collection of scripts for inserting ["Catalyst Signed Documents"]
like `Proposal`, `Comment`, `Proposal Form Template`, etc. via the `v1/document` PUT endpoint.

## Setup fund

The tool will find the endpoint, and any other configuration
it needs to operate from the corresponding `settings.json` file to the provided `<env>`.

```sh
uv run setup_fund.py <env>
```

You will need to ensure that the `MK_SIGNED_DOC_PATH` environment variable is set to the correct path to the
[`mk_signed_doc` cli tool](https://github.com/input-output-hk/catalyst-libs/tree/main/rust/signed_doc/bins)
and also that it is set environment variable from the `settings.json` `admin_private_key_env` property.

["Catalyst Signed Documents"]: https://docs.dev.projectcatalyst.io/libs/main/architecture/08_concepts/signed_doc/spec/
15 changes: 15 additions & 0 deletions signed_docs/blueprint.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
project: {
name: "setup-fund-documents"

release: {
docker: {
on: {
merge: {}
tag: {}
}
config: {
tag: _ @forge(name="GIT_HASH_OR_TAG")
}
}
}
}
Empty file added signed_docs/dev/.keep
Empty file.
1 change: 1 addition & 0 deletions signed_docs/dev/brand_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions signed_docs/dev/brand_parameters_form_template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "object"}
1 change: 1 addition & 0 deletions signed_docs/dev/campaign_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions signed_docs/dev/campaign_parameters_form_template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "object"}
1 change: 1 addition & 0 deletions signed_docs/dev/categories/category_parameters_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "object"}
46 changes: 46 additions & 0 deletions signed_docs/dev/categories/proposal_comment_form_template_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$id":"https://cardano.org/schemas/catalyst/comments",
"$schema":"http://json-schema.org/draft-07/schema#",
"definitions":{
"multiLineTextEntry":{
"$comment":"UI - Multiline text entry without any markup or rich text capability.",
"pattern":"^[\\S\\s]+$",
"type":"string",
"x-note":"Enter multiple lines of plain text. You can use line breaks but no special formatting."
}
},
"description":"Schema for comments on Catalyst proposals",
"maintainers":[
{
"name":"Catalyst Team",
"url":"https://projectcatalyst.io/"
}
],
"properties":{
"comment":{
"description":"The comments on the proposal",
"properties":{
"content":{
"$ref":"#/definitions/multiLineTextEntry",
"description":"The comment text content",
"maxLength":2000,
"minLength":1
}
},
"required":[
"content"
],
"type":"object"
}
},
"required":[
"comment"
],
"title":"Proposal Comments Schema",
"type":"object",
"x-changelog":{
"2025-06-16":[
"Updating maxLength for content text"
]
}
}
Loading