{"_id":"@decentralized-identity/sidetree-bitcoin","_rev":"9-a510f6a41f2d7688705ffe79ac193330","name":"@decentralized-identity/sidetree-bitcoin","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@decentralized-identity/sidetree-bitcoin","version":"0.1.1","description":"Node.js implementation of the Sidetree bitcoin module","main":"dist/lib/index.js","types":"dist/lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/decentralized-identity/sidetree-bitcoin.git"},"contributors":[{"name":"henrytsai","email":"hentsai@microsoft.com"},{"name":"srinathsetty","email":"srinath@microsoft.com"}],"license":"Apache-2.0","bugs":{"url":"https://github.com/decentralized-identity/sidetree-bitcoin/issues"},"homepage":"https://github.com/decentralized-identity/sidetree-bitcoin#readme","devDependencies":{"@types/async-retry":"^1.4.0","@types/http-status":"^0.2.30","@types/jasmine":"^2.8.12","@types/koa":"^2.0.47","@types/koa-router":"^7.0.35","@types/node":"^10.12.15","async-retry":"^1.2.3","copyfiles":"^2.1.0","husky":"^0.14.3","jasmine":"^3.3.1","jasmine-reporters":"^2.3.2","jasmine-spec-reporter":"^4.2.1","jasmine-ts":"^0.2.1","nodemon":"^1.18.9","npm-run-all":"^4.1.5","nyc":"^13.0.1","tslint":"^5.11.0","tslint-config-standard":"^8.0.1","typescript":"^3.2.2"},"dependencies":{"@types/bitcore-lib":"^0.15.1","@types/node-fetch":"^2.1.4","@types/raw-body":"^2.3.0","http-status":"^1.3.1","koa":"^2.6.2","koa-router":"^7.2.1","node-fetch":"^2.3.0","raw-body":"^2.3.3","request":"^2.88.0"},"scripts":{"precommit":"npm run validate","build":"tsc && copyfiles json/*.json dist","test":"jasmine-ts --config=./tests/jasmine.json","testCoverage":"npm run build && nyc jasmine --config=./tests/jasmine-cc.json","lint":"tslint --fix --project .","validate":"npm-run-all --parallel testCoverage lint","build:live":"nodemon --watch 'lib/**/*.ts' --exec 'ts-node' src/server.ts","startDebug":"npm run build:live","start":"node dist/src/server.js"},"nyc":{"all":true,"extension":[".js"],"include":["dist/lib/**"],"reporter":["text","cobertura","html"]},"gitHead":"efef3100663adb07c9f9c5fffb6f39dd2ecaa573","_id":"@decentralized-identity/sidetree-bitcoin@0.1.1","_nodeVersion":"10.14.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-k8V/jI5uqFMEgZAzxrCaxWeeTM6ZE4aHh3Be7BvAO6rjPxzPJ6tVI6ktW1FwResG2pgjYX/yXecmwRWbDEajQQ==","shasum":"b4996091a36184a1fd28e3d201b638e9c3caf3ea","tarball":"https://registry.npmjs.org/@decentralized-identity/sidetree-bitcoin/-/sidetree-bitcoin-0.1.1.tgz","fileCount":70,"unpackedSize":212582,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwKETCRA9TVsSAnZWagAAZb4QAKET4rHfKOpGPABaC6fu\nFdf9URWqLdp6q2AOVA9grE4S5vkcStH6jd2r3iFtmTv8CuJ/FAY6hWTr2mmv\nY4TeFC7qZDcs9eI+/lxPdiuymPW+svZDVosqsOSnAkoRjeryR+lEjCGg+ffH\nYG1FCJhsBZebpRbJhzjDCEfb+NCeCbNsFs6H22SIhAfQjzltNWZnhkxEgEOh\naFyJNWarLaMRaKSbe0DXIlsa3Wp6TlvcJjzj12wtJFweviN7Z5S8yLfUesRL\nYeZfvVTw2BAxzfaEwBdvZDusG6/w82gL+pUKi/1ufiPhKt6yjYjnKnh67m92\n8XjtfJ80SFKa9vW5AlaWToLt3SEZ23OHnnlKlB+M6rbQNsrkP8U+a1z0n8V7\nRsSAiGNG/zuSiqZNgcQhWUiPhqpuVnxdtl4aX0CEIz839C0Q759vAOMEw+BA\nA4DCTpsHDnJSM+m+wvNCBByaYp7qhsm/RIBbnQO7lPg0TRwdCJOFEd/DpUnu\nepgB+sgsOEhJNT/JnwpWpV2TI/NRKaZz+lp2Z0CXegE3wgNyKLOPm+fH7EUU\nXQgfDLTZ0hnVyij7h+UBgch5XiylLxNzP73DAS2k+ISzvvng1J2WHM5r3W4Q\nUyYzJ8E8p1l5tdjGlylOQdtixWYxb4SA8xwaWWW4yrPZPzLtmU1n9VfnnwYl\noOJH\r\n=dcxb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFPwMOaV2hgeSLK1bdyVNYMXgdTdDxnf13+7KiZytSspAiEA0N8AfDh7pjLpRfty/MY882S5ye81pbGQJ6sao4Hvlww="}]},"maintainers":[{"name":"sylar217","email":"johnanmol3405@outlook.com"},{"name":"beejones","email":"ronny.bjones@hotmail.com"},{"name":"alundeenmsft","email":"alundeen@microsoft.com"},{"name":"symorton","email":"symorton@microsoft.com"},{"name":"codeglobally","email":"bmurdoch@microsoft.com"},{"name":"logangirvin","email":"logangirvin@hotmail.com"},{"name":"henrytsai","email":"henrytsai@outlook.com"},{"name":"csuwildcat","email":"danieljb2@gmail.com"}],"_npmUser":{"name":"henrytsai","email":"henrytsai@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sidetree-bitcoin_0.1.1_1556128019057_0.7743877298844595"},"_hasShrinkwrap":false},"0.1.2":{"name":"@decentralized-identity/sidetree-bitcoin","version":"0.1.2","description":"Node.js implementation of the Sidetree bitcoin module","main":"dist/lib/index.js","types":"dist/lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/decentralized-identity/sidetree-bitcoin.git"},"contributors":[{"name":"henrytsai","email":"hentsai@microsoft.com"},{"name":"srinathsetty","email":"srinath@microsoft.com"}],"license":"Apache-2.0","bugs":{"url":"https://github.com/decentralized-identity/sidetree-bitcoin/issues"},"homepage":"https://github.com/decentralized-identity/sidetree-bitcoin#readme","devDependencies":{"@types/async-retry":"^1.4.0","@types/http-status":"^0.2.30","@types/jasmine":"^2.8.12","@types/koa":"^2.0.47","@types/koa-router":"^7.0.35","@types/node":"^10.12.15","async-retry":"^1.2.3","copyfiles":"^2.1.0","husky":"^0.14.3","jasmine":"^3.3.1","jasmine-reporters":"^2.3.2","jasmine-spec-reporter":"^4.2.1","jasmine-ts":"^0.2.1","nodemon":"^1.18.9","npm-run-all":"^4.1.5","nyc":"^13.0.1","tslint":"^5.11.0","tslint-config-standard":"^8.0.1","typescript":"^3.2.2"},"dependencies":{"@types/bitcore-lib":"^0.15.1","@types/node-fetch":"^2.1.4","@types/raw-body":"^2.3.0","http-status":"^1.3.1","koa":"^2.6.2","koa-router":"^7.2.1","node-fetch":"^2.3.0","raw-body":"^2.3.3","request":"^2.88.0"},"scripts":{"precommit":"npm run validate","build":"tsc && copyfiles json/*.json dist","test":"jasmine-ts --config=./tests/jasmine.json","testCoverage":"npm run build && nyc jasmine --config=./tests/jasmine-cc.json","lint":"tslint --fix --project .","validate":"npm-run-all --parallel testCoverage lint","build:live":"nodemon --watch 'lib/**/*.ts' --exec 'ts-node' src/server.ts","startDebug":"npm run build:live","start":"node dist/src/server.js"},"nyc":{"all":true,"extension":[".js"],"include":["dist/lib/**"],"reporter":["text","cobertura","html"]},"gitHead":"6088ab662fd1631cd4a5a3c4dca067139a862a51","_id":"@decentralized-identity/sidetree-bitcoin@0.1.2","_nodeVersion":"10.14.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-GAqniqikyAqluie/Wzk9+7ZXxqsN1N6glrbreNeNx4bO1ywErzOJ7spct7LTrXvbbzL89X1D7ZKv3j1dpZClZA==","shasum":"6fb9aaf5c08af9563b4a7ad8a6d460ddbb695d8d","tarball":"https://registry.npmjs.org/@decentralized-identity/sidetree-bitcoin/-/sidetree-bitcoin-0.1.2.tgz","fileCount":70,"unpackedSize":212586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwKl8CRA9TVsSAnZWagAAPmkP/3Xt4k7v2mg6w7ck723l\noywqGdSC7kBqGy79P9nQhvjS0QIyb20BieEdqhJAz+xLIyA8J2uSIknjRp1E\nebCJ6BDrUUV3jquA5EvPMQ+nuSCjsz2G941uq//2q8gboIpanKXQu/+GyH/3\nti0YFYdjJIJV3SqvBieLwSWGSmkvLyoJs//jDJFh2uq6OxcgukpmerFcVJA7\nibaXaAxIvJJz1hXGI0Qx709G30DLJNsobEaWZr4UUqIPtbIL6j9j5j/+iZLo\nLM1HbhzP49VkFsjo2sBi/arI6ZVjBngCFZRUtRcD0bYFuGGJ8n6lN0CQotRx\nWmA8dguFC2iKVujV93uRkRFe6I5ile8QOPymImjL8fDAZ8EveRdPjKxklIsx\nuFvKdxN4DTH3xrj4BiwACm2ngbEeRv9xJBDphSYiY19f8dWjqOW1r9y3LFay\n6nZy4iR1uDjpbHyxAf7LgTiLx1kaYWHBP8o392+TXn5Mla9pQizJDXX3GwUR\nCMtm1A3iL9i2WQTVuwibB19zyV5G95trGO2KMzp5htt9qv+qSlBOF92fDb5b\nabINZqY6+wd7JPJs3OD7YzmkbTOZwmB6ivsN3nrsZBueH1BTGFBB/VnuKuZM\n9Nygw5z2PmXAjAjx5hSnmyeUDeajPU65LL9YI4a35BNpafBKzkZ0CH3vTTX3\nLRxO\r\n=Kpo3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDVO/H7bSlFelbtjlqFZqY2LC3jLW3xW5tScOzrtHnAHAiBsX09XQCrs5LVvVDBC77osqFCusDxtp8IsUQvq2D8avg=="}]},"maintainers":[{"name":"alundeenmsft","email":"alundeen@microsoft.com"},{"name":"beejones","email":"ronny.bjones@hotmail.com"},{"name":"codeglobally","email":"bmurdoch@microsoft.com"},{"name":"csuwildcat","email":"danieljb2@gmail.com"},{"name":"henrytsai","email":"henrytsai@outlook.com"},{"name":"logangirvin","email":"logangirvin@hotmail.com"},{"name":"sylar217","email":"johnanmol3405@outlook.com"},{"name":"symorton","email":"symorton@microsoft.com"}],"_npmUser":{"name":"henrytsai","email":"henrytsai@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sidetree-bitcoin_0.1.2_1556130171261_0.16881217594451314"},"_hasShrinkwrap":false}},"time":{"created":"2019-04-24T17:46:58.882Z","0.1.1":"2019-04-24T17:46:59.151Z","modified":"2024-04-25T17:37:34.725Z","0.1.2":"2019-04-24T18:22:51.429Z"},"maintainers":[{"email":"shamilovtim@gmail.com","name":"shamilovtim"},{"email":"m.jangda88@gmail.com","name":"mistermoe"},{"email":"danieljb2@gmail.com","name":"csuwildcat"},{"email":"henrytsai@outlook.com","name":"henrytsai"},{"email":"symorton@microsoft.com","name":"symorton"},{"email":"ci@identity.foundation","name":"ci_identity_foundation"}],"description":"Node.js implementation of the Sidetree bitcoin module","homepage":"https://github.com/decentralized-identity/sidetree-bitcoin#readme","repository":{"type":"git","url":"git+https://github.com/decentralized-identity/sidetree-bitcoin.git"},"contributors":[{"name":"henrytsai","email":"hentsai@microsoft.com"},{"name":"srinathsetty","email":"srinath@microsoft.com"}],"bugs":{"url":"https://github.com/decentralized-identity/sidetree-bitcoin/issues"},"license":"Apache-2.0","readme":"# sidetree-bitcoin\r\n\r\nBlockchain-specific code for the Sidetree-based DID Method implementation on Bitcoin\r\n\r\n## Getting started\r\n\r\nOur reference implementation of the blockchain service is based on bitcored. Here is the list of instructions to deploy Sidetree's extension code along with the bitcored service:\r\n\r\n- Install a Bitcored full node using instructions at [this link](https://github.com/bitpay/bitcore#bitcore). We reproduce their instructions below since we run bitcored with node v9 rather than v4:\r\n\r\n  - Install node version manager (NVM) by following instructions at [this link](https://github.com/creationix/nvm#install-script).\r\n  - Install node v9 by using: \r\n     ```bash \r\n     nvm install v9\r\n     ```\r\n  - Install Python, ZeroMQ, and Tools. On GNU/Debian distributions, do:\r\n    ```bash\r\n    apt-get install python libzmq3-dev build-essential\r\n    ```\r\n  - Install bitcore:\r\n    ```bash\r\n    npm install -g bitcore\r\n    ```\r\n  - Start bitcore (ignore --testnet for mainnet):\r\n    ```bash\r\n    bitcore create mynode --testnet\r\n    ```\r\n\r\n- Clone this repository to folder `$(SIDETREE_BITCOIN_REPO)` and run the following:\r\n    ```bash\r\n      cd $(SIDETREE_BITCOIN_REPO)/bitcored-services/sidetree\r\n      npm install bitcore-lib\r\n    ```\r\n\r\n- Install insight UI:\r\n  ```bash\r\n  cd $(BITCORE_DIR)\r\n  bitcore install insight-api insight-ui\r\n  ```\r\n\r\n- Add a private key from a Bitcoin wallet to `$(SIDETREE_BITCOIN_REPO)/bitcored-services/sidetree/config.json`\r\n\r\n- Suppose that we install bitcored to `$(BITCORE_DIR)` on `$(NODE_IP)`, use the following instructions to add Sidetree's blockchain service:\r\n\r\n   ```bash\r\n      cd $(BITCORE_DIR)/node_modules\r\n      ln -s $(SIDETREE_BITCOIN_REPO)/bitcored-services/sidetree\r\n      add the string \"sidetree\" to the services array in $BITCORE_DIR/bitcore-node.json\r\n    ```\r\n\r\n- Start the `bitcored` daemon by running:\r\n\r\n   ```bash\r\n    cd $(BITCORE_DIR)\r\n    bitcored\r\n   ```\r\n\r\n- Verify that the bitcored installation was successful by pointing the browser to: `http://$(NODE_IP):3001/insight/`\r\n\r\nOnce Sidetree extension is running in bitcored correctly, we can now build and run the Sidetree blockchain service that will be talking to our Sidetree extension running in bitcored:\r\n\r\n 1. Clone this repo and go to the root folder.\r\n 1. Run `npm i` to install dependencies.\r\n 1. Modify `json/config.json` accordingly. Some parameters of interest:\r\n    1. Update `bitcoreSidetreeServiceUri` to point to the bitcored service configured earlier:\r\n       e.g. 'http://127.0.0.1:3002/SidetreeBlockchainService/'\r\n 1. Run `npm run build` to build the service.\r\n 1. Run 'npm start` to start the service. \r\n","readmeFilename":"README.md"}