pactus-profile/1
A public profile for a Pactus account: a small JSON file that the account commits to with a PIP-50 anchor. Any explorer, wallet or directory can read it and check it against the chain, with no server to trust.
The key words MUST, MUST NOT, SHOULD and MAY are used as in RFC 2119.
1. Anchoring
An account publishes its profile with a PIP-50 set anchor transaction whose fields are:
| Field | Value |
|---|---|
anchor_type | 1 (service manifest) |
root_hash |
BLAKE2b-256 of the exact bytes of the file (32 bytes). This is the PAC-ANCHOR-1 root of a single blob, so the file is never re-serialized before hashing. |
manifest_uri |
Where the file is, in at most 128 bytes: ipfs://<cid> (optionally followed by
/path) or an https:// URL. IPFS is RECOMMENDED: a raw-leaf CIDv1 with the
BLAKE2b-256 multihash has the same digest as root_hash.
|
Each account has one anchor slot, so it has at most one profile. To change the profile, publish the new file and set the anchor again. To remove it, delete the anchor.
2. The file
The file MUST be a JSON object encoded as UTF-8, with no byte-order mark, and at most 16 384 bytes. Lengths below are counted in Unicode code points. All text is plain text: it is never interpreted as HTML or Markdown.
| Field | Type | Rules |
|---|---|---|
schema | string | Required. Exactly "pactus-profile/1". |
name | string | Required. 1–80, not only whitespace. |
category |
string |
Required. One of shops, community, development,
services, validators, other.
|
bio | string | Optional. At most 280. |
location | string | Optional. At most 80, free form (e.g. "Madrid, ES"). |
links | array | Optional. At most 12 objects { "label", "url" }. |
links[].label | string | Required. At most 40. |
links[].url |
string | Required. At most 300. https: or mailto: only, with no credentials (user:pass@). |
Example
{
"schema": "pactus-profile/1",
"name": "Example Shop",
"category": "shops",
"bio": "Coffee and pastries. We take PAC.",
"location": "Madrid, ES",
"links": [
{ "label": "Web", "url": "https://example.com" },
{ "label": "Email", "url": "mailto:hello@example.com" }
]
}
3. Reading a profile
A profile is written by whoever owns the account, so readers MUST treat it as untrusted input.
- Read the account's anchor. Continue only if
anchor_typeis1. -
Fetch
manifest_uri. Readers SHOULD stop after a size limit (Pactus Pages uses 256 KiB) and a timeout. Browsers SHOULD NOT fetch anhttps://URI whose host islocalhost, a private or link-local address or an IP literal, and SHOULD NOT follow its redirects, so that an anchor cannot make viewers probe their own network. -
Compute BLAKE2b-256 of the bytes received. If it differs from
root_hash, the profile MUST NOT be shown as the account's. - Parse the JSON. If
schemais not"pactus-profile/1", it is not a profile of this version. - Ignore fields this spec does not define. Show an unknown
categoryasother. -
Render text as text only. Readers SHOULD remove control, bidirectional and zero-width characters, which can
make one link look like another, and SHOULD show only
https:andmailto:links without credentials.
How listings are ordered or highlighted (Pactus Pages features accounts with 100 PAC or more locked) is up to each reader.
4. Versioning
New optional fields MAY be added to version 1. Readers ignore them until they know them. A change that would
make existing readers misread a file uses a new schema value, such as "pactus-profile/2".
5. Reference implementation
Pactus Pages verifies profiles in the browser, and its upload gateway accepts only files that pass these rules. Both are plain JavaScript with no dependencies: BLAKE2b, the PAC-ANCHOR-1 roots and the IPFS CID of a root hash.