{"_id":"@chenyufei2022/hive-js-sdk","_rev":"2-2d2f2ec88cdeac0aa07e7a24e78300fd","name":"@chenyufei2022/hive-js-sdk","dist-tags":{"latest":"2.2.4"},"versions":{"2.2.2":{"name":"@chenyufei2022/hive-js-sdk","version":"2.2.2","description":"Elastos Hive JS SDK","exports":{"node":"./dist/hive.js","browser":{"import":"./dist/es/hive.browser.js"}},"main":"./dist/hive.js","module":"./dist/es/hive.js","typings":"typings/","browser":{"./dist/hive.js":"./dist/hive.browser.js","./dist/es/hive.js":"./dist/es/hive.browser.js"},"scripts":{"prepublishOnly":"npm run build","build":"npm run build:release","build:debug":"npm run clean && npm run types && rollup -c","build:release":"npm run lint && npm run clean && npm run types && rollup -c --environment prodbuild","dev":"rollup -c -w","clean":"rm -rf ./dist ./typings ./generated","types":"npm run clean && tsc --emitDeclarationOnly --outDir typings/ --project tsconfig.types.json","tsc:build":"rollup -c","tsc:w":"tsc -w","docs":"npx typedoc src/index.ts --excludePrivate --excludeProtected --excludeInternal","lint":"eslint './src/**/*.{ts,tsx}' && eslint './tests/src/**/*.{ts,tsx}'","test":"jest","test:node":"JEST_CIRCUS=1 jest --silent=false --verbose --runInBand --config jest.node.config.ts","test:node:debug":"JEST_CIRCUS=1 node --inspect-brk node_modules/.bin/jest --runInBand --config jest.node.config.ts","test:node-no-jest":"rollup -c rollup.no-jest.config.js && node generated/tests-no-jest.js","test:browser":"npm run clean && rollup -c rollup.browsertests.config.js","test:node:profile":"JEST_CIRCUS=1 node --prof --no-logfile-per-isolate ./node_modules/.bin/jest --silent=false --verbose --runInBand --config jest.node.config.ts -- crypto/hdkey.test && node --prof-process v8.log > processed.log && echo '' && echo 'Please open processed.log'. && echo ''"},"dependencies":{"@chenyufei2022/did-js-sdk":"^2.2.2","@types/bs58":"^4.0.1","@types/fs-extra":"^9.0.13","axios":"^0.24.0","browserfs":"^1.4.3","bs58":"^5.0.0","buffer":"^5.6.0","cd":"^0.3.3","dayjs":"^1.10.4","jsrsasign":"^10.5.0","jsrsasign-util":"^1.0.2","postcss":"^8.4.4","pretend":"^3.1.0","promise-queue":"^2.2.5","ts-retrofit":"^1.17.0","tslib":"^2.3.1","url":"^0.11.0","web3":"^1.6.0"},"repository":{"type":"git","url":"git+https://github.com/elastos/Elastos.Hive.JS.SDK.git"},"devDependencies":{"@babel/core":"^7.16.0","@babel/plugin-proposal-class-properties":"^7.13.0","@babel/plugin-proposal-decorators":"^7.16.4","@babel/preset-env":"^7.16.4","@babel/preset-typescript":"^7.13.0","@rollup/plugin-alias":"^3.1.5","@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-eslint":"^8.0.1","@rollup/plugin-inject":"^4.0.2","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.6","@rollup/plugin-replace":"^3.0.0","@rollup/plugin-typescript":"^8.2.1","@types/bn.js":"^5.1.0","@types/crypto-js":"^4.0.1","@types/jest":"^26.0.24","@types/node":"^14.18.2","@types/promise-queue":"^2.2.0","@typescript-eslint/eslint-plugin":"^5.26.0","@typescript-eslint/parser":"^5.26.0","antlr4ts-cli":"^0.5.0-alpha.4","babel-jest":"^27.5.1","eslint":"^8.16.0","eslint-plugin-import":"^2.24.2","eslint-plugin-jest":"^26.2.2","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-node":"^26.6.2","jest-html-reporter":"^3.4.1","jest-lite":"^1.0.0-alpha.4","lint-staged":"^10.0.8","node-fetch":"^2.6.6","path-browserify":"^1.0.1","rollup":"^2.60.1","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-copy-assets":"^2.0.3","rollup-plugin-css-only":"^3.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-postcss":"^4.0.2","rollup-plugin-serve":"^1.1.0","rollup-plugin-size":"^0.2.2","rollup-plugin-terser":"^7.0.2","rollup-plugin-typescript":"^1.0.1","rollup-plugin-typescript2":"^0.30.0","rollup-plugin-visualizer":"^5.5.2","ts-jest":"^26.5.6","ts-node":"^10.8.0","typedoc":"^0.22.13","typescript":"^4.5.2"},"include":["typings","dist"],"author":{"name":"Elastos"},"license":"MIT","bugs":{"url":"https://github.com/elastos/Elastos.Hive.JS.SDK/issues"},"homepage":"https://github.com/elastos/Elastos.Hive.JS.SDK#readme","directories":{"test":"tests"},"lint-staged":{"src/**/*.{js,ts,tsx}":["eslint"],"tests/src/**/*.{js,ts,tsx}":["eslint"]},"gitHead":"f9be9aa25273f6638707009ca001778274046861","_id":"@chenyufei2022/hive-js-sdk@2.2.2","_nodeVersion":"16.13.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-ZjnGRrif8JaxgZpoYNCjUWM9m52ZZdBo+E2ukh2A4/5yX0XUCGJMJJQ0TOC9oT5Vlc/kf1uNbdzj5a23YbBeMA==","shasum":"b8abf40750fa6be3dfa4a1af676f027bbac68f5f","tarball":"https://registry.npmjs.org/@chenyufei2022/hive-js-sdk/-/hive-js-sdk-2.2.2.tgz","fileCount":104,"unpackedSize":4607037,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbRWWEin8T5ED4d0+yU5+RKUjIQwXG1Whj2QyawssUsAIhAOhlnXovPUOAwGSAuODGJIRbsFQmK4fenqlh7TaOIfPZ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWieRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoN9Q/6AhzSYsnacKX8yTK27H9rAVmIkaGNPLQdHvmJiDeQS2pMTDsp\r\nMbTwvZM1OkxLf2+Uh6P7oLaDfOVu+oorCtWTlnHx1VXAIb+pFVOBabloj7co\r\njZiNjzsLjf8s4fxLclK3Iu/Rfx70K+W0fQxu1016OhKGAXIZQwWaSRy8Y+BM\r\nhCib+/v38efH33v/7owqDZAFVLlNs3I7Umnslu6hCKxiWvPwDZ92hjJ0b24l\r\nmkIZEkXCp7q0f8G68V/MPIyFYYSPczUFrPfjudJ1/LADQBjcjRvdrny/GGmI\r\nIjfklM4q7PcPyKkccX2oneGK8Ef5jr0dPyHnRVNRNruuaA1yvhh5SuWYTcb4\r\nt1Q4xbkS1gClR894ueBrHdIXL7D0MC8OBVuD3xoZHJwobmmm/tGZex/+/xNX\r\neaLHewS34BrASEFJ1W8J8iQWg2wtfVQsZfXy7i0pDUn7I8Vx4n4++AehrNXh\r\nqFtcjwoULZegfjAGQ64LkK/ApoapWXmyh9m14IabN1QfNJEBTlF0PVTjkdR3\r\nSMoXg0iHEkfrMZumjfGxRuLc+0yXgOFsx4xj8OBTkGTgSsetNyjpGpvochkY\r\nwE4d0jjz/6NZiumv++1LbangRhwCJkZ99JMNrSXDvY7QTBOYmIbSw1VWIl2C\r\nqoV7z7IrLvZ/zRx5czXouX3IoQmBieoYh+c=\r\n=YpKA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"chenyufei2022","email":"elastos.chen.yufei@gmail.com"},"maintainers":[{"name":"chenyufei2022","email":"elastos.chen.yufei@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hive-js-sdk_2.2.2_1666852752990_0.22376095624220982"},"_hasShrinkwrap":false},"2.2.3":{"name":"@chenyufei2022/hive-js-sdk","version":"2.2.3","description":"Elastos Hive JS SDK","exports":{"node":"./dist/hive.js","browser":{"import":"./dist/es/hive.browser.js"}},"main":"./dist/hive.js","module":"./dist/es/hive.js","typings":"typings/","browser":{"./dist/hive.js":"./dist/hive.browser.js","./dist/es/hive.js":"./dist/es/hive.browser.js"},"scripts":{"prepublishOnly":"npm run build","build":"npm run build:release","build:debug":"npm run clean && npm run types && rollup -c","build:release":"npm run lint && npm run clean && npm run types && rollup -c --environment prodbuild","dev":"rollup -c -w","clean":"rm -rf ./dist ./typings ./generated","types":"npm run clean && tsc --emitDeclarationOnly --outDir typings/ --project tsconfig.types.json","tsc:build":"rollup -c","tsc:w":"tsc -w","docs":"npx typedoc src/index.ts --excludePrivate --excludeProtected --excludeInternal","lint":"eslint './src/**/*.{ts,tsx}' && eslint './tests/src/**/*.{ts,tsx}'","test":"jest","test:node":"JEST_CIRCUS=1 jest --silent=false --verbose --runInBand --config jest.node.config.ts","test:node:debug":"JEST_CIRCUS=1 node --inspect-brk node_modules/.bin/jest --runInBand --config jest.node.config.ts","test:node-no-jest":"rollup -c rollup.no-jest.config.js && node generated/tests-no-jest.js","test:browser":"npm run clean && rollup -c rollup.browsertests.config.js","test:node:profile":"JEST_CIRCUS=1 node --prof --no-logfile-per-isolate ./node_modules/.bin/jest --silent=false --verbose --runInBand --config jest.node.config.ts -- crypto/hdkey.test && node --prof-process v8.log > processed.log && echo '' && echo 'Please open processed.log'. && echo ''"},"dependencies":{"@chenyufei2022/did-js-sdk":"^2.2.2","@types/bs58":"^4.0.1","@types/fs-extra":"^9.0.13","axios":"^0.24.0","browserfs":"^1.4.3","bs58":"^5.0.0","buffer":"^5.6.0","cd":"^0.3.3","dayjs":"^1.10.4","jsrsasign":"^10.5.0","jsrsasign-util":"^1.0.2","postcss":"^8.4.4","pretend":"^3.1.0","promise-queue":"^2.2.5","ts-retrofit":"^1.17.0","tslib":"^2.3.1","url":"^0.11.0","web3":"^1.6.0"},"repository":{"type":"git","url":"git+https://github.com/elastos/Elastos.Hive.JS.SDK.git"},"devDependencies":{"@babel/core":"^7.16.0","@babel/plugin-proposal-class-properties":"^7.13.0","@babel/plugin-proposal-decorators":"^7.16.4","@babel/preset-env":"^7.16.4","@babel/preset-typescript":"^7.13.0","@rollup/plugin-alias":"^3.1.5","@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-eslint":"^8.0.1","@rollup/plugin-inject":"^4.0.2","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.6","@rollup/plugin-replace":"^3.0.0","@rollup/plugin-typescript":"^8.2.1","@types/bn.js":"^5.1.0","@types/crypto-js":"^4.0.1","@types/jest":"^26.0.24","@types/node":"^14.18.2","@types/promise-queue":"^2.2.0","@typescript-eslint/eslint-plugin":"^5.26.0","@typescript-eslint/parser":"^5.26.0","antlr4ts-cli":"^0.5.0-alpha.4","babel-jest":"^27.5.1","eslint":"^8.16.0","eslint-plugin-import":"^2.24.2","eslint-plugin-jest":"^26.2.2","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-node":"^26.6.2","jest-html-reporter":"^3.4.1","jest-lite":"^1.0.0-alpha.4","lint-staged":"^10.0.8","node-fetch":"^2.6.6","path-browserify":"^1.0.1","rollup":"^2.60.1","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-copy-assets":"^2.0.3","rollup-plugin-css-only":"^3.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-postcss":"^4.0.2","rollup-plugin-serve":"^1.1.0","rollup-plugin-size":"^0.2.2","rollup-plugin-terser":"^7.0.2","rollup-plugin-typescript":"^1.0.1","rollup-plugin-typescript2":"^0.30.0","rollup-plugin-visualizer":"^5.5.2","ts-jest":"^26.5.6","ts-node":"^10.8.0","typedoc":"^0.22.13","typescript":"^4.5.2"},"include":["typings","dist"],"author":{"name":"Elastos"},"license":"MIT","bugs":{"url":"https://github.com/elastos/Elastos.Hive.JS.SDK/issues"},"homepage":"https://github.com/elastos/Elastos.Hive.JS.SDK#readme","directories":{"test":"tests"},"lint-staged":{"src/**/*.{js,ts,tsx}":["eslint"],"tests/src/**/*.{js,ts,tsx}":["eslint"]},"gitHead":"f9be9aa25273f6638707009ca001778274046861","_id":"@chenyufei2022/hive-js-sdk@2.2.3","_nodeVersion":"16.13.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-81F6kLAJO/citZdSoxe764pDZjuX6k9ETjB4ol/bIN/jJlmGEmyWVFMGtJeIwAY1i6RKPqkqXw76MTSgMSCooA==","shasum":"ec6aaae59b16ea6aa00689e6f8f8aadeb004c09b","tarball":"https://registry.npmjs.org/@chenyufei2022/hive-js-sdk/-/hive-js-sdk-2.2.3.tgz","fileCount":104,"unpackedSize":4607037,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB5b8WqKopdcEKyGPqiDEhgO48MRfKKhTm965rZ4ltBIAiEAyUZ7HZysWSMeVxfTeQwDAxxiA+ML5cCSsITk+ZU2tf4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjW1rJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1AQ/+Mpv04pSLptgzAAur8jcWiZPOARv2gPXbYWTpY+I7tIGMlmls\r\nwvphvQigUB5qiWAyK4nPndBYzAAKgwvQSXhySCCys2W49zDYxbNMUqZo2RYO\r\nrX0lxrdMNmFqXkBsMPlqQOxCdH3UGl50i1IRo/awP1Vj1ujTMjxuFmMVqUEr\r\nw7/DaYJyllBiPEqHLJvSHaIawWacF4zzujhgQnZFwkSxGpF87qUIWJ7tbO7B\r\nA9f+mSV4KFL5qLplCfTbz3jeMZlN2NzpIQNefv+lL6Ug92wQsgkT3I2hLcC5\r\niN0YXZVDis37qohhnm9kkrWRdB+U71L9ysHUf2iJYx5jb/8wfuI/CuAQUSZS\r\nvdjjJtR1ooxkqvdlsHLSaDNQH9+Hdca9GlaA/VL2kJHbe2gaU3YU56msBmeS\r\n9NNjfHz7dg6WNyqbhw+pmeqhbPA6BXlV+2Z84k0L3KU8As2OTtVu7+szjFNP\r\nFrOTyv1cTZpMrjvT7te2a+KyL6X6WUIsKwipneRpJNkRX8rfh3oHXuLuY/HL\r\nefh5JJCbDVE5LCewyIsx4PswEnUviAVgT/QOmTzbkG9WX+Dn+PgHasAbXysw\r\nkx5EaSPYqgEgBMFq3RotJQV3lPh+FoiHZqf8Du7s9XvJQgQVu1Wf4KP3n98d\r\nNTl3QT33FiEIhluiVrZE039UMmLQ2RMo8V4=\r\n=Z9Yf\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"chenyufei2022","email":"elastos.chen.yufei@gmail.com"},"maintainers":[{"name":"chenyufei2022","email":"elastos.chen.yufei@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hive-js-sdk_2.2.3_1666931400771_0.6935352651461255"},"_hasShrinkwrap":false},"2.2.4":{"name":"@chenyufei2022/hive-js-sdk","version":"2.2.4","description":"Elastos Hive JS SDK","exports":{"node":"./dist/hive.js","browser":{"import":"./dist/es/hive.browser.js"}},"main":"./dist/hive.js","module":"./dist/es/hive.js","typings":"typings/","browser":{"./dist/hive.js":"./dist/hive.browser.js","./dist/es/hive.js":"./dist/es/hive.browser.js"},"scripts":{"prepublishOnly":"npm run build","build":"npm run build:release","build:debug":"npm run clean && npm run types && rollup -c","build:release":"npm run lint && npm run clean && npm run types && rollup -c --environment prodbuild","dev":"rollup -c -w","clean":"rm -rf ./dist ./typings ./generated","types":"npm run clean && tsc --emitDeclarationOnly --outDir typings/ --project tsconfig.types.json","tsc:build":"rollup -c","tsc:w":"tsc -w","docs":"npx typedoc src/index.ts --excludePrivate --excludeProtected --excludeInternal","lint":"eslint './src/**/*.{ts,tsx}' && eslint './tests/src/**/*.{ts,tsx}'","test":"jest","test:node":"JEST_CIRCUS=1 jest --silent=false --verbose --runInBand --config jest.node.config.ts","test:node:debug":"JEST_CIRCUS=1 node --inspect-brk node_modules/.bin/jest --runInBand --config jest.node.config.ts","test:node-no-jest":"rollup -c rollup.no-jest.config.js && node generated/tests-no-jest.js","test:browser":"npm run clean && rollup -c rollup.browsertests.config.js","test:node:profile":"JEST_CIRCUS=1 node --prof --no-logfile-per-isolate ./node_modules/.bin/jest --silent=false --verbose --runInBand --config jest.node.config.ts -- crypto/hdkey.test && node --prof-process v8.log > processed.log && echo '' && echo 'Please open processed.log'. && echo ''"},"dependencies":{"@chenyufei2022/did-js-sdk":"^2.2.2","@types/bs58":"^4.0.1","@types/fs-extra":"^9.0.13","axios":"^0.24.0","browserfs":"^1.4.3","bs58":"^5.0.0","buffer":"^5.6.0","cd":"^0.3.3","dayjs":"^1.10.4","jsrsasign":"^10.5.0","jsrsasign-util":"^1.0.2","postcss":"^8.4.4","pretend":"^3.1.0","promise-queue":"^2.2.5","ts-retrofit":"^1.17.0","tslib":"^2.3.1","url":"^0.11.0","web3":"^1.6.0"},"repository":{"type":"git","url":"git+https://github.com/elastos/Elastos.Hive.JS.SDK.git"},"devDependencies":{"@babel/core":"^7.16.0","@babel/plugin-proposal-class-properties":"^7.13.0","@babel/plugin-proposal-decorators":"^7.16.4","@babel/preset-env":"^7.16.4","@babel/preset-typescript":"^7.13.0","@rollup/plugin-alias":"^3.1.5","@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-eslint":"^8.0.1","@rollup/plugin-inject":"^4.0.2","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.6","@rollup/plugin-replace":"^3.0.0","@rollup/plugin-typescript":"^8.2.1","@types/bn.js":"^5.1.0","@types/crypto-js":"^4.0.1","@types/jest":"^26.0.24","@types/node":"^14.18.2","@types/promise-queue":"^2.2.0","@typescript-eslint/eslint-plugin":"^5.26.0","@typescript-eslint/parser":"^5.26.0","antlr4ts-cli":"^0.5.0-alpha.4","babel-jest":"^27.5.1","eslint":"^8.16.0","eslint-plugin-import":"^2.24.2","eslint-plugin-jest":"^26.2.2","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-node":"^26.6.2","jest-html-reporter":"^3.4.1","jest-lite":"^1.0.0-alpha.4","lint-staged":"^10.0.8","node-fetch":"^2.6.6","path-browserify":"^1.0.1","rollup":"^2.60.1","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-copy-assets":"^2.0.3","rollup-plugin-css-only":"^3.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-postcss":"^4.0.2","rollup-plugin-serve":"^1.1.0","rollup-plugin-size":"^0.2.2","rollup-plugin-terser":"^7.0.2","rollup-plugin-typescript":"^1.0.1","rollup-plugin-typescript2":"^0.30.0","rollup-plugin-visualizer":"^5.5.2","ts-jest":"^26.5.6","ts-node":"^10.8.0","typedoc":"^0.22.13","typescript":"^4.5.2"},"include":["typings","dist"],"author":{"name":"Elastos"},"license":"MIT","bugs":{"url":"https://github.com/elastos/Elastos.Hive.JS.SDK/issues"},"homepage":"https://github.com/elastos/Elastos.Hive.JS.SDK#readme","directories":{"test":"tests"},"lint-staged":{"src/**/*.{js,ts,tsx}":["eslint"],"tests/src/**/*.{js,ts,tsx}":["eslint"]},"gitHead":"f9be9aa25273f6638707009ca001778274046861","_id":"@chenyufei2022/hive-js-sdk@2.2.4","_nodeVersion":"16.13.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-+F0DdVsNEjRzvOR2me+F5N+bQ189hmG0CiT2xNzVff02Hv3N5LjIalBDHV9TaBygCC45wDq7QhhNdiJQgPP0Cg==","shasum":"bbfe1e55fb9109ca8dd82f67d09bbd86ad537c16","tarball":"https://registry.npmjs.org/@chenyufei2022/hive-js-sdk/-/hive-js-sdk-2.2.4.tgz","fileCount":104,"unpackedSize":2796654,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCm03LPqONbu6j6waHTfTeas3+yNlWngp0sw6AZI60VQgIgPsIlruDBC/e/219r5nKSM5DwLgQe5xo4++OunaSmRrk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjW1+VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQyg//TzGwYXAkiuOHkH11dt8TltgZHOtKYAVCw2MkLIeNqRTcULx4\r\ntZJX/kLt64GBU8OsEX/2SlCM88EIFZ87/XtCHOUaQEJ/qcKj2vObr3r+Yd0O\r\nSKtya9XNLxQo7wo0UMgMdhFXRxGAw8QAPFzrcET7fTOQx3+0tirNvAm+MwyP\r\nk65NC5B1fjaYrvW7+YRV1ZtHdOkUEypPkspPoohGwBZLT5VfI23xSR/UZjA6\r\nAsid71GGQJkxvPlO0x1i/R0VfrFEA5nzIEX/HDAo4SeiqUg6xS0D6AtIc0WJ\r\nUhQ5gOhsXLrkwIuX3oUFNd8OZ2o9B6GVlZjqUSsF2hnaNVm2Eq7Hr/IJT4tl\r\n25u/Ve1QXSpbBM+co0cDIJlFxajjAi7RQLMIMtC4R0q+oQ/92kvQ0vpOpv/l\r\n97ed07OTpgucg3EdP2zQy/gPGZXD6braAN+SbFClEV14L1svqhxMiRYFRdio\r\nvrL2aZwCeqlCgG3+rSQxiWxfbIKEH+eboB+Gj8ayFbtOK5VjnNOmFZ2mkgBU\r\n3Ywbxq7Tw+PDq6L1GED1XTxjC+2V+7VopgtLSvkBk2A40NMOB/zKdY6CbgGr\r\n3kV7hHzACP3a+mtKn1c8T7qBE+1stjCTW4+rVSXjNcV3cT1PRlcJaboz2L8l\r\nPba+rQWH4mueiQt4ZV95VbvHODg8OlzBhbs=\r\n=FpNt\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"chenyufei2022","email":"elastos.chen.yufei@gmail.com"},"maintainers":[{"name":"chenyufei2022","email":"elastos.chen.yufei@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hive-js-sdk_2.2.4_1666932629447_0.49481142720740445"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-27T06:39:12.926Z","2.2.2":"2022-10-27T06:39:13.205Z","modified":"2022-10-28T04:50:29.817Z","2.2.3":"2022-10-28T04:30:01.113Z","2.2.4":"2022-10-28T04:50:29.745Z"},"maintainers":[{"name":"chenyufei2022","email":"elastos.chen.yufei@gmail.com"}],"description":"Elastos Hive JS SDK","homepage":"https://github.com/elastos/Elastos.Hive.JS.SDK#readme","repository":{"type":"git","url":"git+https://github.com/elastos/Elastos.Hive.JS.SDK.git"},"author":{"name":"Elastos"},"bugs":{"url":"https://github.com/elastos/Elastos.Hive.JS.SDK/issues"},"license":"MIT","readme":"# Elastos Hive JS SDK\n\nElastos Hive is an essential service infrastructure as a decentralized network of Hive nodes presenting data storage capabilities to dApps. And the JS SDK provides a group of APIs for Elastos dApps to easily access and store application data to remote Vault services on Hive nodes with the following features:\n\n- Subscribe/unsubscribe to vault or backup vault\n- Scripting execution\n- Upload/Download files\n- Structured data object access and store onto MongoDB (Not supported yet)\n- Key/Values (Not supported yet);\n\nElastos Hive will keep the promise that **users remain in full control of their own data** and committing the practice on it.\n\n## SDK integration with NodeJS\n\nTo add the Hive JS SDK dependency to your project, run the following command from your source folder:\n\n```shell\nnpm i --save @elastosfoundation/hive-js-sdk\n```\n\n## Build from source\n\nPreparing with the developer tool **git**, and then run the following commands to clone the source:\n\n```shell\ngit clone https://github.com/elastos/Elastos.NET.Hive.JS.SDK\ncd Elastos.NET.Hive.JS.SDK\nnpm install\nnpm run types\nnpm run build\n```\n\n## Test configuration\n\nBefore running tests, the local user directory must be defined with the following command:\n\n```shell\nexport HIVE_USER_DIR=/path/to/user/dir\n```\n\nThen, modify the \"provider\" field tests/src/res/custom.json to point to your own local hive node.\n\n## Run NodeJS tests\n\nFrom the source folder, build the project, then run the following commands:\n\n```shell\ncd tests\nnpm run clean\nnpm install\nnpm run test:node\n```\n\n## Run Browser tests\n\nFrom the source folder, build the project, then run the following commands:\n\n```shell\ncd tests\nnpm run clean\nnpm install\nnpm run test:browser\n```\n\n## Writing tests\n\nThe test context is based on the TestData class located in `/tests/src/config/testdata.ts`. The creation of this class will create the test context and set the user directory. The class should be created before each test using the following code:\n\n`testData = await TestData.getInstance(\"TEST SUITE NAME\", CONFIGURATION, \"OPTIONAL USER DIRECTORY\");`\n\nExample:\n\n```javascript\ntestData = await TestData.getInstance(\"My service tests\", ClientConfig.LOCAL);\n```\n\n**Note:** The optional third parameter of the TestData.getInstance method is the user directory which defaults to the path defined by the HIVE_USER_DIR environment variable (See [Test configuration](#test-configuration). You may also specify a custom folder, but it's recommended to only use this parameter on a local workstation for validation.\n\n### Test example\n\n```javascript\nimport {\n  VaultSubscriptionService,\n  PricingPlan,\n} from \"@elastosfoundation/hive-js-sdk\";\nimport { ClientConfig } from \"../config/clientconfig\";\nimport { TestData } from \"../config/testdata\";\n\ndescribe(\"pricing plans\", () => {\n  let testData: TestData;\n  let vaultSubscriptionService: VaultSubscriptionService;\n\n  beforeEach(async () => {\n    testData = await TestData.getInstance(\n      \"pricingplans.test\",\n      ClientConfig.TESTNET\n    );\n    vaultsubscriptionService = new VaultSubscriptionService(\n      testData.getAppContext(),\n      testData.getProviderAddress()\n    );\n  });\n\n  test(\"get vault pricing plans\", async () => {\n    let plans: PricingPlan[] =\n      await vaultsubscriptionService.getPricingPlanList();\n    expect(plans).not.toBeNull();\n    expect(plans.length).toBeGreaterThan(0);\n  });\n});\n```\n\n## Usage\n\nIn order to subscribe to a vault (create) a user needs to implement AppContextProvider\n\n```javascript\nexport class ApiServiceContextProvider implements AppContextProvider {\n    getLocalDataDir = () : string => {\n        ...\n    };\n\n    getAppInstanceDocument = async () : Promise<DIDDocument> => {\n       ...\n    };\n\n    getAuthorization = async (authenticationChallengeJWtCode: string): Promise<string> => {\n      ...\n    }\n}\n\nlet vaultSubscriptionService : VaultSubscription = new VaultSubscription(appContext, \"[hiveNode address]\");\nlet vaultInfo = await vaultSubscriptionService.subscribe();\n```\n\nThe same mechanics is used by VaultService, which provides all services to interact with hive vault\n\n```javascript\nlet vaultServices = new Vault(appContext, \"[hiveNode address]\");\nlet scriptingService = vaultServices.getScriptingService();\nlet filesService = vaultServices.getFilesService();\nlet databaseService = vaultServices.getDatabaseService();\n...\n```\n","readmeFilename":"README.md"}