sudo docker exec elements_node_1 elements-cli
sudo ./scripts/app compose elements exec node elements-cli

trans_id bb6d0903305bfd35ad81b606f384c56ed0ef83bfca6bcedbdfb69b264ec6e821
pegin addr bc1q78uuqcjq8x4492nh3efxra00ytyxm4vgnctf59v37tfax2d5nfnq47fss8
claim scr 001489b0f52a488c0a09bb85828ce85aa8f666844a5b

b_rawtrans 020000000173f50a542a8c45b79c6583a1aec9cd57ee815f05168c451e3a09f060dedd97c1000000006a4730440220359afcb0b57fdafb04241b02cb173d9a5aa1cf3957dd2c94223246ef85de1a610220195755498a5ff5cca9de5cb33002935bfe76bc39e9c14e0411957595f4c23c1b0121027b6d1f6a0d99d813af6798fe8008f4746eade9ed4cff97b62294825944df1ba8fdffffff0278c70100000000001976a914d0e086b606b49cdce5a9708db6e1b2083c8f92b688acf049020000000000220020f1f9c0624039ab52aa778e5261f5ef22c86dd5889e169a1591f2d3d329b49a66509d0c00

b_txtproof
 

output from elements claim script
224b038a6c0a332f7c6eff0dc280a8908542972fc82e507150571e55e94fe838

asset issued 10 0 (10 tokens / 0 re-issuance / confidential)

{
  "txid": "6ef6b04b34e27d79c0b66d817bc23a81bc6a56b289b6a45a28b71489adca0825",
  "vin": 0,
  "entropy": "570671c45afd4b9bfd085e5e965333e32f3988d3b68d4baf276ff3f833f8f531",
  "asset": "b142fb9ec2c7821f025f3ae806cfbec6e9faccbf876a531e8a207b45bc6a285a",
  "token": "f13a9858f5acec84f8195d95c764c839812deeee297ca654ba1f25d650e1b8ea"
}


asset issued 10 0 false (10 tokens / 0 re-issuance / not confidential)

{
  "txid": "f27c99793f685fa4109ecec68d79819b077946427a489c5301ccbde136d4e070",
  "vin": 0,
  "entropy": "7df9c90b4fea440c43f5a92f24089999d50ee7af828afb7a3dd577015689ee2b",
  "asset": "409b1d0cb614822ea703576b71958ab051d66ff6708b368f378f2ffea458d15a",
  "token": "81ab87384b9317c21085b580b129a6cd13a42ced5e7f5ae6ce2638c62c6986ca"
}


Green wallet address
VJLJZQ2Du4natCvJuhNQTH7tHnphsofPoW8aZtgsnmPaihuqt4MpsujPxYTiy5WHVuJdpRQAcF9oTMAd

Swap Pre-Proposal Node1
"balance": {
    "bitcoin": 0.00010623,
    "3e62af3c80c56ab6fec3d1e5646637152afebaf2a86ace075bbb7a88702e1fe5": 1.00000000
  },

Swap Pre-Proposal Node2
"balance": {
     "bitcoin": 0.00131755,
    "3e62af3c80c56ab6fec3d1e5646637152afebaf2a86ace075bbb7a88702e1fe5": 8.00000000
  }


SWAP Propsal info

$ liquidswap-cli -u http://$E_RPCUSER:$E_RPCPASS@localhost:7041 info proposal.txt 
{
    "status": "proposed",
    "legs": [
        {
            "incoming": true,
            "funded": true,
            "asset": "3e62af3c80c56ab6fec3d1e5646637152afebaf2a86ace075bbb7a88702e1fe5",
            "amount": 1.0,
            "fee": 2.67e-06
        },
        {
            "incoming": false,
            "funded": false,
            "asset": "6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d",
            "amount": 2.3e-05,
            "fee": 0.0
        }
    ]
}
Swap - Accept
liquidswap-cli -u http://$E_RPCUSER:$E_RPCPASS@localhost:7041 accept -o accept.txt proposal.txt


Swap - After finalize Node1
"balance": {
    "bitcoin": 0.00012656
  }, 
 
Swap - After finalize Node2
"balance": {
    "bitcoin": 0.00129180,
    "3e62af3c80c56ab6fec3d1e5646637152afebaf2a86ace075bbb7a88702e1fe5": 9.00000000
  }
  

##### PYTHON AMP

API_URL = 'https://amp.blockstream.com/api'
def get_auth_token_header(username, password):
    # api/user/obtain_token

    url = f'{API_URL}/user/obtain_token'
    headers = {'content-type': 'application/json'}
    payload = {'username': username, 'password': password}
    response = requests.post(url, data=json.dumps(payload), headers=headers)
    assert response.status_code == 200
    json_data = json.loads(response.text)
    token = json_data['token']
    return {'content-type': 'application/json', 'Authorization': f'token {token}'}

header = get_auth_token_header('your_amp_username', 'your_amp_password')
print(header)


### Peg Out
sudo ~/scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS -named sendtoaddress address="VJLGBLEDZPrVPeBzmzuFUtP8d8MFHoj8UWzPdvAY8n6niRkYk3vHeKiT3KzsBnorCFd9VivnWAaQpFrJ" amount=0.0011 fee_rate=0.1 assetlabel="bitcoin" 
1bf3623924328b22e7b2ae1d7a9fd8bc2879d4cacabd9ba7e2fe0299fe26301e




