{"id":39118183,"url":"https://github.com/nibiruchain/ts-sdk","last_synced_at":"2026-01-17T20:22:54.080Z","repository":{"id":54763158,"uuid":"521905972","full_name":"NibiruChain/ts-sdk","owner":"NibiruChain","description":"TypeScript-based client for interacting with the Nibiru blockchain","archived":false,"fork":false,"pushed_at":"2025-11-03T14:42:32.000Z","size":7129,"stargazers_count":36,"open_issues_count":8,"forks_count":8,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-11-03T16:13:36.658Z","etag":null,"topics":["blockchain","cosmjs","cosmos","cosmos-sdk","nibiru","nibiru-chain","sdk-ts","typescript"],"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/NibiruChain.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-06T09:44:39.000Z","updated_at":"2025-10-15T13:16:08.000Z","dependencies_parsed_at":"2023-10-16T02:42:19.606Z","dependency_job_id":"d2586148-3cd8-49c8-a673-2857ee543cb4","html_url":"https://github.com/NibiruChain/ts-sdk","commit_stats":{"total_commits":358,"total_committers":13,"mean_commits":27.53846153846154,"dds":0.6899441340782123,"last_synced_commit":"d6a053a1296cb2630e700521357ebb0e03c3988f"},"previous_names":[],"tags_count":125,"template":false,"template_full_name":null,"purl":"pkg:github/NibiruChain/ts-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NibiruChain%2Fts-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NibiruChain%2Fts-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NibiruChain%2Fts-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NibiruChain%2Fts-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NibiruChain","download_url":"https://codeload.github.com/NibiruChain/ts-sdk/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NibiruChain%2Fts-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28517526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T18:55:29.170Z","status":"ssl_error","status_checked_at":"2026-01-17T18:55:03.375Z","response_time":85,"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":["blockchain","cosmjs","cosmos","cosmos-sdk","nibiru","nibiru-chain","sdk-ts","typescript"],"created_at":"2026-01-17T20:22:53.100Z","updated_at":"2026-01-17T20:22:54.070Z","avatar_url":"https://github.com/NibiruChain.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/NibiruChain/ts-sdk/develop/img/nibijs.png\" width=\"100%\"\u003e\n\u003c/p\u003e\n\n\u003c!-- NOTE: Use direct links for external sites that copy these files. --\u003e\n\n\u003cp align=\"center\"\u003e\nThe official TypeScript SDK for the Nibiru blockchain!\n\u003c/p\u003e\n\n\u003cdiv style=\"display: flex; flex-direction: row; gap: 4px;\"\u003e\n\u003c!-- Badge | NPM version --\u003e\n\u003ca target=\"_blank\" href=\"https://www.npmjs.com/package/@nibiruchain/nibijs\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/@nibiruchain/nibijs.svg?color=AE8CCD\" style=\"height: 20px\"\u003e\n\u003c/a\u003e\n\n\u003c!-- Badge | Test workflows --\u003e\n\u003ca target=\"_blank\" href=\"https://github.com/NibiruChain/ts-sdk/actions/workflows/test-ts-sdk.yaml\" alt=\"⛓️ Tests @nibiruchain/nibijs\"\u003e\n  \u003cimg src=\"https://github.com/NibiruChain/ts-sdk/actions/workflows/test-ts-sdk.yaml/badge.svg?branch=main\" style=\"height: 20px\"\u003e\n\u003c/a\u003e\n\n\u003c!-- Badge | NPM downloads --\u003e\n\u003ca target=\"_blank\" href=\"https://www.npmjs.com/package/@nibiruchain/nibijs\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dm/@nibiruchain/nibijs.svg?color=FFF3CD\" style=\"height: 20px\"\u003e\n\u003c/a\u003e\n\n\u003c!-- Badge | NPM license --\u003e\n\u003ca target=\"_blank\" href=\"https://github.com/NibiruChain/ts-sdk/blob/main/LICENSE\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/l/express.svg?color=050505\" style=\"height: 20px\"\u003e\n\u003c/a\u003e\n\n\u003c!-- Badge | Discord members --\u003e\n\u003ca target=\"_blank\" href=\"https://discord.gg/nibirufi\"\u003e\n  \u003cimg src=\"https://dcbadge.vercel.app/api/server/nibirufi?style=flat\" style=\"height: 20px\"\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\nThe NibiJS (`@nibiruchain/nibijs`) package makes it possible to interact with Nibiru from a Node.js or browser environment. `nibijs` provides simple abstractions for core data structures, serialization, key management, API requests, and the submission of transactions.\n\nThe `nibijs` source code can be found in the `src` directory.\n\n#### Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Example: Creating a wallet](#example-creating-a-wallet)\n  - [Example: Querying](#example-querying)\n  - [Example: Sending funds](#example-sending-funds)\n- [Codebase structure](#codebase-structure)\n- [Development Quick Start](#development-quick-start)\n- [🔓 License](#-license)\n\nTo learn more about Nibiru, see [nibiru.fi/docs](https://nibiru.fi/docs)\n\n---\n\n## Installation\n\n[@nibiruchain/nibijs][npm-nibijs] is available on the npm registry.\n\n[npm-nibijs]: https://www.npmjs.com/package/@nibiruchain/nibijs\n\n```\nnpm install @nibiruchain/nibijs # or yarn add\n```\n\n## Usage\n\nThe entrypoint for `nibijs` is the `Sdk` object, which is meant to mimic the root of a command line interface. It can be used for both queries and transactions.\n\n### Example: Creating a wallet\n\n```js\nimport { newRandomWallet } from \"@nibiruchain/nibijs\"\n\n// Create a new Nibiru wallet\nconst wallet = await newRandomWallet()\nconst [{ address }] = await wallet.getAccounts()\n\n// Save the mnemonic somewhere to re-use the account\nconsole.log(\"mnemonic: \", wallet.mnemonic)\nconsole.log(\"address: \", address)\n```\n\n### Example: Querying\n\n```js\nimport { NibiruQuerier, Testnet } from \"@nibiruchain/nibijs\"\n\nexport const CHAIN = Testnet(2)\nconst querier = await NibiruQuerier.connect(CHAIN.endptTm)\n\n// Query balances\nconst exampleAddress = \"nibi17dz4cdw5fmm2cxd4ht9xvjmpw3ycmpkpcc6js9\"\nconst balances = await querier.getAllBalances(exampleAddress)\nconsole.log(\"balances: %o\", balances)\n\n// Query block\nconst blockHeight = 200000\nconst block = await querier.getBlock(blockHeight)\nconsole.log(\"block: %o\", block)\n```\n\n### Example: Sending funds\n\n```js\nimport {\n  NibiruTxClient,\n  newSignerFromMnemonic,\n  Testnet,\n  NibiruQuerier,\n} from \"@nibiruchain/nibijs\"\nimport { coins } from \"@cosmjs/proto-signing\"\n\nexport const CHAIN = Testnet(2)\nconst mnemonic = \"your mnemonic here...\"\nconst signer = await newSignerFromMnemonic(mnemonic)\nconst querier = await NibiruQuerier.connect(CHAIN.endptTm)\nconst txClient = await NibiruTxClient.connectWithSigner(CHAIN.endptTm, signer)\nconst [{ address: fromAddr }] = await signer.getAccounts()\n\n// Check balance before sending tokens\nconst exampleAddress = \"nibi1mzjkw9z5ugajxchl884y0c28lk2627hpuljuw4\"\nlet balances = await querier.getAllBalances(exampleAddress)\nconsole.log(\"balances: %o\", balances)\n\nconst tokens = coins(5, \"unibi\")\nconst txResp = await txClient.sendTokens(\n  fromAddr,\n  exampleAddress,\n  tokens,\n  5000 // gas fee 5000 unibi\n)\nconsole.log(txResp)\n\n// Execution could take several seconds\nconst delay = (ms) =\u003e new Promise((res) =\u003e setTimeout(res, ms))\nawait delay(10000)\n\n// Check balance after send tokens\nbalances = await querier.getAllBalances(exampleAddress)\nconsole.log(\"balances: %o\", balances)\n```\n\n## Codebase structure\n\n| Directories of `@nibiruchain/nibijs` | Purpose/Utility                                                                                                                          |\n| :----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |\n| `common`                             | home to several commonly needed types, constants and configurations such as Network.                                                     |\n| `msg`                                | Implements functions for creating messages (`Msg`s). These are objects that trigger state-transitions and get wrapped into transactions. |\n| `query`                              | For querying state via the consensus engine of a full-node and the application blockchain interface (ABCI).                              |\n| `tx`                                 | For signing and to submitting transactions given a set of `Msg` objects.                                                                 |\n| `wallet`                             | A simple wrapper around the Keplr wallet. This module will grow as support is added for other wallets (like MetaMask).                   |\n\n`@nibiruchain/protojs` provides types generated from the protocol buffers of the Cosmos-SDK, Tendermint Core, and Nibiru Chain. For most use cases, it won't be necessary to interact with this layer.\n\n---\n\n\u003c!-- TODO: ## 📜 Contribution Guidelines --\u003e\n\n## Development Quick Start\n\n1. Install and use `nvm`.\n\n   ```bash\n   wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.6/install.sh | bash\n   nvm use\n   ```\n\n2. Install yarn.\n\n   ```sh\n   npm install -g yarn\n   ```\n\n3. Then, install package dependencies. At the root of the repository, run\n\n   ```sh\n   yarn\n   ```\n\n4. Initialize git submodules\n\n   ```sh\n   git submodule init\n   git submodule update\n   ```\n\n5. Lastly, compile the code in each package.\n\n   ```sh\n   yarn build\n   ```\n\nSee [HACKING.md](https://github.com/NibiruChain/ts-sdk/blob/main/HACKING.md) for the full development guide. It includes instructions on:\n\n1. Running tests\n2. Generating code for the @nibiruchain/protojs package\n3. Generating documentation in HTML or Markdown from the comments of @nibiruchain/nibijs\n\n---\n\n## 🔓 License\n\nThis software is licensed under the MIT license. See [LICENSE](https://github.com/NibiruChain/ts-sdk/blob/main/LICENSE) for full disclosure.\n\n© 2023 Nibi, Inc.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/NibiruChain/ts-sdk/main/img/nibi-logo-onwhite.png\" style=\"width:200px\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnibiruchain%2Fts-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnibiruchain%2Fts-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnibiruchain%2Fts-sdk/lists"}