diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/samples.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/lib/samples.js b/src/lib/samples.js index efb11648..ac9e2d7e 100644 --- a/src/lib/samples.js +++ b/src/lib/samples.js @@ -26,12 +26,25 @@ export default { "amount": 5000, "hash": "bc1q3unh97w4rmelflrm2hvdwz37d8kray3vn4d5ca" }'`, - internal: `curl "https://coinos.io/api/payments" + internal: `HASH=$(curl "https://coinos.io/api/invoice" + -H "content-type: application/json" + -H "Authorization: Bearer $token" + -d '{ + "invoice": { + "amount": 1000, + "type": "lightning" + }, + "user": { + "username": "alice" + } + }' | jq -r '.hash'); + + curl "https://coinos.io/api/payments" -H "content-type: application/json" -H "Authorization: Bearer $token" -d '{ "amount": 5000, - "username": "alice" + "hash": $HASH }'`, rates: `curl "https://coinos.io/api/rates" -H "content-type: application/json" |
