{"id":19139920,"url":"https://github.com/arcblock/did-motif","last_synced_at":"2025-08-04T05:33:03.290Z","repository":{"id":96025197,"uuid":"462156935","full_name":"ArcBlock/did-motif","owner":"ArcBlock","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-04T10:22:38.000Z","size":149,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-07-04T10:41:03.354Z","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/ArcBlock.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-22T05:48:46.000Z","updated_at":"2025-07-04T10:22:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b811d3d-3923-45be-9f91-2eb1cce288e8","html_url":"https://github.com/ArcBlock/did-motif","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/ArcBlock/did-motif","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fdid-motif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fdid-motif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fdid-motif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fdid-motif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArcBlock","download_url":"https://codeload.github.com/ArcBlock/did-motif/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fdid-motif/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268654327,"owners_count":24285122,"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-08-04T02:00:09.867Z","response_time":79,"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-09T07:15:39.793Z","updated_at":"2025-08-04T05:33:02.442Z","avatar_url":"https://github.com/ArcBlock.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DID Motif\n\nA javascript library for generating [DID](https://github.com/ArcBlock/ABT-DID-Protocol) identicons.\n\n## Installation\n\n```bash\nnpm i @arcblock/did-motif\n# Or Yarn\nyarn add @arcblock/did-motif\n```\n\n## Usage\n\nrender DID Motif: \n\n``` js\nimport { update } from '@arcblock/did-motif';\n\nconst element = document.getElementById('my-canvas');\n// or const element = document.getElementById('my-svg');\nupdate(element, 'z35n6X6rDp8rWWCGSiXZgvd42bixdLULmX8oX', { size: 36 });\n```\n\nrender DID Motif with animation: \n\n``` js\nimport { update } from '@arcblock/did-motif';\n\nconst element = document.getElementById('my-canvas');\n// or const element = document.getElementById('my-svg');\nupdate(element, 'z35n6X6rDp8rWWCGSiXZgvd42bixdLULmX8oX', { size: 36, animation: true });\n```\n\n\nuse `toDataURL` to convert a DID to an image data URL, we can assign the `DataURL` as the value of the `src` attribute of `\u003cimg\u003e` element.\n\n``` js\nimport { toDataURL } from '@arcblock/did-motif';\n\nconst img = document.getElementById('my-img');\nimg.src = toDataURL({ did: 'z35n6X6rDp8rWWCGSiXZgvd42bixdLULmX8oX', size: 36 });\n```\n\nSee more examples and options of working with `@arcblock/did-motif` [here](https://github.com/ArcBlock/did-motif/blob/master/examples/index.js).\n\n## License\n\nCopyright 2018-2022 ArcBlock\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcblock%2Fdid-motif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcblock%2Fdid-motif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcblock%2Fdid-motif/lists"}