Description

Represents a browser-based wallet.

To connect to a wallet, create an object to represent the wallet to access with the createProvider() method. These wallet objects implement the Provider interface so you can access different types of wallets in a consistent way.

Example

import { createProvider } from '@rarimo/provider'
import { MetamaskProvider } from '@rarimo/providers-evm'

const getMetamaskWalletAddress = async () => {
// Connect to the Metamask wallet in the browser, using the MetamaskProvider interface to limit bundle size.
const provider = await createProvider(MetamaskProvider)

// Get the address of the wallet
console.log(provider.address)
}

Hierarchy

  • Provider

Implements

Constructors

Properties

#proxy?: ProviderProxy
#proxyConstructor: ProviderProxyConstructor
#selectedProvider?: Providers

Accessors

Methods

Generated using TypeDoc