<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>MultiChain Developer Q&amp;A - Recent questions tagged sendwithdata</title>
<link>https://www.multichain.com/qa/tag/sendwithdata</link>
<description>Powered by Question2Answer</description>
<item>
<title>What is the purpose behind the 'Key' parameter in {&quot;for&quot;:stream,&quot;key&quot;:&quot;...&quot;,&quot;data&quot;:&quot;...&quot;} ?</title>
<link>https://www.multichain.com/qa/4165/what-the-purpose-behind-the-key-parameter-for-stream-key-data</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;As per title question, I've been trying to find more specifics, but in the tutorials they didn't explain this particular's purpose. Does 'Key&quot; in metadata field mean a mandatory public key from a sender to a receiver when using 'Grant...', 'Complete...' and 'Send...' with metadata added?&lt;/p&gt;&lt;p&gt;I'm assuming I probably haven't look deep enough here, but examples I found simply uses it with an example (such as key:&quot;key1&quot;)&amp;nbsp;and doesn't explain to what means I can use it for.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;One example:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:rgb(199, 37, 78); font-family:menlo,monaco,consolas,courier new,monospace; font-size:12.6px&quot;&gt;appendrawdata [paste-hex-blob] '{&quot;for&quot;:&quot;stream5&quot;,&quot;key&quot;:&quot;key1&quot;,&quot;data&quot;:&quot;4f6e65206974656d&quot;}'&lt;/span&gt;&lt;/p&gt;&lt;p&gt;So where does this &quot;key1&quot; come from and what does it do?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Related API explanation:&lt;/strong&gt;&lt;/p&gt;&lt;table border=&quot;1&quot; cellspacing=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;sendwithdata&lt;span style=&quot;font-family:helvetica neue,helvetica,arial,sans-serif; font-size:14px&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br&gt;or&amp;nbsp;sendwithmetadata&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color:rgb(199, 37, 78); font-family:menlo,monaco,consolas,courier new,monospace; font-size:12.6px&quot;&gt;address amount data-hex|object&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;font-family:helvetica neue,helvetica,arial,sans-serif; font-size:14px&quot;&gt;This works like&amp;nbsp;&lt;/span&gt;send&lt;span style=&quot;font-family:helvetica neue,helvetica,arial,sans-serif; font-size:14px&quot;&gt;, but with an additional data-only transaction output. To include raw data, pass a&amp;nbsp;&lt;/span&gt;data-hex&lt;span style=&quot;font-family:helvetica neue,helvetica,arial,sans-serif; font-size:14px&quot;&gt;&amp;nbsp;hexadecimal string. To publish the data to a stream, pass an object&amp;nbsp;&lt;/span&gt;{&quot;for&quot;:stream,&quot;key&quot;:&quot;...&quot;,&quot;data&quot;:&quot;...&quot;}&lt;span style=&quot;font-family:helvetica neue,helvetica,arial,sans-serif; font-size:14px&quot;&gt;&amp;nbsp;where&amp;nbsp;&lt;/span&gt;stream&lt;span style=&quot;font-family:helvetica neue,helvetica,arial,sans-serif; font-size:14px&quot;&gt;&amp;nbsp;is a stream name, ref or creation txid, &lt;span style=&quot;background-color:#FFFF00&quot;&gt;the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color:#FFFF00&quot;&gt;key&lt;/span&gt;&lt;span style=&quot;font-family:helvetica neue,helvetica,arial,sans-serif; font-size:14px&quot;&gt;&lt;span style=&quot;background-color:#FFFF00&quot;&gt;&amp;nbsp;is in text form&lt;/span&gt;, and the&amp;nbsp;&lt;/span&gt;data&lt;span style=&quot;font-family:helvetica neue,helvetica,arial,sans-serif; font-size:14px&quot;&gt;&amp;nbsp;is hexadecimal.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;I understand that the plain text form of the 'key' is inputted but is this 'key' used&amp;nbsp;to do something in particular?&lt;/p&gt;&lt;p&gt;Thank you and your time is appreciated :)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/4165/what-the-purpose-behind-the-key-parameter-for-stream-key-data</guid>
<pubDate>Wed, 01 Mar 2017 08:19:58 +0000</pubDate>
</item>
</channel>
</rss>