{"id":13687761,"url":"https://github.com/input-output-hk/nami","last_synced_at":"2025-10-13T03:53:10.413Z","repository":{"id":37237330,"uuid":"367702649","full_name":"input-output-hk/nami","owner":"input-output-hk","description":"Nami Wallet is a browser based wallet extension to interact with the Cardano blockchain. Support requests: https://iohk.zendesk.com/hc/en-us/requests/new","archived":false,"fork":false,"pushed_at":"2025-02-06T10:39:52.000Z","size":120983,"stargazers_count":373,"open_issues_count":601,"forks_count":169,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-05-01T15:42:32.415Z","etag":null,"topics":["cardano","extension","javascript","wallet"],"latest_commit_sha":null,"homepage":"https://namiwallet.io","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/input-output-hk.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-05-15T18:22:14.000Z","updated_at":"2025-04-27T06:12:26.000Z","dependencies_parsed_at":"2024-01-21T02:27:59.376Z","dependency_job_id":"65d6d71d-85e5-4973-8ff6-2babd8fb02c0","html_url":"https://github.com/input-output-hk/nami","commit_stats":null,"previous_names":["input-output-hk/nami","berry-pool/nami"],"tags_count":76,"template":false,"template_full_name":null,"purl":"pkg:github/input-output-hk/nami","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/input-output-hk%2Fnami","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/input-output-hk%2Fnami/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/input-output-hk%2Fnami/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/input-output-hk%2Fnami/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/input-output-hk","download_url":"https://codeload.github.com/input-output-hk/nami/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/input-output-hk%2Fnami/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013518,"owners_count":26085368,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cardano","extension","javascript","wallet"],"created_at":"2024-08-02T15:01:00.042Z","updated_at":"2025-10-13T03:53:10.407Z","avatar_url":"https://github.com/input-output-hk.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"200px\" src=\"./src/assets/img/bannerBlack.svg\"\u003e\u003c/img\u003e\u003c/p\u003e\n\n# Nami\n\nNami is a browser based wallet extension to interact with the Cardano blockchain. It's an open-source project maintained by [**IOG**](https://iohk.io/en/blog/posts/2023/11/01/nami-has-a-new-home/).\n\n### Testnet\n\nDownload and extract the zip attached to the latest [Release](https://github.com/input-output-hk/nami/releases). Then go to `chrome://extensions`, click Load unpacked at the top left and select the build folder.\n\n### Injected API\n\nSince Nami is a browser extension, it can inject content inside the web context, which means you can connect the wallet to any website.\nThe exposed API follows [CIP-0030](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0030). The returned types are in `cbor`/`bytes` format. A helpful library for serializing and de-serializing these low-level data structures is the [serialization-lib](https://github.com/Emurgo/cardano-serialization-lib). To verify a signature returned from `cardano.dataSign(address, payload)` the [message-signing](https://github.com/Emurgo/message-signing) library helps.\n\n#### Basic Usage\n\n- Detect the Cardano provider (`window.cardano`) and detect Nami (`window.cardano.nami`)\n- Request the `api` from `window.cardano.nami.enable()`\n- Detect which Cardano network the user is connected to (ID 1 = Mainnet, ID 0 = Testnet)\n- Get the user's Cardano account\n\n#### Methods\n\nThe full list of methods can be found in [CIP-0030](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0030).\nFor the wallet namespace Nami uses `nami`.\n\n**Note:** Nami follows the ongoing [PR](https://github.com/cardano-foundation/CIPs/pull/148) for the `dataSign` endpoint. (Very similar to the previous `dataSign` endpoint from Nami).\n\nNami also uses a few custom endpoints, which are available under `api.experimental`:\n\n##### api.experimental.getCollateral()\n\n```\ncardano.getCollateral() : [TransactionUnspentOutput]\n```\n\n##### api.experimental.on(eventName, callback)\n\nRegister events coming from Nami. Available events are:\n\n```\naccountChange: ((addresses : [BaseAddress]) =\u003e void)\nnetworkChange: ((network : number) =\u003e void)\n```\n\n##### api.experimental.off(eventName, callback)\n\nDeregister the events (works also with anonymous functions).\n\n---\n\n### Injected API (Deprecated)\n\nSince Nami is a browser extension, it can inject content inside the web context, which means you can connect the wallet to any website.\nThe exposed API follows for most parts this proposed [CIP](https://github.com/cardano-foundation/CIPs/pull/88). The returned types are in `cbor`/`bytes` format. A helpful library for serializing and de-serializing these low-level data structures is the [serialization-lib](https://github.com/Emurgo/cardano-serialization-lib). To verify a signature returned from `cardano.dataSign(address, payload)` the [message-signing](https://github.com/Emurgo/message-signing) library helps.\n\n#### Basic Usage\n\n- Detect the Cardano provider (`window.cardano`)\n- Detect which Cardano network the user is connected to (ID 1 = Mainnet, ID 0 = Testnet)\n- Get the user's Cardano account\n\n#### Methods\n\n**All methods will return their values as `Promise`. For simplicity and easier understanding the API is explained without the Promises.**\n\n##### cardano.enable()\n\nWill ask the user to give access to requested website. If access is given, this function will return `true`, otherwise throws an `error`.\nIf the user calls this function again with already having permission to the requested website, it will simply return `true`.\n\n##### cardano.isEnabled()\n\n```\ncardano.isEnabled() : boolean\n```\n\nReturns `true` if wallet has access to requested website, `false` otherwise.\n\n##### cardano.getBalance()\n\n```\ncardano.getBalance() : Value\n```\n\n`Value` is a hex encoded cbor string.\n\n##### cardano.getUtxos(amount, paginate)\n\n```\ncardano.getUtxos(amount?: Value, paginate?: {page: number, limit: number}) : [TransactionUnspentOutput]\n```\n\n`TransactionUnspentOutput` is a hex encoded bytes string.\n\n`amount` and `paginate` are optional parameters. They are meant to filter the overall utxo set of a user's wallet.\n\n##### cardano.getCollateral()\n\n```\ncardano.getCollateral() : [TransactionUnspentOutput]\n```\n\n##### cardano.getUsedAddresses()\n\n```\ncardano.getUsedAddresses() : [BaseAddress]\n```\n\n`BaseAddress` is a hex encoded bytes string.\n\n**Note** Nami doesn't utilize the concept of multipe addresses per wallet. This function will return an array of length `1` and will always return the same single address. Just to follow the standards of the proposed [CIP](https://github.com/cardano-foundation/CIPs/pull/88), it will return the address in an array.\n\n##### cardano.getUnusedAddresses()\n\n```\ncardano.getUnusedAddresses() : [BaseAddress]\n```\n\n**Note** This endpoint will return an empty array []. Same reason as above, simply to follow the standards.\n\n##### cardano.getChangeAddress()\n\n```\ncardano.getChangeAddress() : BaseAddress\n```\n\nWill return the same address as the one in `cardano.getUsedAddresses()`.\n\n##### cardano.getRewardAddress()\n\n```\ncardano.getRewardAddress() : [RewardAddress]\n```\n\n`RewardAddress` is a hex encoded bytes string.\n\n**Note** This function will return an array of length `1` and will always return the same single address.\n\n##### cardano.getNetworkId()\n\n```\ncardano.getNetworkId() : number\n```\n\nReturns `0` if on `testnet`, otherwise `1` if on `mainnet`.\n\n##### cardano.signData(address, payload)\n\n```\ncardano.signData(address: BaseAddress|RewardAddress, payload: string) : CoseSign1\n```\n\n`payload` is a hex encoded utf8 string.\n`CoseSign1` is a hex encoded bytes string.\n\nIf address is the `BaseAddress` the signature is returned with the `Payment Credential`, otherwise if the address is the `RewardAddress` the signature is returned with the `Stake Credential`.\n\nThe returned `CoseSign1` object contains the `payload`, `signature` and the following protected headers:\n\n- `key_id` =\u003e `PublicKey`,\n- `address` =\u003e `BaseAddress | RewardAddress`\n- `algorithm_id` =\u003e EdDSA(0) (the algorithm used for Cardano addresses).\n\nRead more about message signing in [CIP-0008](https://github.com/cardano-foundation/CIPs/blob/master/CIP-0008/CIP-0008.md).\n\n##### cardano.signTx(tx, partialSign)\n\n```\ncardano.signTx(tx: Transaction, partialSign?: boolean) : TransactionWitnessSet\n```\n\n`Transaction` is a hex encoded cbor string.\n`TransactionWitnessSet` is a hex encoded cbor string.\n\n`partialSign` is by default `false` and optional. The wallet needs to provide all required signatures. If it can't an `error` is thrown, otherwise the `TransactionWitnessSet` is returned.\n\nIf `partialSign` is `true`, the wallet doesn't need to provide all required signatures.\n\n##### cardano.submitTx(tx)\n\n```\ncardano.submitTx(tx : Transaction) : hash32\n```\n\nReturns the transaction hash, if transaction was submitted successfully, otherwise throws an `error`.\n\n#### Events\n\n##### cardano.onAccountChange(addresses)\n\n```\ncardano.onAccountChange((addresses : [BaseAddress]) =\u003e void)\n```\n\n**Note** To follow the standards of multiple addresses the callback will return an array, although Nami will just return an array with a single address, which is the same as the one in `cardano.getUsedAddresses()`.\n\n##### cardano.onNetworkChange(network)\n\n```\ncardano.onNetworkChange((network : number) =\u003e void)\n```\n\n---\n\n### Develop\n\nThe `project_id` for API requests can be created under [blockfrost.io](https://blockfrost.io/).\n\n**Recommended:** Follow this [approach](https://github.com/lxieyang/chrome-extension-boilerplate-react#secrets) in order to keep the keys seperate from the repository.\n\n```\n# Update secrets file with your own keys\ncp secrets.testing.js secrets.development.js\n```\n\nThe quick solution is to go under `./src/config/provider.js` and replace `secrets.PROJECT_ID_MAINNET`, `secrets.PROJECT_ID_TESTNET`, `secrets.PROJECT_ID_PREVIEW` and `secrets.PROJECT_ID_PREPROD` with the project ids from blockfrost.\n\n##### Requirements\n\n- Node.js 20\n\n##### Start development server\n\n```\n# Update secrets file with your own keys\ncp secrets.testing.js secrets.development.js\nnpm start\n```\n\n##### Create production build\n\n```\n# Update secrets file with your own keys\ncp secrets.testing.js secrets.production.js\nnpm run build\n```\n\n##### Run tests\n\n```\nnpm test\n```\n\n### Additional\n\n[Wasm packages](./src/wasm/) commit hash: [a0e182fe77d553f6480d2b3ff5d1f38eee22e4e9](https://github.com/spacebudz/lucid)\n\n### Website\n\nVisit [namiwallet.io](https://namiwallet.io)\u003cbr/\u003e\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finput-output-hk%2Fnami","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finput-output-hk%2Fnami","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finput-output-hk%2Fnami/lists"}