node-red-contrib-tydids
Version:
TyDIDs-P2P Communication using Decentralized Identity Presentations for edge to edge data exchange.
48 lines (45 loc) • 1.92 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('Tydids-Sender',{
category: 'P2P Network',
color: '#3FADB5',
defaults: {
name: {value:""},
address: {value:""},
privateKey: {value:""},
identity: {value:""},
extendMode: {value:true}
},
inputs:1,
outputs:1,
icon: "bridge.svg",
label: function() {
return this.name||"Tydids-Sender";
},
oneditprepare: async function() {
var node = this;
$('#node-input-address').val(node.status.text);
}
});
</script>
<script type="text/html" data-template-name="Tydids-Sender">
<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-privateKey"><i class="fa fa-tag"></i> Private Key (disables key generation)</label>
<input type="text" min-length="66" max-length="66" id="node-input-privateKey" placeholder="0x...">
</div>
<div class="form-row">
<label for="node-input-address"><i class="fa fa-tag"></i> Presentation </label>
<input type="text" readonly="readonly" id="node-input-address" min-length="42" max-length="42" placeholder="(0x....)">
</div>
<div class="form-tips"><b>Tip:</b> Copy Presentation address to <strong>TyDIDS-Receiver</strong>.</div>
<div class="form-row">
<label for="node-input-identity"><i class="fa fa-tag"></i> Identity </label>
<input type="text" id="node-input-identity" min-length="42" max-length="42" placeholder="(0x....)">
</div>
</script>
<script type="text/html" data-help-name="Tydids-Sender">
<p>Created a Sender instance Outputs Identity Information to use with TyDIDs-Receiver Node</p>
</script>