This is the monorepo for the Talisman Connect project.
This project aims to provide the components necessary for Dapp developers to be able to quickly connect to wallets in the Polkadot and Kusama ecosystems.
npm i --save @talisman-connect/wallets
import { getWallets } from '@talisman-connect/wallets';
// returns a list of all the extensions currently installed in the window
assert(window.injectedWeb3, "No wallets installed.")
const supportedWallets = getWallets();
// choose one of the extensions from the list
// this can be done through a UI component...
const walletToUse = supportedWallets['Talisman'] // example
// enable the wallet
const wallet = await walletToUse.enable('my dapp')
// sign a message
try {
const signer = wallet.signer;
// NOTE: Trigger the extension popup
const { signature } = await signer.signRaw({
type: 'payload',
data: 'Some data to sign...',
address: account.address,
});
} catch (err) {
// Handle error...
}
});
NOTE: We recommend yarn
yarn
yarn start
Run app on localhost:4200
.
This is a playground Dapp that showcases the WalletSelect
Modal which uses the packages listed above.
Check out our Troubleshooting instructions