{"id":22444593,"url":"https://github.com/idep-network/idep.js-deprecated-","last_synced_at":"2026-05-02T13:34:25.654Z","repository":{"id":42512010,"uuid":"411351356","full_name":"IDEP-network/IDEP.js-DEPRECATED-","owner":"IDEP-network","description":"JavaScript SDK for IDEP Network ** DEPRECATED ** ","archived":false,"fork":false,"pushed_at":"2023-01-07T19:58:52.000Z","size":4072,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-22T18:01:53.928Z","etag":null,"topics":["deprecated","javascript","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/IDEP-network.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}},"created_at":"2021-09-28T16:06:25.000Z","updated_at":"2022-12-27T22:43:40.000Z","dependencies_parsed_at":"2023-02-08T00:02:06.341Z","dependency_job_id":null,"html_url":"https://github.com/IDEP-network/IDEP.js-DEPRECATED-","commit_stats":null,"previous_names":["idep-network/idep.js"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDEP-network%2FIDEP.js-DEPRECATED-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDEP-network%2FIDEP.js-DEPRECATED-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDEP-network%2FIDEP.js-DEPRECATED-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDEP-network%2FIDEP.js-DEPRECATED-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IDEP-network","download_url":"https://codeload.github.com/IDEP-network/IDEP.js-DEPRECATED-/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245832607,"owners_count":20679701,"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":["deprecated","javascript","typescript"],"created_at":"2024-12-06T03:08:52.983Z","updated_at":"2026-05-02T13:34:25.610Z","avatar_url":"https://github.com/IDEP-network.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![IDEPJS](https://i.imgur.com/LJZpIbl.png \"Title\")\n\u003ch1 align=\"center\"\u003e\nThe JavaScript SDK for IDEP Network\n❗❗DEPRECATED❗❗\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\nIDEP.js is a javascript SDK that allows browsers and node.js clients to interact with IDEP Network blockchain.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://lgtm.com/projects/g/IDEP-network/IDEP.js/\"\u003e\u003cimg alt=\"lgtm\" src=\"https://img.shields.io/lgtm/grade/javascript/g/IDEP-network/IDEP.js.svg?logo=lgtm\u0026logoWidth=18\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/IDEP-network/IDEP.js/blob/main/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-Apache_2.0-blue.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/IDEP-network/IDEP.js\"\u003e\u003cimg alt=\"Last commit\" src=\"https://badgen.net/github/last-commit/IDEP-network/IDEP.js/main\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/idep.js\"\u003e\u003cimg alt=\"Npm downloads\" src=\"https://badgen.net/npm/dw/idep.js\"\u003e\u003c/a\u003e\n  \u003cimg alt=\"Beta release\" src=\"https://badgen.net/github/release/idep-network/idep.js\"\u003e\n  \u003cimg alt=\"Types included\" src=\"https://badgen.net/npm/types/idep.js\"\u003e\n  \u003ca href=\"https://nodejs.org/en/blog/release/v16.13.2/\"\u003e\u003cimg alt=\"Node version\" src=\"https://badgen.net/npm/node/idep.js\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://nodei.co/npm/idep.js/\"\u003e\u003cimg src=\"https://nodei.co/npm/idepjs.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n----\n\n## Table of Contents\n\n- [Using IDEP.js](#using-idepjs)\n  - [IDEP.js client](#idepjs-client)\n  - [Wallet](#wallet)\n    - [Create new wallet](#create-new-wallet)\n    - [Retrieving wallet from storage](#retrieving-wallet-from-storage)\n    - [Wallet restoration](#wallet-restoration)\n  - [Query the account's balance](#query-the-accounts-balance)\n  - [Create and send a simple transaction, that sends coins](#create-and-send-a-simple-transaction-that-sends-coins)\n    - [Check tx status](#check-tx-status)\n- [Possible queries and transactions](#possible-queries-and-transactions)\n    - [Auth src/x/auth](#auth-srcxauth)\n    - [Bank src/x/bank](#bank-srcxbank)\n    - [NFT src/x/nft](#nft-srcxnft)\n  - [Appendix and FAQ](#appendix-and-faq)\n    - [❓ More Questions?](#-more-questions)\n\n\n\n---\n\n## Features\n - Works both in node.js and in browser environments.\n - Written in Typescript.\n - Wallet creation, persistence, restoration (from the mnemonic phrase or a private key). Can be used to create wallets for other blockchains.\n - Querying the idep blockchain, sending transactions.\n - Safe encryption, based on the native APIs (crypto in node, subtleCrypto in a browser).\n - Uses protocol buffers.\n\n---\n\n## Installation\n##### `yarn add idep.js`\nor\n##### `npm install idep.js`\n\n---\n\n## Quick Start Guide\n\nIf you are in a hurry, start here.\n\n1. Install idep.js with either yarn or npm.\n2. Create client's instance.\n```typescript\n  import {createNewClient} from 'idep.js';\n\n  const client = createNewClient(); // uses default configuration\n```\n3. Create new wallet. Password is used to encrypt the private key. You will need it to make a transaction. Name is used for persistence.\n```typescript\nconst wallet = await client.wallet.createNew('encryptionPwd', 'walletName');\n```\n4. After creating your wallet successfully, you can start making queries and transactions! Below[^1] you can find a list with possible ones that you can make with the idep.js.\n\n---\n\n# Using IDEP.js\n\n`Disclaimer: Using await in a global scope is only supported with node versions higher than 17. If using older versions, wrap examples below in async functions.`\n\n## IDEP.js client\nTo start, import and create the client.\n```typescript\nimport {createNewClient} from 'idep.js';\n\nconst client = createNewClient({\n  nodeUrl: 'http://159.89.84.111:26657',\n  chainId: 'SanfordNetwork',\n  fee: {\n    gas: '7000',\n    amount: [{ denom: 'idep', amount: '500' }],\n  },\n});  // default config\n```\n\nConfiguration can be omitted, in that case the default one is going to be used.\n```typescript\nconst client = createNewClient()\n```\n\n---\n\n## Wallet\n\nAfter wallet is created, retrieved, or restored; it's stored on the client's instance. Private key is encrypted with provided password.\n\n### Create new wallet\n\n```typescript\nconst wallet = await client.wallet.createNew('encryptionPwd', 'walletName');\nconst {mnemonic, publicKey, address} = wallet;\n```\nThis is the only time when mnemonic phrase can be accessed. Make sure to store it securely.\nNaming a wallet is optional (it defaults to the wallet's address).\n\n### Retrieving wallet from storage\n```typescript\nconst wallet = await client.wallet.retrieveSavedWallet('name');\nconst {publicKey, address} = wallet;\n```\n\n### Wallet restoration\n\nWith a mnemonic phrase:\n```typescript\nconst mnemonic = 'power thing inmate obscure rubber frequent grit hair below museum notable reopen spoon prize family caught axis host';\nconst wallet = await client.wallet.restoreWithSeed(mnemonic, 'password');\n```\n\nWith private key:\n```typescript\nconst privateKey = 'hexEncodedPrivateKeyString';\nconst wallet = await client.wallet.restoreWithPrivateKey(privateKey, 'password')\n```\n\n---\n\n## Query the account's balance\n\n```typescript\nconst address = 'idep126dfeu0d6awmdjy29e4f04eg0g3kvcpz9dazru';\nconst denom = 'idep'\nconst response = await client.bank.checkBalance(address, denom);\nconsole.log(response); // {balance: {amount: '10000000150', denom: 'idep'}}\n```\n\n---\n\n## Create and send a simple transaction, that sends coins\n\n```typescript\nconst txResult = await client.bank.msgSend({\n    recipient: 'idep126dfeu0d6awmdjy29e4f04eg0g3kvcpz9dazru',\n    amount: [{\n        denom: 'idep',\n        amount: '25'\n    }],\n}, {\n    from: client.wallet.address, // optional\n    pub_key: client.wallet.publicKey, // optional\n    fee: {\n        gas: '7000',\n        amount: [{\n            denom: 'idep',\n            amount: '700'\n        }],\n    }, // optional\n    simulate: false, // optional\n    password: 'password', // needed to decrypt a private key, which is needed to sign the tx\n});\nconsole.log(txResult); // 'Tx hash 26919CA117C5D5240AF144D6A7765AE31372D9E167CB596A46210AC986F28C03'\n```\nYou also can simulate the transaction beforehand so you get required gas estimate. To do it, simply change the **simulate** flag to *true*.\n\n### Check tx status\n```typescript\nconst txHash = '26919CA117C5D5240AF144D6A7765AE31372D9E167CB596A46210AC986F28C03';\nconst status = await client.rpc.checkTx(txHash);\n```\n[Check status](https://demo.hedgedoc.org/s/qXX1fpwFb)\n\n---\n[^1]:\n# Possible queries and transactions\n\n### Auth src/x/auth\n - checkAccountInfo (queryAccount)\n - checkAuthParams (queryParams)\n\n### Bank src/x/bank\n - checkBalance (queryBalance)\n - checkALlBalances (queryAllBalances)\n - checkSupply (querySupplyOf)\n - checkParams (queryParams)\n - checkBalance (queryAllBalances)\n - checkALlBalances (queryAllBalances)\n - msgSend\n - msgMultiSend\n\n### NFT src/x/nft\n- checkSupply (querySupply)\n- checkOwner (queryOwner)\n- checkCollection (queryCollection)\n- checkDenom (queryDenom)\n- checkMultipleDenoms (queryDenoms)\n- checkNft (queryNFT)\n- msgIssueDenom\n- msgMintNFT\n- msgEditNFT\n- msgTransferNFT\n- msgBurnNFT\n\n---\n\n## Appendix and FAQ\n\n### ❓ More Questions?\n\nChat with the team on the [IDEP Discord server](https://discord.gg/Jrarctk4hG) IDEP.js channel!\n\n**Something doesn't work as expected?** [Open a new issue!](https://github.com/IDEP-network/IDEP.js/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidep-network%2Fidep.js-deprecated-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidep-network%2Fidep.js-deprecated-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidep-network%2Fidep.js-deprecated-/lists"}