{"id":20252377,"url":"https://github.com/bewinxed/wallet-adapter-svelte","last_synced_at":"2026-02-16T17:02:21.328Z","repository":{"id":254062618,"uuid":"845372220","full_name":"Bewinxed/wallet-adapter-svelte","owner":"Bewinxed","description":"Svelte 5 Solana Wallet Adapter","archived":false,"fork":false,"pushed_at":"2024-08-27T18:01:52.000Z","size":354,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-26T00:20:18.885Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bewinxed.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,"zenodo":null}},"created_at":"2024-08-21T05:56:20.000Z","updated_at":"2024-11-22T05:02:47.000Z","dependencies_parsed_at":"2025-04-10T23:16:44.148Z","dependency_job_id":"2508383d-be2e-48c5-9e28-e1c31b1ca875","html_url":"https://github.com/Bewinxed/wallet-adapter-svelte","commit_stats":null,"previous_names":["bewinxed/wallet-adapter-svelte"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Bewinxed/wallet-adapter-svelte","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bewinxed%2Fwallet-adapter-svelte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bewinxed%2Fwallet-adapter-svelte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bewinxed%2Fwallet-adapter-svelte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bewinxed%2Fwallet-adapter-svelte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bewinxed","download_url":"https://codeload.github.com/Bewinxed/wallet-adapter-svelte/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bewinxed%2Fwallet-adapter-svelte/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29513433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-14T10:16:26.966Z","updated_at":"2026-02-16T17:02:21.313Z","avatar_url":"https://github.com/Bewinxed.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@solana/wallet-adapter-react`\n\n## Creating a custom connect button\n\nThis package exports a series of hooks that you can use to create custom wallet connection buttons. They manage the state of the wallet connection for you, and return helper methods that you can attach to your event handlers.\n\nWhat follows is the documentation for `useWalletMultiButton()`.\n\n### States\n\n-   `no-wallet` \\\n    In this state you are neither connected nor is there a wallet selected. Allow your users to select from the list of `wallets`, then call `onSelectWallet()` with the name of the wallet they chose.\n-   `has-wallet` \\\n    This state implies that there is a wallet selected, but that your app is not connected to it. Render a connect button that calls `onConnect()` when clicked.\n-   `disconnecting` \\\n    When in this state, the last-connected wallet is in mid-disconnection.\n-   `connected` \\\n    In this state, you have access to the connected `publicKey` and an `onDisconnect()` method that you can call to disconnect from the wallet. At any time you can call `onSelectWallet()` to change wallets.\n-   `connecting` \\\n    When in this state, the wallet is in mid-connection.\n\n### Functions\n\n-   `onConnect` \\\n     Connects the currently selected wallet. Available in the `has-wallet` state.\n-   `onDisconnect` \\\n     Disconnects the currently selected wallet. Available in the `has-wallet`, `connected`, and `connecting` states.\n-   `onSelectWallet()` \\\n     Calls the `onSelectWallet()` function that you supplied as config to `useWalletMultiButton`. That function receives the list of `wallets` and offers you an `onSelectWallet()` callback that you can call with the name of the wallet to switch to.\n\n### Example\n\n```ts\nfunction CustomConnectButton() {\n    const [walletModalConfig, setWalletModalConfig] = useState\u003cReadonly\u003c{\n        onSelectWallet(walletName: WalletName): void;\n        wallets: Wallet[];\n    }\u003e | null\u003e(null);\n    const { buttonState, onConnect, onDisconnect, onSelectWallet } = useWalletMultiButton({\n        onSelectWallet: setWalletModalConfig,\n    });\n    let label;\n    switch (buttonState) {\n        case 'connected':\n            label = 'Disconnect';\n            break;\n        case 'connecting':\n            label = 'Connecting';\n            break;\n        case 'disconnecting':\n            label = 'Disconnecting';\n            break;\n        case 'has-wallet':\n            label = 'Connect';\n            break;\n        case 'no-wallet':\n            label = 'Select Wallet';\n            break;\n    }\n    const handleClick = useCallback(() =\u003e {\n        switch (buttonState) {\n            case 'connected':\n                return onDisconnect;\n            case 'connecting':\n            case 'disconnecting':\n                break;\n            case 'has-wallet':\n                return onConnect;\n            case 'no-wallet':\n                return onSelectWallet;\n                break;\n        }\n    }, [buttonState, onDisconnect, onConnect, onSelectWallet]);\n    return (\n        \u003c\u003e\n            \u003cbutton disabled={buttonState === 'connecting' || buttonState === 'disconnecting'} onClick={handleClick}\u003e\n                {label}\n            \u003c/button\u003e\n            {walletModalConfig ? (\n                \u003cModal\u003e\n                    {walletModalConfig.wallets.map((wallet) =\u003e (\n                        \u003cbutton\n                            key={wallet.adapter.name}\n                            onClick={() =\u003e {\n                                walletModalConfig.onSelectWallet(wallet.adapter.name);\n                                setWalletModalConfig(null);\n                            }}\n                        \u003e\n                            {wallet.adapter.name}\n                        \u003c/button\u003e\n                    ))}\n                \u003c/Modal\u003e\n            ) : null}\n        \u003c/\u003e\n    );\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbewinxed%2Fwallet-adapter-svelte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbewinxed%2Fwallet-adapter-svelte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbewinxed%2Fwallet-adapter-svelte/lists"}