{"id":18246848,"url":"https://github.com/scrypt-inc/counter-demos","last_synced_at":"2025-04-08T19:34:55.424Z","repository":{"id":184946275,"uuid":"672320882","full_name":"sCrypt-Inc/counter-demos","owner":"sCrypt-Inc","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-02T03:16:57.000Z","size":5,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-14T15:16:40.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/sCrypt-Inc.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":"2023-07-29T17:09:42.000Z","updated_at":"2024-04-08T19:36:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"4130de33-a9af-418d-8afd-3207f1171dd7","html_url":"https://github.com/sCrypt-Inc/counter-demos","commit_stats":null,"previous_names":["scrypt-inc/counter-demos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sCrypt-Inc%2Fcounter-demos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sCrypt-Inc%2Fcounter-demos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sCrypt-Inc%2Fcounter-demos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sCrypt-Inc%2Fcounter-demos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sCrypt-Inc","download_url":"https://codeload.github.com/sCrypt-Inc/counter-demos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247912828,"owners_count":21017052,"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","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-05T09:27:40.619Z","updated_at":"2025-04-08T19:34:55.405Z","avatar_url":"https://github.com/sCrypt-Inc.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# counter-demos\n\n![](https://aaron67-public.oss-cn-beijing.aliyuncs.com/202307151317201.png)\n\n## deployments\n\n- [React](https://counter-react-pearl.vercel.app/)\n- [Next.js](https://counter-next-psi.vercel.app/)\n- [Angular](https://counter-angular-sigma.vercel.app/)\n- [Svelte](https://counter-svelte-eight.vercel.app/)\n- Vue 3.x\n  - [bundled with Vite](https://counter-vue3-vite.vercel.app/)\n  - [bundled with Webpack](https://counter-vue3-webpack.vercel.app/)\n- Vue 2.x\n  - [bundled with Vite](https://counter-vue2-vite.vercel.app/)\n  - [bundled with Webpack](https://counter-vue2-webpack.vercel.app/)\n\n## contract\n\n```ts\nimport { method, prop, SmartContract, hash256, assert, ByteString, SigHash } from 'scrypt-ts'\n\nexport class Counter extends SmartContract {\n    @prop(true)\n    count: bigint\n\n    constructor(count: bigint) {\n        super(count)\n        this.count = count\n    }\n\n    @method(SigHash.SINGLE)\n    public increment() {\n        this.count++\n\n        // make sure balance in the contract does not change\n        const amount: bigint = this.ctx.utxo.value\n        // output containing the latest state\n        const output: ByteString = this.buildStateOutput(amount)\n        // verify current tx has this single output\n        assert(this.ctx.hashOutputs === hash256(output), 'hashOutputs mismatch')\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrypt-inc%2Fcounter-demos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrypt-inc%2Fcounter-demos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrypt-inc%2Fcounter-demos/lists"}