feat: add note attachments getter APIs#2849
Open
PhilippGackstatter wants to merge 28 commits intopgackst-multiple-note-attachmentsfrom
Open
feat: add note attachments getter APIs#2849PhilippGackstatter wants to merge 28 commits intopgackst-multiple-note-attachmentsfrom
PhilippGackstatter wants to merge 28 commits intopgackst-multiple-note-attachmentsfrom
Conversation
…s' into pgackst-multiple-note-attachments-getters
mmagician
reviewed
May 4, 2026
Collaborator
mmagician
left a comment
There was a problem hiding this comment.
As long as we have no kernel-level support for specifying that a certain attachment scheme can only be added once per note, we need to pick a canonical network account target attachment from the list of attachments, and for now this is the first one.
Why would it be desirable to restrict that a note can only carry one attachment of a particular scheme? If this is for the NTX builder to pick up "network notes", I think the builder could still scan all attachments (since there's only four I think that's ok?)
mmagician
approved these changes
May 5, 2026
Collaborator
mmagician
left a comment
There was a problem hiding this comment.
LGTM!
There are a few comments still but I'm approving already, assuming that the following get resolved:
- the test for "retrieves the correct attachment data" should verify the actual data is correct (also maybe at least one of the attachments should be >1 word?)
- naming of
write_attachments_to_memoryprocedure
7 tasks
…e-note-attachments-getters
…e-note-attachments-getters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds accessor APIs for multiple attachments.
get_metadatakernel APIs.get_attachments_commitmentkernel APIs - this returns the commitment over all attachments of a note.find_attachmentis the most convenient one and should generally be used. Example usage innetwork_account_target::active_account_matches_target_account.part of #2555