5.4.4.16 Smart Contract Event Notification Message API

This interface is implemented on the off-BSN system side. When the PCN gateway receives the notification of a triggered event, it uses this interface to notify the off-BSN system about the execution result.

After receiving the notification successfully, the off-BSN system returns a string containing “success”, otherwise, the gateway will send the notification again at 3, 12, 27, and 48 seconds respectively, for a total of five times.

1. Call method: POST

2. Signature algorithm: required and refer to Section 5.4.4.1

3. Call parameters

No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map N
3 Signature Value mac String Y
header
1 user unique ID userCode String Y
2 DApp unique ID appCode String Y
body
1 Registered Event ID eventId String Y
2 PCN ID orgCode String Y
3 Registered Event parameters attachArgs String N Additional parameters entered during registration
4 Response random string nonceStr String Y Off-BSN system uses this value to judge if the notification is already received. This string remains the same at the repeated notifications.
5 Event type eventType String Y
6 Event data eventData String Y

Example:

{"header":{"userCode":"USER0001202006042321579692440","appCode":"app0001202006042323057101002"},"body":{"eventId":"5b5b865f8dc94ae59d215cf26aa81d69","orgCode":"ORG2020041114171692360","appCode":"app0001202006042323057101002","attachArgs":"abc=123","nonceStr":"52f080f27ff045eb87e21812d12cee40","eventType":1,"eventData":"{\"appId\":\"app0001202006042323057101002\",\"blockNumber\":17,\"eventType\":1,\"groupId\":135}"},"mac":"MEUCIQD3Sp6xuI4DHy/GOb9z3nH6kQisEzfXvZ/Hn/mfZXIAOgIgYsISRfBKSJGt4FrmxETflfR4A8VenCZHvxthMFUWRkc="}
© 2019-2020 Red Date (Hong Kong) Technology Limited. all right reserved,powered by GitbookFile Modify: 2020-11-24 13:43:41

results matching ""

    No results matching ""

    results matching ""

      No results matching ""