Provide a msg to watch that will be published to a topic when confirmation

This commit is contained in:
kexkey
2019-11-28 11:41:33 -05:00
committed by kexkey
parent 49299725e0
commit ed40433b28
10 changed files with 108 additions and 49 deletions

View File

@@ -9,7 +9,7 @@ Inserts the address and callbacks in the DB and imports the address to the Watch
```http
POST http://cyphernode:8888/watch
with body...
{"address":"2N8DcqzfkYi8CkYzvNNS5amoq3SbAcQNXKp","unconfirmedCallbackURL":"192.168.111.233:1111/callback0conf","confirmedCallbackURL":"192.168.111.233:1111/callback1conf"}
{"address":"2N8DcqzfkYi8CkYzvNNS5amoq3SbAcQNXKp","unconfirmedCallbackURL":"192.168.111.233:1111/callback0conf","confirmedCallbackURL":"192.168.111.233:1111/callback1conf","eventMessage":"{\"bounce_address}\":\"tb1q6s0ppwk2msdewal3mu90ahfhpyepawnw6wdk8t\",\"nb_conf\":6}"}
```
Proxy response:
@@ -26,7 +26,8 @@ Proxy response:
"estimatesmartfee2blocks": "0.000010",
"estimatesmartfee6blocks": "0.000010",
"estimatesmartfee36blocks": "0.000010",
"estimatesmartfee144blocks": "0.000010"
"estimatesmartfee144blocks": "0.000010",
"eventMessage": "{\"bounce_address}\":\"tb1q6s0ppwk2msdewal3mu90ahfhpyepawnw6wdk8t\",\"nb_conf\":6}"
}
```
@@ -66,7 +67,8 @@ Proxy response:
"imported":"1",
"unconfirmedCallbackURL":"192.168.133.233:1111/callback0conf",
"confirmedCallbackURL":"192.168.133.233:1111/callback1conf",
"watching_since":"2018-09-06 21:14:03"}
"watching_since":"2018-09-06 21:14:03",
"eventMessage":"{\"bounce_address}\":\"tb1q6s0ppwk2msdewal3mu90ahfhpyepawnw6wdk8t\",\"nb_conf\":6}"}
]
}
```

View File

@@ -52,6 +52,7 @@ paths:
- "address"
- "confirmedCallbackURL"
- "unconfirmedCallbackURL"
- "event_message"
properties:
address:
$ref: '#/components/schemas/TypeAddressString'
@@ -61,6 +62,8 @@ paths:
confirmedCallbackURL:
type: "string"
format: "url"
event_message:
type: "string"
responses:
'200':
description: "successfully created"
@@ -1543,6 +1546,7 @@ components:
- "address"
- "unconfirmedCallbackURL"
- "confirmedCallbackURL"
- "event_message"
properties:
id:
type: "string"
@@ -1574,6 +1578,8 @@ components:
type: "string"
watching_since:
type: "string"
event_message:
type: "string"
WatchedByXpubAddress:
type: "object"
required: