-
Notifications
You must be signed in to change notification settings - Fork 2
/
apiary.apib
96 lines (86 loc) · 3.19 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
FORMAT: 1A
HOST: http://localhost:8000/
# Taurus - Blockchain Listner(for PoweredBy 'FIWARE Architectures')
Taurus is a blockchain listner that supports various DLT, the listner aims to listen Blockchain Events and store data in FIWARE.
## Configuration [/config]
### List all configurations [GET]
+ Response 200 (application/json)
[
{
"id": 1,
"contractAddress": "0xed9d02e382b34818e88b88a309c7fe71e65f419d",
"abi": "[{'anonymous': False, 'name': 'LogEvent', 'inputs': [{'indexed': False, 'name': '_x', 'type': 'uint256', 'internalType': 'uint256'}], 'type': 'event', 'payable': False}, {'anonymous': False, 'name': 'LogOtherEvent', 'inputs': [{'indexed': True, 'name': '_sender', 'type': 'address', 'internalType': 'address'}], 'type': 'event', 'payable': False}, {'constant': False, 'name': 'emitEvent', 'inputs': [{'name': 'x', 'type': 'uint256', 'internalType': 'uint256'}], 'outputs': [], 'type': 'function', 'payable': False, 'stateMutability': 'nonpayable'}, {'constant': False, 'name': 'emitOtherEvent', 'inputs': [], 'outputs': [], 'type': 'function', 'payable': False, 'stateMutability': 'nonpayable'}]",
"interval": 10
},
{
"id": 2,
"contractAddress": "0xed9d02e382b34818e88b88a309c7fe71e65f419d",
"abi": "[{'inputs': [{'name': '_x', 'type': 'uint256'}], 'name': 'LogEvent', 'type': 'event'}, {'inputs': [{'indexed': True, 'name': '_sender', 'type': 'address'}], 'name': 'LogOtherEvent', 'type': 'event'}]",
"interval": 10
}
]
## /config
### Create a Config to continually be listening [POST]
+ Request (application/json)
{
"id":"event-identifier",
"interval": 10,
"contractAddress":"0x1349f3e1b8d71effb47b840594ff27da7e603d17",
"abi": [
{
"inputs": [
{
"name": "_x",
"type": "uint256"
}
],
"anonymous":false,
"name": "LogEvent",
"type": "event"
},
{
"inputs": [
{
"indexed": true,
"name": "_sender",
"type": "address"
}
],
"anonymous":false,
"name": "LogOtherEvent",
"type": "event"
}
]
}
+ Response 200 (application/json)
+ Body
{
"id": 7,
"contractAddress": "0x1349f3e1b8d71effb47b840594ff27da7e603d17",
"abi": [
{
"inputs": [
{
"name": "_x",
"type": "uint256"
}
],
"anonymous": false,
"name": "LogEvent",
"type": "event"
},
{
"inputs": [
{
"indexed": true,
"name": "_sender",
"type": "address"
}
],
"anonymous": false,
"name": "LogOtherEvent",
"type": "event"
}
],
"interval": 10
}