ErasureFeed

ErasureFeed

new ErasureFeed(config)

Parameters:
Name Type Description
config Object
Properties
Name Type Description
owner string
feedAddress string
web3Provider Object
protocolVersion string

Methods

(static) contract()

Access the web3 contract class

(static) address() → {address}

Get the address of this feed
Returns:
address of the feed
Type
address

(static) owner() → {address}

Get the address of the owner of this feed
Returns:
address of the owner
Type
address

(static) createPost(data, proofhashopt) → {Promise.<ErasurePostWithReceipt>}

Submit new data to this feed - can only called by feed owner
Parameters:
Name Type Attributes Description
data string raw data to be posted
proofhash string <optional>
Returns:
Type
Promise.<ErasurePostWithReceipt>

(static) getPosts() → {Promise.<Array.<ErasurePost>>}

Get all the posts submitted to this feed
Returns:
array of ErasurePost objects
Type
Promise.<Array.<ErasurePost>>

(static) reveal() → {Promise}

Reveal all posts in this feed publically - fetch symkey and upload to ipfs
Returns:
array of base58 multihash format of the ipfs address of the revealed keys
Type
Promise

(static) checkStatus() → {boolean}

Get the status of the feed
Returns:
revealed bool true if the feed is revealed
Type
boolean