@paperxyz/embedded-wallet-service-wagmi
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published



Paper Embedded Wallet Service - Wagmi Connector

npm version Join our Discord!

Paper is a developer platform for NFT commerce that easily onboards users without a wallet or cryptocurrency.

Documentation

Installation

Install embedded-wallet-service-wagmi and peer dependencies (wagmi and ethers):

npm install @paperxyz/embedded-wallet-service-wagmi wagmi ethers@^5
yarn add @paperxyz/embedded-wallet-service-wagmi wagmi ethers@^5

Add the Embedded Wallet connector to wagmi:

import { createClient, configureChains } from "wagmi";
import { polygon } from "wagmi/chains";
import { publicProvider } from "wagmi/providers/public";

const { chains, provider } = configureChains([polygon], [publicProvider()]);

// Create a Wagmi-compatible connector for Paper Embedded Wallet.
const paperEmbeddedWallet = new PaperEmbeddedWalletWagmiConnector({
  chains,
  options: {
    chain: "Polygon",
    clientId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  },
});

const client = createClient({
  connectors: [paperEmbeddedWallet],
  provider,
});

// Wrap your application with WagmiConfig.
function App() {
  return <WagmiConfig client={client}>/** ...your app */</WagmiConfig>;
}

Arguments

chains

The list of chains your application may use.

options

The argument passed into the PaperEmbeddedWalletSdk constructor. See PaperEmbeddedWalletSdk.

Package Sidebar

Install

npm i @paperxyz/embedded-wallet-service-wagmi

Weekly Downloads

23

Version

4.0.0

License

Apache-2.0

Unpacked Size

26 kB

Total Files

5

Last publish

Collaborators

  • joaquim-verges
  • jakeloo
  • elasticbottle
  • arcoraven
  • edwardsun