Prerequisites

💰 Need Test Tokens? Visit the Chronicle Yellowstone Faucet to get test tokens for your EOA account.

PKPs minted with mintWithEoa require manual permission setup before they can be used for signing operations.
1

Create Account

Use your connected wallet account to own and manage PKPs.
import { useWalletClient } from "wagmi";

const { data: myAccount } = useWalletClient();
2

Mint PKP with EOA

Mint a new Programmable Key Pair (PKP) using your EOA. The PKP will be owned by your EOA account.
You will need to manually add permissions to the PKP before it can be used for signing.
const mintedPkpWithEoa = await litClient.mintWithEoa({
  account: myAccount,
});
3

Get PKP Permissions Manager

Instantiate a PKP permissions manager to control your PKP permissions. This manager allows you to add, remove, and modify permissions for your PKP.
const pkpPermissionsManager = await litClient.getPKPPermissionsManager({
  pkpIdentifier: {
    tokenId: mintedPkpWithEoa.data.tokenId,
  },
  account: myAccount,
});
4

View PKP Permissions

View all current permissions associated with your PKP. This shows what actions and scopes are currently allowed.
const res = await litClient.viewPKPPermissions({
  tokenId: mintedPkpWithEoa.data.tokenId,
});

console.log("✅ viewPKPPermissions:", res);
5

Add Signing Permissions

Add permissions to allow your PKP to be used for signing operations. This adds the “sign anything” scope which enables general signing functionality.
// Add permissions to allow the PKP to be used for signing
const addPermissionsTx = await pkpPermissionsManager.addPermittedAction({
  ipfsId: "QmWGkjZKcfsE9nabey7cXf8ViZ5Mf5CvLFTHbsYa79s3ER",
  scopes: ["sign-anything"],
});

EOA-Based Authentications

Key Differences:
  • EOA Native: Direct EOA ownership and management of PKPs with manual permission setup
  • EOA Auth Method: EOA used as authentication mechanism, similar to Google/Discord auth patterns