Skip to content

multi: introduce new meta type for json strings#794

Merged
Roasbeef merged 4 commits intomainfrom
json-meta
Feb 20, 2024
Merged

multi: introduce new meta type for json strings#794
Roasbeef merged 4 commits intomainfrom
json-meta

Conversation

@Roasbeef
Copy link
Member

@Roasbeef Roasbeef commented Feb 7, 2024

In this PR, we designate meta type 1 as a JSON string meta. We perform upfront validation at the CLI and RPC level, but retain the meta hash only validation at the protocol level (proof validity only cares about hashing, and not the structure)

Fixes #783

Copy link
Contributor

@guggero guggero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM 🎉

Copy link
Contributor

@jharveyb jharveyb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Some small lint failures.

We'll use this to give hints to the parsing logic to implement some
additional up front validation.
In this commit, we add a new meta json type. We update the validation
logic to ensure we obtain a valid JSON string, add additional tests, and
prep for an itest with a more descriptive error message.
@Roasbeef Roasbeef merged commit c35215a into main Feb 20, 2024
Roasbeef added a commit to Roasbeef/bips that referenced this pull request Feb 20, 2024
In this commit, we add a new JSON meta type. This is to be used by
developers to specify key-value meta data pairs in a manner more
friendly than the lower level TLV serialization.

This has been implemented in:
lightninglabs/taproot-assets#794
@guggero guggero deleted the json-meta branch February 20, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

spec+asset: move to officially designate asset meta type 1 as a JSON blob

3 participants