{"_id":"@afklblockchain/wt-js-libs","_rev":"3-15f31b3ebe8df3ac647fd234f006c390","name":"@afklblockchain/wt-js-libs","dist-tags":{"latest":"0.4.2"},"versions":{"0.4.0":{"name":"@afklblockchain/wt-js-libs","version":"0.4.0","description":"Javascript libraries to interact with the Winding Tree contracts","main":"dist/node/wt-js-libs.js","directories":{"test":"test"},"scripts":{"flow":"flow","lint":"eslint src test","test":"rimraf .nyc_output .nyc_coverage && ./test/utils/scripts/localtestnet.sh","test-runner":"nyc --clean=false --reporter=text mocha \"test/**/*.spec.js\" --timeout 20000 --require @babel/register --require @babel/polyfill","coverage":"nyc report --reporter=text-lcov | coveralls","clean":"rimraf dist && rimraf docs","build":"webpack --config webpack.config.js --mode production","docs":"rimraf docs && mkdir docs && documentation build src/** -f md -o docs/reference.md"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/windingtree/wt-js-libs.git"},"keywords":["winding-tree","security","encryption","smart-contracts"],"author":{"name":"Winding Tree Developers","email":"dev@windingtree.com"},"license":"Apache-2.0","browser":{"fs":false,"child_process":false},"dependencies":{"@afklblockchain/wt-contracts":"^0.2.4","@babel/runtime":"^7.0.0","@windingtree/lif-token":"^0.1.2-erc827","@windingtree/wt-contracts":"^0.2.4","bignumber.js":"^7.2.1","lodash.clonedeep":"^4.5.0","web3":"^1.0.0-beta.35"},"devDependencies":{"@babel/core":"^7.0.0","@babel/plugin-proposal-object-rest-spread":"^7.0.0","@babel/plugin-transform-runtime":"^7.0.0","@babel/polyfill":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/preset-flow":"^7.0.0","@babel/register":"^7.0.0","@windingtree/off-chain-adapter-in-memory":"^4.0.0","babel-eslint":"^9.0.0","babel-loader":"^8.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","bn.js":"^4.0.0","chai":"^4.1.2","chai-string":"^1.4.0","coveralls":"^3.0.1","documentation":"^8.0.2","esdoc":"^1.1.0","esdoc-ecmascript-proposal-plugin":"^1.0.0","esdoc-node":"^1.0.2","esdoc-standard-plugin":"^1.0.0","eslint":"^5.2.0","eslint-config-standard":"^12.0.0","eslint-plugin-flowtype":"^2.49.3","eslint-plugin-import":"^2.13.0","eslint-plugin-node":"^7.0.1","eslint-plugin-promise":"^4.0.0","eslint-plugin-standard":"^4.0.0","flow-bin":"^0.81.0","ganache-cli":"^6.1.6","jsdom":"^12.0.0","jsdom-global":"3.0.2","lodash.isfunction":"^3.0.9","mocha":"^5.2.0","node-loader":"^0.6.0","nyc":"^13.0.1","rimraf":"^2.6.2","sinon":"^6.1.4","truffle":"^4.1.12","truffle-contract":"^3.0.6","web3-eth-abi":"^1.0.0-beta.35","webpack":"^4.18.0","webpack-bundle-size-analyzer":"^2.7.0","webpack-cli":"^3.1.0","webpack-node-externals":"^1.7.2"},"engines":{"node":">=10.3.0"},"gitHead":"d0444f58ecac9cb32e5380289be89948dd47d678","bugs":{"url":"https://github.com/windingtree/wt-js-libs/issues"},"homepage":"https://github.com/windingtree/wt-js-libs#readme","_id":"@afklblockchain/wt-js-libs@0.4.0","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"afklblockchain","email":"mail.blockchainprogram@airfrance.fr"},"dist":{"integrity":"sha512-VRWTxsVuFrGZDMqPjgkeF+Z53oMbtZwyQR/ai0lI1N9xXza6UhDkaDSf51/TZyMIrIx6x+qsLSmwC1/G4koYwA==","shasum":"bf3a6b019afd259c2bbd7df61ae5219b0c122013","tarball":"https://registry.npmjs.org/@afklblockchain/wt-js-libs/-/wt-js-libs-0.4.0.tgz","fileCount":20,"unpackedSize":163198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0PBYCRA9TVsSAnZWagAAL1UP/RXQ0VPqhXyfbqsgQ/vb\n9HVB2J/gNHWjN9I5VAXHHzDBQ5XPU7QUWoroPz0psPJ9ol0o6rnpPYy7br4J\n5eLp9WWh/pgMkrruQ7zXNp8XbhCm+MhoS7VEB7WFwmsoMeWBIj2oexQVuuBa\nlvIBJAQZ41KsbMOCN0gmJ/vGWNj+Qd56NYEHBlfARypAYXTjYTf0pdlKqzQb\nM7xL2GOMW3Ou3y0r+vAEncqQDtQWRWn+RPX+sbuRixmxa0nPMj8PJ2fa6NLQ\nczfC8YP2ZNFGMi8x+r9L4sV10uTPGNMyebEN6jT7nTfgalYMlFfqaq5ut++a\n5yQK8tkrQPWa4ikXZVE+qlH2bdZ5ggrtqRMDthFRiD+oFPfzdLBnIuemaAi7\nWlp4pvrZq/k/OQLGJ/dwgqC/FPOvU6OH+M0Rwvp1lZx9/ihp5jx2X+1VcE+6\nzQSS/UzevpM1lnNDfK9Ovxs4Y0GI/NwmGfNiOb03FT1iPoM85QIvSzTRgjQI\nakTm7k7W/49vTM5XGHIiXZIvi5+TKcp3IHkAJPK7eW1FwbOuXypPg7PfvAmr\nbpXO94B/gttfpc+gkKQhSilvGO4DDf9bsT0jzijqQVIMc7OEfWqspEWfN3Ei\nU/Fx7gjruDm3qgLcPQs28MpkfMDGu585eceHfTHgiz1eyqOUSY0177Izla76\nnoPb\r\n=3UvG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBif465nxwiAqbPQSEdbpWzVUns0Ww1xKcYZwa/inHSiAiB7f67kG9WnuX6gpE/QiTDAaVVnReq2TqYp2ikplq9xIg=="}]},"maintainers":[{"name":"afklblockchain","email":"mail.blockchainprogram@airfrance.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wt-js-libs_0.4.0_1540419671621_0.7238594351418357"},"_hasShrinkwrap":false},"0.4.1":{"name":"@afklblockchain/wt-js-libs","version":"0.4.1","description":"Javascript libraries to interact with the Winding Tree contracts","main":"dist/node/wt-js-libs.js","directories":{"test":"test"},"scripts":{"flow":"flow","lint":"eslint src test","test":"rimraf .nyc_output .nyc_coverage && ./test/utils/scripts/localtestnet.sh","test-runner":"nyc --clean=false --reporter=text mocha \"test/**/*.spec.js\" --timeout 20000 --require @babel/register --require @babel/polyfill","coverage":"nyc report --reporter=text-lcov | coveralls","clean":"rimraf dist && rimraf docs","build":"webpack --config webpack.config.js --mode production","docs":"rimraf docs && mkdir docs && documentation build src/** -f md -o docs/reference.md"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/windingtree/wt-js-libs.git"},"keywords":["winding-tree","security","encryption","smart-contracts"],"author":{"name":"Winding Tree Developers","email":"dev@windingtree.com"},"license":"Apache-2.0","browser":{"fs":false,"child_process":false},"dependencies":{"@afklblockchain/wt-contracts":"^0.2.4","@babel/runtime":"^7.0.0","@windingtree/lif-token":"^0.1.2-erc827","@windingtree/wt-contracts":"^0.2.4","bignumber.js":"^7.2.1","lodash.clonedeep":"^4.5.0","web3":"^1.0.0-beta.35"},"devDependencies":{"@babel/core":"^7.0.0","@babel/plugin-proposal-object-rest-spread":"^7.0.0","@babel/plugin-transform-runtime":"^7.0.0","@babel/polyfill":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/preset-flow":"^7.0.0","@babel/register":"^7.0.0","@windingtree/off-chain-adapter-in-memory":"^4.0.0","babel-eslint":"^9.0.0","babel-loader":"^8.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","bn.js":"^4.0.0","chai":"^4.1.2","chai-string":"^1.4.0","coveralls":"^3.0.1","documentation":"^8.0.2","esdoc":"^1.1.0","esdoc-ecmascript-proposal-plugin":"^1.0.0","esdoc-node":"^1.0.2","esdoc-standard-plugin":"^1.0.0","eslint":"^5.2.0","eslint-config-standard":"^12.0.0","eslint-plugin-flowtype":"^2.49.3","eslint-plugin-import":"^2.13.0","eslint-plugin-node":"^7.0.1","eslint-plugin-promise":"^4.0.0","eslint-plugin-standard":"^4.0.0","flow-bin":"^0.81.0","ganache-cli":"^6.1.6","jsdom":"^12.0.0","jsdom-global":"3.0.2","lodash.isfunction":"^3.0.9","mocha":"^5.2.0","node-loader":"^0.6.0","nyc":"^13.0.1","rimraf":"^2.6.2","sinon":"^6.1.4","truffle":"^4.1.12","truffle-contract":"^3.0.6","web3-eth-abi":"^1.0.0-beta.35","webpack":"^4.18.0","webpack-bundle-size-analyzer":"^2.7.0","webpack-cli":"^3.1.0","webpack-node-externals":"^1.7.2"},"engines":{"node":">=10.3.0"},"gitHead":"51ca0e0d368d8b75843fccf78b95db0802e409f1","bugs":{"url":"https://github.com/windingtree/wt-js-libs/issues"},"homepage":"https://github.com/windingtree/wt-js-libs#readme","_id":"@afklblockchain/wt-js-libs@0.4.1","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"afklblockchain","email":"mail.blockchainprogram@airfrance.fr"},"dist":{"integrity":"sha512-TMW6aWRwqsPFEXMm9AFMrLLmj+8EPjwp5BlAGJ/vjlxFKWr9R5LI2uAs18pHkdQpM1IXh4xB7IWgeMGYkIK1wQ==","shasum":"12d5ee0f55d0663bbb06243616f06197da9df7b6","tarball":"https://registry.npmjs.org/@afklblockchain/wt-js-libs/-/wt-js-libs-0.4.1.tgz","fileCount":20,"unpackedSize":163430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0QSbCRA9TVsSAnZWagAAhS4P/1/0G040wyt3IaDCD0Ds\n/Oa60/65huLmt1O71HPJIhlWfCtqoDOjj+6P4jkfLALDM3atXKBcOMuNPVYS\nNiVjs2LQG38RWdUB/MAL09TOAx8BHG778N++hs8/8PFCy/VfPugnEvTkm9Q8\nZ3TxkEsaRQHVmgp98YUVwDeo8ifuVzAAoyRZTOxa9/pJAeBHcpiOcWoPkaBz\nF+R+GhOL/KpmkdyjIYPLst+Lr8lX0elWsqsB3HyNs6eq/ARX/MqR8N8YsgVL\nCl37YQPcQ5gWWkqG3RX9eLFpE5oXm8MbTh1g+bMmdyyLEk/MQVuex6BscYqI\n/MFGz/rMNWgSvcDc8RSJTM+c/RlJUnHzFEyzOpaNvkFkAKVD4t7NP4rTxdJ5\n/GO4r/B/Ahngvh6UmDYQN8cNjtInwgySrh0Dgx/nKXcWkPrwttmERsPcTvNe\nO/7SsnNtyRwludBHPbTVcWRheNwQ24hqEqHeI+KY78/GK9X4WLZHpu63iBso\n0vireA2nk0mFcylH9AP8qgKnhO+gfxZ5rGocH3Hkl2z1vfhlagUvjJGZtjRj\n5iCQtd7F+oZAn69TO3J+/RRScNbdEAC1ay9IzvNaQXCdJeVcg0a3/Ht8G73N\n2H0EQtf/J5Ujl4rOt1C0IOIyIShCjtKbqIxbTeSZ4mkv7af419bLZyeAFscC\nUwQS\r\n=1Pbz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuFGCpp1CP0flkaOqgsPINxuqU6ngiCuWlJu0wOq9MYgIgYZn1XnguVPSadW4TNrA8w7iTA4BwNzNGvpRx/3ko6+U="}]},"maintainers":[{"name":"afklblockchain","email":"mail.blockchainprogram@airfrance.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wt-js-libs_0.4.1_1540424858712_0.07855993933458816"},"_hasShrinkwrap":false},"0.4.2":{"name":"@afklblockchain/wt-js-libs","version":"0.4.2","description":"Javascript libraries to interact with the Winding Tree contracts","main":"dist/node/wt-js-libs.js","directories":{"test":"test"},"scripts":{"flow":"flow","lint":"eslint src test","test":"rimraf .nyc_output .nyc_coverage && ./test/utils/scripts/localtestnet.sh","test-runner":"nyc --clean=false --reporter=text mocha \"test/**/*.spec.js\" --timeout 20000 --require @babel/register --require @babel/polyfill","coverage":"nyc report --reporter=text-lcov | coveralls","clean":"rimraf dist && rimraf docs","build":"webpack --config webpack.config.js --mode production","docs":"rimraf docs && mkdir docs && documentation build src/** -f md -o docs/reference.md"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/windingtree/wt-js-libs.git"},"keywords":["winding-tree","security","encryption","smart-contracts"],"author":{"name":"Winding Tree Developers","email":"dev@windingtree.com"},"license":"Apache-2.0","browser":{"fs":false,"child_process":false},"dependencies":{"@afklblockchain/wt-contracts":"^0.2.4","@babel/runtime":"^7.0.0","@windingtree/lif-token":"^0.1.2-erc827","@windingtree/wt-contracts":"^0.2.4","bignumber.js":"^7.2.1","lodash.clonedeep":"^4.5.0","web3":"^1.0.0-beta.35"},"devDependencies":{"@babel/core":"^7.0.0","@babel/plugin-proposal-object-rest-spread":"^7.0.0","@babel/plugin-transform-runtime":"^7.0.0","@babel/polyfill":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/preset-flow":"^7.0.0","@babel/register":"^7.0.0","@windingtree/off-chain-adapter-in-memory":"^4.0.0","babel-eslint":"^9.0.0","babel-loader":"^8.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","bn.js":"^4.0.0","chai":"^4.1.2","chai-string":"^1.4.0","coveralls":"^3.0.1","documentation":"^8.0.2","esdoc":"^1.1.0","esdoc-ecmascript-proposal-plugin":"^1.0.0","esdoc-node":"^1.0.2","esdoc-standard-plugin":"^1.0.0","eslint":"^5.2.0","eslint-config-standard":"^12.0.0","eslint-plugin-flowtype":"^2.49.3","eslint-plugin-import":"^2.13.0","eslint-plugin-node":"^7.0.1","eslint-plugin-promise":"^4.0.0","eslint-plugin-standard":"^4.0.0","flow-bin":"^0.81.0","ganache-cli":"^6.1.6","jsdom":"^12.0.0","jsdom-global":"3.0.2","lodash.isfunction":"^3.0.9","mocha":"^5.2.0","node-loader":"^0.6.0","nyc":"^13.0.1","rimraf":"^2.6.2","sinon":"^6.1.4","truffle":"^4.1.12","truffle-contract":"^3.0.6","web3-eth-abi":"^1.0.0-beta.35","webpack":"^4.18.0","webpack-bundle-size-analyzer":"^2.7.0","webpack-cli":"^3.1.0","webpack-node-externals":"^1.7.2"},"engines":{"node":">=10.3.0"},"gitHead":"51ca0e0d368d8b75843fccf78b95db0802e409f1","bugs":{"url":"https://github.com/windingtree/wt-js-libs/issues"},"homepage":"https://github.com/windingtree/wt-js-libs#readme","_id":"@afklblockchain/wt-js-libs@0.4.2","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"afklblockchain","email":"mail.blockchainprogram@airfrance.fr"},"dist":{"integrity":"sha512-SmOzRo3slVGPwrRUm4JPedQr8CMHyFs2S3VwqLGbHSadKwVTTcRBMe44J4tZHV3i0Dppl00Fkk4UTnfbvKOmOA==","shasum":"1c2fce9425b6acc2bd546070a11bb367293be7cb","tarball":"https://registry.npmjs.org/@afklblockchain/wt-js-libs/-/wt-js-libs-0.4.2.tgz","fileCount":24,"unpackedSize":4405972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0QhlCRA9TVsSAnZWagAAbfkQAJ2dlHxkeKYuicz6UtlI\n6aZEZ9oqn2ve8eOrHOk3MgWIzfOue6QQW0++5om8sdQUxJR7dj2MjCoqV/wI\nglYGMBGjcM4i2wiN3Cdywu4LJI9TT4y9MhzYzSQ+x0C72PBBHBBeDsET0V5x\nC1GFZhYFYY5gDHsfngtZlL/PdqBT3hm0LypOGdoQ9JPqK4nLFFNAKhGFbySz\nrtadmk7uwgXlNWfIMnG8y2eOlQzKsGTDHTDwAs0CzRDLhwV78BoAzfG9b5C4\nPGkeLNtmc6EjJ6J4xaTrc3Yxwmdv667GVIS4P+vIF9LVTANig6kJ1dNZcz6f\nlrvbpmFhsn6RLr4529tyQWNQlx1a/iVinZVq3I7QjLfhsGeHKyo8fOXMyGY7\n1XWGo9lFQotG1zR5Qj9dFAHN2IHra1eQfAXN5WKznnU9txiibU31RcEGp0bI\n3sPtz9fvJqxUt2XRwHShIi1Af4XeW40mFlxLcujJB9hEwIVe5OE59evtfGRA\n8NO1R7cC9w0SKbwppuJ2t3ZpvwkjPvaGcedU0GMUFSaUeemgssW5DKE7Z/Yg\nMA+T9cgLJmHwl1UFfeE6UzGdOx95gMspGZFRlPhWt/jMgF+FPZjH8z1qE9rm\nWR3uDYUVe+4lMcwYL1tXdTU7MV9+N/8Brf6/Q+vnc+nVyc7QLAGJYDzonggW\nTdMQ\r\n=u490\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDMPelQdfhKLJxC5IpmHTdTcY2LtqhRflaiqd5Pk8Q+VAiBwI5IACHmtnXbNoc+k+XYVTRDD3WbSqLhDCmmFn4txMg=="}]},"maintainers":[{"name":"afklblockchain","email":"mail.blockchainprogram@airfrance.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wt-js-libs_0.4.2_1540425828643_0.9053779076936019"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-24T22:21:11.456Z","0.4.0":"2018-10-24T22:21:11.736Z","modified":"2022-04-04T11:50:55.152Z","0.4.1":"2018-10-24T23:47:38.882Z","0.4.2":"2018-10-25T00:03:48.876Z"},"maintainers":[{"name":"afklblockchain","email":"mail.blockchainprogram@airfrance.fr"}],"description":"Javascript libraries to interact with the Winding Tree contracts","homepage":"https://github.com/windingtree/wt-js-libs#readme","keywords":["winding-tree","security","encryption","smart-contracts"],"repository":{"type":"git","url":"git+https://github.com/windingtree/wt-js-libs.git"},"author":{"name":"Winding Tree Developers","email":"dev@windingtree.com"},"bugs":{"url":"https://github.com/windingtree/wt-js-libs/issues"},"license":"Apache-2.0","readme":"# Winding Tree Javascript Libraries for Hotels\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/windingtree/wt-js-libs.svg)](https://greenkeeper.io/)\n\nA JS interface to WindingTree's Ethereum smart-contracts for Hotels.\n\n## Installation\n\n```sh\nnpm install @afklblockchain/wt-js-libs\n# or\ngit clone https://github.com/windingtree/wt-js-libs\nnvm install\nnpm install\n```\n\n## Usage\n\nFor more examples, see `test/usage.spec.js` file. The public interface of this library\nshould always be the same regardless of what kind of implementation is used\nunder the hood.\n\n```javascript\n// Winding Tree backed by a local Ethereum node.\n// You need to deploy the index and the hotel first. See test/utils/migrations\n// for inspiration.\nimport WTLibs from '@afklblockchain/wt-js-libs';\nimport InMemoryAdapter from '@windingtree/off-chain-adapter-in-memory';\n\nconst libs = WTLibs.createInstance({\n  dataModelOptions: {\n    provider: 'http://localhost:8545',\n  },\n  offChainDataOptions: {\n    adapters: {\n      // This is how you plug-in any off-chain data adapter you want.\n      'in-memory': {\n        options: {\n          // some: options\n        }\n        create: (options) => {\n          return new InMemoryAdapter(options);\n        },\n      },\n    },\n  },\n});\nconst index = libs.getWTIndex('0x...');\nconst hotel = await index.getHotel('0x...');\n\n// You can get all the off-chain data at once\n// This approach might be a little slow as all off-chain data gets downloaded\nconst plainHotel = await hotel.toPlainObject();\n// You get a synced plain javascript object you can traverse in any way you want\nconst hotelName2 = plainHotel.dataUri.contents.descriptionUri.contents.name;\n\n// OR you can be picky but faster\n\n// Accessing off-chain data - the entry point url is actually stored on chain\nconst dataIndex = await hotel.dataIndex;\nconst hotelDataIndexUrl = dataIndex.ref;\n// This data is fetched from some off-chain storage\nconst dataIndexContents = await dataIndex.contents;\nconst hotelDescriptionDocument = await dataIndexContents.descriptionUri.contents;\n// This data is fetched from another off-chain document\nconst hotelName = hotelDescriptionDocument.name;\n\n\n// How about creating a hotel?\nwallet = libs.createWallet({/*...Your wallet in a JSON format..*/});\nwallet.unlock('with-password');\ntry {\n  const { hotel, transactionData, eventCallbacks } = await index.addHotel({\n    manager: wallet.getAddress(),\n    dataUri: 'https://example.com/my-hotel-data.json',\n  });\n  const result = await wallet.signAndSendTransaction(transactionData, eventCallbacks);\n  // After the transaction is confirmed, one of the callbacks\n  // will set the address of the hotel.\n  const newHotelAddress = hotel.address;\n} finally {\n  wallet.lock();\n}\n```\n\n## Documentation\n\nThe current documentation can be rendered by running `npm run docs`\n\n### Off-chain data adapters\n\n**Existing implementations**\n\n- [In memory](https://github.com/windingtree/off-chain-adapter-in-memory) - Example basic implementation which is not very useful, but should be enough for quick hacking or testing\n- [Swarm](https://github.com/windingtree/off-chain-adapter-swarm) - Uses Ethereum Swarm for off-chain storage.\n- [HTTPS](https://github.com/windingtree/off-chain-adapter-http) - Retrieves data from arbitrary HTTPS locations.\n\n#### Developing your own off-chain data adapter\n\nFor insipiration, you can have a look at [in-memory adapter](https://github.com/windingtree/off-chain-adapter-in-memory),\nif you'd like to create it all by yourself, here's what you need.\n\n1. Your package has to implement a [simple interface](https://github.com/windingtree/wt-js-libs/blob/proposal/next/docs/reference.md#offchaindataadapterinterface)\nthat provides ways to store, update and retrieve data.\n1. You can also choose how your plugin is instantiated and whether you need any initialization\noptions. These will be passed whenever an instance is created.\n1. Off Chain data adapters are used in two places\n    1. `StoragePointer` - The adapter is used to download off-chain data in there\n    1. `OffChainDataClient` - It is responsible for proper instantiation of all off-chain data adapters.\n\nThe interface is subject to change as we go along and find out what other types\nof storages might require - be it a signature verification, data signing and other non-common\nutilities. The only actual method used in the wt-js-libs internals is `download` right now.\n\n## Test\n\nTo run unit tests, run `npm test`.\n","readmeFilename":"README.md"}