Skip to main content

loadManifest

@totemsdk/pear


@totemsdk/pear / loadManifest

Function: loadManifest()

loadManifest(pearTopicKey, adapter?, options?): Promise<SignedManifest>

Load and parse manifest.json from a remote Hyperdrive identified by its 64-hex pearTopicKey.

  • Joins Hyperswarm to locate peers for the given topic key.
  • Reads /manifest.json from the replicated drive.
  • If @totemsdk/app-manifest is installed its decodeManifest is used for schema validation; otherwise the raw JSON is returned.

Pass a pre-opened adapter to skip the network join (useful in tests).

Parameters

pearTopicKey

string

adapter?

HyperdriveAdapter

options?

RemoteDriveOptions

Returns

Promise<SignedManifest>