Lightning Nodes

Testnet Guide

Testnet Guide

Test Lightning applications safely with testnet bitcoin.


Folder highlights Documentation outlines Comet Platform operations covering node creation, liquidity management, API/security, and best practices with references available up to Jan 19, 2026.

Testnet Guide

Test Lightning applications safely with testnet bitcoin.

Overview

Testnet = Bitcoin test network with worthless coins.

Benefits:

- Free testing

- No financial risk

- Faster blocks (~10 min)

- Reset periodically


Get Started

Create Testnet Node

Create a testnet node via the Comet Platform API:

curl -X POST "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Testnet Node",
    "network": "testnet",
    "node_type": "LND",
    "region": "us-east-1",
    "node_tier": "standard"
  }'

Free Features:

- No credit charges

- Full LND functionality

- Bitcoin Core access

- Same as mainnet (except network)


Get Testnet Coins

Faucets:

- https://testnet-faucet.com

- https://coinfaucet.eu/en/btc-testnet

- https://bitcoinfaucet.uo1.net


<strong>Request:</strong>
1. Generate address via LND REST API:
bash    curl -X GET "https://{API_ENDPOINT}/v1/newaddress?type=WITNESS_PUBKEY_HASH" \      -H "Grpc-Metadata-macaroon: {MACAROON_HEX}"
2. Visit faucet
3. Enter address
4. Receive coins (~0.01 tBTC)

Open Channels

Find Testnet Peers:

You can find testnet peers on Lightning Network explorers or connect to well-known testnet nodes. To list your current peers:

curl -X GET "https://{API_ENDPOINT}/v1/peers" \
  -H "Grpc-Metadata-macaroon: {MACAROON_HEX}"

Open Channel:

curl -X POST "https://{API_ENDPOINT}/v1/channels" \
  -H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
  -H "Content-Type: application/json" \
  -d '{
    "node_pubkey": "{peer_pubkey}",
    "local_funding_amount": "100000",
    "push_sat": "0"
  }'

Testing Workflows

Payment Testing

Create Invoice:

curl -X POST "https://{API_ENDPOINT}/v1/invoices" \
  -H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "10000",
    "memo": "Test payment"
  }'

Pay Invoice:

curl -X POST "https://{API_ENDPOINT}/v1/channels/transactions" \
  -H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
  -H "Content-Type: application/json" \
  -d '{
    "payment_request": "{lnbc...}"
  }'

Channel Testing

Test Scenarios:

1. Open channel

2. Send payments

3. Receive payments

4. Rebalance

5. Close channel (cooperative)

6. Force close (test recovery)


API Testing

Test Integration:

Create an invoice directly via your node’s LND REST API:

curl -X POST "https://{API_ENDPOINT}/v1/invoices" \
  -H "Grpc-Metadata-macaroon: {MACAROON_HEX}" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "10000",
    "memo": "Test invoice"
  }'

# Response includes payment_request

Testnet vs Mainnet

Feature

Testnet

Mainnet

Cost

Free

Paid

Coins

Worthless

Real value

Risk

None

Financial

Block time

~10 min

~10 min

Resets

Periodic

Never

Use case

Testing

Production

Best Practices

  1. Always test first: Validate on testnet before mainnet

  2. Test edge cases: Force closes, failures, timeouts

  3. Load testing: Simulate production volumes

  4. Integration testing: Test full workflows

  5. Document results: Track test outcomes

Limitations

Testnet Constraints:

- Coins have no value

- Network less stable

- Fewer nodes/channels

- May reset (rare)

- Lower liquidity


Migration to Mainnet

Checklist

Deploy

# Create mainnet node via Comet Platform API
curl -X POST "https://provisioning.cometplatform.com/api/company/{COMPANY_ID}/nodes" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Mainnet Node",
    "network": "mainnet",
    "node_type": "LND",
    "region": "us-east-1",
    "node_tier": "standard"
  }'

# Update configuration
export NODE_ID="mainnet_node_id"

# Deploy application
# Monitor closely

Resources

Table of Contents

Copyright © 2025 Comet Cash

Czech Republic VASP License Registration Nº 22053751

info@cometcash.com

All rights reserved.

Copyright © 2025 Comet Cash

Czech Republic VASP License Registration Nº 22053751

info@cometcash.com

All rights reserved.