https://github.com/talismansociety/talisman-connect
Connect your DApp to Ethereum and Polkadot wallets with Talisman Connect.
https://github.com/talismansociety/talisman-connect
Last synced: 2 months ago
JSON representation
Connect your DApp to Ethereum and Polkadot wallets with Talisman Connect.
- Host: GitHub
- URL: https://github.com/talismansociety/talisman-connect
- Owner: TalismanSociety
- Created: 2022-02-01T00:20:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-15T04:35:07.000Z (7 months ago)
- Last Synced: 2025-03-29T05:01:41.196Z (3 months ago)
- Language: TypeScript
- Homepage: https://talismansociety.github.io/talisman-connect/
- Size: 6.98 MB
- Stars: 36
- Watchers: 5
- Forks: 21
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Talisman Connect
[](https://talismansociety.github.io/talisman-connect)
[](https://discord.gg/talisman)**Connect your DApp** to Ethereum and Polkadot wallets with Talisman Connect. A minimal SDK to connect your DApp with your users' favourite EOA wallets.
![]()
## How to use (for DApp developers)
### Quickstart example
1. Add the SDK to your DApp's dependencies:
```bash
# Using npm
npm install --save @talismn/connect-wallets
# Using bun
bun add @talismn/connect-wallets
# Using pnpm
pnpm add @talismn/connect-wallets
# Using yarn
yarn add @talismn/connect-wallets
```1. Add the code
```ts
import { getWallets } from '@talismn/connect-wallets'// get an array of wallets which are installed
const installedWallets = getWallets().filter((wallet) => wallet.installed)// get talisman from the array of installed wallets
const talismanWallet = installedWallets.find(
(wallet) => wallet.extensionName === 'talisman',
)// enable the wallet
if (talismanWallet) {
talismanWallet.enable('myCoolDapp').then(() => {
talismanWallet.subscribeAccounts((accounts) => {
// do anything you want with the accounts provided by the wallet
console.log('got accounts', accounts)
})
})
}
```### More details
Talisman Connect can be used in one of three ways:
1. `[POPULAR]` Integrate as a standalone library within your own UI.
See [@talismn/connect-wallets](https://github.com/TalismanSociety/talisman-connect/tree/main/packages/connect-wallets) for instructions on this option.1. Integrate using a set of themeable React components.
See [@talismn/connect-components](https://github.com/TalismanSociety/talisman-connect/tree/main/packages/connect-components) for instructions on this option.1. Integrate using our generic ready-to-use modal UI.
See [@talismn/connect-ui](https://github.com/TalismanSociety/talisman-connect/tree/main/packages/connect-ui) for instructions on this option.## How to contribute to this repo
1. Clone this repo and install its dependencies.
```bash
git clone [email protected]:TalismanSociety/talisman-connect.git
cd talisman-connect
pnpm install
pnpm build
```1. Run the devserver to preview your changes as you make them.
```bash
pnpm run dev
```1. Make some changes, then commit and push them to a fork on GitHub.
1. Open a pull request and our team will review your changes.