forked from LNSwap/lnstxbridge-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.nogitpod.yml
105 lines (105 loc) · 5.38 KB
/
.nogitpod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/
tasks:
# runs during prebuild
- init: |
echo 'init script'
echo 'deb http://mirror.arizona.edu/ubuntu/ focal main' | sudo tee -a /etc/apt/sources.list
sudo apt update && sudo apt install rsync --assume-yes
nvm install 14
mkdir ~/.lnstx
cp boltz.conf ~/.lnstx/boltz.conf
echo "bronze large spike canoe youth crucial seminar awkward allow frozen client math" > ~/.lnstx/seed.dat
npm i
npm run docker:regtest
sed -i 's/sslEnabled: true/sslEnabled: false/g' lib/Config.ts
# git stash
# modify regtest container? to have prune=5000 and use mempool api
# lnd --lnddir=/root/.lnd-btc --listen=0.0.0.0:9735 --rpclisten=0.0.0.0:10009 --restlisten=0.0.0.0:8080 --bitcoin.active --bitcoin.regtest --bitcoin.node=bitcoind --bitcoind.rpchost=127.0.0.1:18443
# lnd --lnddir=/root/.lnd-btc2 --listen=127.0.0.1:9736 --rpclisten=0.0.0.0:10011 --restlisten=0.0.0.0:8081 --bitcoin.active --bitcoin.regtest --bitcoin.node=bitcoind --bitcoind.rpchost=127.0.0.1:18443
command: |
npm run dev
# rm package-lock.json
# npm i
- init: |
docker ps
# sleep 60
command: >
alias lnclibtc2='docker exec -it regtest lncli --rpcserver=127.0.0.1:10011 --tlscertpath=/root/.lnd-btc2/tls.cert --macaroonpath=/root/.lnd-btc2/data/chain/bitcoin/regtest/admin.macaroon'
alias lnclibtc1='docker exec -it regtest lncli --rpcserver=127.0.0.1:10009 --tlscertpath=/root/.lnd-btc/tls.cert --macaroonpath=/root/.lnd-btc/data/chain/bitcoin/regtest/admin.macaroon'
alias btccli='docker exec -it regtest /usr/bin/bitcon-cli '
echo 'lnclibtc2 newaddress p2wkh'
echo "bitcoin-cli send '{\"bcrt1q93rsj05zw3pvf8pa4gpjaypy5x5mqws49as43t\":10}'"
echo 'bitcoin-cli -regtest -generate 1'
echo 'bitcoin-cli gettxout a15863a0b1bbce4d35bbf6d4933564d52720b7c364665cc627c82679bfe29455 0 '
echo 'watch -n10 -x bitcoin-cli -regtest -generate 1'
# docker exec -it regtest bash
# echo "alias lnclibtc2='lncli --rpcserver=127.0.0.1:10011 --tlscertpath=/root/.lnd-btc/tls.cert --macaroonpath=/root/.lnd-btc/data/chain/bitcoin/regtest/admin.macaroon'"
# docker stop regtest && docker rm regtest && npm run docker:regtest
- init: |
npm i -g shx rimraf
npm run stacks:mocknet
sleep 180
command: |
npm run stacks:fund
SIGNER=ST27SD3H5TTZXPBFXHN1ZNMFJ3HNE2070QX7ZN4FF npm run stacks:fund:signer
sleep 5
SIGNER=ST1N28QCRR03EW37S470PND4SPECCXQ22ZZHF97GP npm run stacks:fund:signer
sleep 10
sed -i 's/.stxswap/.stxswap_v8/g' contracts/triggerswap_v3.clar
npm run stacks:deploy
sed -i 's/.stxswap_v8/.stxswap/g' contracts/triggerswap_v3.clar
# seed set manually and funded ST1N28QCRR03EW37S470PND4SPECCXQ22ZZHF97GP as the operator account
- init: |
git clone https://github.com/pseudozach/lnstxbridge-frontend.git /workspace/lnstxbridge-frontend
export REACT_APP_BOLTZ_API=https://9002-${GITPOD_WORKSPACE_URL:8}
export REACT_APP_STACKS_API=https://3999-${GITPOD_WORKSPACE_URL:8}
gp env REACT_APP_BOLTZ_API=$REACT_APP_BOLTZ_API
cd /workspace/lnstxbridge-frontend
sed -i 's/HTTPS=true/HTTPS=false/g' .env
sed -i 's/PORT=443/PORT=8888/g' .env
export REACT_APP_STACKS_NETWORK_TYPE=mocknet
sed -i 's#REACT_APP_BOLTZ_API=https://lnswap.org:9002#REACT_APP_BOLTZ_API=${REACT_APP_BOLTZ_API}#g' .env
npm i
# sed -i 's/REACT_APP_STACKS_NETWORK_TYPE=mainnet/REACT_APP_STACKS_NETWORK_TYPE=mocknet/g' .env
# sed -i "s#new StacksMocknet()#new StacksMocknet({url: '$REACT_APP_STACKS_API'})#g" /workspace/lnstxbridge-frontend/src/views/swap/steps/sendTransaction.js
# sed -i "s#new StacksMocknet()#new StacksMocknet({url: '$REACT_APP_STACKS_API'})#g" /workspace/lnstxbridge-frontend/src/views/reverse/steps/lockingFunds.js
# git stash
# git update-index --assume-unchanged .env
command: npm run start
- init: brew install clarinet
command: |
sed -i 's/.stxswap_v8/.stxswap/g' contracts/triggerswap_v3.clar
clarinet test
- init: |
echo 'npm run compile:watch'
command: |
xxd -p -c2000 docker/regtest/data/lnd/macaroons/admin.macaroon
echo 'npm run compile:watch'
# gitpod might have issue with archive.ubuntu.com
# echo 'deb http://mirror.arizona.edu/ubuntu/ focal main' | sudo tee -a /etc/apt/sources.list
# sudo apt update && sudo apt install rsync --assume-yes && npm i
- init: |
git clone https://github.com/pseudozach/lnswap-widget /workspace/lnswap-widget
cd /workspace/lnswap-widget
npm i
export GITPOD_CORE_URL=${GITPOD_WORKSPACE_URL:8}
sed -i 's#apiUrl: "https://api.lnswap#// apiUrl: "https://api.lnswap#g' /workspace/lnswap-widget/src/config.js
sed -i 's#// apiUrl: "http://localhost#apiUrl: "http://localhost#g' /workspace/lnswap-widget/src/config.js
sed -i "s#gitpod-url#$GITPOD_CORE_URL#g" /workspace/lnswap-widget/src/config.js
command: npm run start
# List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/
ports:
- port: 3000
onOpen: ignore
- port: 3999
onOpen: open-browser
visibility: public
- port: 9002
onOpen: ignore
visibility: public
- port: 8888
onOpen: open-browser
visibility: public
- port: 8080
onOpen: ignore
visibility: public