{"id":43847625,"url":"https://github.com/xray-network/cardano-web3-js","last_synced_at":"2026-02-06T06:10:51.026Z","repository":{"id":41266203,"uuid":"374378274","full_name":"xray-network/cardano-web3-js","owner":"xray-network","description":"Cardano Web3 JavaScript SDK","archived":false,"fork":false,"pushed_at":"2025-07-20T09:14:08.000Z","size":3064,"stargazers_count":47,"open_issues_count":15,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-14T02:34:43.615Z","etag":null,"topics":["blockchain","cardano","cardano-web3-js","sdk","web3","web3js","xray"],"latest_commit_sha":null,"homepage":"https://cardano-web3-js.org","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/xray-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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-06T14:16:07.000Z","updated_at":"2025-08-25T16:59:06.000Z","dependencies_parsed_at":"2024-05-17T13:53:57.560Z","dependency_job_id":"198b2f2c-d33d-476c-bcdb-b81c6a2884a9","html_url":"https://github.com/xray-network/cardano-web3-js","commit_stats":null,"previous_names":["ray-network/cardano-web3.js","xray-network/cardano-web3-js"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/xray-network/cardano-web3-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xray-network%2Fcardano-web3-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xray-network%2Fcardano-web3-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xray-network%2Fcardano-web3-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xray-network%2Fcardano-web3-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xray-network","download_url":"https://codeload.github.com/xray-network/cardano-web3-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xray-network%2Fcardano-web3-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29153287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T02:39:25.012Z","status":"ssl_error","status_checked_at":"2026-02-06T02:37:22.784Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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","cardano","cardano-web3-js","sdk","web3","web3js","xray"],"created_at":"2026-02-06T06:10:50.406Z","updated_at":"2026-02-06T06:10:51.008Z","avatar_url":"https://github.com/xray-network.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://discord.gg/WhZmm46APN\"\u003e\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/852538978946383893?style=for-the-badge\u0026logo=discord\u0026label=Discord\u0026labelColor=%231940ED\u0026color=%233FCB9B\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/cardano-web3-js\"\u003e\u003cimg alt=\"NPM\" src=\"https://img.shields.io/npm/v/cardano-web3-js/latest?style=for-the-badge\u0026logo=npm\u0026labelColor=%231940ED\u0026color=%233FCB9B\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ray-network/cardano-web3-js/actions\"\u003e\u003cimg alt=\"CODEQL\" src=\"https://img.shields.io/github/actions/workflow/status/xray-network/cardano-web3-js/codeql.yml?label=CodeQL\u0026logo=github\u0026style=for-the-badge\u0026labelColor=%231940ED\u0026color=%233FCB9B\"\u003e\u003c/a\u003e\n\n  \n# 🛠 Cardano Web3 JavaScript SDK\n\nCardanoWeb3js is a versatile TypeScript library designed for seamless integration with the Cardano blockchain. It supports both Node.js and browser environments, streamlining transaction creation, smart contract deployment, and data exploration. Ideal for developers, this toolkit simplifies Cardano cryptographic operations and API interactions\n\n## Installation\n\nTo install with Yarn, run:\n\n```TypeScript\nyarn install cardano-web3-js\n```\n\nTo install with NPM, run:\n\n```TypeScript\nnpm i cardano-web3-js\n```\n\n## Documentation\n\n* Docs: [https://cardano-web3-js.org](https://cardano-web3-js.org)\n* Typedoc API: [https://cardano-web3-js.org/api](https://cardano-web3-js.org/api)\n* Playground: [https://cardano-web3-js.org/playground](https://cardano-web3-js.org/playground)\n\n## Basic Usage\n\nCheck [/test](/test) folder for detailed usage examples. Or read the documentation to learn how to create a transaction of any complexity\n\n``` ts\nimport { CardanoWeb3 } from \"cardano-web3-js\"\n\nconst web3 = new CardanoWeb3()\n\nconst mnemonic = web3.utils.keys.mnemonicGenerate()\nconst account = web3.account.fromMnemonic(mnemonic)\nconst state = await account.getState() // update balance \u0026 delegation info\n\nconsole.log(mnemonic) // generated mnemonic\nconsole.log(account.__config) // account info (xpub, changeAddress, creds, etc)\nconsole.log(state) // balance \u0026 delegation info\n\nconst tx = await web3\n  .createTx()\n  .addInputs(state.utxos)\n  .addOutput(\n    {\n      address: \"addr1qxpm2aqmn48he8dtp9p8hk9gtew6cypy6ra3mgs8xkn86qmd3vtjzheq22w8mmfhm8agpmywnlu2rsxgkdrctv7mcc3s9anhjz\",\n      value: 2000000n,\n    },\n  )\n  .applyAndBuild()\n\nconst tx_hash = await tx_unsigned\n  .signWithAccount(account)\n  .applyAndSubmit() // submit tx\n\nconsole.log(tx_hash)\n```\n\n## Web3 Configuration Parameteres\n\n\u003cdetails\u003e\n  \u003csummary\u003eConfiguration Parameters\u003c/summary\u003e\n  \n``` ts\nimport { CardanoWeb3, KoiosProvider, KupmiosProvider, BlockfrostProvider } from \"cardano-web3-js\"\n\nconst providerHeaders = {\n  \"x-api-key\": \"YOUR_API_KEY_01\",\n}\n\nconst koiosHeaders = {\n  \"x-api-key\": \"YOUR_API_KEY_02\",\n}\n\nconst web3 = new CardanoWeb3({\n  network: \"preprod\", // \"mainnet\" | \"preprod\" | \"preview\" | \"custom\"\n  protocolParams: {...}, // override protocolParams, eg. in case of custom network\n  ttl: 900, // 900 secs = 15 minutes\n  provider: new KoiosProvider(\"https://api.koios.rest/api/v1\", providerHeaders),\n  explorer: {\n    koios: {\n      headers: koiosHeaders,\n      url: \"https://preprod.koios.rest/api/v1\",\n    },\n    nftcdn: {\n      headers: {},\n      url: \"https://graph.xray.app/output/nftcdn/preprod/api/v1\",\n    },\n    pricing: {\n      headers: {},\n      url: \"https://graph.xray.app/output/pricing/mainnet/api/v1\", // only mainnet available\n    },\n  }\n})\n\nconsole.log(web3.__config) // web3 instance config\n```\n\u003c/details\u003e\n\n## Test\n\nCheck [/test](/test) folder for available tests\n\n```TypeScript\nyarn test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxray-network%2Fcardano-web3-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxray-network%2Fcardano-web3-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxray-network%2Fcardano-web3-js/lists"}