{"id":25902386,"url":"https://github.com/dapplets/connected-accounts-assembly","last_synced_at":"2026-06-12T07:32:07.520Z","repository":{"id":98799229,"uuid":"501590571","full_name":"dapplets/connected-accounts-assembly","owner":"dapplets","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-29T10:32:11.000Z","size":7806,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-03T03:15:57.284Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dapplets.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}},"created_at":"2022-06-09T09:37:05.000Z","updated_at":"2023-12-05T11:53:35.000Z","dependencies_parsed_at":"2023-03-09T04:45:34.747Z","dependency_job_id":"e50890a0-a4be-4a0a-ab01-2b556187c89e","html_url":"https://github.com/dapplets/connected-accounts-assembly","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dapplets/connected-accounts-assembly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dapplets%2Fconnected-accounts-assembly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dapplets%2Fconnected-accounts-assembly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dapplets%2Fconnected-accounts-assembly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dapplets%2Fconnected-accounts-assembly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dapplets","download_url":"https://codeload.github.com/dapplets/connected-accounts-assembly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dapplets%2Fconnected-accounts-assembly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34234557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":"2025-03-03T03:15:59.798Z","updated_at":"2026-06-12T07:32:07.494Z","avatar_url":"https://github.com/dapplets.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![connecting-accounts-smart-contract](/docs/light.png#gh-light-mode-only)\n![connecting-accounts-smart-contract](/docs/dark.png#gh-dark-mode-only)\n\n# Connected Accounts Smart Contract\n\nThis contract allows you to pair accounts of various social networks with blockchain accounts. Thus, the user can create his own network of accounts, which can be represented as a graph.\n\nTypes of links that can be created at the moment:\n\n-   NEAR Testnet + Twitter\n-   NEAR Testnet + GitHub\n-   NEAR Testnet + Ethereum (using MetaMask signature)\n-   Twitter + GitHub\n\nAlso you can set up one primary account for a network.\n\nSee also:\n\n-   [NEAR contract verifying the Ethereum signature]\n-   [Connected Accounts Dapplet]\n-   [Dapplets Browser Extension]\n\n## Quick Start\n\nBefore you compile this code, you will need to install [Node.js] ≥ 12 and [NEAR CLI].\n\n## Exploring The Code\n\n1. The main smart contract code lives in `assembly/index.ts`. You can compile\n   it with:\n\n    ```bash\n    npm i\n    npm run build\n    ```\n\n2. Tests: You can run smart contract tests with:\n\n    ```bash\n    npm run test\n    ```\n\n    This runs integrational tests using [ava].\n\n3. Deployment\n\n    Create an Account and Deploy\n\n    ```bash\n    # Automatically deploy the wasm in a new account\n    near dev-deploy out/main.wasm\n    ```\n\n    Deploy in an Existing Account\n\n    ```bash\n    # login into your account\n    near login\n\n    # deploy the contract\n    near deploy \u003caccountId\u003e out/main.wasm\n    ```\n\n    See more in [NEAR Docs].\n\n4. Initialize the contract\n\n    ```bash\n    near call \u003caccountId\u003e initialize '{\"ownerAccountId\": \"\u003caccountId\u003e\", \"oracleAccountId\": \"\u003caccountId\u003e\", \"minStakeAmount\": \"1000000000000000000000\"}' --accountId=\u003caccountId\u003e\n    ```\n\n## Oracle\n\nThe oracle is needed to validate the social network connection conditions. If the verification is successful, it calls the contract method to confirm the connection. If negative — to cancel the request.\n\nOracle must be installed on a VPS. For its operation, we recommend using the [cron] utility and running it at a frequency of 1 time per second.\n\nThe environment variable must contain the address of the deployed contract, as well as the account ID and private key of the NEAR wallet, on behalf of which interactions with the contract will take place. The same ID must be specified when initializing the contract with the second parameter - `oracleAccountId`.\n\n## Built With\n\nA [smart contract] written in [AssemblyScript] for an app initialized with [create-near-app].\n\n[smart contract]: https://docs.near.org/develop/quickstart-guide\n[assemblyscript]: https://www.assemblyscript.org/\n[create-near-app]: https://github.com/near/create-near-app\n[node.js]: https://nodejs.org/en/download/package-manager/\n[ava]: https://github.com/avajs/ava\n[cron]: https://en.wikipedia.org/wiki/Cron\n[connected accounts dapplet]: https://github.com/dapplets/connecting-accounts-dapplet\n[dapplets browser extension]: https://github.com/dapplets/dapplet-extension\n[near contract verifying the ethereum signature]: https://github.com/dapplets/verify-eth-signature-on-near\n[near docs]: https://docs.near.org/develop/deploy\n[near cli]: https://www.npmjs.com/package/near-cli\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdapplets%2Fconnected-accounts-assembly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdapplets%2Fconnected-accounts-assembly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdapplets%2Fconnected-accounts-assembly/lists"}