{"id":28289209,"url":"https://github.com/bilbolprime/crypto-jwt","last_synced_at":"2026-04-27T08:31:33.923Z","repository":{"id":212097497,"uuid":"730664434","full_name":"bilbolPrime/crypto-jwt","owner":"bilbolPrime","description":"A simple JWT integration with NFTs (ERC721 standard)","archived":false,"fork":false,"pushed_at":"2023-12-19T16:39:40.000Z","size":265,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T04:39:42.176Z","etag":null,"topics":["blockchain","erc721","ethereum","jwt","nft"],"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/bilbolPrime.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":"2023-12-12T12:13:22.000Z","updated_at":"2023-12-12T18:33:17.000Z","dependencies_parsed_at":"2025-06-13T04:32:24.307Z","dependency_job_id":null,"html_url":"https://github.com/bilbolPrime/crypto-jwt","commit_stats":null,"previous_names":["bilbolprime/crypto-jwt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bilbolPrime/crypto-jwt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilbolPrime%2Fcrypto-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilbolPrime%2Fcrypto-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilbolPrime%2Fcrypto-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilbolPrime%2Fcrypto-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bilbolPrime","download_url":"https://codeload.github.com/bilbolPrime/crypto-jwt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilbolPrime%2Fcrypto-jwt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32329463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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":["blockchain","erc721","ethereum","jwt","nft"],"created_at":"2025-05-22T00:14:32.118Z","updated_at":"2026-04-27T08:31:33.897Z","avatar_url":"https://github.com/bilbolPrime.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crypto JWT\n\nA simple JWT integration with NFTs (ERC721 standard)\n\n# Local Chain\n\n1. Install [Ganache](https://www.trufflesuite.com/ganache)\n\n## Local Chain Setup\n\n1. `npm install` (inside ./Chain)\n1. `truffle compile --all` (inside ./Chain)\n1. `truffle deploy` (inside ./Chain)\n1. `mint` to mint NFTs to any address\n1. `setBits` to update an NFT's bits\n\n\n```\nlet nftContract = await NFTContract.deployed()\nawait nftContract.mint('some address', some bit value)\nawait nftContract.setBits(nft id, new bits value)\n```\n\n# App Settings Setup\n\n1. Update ChainInfo data to match local chain or remote chain\n1. Assign any private key\n\n## API \n\n1. `~/challenge` request a challenge to sign.\n\n\n```\n{\n    \"account\":\"0x4B4AABaf30921059e3baD5Ab10f8d19d88cccC60\",\n    \"nftId\": 0\n}\n```\n\n```\n{\n    \"message\": \"0x4B4AABaf30921059e3baD5Ab10f8d19d88cccC60 owns 0 with nonce 1367492758\"\n}\n```\n\n2. `~/login` submits a signature to login.\nThe response includes the bits of that nft representing whatever access it should have.\n```\n{\n    \"account\":\"0x4B4AABaf30921059e3baD5Ab10f8d19d88cccC60\",\n    \"nftId\": 0,\n    \"signature\": \"cf0f0099d24e12dd41213856562cac4928f6eaac4c98bce6b99e05ce7dfedb495cd243ca401dd899a7494c1443bb4a102ad92fbb8c310fbc0a06919126e921ed1c\"\n}\n```\n\n```\n{\n    \"account\": \"0x4B4AABaf30921059e3baD5Ab10f8d19d88cccC60\",\n    \"nftId\": 0,\n    \"bits\": 3,\n    \"token\": \"a jwt token\"\n}\n```\n\n3. `~/test` a get request which includes Authorization header having the jwt token.\nThe response is a blank 200 ok code but BE would have access to the account, nft and bits.\n\nThe account ownership of the NFT and the bits are compared against the chain. \n\nA future enhancement would be to implement caching and a scraper that follows the contract on chain to clear cache when need be.\n\n# Useful Links\n\nYou can sign using [My Ether Wallet](https://www.myetherwallet.com/)\n\n# Version History\n\n1. 2023-12-12: Initial release v1.0.0 \n\n# Disclaimer\n\nThis implementation was made for educational / training purposes only.\n\n# License\n\nLicense is [MIT](https://en.wikipedia.org/wiki/MIT_License)\n\n# MISC\n\nBirbia is coming\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilbolprime%2Fcrypto-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbilbolprime%2Fcrypto-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilbolprime%2Fcrypto-jwt/lists"}