diff --git a/integration/lnurl-p.jmx b/integration/lnurl-p.jmx
new file mode 100644
index 000000000..6918560da
--- /dev/null
+++ b/integration/lnurl-p.jmx
@@ -0,0 +1,2801 @@
+
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+
+
+ host
+ b8e7-2001-8a0-fa0a-8900-6e39-ed3f-b48-e79e.ngrok-free.app
+ =
+
+
+ scheme
+ ${__property(scheme,,http)}
+ =
+
+
+ adminUserId
+ 08752d249648434f9bd125e728851cfd
+ =
+
+
+ adminWalletKey
+ 9fdb75d4e4ab480d88b1cd1defd35903
+ =
+
+
+ thinkTime
+ 3000
+ =
+
+
+ lnurlpCount
+ 5
+ =
+
+
+ paymentCountPerLnurlp
+ 2
+ =
+
+
+ lnurlwCount
+ 3
+ =
+
+
+ withdrawCountPerLnurlw
+ 2
+ =
+
+
+ port
+ =
+
+
+
+
+
+
+
+
+ localhost
+ ${port}
+ http
+
+
+ 6
+
+
+
+
+
+
+ false
+ false
+
+
+
+ stopthread
+
+ false
+ 1
+
+ 1
+ 1
+ 1370726934000
+ 1370726934000
+ false
+
+
+ false
+
+
+
+ false
+ false
+
+
+
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+
+
+
+ false
+ nme
+ w1
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /wallet
+ GET
+ true
+ false
+ true
+ false
+
+
+
+ Detected the start of a redirect chain
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ vars.put("userId", "no-user-id");
+vars.put("walletId", "no-wallet-id");
+
+var query = prev.getURL().getQuery().split('&')
+for (var i =0; i<query.length; i++) {
+ var param = query[i].split("=")
+ if (param[0] === "usr") {
+ vars.put("userId", param[1]);
+ }
+ if (param[0] === "wal") {
+ vars.put("walletId", param[1]);
+ }
+}
+
+
+ javascript
+
+
+
+ javascript
+
+
+ true
+ var bodyLines = prev.getResponseDataAsString().split('\n')
+
+for (var i =0; i < bodyLines.length; i++) {
+ var line = bodyLines[i].trim()
+ if (line.startsWith('window.wallet =')) {
+ var walletJson = line.split('=')[1]
+ if (walletJson.endsWith(';')) walletJson = walletJson.substring(0, walletJson.length -1)
+ var wallet = JSON.parse(walletJson)
+ vars.put("inkey", wallet.inkey || 'no-inkey');
+ vars.put("adminkey", wallet.adminkey || 'no-adminkey');
+ }
+}
+
+
+
+
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+ false
+ wal
+ ${walletId}
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /wallet
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/currencies
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ undefined
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ ["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BYR","BZD","CAD","CDF","CHF","CLF","CLP","CNH","CNY","COP","CRC","CUC","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GGP","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRT","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SVC","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VES","VND","VUV","WST","XAF","XAG","XAU","XCD","XDR","XOF","XPD","XPF","XPT","YER","ZAR","ZMW","ZWL"]
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+if (resp.balance !== 0) {
+ AssertionResult.setFailureMessage("Balance is not zero, but: "+ resp.balance);
+ AssertionResult.setFailure(true)
+}
+
+ javascript
+
+
+
+
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/payments
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ []
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+
+ false
+ false
+
+
+
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+ false
+ enable
+ lnurlp
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /extensions
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ same-origin
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /lnurlp/
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ same-origin
+
+
+ Referer
+ https://127.0.0.1:${port}/extensions?usr=59fa6912263c4b89a106c87fba3a2d20&enable=lnurlp
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ New pay link
+
+
+ Assertion.response_data
+ false
+ 2
+
+
+
+
+
+
+
+ false
+ all_wallets
+ true
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /lnurlp/api/v1/links
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ []
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+
+ true
+ ${lnurlpCount}
+
+
+
+ 1
+ ${lnurlpCount}
+ 1
+ lnurlpCounter
+
+ true
+
+
+
+ true
+
+
+
+ false
+ {"description":"receive payments ${lnurlpCounter}","min":11,"comment_chars":128,"webhook_url":"http://localhost:8081","webhook_headers":"{\"h1\": \"1\"}","webhook_body":"{\"b2\": 2}","success_text":"All goood!","success_url":"https://lnbits.com","max":${lnurlpCounter}1}
+ =
+
+
+
+ 127.0.0.1
+ ${port}
+ https
+ utf-8
+ /lnurlp/api/v1/links
+ POST
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Origin
+ https://127.0.0.1:${port}
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var walletId = vars.get("walletId")
+var lnurlpCounter = +vars.get("lnurlpCounter")
+
+if (!resp.id) {
+ AssertionResult.setFailureMessage("Pay Link not created");
+ AssertionResult.setFailure(true)
+} else if (resp.wallet !== walletId){
+ AssertionResult.setFailureMessage("Pay Link description expected to be '"+walletId+"', but was: " + resp.wallet);
+ AssertionResult.setFailure(true)
+} else if (resp.description !== "receive payments "+lnurlpCounter){
+ AssertionResult.setFailureMessage("Pay Link description expected to be 'receive payments "+lnurlpCounter+"', but was: " + resp.description);
+ AssertionResult.setFailure(true)
+}
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("payLinkId", resp.id || 'no-pay-link-id');
+vars.put("payLinkLnurl", resp.lnurl || 'no-pay-link-lnurl');
+
+
+
+
+
+
+
+ 127.0.0.1
+ ${port}
+ https
+ UTF-8
+ /lnurlp/link/${payLinkId}
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ same-origin
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ Copy LNURL
+ ${payLinkLnurl}
+
+
+ Assertion.response_data
+ false
+ 2
+
+
+
+
+
+
+
+ false
+ all_wallets
+ true
+ =
+ true
+
+
+
+ 127.0.0.1
+ ${port}
+ https
+ UTF-8
+ /lnurlp/api/v1/links/${payLinkId}
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ lnurl
+ ${payLinkLnurl}
+ true
+ false
+ false
+ true
+
+
+
+
+
+
+
+ false
+ all_wallets
+ true
+ =
+ true
+
+
+
+ 127.0.0.1
+ ${port}
+ https
+ UTF-8
+ /api/v1/lnurlscan/${payLinkLnurl}
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ domain
+ ${host}:${port}
+ true
+ false
+ false
+ true
+
+
+
+ tag
+ payRequest
+ true
+ false
+ false
+ true
+
+
+
+ commentAllowed
+ 128
+ true
+ false
+ false
+ true
+
+
+
+ kind
+ pay
+ true
+ false
+ false
+ true
+
+
+
+ description
+ receive payments ${lnurlpCounter}
+ true
+ false
+ false
+ true
+
+
+
+ payLinkCallback
+ callback
+ 0
+ no-paylink-callback
+
+
+
+ payLinkDescriptionHash
+ description_hash
+ 0
+ no-paylink-description-hash
+
+
+
+
+ true
+ ${paymentCountPerLnurlp}
+
+
+
+ 1
+ ${paymentCountPerLnurlp}
+ 1
+ lnurlpPaymentCounter
+
+ true
+
+
+
+ true
+
+
+
+ false
+ {"callback":"${scheme}://${host}:${port}/lnurlp/api/v1/lnurl/cb/${payLinkId}","description_hash":"${payLinkDescriptionHash}","amount":1${lnurlpCounter}000,"comment":"xxq ${lnurlpCounter}","description":"receive payments ${lnurlpCounter}"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /api/v1/payments/lnurl
+ POST
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ success_action
+
+ false
+ false
+ false
+ false
+
+
+
+ paymenHash
+ payment_hash
+ 0
+ no-paymenthash
+
+
+
+
+ 1100
+
+
+
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/payments/${paymenHash}
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ X-Api-Key
+ ${inkey}
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ $.details.extra.wh_success
+ true
+ true
+ false
+ false
+ false
+
+
+
+ $.details.extra.wh_message
+ OK
+ true
+ false
+ false
+ false
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+var paymenHash = vars.get("paymenHash")
+
+
+var whResp = resp.details.extra.wh_response
+var separatorIndex = whResp.indexOf("\r\n\r\n")
+if (separatorIndex == -1) {
+ AssertionResult.setFailureMessage("Webhook response has wrong format: " + whResp);
+ AssertionResult.setFailure(true)
+} else {
+ var headers = whResp.substring(0, separatorIndex)
+ var bodyStr = whResp.substring(separatorIndex)
+ var body = JSON.parse(bodyStr)
+ if (body.payment_hash !== paymenHash) {
+ AssertionResult.setFailureMessage("Incorrect webhook payment hash: " + JSON.stringify(body));
+ AssertionResult.setFailure(true)
+ } else if (headers.indexOf("h1: 1") === -1) {
+ AssertionResult.setFailureMessage("Expected header missing: 'h1': '1'");
+ AssertionResult.setFailure(true)
+ } else if (!body.body || !body.body.b2 || body.body.b2 !== 2) {
+ AssertionResult.setFailureMessage("Expected body field missing: \"body\": {\"b2\": 2}, found: " + JSON.stringify(body.body));
+ AssertionResult.setFailure(true)
+ }
+}
+
+
+
+
+
+
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var lnurlpCounter = +vars.get('lnurlpCounter')
+
+
+var userBalance = +vars.get("userBalance")
+userBalance += 10 + lnurlpCounter
+
+// millisats
+if (resp.balance !== userBalance * 1000) {
+ AssertionResult.setFailureMessage("Expected balance to be "+userBalance * 1000+", but got: "+ resp.balance);
+ AssertionResult.setFailure(true)
+}
+
+vars.put("userBalance", userBalance)
+ javascript
+
+
+
+
+
+
+ false
+ false
+
+
+
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+ false
+ enable
+ withdraw
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /extensions
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ same-origin
+
+
+ Referer
+ ${scheme}://127.0.0.${lnurlpCount}:${port}/extensions?usr=f1021e90ea954ebca46d1ed57eb451e0
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ ${lnurlpCount}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /withdraw/
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ same-origin
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ ${lnurlpCount}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ Withdraw links
+
+
+ Assertion.response_data
+ false
+ 2
+
+
+
+
+
+
+
+ false
+ all_wallets
+ true
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /withdraw/api/v1/links
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ []
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+
+ true
+ ${lnurlwCount}
+
+
+
+ 1
+
+ 1
+ lnurlwCounter
+
+ false
+
+
+
+ true
+
+
+
+ false
+ {
+ "is_unique": false,
+ "use_custom": false,
+ "title": "withdraw ${lnurlwCounter}",
+ "min_withdrawable": 10,
+ "max_withdrawable":${lnurlwCounter}0,
+ "uses": 5,
+ "wait_time": 1,
+ "webhook_url": "http://localhost:8081",
+ "webhook_headers": "{\"h1\": \"1\"}",
+ "webhook_body": "{\"b2\": 2}",
+ "custom_url": null
+}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /withdraw/api/v1/links
+ POST
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var walletId = vars.get("walletId")
+var lnurlwCounter = +vars.get("lnurlwCounter")
+
+if (!resp.id) {
+ AssertionResult.setFailureMessage("Withdraw Link not created");
+ AssertionResult.setFailure(true)
+} else if (resp.wallet !== walletId) {
+ AssertionResult.setFailureMessage("Withdraw Link wallet expected to be '" + walletId + "', but was: " + resp.wallet);
+ AssertionResult.setFailure(true)
+} else if (resp.title !== "withdraw " + lnurlwCounter) {
+ AssertionResult.setFailureMessage("Withdraw Link description expected to be 'withdraw " + lnurlwCounter + "', but was: " + resp.description);
+ AssertionResult.setFailure(true)
+}
+
+
+
+ withdrawLinkId
+ id
+ 0
+ no-withdraw-link-id
+
+
+
+ withdrawLinkLnurl
+ lnurl
+ 0
+ no-withdraw-link-lnurl
+
+
+
+
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /withdraw/${withdrawLinkId}
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ same-origin
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ Copy LNURL
+ ${withdrawLinkLnurl}
+
+
+ Assertion.response_data
+ false
+ 2
+
+
+
+
+
+
+
+ false
+ all_wallets
+ true
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ https
+ UTF-8
+ /withdraw/api/v1/links/${withdrawLinkId}
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ lnurl
+ ${withdrawLinkLnurl}
+ true
+ false
+ false
+ true
+
+
+
+
+
+
+
+ false
+ all_wallets
+ true
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/lnurlscan/${withdrawLinkLnurl}
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ domain
+ ${host}:${port}
+ true
+ false
+ false
+ true
+
+
+
+ tag
+ withdrawRequest
+ true
+ false
+ false
+ true
+
+
+
+ kind
+ withdraw
+ true
+ false
+ false
+ true
+
+
+
+ defaultDescription
+ withdraw ${lnurlwCounter}
+ true
+ false
+ false
+ true
+
+
+
+ withdrawLinkCallback
+ callback
+ 0
+ no-withdrawlink-callback
+
+
+
+
+ true
+ ${withdrawCountPerLnurlw}
+
+
+
+ true
+
+
+
+ false
+ {"out":false,"amount":10,"memo":"withdraw ${lnurlwCounter}","unit":"sat","lnurl_callback":"${withdrawLinkCallback}"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /api/v1/payments
+ POST
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ lnurl_response
+ true
+ true
+ false
+ false
+ true
+
+
+
+ paymenHash
+ payment_hash
+ 0
+ no-payment-hash
+
+
+
+
+ 1100
+
+
+
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/payments/${paymenHash}
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ X-Api-Key
+ ${inkey}
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ $.details.extra.wh_success
+ true
+ true
+ false
+ false
+ false
+
+
+
+ $.details.extra.wh_message
+ OK
+ true
+ false
+ false
+ false
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+var paymenHash = vars.get("paymenHash")
+
+
+var whResp = resp.details.extra.wh_response
+var separatorIndex = whResp.indexOf("\r\n\r\n")
+if (separatorIndex == -1) {
+ AssertionResult.setFailureMessage("Webhook response has wrong format: " + whResp);
+ AssertionResult.setFailure(true)
+} else {
+ var headers = whResp.substring(0, separatorIndex)
+ var bodyStr = whResp.substring(separatorIndex)
+ var body = JSON.parse(bodyStr)
+ if (body.payment_hash !== paymenHash) {
+ AssertionResult.setFailureMessage("Incorrect webhook payment hash: " + JSON.stringify(body));
+ AssertionResult.setFailure(true)
+ } else if (headers.indexOf("h1: 1") === -1) {
+ AssertionResult.setFailureMessage("Expected header missing: 'h1': '1'");
+ AssertionResult.setFailure(true)
+ } else if (!body.body || !body.body.b2 || body.body.b2 !== 2) {
+ AssertionResult.setFailureMessage("Expected body field missing: \"body\": {\"b2\": 2}, found: " + JSON.stringify(body.body));
+ AssertionResult.setFailure(true)
+ }
+}
+
+
+
+
+
+
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var userBalance = +vars.get("userBalance")
+userBalance -= 10
+
+// millisats
+if (resp.balance !== userBalance * 1000) {
+ AssertionResult.setFailureMessage("Expected balance to be "+userBalance * 1000+", but got: "+ resp.balance);
+ AssertionResult.setFailure(true)
+}
+
+vars.put("userBalance", userBalance)
+ javascript
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+ 100
+ true
+ (wallet){1}
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+
+ 8081
+ 0
+ 25
+
+
+
+ 8888
+
+ windowsupdate\.microsoft\.com.*
+ (?i).*\.(bmp|css|js|gif|ico|jpe?g|png|swf|eot|otf|ttf|mp4|woff|woff2)
+ .*msg\.yahoo\.com.*
+ www\.download\.windowsupdate\.com.*
+ toolbarqueries\.google\..*
+ http?://self-repair\.mozilla\.org.*
+ tiles.*\.mozilla\.com.*
+ .*detectportal\.firefox\.com.*
+ us\.update\.toolbar\.yahoo\.com.*
+ .*\.google\.com.*/safebrowsing/.*
+ api\.bing\.com.*
+ toolbar\.google\.com.*
+ .*yimg\.com.*
+ toolbar\.msn\.com.*
+ (?i).*\.(bmp|css|js|gif|ico|jpe?g|png|swf|eot|otf|ttf|mp4|woff|woff2)[\?;].*
+ toolbar\.avg\.com/.*
+ www\.google-analytics\.com.*
+ pgq\.yahoo\.com.*
+ safebrowsing.*\.google\.com.*
+ sqm\.microsoft\.com.*
+ g\.msn.*
+ clients.*\.google.*
+ .*toolbar\.yahoo\.com.*
+ geo\.yahoo\.com.*
+
+
+ true
+ 4
+ false
+
+ false
+ true
+ true
+ false
+ true
+
+
+ false
+
+ 0
+
+ true
+ UTF-8
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ true
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+ recording.xml
+
+
+
+
+
+
diff --git a/integration/tpos.jmx b/integration/tpos.jmx
new file mode 100644
index 000000000..60d7bed8c
--- /dev/null
+++ b/integration/tpos.jmx
@@ -0,0 +1,3769 @@
+
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+
+
+ host
+ ${__property(host,,127.0.0.1)}
+ =
+
+
+ scheme
+ ${__property(scheme,,http)}
+ =
+
+
+ port
+ ${__property(port,,5000)}
+ =
+
+
+ adminUserId
+ ${__property(adminUserId,,bbbbbbbbbbbb4bbbbbbbbbbbbbbbaaaa)}
+ =
+ admin user with some funds
+
+
+ adminWalletKey
+ ${__property(adminWalletKey,,8b1f7387f61f458096ad03166407215f)}
+ =
+ this wallet is going to make some payments
+
+
+ thinkTime
+ 3000
+ =
+
+
+
+
+
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ Java
+ 20000
+ 30000
+
+
+
+
+ false
+ false
+
+
+
+
+
+
+
+ stopthread
+
+ 1
+ false
+
+ 1
+ 1
+ 1370726934000
+ 1370726934000
+ false
+
+
+ false
+ false
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ true
+
+
+
+ false
+ {"name":"a1"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/account
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ http://localhost:5000/
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Origin
+ http://localhost:5000
+
+
+ Content-Type
+ application/json
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("userId", resp.user || "no-user-id");
+vars.put("walletId", resp.id || "no-wallet-id");
+vars.put("inkey", resp.inkey || 'no-inkey');
+vars.put("adminkey", resp.adminkey || 'no-adminkey');
+
+ javascript
+
+
+
+
+ true
+
+
+
+ false
+ {"name":"tips"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ http://localhost:5000/
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Origin
+ http://localhost:5000
+
+
+ Content-Type
+ application/json
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("tipWalletId", resp.id || "no-wallet-id");
+vars.put("tipinkey", resp.inkey || 'no-inkey');
+vars.put("tipadminkey", resp.adminkey || 'no-adminkey');
+
+ javascript
+
+
+
+
+ false
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+ false
+ wal
+ ${walletId}
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/currencies
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ undefined
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ ["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BYR","BZD","CAD","CDF","CHF","CLF","CLP","CNH","CNY","COP","CRC","CUC","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GGP","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRT","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SVC","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VES","VND","VUV","WST","XAF","XAG","XAU","XCD","XDR","XOF","XPD","XPF","XPT","YER","ZAR","ZMW","ZWL"]
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+if (resp.balance !== 0) {
+ AssertionResult.setFailureMessage("Balance is not zero, but: "+ resp.balance);
+ AssertionResult.setFailure(true)
+}
+
+ javascript
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/payments
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ []
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+ false
+ enable
+ tpos
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /extensions
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ same-origin
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ same-origin
+
+
+ Referer
+ http://localhost:5000/tpos/?usr=${adminUserId}
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ false
+
+
+
+ false
+ all_wallets
+ true
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Referer
+ http://localhost:5000/tpos/?usr=${adminUserId}
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+
+ false
+ false
+
+
+
+
+
+ pin
+ 2222
+ =
+
+
+ timeBtw
+ =
+ 1
+
+
+ withdrawLmt
+ =
+ 100000
+
+
+ tipOptions
+ [2, 5]
+ =
+
+
+ memo
+ TPoS test
+ =
+
+
+
+
+
+ true
+
+
+
+ false
+ {"name":"Test","wallet":"${walletId}","currency":"USD"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ http://localhost:5000
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+ Content-Type
+ application/json
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var walletId = vars.get("walletId")
+
+if (!resp.id) {
+ AssertionResult.setFailureMessage("TPoS not created");
+ AssertionResult.setFailure(true)
+} else if (resp.wallet !== walletId){
+ AssertionResult.setFailureMessage("TPoS description expected to be '"+walletId+"', but was: " + resp.wallet);
+ AssertionResult.setFailure(true)
+}
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("tposId", resp.id || 'no-tpos-id');
+
+
+
+
+ true
+
+
+
+ false
+ {"tip_options":"${tipOptions}","tip_wallet":"${tipWalletId}"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs/${tposId}
+ PUT
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ http://localhost:5000
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+ Content-Type
+ application/json
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 40
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var walletId = vars.get("walletId")
+var tipWalletId = vars.get("tipWalletId")
+var tipOptions = vars.get("tipOptions")
+
+if (!resp.id) {
+ AssertionResult.setFailureMessage("TPoS not updated");
+ AssertionResult.setFailure(true)
+} else if (resp.wallet !== walletId){
+ AssertionResult.setFailureMessage("TPoS description expected to be '"+walletId+"', but was: " + resp.wallet);
+ AssertionResult.setFailure(true)
+} else if (resp.tip_wallet != tipWalletId) {
+ AssertionResult.setFailureMessage("Tip wallet expected to be '"+tipWalletId+"', but was: " + resp.tip_wallet);
+ AssertionResult.setFailure(true)
+} else if (resp.tip_options != tipOptions) {
+ AssertionResult.setFailureMessage("Tip options expected to be '"+tipOptions+"', but was: " + resp.tip_options);
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+ true
+
+
+
+ false
+ {"withdrawpin":${pin},"withdrawbtwn":${timeBtw},"name":"Test ATM","wallet":"${walletId}","currency":"EUR","withdrawlimit":${withdrawLmt}}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ http://localhost:5000
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+ Content-Type
+ application/json
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var walletId = vars.get("walletId")
+
+if (!resp.id) {
+ AssertionResult.setFailureMessage("TPoS not created");
+ AssertionResult.setFailure(true)
+} else if (resp.wallet !== walletId){
+ AssertionResult.setFailureMessage("TPoS description expected to be '"+walletId+"', but was: " + resp.wallet);
+ AssertionResult.setFailure(true)
+}
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("ATMtposId", resp.id || 'no-tpos-id');
+
+
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/${tposId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ same-origin
+
+
+ Referer
+ http://localhost:5000/tpos/?usr=${adminUserId}
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ ⬅
+ ok
+
+
+ Assertion.response_data
+ false
+ 2
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/rate/EUR
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ rate
+ null
+ true
+ false
+ true
+ false
+
+
+
+
+
+ false
+ false
+
+
+
+ 1000
+ 10
+
+ true
+
+ amount
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs/${tposId}/invoices?amount=${amount}&memo=${memo}
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ http://localhost:5000
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Content-Type
+ application/x-www-form-urlencoded
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ payment_request
+
+ false
+ false
+ false
+ true
+
+
+
+ payment_hash
+
+ false
+ false
+ false
+ true
+
+
+
+ paymentRequest
+ payment_request
+ 0
+ no-payment-request
+
+
+
+ paymentHash
+ payment_hash
+ 0
+ no-payment-hash
+
+
+
+
+ true
+ 1
+
+
+
+ 1100
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs/${tposId}/invoices/${paymentHash}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Referer
+ http://localhost:5000/tpos/4qJSDrSf9peoV9iMqvmpBT
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ paid
+ false
+ true
+ false
+ false
+ false
+
+
+
+
+
+ true
+
+
+
+ false
+ {
+ "out": true,
+ "amount": ${amount},
+ "memo": "${memo}",
+ "unit": "sat",
+ "bolt11": "${paymentRequest}"
+}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /api/v1/payments
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var paymentHash = vars.get("paymentHash")
+
+if (!resp.payment_hash) {
+ AssertionResult.setFailureMessage("Payment failed");
+ AssertionResult.setFailure(true)
+} else if (resp.payment_hash !== paymentHash) {
+ AssertionResult.setFailureMessage("Payment hash expected to be '"+paymentHash+"', but was: " + resp.payment_hash);
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+ 1100
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs/${tposId}/invoices/${paymentHash}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Referer
+ http://localhost:5000/tpos/4qJSDrSf9peoV9iMqvmpBT
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ paid
+ true
+ true
+ false
+ false
+ false
+
+
+
+
+
+ false
+ false
+
+
+
+ 1000
+ 10
+
+ true
+
+ amount
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs/${tposId}/invoices?amount=${amount}&memo=${memo}&tipAmount=${__javaScript(parseInt(Math.ceil(0.05*${amount})).toFixed(0))}
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ http://localhost:5000
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Content-Type
+ application/x-www-form-urlencoded
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ payment_request
+
+ false
+ false
+ false
+ true
+
+
+
+ payment_hash
+
+ false
+ false
+ false
+ true
+
+
+
+ paymentHash
+ payment_hash
+ 0
+ no-payment-hash
+
+
+
+ paymentRequest
+ payment_request
+ 0
+ no-payment-request
+
+
+
+
+ true
+ 1
+
+
+
+ 1100
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs/${tposId}/invoices/${paymentHash}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Referer
+ http://localhost:5000/tpos/4qJSDrSf9peoV9iMqvmpBT
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ paid
+ false
+ true
+ false
+ false
+ false
+
+
+
+
+
+ true
+
+
+
+ false
+ {
+ "out": true,
+ "amount": ${amount},
+ "memo": "${memo}",
+ "unit": "sat",
+ "bolt11": "${paymentRequest}"
+}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /api/v1/payments
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var paymentHash = vars.get("paymentHash")
+
+if (!resp.payment_hash) {
+ AssertionResult.setFailureMessage("Payment failed");
+ AssertionResult.setFailure(true)
+} else if (resp.payment_hash !== paymentHash) {
+ AssertionResult.setFailureMessage("Payment hash expected to be '"+paymentHash+"', but was: " + resp.payment_hash);
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+ 1100
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs/${tposId}/invoices/${paymentHash}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Referer
+ http://localhost:5000/tpos/4qJSDrSf9peoV9iMqvmpBT
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ paid
+ true
+ true
+ false
+ false
+ false
+
+
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/${ATMtposId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ same-origin
+
+
+ Referer
+ http://localhost:5000/tpos/?usr=${adminUserId}
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ ⬅
+ Ok
+
+
+ Assertion.response_data
+ false
+ 2
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/rate/EUR
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ rate
+ null
+ true
+ false
+ true
+ false
+
+
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs/${ATMtposId}/invoices?amount=11000&memo=${memo}
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ http://localhost:5000
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Content-Type
+ application/x-www-form-urlencoded
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ payment_request
+
+ false
+ false
+ false
+ true
+
+
+
+ payment_hash
+
+ false
+ false
+ false
+ true
+
+
+
+ paymentRequest
+ payment_request
+ 0
+ no-payment-request
+
+
+
+ paymentHash
+ payment_hash
+ 0
+ no-payment-hash
+
+
+
+
+ 1100
+
+
+
+ true
+
+
+
+ false
+ {
+ "out": true,
+ "amount": 11000,
+ "memo": "${memo}",
+ "unit": "sat",
+ "bolt11": "${paymentRequest}"
+}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /api/v1/payments
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var paymentHash = vars.get("paymentHash")
+
+if (!resp.payment_hash) {
+ AssertionResult.setFailureMessage("Payment failed");
+ AssertionResult.setFailure(true)
+} else if (resp.payment_hash !== paymentHash) {
+ AssertionResult.setFailureMessage("Payment hash expected to be '"+paymentHash+"', but was: " + resp.payment_hash);
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+ 1100
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/tposs/${ATMtposId}/invoices/${paymentHash}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Referer
+ http://localhost:5000/tpos/4qJSDrSf9peoV9iMqvmpBT
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ paid
+ true
+ true
+ false
+ false
+ false
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ adminBalance
+ balance
+ 0
+ no-admin-balance
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ userBalance
+ balance
+ 0
+ no-user-balance
+
+
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/atm/${ATMtposId}/${pin}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ token
+ id
+ 0
+ no-token
+
+
+
+
+
+ false
+ false
+
+
+
+ 10000
+ 3000
+
+ true
+
+ amount
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tpos/api/v1/atm/withdraw/${token}/${amount}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+ Java
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Referer
+ https://violet-frogs-fail.loca.lt/tpos/4qJSDrSf9peoV9iMqvmpBT
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ claimed
+ false
+ true
+ false
+ false
+ true
+
+
+
+ amount
+ ${amount}
+ true
+ false
+ false
+ true
+
+
+
+ lnurl
+ lnurl
+ 0
+ no-lnurl
+
+
+
+ certAlias
+ -1
+ True
+ 0
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/lnurlscan/${lnurl}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Referer
+ http://localhost:5000/wallet?usr=c2108fb7f9e646cc89f1a72359bbff8c&wal=c765b81174fa4144b21c64a9144181d2
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ domain
+ ${host}:${port}
+ true
+ false
+ false
+ true
+
+
+
+ tag
+ withdrawRequest
+ true
+ false
+ false
+ true
+
+
+
+ kind
+ withdraw
+ true
+ false
+ false
+ true
+
+
+
+ withdrawLinkCallback
+ callback
+ 0
+ no-withdrawlink-callback
+
+
+
+
+ true
+
+
+
+ false
+ {"out":false,"amount":${amount},"memo":"TPoS withdraw","unit":"sat","lnurl_callback":"${withdrawLinkCallback}"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /api/v1/payments
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Sec-Fetch-Mode
+ cors
+
+
+ Sec-Fetch-Site
+ same-origin
+
+
+ Accept-Language
+ en-US,en;q=0.${lnurlpCount}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate, br
+
+
+ User-Agent
+ Mozilla/${lnurlpCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Sec-Fetch-Dest
+ empty
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ lnurl_response
+ true
+ true
+ false
+ false
+ true
+
+
+
+ paymenHash
+ payment_hash
+ 0
+ no-payment-hash
+
+
+
+
+ 1100
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/payments/${paymenHash}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ X-Api-Key
+ ${inkey}
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var userBalance = +vars.get("userBalance")
+var amount = +vars.get("amount")
+userBalance -= amount * 1000
+
+// millisats
+if (resp.balance !== userBalance) {
+ AssertionResult.setFailureMessage("Expected balance to be "+userBalance+", but got: "+ resp.balance);
+ AssertionResult.setFailure(true)
+}
+ javascript
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var adminBalance = +vars.get("adminBalance")
+var amount = +vars.get("amount")
+adminBalance += amount * 1000
+
+// millisats
+if (resp.balance !== adminBalance) {
+ AssertionResult.setFailureMessage("Expected balance to be "+adminBalance+", but got: "+ resp.balance);
+ AssertionResult.setFailure(true)
+}
+ javascript
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+ 100
+ true
+ (wallet){1}
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+
+ 8081
+ 0
+ 25
+
+
+
+ 8888
+
+ windowsupdate\.microsoft\.com.*
+ (?i).*\.(bmp|css|js|gif|ico|jpe?g|png|swf|eot|otf|ttf|mp4|woff|woff2)
+ .*msg\.yahoo\.com.*
+ www\.download\.windowsupdate\.com.*
+ toolbarqueries\.google\..*
+ http?://self-repair\.mozilla\.org.*
+ tiles.*\.mozilla\.com.*
+ .*detectportal\.firefox\.com.*
+ us\.update\.toolbar\.yahoo\.com.*
+ .*\.google\.com.*/safebrowsing/.*
+ api\.bing\.com.*
+ toolbar\.google\.com.*
+ .*yimg\.com.*
+ toolbar\.msn\.com.*
+ (?i).*\.(bmp|css|js|gif|ico|jpe?g|png|swf|eot|otf|ttf|mp4|woff|woff2)[\?;].*
+ toolbar\.avg\.com/.*
+ www\.google-analytics\.com.*
+ pgq\.yahoo\.com.*
+ safebrowsing.*\.google\.com.*
+ sqm\.microsoft\.com.*
+ g\.msn.*
+ clients.*\.google.*
+ .*toolbar\.yahoo\.com.*
+ geo\.yahoo\.com.*
+
+
+ true
+ 4
+ false
+
+ false
+ true
+ true
+ false
+ true
+
+
+ false
+
+ 0
+
+ true
+ UTF-8
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ true
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+ recording.xml
+
+
+
+
+
+
diff --git a/integration/watchonly-satspay-tipjar.jmx b/integration/watchonly-satspay-tipjar.jmx
new file mode 100644
index 000000000..93ae17ff9
--- /dev/null
+++ b/integration/watchonly-satspay-tipjar.jmx
@@ -0,0 +1,3762 @@
+
+
+
+
+
+ false
+ false
+
+
+
+
+
+
+
+
+
+ host
+ ${__property(host,,127.0.0.1)}
+ =
+
+
+ scheme
+ ${__property(scheme,,http)}
+ =
+
+
+ port
+ ${__property(port,,5000)}
+ =
+
+
+ xpubNoFunds
+ zpub6roF3uF1YsrxvSK9cC7kpT7xt45i6aZffVg5SHWkqcEMTpA2fnB9eF45wgM7EXAmFDazxyWGsDbwCMUTiteYFhBJNLrgpkBjVet9S98UXor
+ =
+
+
+ xpubWithFunds
+ zpub6rsRjqj6BTbD9DjqrY4p14tUx5kdA8ZGCTJD99wZTxD5wfvCkyXKrK3s7M3B1eFN6NbRhmbDDRDC8LF3Bn5gmxxN9rF8mDpZsGC6isGrK1g
+ =
+
+
+ adminUserId
+ ${__property(adminUserId,,bbbbbbbbbbbb4bbbbbbbbbbbbbbbaaaa)}
+ =
+ admin user with some funds
+
+
+ adminWalletKey
+ ${__property(adminWalletKey,,8b1f7387f61f458096ad03166407215f)}
+ =
+ this wallet is going to make some payments
+
+
+ paidChargeCount
+ 5
+ =
+
+
+ userTipCount
+ 5
+ =
+
+
+ thinkTime
+ 3000
+ =
+
+
+
+
+
+
+
+
+ localhost
+ http
+
+
+
+
+ false
+ false
+
+
+
+ stopthread
+
+ 1
+ false
+
+ 1
+ 1
+ 1370726934000
+ 1370726934000
+ false
+
+
+ false
+ false
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /?qqqqqq=${adminUserId}&wwwwww=${adminWalletKey}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ true
+
+
+
+ false
+ {"name":"a1"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/account
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ http://localhost:5000/
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Origin
+ http://localhost:5000
+
+
+ Content-Type
+ application/json
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("userId", resp.user || "no-user-id");
+vars.put("walletId", resp.id || "no-wallet-id");
+vars.put("inkey", resp.inkey || 'no-inkey');
+vars.put("adminkey", resp.adminkey || 'no-adminkey');
+
+ javascript
+
+
+
+
+ false
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+ false
+ wal
+ ${walletId}
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/currencies
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ undefined
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ ["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BYR","BZD","CAD","CDF","CHF","CLF","CLP","CNH","CNY","COP","CRC","CUC","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GGP","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRT","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SVC","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VES","VND","VUV","WST","XAF","XAG","XAU","XCD","XDR","XOF","XPD","XPF","XPT","YER","ZAR","ZMW","ZWL"]
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+if (resp.balance !== 0) {
+ AssertionResult.setFailureMessage("Balance is not zero, but: "+ resp.balance);
+ AssertionResult.setFailure(true)
+}
+
+ javascript
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/payments
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ []
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+ false
+ enable
+ watchonly
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /extensions
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/extensions?usr=${userId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /watchonly/
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ Scan Blockchain
+
+
+ Assertion.response_data
+ false
+ 2
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /watchonly/api/v1/config
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/watchonly/?usr=${userId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ {"mempool_endpoint":"https://mempool.space","receive_gap_limit":20,"change_gap_limit":5,"sats_denominated":true,"network":"Mainnet"}
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ false
+ network
+ Mainnet
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /watchonly/api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/watchonly/?usr=${userId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ []
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+ true
+
+
+
+ false
+ {"title":"segwit","masterpub":"${xpubWithFunds}","network":"Mainnet","meta":"{\"accountPath\":\"m/84'/0'/0'\"}"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /watchonly/api/v1/wallet
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/watchonly/?usr=${userId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ groovy
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+if (!resp.id) {
+ AssertionResult.setFailureMessage("Onchain account not created");
+ AssertionResult.setFailure(true)
+}
+
+delete resp.id
+
+var expectedAccount = [{
+ "masterpub": "zpub6roF3uF1YsrxvSK9cC7kpT7xt45i6aZffVg5SHWkqcEMTpA2fnB9eF45wgM7EXAmFDazxyWGsDbwCMUTiteYFhBJNLrgpkBjVet9S98UXor",
+ "fingerprint": "8eb84369",
+ "title": "segwit",
+ "address_no": 79,
+ "balance": 0,
+ "type": "p2wpkh",
+ "network": "Mainnet",
+ "meta": "{\"accountPath\":\"m/84'/0'/0'\"}"
+}]
+
+if (JSON.stringify(resp) !== JSON.stringify(expectedAccount)) {
+ AssertionResult.setFailureMessage("Expected account incorrect: " + JSON.stringify(expectedAccount));
+ AssertionResult.setFailure(true)
+}
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("onchainAccountId", resp.id || 'no-onchain-account-id');
+
+
+
+
+ false
+
+
+
+ false
+ network
+ Mainnet
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /watchonly/api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/watchonly/?usr=${userId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+ javascript
+
+
+ true
+ var accounts = JSON.parse(prev.getResponseDataAsString())
+
+if (accounts.length === 0) {
+ AssertionResult.setFailureMessage("No onchain account found");
+ AssertionResult.setFailure(true)
+}
+
+var accountId = vars.get("onchainAccountId")
+if (accountId !== accounts[0].id) {
+ AssertionResult.setFailureMessage("Incorrect account id: "+accountId + " / "+accounts[0].id);
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /watchonly/api/v1/addresses/${onchainAccountId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/watchonly/?usr=${userId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+ javascript
+
+
+ true
+ var addresses = JSON.parse(prev.getResponseDataAsString())
+
+if (addresses.length !== 25) {
+ AssertionResult.setFailureMessage("Expected 25 addresses, got " + addresses.length );
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /watchonly/api/v1/address/${onchainAccountId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/watchonly/?usr=${userId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var expectedAddress = 'bc1qtmfyj6s76xhrsgd4aw6qq9tc9d48vnd0690k5w'
+if (resp.address !== expectedAddress) {
+ AssertionResult.setFailureMessage("Expected addresses '"+expectedAddress+"', got " + resp.address );
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+ false
+ enable
+ satspay
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /extensions
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/extensions?usr=${userId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /satspay/
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/extensions?usr=${userId}&enable=satspay
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ <h5 class="text-subtitle1 q-my-none">Charges</h5>
+
+
+ Assertion.response_data
+ false
+ 2
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /satspay/api/v1/charges
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/satspay/?usr=${userId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ []
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+ true
+
+
+
+ false
+ {"onchain":true,"onchainwallet":"${onchainAccountId}","lnbits":false,"description":"Onchain Charge","time":1111,"amount":1111,"lnbitswallet":null}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /satspay/api/v1/charge
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/satspay/?usr=${userId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("chargeId", resp.id || 'no-charge-id');
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /satspay/${chargeId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/satspay/
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /satspay/api/v1/charge/balance/${chargeId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/satspay/${chargeId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ undefined
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ true
+
+
+
+ false
+ {"onchain":false,"onchainwallet":null,"lnbits":true,"description":"lightning charge - to expire","time":1,"amount":10,"lnbitswallet":"${walletId}","webhook":"https://google.com","completelink":"https://twitter.com","completelinktext":"Have Fun"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /satspay/api/v1/charge
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+
+ true
+ ${paidChargeCount}
+
+
+
+ 1
+
+ 1
+ chargeCounter
+
+ false
+
+
+
+ 10
+
+ 1
+ amountGenerator
+
+ true
+ true
+
+
+
+ true
+
+
+
+ false
+ {"onchain":false,"onchainwallet":null,"lnbits":true,"description":"lightning charge [${chargeCounter}]","time":1220,"amount":${amountGenerator},"lnbitswallet":"${walletId}","webhook":"http://localhost:8081","completelink":"https://twitter.com","completelinktext":"Have Fun"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /satspay/api/v1/charge
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("lightningChargeId", resp.id || 'no-lightning-charge-id');
+vars.put("paymentRequest", resp.payment_request || 'no-lpayment-request');
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /satspay/${lightningChargeId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /satspay/api/v1/charge/balance/${lightningChargeId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ undefined
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+if (resp.balance !== 0) {
+ AssertionResult.setFailureMessage("Expected balance to be zero, got " + resp.amount);
+ AssertionResult.setFailure(true)
+}
+
+if (resp.paid) {
+ AssertionResult.setFailureMessage("Expected charge to not be paid");
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+ 1
+ 0
+ ${thinkTime}
+
+
+
+ 1000
+ 100
+
+
+
+
+ true
+
+
+
+ false
+ {"out":true,"bolt11":"${paymentRequest}"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /api/v1/payments
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /satspay/api/v1/charge/balance/${lightningChargeId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ undefined
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var amount = +vars.get('amountGenerator')
+if (resp.balance !== amount) {
+ AssertionResult.setFailureMessage("Expected balance to be "+amount+", got " + resp.amount);
+ AssertionResult.setFailure(true)
+}
+
+if (!resp.paid) {
+ AssertionResult.setFailureMessage("Expected charge to be paid");
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /satspay/api/v1/charge/${lightningChargeId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var payment = JSON.parse(prev.getResponseDataAsString())
+
+if (!payment.paid || !payment.lnbitswallet || !payment.webhook){
+ AssertionResult.setFailureMessage("Charge not correctly updated after paiment: "+ payment.id);
+ AssertionResult.setFailure(true)
+}
+
+var extra = JSON.parse(payment.extra)
+if (!extra.webhook_response) {
+ AssertionResult.setFailureMessage("Webhook response missing for payment: "+ payment.id);
+ AssertionResult.setFailure(true)
+}
+
+var separatorIndex = extra.webhook_response.indexOf("\r\n\r\n")
+if (separatorIndex == -1) {
+ AssertionResult.setFailureMessage("Webhook response has wrong format"+ extra.webhook_response);
+ AssertionResult.setFailure(true)
+}
+var headers = extra.webhook_response.substring(0, separatorIndex)
+var bodyStr = extra.webhook_response.substring(separatorIndex)
+
+var body = JSON.parse(bodyStr)
+
+
+if (vars.get("lightningChargeId") !== body.id) {
+ AssertionResult.setFailureMessage("Wrong webhook charge id. Expected: "+ vars.get("lightningChargeId") + ", but got "+ body.id);
+ AssertionResult.setFailure(true)
+}
+
+if (vars.get("paymentRequest") !== body.payment_request) {
+ AssertionResult.setFailureMessage("Wrong webhook charge payment request. Expected: "+ vars.get("paymentRequest") + ", but got "+ body.payment_request);
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /satspay/api/v1/charges
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/satspay/?usr=${userId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var paidChargeCount = +vars.get('paidChargeCount')
+
+var totalChargeCount = paidChargeCount + 2; // one onchain and one to expire
+if (resp.length !== totalChargeCount) {
+ AssertionResult.setFailureMessage("Expected charges count to be "+totalChargeCount+", got " + resp.length);
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var paidChargeCount = +vars.get('paidChargeCount')
+var balance = 0
+var startAmount = 10
+for (var i=0; i< paidChargeCount; i++) {
+ balance += startAmount + i
+}
+
+// millisats
+if (resp.balance !== balance * 1000) {
+ AssertionResult.setFailureMessage("Expected balance to be "+balance+", but got: "+ resp.balance);
+ AssertionResult.setFailure(true)
+}
+
+vars.put("userBalance", resp.balance)
+ javascript
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/payments
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var paidChargeCount = +vars.get('paidChargeCount')
+// one payment is the expired one
+var totalPaymentsCount = paidChargeCount + 1
+
+if (resp.length != totalPaymentsCount) {
+ AssertionResult.setFailureMessage("Expected total "+totalPaymentsCount+" paymet, but got: "+ resp.length);
+ AssertionResult.setFailure(true)
+}
+
+var pendingCount = 0
+
+for (var i=0; i<resp.length; i++) {
+ var payment = resp[i]
+ if (payment.pending) pendingCount++
+}
+
+if (pendingCount !== 1) {
+ AssertionResult.setFailureMessage("Expected one pending paymet, but got: "+ pendingCount);
+ AssertionResult.setFailure(true)
+}
+
+ javascript
+
+
+
+
+
+ false
+ false
+
+
+
+ false
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+ false
+ enable
+ tipjar
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /extensions
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ false
+ usr
+ ${userId}
+ =
+ true
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tipjar/
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ New TipJar
+
+
+ Assertion.response_data
+ false
+ 2
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tipjar/api/v1/tipjars
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ []
+
+
+ Assertion.response_data
+ false
+ 8
+
+
+
+
+ true
+
+
+
+ false
+ {"wallet":"${walletId}","name":"Nakamoto","webhook":"http://localhost:8081"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /tipjar/api/v1/tipjars
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ X-Api-Key
+ ${adminkey}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("tipjarId", resp.id || 'no-tipjar-id');
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+if (resp.name !== "Nakamoto") {
+ AssertionResult.setFailureMessage("Expected tipjar name to be 'Nakamoto', got " + resp.name);
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tipjar/${tipjarId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+
+ true
+ ${userTipCount}
+
+
+
+ 1
+
+ 1
+ tipCounter
+
+ true
+ true
+
+
+
+ true
+
+
+
+ false
+ {"tipjar":"${tipjarId}","name":"Hal","sats":21,"message":"Let's go ...${tipCounter}!"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /tipjar/api/v1/tips
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+if (!resp.redirect_url || !resp.redirect_url.startsWith("/satspay/")) {
+ AssertionResult.setFailureMessage("Expected redirect url to start with '/satspay/', but was: " + resp.redirect_url);
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("tipChargeUrl", resp.redirect_url || 'no-tip-charge-url');
+
+if (resp.redirect_url) {
+ var tipChargeId = resp.redirect_url.split("/")[2]
+ vars.put("tipChargeId", tipChargeId || 'no-tip-charge-id');
+}
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ ${tipChargeUrl}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/tipjar/2
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ Upgrade-Insecure-Requests
+ 1
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /satspay/api/v1/charge/${tipChargeId}
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/satspay/${chargeId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var tipCounter = +vars.get("tipCounter")
+var name = "Hal"
+var description = "Let's go ..." + tipCounter + "!"
+
+if (resp.description !== description) {
+ AssertionResult.setFailureMessage("Expected name to be 'Hal', but was: " + resp.name);
+ AssertionResult.setFailure(true)
+}
+
+if (resp.description !== description) {
+ AssertionResult.setFailureMessage("Expected description to be 'Let's go!', but was: " + resp.description);
+ AssertionResult.setFailure(true)
+}
+
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+vars.put("tipPaymentRequest", resp.payment_request || 'no-tip-payment-request');
+
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /tipjar/api/v1/tips
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.${paidChargeCount}
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/${paidChargeCount}.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ javascript
+
+
+ true
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var tipCounter = +vars.get("tipCounter")
+
+if (resp.length !== tipCounter) {
+ AssertionResult.setFailureMessage("Expected "+tipCounter+" tips, but got: " + resp.length);
+ AssertionResult.setFailure(true)
+} else {
+ var tip = resp[tipCounter - 1]
+ var message = "Let's go ..." + tipCounter + "!"
+ if (!tip || tip.name !== "Hal" || tip.message !== message || tip.sats !== 21) {
+ AssertionResult.setFailureMessage("Expected tip to '" + message + "', but was: " + JSON.stringify(resp));
+ AssertionResult.setFailure(true)
+ }
+}
+
+
+
+
+ 1
+ 0
+ ${thinkTime}
+
+
+
+ 1000
+ 100
+
+
+
+
+ true
+
+
+
+ false
+ {"out":true,"bolt11":"${tipPaymentRequest}"}
+ =
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ utf-8
+ /api/v1/payments
+ POST
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${adminWalletKey}
+
+
+ Origin
+ ${scheme}://${host}:${port}
+
+
+ Content-Type
+ application/json;charset=utf-8
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 201
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+
+ false
+
+
+
+ ${host}
+ ${port}
+ ${scheme}
+ UTF-8
+ /api/v1/wallet
+ GET
+ true
+ false
+ true
+ false
+ false
+ false
+ false
+ 6
+ false
+ 0
+
+
+
+
+
+ Referer
+ ${scheme}://${host}:${port}/wallet?usr=${userId}&wal=${walletId}
+
+
+ Accept-Language
+ en-US,en;q=0.5
+
+
+ X-Api-Key
+ ${inkey}
+
+
+ Accept-Encoding
+ gzip, deflate
+
+
+ User-Agent
+ Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
+
+
+ Accept
+ application/json, text/plain, */*
+
+
+
+
+
+
+ 200
+
+
+ Assertion.response_code
+ false
+ 8
+
+
+
+ true
+
+
+ var resp = JSON.parse(prev.getResponseDataAsString())
+
+var tipCounter = +vars.get('tipCounter')
+var userBalance = +vars.get("userBalance")
+
+userBalance += 21 * 1000
+
+// millisats
+if (resp.balance !== userBalance) {
+ AssertionResult.setFailureMessage("Expected balance to be "+userBalance+", but got: "+ resp.balance);
+ AssertionResult.setFailure(true)
+}
+
+vars.put("userBalance", userBalance)
+ javascript
+
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+ 100
+ true
+ (wallet){1}
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ false
+ false
+ false
+ true
+ false
+ false
+ false
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+
+ 8081
+ 0
+ 25
+
+
+
+ 8888
+
+ windowsupdate\.microsoft\.com.*
+ (?i).*\.(bmp|css|js|gif|ico|jpe?g|png|swf|eot|otf|ttf|mp4|woff|woff2)
+ .*msg\.yahoo\.com.*
+ www\.download\.windowsupdate\.com.*
+ toolbarqueries\.google\..*
+ http?://self-repair\.mozilla\.org.*
+ tiles.*\.mozilla\.com.*
+ .*detectportal\.firefox\.com.*
+ us\.update\.toolbar\.yahoo\.com.*
+ .*\.google\.com.*/safebrowsing/.*
+ api\.bing\.com.*
+ toolbar\.google\.com.*
+ .*yimg\.com.*
+ toolbar\.msn\.com.*
+ (?i).*\.(bmp|css|js|gif|ico|jpe?g|png|swf|eot|otf|ttf|mp4|woff|woff2)[\?;].*
+ toolbar\.avg\.com/.*
+ www\.google-analytics\.com.*
+ pgq\.yahoo\.com.*
+ safebrowsing.*\.google\.com.*
+ sqm\.microsoft\.com.*
+ g\.msn.*
+ clients.*\.google.*
+ .*toolbar\.yahoo\.com.*
+ geo\.yahoo\.com.*
+
+
+ true
+ 4
+ false
+
+ false
+ true
+ true
+ false
+ true
+
+
+ false
+
+ 0
+
+ true
+ UTF-8
+
+
+
+ false
+
+ saveConfig
+
+
+ true
+ true
+ true
+
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ false
+ true
+ true
+ true
+ true
+ 0
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+ recording.xml
+
+
+
+
+
+