forked from blocknative/web3-onboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Polkadot Vault
Thiendekaco edited this page Mar 6, 2024
·
2 revisions
Utilizing the Web3-Onboard's evm wallet integration framework, we have constructed and expanded the connectivity mechanism to accommodate extensions designed for SubWallet's substrate accounts. For Polkadot Vault, we have developed a QR code scanning mechanism to execute various interfaces. For more information on using Polkadot Vault, please refer to the polkadot.wiki . Developers can find instructions in the Polkadot Vault documentation
npm install @subwallet-connect/core @subwallet-connect/polkadot-vault
import Onboard from '@subwallet-connect/core'
import PolkadotVaultModule from '@subwallet-connect/polkadot-vault'
// initialize the module
const polkadotVault = PolkadotVaultModule ()
const onboard = Onboard({
// ... other Onboard options
wallets: [
polkadotVault,
//... other wallets
]
})
const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)
For hardware wallets with Substrate support, we will also provide a SubstrateProvider as the provider to implement interfaces, which include the following methods: polkadot_signMessage, polkadot_sendTransaction, polkadot_requestAccounts