You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc-site/docs/reference/types/contractlistener.md
+15-4
Original file line number
Diff line number
Diff line change
@@ -47,16 +47,17 @@ title: ContractListener
47
47
| Field Name | Description | Type |
48
48
|------------|-------------|------|
49
49
|`id`| The UUID of the smart contract listener |[`UUID`](simpletypes.md#uuid)|
50
-
|`interface`|A reference to an existing FFI, containing pre-registered type information for the event|[`FFIReference`](#ffireference)|
50
+
|`interface`|Deprecated: Please use 'interface' in the array of 'filters' instead|[`FFIReference`](#ffireference)|
51
51
|`namespace`| The namespace of the listener, which defines the namespace of all blockchain events detected by this listener |`string`|
52
52
|`name`| A descriptive name for the listener |`string`|
53
53
|`backendId`| An ID assigned by the blockchain connector to this listener |`string`|
54
-
|`location`|A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel|[`JSONAny`](simpletypes.md#jsonany)|
54
+
|`location`|Deprecated: Please use 'location' in the array of 'filters' instead|[`JSONAny`](simpletypes.md#jsonany)|
55
55
|`created`| The creation time of the listener |[`FFTime`](simpletypes.md#fftime)|
56
-
|`event`|The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI|[`FFISerializedEvent`](#ffiserializedevent)|
57
-
|`signature`|The stringified signature of the event, as computed by the blockchain plugin |`string`|
56
+
|`event`|Deprecated: Please use 'event' in the array of 'filters' instead|[`FFISerializedEvent`](#ffiserializedevent)|
57
+
|`signature`|A concatenation of all the stringified signature of the event and location, as computed by the blockchain plugin |`string`|
58
58
|`topic`| A topic to set on the FireFly event that is emitted each time a blockchain event is detected from the blockchain. Setting this topic on a number of listeners allows applications to easily subscribe to all events they need |`string`|
59
59
|`options`| Options that control how the listener subscribes to events from the underlying blockchain |[`ContractListenerOptions`](#contractlisteneroptions)|
60
+
|`filters`| A list of filters for the contract listener. Each filter is made up of an Event and an optional Location. Events matching these filters will always be emitted in the order determined by the blockchain. |[`ListenerFilter[]`](#listenerfilter)|
60
61
61
62
## FFIReference
62
63
@@ -92,3 +93,13 @@ title: ContractListener
92
93
|`firstEvent`| A blockchain specific string, such as a block number, to start listening from. The special strings 'oldest' and 'newest' are supported by all blockchain connectors. Default is 'newest' |`string`|
93
94
94
95
96
+
## ListenerFilter
97
+
98
+
| Field Name | Description | Type |
99
+
|------------|-------------|------|
100
+
|`event`| The definition of the event, either provided in-line when creating the listener, or extracted from the referenced FFI |[`FFISerializedEvent`](#ffiserializedevent)|
101
+
|`location`| A blockchain specific contract identifier. For example an Ethereum contract address, or a Fabric chaincode name and channel |[`JSONAny`](simpletypes.md#jsonany)|
102
+
|`interface`| A reference to an existing FFI, containing pre-registered type information for the event |[`FFIReference`](#ffireference)|
103
+
|`signature`| The stringified signature of the event and location, as computed by the blockchain plugin |`string`|
returnoutput, nil// note UNLIKE fabric this is just `output`, not `output.Result` - but either way the top level of what we return to the end user, is whatever the Connector sent us
0 commit comments