Skip to content
Sam Steele edited this page Apr 28, 2019 · 2 revisions

Upload

post /get-encrypt-key

body label (for this demo we are using one label for every upload)

returns labelHash and pubKey a.k.a. policy_encrypting_key

for now everything uses labelHash = aXBmcyB0ZXN0IGxhYmVs and pubKey = 03050dbdbe6de74937f261ceebaa9f4822f55d90a05a111c4333181f3340c3e856

post /books

body title, content, ethPrice, labelHash, ethAddress, pubKey

returns bookId, ipfsHash

call from the front end -> web3.contract.methods.addContent(ethAddress, ipfsPath, labelHash, price).call()

Clone this wiki locally