Skip to content

glencjones/lnd-submarine-swaps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

-------- references --------

https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md

https://medium.com/andreas-tries-blockchain/bitcoin-lightning-network-1-can-i-compile-and-run-a-node-cd3138c68c15

https://medium.com/andreas-tries-blockchain/bitcoin-lightning-network-3-paying-for-goods-and-services-5d9c492b0eb2

-------- setup --------

btcd --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME

lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --btcd.rpcuser=REPLACEME --btcd.rpcpass=REPLACEME --externalip=127.0.0.1:18334

lncli -n testnet create

lncli -n testnet unlock

-------- ln-service --------

node app.js

client has bitcoin and wants ethereum. sends request

response

{
    "paymentRequest": "lntb1230n1pdu64typp5s2tn0vafar60tqt8lucst5s3mm07cexdmlqfz3zzsdvjh80a4sfqdqqcqzysuuxuj0tnwa4xx7uvpd8fpcdj5mlxufd3y9kmsk8nvmny9fluhmcqdgedealayl7su729kry29ex7ffwxm3ystxxngekgwzm8yy6a5nsqgqg6fe",
    "decodedPaymentRequest": {
        "routes": [],
        "created_at": "2018-10-22T04:43:16.000Z",
        "description": "",
        "description_hash": "",
        "destination": "024527cb12f8bb225a4924ef53cfb5eb6dda9830f739bca341728bf41b1e5ded7c",
        "expires_at": "2018-10-22T05:43:16.000Z",
        "id": "829737b3a9e8f4f58167ff3105d211dedfec64cddfc091444283592b9dfdac12",
        "minimum_final_htlc_cltv_delta": "144",
        "tokens": 123,
        "type": "payment_request"
    },
    "ethContractAddress": "0x118f47B7Bd5D4EB6EDF8cF0FD85f6775b44fFd3d"
}

client verifies eth contract address: 0x118f47B7Bd5D4EB6EDF8cF0FD85f6775b44fFd3d

once verified, client pays btc paymentRequest

client checks eth balance

fin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%