Skip to content

Instantly share code, notes, and snippets.

@jim-toth
Last active July 29, 2023 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jim-toth/ae081ee9b73cb11992fdcea2b5351db3 to your computer and use it in GitHub Desktop.
Save jim-toth/ae081ee9b73cb11992fdcea2b5351db3 to your computer and use it in GitHub Desktop.
Arweave Related Assets (Preview / Thumbnail) Spec
@vilenarios
Copy link

Instead of asset could dataTxId be used instead? This would marry this spec along with ArFS since dataTxId is used to reference the data that the metadata JSON points to, which is the same concept as above. Using asset still works too, as it doesnt conflict with any of the other tags used by ArFS.

@karlprieb
Copy link

Regarding the resolution field I think it would be better to explicit have width and height values instead of a string that needs to be parsed.

Having these values easy accessible will make it easier for apps to filter the resolutions they care.

Example:

{
  "type": "image/jpeg",
  "resolution": {
    "label": "hd",
    "width": 1280,
    "height": 720
  },
  "asset": "JSrP-65mEfjpYRkxA8NCCclwO9L6m6AjzWVXhL7V-7w"
}

or even use null if you only care about the label:

{
  "type": "image/jpeg",
  "resolution": {
    "label": "hd",
    "width": null,
    "height": null
  },
  "asset": "JSrP-65mEfjpYRkxA8NCCclwO9L6m6AjzWVXhL7V-7w"
}

@jim-toth
Copy link
Author

jim-toth commented May 23, 2023

Instead of asset could dataTxId be used instead? This would marry this spec along with ArFS since dataTxId is used to reference the data that the metadata JSON points to, which is the same concept as above. Using asset still works too, as it doesnt conflict with any of the other tags used by ArFS.

Definitely!

Although, after presenting this at the specs meetup and thinking about it a bit more, it might be a better impl to do this via tags. For example, related assets could have a Relates-To tag with value being the primary asset tx id. Content-Type is already there in tags. Could add Resolution and Width and Height for images.

This way, there's no manifest to fetch and parse - it's a hard sell to get most of the permaweb to start thinking about manifests as the primary entry point to an asset rather than the asset itself. Instead, this array of related assets could be fetched by querying Relates-To and parsing the tags.

Additionally, this would allow third parties to publish and associate their own assets they believe should be associated, or have been remixed from

@jim-toth
Copy link
Author

@vilenarios @karlprieb Updated the gist with an alternative tags based approach, lmk thoughts!

@jim-toth
Copy link
Author

jim-toth commented May 30, 2023

One remaining question: would it make sense to signal the type of relation something has to the original asset?

For example, if it is meant to be an "alternative render" as is the case with thumbnails, this could explicitly be signaled with another tag like Relation-Type with a value like thumbnail.

@bardionson
Copy link

bardionson commented May 30, 2023

I like this idea.
I would like to have support for multi channel video. So the entire art piece could be 10 video files that are played in parallel on different devices.
Could this concept be standardized as an ERC for ethereum?

@jim-toth
Copy link
Author

jim-toth commented Jun 6, 2023

@jim-toth
Copy link
Author

jim-toth commented Jun 6, 2023

I like this idea. I would like to have support for multi channel video. So the entire art piece could be 10 video files that are played in parallel on different devices. Could this concept be standardized as an ERC for ethereum?

This is mostly about how to tag assets when publishing them to Arweave. These tags can be queried from Arweave Gateways. I suppose with an erc you could have a primary asset be the URI, and then know to search Related-To of the arweave tx id. Not sure how to or if it's appropriate to make these kind of associations in an EVM contract

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment