{"id":22303546,"url":"https://github.com/lovesh/signature-server","last_synced_at":"2025-09-20T23:46:07.525Z","repository":{"id":150950021,"uuid":"238190591","full_name":"lovesh/Signature-server","owner":"lovesh","description":"Webserver to keep given transactions in memory and return signature when queried. Code written as part of an interview-assignment","archived":false,"fork":false,"pushed_at":"2020-02-04T11:32:09.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-02T01:15:15.378Z","etag":null,"topics":["actix-web"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovesh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-04T11:31:37.000Z","updated_at":"2020-02-04T19:51:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"f4400a11-4cfc-4ebf-9edf-1f8123855507","html_url":"https://github.com/lovesh/Signature-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lovesh/Signature-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovesh%2FSignature-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovesh%2FSignature-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovesh%2FSignature-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovesh%2FSignature-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovesh","download_url":"https://codeload.github.com/lovesh/Signature-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovesh%2FSignature-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276175060,"owners_count":25597792,"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-09-20T02:00:10.207Z","response_time":63,"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":["actix-web"],"created_at":"2024-12-03T18:44:11.415Z","updated_at":"2025-09-20T23:46:07.495Z","avatar_url":"https://github.com/lovesh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Signature server\n\n## Overview\nCode written as part of an interview-assignment. The requirements were something like these:\n1. Write a program in Rust called Signature Server, with a REST API that communicates with JSON objects.\n1. The server is configured via a configuration file that specifies:\n    - The port to listen for HTTP requests on\n    - An ed25519 private key or keypair to be used as the “daemon key” below.\n1. The endpoints to handle are the following:\n    - GET /public_key: Returns a JSON object containing the public key of the\n      daemon key.\n    - PUT /transaction: Takes a blob of data (arbitrary bytes) representing the\n      transaction data in the form of a base64 string, and remembers it in memory.\n      Returns a random, unique identifier for the transaction.\n    - POST /signature​: Takes a list of transaction identifiers, and builds a\n      JSON array of strings containing the base64-encoded transaction blobs\n      indicated by the given identifiers. It signs this array (serialised as JSON\n      without any whitespace) using the daemon private key. Finally, it returns the\n      array that was signed, as well as the signature as a base64 string.\n      Example​. Suppose that the POST request contained the identifiers of, in\n      order, two transactions that have blobs [255, 224, 1, 2, 3] and [4, 5, 6, 7, 8]\n      (both are 5 bytes long). In base64, these respectively become ​/+ABAgM=​ and\n      BAUGBwg=​. The string to sign then is ​[\"/+ABAgM=\",\"BAUGBwg=\"]​\n\nUsing Actix-web. \n\n## Dev instructions\n1. The config file containing the port and keys is not checked into the code since in production such files will be managed by the CI. \nIts named `Config.toml` and lives in the root of the crate (same level as `src` directory).\n1. For testing I have been using file with these contents. \n    ```\n    [deployment]\n    port = 8000\n    \n    [public_keys]\n    public_key = \"TaxyY3G2A3pw7t2YSNtp88rRMV2G2GAasfldraakCZ8=\"\n    \n    [private_keys]\n    private_key = \"pIwwiWYMzK1vd/aPWQWYW254d6RaqVY1M3ocUiFxKY8=\"\n    ```\n    A file with same contents is present in the repo with name [Sample_Config.toml](./Sample_Config.toml). It can be renamed \n    to `Config.toml` and used as well. The tests also assume presence of this file.\n\n## TODOs\n1. Break large tests into multiple small ones\n1. Request-response versioning","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovesh%2Fsignature-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovesh%2Fsignature-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovesh%2Fsignature-server/lists"}