Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: support extensible data fields #302

Open
tabcat opened this issue Jan 10, 2024 · 5 comments
Open

feature request: support extensible data fields #302

tabcat opened this issue Jan 10, 2024 · 5 comments
Labels
need/triage Needs initial labeling and prioritization

Comments

@tabcat
Copy link

tabcat commented Jan 10, 2024

I would like to add support for extensible data to this implementation of the IPNS record.

This could be done by:

  1. adding an optional extensibleData field to CreateOptions.
  2. adding an optional parameter extensibleData to createCborData.
  3. inside of createCborData, merge extensibleData the data object.
  4. add tests and documentation

It's not necessary to change types or add generics to the record type. Users of this feature would simply have to decode IPNSRecord.data to read any extensible fields.

@tabcat tabcat added the need/triage Needs initial labeling and prioritization label Jan 10, 2024
Copy link

welcome bot commented Jan 10, 2024

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@tabcat tabcat changed the title feature request: support extensible data field feature request: support extensible data fields Jan 10, 2024
@dentropy
Copy link

Thank you for posting this issue, I had the exact same question, and you saved me the time reading through the docs

@dentropy
Copy link

Oh look what I found,

* extensible data

It's just waiting for a pull request

@dentropy
Copy link

@tabcat I got a working POC of extendable for js-ipns in this pull requres

#309

@dentropy
Copy link

@tabcat if you want to use it check my tests, https://github.com/dentropy/js-ipns/blob/main/test/extensible_data.spec.ts

You have to recast js-ipns type IPNSRecordData as any to get the data out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

2 participants