Skip to content
LogoLogo

NodePersistentRemoteStore

Store a payload in an ocean-node persistent-storage bucket.

The class still works as a plain bucket uploader, for example for files you then reference with a nodePersistentStorage file object.

Usage

const  = new (.(), { 
  : 'my-bucket-id'
}) 
 
const  = await .('hello', { : 'notes' })

Without bucketId, each store instance creates a new bucket on first use, and there is no nautilus call to delete one. Pass bucketId to reuse a bucket.

Parameters

node

  • Type: OceanNodeClient

From getNodeClient.

options

  • Type: NodePersistentRemoteStoreOptions
OptionTypePurpose
bucketIdstringReuse an existing bucket instead of creating one.
accessLists—Restrict who may read the bucket.
labelstringName the bucket it creates.