{"id":20975259,"url":"https://github.com/functionland/fula-sec","last_synced_at":"2026-04-17T05:34:46.043Z","repository":{"id":104400977,"uuid":"563122885","full_name":"functionland/fula-sec","owner":"functionland","description":"Fula Security Library for DID creation and sharing","archived":false,"fork":false,"pushed_at":"2023-01-09T14:01:07.000Z","size":335,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-12-31T23:55:04.532Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/functionland.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":"2022-11-08T00:26:05.000Z","updated_at":"2022-12-15T01:03:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb82d6e4-8d85-4777-948a-881904d0deef","html_url":"https://github.com/functionland/fula-sec","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/functionland/fula-sec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionland%2Ffula-sec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionland%2Ffula-sec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionland%2Ffula-sec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionland%2Ffula-sec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/functionland","download_url":"https://codeload.github.com/functionland/fula-sec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionland%2Ffula-sec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31917099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":[],"created_at":"2024-11-19T04:41:38.643Z","updated_at":"2026-04-17T05:34:46.021Z","avatar_url":"https://github.com/functionland.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\u003c!--\n*** Thanks for checking out the Best-README-Template. If you have a suggestion\n*** that would make this better, please fork the repo and create a pull request\n*** or simply open an issue with the tag \"enhancement\".\n*** Don't forget to give the project a star!\n*** Thanks again! Now go create something AMAZING! :D\n*** Nice Template: https://github.com/othneildrew/Best-README-Template\n--\u003e\n\n\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003c!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\n\u003ch3 align=\"center\"\u003eFula Security Layer (FSL)\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    Fula Security Layer Includes Decentralized Identity and Encryption.\n    \u003cbr /\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n#\nThe Fula-sec library allows you to create DID (Decentrlized-ID) and Encript/Decypt by using `Ed25519` and `EDHD` algorithms.\n\n`Ed25519` KeyPairs are used for creating DID, JWE/JWET/JWT signing identity of token which is passed as `iss:` attribyte of the payload. In same way opposite side user can verify or/and decrypt by passing their own KeyPair.   \n\n\n## Installation\n\n\nInstall NPM package\n   ```sh\n   npm install @functionland/fula-sec --save\n   ```\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Decentralized Identity (DID) \n   ```js\n    import {HDKEY, DID} from '@functionland/fula-sec'\n\n\n    /* Prefix moc keys */\n    let password = '123456789'  //User`s password\n    let signedKey = '9d7020006cf....f33a32adb81ae'; \n    /* signedKey is the signature coming from the locally-running \n    service of a 3rd party signing authority like Meta Mask Wallet \n    by signing part of the password (not the full password is being \n    sent to the 3rd party signing authority)\n    */\n\n    \n    /* 1 - Add user`s password */\n    const ed = new HDKEY(password);\n    \n    // A. Sign with chaincode   |chainCode| ---\u003e  |Metamask|      \n    // B. Get signedKey         |signedKey| \u003c---  |Metamask| \n\n    /* 2 - Get chainCode to get signedKey from Metamask*/\n    const chainCode = ed.chainCode; \n    /*\n      chainCode is created from part of the password to be sent \n      to the signing authority like MetaMask wallet to get a unique signature back\n    */\n    `type:base64pad APSWnk8ULP/v//oseMeSEDadMBSSeX/SOxOREYhjQ7g=`\n    /* Send request to metamask*/\n\n    /* 3 - Get KeyPair: Publick and Privete Key */\n    const keyPair = ed.createEDKeyPair(signedKey);\n    `secretkey:  Uint8Array(64) [\n         98,  47,  78, 171, 169, 201, 236, 231, 196,  23, 134,\n         135,  78, 180, 195,  93,  22,  57,  41, 213,  53,  86,\n         248,  34,  83, 162, 233, 128,  89, 128, 207, 173, 247,\n         94, 235,  66, 181, 212, 204, 168, 133, 182,  87, 227,\n         217, 233, 122, 169, 145,  20,  42, 110, 229, 233, 239,\n         112,  55, 203,  18, 112,  50, 251, 239, 219\n      ],\n      pubkey:  Uint8Array(32) [\n         247,  94, 235,  66, 181, 212, 204,\n         168, 133, 182,  87, 227, 217, 233,\n         122, 169, 145,  20,  42, 110, 229,\n         233, 239, 112,  55, 203,  18, 112,\n         50, 251, 239, 219\n      ]`\n    \n    /* keyPair: {\n         publicKey,\n         secretKey    \n    } for creating DID and Encrypt/Decrypt */\n    \n    \n\n    /* 4 - Add KeyPair in order to generate DID*/\n    const did = new DID(keyPair.secretKey);\n    \n    /* Get DID */\n    did.did();\n   `did:key:z6MknwZL7aFNFGoq7ZaZv47LF7tiqtwV3ZrYRbAJEmUWRRkh`\n   ```\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Json Web Encrypted Token / Time Based Encryption \n   ```js\n    import { EncryptJWT, DecryptJWT } from '@functionland/fula-sec'\n     \n     /* Securly export your wrapped wnfs key */\n     const jwet = await new EncryptJWT({ any: 'your sensitive data to encrypt'})\n        .setIssuedAt()\n        .setNotBefore(Math.floor(Date.now() / 1000))\n        .setIssuer(did.did())\n        .setAudience(did.did())\n        .setExpirationTime('3s')\n        .encrypt(keyPair.secretKey);\n\n    /* Verify and decrypt to get your wnfs key within 3 second as declared above */\n     const payload = await new DecryptJWT(keyPair.secretKey).verify(jwet)    \n      `payload:  {\n         aud: 'did:key:z6MknwZL7aFNFGoq7ZaZv47LF7tiqtwV3ZrYRbAJEmUWRRkh',\n         exp: 1669043742,\n         iat: 1669043738,\n         iss: 'did:key:z6MknwZL7aFNFGoq7ZaZv47LF7tiqtwV3ZrYRbAJEmUWRRkh',\n         nbf: 1669043738,\n         any: 'your sensitive data to encrypt'\n      }\n      `\n   ```\n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- ROADMAP --\u003e\n## Content\n- [X] HDKEY Drive\n- [X] Identity (DID)\n- [X] JWE\n- [X] JWET\n\n\nSee the [open issues](https://github.com/functionland/fula-sec/issues) for a full list of proposed features (and known issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Development\n- You have the opportunity to test it by installing a [demo application -\u003e ](https://github.com/functionland/fula-linking)\n- Fula documents related to Architecture, Protocol, dApps and  and usage can be found on the [Function land documentation site](https://functionland.gitbook.io/product-docs/EZsKoqxFAOfV4Ap7jQjB/)\n\n\n## Community\n- Connect with function land developers. Questions, support, and discussions: [Join the Fx Discord](https://discord.com/invite/k9UybUBdBB)\n- Bugs and Feature Requests: Open an issue in the appropriate [Github repository](https://github.com/functionland)\n- The latest updates can be found here. [Blog](https://blog.fx.land/), [twitter](https://twitter.com/functionland)\n\n\n## Maintainers\n- [Saidov](https://github.com/ruffiano)\n\n\u003c!-- LICENSE --\u003e\n## License\n\nSee [`LICENSE`](/LICENSE) for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunctionland%2Ffula-sec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunctionland%2Ffula-sec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunctionland%2Ffula-sec/lists"}