Feat/cli extended functionality #409
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:createproto-kit env:createBridge Operations
bridge:deposit <tokenId> <fromKey> <toKey> <amount>tokenId- Token identifierfromKey- Sender's private key (or environment variable name)toKey- Recipient's public key (or environment variable name)amount- Amount to deposit (in whole units)proto-kit bridge:deposit 1 SENDER_KEY RECIPIENT_KEY 100bridge:redeem <tokenId> <toKey> <amount>tokenId- Token identifiertoKey- Recipient's public key (or environment variable name)amount- Amount to redeemproto-kit bridge:redeem 1 RECIPIENT_KEY 100bridge:withdraw <tokenId> <senderKey> <amount>tokenId- Token identifiersenderKey- Sender's private key (or environment variable name)amount- Amount to withdrawproto-kit bridge:withdraw 1 SENDER_KEY 100Settlement Deployment
settlement:deployproto-kit settlement:deploysettlement:token:deploy <tokenSymbol> <feepayerKey> <receiverPublicKey> [mintAmount]tokenSymbol- Symbol for the token (e.g., "USDC")feepayerKey- Private key for paying deployment feesreceiverPublicKey- Public key to receive minted tokens[mintAmount]- Amount to mint initially (default: 0)proto-kit settlement:token:deploy USDC FEEPAYER_KEY RECEIVER_KEY 1000Lightnet Utilities
lightnet:wait-for-networkproto-kit lightnet:wait-for-networklightnet:faucet <publicKey>publicKey- Destination public key (or environment variable name)proto-kit lightnet:faucet B62qnzbXQcUoQFnjvF4Kog6KfNsuuSoo7LSLvomPeak2CLvEYiUqTlightnet:initializeproto-kit lightnet:initializeDeveloper Tools
generate-keys [count][count]- Number of key pairs to generate (default: 1)proto-kit generate-keys 5explorer:start-p, --port- Port to run on (default: 5003)--indexer-url- GraphQL endpoint URL for the indexerproto-kit explorer:start -p 3000 --indexer-url http://localhost:8081/graphqlAll commands that interact with environment variable can be handled through two options:
Option 1:
--env-path(File-based)Loads environment variables from a
.envfileOption 2:
--env KEY=valuePasses environment variables directly as command-line arguments. Can be used multiple times.
closes #353