{"id":19291719,"url":"https://github.com/hirosystems/connect","last_synced_at":"2025-04-05T06:07:55.268Z","repository":{"id":37406396,"uuid":"226051004","full_name":"hirosystems/connect","owner":"hirosystems","description":"A library for building excellent user experiences with Stacks.","archived":false,"fork":false,"pushed_at":"2025-03-17T12:27:00.000Z","size":14656,"stargazers_count":81,"open_issues_count":37,"forks_count":41,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-03-29T05:11:14.139Z","etag":null,"topics":["blockchain","blockstack","decentralized","stacks","styled-components","typescript"],"latest_commit_sha":null,"homepage":"https://docs.hiro.so/stacks/connect","language":"SCSS","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/hirosystems.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-12-05T08:18:56.000Z","updated_at":"2025-03-18T07:21:01.000Z","dependencies_parsed_at":"2022-07-09T15:02:29.624Z","dependency_job_id":"635d6398-18ad-47c1-92f5-412b79f274dd","html_url":"https://github.com/hirosystems/connect","commit_stats":null,"previous_names":[],"tags_count":465,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fconnect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fconnect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fconnect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fconnect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hirosystems","download_url":"https://codeload.github.com/hirosystems/connect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294539,"owners_count":20915340,"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":["blockchain","blockstack","decentralized","stacks","styled-components","typescript"],"created_at":"2024-11-09T22:27:27.929Z","updated_at":"2025-04-05T06:07:55.248Z","avatar_url":"https://github.com/hirosystems.png","language":"SCSS","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"/.github/img/banner.svg\" alt=\"Stacks Connect\"\u003e\n\u003c/div\u003e\n\n## ⚡️ Building a Stacks-enabled web app?\n\nHead over to the [`@stacks/connect` README](https://github.com/hirosystems/connect/tree/main/packages/connect).\n\n---\n\n## Development Notes\n\n### Packages\n\nThis repository includes three packages:\n\n- [`@stacks/connect`](./packages/connect): The one-stop-shop tool for letting web-apps interact with Stacks web wallets.\n- [`@stacks/connect-ui`](./packages/connect-ui): A web-component UI for displaying an intro modal in Stacks web-apps during authentication _(used in the background by `@stacks/connect`)_.\n- ~~[`@stacks/connect-react`](./packages/connect-react): A wrapper library for making `@stacks/connect` use in React even easier~~\n\n### Wallet Implementation Guide\n\nWallets implement a \"Provider\" interface.\nThe latest spec uses a simple JS Object exposing a `.request(method: string, params?: object)` method.\n\nPseudo-code:\n\n```ts\nwindow.MyProvider = {\n  async request(method, params) {\n    // Somehow communicate with the wallet (e.g. via events)\n\n    // Recommendation: Create a JSON RPC 2.0 request object\n    // https://www.jsonrpc.org/specification\n\n    return Promise.resolve({\n      // Respond with a JSON RPC 2.0 response object\n      id: crypto.randomUUID(), // required, same as request\n      jsonrpc: '2.0', // required\n\n      // `.result` is required on success\n      result: {\n        // object matching specified RPC methods\n      },\n\n      // `.error` is required on error\n      error: {\n        // Use existing codes from https://www.jsonrpc.org/specification#error_object\n        code: number, // required, integer\n        message: string, // recommended, single sentence\n        data: object, // optional\n      },\n    });\n  },\n  isMyWallet: true, // optional, a way of identifying the wallet for developers\n};\n\nwindow.wbip_providers = window.wbip_providers || [];\nwindow.wbip_providers.push({\n  // `WbipProvider` type\n    /** The global \"path\" of the provider (e.g. `\"MyProvider\"` if registered at `window.MyProvider`) */\n  id: 'MyProvider',\n  /** The name of the provider, as displayed to the user */\n  name: 'My Wallet';\n  /** The data URL of an image to show (e.g. `data:image/png;base64,iVBORw0...`) @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs */\n  icon?: 'data:image/png;base64,iVBORw0...';\n  /** Web URL of the provider */\n  webUrl?: 'https://mywallet.example.com';\n\n  // Addional URLs\n  chromeWebStoreUrl?: string;\n  mozillaAddOnsUrl?: string;\n  googlePlayStoreUrl?: string;\n  iOSAppStoreUrl?: string;\n});\n```\n\n#### JSON RPC 2.0\n\nWallets may add their own unstandardized methods.\nHowever, the minimum recommended methods are:\n\n- `getAddresses` [WBIP](https://wbips.netlify.app/request_api/getAddresses)\n- `sendTransfer` [WBIP](https://wbips.netlify.app/request_api/sendTransfer)\n- `signPsbt` [WBIP](https://wbips.netlify.app/request_api/signPsbt)\n- `stx_getAddresses` [SIP-030](https://github.com/janniks/sips/blob/main/sips/sip-030/sip-030-wallet-interface.md)\n- `stx_transferStx` [SIP-030](https://github.com/janniks/sips/blob/main/sips/sip-030/sip-030-wallet-interface.md)\n- `stx_callContract` [SIP-030](https://github.com/janniks/sips/blob/main/sips/sip-030/sip-030-wallet-interface.md)\n- `stx_signMessage` [SIP-030](https://github.com/janniks/sips/blob/main/sips/sip-030/sip-030-wallet-interface.md)\n- `stx_signStructuredMessage` [SIP-030](https://github.com/janniks/sips/blob/main/sips/sip-030/sip-030-wallet-interface.md)\n\n---\n\n\u003cdiv align=\"center\"\u003e\u003cbr\u003e\n\n[![Hiro Docs](https://img.shields.io/badge/%2F--%2F-Docs-orange?labelColor=gray)](https://docs.hiro.so/)\u0026nbsp;\u0026nbsp;[![Hiro Twitter](https://img.shields.io/badge/Follow%20%40hirosystems-orange?labelColor=gray\u0026logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiI+PHBhdGggZmlsbD0iI2ZmZiIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNNTAgMTAuNGMtMS44LjktMy44IDEuNC01LjggMS43IDItMS4zIDMuNy0zLjMgNC41LTUuNy0yIDEuMS00LjIgMi02LjYgMi41YTEwLjMgMTAuMyAwIDAgMC0xNy41IDkuM0EyOS4yIDI5LjIgMCAwIDEgMy40IDcuNWExMC4yIDEwLjIgMCAwIDAgMy4yIDEzLjdDNSAyMS4yIDMuMyAyMC43IDIgMjB2LjJjMCA1IDMuNSA5LjEgOC4yIDEwYTEwLjMgMTAuMyAwIDAgMS00LjYuMmMxLjMgNC4xIDUgNyA5LjYgNy4yQTIwLjYgMjAuNiAwIDAgMS0uMSA0MS43YTI5IDI5IDAgMCAwIDQ1LTI2YzItMS40IDMuOC0zLjIgNS4yLTUuM3oiIGZvbnQtZmFtaWx5PSJub25lIiBmb250LXNpemU9Im5vbmUiIGZvbnQtd2VpZ2h0PSJub25lIiBzdHlsZT0ibWl4LWJsZW5kLW1vZGU6bm9ybWFsIiB0ZXh0LWFuY2hvcj0ibm9uZSIgdHJhbnNmb3JtPSJzY2FsZSg1LjEpIi8+PC9zdmc+\u0026logoColor=white)](https://twitter.com/hirosystems)\u0026nbsp;\u0026nbsp;[![Stacks Discord](https://img.shields.io/badge/%23stacks--js_on%20Discord-orange?labelColor=gray\u0026logo=discord\u0026logoColor=white)](https://stacks.chat/)\n\n\u003c/div\u003e\n\n## 🎁 Contribute\n\nDevelopment of this product happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving the product.\n\n### Code of Conduct\n\nPlease read our [Code of conduct](https://github.com/hirosystems/connect/blob/main/CODE_OF_CONDUCT.md) since we expect project participants to adhere to it.\n\n### Contributing Guide\n\nRead our [contributing guide](https://github.com/hirosystems/connect/blob/main/.github/CONTRIBUTING.md) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes.\n","funding_links":[],"categories":["Frontend Development"],"sub_categories":["Core Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fconnect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirosystems%2Fconnect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fconnect/lists"}