... | ... | @@ -2,12 +2,24 @@ |
|
|
|
|
|
Notification service is under construction.
|
|
|
|
|
|
## Get notification
|
|
|
### Transafer with ICAP Example
|
|
|
|
|
|
Notification will be POST request to url param. All of this fields ("from", "to", "symbol" etc) is editable. You'll get notifications with your custom fields. If "transactionHash" is not specified it will be generated randomly.
|
|
|
HTTP body:
|
|
|
|
|
|
`{"from": "0x1ff21eca1c3ba96ed53783ab9c92ffbf77862584", "name": "TransferToICAP", "reference": "", "transactionHash": "0xb8ad15e40cc01695ac996ddbecb3c1f5536dbd2c3d07d140387f71017ff8cb57", "timestamp": 1465909825, "value": 3, "blockNumber": 1702807, "to": "0x53786e5722f854a62783395dcdc27d633a9b063e", "logIndex": 2, "icap": "XE80EXMAMBI0DIMA0HI0", "transactionIndex": 0}`
|
|
|
|
|
|
## Signature
|
|
|
|
|
|
Signature is a SHA256 HMAC encoded by Base64 of HTTP body. It is stored is **Signature** HTTP Header. You can find *key* in your notification settings.
|
|
|
|
|
|
### Example
|
|
|
|
|
|
**Key**
|
|
|
`30c55850-dc15-4496-85b1-bc1517234196`
|
|
|
|
|
|
**Signature**
|
|
|
`pibUO5emk8fiT+FBngD70Ab9vSHXAaFNP4WhpA4w+OM=`
|
|
|
|
|
|
**HTTP Body**
|
|
|
`{"from": "0x1ff21eca1c3ba96ed53783ab9c92ffbf77862584", "name": "TransferToICAP", "reference": "", "transactionHash": "0xb8ad15e40cc01695ac996ddbecb3c1f5536dbd2c3d07d140387f71017ff8cb57", "timestamp": 1465909825, "value": 3, "blockNumber": 1702807, "to": "0x53786e5722f854a62783395dcdc27d633a9b063e", "logIndex": 2, "icap": "XE80EXMAMBI0DIMA0HI0", "transactionIndex": 0}`
|
|
|
|
|
|
$ curl \
|
|
|
-X POST \
|
|
|
-H "Content-Type: application/json" \
|
|
|
-d '{"from":"0x159d58f0224b1cccc6353571856d0f23071daecc","to":"0xd6d07eb9df74514aa3b03cd674105a08c9a80578","value":120000,"symbol":"TEST","transactionHash":"0x0950aba62deb6c4633a298af9d47c71f1452242ef4c910916c9bfe39946061f4","url":"http://google.com"}' \
|
|
|
http://notificator-test.ambisafe.co |
|
|
\ No newline at end of file |