Security Measure | Description | |
---|---|---|
☐ | Use HTTPS everywhere | Prevents basic eavesdropping and man-in-the-middle attacks |
☐ | Input validation and sanitization | Prevents XSS attacks by validating all user inputs |
☐ | Don't store sensitive data in the browser | No secrets in localStorage or client-side code |
☐ | CSRF protection | Implement anti-CSRF tokens for forms and state-changing requests |
☐ | Never expose API keys in frontend | API credentials should always remain server-side |
Today, LND supports using several database backends with the default being bbolt.
Postgres represents a more battle-tested deployment of a DB and comes with some features of interest that benefit performance and data durability:
- Async / sync replication
- Vacuum for dead tuples cleanup
- (with SQL schema) optimizations around index use
/** By LnRouter.app */ | |
function bitShift(n: number, shiftBy: number): number { | |
let base = n; | |
for (let i = 0; i < shiftBy; i++) { | |
base = base * 2; | |
} | |
return base; | |
} | |
export function shortChannelIdToDecimalId(shortChannelId: string): string { |
There are a bunch of possible reasons for a force close - I will elaborate on the most common ones.
⚠ This is a work in progress and will get expanded.
WHAT HAPPENED?
An HTLC (a lightning transaction) timed out, which means it did neither succeed in arriving at it's
Receive private payments from anyone on a single static address without requiring any interaction or extra on-chain overhead.
Update: This now has a BIP and WIP implementation
The recipient generates a so-called silent payment address and makes it publicly known. The sender then takes a public key from one of their chosen inputs for the payment, and uses it to derive a shared secret that is then used to tweak the silent payment address. The recipient detects the payment by scanning every transaction in the blockchain.
#!/bin/bash | |
#alias lightning-cli="docker exec -it cln lightning-cli" | |
#docker exec -it cln lightning-cli getinfo | |
#working_path=/home/bitcoin/script-earning | |
BASEDIR=$(dirname $0) | |
working_path=${BASEDIR} | |
_now=$(date +"%d:%m:%Y") | |
JSON=`docker exec cln lightning-cli clboss-status | jq .offchain_earnings_tracker` | |
echo $JSON | jq -r 'map({in_earnings, in_expenditures}) | (first | keys_unsorted) as $keys | map([to_entries[] | .value]) as $rows | $keys,$rows[] | @csv' > $working_path/status.csv | |
awk -F"," '{x+=$1}END{print "Total earning: " x/1000}' $working_path/status.csv |
This gist contains 3 files that can be imported into postman to play with our api:
grapqhql_api
collection which has our queries and mutationsdevnet
environment variables for local testing (uses regtest network)staging
environment variables for testing against our staging endpoint (uses testnet network)
Inspired by openoms tips box : http://tips.diynodes.com
If you already have a domain name setup with Cloudflare.com, you can easily do that, for free, without paying a VPN.
(for the example my domain is spiritualcomputing.com, be sure to replace it with yours) :
Go to cloudflare, dns, add 2 A records to your domain
NAME tips your_isp_public_ip
NAME pay your_isp_public_ip
import base58 | |
x = 'xprv9s21ZrQH143K2f55zo5GiXiX16MiPzBgc2bEXNd77e1ooGsjxAyXjozyuniqiSB76VESjTW8s7vdsK3NFboha6tZgF9BzcDdNtUT6Aw99P2' | |
zp = b'\x04\xb2\x43\x0c' | |
base58.b58encode_check(zp + base58.b58decode_check(x)[4:]).decode('ascii') | |
# output: 'zprvAWgYBBk7JR8GjFTKfWeX8huXM2ecHEAgSFdg6AQssemZuUWCTVJeywKFxCe1iFUwumU4EQhFnSdjdtGVgzdjAaFmQvY3ARrbvLbjsLf6oNE' | |
# xprv = b'\x04\x88\xad\xe4' | |
# yprv = b'\x04\x9d\x78\x78' | |
# zprv = b'\x04\xb2\x43\x0c' |