Skip to content

Conversation

@stanlou
Copy link
Collaborator

@stanlou stanlou commented Jan 28, 2026

Description

This PR extends the Proto-Kit CLI with new commands for environment setup, bridge , settlement deployment, and explorer management.

New Commands

Environment Management

env:create

  • Creates a new environment configuration with an interactive guided wizard
  • Example: proto-kit env:create

Bridge Operations

bridge:deposit <tokenId> <fromKey> <toKey> <amount>

  • Deposits tokens to the bridge
  • Parameters:
    • tokenId - Token identifier
    • fromKey - Sender's private key (or environment variable name)
    • toKey - Recipient's public key (or environment variable name)
    • amount - Amount to deposit (in whole units)
  • Example: proto-kit bridge:deposit 1 SENDER_KEY RECIPIENT_KEY 100

bridge:redeem <tokenId> <toKey> <amount>

  • Redeems tokens from the bridge
  • Parameters:
    • tokenId - Token identifier
    • toKey - Recipient's public key (or environment variable name)
    • amount - Amount to redeem
  • Example: proto-kit bridge:redeem 1 RECIPIENT_KEY 100

bridge:withdraw <tokenId> <senderKey> <amount>

  • Withdraws tokens
  • Parameters:
    • tokenId - Token identifier
    • senderKey - Sender's private key (or environment variable name)
    • amount - Amount to withdraw
  • Example: proto-kit bridge:withdraw 1 SENDER_KEY 100

Settlement Deployment

settlement:deploy

  • Deploys settlement contracts
  • Example: proto-kit settlement:deploy

settlement:token:deploy <tokenSymbol> <feepayerKey> <receiverPublicKey> [mintAmount]

  • Deploys custom fungible tokens for settlement
  • Parameters:
    • tokenSymbol - Symbol for the token (e.g., "USDC")
    • feepayerKey - Private key for paying deployment fees
    • receiverPublicKey - Public key to receive minted tokens
    • [mintAmount] - Amount to mint initially (default: 0)
  • Example: proto-kit settlement:token:deploy USDC FEEPAYER_KEY RECEIVER_KEY 1000

Lightnet Utilities

lightnet:wait-for-network

  • Waits for the lightnet network to be ready before proceeding
  • No positional parameters
  • Example: proto-kit lightnet:wait-for-network

lightnet:faucet <publicKey>

  • Sends MINA from the lightnet faucet to an account
  • Parameters:
    • publicKey - Destination public key (or environment variable name)
  • Example: proto-kit lightnet:faucet B62qnzbXQcUoQFnjvF4Kog6KfNsuuSoo7LSLvomPeak2CLvEYiUqT

lightnet:initialize

  • Complete lightnet setup: waits for network, funds test accounts, deploys settlement
  • No positional parameters
  • Example: proto-kit lightnet:initialize

Developer Tools

generate-keys [count]

  • Generates private/public key pairs for development
  • Parameters:
    • [count] - Number of key pairs to generate (default: 1)
  • Example: proto-kit generate-keys 5

explorer:start

  • Starts the explorer UI
  • No positional parameters
  • Options:
    • -p, --port - Port to run on (default: 5003)
    • --indexer-url - GraphQL endpoint URL for the indexer
  • Example: proto-kit explorer:start -p 3000 --indexer-url http://localhost:8081/graphql

All commands that interact with environment variable can be handled through two options:

Option 1: --env-path (File-based)

Loads environment variables from a .env file

proto-kit settlement:deploy --env-path ./my-config/.env

Option 2: --env KEY=value

Passes environment variables directly as command-line arguments. Can be used multiple times.

proto-kit settlement:deploy --env PROTOKIT_SETTLEMENT_CONTRACT_PRIVATE_KEY=EK... 

closes #353

@stanlou stanlou requested a review from rpanic January 28, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New starter kit structure (v3)

2 participants