1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-12-16 06:30:09 +08:00

feat(ipns): support passing custom sequence number during publishing (#10851)

* feat(ipns): Add a parameter in name.publish to change the sequence number
* test: monotonic name publish --sequence
* docs: `name publish --sequence`
* chore: boxo main with PR 962

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
This commit is contained in:
Sergey Gorbunov
2025-08-13 05:15:45 +03:00
committed by GitHub
parent 7250eb8786
commit d81f524cce
12 changed files with 120 additions and 10 deletions

View File

@@ -66,6 +66,10 @@ func (api *NameAPI) Publish(ctx context.Context, p path.Path, opts ...caopts.Nam
publishOptions = append(publishOptions, namesys.PublishWithTTL(*options.TTL))
}
if options.Sequence != nil {
publishOptions = append(publishOptions, namesys.PublishWithSequence(*options.Sequence))
}
err = api.namesys.Publish(ctx, k, p, publishOptions...)
if err != nil {
return ipns.Name{}, err