Logo di Starknet Mini Pay

Starknet Mini Pay

Organizzazione
keep-starknet-strange
starknet-mini-pay

Pagamenti P2P semplici su Starknet. Genera codici QR, link di pagamento e fatture e trasferisci ETH/STRK/USDC. Come Lightning, ma nativo.

Add to TypingMind

Panoramica

Pubblicato dakeep-starknet-strange
Repositorystarknet-agentic
Nome della skillstarknet-mini-pay
Stelle
81
Fork
26
File inclusi
9
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 9

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da keep-starknet-strange su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Starknet Mini Pay in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/keep-starknet-strange/starknet-agentic/tree/main/skills/starknet-mini-pay
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/keep-starknet-strange/starknet-agentic.git /tmp/starknet-agentic
mkdir -p .claude/skills
cp -r /tmp/starknet-agentic/skills/starknet-mini-pay .claude/skills/starknet-mini-pay
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Starknet Mini Pay in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Starknet Mini Pay non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Starknet Mini Pay non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Starknet Mini-Pay Skill

Simple P2P payments on Starknet. Like Lightning, but native.

Related modules: skills catalog.

When to Use

  • Generating payment links, QR codes, invoices, or Telegram payment flows on Starknet.
  • Sending simple user-to-user ETH, STRK, or USDC transfers with payment UX around them.

When NOT to Use

  • DeFi-specific swaps, staking, or lending flows.
  • Cairo contract authoring, deployment-only tasks, or security auditing.

Overview

┌─────────────────────────────────────────────────────────┐
│                    STARKNET MINI-PAY                    │
├─────────────────────────────────────────────────────────┤
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────┐ │
│  │  QR Codes   │  │  Payment    │  │   Telegram Bot  │ │
│  │  Generator  │  │   Links     │  │   Interface     │ │
│  └─────────────┘  └─────────────┘  └─────────────────┘ │
│           │                │                   │          │
│           └────────────────┴───────────────────┘          │
│                         │                                │
│              ┌─────────▼─────────┐                       │
│              │   starknet-py    │                       │
│              │   SDK + RPC      │                       │
│              └──────────────────┘                       │
│                         │                                │
│         ┌───────────────┼───────────────┐               │
│         ▼               ▼               ▼               │
│    ┌─────────┐    ┌──────────┐    ┌──────────┐         │
│    │ ArgentX │    │  Braavos │    │  Generic  │         │
│    │ Account │    │ Account  │    │  Account  │         │
│    └─────────┘    └──────────┘    └──────────┘         │
└─────────────────────────────────────────────────────────┘

Features

FeatureDescription
P2P TransfersSend ETH/STRK/USDC to any Starknet address
QR CodesGenerate QR codes for addresses (scan to pay)
Payment Linksstarknet:<addr>?amount=1&memo=coffee
Invoice SystemGenerate payment requests with expiry
Telegram BotPayment links, QR codes and invoices via Telegram (non-custodial)
Transaction HistoryTrack all transfers with status

Quick Start

CLI Usage

bash
# Send payment
python3.12 scripts/cli.py send 0x123... 0.5 --memo "coffee"

# Generate QR code for your address
python3.12 scripts/cli.py qr 0x123... --output qr.png

# Create payment link
python3.12 scripts/cli.py link 0x123... --amount 0.1 --memo "lunch"

# Create invoice
python3.12 scripts/cli.py invoice 0x123... 25.00 --expires 3600

# Check transaction status
python3.12 scripts/cli.py status 0xabcdef...

# Balance check
python3.12 scripts/cli.py balance 0x123...

Payment Link Format

starknet:<address>?amount=<value>&memo=<text>&token=<ETH|STRK|USDC>

Example:

starknet:0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef?amount=0.01&memo=coffee&token=ETH

Telegram Bot Commands

The bot is non-custodial: it never holds keys or sends transactions. It builds links, QR codes and invoices that the payer opens and signs in their own wallet. Use the CLI send and balance commands to transfer or check balances.

/start                    - Welcome message and quick actions
/help                     - Show help
/myaddress <address>      - Set your receiving address (needed by /link, /qr, /invoice)
/link [amount] [memo]     - Payment link and QR with wallet buttons
/qr                       - QR code for your address
/invoice <amount> [memo]  - USDC invoice with expiry
/status <tx_hash>         - Check transaction status
/webhook <url>            - Set a notification webhook (not persisted yet)

Architecture

starknet-mini-pay/
├── SKILL.md
├── README.md
├── scripts/
│   ├── cli.py              # Main CLI interface
│   ├── mini_pay.py         # Core payment logic
│   ├── qr_generator.py     # QR code generation
│   ├── link_builder.py     # Payment link builder
│   ├── invoice.py          # Invoice system
│   ├── telegram_bot.py     # Telegram bot
│   └── starknet_client.py  # Starknet RPC client
└── requirements.txt

Dependencies

bash
pip install -r requirements.txt

requirements.txt pins starknet-py to the tested 0.30.x range. starknet-py 0.30 speaks Starknet JSON-RPC spec 0.10, so any custom RPC URL must serve a v0_10 endpoint.

Configuration

bash
# Environment variables
# Keyless public RPC (spec 0.10). Sepolia: https://api.cartridge.gg/x/starknet/sepolia/rpc/v0_10
export STARKNET_RPC="https://api.cartridge.gg/x/starknet/mainnet/rpc/v0_10"
export MINI_PAY_PRIVATE_KEY="0x..."
export MINI_PAY_ADDRESS="0x..."
export TELEGRAM_BOT_TOKEN="..."
export TELEGRAM_CHAT_ID="..."

Core Functions

Send Payment

python
from mini_pay import MiniPay, MAINNET_RPC_URL

pay = MiniPay(rpc_url=MAINNET_RPC_URL)

# Send ETH (V3 transaction: the fee is paid in STRK)
tx_hash = await pay.transfer(
    from_address="0x...",
    private_key="0x...",
    to_address="0x123...",
    amount_wei=5 * 10**17,  # 0.5 ETH
    token="ETH"
)

# Check status
status = await pay.get_transaction_status(tx_hash)
print(f"Status: {status}")  # PENDING, CONFIRMED, REJECTED, NOT_FOUND

Generate QR Code

python
from qr_generator import QRGenerator

qr = QRGenerator()
qr.generate(
    address="0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
    amount=None,  # Optional amount
    memo=None,     # Optional memo
    output_file="address_qr.png"
)

Payment Links

python
from link_builder import PaymentLinkBuilder

link = PaymentLinkBuilder()

# Create link
url = link.create(
    address="0x123...",
    amount=0.01,
    memo="coffee",
    token="ETH"
)

# Parse incoming link
data = link.parse("starknet:0x123...?amount=0.01&memo=coffee")

Invoice System

python
import asyncio
from invoice import InvoiceManager

async def main():
    # Opens (or creates) invoices.db in the working directory
    async with InvoiceManager() as invoices:
        # Create invoice
        invoice = await invoices.create(
            payer_address="0x...",  # also the recipient unless recipient_address is set
            amount=25.00,
            token="USDC",
            expiry_seconds=3600,  # 1 hour
            description="Payment for services"
        )
        print(invoices.create_payment_url(invoice))

        # Check invoice status
        fetched = await invoices.get(invoice.id)
        print(fetched.status, invoices.format_expiry(fetched))  # pending 1h left

asyncio.run(main())

Telegram Bot

Run Bot

bash
python3.12 scripts/telegram_bot.py

Bot Flow

User:  /myaddress 0x0123...cdef
Bot:   ✅ Address Set
User:  /link 0.05 coffee
Bot:   📱 Payment Link (QR code) with "Open in ArgentX" / "Open in Braavos" buttons
Payer: opens the link and signs the transfer in their own wallet

Optional: Invoice Contract

This skill does not ship a contract. A trustless invoice contract could follow this sketch:

cairo
#[starknet::contract]
mod PaymentRequest {
    #[storage]
    struct Storage {
        request_id: u256,
        requests: Map<u256, Request>,
        owner: ContractAddress,
    }

    #[derive(Drop, Serde)]
    struct Request {
        amount: u256,
        token: ContractAddress,
        recipient: ContractAddress,
        expiry: u64,
        fulfilled: bool,
        memo: felt252,
    }

    #[external(v0)]
    impl IPaymentRequestImpl of IPaymentRequest<ContractState> {
        fn create_request(
            ref self: ContractState,
            amount: u256,
            token: ContractAddress,
            expiry: u64,
            memo: felt252
        ) -> u256 {
            // Create payment request
        }

        fn fulfill_request(
            ref self: ContractState,
            request_id: u256
        ) {
            // Execute payment
        }
    }
}

Error Handling

ErrorCauseSolution
INSUFFICIENT_BALANCENot enough of the token, or not enough STRK for feesTop up the token and keep STRK for V3 fees
ACCOUNT_NOT_FOUNDInvalid sender addressCheck address format
INVALID_AMOUNTAmount <= 0Use positive amount
TX_FAILEDTransaction revertedCheck recipient address
INVOICE_EXPIREDInvoice past expiryCreate new invoice

Payment Flow

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Sender    │     │  Mini-Pay   │     │  Recipient  │
└──────┬──────┘     └──────┬──────┘     └──────┬──────┘
       │                   │                   │
       │  1. Initiate      │                   │
       │──────────────────▶│                   │
       │                   │                   │
       │                   │  2. Execute      │
       │                   │  ETH Transfer    │
       │                   │─────────────────▶
       │                   │                   │
       │                   │  3. Confirm      │
       │                   │◀──────────────────
       │  4. Success       │                   │
       │◀──────────────────│                   │
       │                   │                   │

Security Notes

  • Private keys: Never expose in logs or error messages
  • Amount validation: Prevent negative/zero amounts
  • Expiry checks: Invoices expire automatically
  • Address format: Validate Starknet addresses (0x... format)

Comparison with Lightning

FeatureLightningStarknet Mini-Pay
Setup timeHours (channels)Instant
PrivacyOnion routingNative (per txn)
Speed~1 sec~2-3 min
FeesVariablePredictable
CustodyLightning nodeSelf-custody
NativeNo (needs BTC)Yes (Starknet native)

Roadmap

  • Multi-token support (STRK, USDC, DAI)
  • Batch payments
  • Payment requests via IPFS
  • Web interface
  • Mobile app (Flutter)
  • MPC wallet integration

Resources

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Starknet Mini Pay?

Pagamenti P2P semplici su Starknet. Genera codici QR, link di pagamento e fatture e trasferisci ETH/STRK/USDC. Come Lightning, ma nativo.

Perché usare Starknet Mini Pay su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Starknet Mini Pay è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Starknet Mini Pay in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/keep-starknet-strange/starknet-agentic/tree/main/skills/starknet-mini-pay. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Starknet Mini Pay?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Starknet Mini Pay?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Starknet Mini Pay: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Starknet Mini Pay è gratuita?

Sì. È pubblicata su GitHub da keep-starknet-strange con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇