Title: What is the difference between a transaction with and without signatures?
Tags: asch-development;asch
Question: When i send an transaction to peer/transactions i can send it  with and without signatures. Both transaction are accepted. What is the difference.
Example; Create a new chain / dapp by using asch-js
Situation 1: using signatures (and a transactionid):
function createDApp(options, secret, secondSecret) {
var keys = crypto.getKeys(secret);
var transaction = {
secret: secret,
type: 200,
amount: 0,
fee: constants.fees.dapp,
recipientId: null,
senderId: crypto.getAddress(keys.publicKey),
timestamp: slots.getTime() - globalOptions.get('clientDriftSeconds'),
args: [options.name, options.description, options.link, options.icon, options.delegates, options.unlockDelegates],
signatures: []
};
transaction.signatures.push(crypto.sign(transaction, keys));
if (secondSecret) {
var secondKeys = crypto.getKeys(secondSecret);
transaction.signatures.push(crypto.secondSign(transaction, secondKeys));
transaction.id = crypto.getId(transaction);
return transaction;
Situation 2: no signatures
function createDApp(options, secret, secondSecret) {
var keys = crypto.getKeys(secret);
var transaction = {
secret: secret,
type: 200,
amount: 0,
fee: constants.fees.dapp,
recipientId: null,
senderId: crypto.getAddress(keys.publicKey),
timestamp: slots.getTime() - globalOptions.get('clientDriftSeconds'),
args: [options.name, options.description, options.link, options.icon, options.delegates, options.unlockDelegates],
signatures: []
};
return transaction;
Both transaction are accepted (and create a new chain). So what is the difference and what is best practice?
Comment: Does it work if you sign the transaction and send it to `peers/transactions` without the `secret` property?
If you provide the secret in the transaction the blockchain will be able to self sign the transaction.

Comment: hi @mathayk, the `secret` in the `transaction` is not required, but the transactions is also accpeted without the `secret` and with an empty `sigantures[]`

Here is the accepted answer: As far as I understand the api/transactions endpoint is mainly for unsigned transactions (like your 2nd example). Therefore you need to provide the secret property. Otherwise the ASCH blockchain can't sign your unsigned transaction.
In your first example you are signing the transaction by yourself, therefore you don't need to send the secret property to the peer/transactions endpoint.
From a security endpoint it is better to sign your transactions locally. So no malicious node can steal all your funds when you send your secret the a blockchain endpoint.


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2018:00:08/10/18', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<asch-development><asch>', 'Title': 'What is the difference between a transaction with and without signatures?', 'ViewCount': 54, 'id': 51782880, 'user_AboutMe': '<p>Author of <strong>Less Web Development Essentials</strong> <a href="http://www.packtpub.com/less-web-development-essentials/book" rel="nofollow">http://www.packtpub.com/less-web-development-essentials/book</a> and <strong>Less Web Development Cookbook</strong> <a href="https://www.packtpub.com/web-development/less-web-development-cookbook" rel="nofollow">https://www.packtpub.com/web-development/less-web-development-cookbook</a>.</p>\n\n<p>Currently, i write a blog (<a href="http://bassjobsen.weblogs.fm/" rel="nofollow">http://bassjobsen.weblogs.fm/</a>), program LBS for mobile devices (<a href="http://www.gizzing.nl" rel="nofollow">http://www.gizzing.nl</a>), make cool websites (such as <a href="http://www.streetart.nl/" rel="nofollow">http://www.streetart.nl/</a>), and counsel in setting up the technical environments and requirements.</p>\n\n<p>You can also check out my <a href="http://jbst.eu/" rel="nofollow">Bootstrap WordPress Starters Theme (JBST)</a> and other projects at GitHub at <a href="https://github.com/bassjobsen" rel="nofollow">https://github.com/bassjobsen</a>.</p>\n\n<p>Also try:\n<a href="http://twitterbootstrap3buttons.w3masters.nl/" rel="nofollow">http://twitterbootstrap3buttons.w3masters.nl/</a> and\n<a href="http://twitterbootstrap3navbars.w3masters.nl/" rel="nofollow">http://twitterbootstrap3navbars.w3masters.nl/</a></p>\n\n<ul>\n<li>Twitter: @bassjobsen </li>\n<li>Google+: <a href="http://google.com/+BassJobsen" rel="nofollow">http://google.com/+BassJobsen</a></li>\n</ul>\n', 'user_AccountId': 1746467.0, 'user_DisplayName': 'Bass Jobsen', 'user_Reputation': 48538.0, 'user_Views': 3549.0, 'user_id': 1596547.0}}