{"id":21519127,"url":"https://github.com/dcspark/cip34-js","last_synced_at":"2026-02-28T07:33:14.168Z","repository":{"id":57106533,"uuid":"437924992","full_name":"dcSpark/cip34-js","owner":"dcSpark","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-10T21:16:30.000Z","size":620,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T22:08:42.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dcSpark.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-12-13T15:26:46.000Z","updated_at":"2024-10-10T21:16:34.000Z","dependencies_parsed_at":"2023-01-25T15:50:11.349Z","dependency_job_id":null,"html_url":"https://github.com/dcSpark/cip34-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcSpark%2Fcip34-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcSpark%2Fcip34-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcSpark%2Fcip34-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcSpark%2Fcip34-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcSpark","download_url":"https://codeload.github.com/dcSpark/cip34-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119294,"owners_count":21050755,"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-24T00:55:56.622Z","updated_at":"2026-02-28T07:33:14.142Z","avatar_url":"https://github.com/dcSpark.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CIP34-JS\n\nA JS library for [CIP34](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0034) that defines chain IDs for Cardano.\n\n## Example\n\n| Network name  | CIP34 chain ID    |\n| ------------- | ----------------- |\n| PreProduction | cip34:0-1         |\n| Mainnet       | cip34:1-764824073 |\n\n## Usage\n\nGenerate chain ID from registry data\n\n```typescript\nimport { toChainId } from \"@dcspark/cip34-js\";\nimport registry from \"@dcspark/cip34-js/registry\";\n\nconst chainId = toChainId({\n  networkId: registry.Mainnet.NetworkId,\n  networkMagic: registry.Mainnet.NetworkMagic,\n});\n```\n\nGet parts from chain ID\n\n```typescript\nimport { fromChainId } from \"@dcspark/cip34-js\";\n\nconst { networkId, networkMagic } = fromChainId(chainId);\n```\n\n## Updating\n\nThe current status of the registry is tracked inside the CIP repository. To keep things in sync, this project uses the CIP repo as a git submodule.\n\nTo use the latest version of the registry,\n1. `git submodule init`\n2. `git submodule update`\n3. (whenever you want to update afterwards) `npm run update-submodule`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcspark%2Fcip34-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcspark%2Fcip34-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcspark%2Fcip34-js/lists"}