Skip to content

glyphWalletConnector function ​

The glyphWalletConnector is a wagmi connector implementation that enables integration with the Glyph Global Wallet. It's designed to work seamlessly with wagmi and provides a standardized way to connect to the Glyph wallet.

Overview ​

The glyphWalletConnector is built on top of the Privy wallet connector and provides additional functionality specific to Glyph. It implements the EIP-1193 standard and supports all standard Ethereum JSON-RPC methods.

Usage ​

typescript
import { createConfig, http } from "wagmi";
import { apeChain } from "wagmi/chains";
import { glyphWalletConnector } from "@use-glyph/sdk-react";

export const wagmiConfig = createConfig({
	chains: [apeChain],
	transports: {
		[apeChain.id]: http(),
	},
	connectors: [glyphWalletConnector()],
	ssr: true,
});

Configuration Options ​

The connector accepts an optional configuration object with the following properties:

typescript
interface GlyphWalletConnectorOptions {
	/** RainbowKit connector details */
	rkDetails: WalletDetailsParams;
}

Features ​

  • Implements EIP-1193 standard
  • Supports all standard Ethereum JSON-RPC methods
  • Integrates with wagmi for seamless wallet connection
  • Supports SSR (Server-Side Rendering)
  • Built on top of Privy's wallet connector for enhanced security

Integration with GlyphWalletProvider ​

The glyphWalletConnector is automatically configured when using the GlyphWalletProvider:

typescript
import { GlyphWalletProvider } from "@use-glyph/sdk-react";

function App() {
	return (
		<GlyphWalletProvider chains={[apeChain]}>
			{/* Your application components */}
		</GlyphWalletProvider>
	);
}