feat: name-based IPNS keys, republish command, upgrade ipfs-sdk to v0.1.44#60
Merged
Merged
Conversation
….1.44 - Upgrade go.lumeweb.com/ipfs-sdk from v0.1.43 to v0.1.44 - Rewrite IPNS key commands (get/delete/publish) to accept key names or numeric IDs, resolving names via ListKeys like websites pattern - Replace --key-id (int) flag with --key-name (string) on publish - Add 'pinner ipns republish <key-name-or-id>' command using SDK's per-key republish API (returns IPNSRepublishResponse with count/message) - Add resolveIPNSKeyID helper for name-to-ID resolution - Add initIPNSService DRY helper matching initWebsitesService pattern - Update IPNSService interface: Publish takes keyName string, Republish returns (*IPNSRepublishResponse, error) - Update all IPNS tests for new signatures and add republish test suite
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Coverage ReportTotal Coverage: 35.2% Generated from commit: d48fb3d |
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.
or numeric IDs, resolving names via ListKeys like websites pattern
per-key republish API (returns IPNSRepublishResponse with count/message)
Republish returns (*IPNSRepublishResponse, error)
This PR introduces name-based IPNS key references and adds a new
republishcommand to the IPNS CLI.Key changes:
Name-based key resolution: IPNS keys can now be referenced by their human-readable name (e.g.,
my-key) interchangeably with numeric IDs across all IPNS commands (get,delete,publish,republish). A newresolveIPNSKeyIDfunction handles resolution by attempting numeric parsing first, then falling back to a name lookup against the key list.New
ipns republishcommand: Adds apinner ipns republish <key-name-or-id>command that refreshes IPNS records on the network, extending their validity. Supports both JSON and text output formats.--key-namereplaces--key-idin publish: Theipns publishcommand flag changed from--key-id(integer) to--key-name(string), accepting either a key name or numeric ID string.Service refactoring: Extracted a shared
initIPNSServicehelper to eliminate duplicated service initialization across command handlers. TheIPNSService.Publishsignature now acceptskeyName stringinstead ofkeyId int, with internal resolution to the numeric ID. A newRepublishmethod was added to theIPNSServiceinterface.Documentation and test updates: All command descriptions, examples, and argument usage strings were updated to reflect name-based key usage. Tests were updated accordingly, and new tests were added for the republish command.