{"id":42254639,"url":"https://github.com/bandprotocol/bandchain.js","last_synced_at":"2026-01-27T05:18:38.469Z","repository":{"id":39712435,"uuid":"298217502","full_name":"bandprotocol/bandchain.js","owner":"bandprotocol","description":"A JavaScript SDK that offers a comprehensive set of features for interacting with BandChain","archived":false,"fork":false,"pushed_at":"2025-08-20T10:56:32.000Z","size":5884,"stargazers_count":25,"open_issues_count":0,"forks_count":6,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-20T12:36:37.165Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bandprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-24T08:33:39.000Z","updated_at":"2025-08-20T10:56:35.000Z","dependencies_parsed_at":"2022-09-20T09:54:29.332Z","dependency_job_id":"1e3a59b9-4247-475b-9a81-2b504176a080","html_url":"https://github.com/bandprotocol/bandchain.js","commit_stats":{"total_commits":142,"total_committers":13,"mean_commits":"10.923076923076923","dds":0.619718309859155,"last_synced_commit":"2b3506be823cb1dff8c5aa7e0b264694f84e541a"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/bandprotocol/bandchain.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Fbandchain.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Fbandchain.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Fbandchain.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Fbandchain.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bandprotocol","download_url":"https://codeload.github.com/bandprotocol/bandchain.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bandprotocol%2Fbandchain.js/sbom","scorecard":{"id":225062,"data":{"date":"2025-08-11","repo":{"name":"github.com/bandprotocol/bandchain.js","commit":"3f1608ceef725a095603672a96273eb6fdc7425e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/e2e-tests.yaml:1","Warn: no topLevel permission defined: .github/workflows/run-tests.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":4,"reason":"5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/bandprotocol/bandchain.js/e2e-tests.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/bandprotocol/bandchain.js/e2e-tests.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run-tests.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/bandprotocol/bandchain.js/run-tests.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run-tests.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/bandprotocol/bandchain.js/run-tests.yaml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"28 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-xq7p-g2vc-g82p","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-7m27-7ghc-44w9","Warn: Project is vulnerable to: GHSA-qpjv-v59x-3qc4","Warn: Project is vulnerable to: GHSA-f82v-jwr5-mffw","Warn: Project is vulnerable to: GHSA-3h52-269p-cp9r","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T03:35:50.165Z","repository_id":39712435,"created_at":"2025-08-17T03:35:50.165Z","updated_at":"2025-08-17T03:35:50.165Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28803650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T03:44:14.111Z","status":"ssl_error","status_checked_at":"2026-01-27T03:43:33.507Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-27T05:18:37.886Z","updated_at":"2026-01-27T05:18:38.462Z","avatar_url":"https://github.com/bandprotocol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @bandprotocol/bandchain.js\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://avatars.githubusercontent.com/u/39086992?s=200\u0026v=4\" width=\"80\"\u003e\u003cbr /\u003e\n    TypeScript library for Cosmos SDK and BandChain\n\u003c/p\u003e\n\n\u003cp align=\"center\" width=\"100%\"\u003e\n   \u003ca href=\"https://github.com/bandprotocol/bandchain.js/blob/main/LICENSE\"\u003e\u003cimg height=\"20\" src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## install\n\n```sh\nnpm install @bandprotocol/bandchain.js\n```\n\n## Table of contents\n\n- [@bandprotocol/bandchain.js](#bandprotocolbandchainjs)\n  - [install](#install)\n  - [Table of contents](#table-of-contents)\n  - [Usage](#usage)\n    - [RPC Clients](#rpc-clients)\n    - [Composing Messages](#composing-messages)\n      - [IBC Messages](#ibc-messages)\n      - [Cosmos Messages](#cosmos-messages)\n  - [Connecting with Wallets and Signing Messages](#connecting-with-wallets-and-signing-messages)\n    - [Initializing the Stargate Client](#initializing-the-stargate-client)\n    - [Creating Signers](#creating-signers)\n    - [Amino Signer](#amino-signer)\n    - [Proto Signer](#proto-signer)\n    - [Broadcasting Messages](#broadcasting-messages)\n  - [Advanced Usage](#advanced-usage)\n  - [Developing](#developing)\n    - [Codegen](#codegen)\n    - [Publishing](#publishing)\n  - [Related](#related)\n  - [Credits](#credits)\n  - [Disclaimer](#disclaimer)\n\n## Usage\n\n### RPC Clients\n\n```js\nimport { band } from \"@bandprotocol/bandchain.js\";\n\nconst { createRPCQueryClient } = band.ClientFactory;\nconst client = await createRPCQueryClient({ rpcEndpoint: RPC_ENDPOINT });\n\n// now you can query the cosmos modules\nconst balance = await client.cosmos.bank.v1beta1.allBalances({\n  address: \"band1addresshere\",\n});\n\n// you can also query the band modules\nconst oracleScript = await client.band.oracle.v1.oracleScript({\n  oracleScriptId: BigInt(37),\n});\n```\n\n### Composing Messages\n\nImport the `band` object from `@bandprotocol/bandchain.js`.\n\n```js\nimport { band } from \"@bandprotocol/bandchain.js\";\n\nconst { requestData, reportData, createDataSource } =\n  band.oracle.v1.MessageComposer.withTypeUrl;\n```\n\n#### IBC Messages\n\n```js\nimport { ibc } from \"@bandprotocol/bandchain.js\";\n\nconst { transfer } = ibc.applications.transfer.v1.MessageComposer.withTypeUrl;\n```\n\n#### Cosmos Messages\n\n```js\nimport { cosmos } from \"@bandprotocol/bandchain.js\";\n\nconst {\n  fundCommunityPool,\n  setWithdrawAddress,\n  withdrawDelegatorReward,\n  withdrawValidatorCommission,\n} = cosmos.distribution.v1beta1.MessageComposer.fromPartial;\n\nconst { multiSend, send } = cosmos.bank.v1beta1.MessageComposer.fromPartial;\n\nconst {\n  beginRedelegate,\n  createValidator,\n  delegate,\n  editValidator,\n  undelegate,\n} = cosmos.staking.v1beta1.MessageComposer.fromPartial;\n\nconst { deposit, submitProposal, vote, voteWeighted } =\n  cosmos.gov.v1beta1.MessageComposer.fromPartial;\n```\n\n## Connecting with Wallets and Signing Messages\n\n⚡️ For web interfaces, we recommend using [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit). Continue below to see how to manually construct signers and clients.\n\nHere are the docs on [creating signers](https://docs.cosmology.zone/cosmos-kit) in cosmos-kit that can be used with Keplr and other wallets.\n\n### Initializing the Stargate Client\n\nUse `getSigningBandClient` to get your `SigningStargateClient`, with the proto/amino messages full-loaded. No need to manually add amino types, just require and initialize the client:\n\n```js\nimport { getSigningBandClient } from \"@bandprotocol/bandchain.js\";\n\nconst stargateClient = await getSigningBandClient({\n  rpcEndpoint,\n  signer, // OfflineSigner\n});\n```\n\n### Creating Signers\n\nTo broadcast messages, you can create signers with a variety of options:\n\n- [cosmos-kit](https://docs.cosmology.zone/cosmos-kit) (recommended)\n- [keplr](https://docs.keplr.app/api/cosmjs.html)\n- [cosmjs](https://gist.github.com/webmaster128/8444d42a7eceeda2544c8a59fbd7e1d9)\n\n### Amino Signer\n\nLikely you'll want to use the Amino, so unless you need proto, you should use this one:\n\n```js\nimport { getOfflineSignerAmino as getOfflineSigner } from \"cosmjs-utils\";\n```\n\n### Proto Signer\n\n```js\nimport { getOfflineSignerProto as getOfflineSigner } from \"cosmjs-utils\";\n```\n\nWARNING: NOT RECOMMENDED TO USE PLAIN-TEXT MNEMONICS. Please take care of your security and use best practices such as AES encryption and/or methods from 12factor applications.\n\n```js\nimport { chains } from \"chain-registry\";\n\nconst mnemonic =\n  \"unfold client turtle either pilot stock floor glow toward bullet car science\";\nconst chain = chains.find(({ chain_name }) =\u003e chain_name === \"band\");\nconst signer = await getOfflineSigner({\n  mnemonic,\n  chain,\n});\n```\n\n### Broadcasting Messages\n\nNow that you have your `stargateClient`, you can broadcast messages:\n\n```js\nconst { send } = cosmos.bank.v1beta1.MessageComposer.withTypeUrl;\n\nconst msg = send({\n    amount: [\n    {\n        denom: 'coin',\n        amount: '1000'\n    }\n    ],\n    toAddress: address,\n    fromAddress: address\n});\n\nconst fee: StdFee = {\n    amount: [\n    {\n        denom: 'coin',\n        amount: '864'\n    }\n    ],\n    gas: '86364'\n};\nconst response = await stargateClient.signAndBroadcast(address, [msg], fee);\n```\n\n## Advanced Usage\n\nIf you want to manually construct a stargate client\n\n```js\nimport { OfflineSigner, GeneratedType, Registry } from \"@cosmjs/proto-signing\";\nimport { AminoTypes, SigningStargateClient } from \"@cosmjs/stargate\";\n\nimport {\n    cosmosAminoConverters,\n    cosmosProtoRegistry,\n    cosmwasmAminoConverters,\n    cosmwasmProtoRegistry,\n    ibcProtoRegistry,\n    ibcAminoConverters,\n    bandAminoConverters,\n    bandProtoRegistry\n} from 'bandchain.js';\n\nconst signer: OfflineSigner = /* create your signer (see above)  */\nconst rpcEndpint = 'https://rpc.cosmos.directory/band'; // or another URL\n\nconst protoRegistry: ReadonlyArray\u003c[string, GeneratedType]\u003e = [\n    ...cosmosProtoRegistry,\n    ...cosmwasmProtoRegistry,\n    ...ibcProtoRegistry,\n    ...bandProtoRegistry\n];\n\nconst aminoConverters = {\n    ...cosmosAminoConverters,\n    ...cosmwasmAminoConverters,\n    ...ibcAminoConverters,\n    ...bandAminoConverters\n};\n\nconst registry = new Registry(protoRegistry);\nconst aminoTypes = new AminoTypes(aminoConverters);\n\nconst stargateClient = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, {\n    registry,\n    aminoTypes\n});\n```\n\n## Developing\n\nWhen first cloning the repo:\n\n```\nyarn\nyarn build\n```\n\n### Codegen\n\nLook inside of `scripts/codegen.ts` and configure the settings for bundling your SDK and contracts into `@bandprotocol/bandchain.js`:\n\n```\nyarn codegen\n```\n\n### Publishing\n\nTo publish, use `lerna`:\n\n```\nlerna publish\n```\n\nYou can publish patch, minor, or major versions:\n\n```\nlerna publish minor\n```\n\nIf you absolutely need to publish manually using npm, ensure to do it this way, and publish from the `dist/` directory for proper tree-shaking module paths:\n\n```\ncd ./packages/\u003cyour-telescope-module\u003e\nyarn build\ncd dist\nnpm publish\n```\n\n## Related\n\nCheckout these related projects:\n\n- [@cosmology/telescope](https://github.com/cosmology-tech/telescope) Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules.\n- [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) Convert your CosmWasm smart contracts into dev-friendly TypeScript classes.\n- [chain-registry](https://github.com/cosmology-tech/chain-registry) Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application.\n- [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit) Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface.\n- [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-app) Set up a modern Cosmos app by running one command.\n- [interchain-ui](https://github.com/cosmology-tech/interchain-ui) The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit.\n- [starship](https://github.com/cosmology-tech/starship) Unified Testing and Development for the Interchain.\n\n## Credits\n\n🛠 Built by Cosmology — if you like our tools, please consider delegating to [our validator ⚛️](https://cosmology.zone/validator)\n\n## Disclaimer\n\nAS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.\n\nNo developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandprotocol%2Fbandchain.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbandprotocol%2Fbandchain.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandprotocol%2Fbandchain.js/lists"}