-
Notifications
You must be signed in to change notification settings - Fork 0
/
fabric-blocks-listener.html
98 lines (96 loc) · 3.92 KB
/
fabric-blocks-listener.html
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
97
98
<script type="text/javascript">
RED.nodes.registerType('fabric-blocks-listener', {
category: 'function',
color: '#a6bbcf',
defaults: {
name: {
value: ""
},
peerAddress: {
value: "grpc://localhost:7051"
},
connectTimeout: {
value: 3000
},
sslCert: {
value: ""
},
sslHostName: {
value: "localhost"
},
username: {
value: "admin"
},
mspId: {
value: "Org1MSP"
},
channelName: {
value: "mychannel"
},
startBlock: {
value: -1
},
endBlock: {
value: 0
},
disconnect: {
value: false
}
},
inputs: 1,
outputs: 2,
icon: "file.png",
label: function () {
return this.name || "fabric-blocks-listener";
}
});
</script>
<script type="text/x-red" data-template-name="fabric-blocks-listener">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-peerAddress"><i class="fa fa-globe"></i> Peer</label>
<input type="text" id="node-input-peerAddress" placeholder="Peer address (default: grpc://localhost:7051)">
</div>
<div class="form-row">
<label for="node-input-connectTimeout"><i class="fa fa-clock-o"></i> ConnectTimeout</label>
<input type="text" id="node-input-connectTimeout" placeholder="Timeout for peer connection (default: 3000 ms)">
</div>
<div class="form-row">
<label for="node-input-sslCert"><i class="fa fa-certificate"></i> SSLCert</label>
<input type="text" id="node-input-sslCert" placeholder="PEM encoded SSL certificate (no default)">
</div>
<div class="form-row">
<label for="node-input-sslHostName"><i class="fa fa-shield"></i> sslHostName</label>
<input type="text" id="node-input-sslHostName" placeholder="The host name of the server, as used in SSL cert (default: localhost)">
</div>
<div class="form-row">
<label for="node-input-username"><i class="fa fa-user"></i> Username</label>
<input type="text" id="node-input-username" placeholder="Name of user (default: admin)">
</div>
<div class="form-row">
<label for="node-input-mspId"><i class="fa fa-sitemap"></i> MspId</label>
<input type="text" id="node-input-mspId" placeholder="The MSP ID (default: Org1MSP)">
</div>
<div class="form-row">
<label for="node-input-channelName"><i class="fa fa-rss"></i> Channel</label>
<input type="text" id="node-input-channelName" placeholder="Channel name (default: mychannel)">
</div>
<div class="form-row">
<label for="node-input-startBlock"><i class="fa fa-toggle-right"></i> StartBlock</label>
<input type="number" id="node-input-startBlock" placeholder="Block number (default: -1, to start from latest)">
</div>
<div class="form-row">
<label for="node-input-endBlock"><i class="fa fa-toggle-left"></i> EndBlock</label>
<input type="number" id="node-input-endBlock" placeholder="Block number (default: 0 to keep syncing)">
</div>
<div class="form-row">
<label for="node-input-disconnect"><i class="fa fa-chain-broken"></i> Disconnect</label>
<input type="checkbox" id="node-input-disconnect">
</div>
</script>
<script type="text/x-red" data-help-name="fabric-blocks-listener">
<p>A node that listens to the blocks events in Hyperledger Fabric peer and sends the blocks as JSON objects to ouput 1 and read/write set from every transaction to output 2</p>
</script>