๐Ÿงช

LazorKit

Devnet
โ† Back to Home
๐ŸŽจ

Regular Metaplex NFT Minting

Mint standard Metaplex NFTs with Token Metadata and Master Edition

๐Ÿค LazorKit x Metaplex

Standard Metaplex NFT with full on-chain metadata and Master Edition.

โœ“Full on-chain metadata account
โœ“Master Edition (1/1 NFT)
โœ“Compatible with all marketplaces
!Requires ~0.02 SOL for rent (from wallet)

Making Metaplex Work with LazorKit

1.Create Dummy Signer for Umi

Umi requires a signer, but LazorKit handles signing via passkey:

// From lib/nft-utils.ts
function createDummySigner(walletAddress: string): Signer {
  return {
    publicKey: umiPublicKey(walletAddress),
    signMessage: async () => new Uint8Array(64),
    signTransaction: async (tx) => tx,
    signAllTransactions: async (txs) => txs,
  };
}
2.Convert Umi to Web3.js Instructions

Use the adapter to get instructions LazorKit can execute:

// From lib/nft-utils.ts
import { toWeb3JsInstruction } from
  '@metaplex-foundation/umi-web3js-adapters';

const metadataIxs = createMetadataAccountV3(umi, {...})
  .getInstructions();

for (const ix of metadataIxs) {
  instructions.push(toWeb3JsInstruction(ix));
}
3.Add Smart Wallet to Instructions

LazorKit validation requires wallet in all instructions:

// From lib/nft-utils.ts
function addSmartWalletToInstructions(
  instructions: TransactionInstruction[],
  smartWalletAddress: string
): void {
  instructions.forEach((ix) => {
    const hasSmartWallet = ix.keys.some(
      k => k.pubkey.toBase58() === smartWalletAddress
    );
    if (!hasSmartWallet) {
      ix.keys.push({
        pubkey: walletPubkey,
        isSigner: false,
        isWritable: false
      });
    }
  });
}
4.Sign & Send via LazorKit

LazorKit handles signing with passkey and gas sponsorship:

// From page.tsx
const { signAndSendTransaction } = useWallet();

const signature = await signAndSendTransaction({
  instructions,
  transactionOptions: {
    computeUnitLimit: 400_000,
  },
});

What You'll Learn

  • โœ“Use Metaplex Umi with LazorKit smart wallets
  • โœ“Create Token Metadata & Master Edition accounts
  • โœ“Handle PDA wallets with createAccountWithSeed
  • โœ“Convert Umi instructions to Web3.js format

Connect Your Wallet

Use LazorKit smart wallet to mint NFTs