{"id":19664885,"url":"https://github.com/small-tech/svelte-nano-donate","last_synced_at":"2025-09-07T06:08:04.786Z","repository":{"id":57160999,"uuid":"355206050","full_name":"small-tech/svelte-nano-donate","owner":"small-tech","description":"A donation component for the Nano cryptocurrency built using Svelte (which you can use in non-Svelte projects also).","archived":false,"fork":false,"pushed_at":"2021-04-08T14:42:25.000Z","size":116,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-08T22:31:11.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/small-tech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-06T13:50:52.000Z","updated_at":"2025-01-24T18:09:14.000Z","dependencies_parsed_at":"2022-09-09T10:23:30.680Z","dependency_job_id":null,"html_url":"https://github.com/small-tech/svelte-nano-donate","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/small-tech/svelte-nano-donate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/small-tech%2Fsvelte-nano-donate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/small-tech%2Fsvelte-nano-donate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/small-tech%2Fsvelte-nano-donate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/small-tech%2Fsvelte-nano-donate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/small-tech","download_url":"https://codeload.github.com/small-tech/svelte-nano-donate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/small-tech%2Fsvelte-nano-donate/sbom","scorecard":{"id":832307,"data":{"date":"2025-08-11","repo":{"name":"github.com/small-tech/svelte-nano-donate","commit":"b126d7488086b60ba7ea1ac730f26c20861d4f36"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.2,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-wv8q-r932-8hc7","Warn: Project is vulnerable to: GHSA-8266-84wp-wv5c"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T18:04:20.426Z","repository_id":57160999,"created_at":"2025-08-23T18:04:20.426Z","updated_at":"2025-08-23T18:04:20.426Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274001714,"owners_count":25205318,"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-07T02:00:09.463Z","response_time":67,"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-11T16:19:29.572Z","updated_at":"2025-09-07T06:08:04.765Z","avatar_url":"https://github.com/small-tech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @small-tech/svelte-nano-donate\n\nA [Nano](https://nano.org) donation component built using Svelte.\n\n⯈ [Live demo](https://small-tech.org/demo/svelte-nano-donate/)\n\n___Note:__ you can [use this component in any web project](#use-in-non-svelte-apps), you __do not__ need to use Svelte yourself._\n\n## Install\n\n```shell\nnpm i @small-tech/svelte-nano-donate\n```\n\n## Use (in Svelte apps)\n\nSimply import and use the component.\n\nAll you need to use the component is the Nano address you want to receive donations into:\n\n```html\n\u003cscript\u003e\n  import Donate from '@small-tech/svelte-nano-donate'\n\u003c/script\u003e\n\n\u003cDonate address=nano_1hfmyyjtm4muiudw1m8dz54jry13jx8xykp9kz1mx3uqe4dtsb3yrdkjgy6g/\u003e\n```\n\nYou can also customise the component by specifying properties like the initial `amount` and `currency` that’s displayed. And you even specify a theme to customise how the component looks:\n\n```html\n\u003cscript\u003e\n  import Donate from '@small-tech/svelte-nano-donate'\n\u003c/script\u003e\n\n\u003cmain\u003e\n  \u003cDonate\n    amount=5\n    currency=usd\n    address=nano_1hfmyyjtm4muiudw1m8dz54jry13jx8xykp9kz1mx3uqe4dtsb3yrdkjgy6g\n    theme={{colour: '#0062cc'}}\n  /\u003e\n\u003c/main\u003e\n```\n\nHere’s [a live demo of this example built using SvelteKit](https://small-tech.org/demo/svelte-nano-donate) ([source code](https://github.com/small-tech/svelte-nano-donate-demo/)).\n\nThe `colour` value specified here will be used for the text. Also, the `border-colour` of form elements will automatically be calculated as a lighter tint of this colour, unless you specify that property explicitly.\n\n\u003e _Please make sure you check the contrast ratio of the colours you choose for accessibility. You can do so using [Lea Verou](https://lea.verou.me/)’s [online contrast ratio tool](https://contrast-ratio.com) or, if you want to use an eyedropper tool to sample colours, a native app for your platform like [Daniel Foré](https://github.com/danrabbit)’s excellent [Harvey ](https://appcenter.elementary.io/com.github.danrabbit.harvey/) on [elementary OS](https://elementary.io/))._\n\nThe component comes with automatic dark mode support.\n\nFor the full list of theme properties, please see the [Theming](#theming) section.\n\n## Use (in non-Svelte apps)\n\nYou can `require()` or `import()` the component in your projects as it is simply a regular JavaScript class.\n\nTo use it, instantiate the class and pass it an options object that contains the DOM element that you want the class to bind to any properties you want to include (only the `address` property is required). The plain HTML and JavaScript snippet below is functionally equivalent to the Svelte version, above.\n\n```html\n\u003cmain\u003e\n  \u003cdiv id='nano-donate'\u003e\u003c/div\u003e\n\n  \u003cscript type='module'\u003e\n    import NanoDonate from '@small-tech/svelte-nano-donate'\n\n    const nanoDonate = new NanoDonate({\n      target: document.getElementById('nano-donate'),\n      props: {\n        amount: 5,\n        currency: 'usd',\n        address: 'nano_1hfmyyjtm4muiudw1m8dz54jry13jx8xykp9kz1mx3uqe4dtsb3yrdkjgy6g',\n        theme: {colour: '#4A90E2'}\n      }\n    })\n  \u003c/script\u003e\n\u003c/main\u003e\n```\n\nThis example is included in the _example/_ folder. Run it in a local server (e.g., using [Site.js](https://sitejs.org)) to see it in action.\n\n## Theming\n\nBy default, you get a theme with light and dark modes.\n\nYou can also apply an entirely custom theme to the component by passing an object to the `theme` property.\n\nThe list of valid colour names for a custom `theme` object are shown here and they map to the CSS variables used in the component:\n\n| Name                | Default            | Used for                                          |\n| ------------------- | ------------------ | ------------------------------------------------- |\n| `colour`            | `rgb(48, 67, 73)`  | Text in form elements and links                   |\n| `border-colour`     | `rgb(183,186,188)` | Borders of form elements; 50% lighter than colour |\n| `background-colour` | `white`            | Component background                              |\n\nIf you don’t explicitly pass a custom `border-colour` value, it will be calculated automatically from the value of the `colour` property. _Note that for this automatic calculation to succeed, you must specify the value of the `colour` property in either rgb(a) or hex format (not as a CSS colour name)._\n\n\u003e _Please make sure you check the contrast ratio of the colours you choose for accessibility. You can do so using [Lea Verou](https://lea.verou.me/)’s [online contrast ratio tool](https://contrast-ratio.com) or, if you want to use an eyedropper tool to sample colours, a native app for your platform like [Daniel Foré](https://github.com/danrabbit)’s excellent [Harvey ](https://appcenter.elementary.io/com.github.danrabbit.harvey/) on [elementary OS](https://elementary.io/))._\n\n\n## Develop\n\nTo contribute to the development of this component, please use the discussion feature on GitHub to discuss any changes/improvements you want to make and open issues if you notice any bugs before working on a feature/fix and submitting a pull request.\n\n### Build\n\n```\nnpm run build\n```\n\nThis will output an ECMAScript module and a UMD script in the `dist` folder. The build script runs automatically via the `prepublishOnly` hook in package.json when publishing to npm.\n\n## Like this? Fund us!\n\n[Small Technology Foundation](https://small-tech.org) is a tiny, independent not-for-profit.\n\nWe exist in part thanks to patronage by people like you. If you share [our vision](https://small-tech.org/about/#small-technology) and want to support our work, please [become a patron or donate to us](https://small-tech.org/fund-us) today and help us continue to exist.\n\n## Copyright\n\n\u0026copy; 2021-present [Aral Balkan](https://ar.al) and [Laura Kalbag](https://laurakalbag.com), [Small Technology Foundation](https://small-tech.org).\n\n## License\n\n[GPL v3](https://www.gnu.org/licenses/gpl-3.0.html)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmall-tech%2Fsvelte-nano-donate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmall-tech%2Fsvelte-nano-donate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmall-tech%2Fsvelte-nano-donate/lists"}