Description

Represents a Phantom wallet.

Example

import { createProvider, PhantomProvider } from '@rarimo/provider'

const getPhantomWalletAddress = async () => {
// Connect to the Phantom wallet in the browser using Web3.js, using the PhantomProvider interface to limit bundle size.
const provider = await createProvider(PhantomProvider)
await provider.connect()

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

Hierarchy

Implements

Constructors

Properties

address?: string
chainId?: ChainId
emitter: EventEmitter<ProviderEventMap> = ...
provider: SolanaProvider
rawProvider: RawProvider

Accessors

  • get defaultEventPayload(): {
        address: undefined | string;
        chainId: undefined | ChainId;
        isConnected: boolean;
    }
  • Returns {
        address: undefined | string;
        chainId: undefined | ChainId;
        isConnected: boolean;
    }

    • address: undefined | string
    • chainId: undefined | ChainId
    • isConnected: boolean

Methods

Generated using TypeDoc