-
Notifications
You must be signed in to change notification settings - Fork 1
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
update MapeoManager to return and handle project public IDs #247
Merged
Conversation
This file contains 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
achou11
commented
Sep 5, 2023
* @returns {Buffer} 24-byte nonce (same length as sodium.crypto_aead_xchacha20poly1305_ietf_NPUBBYTES) | ||
*/ | ||
export function projectIdToNonce(projectId) { | ||
return Buffer.from(projectId, 'hex').subarray(0, 24) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't use the sodium constant because it seems that sodium-javascript
doesn't export it
achou11
changed the title
fix: update MapeoManager to return and handle project public IDs
update MapeoManager to return and handle project public IDs
Sep 5, 2023
gmaclennan
approved these changes
Sep 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
achou11
force-pushed
the
234/project-public-id
branch
from
September 6, 2023 14:09
e57cd47
to
ebce746
Compare
gmaclennan
added a commit
that referenced
this pull request
Sep 7, 2023
gmaclennan
added a commit
that referenced
this pull request
Sep 19, 2023
* main: chore: condense setup code in MemberAPI tests (#267) chore: replace queries opt in MemberAPI with dataType (#266) feat: add getMany method to member api (#263) feat: add getById method to member api (#262) chore: Update @digidem/types and remove patch (#269) feat: share all core keys via extension messages (#264) feat: send core "haves" bitfield on first connect (#254) fix: invite.encryptionKeys should be required (#260) feat: Add set & get deviceInfo & datatype (#250) expose member namespace in MapeoProject (#253) blobStore.createReadStream should not wait (#243) update MapeoManager to return and handle project public IDs (#247) return content hash from blobApi.create (#242)
This was referenced Nov 16, 2023
This was referenced Apr 11, 2024
This was referenced Jun 20, 2024
This was referenced Jul 25, 2024
This was referenced Aug 27, 2024
This was referenced Sep 11, 2024
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.
Closes #234
Notes:
@mapeo/crypto
to 1.0.0-alpha.8ProjectId
andProjectPublicId
.ProjectId
refers to the "internal" project id, whereasProjectPublicId
is what's used for client consumptionprojectPublicId
column to theprojectKeys
client db tableprojectPublicId
column should store and return the opaqueProjectPublicId
type. Pretty sure there's a way but my initial attempts failed me. For now, there are a couple of type casts in the manager code.