{"id":38733696,"url":"https://github.com/firoorg/zsharp","last_synced_at":"2026-01-17T11:28:48.480Z","repository":{"id":103609000,"uuid":"276467967","full_name":"firoorg/zsharp","owner":"firoorg","description":".NET library for working with Zcoin","archived":false,"fork":false,"pushed_at":"2024-05-10T17:03:29.000Z","size":1704,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-04T18:34:34.637Z","etag":null,"topics":["csharp","dotnet","zcoin"],"latest_commit_sha":null,"homepage":"","language":"C#","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/firoorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2020-07-01T19:46:31.000Z","updated_at":"2023-03-22T09:29:48.000Z","dependencies_parsed_at":"2024-05-28T07:37:43.591Z","dependency_job_id":null,"html_url":"https://github.com/firoorg/zsharp","commit_stats":{"total_commits":54,"total_committers":1,"mean_commits":54.0,"dds":0.0,"last_synced_commit":"81821c66bb04cc1dadc0e245cdc01694dd19d43f"},"previous_names":["zcoinofficial/zsharp"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/firoorg/zsharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firoorg%2Fzsharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firoorg%2Fzsharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firoorg%2Fzsharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firoorg%2Fzsharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firoorg","download_url":"https://codeload.github.com/firoorg/zsharp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firoorg%2Fzsharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28507591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T10:25:30.148Z","status":"ssl_error","status_checked_at":"2026-01-17T10:25:29.718Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["csharp","dotnet","zcoin"],"created_at":"2026-01-17T11:28:47.321Z","updated_at":"2026-01-17T11:28:48.461Z","avatar_url":"https://github.com/firoorg.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zsharp\n[![codecov](https://codecov.io/gh/zcoinofficial/zsharp/branch/master/graph/badge.svg)](https://codecov.io/gh/zcoinofficial/zsharp)\n\nThis is a high-quality .NET library for working with Zcoin. Almost all of the code have test coverage. Some of available features are:\n\n- Classes and functions to deal with Blockchain primitive based on [NBitcoin](https://github.com/MetacoSA/NBitcoin) (e.g. block, transaction, etc.).\n- RPC client to communicate with Zcoin daemon.\n- Block indexer for implementing any kind of application on top of it (e.g. explorer).\n- Custom type mapper for Entity Framework to allow using blockchain primitive directly on the model (e.g. use `uint256` directly on the EF model).\n\nMost of the code was migrated from [ZTM](https://github.com/zcoinofficial/ztm).\n\n## Installation\n\nAll of Zsharp packages can be install from [NuGet](https://www.nuget.org/packages?q=Zsharp).\n\n## Examples\n### Parsing block\n\n```csharp\nvar block = Block.Parse(\"HEX\", Networks.Default.Mainnet);\n```\n\n### Block indexer\n\n```csharp\nvoid ConfigureServices(IServiceCollection services)\n{\n    // Application Services.\n    services.AddHostedService\u003cDatabaseMigrator\u003e();\n\n    // Zsharp Services.\n    services.AddSingleton\u003cIServiceExceptionHandler, ServiceExceptionLogger\u003e();\n    services.AddZcoin(NetworkType.Mainnet);\n    services.AddElysiumSerializer();\n    services.AddZcoinRpcClient(options =\u003e\n    {\n        options.ServerUrl = new Uri(\"http://127.0.0.1:8888\");\n        options.Credential = RPCCredentialString.Parse(\"rpcuser:rpcpassword\");\n    });\n    services.AddLightweightIndexer(options =\u003e\n    {\n        options.BlockPublisherAddress = \"tcp://127.0.0.1:ZMQPORT\";\n    });\n    services.AddLightweightIndexerEntityRepository();\n    services.AddLightweightIndexerPostgresDbContext(options =\u003e\n    {\n        options.ConnectionString = \"Host=127.0.0.1;Database=postgres;Username=postgres;Password=postgres\";\n    });\n}\n```\n\n```csharp\nclass DatabaseMigrator : IHostedService\n{\n    readonly ILogger logger;\n    readonly IDbContextFactory\u003cZsharp.LightweightIndexer.Entity.DbContext\u003e chain;\n\n    public DatabaseMigrator(\n        ILogger\u003cDatabaseMigrator\u003e logger,\n        IDbContextFactory\u003cZsharp.LightweightIndexer.Entity.DbContext\u003e chain)\n    {\n        this.logger = logger;\n        this.chain = chain;\n    }\n\n    public async Task StartAsync(CancellationToken cancellationToken)\n    {\n        // Blockchain.\n        this.logger.LogInformation(\"Migrating blockchain database.\");\n\n        await using (var db = await this.chain.CreateAsync(cancellationToken))\n        {\n            await db.Database.MigrateAsync(cancellationToken);\n        }\n\n        this.logger.LogInformation(\"All database migrations completed successfully.\");\n    }\n\n    public Task StopAsync(CancellationToken cancellationToken)\n    {\n        return Task.CompletedTask;\n    }\n}\n```\n\n## Development\n### Requirements\n\n- .NET Core 3.1\n- Docker Compose\n\n### Build\n\n```sh\ndotnet build src/Zsharp.sln\n```\n\n### Running tests\n\nStart the required services with Docker Compose:\n\n```sh\ndocker-compose up -d\n```\n\nThen execute:\n\n```sh\ndotnet test src/Zsharp.sln\n```\n\n### Updating version\n\nThe right way to update `Version` in the `.csproj` file on each project is:\n\n1. Increase the version number **only** on the first commit that introduce changes to that project since the latest release.\n2. Follow [SemVer](https://semver.org/) for how to increase version number.\n\nWith this way we will always know which project need to publish a new version when we are going to release by comparing the version in the repository against the latest version that was published. Another benefits is we don't need to publish the project that don't have any changes since the latest release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiroorg%2Fzsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiroorg%2Fzsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiroorg%2Fzsharp/lists"}