@thirdweb-dev/wallets
Version:
<p align="center"> <br /> <a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/legacy_packages/sdk/logo.svg?raw=true" width="200" alt=""/></a> <br /> </p> <h1 align="center">thirdweb Wallet SDK</h1> <p align="center"> <a h
94 lines • 2.75 kB
TypeScript
import type { WalletConnectConnector as WalletConnectConnectorType } from "../connectors/wallet-connect";
import { Connector } from "../interfaces/connector";
import { AbstractClientWallet, WalletOptions } from "./base";
import type { PhantomConnector as PhantomConnectorType } from "../connectors/phantom";
type PhantomWalletOptions = WalletOptions;
/**
* Wallet interface to connect [Phantom Wallet](https://phantom.app/)
*
* @example
* ```javascript
* import { PhantomWallet } from "@thirdweb-dev/wallets";
*
* const wallet = new PhantomWallet();
*
* wallet.connect();
* ```
*
* @wallet
*/
export declare class PhantomWallet extends AbstractClientWallet {
/**
* @internal
*/
connector?: Connector;
/**
* @internal
*/
walletConnectConnector?: WalletConnectConnectorType;
/**
* @internal
*/
phantomConnector?: PhantomConnectorType;
/**
* @internal
*/
isInjected: boolean;
/**
* @internal
*/
static meta: {
name: string;
iconURL: string;
urls: {
chrome: string;
};
};
/**
* @internal
*/
static id: string;
/**
* @internal
*/
get walletName(): "Phantom";
/**
* Create a `PhantomWallet` instance
* @param options -
* The `options` object includes the following properties
*
* ### clientId (recommended)
* Provide `clientId` to use the thirdweb RPCs for given `chains`
*
* You can create a client ID for your application from [thirdweb dashboard](https://thirdweb.com/create-api-key).
*
* ### chains (optional)
* Provide an array of chains you want to support.
*
* Must be an array of `Chain` objects, from the [`@thirdweb-dev/chains`](https://www.npmjs.com/package/\@thirdweb-dev/chains) package.
*
* Defaults to our [default chains](/react/react.thirdwebprovider#default-chains).
*
* ### dappMetadata (optional)
* Information about your app that the wallet will display when your app tries to connect to it.
*
* Must be an object containing `name`, `url`, and optionally `description` and `logoUrl` properties.
*
* ```javascript
* import { PhantomWallet } from "@thirdweb-dev/wallets";
*
* const walletWithOptions = new PhantomWallet({
* dappMetadata: {
* name: "thirdweb powered dApp",
* url: "https://thirdweb.com",
* description: "thirdweb powered dApp",
* logoUrl: "https://thirdweb.com/favicon.ico",
* },
* });
* ```
*/
constructor(options: PhantomWalletOptions);
protected getConnector(): Promise<Connector>;
}
export {};
//# sourceMappingURL=phantom.d.ts.map