{"_id":"@bitoroprotocol/chain-client-js","name":"@bitoroprotocol/chain-client-js","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bitoroprotocol/chain-client-js","version":"1.0.0","description":"General client library for the new Bitoro system (decentralized)","main":"build/src/index.js","scripts":{"build":"rm -rf build/ && npm run compile","commitlint":"commitlint --edit","compile":"tsc","compile:watch":"npm run compile -- --watch","coverage":"npm run test -- --coverage","fix":"npm run lint -- --fix","lint":"eslint --ext .ts,.js .","prepublishOnly":"npm run compile","release":"semantic-release","start":"node build/src/index.js","test":"NODE_ENV=test jest --testPathIgnorePatterns=__tests__/modules/client/*","test:watch":"npm test -- --watch","test-integration":"NODE_ENV=test jest","webpack":"webpack","update-cctp-protos":"sh scripts/generate-cctp-protos.sh"},"repository":{"type":"git","url":"git+https://github.com/bitoro-network/chain-clients.git"},"author":{"name":"Bitoro Trading Inc."},"license":"AGPL-3.0","bugs":{"url":"https://github.com/bitoro-network/chain-clients/issues"},"homepage":"https://github.com/bitoro-network/chain-clients#readme","dependencies":{"@cosmjs/amino":"^0.32.1","@cosmjs/encoding":"^0.32.1","@cosmjs/math":"^0.32.1","@cosmjs/proto-signing":"^0.32.1","@cosmjs/stargate":"^0.32.1","@cosmjs/tendermint-rpc":"^0.32.1","@cosmjs/utils":"^0.32.1","@bitoroprotocol/chain-proto":"0.0.1","@osmonauts/lcd":"^0.6.0","@scure/bip32":"^1.1.5","@scure/bip39":"^1.1.1","axios":"1.1.3","bech32":"^1.1.4","bignumber.js":"^9.1.1","cosmjs-types":"^0.9.0","ethereum-cryptography":"^2.0.0","ethers":"^6.6.1","long":"^4.0.0","protobufjs":">=6.11.4","ws":"^8.14.2"},"devDependencies":{"@commitlint/cli":"^19.5.0","@commitlint/config-conventional":"^19.5.0","@bitoroprotocol/node-service-base-dev":"^1.0.0","@protobufs/cosmos":"^0.0.11","@protobufs/gogoproto":"^0.0.10","@semantic-release/changelog":"^6.0.3","@semantic-release/npm":"^12.0.1","@types/ffi-napi":"^4.0.4","@types/ws":"8.5.4","@typescript-eslint/eslint-plugin":"v5.42.0","@typescript-eslint/parser":"v5.42.0","acorn":"^8.8.2","babel-loader":"^9.1.2","babel-polyfill":"^6.26.0","babel-preset-es2015":"^6.24.1","browserify-zlib":"^0.2.0","buffer":"^6.0.3","crypto-browserify":"^3.12.0","eslint-config-prettier":"^9.1.0","grpc-tools":"^1.12.4","https-browserify":"^1.0.0","node-polyfill-webpack-plugin":"^2.0.1","path-browserify":"^1.0.1","prettier":"3.2.5","semantic-release":"^24.1.1","stream-browserify":"^3.0.0","stream-http":"^3.2.0","ts-loader":"^9.4.2","ts-proto":"^1.165.1","util":"^0.12.5","webpack":"^5.77.0","webpack-cli":"^5.0.1"},"_id":"@bitoroprotocol/chain-client-js@1.0.0","gitHead":"87ba8bc30b415f110172d299eee3b13dc730f501","types":"./build/src/index.d.ts","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-zngFYSjwwxGE/wqBqOdXOS1rJkLeWQsg1lgnvqNqWgUh0MjtNxeN19Ka19RQuCqYC3BrlVBYrMIUuk0+n9U45g==","shasum":"bd5d9ee216edf9e0ae8c805533dc5572a6e6cac7","tarball":"https://registry.npmjs.org/@bitoroprotocol/chain-client-js/-/chain-client-js-1.0.0.tgz","fileCount":1090,"unpackedSize":23452915,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCwa1R/WggQhj3OWp9ZNw9s7tjSH2qEDqo+jn66fVfyQgIgEju/PTFVqwK1oAsynnqHIp89MATM9yssEbP0r0SWnE8="}]},"_npmUser":{"name":"martin0507","email":"martin.m0507@outlook.com"},"directories":{},"maintainers":[{"name":"ctonydev","email":"ctonydev@gmail.com"},{"name":"martin0507","email":"martin.m0507@outlook.com"},{"name":"bitoro","email":"brian@bitorolabs.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chain-client-js_1.0.0_1744136703010_0.33548040252535194"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-08T18:25:02.912Z","1.0.0":"2025-04-08T18:25:03.414Z","modified":"2025-04-08T18:25:03.676Z"},"maintainers":[{"name":"ctonydev","email":"ctonydev@gmail.com"},{"name":"martin0507","email":"martin.m0507@outlook.com"},{"name":"bitoro","email":"brian@bitorolabs.org"}],"description":"General client library for the new Bitoro system (decentralized)","homepage":"https://github.com/bitoro-network/chain-clients#readme","repository":{"type":"git","url":"git+https://github.com/bitoro-network/chain-clients.git"},"author":{"name":"Bitoro Trading Inc."},"bugs":{"url":"https://github.com/bitoro-network/chain-clients/issues"},"license":"AGPL-3.0","readme":"<p align=\"center\"><img src=\"https://bitoro.foundation/bitoro-token.svg?\" width=\"256\" /></p>\r\n\r\n<h1 align=\"center\">Bitoro Chain Client for Javascript</h1>\r\n\r\n<div align=\"center\">\r\n  <a href='https://www.npmjs.com/package/@bitoroprotocol/chain-client-js'>\r\n    <img src='https://img.shields.io/npm/v/@bitoroprotocol/chain-client-js.svg' alt='npm'/>\r\n  </a>\r\n  <a href='https://github.com/bitoro-network/chain-clients/blob/main/chain-client-js/LICENSE'>\r\n    <img src='https://img.shields.io/badge/License-AGPL_v3-blue.svg' alt='License' />\r\n  </a>\r\n</div>\r\n\r\nThe chain-Client Typescript client is used for placing transactions and querying the Bitoro chain.\r\n\r\n## Development\r\n\r\n`chain-client-js` uses node `v18` for development, see the .nvmrc file [here](https://github.com/bitoro-network/chain-clients/blob/main/chain-client-js/.nvmrc).\r\nYou can use `nvm` to manage different versions of node.\r\n\r\n```\r\nnvm install\r\nnvm use\r\nnvm alias default $(nvm version) # optional\r\n```\r\n\r\nYou can run the following commands to ensure that you are running the correct `node` and `npm` versions.\r\n\r\n```\r\nnode -v # expected: v20.x.x (should match .nvmrc)\r\nnpm -v  # expected: 10.x.x\r\n```\r\n\r\n### 1. Clone or fork the chain clients repo\r\n\r\n```bash\r\ngit clone git@github.com:bitoro-network/chain-clients.git\r\n```\r\n\r\n### 2. Go to one of the examples\r\n\r\n- Go to `chain-client-js/examples`\r\n\r\n```bash\r\ncd chain-client-js/examples\r\n```\r\n\r\nThese examples by default use a test account with `BITORO_TEST_MNEMONIC` from the TS client library under `chain-client-js/examples/constants`, but you can use any test address that you own.\r\n\r\n### 3. Run the scripts with node\r\n\r\n```bash\r\nnpm install\r\nnpm run build\r\n```\r\n\r\nYou should now see a `/build/examples` dir generated with JS files. We will use node to run these scripts\r\n\r\n- Open a terminal to run an example, e.g. account_endpoints.\r\n\r\n```bash\r\nnode ../build/examples/composite_example.js\r\n\r\n```\r\n\r\nEverytime you change the TS code, you need to run `npm run build` again, before you execute using node.\r\n\r\n## Single-JS for mobile apps\r\n\r\nMobile apps needs to load JS as a single JS file. To build, run\r\n\r\n```\r\nnpm run webpack\r\n```\r\n\r\nThe file is generated in **native**/**ios**/chain-native-client.js\r\nPending: Different configurations may be needed to generate JS for Android app\r\n\r\n## Release\r\n\r\nUsing the `npm version` command will update the appropriate version tags within the package locks and also will add a git tag with the version number..\r\nFor example `npm version minor` will perform the necessary changes for a minor version release. After the change is merged, a GitHub action will\r\n[publish](https://github.com/bitoro-network/chain-clients/blob/master/.github/workflows/js-publish.yml) the new release.\r\n","readmeFilename":"README.md","_rev":"1-af49e6d8700058cfedc0350c09f16e7a"}