{"id":24334671,"url":"https://github.com/gotocva/digital-signature","last_synced_at":"2026-02-07T04:02:28.041Z","repository":{"id":272269478,"uuid":"916029339","full_name":"gotocva/digital-signature","owner":"gotocva","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-13T10:28:55.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-15T06:00:44.668Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/gotocva.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}},"created_at":"2025-01-13T10:19:00.000Z","updated_at":"2025-01-13T10:28:58.000Z","dependencies_parsed_at":"2025-01-13T11:38:23.077Z","dependency_job_id":"7ca60793-b3a9-4308-9316-5d251a372b00","html_url":"https://github.com/gotocva/digital-signature","commit_stats":null,"previous_names":["gotocva/digital-signature"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gotocva/digital-signature","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotocva%2Fdigital-signature","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotocva%2Fdigital-signature/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotocva%2Fdigital-signature/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotocva%2Fdigital-signature/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gotocva","download_url":"https://codeload.github.com/gotocva/digital-signature/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotocva%2Fdigital-signature/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29186048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T03:35:06.566Z","status":"ssl_error","status_checked_at":"2026-02-07T03:34:57.604Z","response_time":63,"last_error":"SSL_read: 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":[],"created_at":"2025-01-18T04:17:42.923Z","updated_at":"2026-02-07T04:02:28.026Z","avatar_url":"https://github.com/gotocva.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @gotocva/digital-signature\n\nA lightweight and efficient library for generating and managing digital signatures using elliptic curve cryptography (secp256k1). Perfect for blockchain and cryptographic applications.\n\n## Installation\n\nTo install the package, use npm:\n\n```bash\nnpm install @gotocva/digital-signature\n```\n\n## Usage\n\n### Importing the Library\n\n```javascript\nconst DigitalSignature = require('@gotocva/digital-signature');\n\n// Create an instance of the DigitalSignature class\nconst ds = new DigitalSignature();\n```\n\n### API Methods\n\n#### 1. `generateWallet()`\n\nGenerates a new wallet with a public and private key pair.\n\n```javascript\nconst wallet = ds.generateWallet();\nconsole.log('Public Key:', wallet.publicKey);\nconsole.log('Private Key:', wallet.privateKey);\n```\n\n#### 2. `checkPublicKeyValid(publicKey)`\n\nValidates whether a given public key is valid.\n\n```javascript\nconst publicKey = wallet.publicKey;\nconst result = ds.checkPublicKeyValid(publicKey);\nconsole.log('Is Public Key Valid:', result.valid);\n```\n\n#### 3. `signData(privateKey, data)`\n\nSigns a piece of data using the provided private key.\n\n```javascript\nconst privateKey = wallet.privateKey;\nconst data = 'Hello, Digital Signature!';\nconst signedData = ds.signData(privateKey, data);\nconsole.log('Signed Data:', signedData);\n```\n\n#### 4. `verifySignature(publicKey, data, signature)`\n\nVerifies the authenticity of a signature using the public key and original data.\n\n```javascript\nconst isValid = ds.verifySignature(\n  wallet.publicKey,\n  'Hello, Digital Signature!',\n  signedData.signature\n);\n\nconsole.log('Is Signature Valid:', isValid.is_verified);\n```\n\n## Example Workflow\n\n```javascript\nconst DigitalSignature = require('@gotocva/digital-signature');\nconst ds = new DigitalSignature();\n\n// Step 1: Generate a new wallet\nconst wallet = ds.generateWallet();\nconsole.log('Public Key:', wallet.publicKey);\nconsole.log('Private Key:', wallet.privateKey);\n\n// Step 2: Sign some data\nconst data = 'Blockchain is amazing!';\nconst signedData = ds.signData(wallet.privateKey, data);\nconsole.log('Signed Data:', signedData);\n\n// Step 3: Verify the signature\nconst isVerified = ds.verifySignature(wallet.publicKey, data, signedData.signature);\nconsole.log('Is Signature Valid:', isVerified.is_verified);\n```\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotocva%2Fdigital-signature","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgotocva%2Fdigital-signature","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotocva%2Fdigital-signature/lists"}