Skip to main content

Getting Started

The @up-provider library lets dApps run as mini-apps on Grid and allows parent applications to one-click-connect to your mini-app.

Installation

npm install @lukso/up-provider

Usage in mini-apps

Below are the examples of how to use the up-provider with different libraries:

import { createClientUPProvider } from '@lukso/up-provider';
import { createWalletClient, createPublicClient, custom } from 'viem';
import { lukso } from 'viem/chains';

// Construct the up-provider
const provider = createClientUPProvider();

// Create public client if you need direct connection to RPC
const publicClient = createPublicClient({
chain: lukso,
transport: http(),
});

// Create wallet client to connect to provider
const walletClient = createWalletClient({
chain: lukso,
transport: custom(provider),
});

Resources