Skip to content

Instantly share code, notes, and snippets.

@elv-peter
Last active March 13, 2019 00:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elv-peter/31a0ee8c775ebd4938fb4b17271c72f9 to your computer and use it in GitHub Desktop.
Save elv-peter/31a0ee8c775ebd4938fb4b17271c72f9 to your computer and use it in GitHub Desktop.
Bitcode example instructions

Prerequisites

  • Docker and Git installed
  • These are MacOS instructions

Steps

  1. Clone https://github.com/eluv-io/content-bitcode
  2. Run Docker to get a Linux build environment:
cd content-bitcode
docker run -ti --rm=true -v $(pwd):/content-bitcode eluvio-content-bitcode
  1. In the Docker shell, build and publish the bitcode (See notes below first):
cd /content-bitcode/bitcode/examples/helloworld
./build.sh
./publish-bc.sh http://209.51.161.242:80 ilib2AWdn731Mrrn68nmyP8WMqUpx69M helloworld.bc
./publish-content.sh http://209.51.161.242:80 ilib2AWdn731Mrrn68nmyP8WMqUpx69M hq__QmWpLNhhiQRWjiEM9HwDUx1eXN11UZqC4Y1UeXMrVXBWE5 hellocats cats.png
  1. Go the the URL with your browser, e.g. http://209.51.161.242/qlibs/ilib2AWdn731Mrrn68nmyP8WMqUpx69M/q/hq__QmTsVdyw1qHPjc9TnEbJpP6jVwSCy3L3NAeDh2Q71ZrXPB/rep/image

Notes

  • You should use your own IDs as arguments to the publish script:
    • qlibid: The ID of the library created by this API call: curl -s -X POST -H "Accept: application/json" -H "Content-Type: application/json" http://209.51.161.242:80/qlibs
    • qtype: The ID of the content type printed after publish-bc.sh runs successfully
  • The fabric and the bitcode you are building must be built using the same platform and toolchain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment