{"id":13566712,"url":"https://github.com/CosmWasm/CosmWasmJS","last_synced_at":"2025-04-04T00:32:10.066Z","repository":{"id":37840987,"uuid":"456541582","full_name":"CosmWasm/CosmWasmJS","owner":"CosmWasm","description":"Source of the cosmwasm npm package","archived":true,"fork":false,"pushed_at":"2023-12-25T21:14:48.000Z","size":6431,"stargazers_count":51,"open_issues_count":10,"forks_count":16,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-11T11:52:48.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://cosmwasm.github.io/CosmWasmJS/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CosmWasm.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":"2022-02-07T14:33:10.000Z","updated_at":"2025-02-16T13:58:08.000Z","dependencies_parsed_at":"2023-12-25T10:37:45.439Z","dependency_job_id":"fe0bea45-29e7-4ed9-83c4-53fd3ed874ea","html_url":"https://github.com/CosmWasm/CosmWasmJS","commit_stats":{"total_commits":108,"total_committers":8,"mean_commits":13.5,"dds":"0.37962962962962965","last_synced_commit":"0f64808424c00819c3ac41a296e2f896ed3e21d4"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CosmWasm%2FCosmWasmJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CosmWasm%2FCosmWasmJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CosmWasm%2FCosmWasmJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CosmWasm%2FCosmWasmJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CosmWasm","download_url":"https://codeload.github.com/CosmWasm/CosmWasmJS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247103290,"owners_count":20884023,"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-08-01T13:02:15.180Z","updated_at":"2025-04-04T00:32:08.034Z","avatar_url":"https://github.com/CosmWasm.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Unmaintained ⚠️\n\nCosmWasmJS is outdated and unmaintained. See https://medium.com/cosmwasm/dev-note-2-why-we-are-sunsetting-cosmwasmjs-61d8706418e6.\nThere is no 1:1 alternative but https://cosmology.tech/ might be a helpful resource for bootstrapping dapps with wallet connections.\nThe code here serves as a historical reference. We hope it is useful one way or another.\n\n--------------------\n\n\u003ch1\u003e\u003cp align=\"center\"\u003e\u003cimg alt=\"CosmJS\" src=\"docs/logo.png\" width=\"180\" /\u003e\u003c/p\u003e\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/cosmwasm\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/cosmwasm.svg\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## About\n\nCosmwasm.js was created to help new developers get started with their first\ndApps. It is just a wrapper package to easily import needed features from\nCosmJS.\n\n## Get started\n\n### Installation\n\n**NPM**\n\n`npm install cosmwasm`\n\n**Yarn**\n\n`yarn add cosmwasm`\n\n## Usage\n\n### Get a read-only cosmwasm client\n\n```ts\nimport { CosmWasmClient } from \"cosmwasm\";\n\n// This is your rpc endpoint\nconst rpcEndpoint = \"https://rpc.cliffnet.cosmwasm.com:443/\";\n\nasync function main() {\n  const client = await CosmWasmClient.connect(rpcEndpoint);\n  console.log(client);\n}\n\nmain();\n```\n\n### Create a wallet and a signing stargate client\n\n```ts\nimport { SigningCosmWasmClient, Secp256k1HdWallet } from \"cosmwasm\";\n\n// This is your rpc endpoint\nconst rpcEndpoint = \"https://rpc.cliffnet.cosmwasm.com:443/\";\n\n// Using a random generated mnemonic\nconst mnemonic =\n  \"rifle same bitter control garage duck grab spare mountain doctor rubber cook\";\n\nasync function main() {\n  // Create a wallet\n  const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic);\n\n  // Using\n  const client = await SigningCosmWasmClient.connectWithSigner(\n    rpcEndpoint,\n    wallet,\n  );\n  console.log(client);\n}\n\nmain();\n```\n\n### Connect with keplr and get a signing starget client\n\n```ts\nimport { setupWebKeplr } from \"cosmwasm\";\n\nconst config = {\n  chainId: \"cliffnet-1\",\n  rpcEndpoint: \"https://rpc.cliffnet.cosmwasm.com:443/\",\n  prefix: \"wasm\",\n};\n\nasync function main() {\n  const client = await setupWebKeplr(config);\n  console.log(client);\n}\n\nmain();\n```\n\n### Connect with Cosmostation and get a signing starget client\n\n```ts\nimport { setupCosmostation } from \"cosmwasm\";\n\nconst config = {\n  chainId: \"cliffnet-1\",\n  rpcEndpoint: \"https://rpc.cliffnet.cosmwasm.com:443/\",\n  prefix: \"wasm\",\n};\n\nasync function main() {\n  const client = await setupCosmostation(config);\n  console.log(client);\n}\n\nmain();\n```\n\n### Interacting with contracts\n\n```ts\nimport { CosmWasmClient } from \"cosmwasm\";\n\n// This is your rpc endpoint\nconst rpcEndpoint = \"https://rpc.cliffnet.cosmwasm.com:443/\";\n\n// This is your contract address\nconst contractAddr =\n  \"wasm19qws2lfd8pskyn0cfgpl5yjjyq3msy5402qr8nkzff9kdnkaepyqycedfh\";\n\nasync function main() {\n  const client = await CosmWasmClient.connect(rpcEndpoint);\n  const config = await client.queryContractSmart(contractAddr, { config: {} });\n\n  console.log(config);\n}\n\nmain();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCosmWasm%2FCosmWasmJS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCosmWasm%2FCosmWasmJS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCosmWasm%2FCosmWasmJS/lists"}