{"id":19259295,"url":"https://github.com/hyperweb-io/StarshipJS","last_synced_at":"2025-04-21T16:30:49.129Z","repository":{"id":234670218,"uuid":"789351537","full_name":"hyperweb-io/StarshipJS","owner":"hyperweb-io","description":"StarshipJS is the JS companion to deploy and manage Starship aimed to simplify testing for apps that span multiple blockchain networks","archived":true,"fork":false,"pushed_at":"2024-06-12T05:25:10.000Z","size":284,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T22:26:28.714Z","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/hyperweb-io.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}},"created_at":"2024-04-20T09:50:12.000Z","updated_at":"2025-01-17T23:43:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"beb88898-e9fc-406e-b1a7-3f19b2634dd2","html_url":"https://github.com/hyperweb-io/StarshipJS","commit_stats":null,"previous_names":["cosmology-tech/starshipjs","hyperweb-io/starshipjs"],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperweb-io%2FStarshipJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperweb-io%2FStarshipJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperweb-io%2FStarshipJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperweb-io%2FStarshipJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperweb-io","download_url":"https://codeload.github.com/hyperweb-io/StarshipJS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250090693,"owners_count":21373233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-09T19:16:01.462Z","updated_at":"2025-04-21T16:30:48.829Z","avatar_url":"https://github.com/hyperweb-io.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StarshipJS\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/10805402/242348990-c141d6cd-e1c9-413f-af68-283de029c3a4.png\" width=\"80\"\u003e\u003cbr /\u003e\n  StarshipJS enables developers to efficiently set up and test chains, explorers, and validators, making it easier to handle development projects spanning several blockchain networks.\n\u003c/p\u003e\n\n\u003cp align=\"center\" width=\"100%\"\u003e\n  \u003ca href=\"https://github.com/cosmology-tech/starshipjs/actions/workflows/run-tests.yml\"\u003e\n    \u003cimg height=\"20\" src=\"https://github.com/cosmology-tech/starshipjs/actions/workflows/run-tests.yml/badge.svg\" /\u003e\n  \u003c/a\u003e\u003ca href=\"https://github.com/cosmology-tech/starshipjs/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**StarshipJS** is the JS companion to deploy and manage [Starship](https://cosmology.zone/products/starship), tailored specifically for Node.js and TypeScript developers. This toolkit provides a seamless, easy-to-use interface that dramatically simplifies the development, testing, and deployment of interchain applications, whether on your local machine or CI/CD environments.\n\nDesigned with simplicity and speed in mind, **StarshipJS** enables developers to quickly integrate Starship into their blockchain projects without complex orchestration.\n\n## Features\n\n👨🏻‍💻 **Node.js and TypeScript Focused**: Tailored specifically for JavaScript ecosystems, **StarshipJS** brings simplicity to multi-chain development for Node.js and TypeScript environments, streamlining the setup and coding processes.\n\n🚀 **Simplified Interchain Development**: Enables the straightforward creation of applications that span multiple blockchain networks. This simplifies complex blockchain interactions, enhancing interoperability and making it easier to build sophisticated interchain solutions.\n\n🔒 **Security-First Approach**: **StarshipJS** incorporates security best practices from the ground up. Facilitates secure coding practices and configurations, helping developers build secure blockchain applications by default, reducing the risk of vulnerabilities.\n\n## Packages\n\n- [`StarshipJS`](https://github.com/cosmology-tech/StarshipJS/tree/main/js/starshipjs): A JavaScript library providing the foundational tools and utilities for starship development, designed to work seamlessly with Node.js and TypeScript.\n- [`StarshipJS CLI`](https://github.com/cosmology-tech/StarshipJS/tree/main/ci/cli): The command-line interface that allows developers to easily deploy, manage, and interact with starship directly from the terminal.\n- [`StarshipJS Client`](https://github.com/cosmology-tech/StarshipJS/tree/main/ci/client): A client library that encapsulates interaction with starship, simplifying command executions and state management through an intuitive API.\n\n## Table of contents\n\n- [StarshipJS](#starshipjs)\n- [Features](#features)\n- [Packages](#packages)\n- [Table of contents](#table-of-contents)\n- [Install](#install)\n- [Recommended Usage](#recommended-usage-📘)\n  - [Deploying Starship](#deploying-starship-🚀)\n  - [Running End-to-End Tests](#running-end-to-end-tests-🧪)\n  - [Teardown](#teardown-🛠️)\n- [CLI Usage](#cli-usage)\n  - [Install the CLI](#install-the-cli)\n  - [Run Starship](#run-starship)\n  - [Teardown Starship](#teardown-starship)\n- [StarshipClient Usage](#starshipclient-usage)\n  - [Initializing the Client](#initializing-the-client)\n  - [Configuration](#configuration)\n  - [Setting UP and Installing the Chart](#setting-up-and-installing-the-chart)\n  - [Starting Port Forwarding](#starting-port-forwarding)\n  - [Stopping and Cleaning Up](#stopping-and-cleaning-up)\n- [Developing](#developing)\n- [Credits](#credits)\n\n## Install\n\nInstall the test utilities `starshipjs` and the CI client `@starship-ci/client`:\n\n```sh\nnpm install starshipjs @starship-ci/client\n```\n\n### Recommended Usage 📘\n\nStay tuned for a `create-cosmos-app` boilerplate! For now, this is the most recommended setup. Consider everything else after this section \"advanced setup\".\n\n- We recommend studying the [osmojs starship integration](https://github.com/osmosis-labs/osmojs/tree/main/packages/osmojs/starship) and replicating it.\n- Add your configs, similar to how it's done [here](https://github.com/osmosis-labs/osmojs/tree/main/packages/osmojs/starship/configs)\n- Add your workflows for github [like this](https://github.com/osmosis-labs/osmojs/blob/main/.github/workflows/e2e-tests.yaml)\n- Add `yarn starship` commands to your package.json scripts [like this](https://github.com/osmosis-labs/osmojs/blob/20d749c8c5a4ec3db374221dabdf185fa18025a3/packages/osmojs/package.json#L34C5-L38C74)\n— Note the jest configurations in the [osmojs package](https://github.com/osmosis-labs/osmojs/tree/main/packages/osmojs)\n\n\nThis will allow you to run `yarn starship` to `setup`, `deploy`, `clean` and other `starship` commands:\n\n#### Deploying `Starship` 🚀\n\n```sh\n# setup helm/starship\nyarn starship setup\n\n# sanity check\nyarn starship get-pods\n\n# deploy starship\nyarn starship deploy\n\n# wait til STATUS=Running\nyarn starship get-pods\n\n# port forwarding\nyarn starship start-ports\n\n# check pids\nyarn starship port-pids\n```\n\n#### Running End-to-End Tests 🧪\n\n```sh\n# test\nyarn starship:test\n\n# watch \nyarn starship:watch\n```\n\n#### Teardown 🛠️\n\n```sh\n# stop port forwarding (done by clean() too)\n# yarn starship stop-ports\n\n# stop ports and delete \u0026 remove helm chart\nyarn starship clean\n```\n\n## CLI Usage\n\nSee more usage in the [`StarshipJS CLI`](https://github.com/cosmology-tech/StarshipJS/tree/main/ci/cli) documentation.\n\n### Install the CLI\n\nWhile it's not recommended due to upgrades and package management, you can install globally:\n\n```sh\nnpm install -g @starship-ci/cli\n```\n\n### Run starship\n\n```sh\nstarship setup --config ./config/settings.json\nstarship deploy --config ./config/settings.json\nstarship start-ports --config ./config/settings.json\n```\n\n### Teardown starship\n\n```sh\nstarship undeploy --config ./config/settings.json\nstarship teardown --config ./config/settings.json\n```\n\n## StarshipClient Usage\n\nSee more info in the [`StarshipJS Client`](https://github.com/cosmology-tech/StarshipJS/tree/main/ci/client) documentation.\n\n### Install the StarshipClient\n\nInstall the CI client `@starship-ci/client`:\n\n```sh\nnpm install @starship-ci/client\n```\n\n### Initializing the Client\n\nFirst, you need to import and initialize the `StarshipClient` with your Helm configuration:\n\n```js\nimport { StarshipClient } from '@starship-ci/client';\n\nconst client = new StarshipClient({\n  helmName: 'osmojs',\n  helmFile: 'path/to/config.yaml',\n  helmRepo: 'starship',\n  helmRepoUrl: 'https://cosmology-tech.github.io/starship/',\n  helmChart: 'devnet',\n  helmVersion: 'v0.1.38'\n});\n```\n\n### Configuration\n\nAfter initializing, you can load in your config. Assuming you have a `yaml` file:\n\n```js\nclient.loadConfig();\n```\n\nIf you don't have one, you can set and save a configuration directly from the client:\n\n```js\nclient.setConfig(config);\nclient.saveConfig(config);\n```\n\n### Setting Up and Installing the Chart\n\nAfter initializing, set up the environment and install the starship helm chart:\n\n```js\n// adds helm chart to registry\nclient.setup();\n// installs helm chart\nclient.deploy();\n```\n\n### Starting Port Forwarding\n\nFor local development, you might need to forward ports from your Kubernetes pods:\n\n```js\nclient.startPortForward();\n```\n\n### Stopping and Cleaning Up\n\nOnce done with development or testing, you can stop the port forwarding and remove the Helm chart:\n\n```js\n// stop port forwarding\n// remove the deployed release from your Kubernetes cluster\nclient.undeploy();\n\n// remove the helm chart\nclient.teardown();\n```\n\n## StarshipJS Usage \n\n[`StarshipJS`](https://github.com/cosmology-tech/StarshipJS/tree/main/js/starshipjs) is a utility library that provides helpers to leverage [Starship](https://github.com/cosmology-tech/starship)'s internal chain registry, emulating the style of code used in projects like [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit).\n\n### StarshipJS Configuration\n\nBefore using StarshipJS, you need to set up the configuration for your blockchain network.\n\n```js\nimport { ConfigContext } from 'starshipjs';\nimport { join } from 'path';\n\n// Path to your YAML configuration file\nconst configFile = join(__dirname, 'your-config.yaml');\n\n// Set the configuration file in StarshipJS\nConfigContext.setConfigFile(configFile);\n```\n\n### Registry\n\n```js\nimport { useRegistry, ConfigContext } from 'starshipjs';\n\nConfigContext.setRegistry(await useRegistry(Config.configFile));\n```\n\n## Chain Info\n\nGet detailed chain information about the blockchain network:\n\n```js\nconst { chainInfo } = useChain('osmosis');\n\nconsole.log(chainInfo);\n```\n\n## Credits and Faucets\n\nIf your blockchain network supports faucets, you can use them to get test tokens:\n\n```js\nconst { creditFromFaucet } = useChain('osmosis');\nconst address = 'your-blockchain-address';\n\nawait creditFromFaucet(address);\n```\n\n## Developing\n\n\nWhen first cloning the repo:\n```\nyarn\nyarn build\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\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%2Fhyperweb-io%2FStarshipJS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperweb-io%2FStarshipJS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperweb-io%2FStarshipJS/lists"}