Skip to content

yhl125/iampocket-tma

Repository files navigation

Next.js Telegram Mini App with PKP-XRPL Integration

This project is a Next.js-based Telegram Mini App that integrates with iampocket-relay-server for Telegram authentication and payments on the Lit Protocol. It uses pkp-xrpl to create seedless wallets, providing a seamless crypto experience within Telegram.

Table of Contents

Features

  • Telegram authentication
  • Seedless wallet creation using pkp-xrpl
  • Wallet functionality:
    • Faucet
    • Mint NFT
    • Send tokens
    • View tokens
    • View NFTs
    • Swap tokens
    • Transaction history
  • Login and signup pages
  • Integration with iampocket-relay-server for backend operations

Demo

Check out our demo video: YouTube Short

Live Demo: https://t.me/iampocket_bot/app

Prerequisites

  • Node.js (v14 or later recommended)
  • pnpm package manager
  • Telegram Bot Token
  • Access to iampocket-relay-server

Installation

Install dependencies:

pnpm install

Running the App

  1. Start the iampocket-relay-server

  2. Run the Next.js app:

    pnpm run dev

    For HTTPS development (required for Telegram integration):

    pnpm run dev:https

Development

Local Development

You can develop and test the app outside of Telegram:

  1. Run the app:

    pnpm run dev
  2. Open http://localhost:3000 in your browser.

Note: Some Telegram-specific features may not work properly in this mode. Important: Telegram authentication does not work in the development environment because the useInitData doesn't have bot data for authentication.

Telegram Integration

For the full Telegram experience:

  1. Deploy your app to a public URL

  2. Submit the link you deployed to @BotFather as your Mini App link.

  3. Test your app in the Telegram mini app

Creating a Telegram Bot and Mini App

Follow this comprehensive guide to create your Telegram Bot and set up the Mini App.

Architecture

This app uses:

  • Next.js for the frontend
  • iampocket-relay-server for backend operations and Telegram authentication and payments for the Lit Protocol
  • pkp-xrpl for creating seedless wallets
  • Lit Protocol for decentralized key management

Useful Links

About

iampocket telegram mini app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages