-
Notifications
You must be signed in to change notification settings - Fork 0
/
bl3p.html
153 lines (142 loc) · 5.23 KB
/
bl3p.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<script type="text/html" data-template-name="add-order">
<div class="form-row node-input-bl3p">
<label for="node-input-bl3p"><i class="fa fa-tag"></i> Bl3p API</label>
<input type="text" id="node-input-bl3p">
</div>
<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>
</script>
<script type="text/javascript">
RED.nodes.registerType('add-order',{
category: 'function',
color: '#a6bbcf',
defaults: {
name: {value:""},
bl3p: {type: "bl3p-api", required: true}
},
inputs:1,
outputs:1,
icon: "file.png",
label: function() {
return this.name||"Add Order";
}
});
</script>
<script type="text/html" data-help-name="add-order">
<p>Creates and order through the <code>/money/order/add</code> function of the BL3P API from an incoming messages based on the properties of the message</p>
<p>The properties <code>msg.amount</code>, <code>msg.type</code>, <code>msg.price</code>, <code>msg.fee_currency</code>, <code>msg.amount_funds</code> can be set as specified in the BL3P API documentation.</p>
<p>The node output message that with an order id, stored in <code>msg.order_id</code> and a boolean <code>msg.result</code> property, which is set to true upon succes, and false in all other cases. The result from the BL3P API is stored in <code>msg.payload.data</code>.<p>
</script>
<script type="text/html" data-template-name="cancel-order">
<div class="form-row node-input-bl3p">
<label for="node-input-bl3p"><i class="fa fa-tag"></i> Bl3p API</label>
<input type="text" id="node-input-bl3p">
</div>
<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>
</script>
<script type="text/javascript">
RED.nodes.registerType('cancel-order',{
category: 'function',
color: '#a6bbcf',
defaults: {
name: {value:""},
bl3p: {type: "bl3p-api", required: true}
},
inputs:1,
outputs:1,
icon: "file.png",
label: function() {
return this.name||"Cancel Order";
}
});
</script>
<script type="text/html" data-template-name="order-info">
<div class="form-row node-input-bl3p">
<label for="node-input-bl3p"><i class="fa fa-tag"></i> Bl3p API</label>
<input type="text" id="node-input-bl3p">
</div>
<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>
</script>
<script type="text/javascript">
RED.nodes.registerType('order-info',{
category: 'function',
color: '#a6bbcf',
defaults: {
name: {value:""},
bl3p: {type: "bl3p-api", required: true}
},
inputs:1,
outputs:1,
icon: "file.png",
label: function() {
return this.name||"Order Info";
}
});
</script>
<script type="text/html" data-template-name="account-info">
<div class="form-row node-input-bl3p">
<label for="node-input-bl3p"><i class="fa fa-tag"></i> Bl3p API</label>
<input type="text" id="node-input-bl3p">
</div>
<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>
</script>
<script type="text/javascript">
RED.nodes.registerType('account-info',{
category: 'function',
color: '#a6bbcf',
defaults: {
name: {value:""},
bl3p: {type: "bl3p-api", required: true}
},
inputs:1,
outputs:1,
icon: "file.png",
label: function() {
return this.name||"Account Info";
}
});
</script>
<script type="text/html" data-template-name="bl3p-api">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name">
</div>
<div class="form-row">
<label for="node-config-input-publickey"><i class="fa fa-lock"></i> Public key</label>
<input type="text" id="node-config-input-publickey">
</div>
<div class="form-row">
<label for="node-config-input-privatekey"><i class="fa fa-lock"></i> Private key</label>
<input type="password" id="node-config-input-privatekey">
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType('bl3p-api',{
category: 'config',
color: '#a6bbcf',
defaults: {
name: {value:""}
},
credentials: {
publickey: {type:"text"},
privatekey: {type:"password"}
},
label: function() {
return this.name||"BL3P API";
}
});
</script>
<script type="text/html" data-help-name="bl3p-api">
<p>This module provides access to the BL3P API. The API is configured through this node with a public and private API key, which can be created at <a href="https://www.bl3p.eu/" target="_new">https://www.bl3p.eu/</a>.</p>
</script>