Skip to content
LogoLogo

edit

Republish an asset with changed metadata, services or credentials.

Usage

const  = await .('did:ope:2a6ebce0af...')
 
const  = new () 
  .('A better name') 
  .() 
 
const {  } = await .() 

The builder must be constructed from a resolved asset — that is what supplies the baseline to merge over. Passing a freshly built asset throws.

Indexer-derived fields — datatokens, event, stats, and anything a client decorated the asset with — are stripped before signing, so a republish cannot bake in a stale snapshot of chain state.

Only services carrying a new pricing config get a new datatoken. Everything else is merged over the published services by id. A service whose files or endpoint changed gets a new id, because the id is the hash of the encrypted file object; nautilus removes the old entry so the two do not linger side by side.

To change a price without touching the DDO, use setServicePrice instead.

Returns

services contains only the services that were re-priced.

Parameters

asset

  • Type: NautilusAsset

Built from an AssetBuilder constructed with a resolved asset.

options (optional)

  • Type: PublishOptions

Same as publish.