Tony on Nostr: If there's one person in the world that understands CLN's APIs, it is ChatGPT. Just ...
If there's one person in the world that understands CLN's APIs, it is ChatGPT. Just created this one liner for me to send a bunch of funds to itself at different fee rates to simulate real activity. Only took a couple tries.
```
while true; do NEW_ADDRESS=$(./lightning-cli --network signet newaddr | jq -r '.bech32'); FEE_RATE="$(( ( RANDOM % 91 ) + 10 ))perkw"; echo "Sending to: $NEW_ADDRESS with fee rate: $FEE_RATE"; TXID=$(./lightning-cli --network signet txprepare "[{\"$NEW_ADDRESS\": 1000sat}]" "$FEE_RATE" | jq -r '.txid'); ./lightning-cli --network signet txsend "$TXID"; sleep 1; done
```
```
while true; do NEW_ADDRESS=$(./lightning-cli --network signet newaddr | jq -r '.bech32'); FEE_RATE="$(( ( RANDOM % 91 ) + 10 ))perkw"; echo "Sending to: $NEW_ADDRESS with fee rate: $FEE_RATE"; TXID=$(./lightning-cli --network signet txprepare "[{\"$NEW_ADDRESS\": 1000sat}]" "$FEE_RATE" | jq -r '.txid'); ./lightning-cli --network signet txsend "$TXID"; sleep 1; done
```