forked from blocknative/web3-onboard
-
Notifications
You must be signed in to change notification settings - Fork 0
SubWallet‐Polkadot
Thiendekaco edited this page Mar 6, 2024
·
4 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.
npm install @subwallet-connect/core @subwallet-connect/subwallet-polkadot
import Onboard from '@subwallet-connect/core'
import SubWalletModule from '@subwallet-connect/subwallet-polkadot'
// initialize the module
const subWallet= SubWalletModule()
const onboard = Onboard({
// ... other Onboard options
wallets: [
subWallet,
//... other wallets
]
})
const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)
For Substrate extension wallet types, we will also provide signer and metadata to enable interface implementations. Currently, we do not plan to offer requests via the method for this type of wallet.
export interface WalletModule {
//...other property
type : 'evm' | 'substrate'
signer ?: Signer
metadata ?: InjectedMetadata
}