Stellar Lumens StellarRed SDK Horizon

Connects with Stellar Horizon API to interact with the blockchain

Currently on Testnet

This flow builds a UI that can:

Generate keypairs

Check Balances

Notify after receiving a payment (some bugs still)

Send XLM or tokens

Make a trade offer

Add trustline

Generate a new token

Check Kraken Prices

  • UPDATED 4-28-21 -

Create NFTs

If you are already familiar with NodeRed all you need to do to make this flow work is add the following two lines to the functionGlobalContext of your settings.js file, typically located in /home/pi/.node-red

stellarsdk:require(“stellar-sdk”),

nodefetch:require(“node-fetch”)

https://blockshangerous.com/2021/03/23/getting-started-with-stellarred/

[{"id":"e1a3be1e.3571d","type":"tab","label":"Testnet Wallet","disabled":false,"info":""},{"id":"b89318e8.fe7498","type":"function","z":"e1a3be1e.3571d","name":"Check Balances Example","func":"const fetch = global.get(\"nodefetch\");\n\nvar StellarSdk = global.get(\"stellarsdk\");\n// create a completely new and unique pair of keys\n// see more about KeyPair objects: https://stellar.github.io/js-stellar-sdk/Keypair.html\nconst pair = StellarSdk.Keypair.random();\n\n//console.log(pair.secret());\nmsg.payload = \"Pair secret: \" + pair.secret()\nnode.send(msg)\n// SAV76USXIJOBMEQXPANUOQM6F5LIOTLPDIDVRJBFFE2MDJXG24TAPUU7\n//console.log(pair.publicKey());\nmsg.payload = \"Pair publickey: \" + pair.publicKey()\nnode.send(msg)\n// GCFXHS4GXL6BVUCXBWXGTITROWLVYXQKQLF4YH5O5JT3YZXCYPAFBJZB\nasync function main() {\n  try {\n    const response = await fetch(\n      `https://friendbot.stellar.org?addr=${encodeURIComponent(\n        pair.publicKey(),\n      )}`,\n    );\n    const responseJSON = await response.json();\n    console.log(\"SUCCESS! You have a new account :)\\n\", responseJSON);\n  } catch (e) {\n    console.log(\"ERROR!\", e);\n  }\n\nconst server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\n// the JS SDK uses promises for most actions, such as retrieving an account\nconst account = await server.loadAccount(pair.publicKey());\n//console.log(\"Balances for account: \" + pair.publicKey());\nmsg.payload = \"Balances for account: \" + pair.publicKey()\nnode.send(msg)\naccount.balances.forEach(function (balance) {\n  //console.log(\"Type:\", balance.asset_type, \", Balance:\", balance.balance);\n  msg.payload = \"Type:\"+ balance.asset_type+\", Balance:\"+balance.balance\n  node.send(msg)\n});\n\n}\nmain()","outputs":1,"noerr":0,"initialize":"","finalize":"","x":530,"y":340,"wires":[["af22515e.f86d9","da4a3f54.f4e15"]]},{"id":"b8e28e57.e51c9","type":"inject","z":"e1a3be1e.3571d","name":"","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":290,"y":340,"wires":[["b89318e8.fe7498"]]},{"id":"af22515e.f86d9","type":"debug","z":"e1a3be1e.3571d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":820,"y":344,"wires":[]},{"id":"3a89629.ccdd39e","type":"comment","z":"e1a3be1e.3571d","name":"Getting Acount data","info":"we are getting below data in this node\n1. Pair secret\n2. Pair publickey\n3. Acount ID\n4. Type and Balance\n","x":510,"y":300,"wires":[]},{"id":"a3c0ca1e.f0f588","type":"function","z":"e1a3be1e.3571d","name":"Submit Transaction Example","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar sourceKeys = StellarSdk.Keypair.fromSecret(\n  msg.payload.sourceKeys,\n);\nvar destinationId = msg.payload.destinationId;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  .loadAccount(destinationId)\n  // If the account is not found, surface a nicer error message for logging.\n  .catch(function (error) {\n    if (error instanceof StellarSdk.NotFoundError) {\n      throw new Error(\"The destination account does not exist!\");\n    } else return error;\n  })\n  // If there was no error, load up-to-date information on your account.\n  .then(function () {\n    return server.loadAccount(sourceKeys.publicKey());\n  })\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: destinationId,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          asset: StellarSdk.Asset.native(),\n          amount: \"10\",\n        }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text(\"Test Transaction\"))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    //console.log(\"Success! Results:\", result);\n    msg.payload=result;\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":640,"wires":[["22e0c241.59bd6e"]]},{"id":"a11e4603.4b7608","type":"inject","z":"e1a3be1e.3571d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"sourceKeys\":\"SBSZQMYX2EAT6MGDOAJ3OONFHT6TVVWLLAZEESRIQ7G3CYLHTCWTC3UX\",\"destinationId\":\"GD5LYKVQZYHDNJ3QTEDX3EBF5XK3W5NADGTBT5KLD276OPP7YKDIQIBZ\"}","payloadType":"json","x":290,"y":640,"wires":[["a3c0ca1e.f0f588"]]},{"id":"22e0c241.59bd6e","type":"debug","z":"e1a3be1e.3571d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":870,"y":640,"wires":[]},{"id":"4dadf59d.58b25c","type":"comment","z":"e1a3be1e.3571d","name":"Transactions","info":"","x":490,"y":600,"wires":[]},{"id":"bd5ddba4.6459b8","type":"function","z":"e1a3be1e.3571d","name":"Create Sell Offer Example","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(\n  msg.payload.secretKey,\n);\nvar destinationId = msg.payload.sourceAccount;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  .loadAccount(destinationId)\n  // If the account is not found, surface a nicer error message for logging.\n  .catch(function (error) {\n    if (error instanceof StellarSdk.NotFoundError) {\n      throw new Error(\"The destination account does not exist!\");\n    } else return error;\n  })\n  // If there was no error, load up-to-date information on your account.\n  .then(function () {\n    return server.loadAccount(sourceKeys.publicKey());\n  })\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.manageSellOffer({\n            selling: new StellarSdk.Asset(msg.payload.assetToBuy, 'GD5LYKVQZYHDNJ3QTEDX3EBF5XK3W5NADGTBT5KLD276OPP7YKDIQIBZ'),\n            buying: new StellarSdk.Asset(msg.payload.assetToSell, 'GD5LYKVQZYHDNJ3QTEDX3EBF5XK3W5NADGTBT5KLD276OPP7YKDIQIBZ'),\n            amount: msg.payload.amount,\n            price: msg.payload.price\n     }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text(\"Test Transaction\"))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    //console.log(\"Success! Results:\", result);\n    msg.payload = result;\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":470,"y":1040,"wires":[["97321eb4.c24ae"]]},{"id":"70431d01.f653b4","type":"inject","z":"e1a3be1e.3571d","name":"","props":[{"p":"payload","v":"{\"secretKey\":\"SBSZQMYX2EAT6MGDOAJ3OONFHT6TVVWLLAZEESRIQ7G3CYLHTCWTC3UX\",\"sourceAccount\":\"GD5LYKVQZYHDNJ3QTEDX3EBF5XK3W5NADGTBT5KLD276OPP7YKDIQIBZ\",\"assetToSell\":\"XLM\",\"assetToBuy\":\"XCN\",\"amount\":\"0.1\",\"price\":\"2.5\"}","vt":"json"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"secretKey\":\"SBSZQMYX2EAT6MGDOAJ3OONFHT6TVVWLLAZEESRIQ7G3CYLHTCWTC3UX\",\"sourceAccount\":\"GD5LYKVQZYHDNJ3QTEDX3EBF5XK3W5NADGTBT5KLD276OPP7YKDIQIBZ\",\"assetToSell\":\"XLM\",\"assetToBuy\":\"XCN\",\"amount\":\"0.1\",\"price\":\"2.5\"}","payloadType":"json","x":240,"y":1040,"wires":[["bd5ddba4.6459b8"]]},{"id":"97321eb4.c24ae","type":"debug","z":"e1a3be1e.3571d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":1040,"wires":[]},{"id":"e71f8c00.f6d8c","type":"comment","z":"e1a3be1e.3571d","name":"Create offer","info":"","x":420,"y":1000,"wires":[]},{"id":"da4a3f54.f4e15","type":"ui_text","z":"e1a3be1e.3571d","group":"1f563092.450a6f","order":4,"width":0,"height":0,"name":"balances result","label":"","format":"{{msg.payload}}","layout":"row-spread","x":970,"y":504,"wires":[]},{"id":"d502f1d0.d9b54","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Public Key","label":"Public Key","tooltip":"","group":"1f563092.450a6f","order":1,"width":"0","height":"0","passthru":true,"mode":"text","delay":"0","topic":"","x":300,"y":464,"wires":[["db84dba9.bca098"]]},{"id":"db84dba9.bca098","type":"function","z":"e1a3be1e.3571d","name":"Check Balances","func":"const fetch = global.get(\"nodefetch\");\n\nvar StellarSdk = global.get(\"stellarsdk\");\n// create a completely new and unique pair of keys\n// see more about KeyPair objects: https://stellar.github.io/js-stellar-sdk/Keypair.html\nconst key = msg.payload;\n\n\nconst server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\n// the JS SDK uses promises for most actions, such as retrieving an account\nconst account = await server.loadAccount(key);\n//console.log(\"Balances for account: \" + pair.publicKey());\nmsg.topic = \"Balances for account: \" + key\n\nvar bals = \"\";\n\naccount.balances.forEach(function (balance) {\n  console.log(\"Type:\", balance.asset_type, \", Balance:\", balance.balance);\n  msg.payload = \"Type: \"+ balance.asset_code+\", Balance: \"+balance.balance+\" \\n \"\n  //node.send(msg)\n  bals = bals +\" \"+ msg.payload\n});\n\nmsg.payload = bals\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":510,"y":464,"wires":[["af22515e.f86d9","f8487bed.a46548","da4a3f54.f4e15"]]},{"id":"f8487bed.a46548","type":"ui_text","z":"e1a3be1e.3571d","group":"1f563092.450a6f","order":2,"width":0,"height":0,"name":"Balances header","label":"","format":"{{msg.topic}}","layout":"row-spread","x":980,"y":464,"wires":[]},{"id":"f4395daf.f79f","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Secret Key","label":"Secret Key","tooltip":"","group":"c3c52113.338a9","order":1,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1170,"y":660,"wires":[["8f06f558.bec918"]]},{"id":"612720db.4ada1","type":"ui_text","z":"e1a3be1e.3571d","group":"c3c52113.338a9","order":11,"width":0,"height":0,"name":"Success text display","label":"","format":"{{msg.payload}}","layout":"row-spread","x":960,"y":760,"wires":[]},{"id":"7c7247d3.5c6e18","type":"ui_text","z":"e1a3be1e.3571d","group":"c3c52113.338a9","order":10,"width":0,"height":0,"name":"Submitting text display","label":"","format":"{{msg.topic}}","layout":"row-spread","x":960,"y":700,"wires":[]},{"id":"53c77e9d.d066c","type":"function","z":"e1a3be1e.3571d","name":"Submit XLM Transaction","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar secret = flow.get('secret',secret);\nvar dest = flow.get('dest',dest);\nvar quantxlm = flow.get('quantxlm',quantxlm);\nvar asset = flow.get('asset',asset);\nvar assetiss = flow.get('assetiss',assetiss);\nvar memo = flow.get('memo',memo);\n\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secret);\nvar destinationId = dest;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  .loadAccount(destinationId)\n  // If the account is not found, surface a nicer error message for logging.\n  .catch(function (error) {\n    if (error instanceof StellarSdk.NotFoundError) {\n      throw new Error(\"The destination account does not exist!\");\n    } else return error;\n  })\n  // If there was no error, load up-to-date information on your account.\n  .then(function () {\n    return server.loadAccount(sourceKeys.publicKey());\n  })\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: destinationId,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          asset: StellarSdk.Asset.native(),\n          //asset: new StellarSdk.Asset(asset,assetiss),\n          amount: quantxlm,\n        }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text(memo))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":530,"y":760,"wires":[["612720db.4ada1","3d4c67b3.a92678","22e0c241.59bd6e"]]},{"id":"3dfa8625.6156ba","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Destination","label":"Destination","tooltip":"","group":"c3c52113.338a9","order":2,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1170,"y":700,"wires":[["92407a93.e8b6d8"]]},{"id":"1eda8ae2.afb005","type":"ui_button","z":"e1a3be1e.3571d","name":"SendXLM","group":"c3c52113.338a9","order":5,"width":"12","height":"1","passthru":false,"label":"Send XLM","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":260,"y":720,"wires":[["53c77e9d.d066c","556ecdd.dc6c434","e169c03a.d0b74"]]},{"id":"8f06f558.bec918","type":"function","z":"e1a3be1e.3571d","name":"secret","func":"var secret = msg.payload\nflow.set('secret',secret);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1410,"y":660,"wires":[[]]},{"id":"54fb998a.fa6258","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Amount","label":"Amount","tooltip":"","group":"c3c52113.338a9","order":8,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1160,"y":820,"wires":[["f966427f.c21df"]]},{"id":"92407a93.e8b6d8","type":"function","z":"e1a3be1e.3571d","name":"dest","func":"var dest = msg.payload\nflow.set('dest',dest);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1410,"y":700,"wires":[[]]},{"id":"f966427f.c21df","type":"function","z":"e1a3be1e.3571d","name":"quant","func":"var quant = msg.payload\nflow.set('quant',quant);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1410,"y":820,"wires":[[]]},{"id":"556ecdd.dc6c434","type":"change","z":"e1a3be1e.3571d","name":"Status Update","rules":[{"t":"set","p":"topic","pt":"msg","to":"Sending Transaction To Stellar","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":680,"wires":[["7c7247d3.5c6e18"]]},{"id":"e169c03a.d0b74","type":"change","z":"e1a3be1e.3571d","name":"Reset Field","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":720,"wires":[["612720db.4ada1"]]},{"id":"3d4c67b3.a92678","type":"change","z":"e1a3be1e.3571d","name":"Reset Field","rules":[{"t":"set","p":"topic","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":700,"wires":[["7c7247d3.5c6e18"]]},{"id":"2840c9e9.a1c026","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Secret Key","label":"Secret Key","tooltip":"","group":"ad15b2e3.60848","order":1,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1110,"y":1080,"wires":[["3898033b.99490c"]]},{"id":"aa46f17e.ea646","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Asset to sell - Name","label":"Asset to sell - Name","tooltip":"","group":"ad15b2e3.60848","order":2,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1140,"y":1120,"wires":[["927ca549.c33d18"]]},{"id":"5e865db9.a1c1a4","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Amount","label":"Amount","tooltip":"","group":"ad15b2e3.60848","order":4,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1100,"y":1200,"wires":[["f43002bd.b5b33"]]},{"id":"abbec0bf.506d5","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Price","label":"Price","tooltip":"","group":"ad15b2e3.60848","order":7,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1090,"y":1320,"wires":[["ffc80450.9992e8"]]},{"id":"e4e61f7.debe1e","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Asset to buy - Name","label":"Asset to buy - Name","tooltip":"","group":"ad15b2e3.60848","order":5,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1140,"y":1240,"wires":[["51ad1713.cc50f8"]]},{"id":"3898033b.99490c","type":"function","z":"e1a3be1e.3571d","name":"secret2","func":"var secret2 = msg.payload\nflow.set('secret2',secret2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1320,"y":1080,"wires":[[]]},{"id":"927ca549.c33d18","type":"function","z":"e1a3be1e.3571d","name":"sell","func":"var sell = msg.payload\nflow.set('sell',sell);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1310,"y":1120,"wires":[[]]},{"id":"f43002bd.b5b33","type":"function","z":"e1a3be1e.3571d","name":"quant2","func":"var quant2 = msg.payload\nflow.set('quant2',quant2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1310,"y":1200,"wires":[[]]},{"id":"7152c22e.cb5abc","type":"ui_text","z":"e1a3be1e.3571d","group":"ad15b2e3.60848","order":10,"width":0,"height":0,"name":"Success text display","label":"","format":"{{msg.payload}}","layout":"row-spread","x":880,"y":1200,"wires":[]},{"id":"c47bf282.6e658","type":"ui_text","z":"e1a3be1e.3571d","group":"ad15b2e3.60848","order":9,"width":0,"height":0,"name":"Submitting text display","label":"","format":"{{msg.topic}}","layout":"row-spread","x":880,"y":1120,"wires":[]},{"id":"93f4704e.26401","type":"ui_button","z":"e1a3be1e.3571d","name":"Submit Offer","group":"ad15b2e3.60848","order":8,"width":0,"height":0,"passthru":false,"label":"Submit Offer","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","topicType":"str","x":150,"y":1160,"wires":[["2d7986f6.bee62a","5e0a51c1.b1e61","526f7526.dc05cc"]]},{"id":"2d7986f6.bee62a","type":"change","z":"e1a3be1e.3571d","name":"Status Update","rules":[{"t":"set","p":"topic","pt":"msg","to":"Sending Transaction To Stellar","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":1120,"wires":[["c47bf282.6e658"]]},{"id":"5e0a51c1.b1e61","type":"change","z":"e1a3be1e.3571d","name":"Reset Field","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":1160,"wires":[["7152c22e.cb5abc"]]},{"id":"8629d5eb.2e4d08","type":"change","z":"e1a3be1e.3571d","name":"Reset Field","rules":[{"t":"set","p":"topic","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":1140,"wires":[["c47bf282.6e658"]]},{"id":"51ad1713.cc50f8","type":"function","z":"e1a3be1e.3571d","name":"buy","func":"var buy = msg.payload\nflow.set('buy',buy);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1310,"y":1240,"wires":[[]]},{"id":"ffc80450.9992e8","type":"function","z":"e1a3be1e.3571d","name":"price2","func":"var price2 = msg.payload\nflow.set('price2',price2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1310,"y":1320,"wires":[[]]},{"id":"2d7d4507.02854a","type":"function","z":"e1a3be1e.3571d","name":"Create Sell Offer","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\n\nvar secret2 = flow.get('secret2',secret2);\nvar sell = flow.get('sell',sell);\nvar selliss = flow.get('selliss',selliss);\nvar quant2 = flow.get('quant2',quant2);\nvar buy = flow.get('buy',buy);\nvar buyiss = flow.get('buyiss',buyiss);\nvar price2 = flow.get('price2',price2);\nvar memo = flow.get('memo',memo)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(\n  secret2,\n);\n//var destinationId = msg.payload.sourceAccount;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  //.loadAccount(destinationId)\n  // If the account is not found, surface a nicer error message for logging.\n  //.catch(function (error) {\n   // if (error instanceof StellarSdk.NotFoundError) {\n  //    throw new Error(\"The destination account does not exist!\");\n  //  } else return error;\n // })\n  // If there was no error, load up-to-date information on your account.\n  .loadAccount(sourceKeys.publicKey())\n  \n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.manageSellOffer({\n            selling: new StellarSdk.Asset(sell,selliss),\n            buying: new StellarSdk.Asset(buy,buyiss),\n            amount: quant2,\n            price: price2\n     }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text(memo))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    //console.log(\"Success! Results:\", result);\n    msg.payload = \"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":450,"y":1200,"wires":[["8629d5eb.2e4d08","7152c22e.cb5abc","97321eb4.c24ae"]]},{"id":"76d3ad49.5636e4","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Asset to sell - Issuer","label":"Asset to sell - Issuer","tooltip":"","group":"ad15b2e3.60848","order":3,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1140,"y":1160,"wires":[["cbf65520.e52ae8"]]},{"id":"cbf65520.e52ae8","type":"function","z":"e1a3be1e.3571d","name":"selliss","func":"var selliss = msg.payload\nflow.set('selliss',selliss);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1310,"y":1160,"wires":[[]]},{"id":"74c60b94.5294a4","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Asset to buy - Issuer","label":"Asset to buy - Issuer","tooltip":"","group":"ad15b2e3.60848","order":6,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1140,"y":1280,"wires":[["aa44702b.3e9dc"]]},{"id":"aa44702b.3e9dc","type":"function","z":"e1a3be1e.3571d","name":"buyiss","func":"var buyiss = msg.payload\nflow.set('buyiss',buyiss);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1310,"y":1280,"wires":[[]]},{"id":"c072723e.205b6","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Asset","label":"Asset","tooltip":"","group":"c3c52113.338a9","order":6,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1150,"y":740,"wires":[["9c0857b6.dbadb8"]]},{"id":"aff7e18b.d3b58","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Issuer","label":"Issuer","tooltip":"","group":"c3c52113.338a9","order":7,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1150,"y":780,"wires":[["cf2df40c.68c5e8"]]},{"id":"9c0857b6.dbadb8","type":"function","z":"e1a3be1e.3571d","name":"asset","func":"var asset = msg.payload\nflow.set('asset',asset);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1410,"y":740,"wires":[[]]},{"id":"cf2df40c.68c5e8","type":"function","z":"e1a3be1e.3571d","name":"assetiss","func":"var assetiss = msg.payload\nflow.set('assetiss',assetiss);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1420,"y":780,"wires":[[]]},{"id":"934d0b5.19807f8","type":"ui_text_input","z":"e1a3be1e.3571d","name":"AmountXLM","label":"AmountXLM","tooltip":"","group":"c3c52113.338a9","order":4,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1170,"y":860,"wires":[["66fb5342.5d2e8c"]]},{"id":"66fb5342.5d2e8c","type":"function","z":"e1a3be1e.3571d","name":"quantxlm","func":"var quantxlm = msg.payload\nflow.set('quantxlm',quantxlm);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1420,"y":860,"wires":[[]]},{"id":"272d2dc.785acd2","type":"function","z":"e1a3be1e.3571d","name":"Submit Token Transaction","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar secret = flow.get('secret',secret);\nvar dest = flow.get('dest',dest);\nvar quant = flow.get('quant',quant);\nvar asset = flow.get('asset',asset);\nvar assetiss = flow.get('assetiss',assetiss);\nvar memo = flow.get('memo',memo);\n\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secret);\nvar destinationId = dest;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  .loadAccount(destinationId)\n  // If the account is not found, surface a nicer error message for logging.\n  .catch(function (error) {\n    if (error instanceof StellarSdk.NotFoundError) {\n      throw new Error(\"The destination account does not exist!\");\n    } else return error;\n  })\n  // If there was no error, load up-to-date information on your account.\n  .then(function () {\n    return server.loadAccount(sourceKeys.publicKey());\n  })\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: destinationId,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          //asset: StellarSdk.Asset.native(),\n          asset: new StellarSdk.Asset(asset,assetiss),\n          amount: quant,\n        }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text(memo))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":530,"y":820,"wires":[["612720db.4ada1","3d4c67b3.a92678","22e0c241.59bd6e"]]},{"id":"6ad7ac1d.5167d4","type":"ui_button","z":"e1a3be1e.3571d","name":"Send Token","group":"c3c52113.338a9","order":9,"width":"12","height":"1","passthru":false,"label":"Send Token","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":270,"y":820,"wires":[["272d2dc.785acd2","556ecdd.dc6c434","e169c03a.d0b74"]]},{"id":"9d11e5eb.cc4cd8","type":"comment","z":"e1a3be1e.3571d","name":"Stellar Testnet Nodes UI","info":"","x":710,"y":40,"wires":[]},{"id":"92c8f2ca.8ab9","type":"debug","z":"e1a3be1e.3571d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":710,"y":1420,"wires":[]},{"id":"b0981b7e.d17f08","type":"function","z":"e1a3be1e.3571d","name":"return keypair","func":"const fetch = global.get(\"nodefetch\");\n\nvar StellarSdk = global.get(\"stellarsdk\");\n// create a completely new and unique pair of keys\n// see more about KeyPair objects: https://stellar.github.io/js-stellar-sdk/Keypair.html\nconst pair = StellarSdk.Keypair.random();\n\n//console.log(pair.secret());\nmsg.payload = \"Pair secret: \" + pair.secret()\nnode.send(msg)\n// SAV76USXIJOBMEQXPANUOQM6F5LIOTLPDIDVRJBFFE2MDJXG24TAPUU7\n//console.log(pair.publicKey());\nmsg.payload = \"Pair publickey: \" + pair.publicKey()\nnode.send(msg)\n// GCFXHS4GXL6BVUCXBWXGTITROWLVYXQKQLF4YH5O5JT3YZXCYPAFBJZB\nasync function main() {\n  try {\n    const response = await fetch(\n      `https://friendbot.stellar.org?addr=${encodeURIComponent(\n        pair.publicKey(),\n      )}`,\n    );\n    const responseJSON = await response.json();\n    console.log(\"SUCCESS! You have a new account :)\\n\", responseJSON);\n  } catch (e) {\n    console.log(\"ERROR!\", e);\n  }\n\n\n}\nmain()\n\nmsg.payload=pair.secret();\n\nmsg.topic=pair.publicKey();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":410,"y":1440,"wires":[["92c8f2ca.8ab9","34ac11cd.c3526e","ecfb7374.44af1","1ad19401.84821c","83bb5b0f.152ab8"]]},{"id":"624f9c80.dc78c4","type":"ui_button","z":"e1a3be1e.3571d","name":"","group":"a947341d.96f6c8","order":3,"width":0,"height":0,"passthru":false,"label":"generate keypair","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":220,"y":1440,"wires":[["b0981b7e.d17f08"]]},{"id":"34ac11cd.c3526e","type":"ui_text","z":"e1a3be1e.3571d","group":"a947341d.96f6c8","order":1,"width":0,"height":0,"name":"Public","label":"Public","format":"{{msg.topic}}","layout":"col-center","x":710,"y":1460,"wires":[]},{"id":"ecfb7374.44af1","type":"ui_text","z":"e1a3be1e.3571d","group":"a947341d.96f6c8","order":2,"width":0,"height":0,"name":"Secret","label":"Secret","format":"{{msg.payload}}","layout":"col-center","x":710,"y":1500,"wires":[]},{"id":"b647e0dc.6b95","type":"comment","z":"e1a3be1e.3571d","name":"Generate Keypair","info":"","x":400,"y":1380,"wires":[]},{"id":"d962cf07.e380e","type":"comment","z":"e1a3be1e.3571d","name":"Store Variables from Dashboard UI","info":"","x":1300,"y":620,"wires":[]},{"id":"9dd241e6.50e0f","type":"comment","z":"e1a3be1e.3571d","name":"Store Variables from Dashboard UI","info":"","x":1200,"y":1040,"wires":[]},{"id":"99256bbb.9268d8","type":"ui_text","z":"e1a3be1e.3571d","group":"a947341d.96f6c8","order":4,"width":0,"height":0,"name":"Success text display","label":"","format":"{{msg.payload}}","layout":"row-spread","x":760,"y":1540,"wires":[]},{"id":"83bb5b0f.152ab8","type":"change","z":"e1a3be1e.3571d","name":"Status Update","rules":[{"t":"set","p":"payload","pt":"msg","to":"Success! Account funded by friendbot (can take up to 30s to show up)","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":1540,"wires":[["99256bbb.9268d8"]]},{"id":"1ad19401.84821c","type":"function","z":"e1a3be1e.3571d","name":"Show link","func":"msg.payload=\"https://stellar.expert/explorer/testnet/account/\"+msg.topic;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":1580,"wires":[["d275c496.6c1888"]]},{"id":"d275c496.6c1888","type":"ui_text","z":"e1a3be1e.3571d","group":"a947341d.96f6c8","order":5,"width":0,"height":0,"name":"Link text display","label":"","format":"{{msg.payload}}","layout":"row-spread","x":740,"y":1580,"wires":[]},{"id":"85865e9a.bf4e7","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Memo","label":"Memo","tooltip":"","group":"c3c52113.338a9","order":3,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1150,"y":900,"wires":[["6c85e277.80215c"]]},{"id":"6c85e277.80215c","type":"function","z":"e1a3be1e.3571d","name":"memo","func":"var memo = msg.payload\nflow.set('memo',memo);\nreturn msg;","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is deployed.\nvar memo = \"Via BlockShangerous NodeRed\"\nflow.set('memo',memo);","finalize":"","x":1410,"y":900,"wires":[[]]},{"id":"39c5a94b.239ff6","type":"debug","z":"e1a3be1e.3571d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":1780,"wires":[]},{"id":"7117e897.ba00a8","type":"function","z":"e1a3be1e.3571d","name":"add trust","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar secret = flow.get('secret',secret);\nvar asset = flow.get('asset',asset);\nvar assetiss = flow.get('assetiss',assetiss);\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secret);\n//var destinationId = recipient;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.changeTrust({\n          //destination: destinationId,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          //asset: StellarSdk.Asset.native(),\n          asset: new StellarSdk.Asset(asset,assetiss),\n          //amount: amount,\n        }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text('Trust in StellarRed'))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":360,"y":1780,"wires":[["39c5a94b.239ff6","9628b69f.1117b8"]]},{"id":"5878cc21.fcda44","type":"inject","z":"e1a3be1e.3571d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"SDVO2J7XOJYWWYC3XCTKW26S7XVO5BMYKRQSOV43USOKM33TWG4ATAOP","payloadType":"str","x":180,"y":1780,"wires":[["7117e897.ba00a8"]]},{"id":"fcb8c9ab.b33aa8","type":"comment","z":"e1a3be1e.3571d","name":"Add Trustline","info":"","x":330,"y":1720,"wires":[]},{"id":"d7178576.80ea38","type":"debug","z":"e1a3be1e.3571d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":2060,"wires":[]},{"id":"3fe7ed32.0807f2","type":"function","z":"e1a3be1e.3571d","name":"return public from secret","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar secret = msg.payload;\n\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secret);\nmsg.payload=sourceKeys.publicKey()\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","x":390,"y":2060,"wires":[["d7178576.80ea38","483638e4.a24a98"]]},{"id":"b6d5dabc.94b738","type":"inject","z":"e1a3be1e.3571d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"SATY6XOPDHWSMPTYICPDKQEEHNRSDFLM472AKDYYIBJVZFLSYHKHSY7F","payloadType":"str","x":160,"y":2060,"wires":[["3fe7ed32.0807f2"]]},{"id":"311db771.2e6ad8","type":"comment","z":"e1a3be1e.3571d","name":"Get Public","info":"","x":300,"y":2000,"wires":[]},{"id":"8ded31f.251b9d","type":"ui_button","z":"e1a3be1e.3571d","name":"Get Public","group":"c3c52113.338a9","order":16,"width":"12","height":"1","passthru":false,"label":"Get Public","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","topicType":"str","x":170,"y":2120,"wires":[["dcdb9738.89dda8"]]},{"id":"483638e4.a24a98","type":"ui_text","z":"e1a3be1e.3571d","group":"c3c52113.338a9","order":17,"width":0,"height":0,"name":"Success text display","label":"","format":"{{msg.payload}}","layout":"row-spread","x":660,"y":2120,"wires":[]},{"id":"dcdb9738.89dda8","type":"ui_text_input","z":"e1a3be1e.3571d","name":"Secret Key","label":"Secret Key","tooltip":"","group":"c3c52113.338a9","order":15,"width":"0","height":"0","passthru":false,"mode":"text","delay":"300","topic":"","topicType":"str","x":330,"y":2180,"wires":[["3fe7ed32.0807f2"]]},{"id":"5a0ed23.947082c","type":"ui_button","z":"e1a3be1e.3571d","name":"Add Trust","group":"c3c52113.338a9","order":12,"width":"12","height":"1","passthru":false,"label":"Add Trust","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":160,"y":1840,"wires":[["7117e897.ba00a8","afd70817.be9848"]]},{"id":"9628b69f.1117b8","type":"ui_text","z":"e1a3be1e.3571d","group":"c3c52113.338a9","order":13,"width":0,"height":0,"name":"Success text display","label":"","format":"{{msg.payload}}","layout":"row-spread","x":660,"y":1840,"wires":[]},{"id":"afd70817.be9848","type":"change","z":"e1a3be1e.3571d","name":"Status Update","rules":[{"t":"set","p":"payload","pt":"msg","to":"Sending Transaction To Stellar","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":1840,"wires":[["9628b69f.1117b8"]]},{"id":"746f6a90.d62e74","type":"comment","z":"e1a3be1e.3571d","name":"THIS IS AN EXPERIMENTAL BETA. IF YOU CHOOSE TO USE IT ON MAINNET YOU DO SO AT YOUR OWN RISK. \\n BE CAREFUL. \\n THIS IS NOT READY FOR MAINNET DEPLOYMENT. YOU'VE BEEN WARNED. \\n There is currently no methodology for handling errors from the Stellar network. \\n If you cannot figure out why something isn't working I recommend exporting the tx as an XDR and inputting that in the Stellar Laboratory","info":"","x":770,"y":140,"wires":[]},{"id":"27169a60.95b296","type":"function","z":"e1a3be1e.3571d","name":"Create Sell Offer","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\n\nvar secret2 = flow.get('secret2',secret2);\nvar sell = flow.get('sell',sell);\nvar selliss = flow.get('selliss',selliss);\nvar quant2 = flow.get('quant2',quant2);\nvar buy = flow.get('buy',buy);\nvar buyiss = flow.get('buyiss',buyiss);\nvar price2 = flow.get('price2',price2);\nvar memo = flow.get('memo',memo)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(\n  secret2,\n);\n//var destinationId = msg.payload.sourceAccount;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  //.loadAccount(destinationId)\n  // If the account is not found, surface a nicer error message for logging.\n  //.catch(function (error) {\n   // if (error instanceof StellarSdk.NotFoundError) {\n  //    throw new Error(\"The destination account does not exist!\");\n  //  } else return error;\n // })\n  // If there was no error, load up-to-date information on your account.\n  .loadAccount(sourceKeys.publicKey())\n  \n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.manageSellOffer({\n            selling: new StellarSdk.Asset.native(),\n            buying: new StellarSdk.Asset(buy,buyiss),\n            amount: quant2,\n            price: price2\n     }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text(memo))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    //console.log(\"Success! Results:\", result);\n    msg.payload = \"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":450,"y":1240,"wires":[["7152c22e.cb5abc","97321eb4.c24ae","8629d5eb.2e4d08"]]},{"id":"45f65ad4.bc2c34","type":"function","z":"e1a3be1e.3571d","name":"Create Sell Offer","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\n\nvar secret2 = flow.get('secret2',secret2);\nvar sell = flow.get('sell',sell);\nvar selliss = flow.get('selliss',selliss);\nvar quant2 = flow.get('quant2',quant2);\nvar buy = flow.get('buy',buy);\nvar buyiss = flow.get('buyiss',buyiss);\nvar price2 = flow.get('price2',price2);\nvar memo = flow.get('memo',memo)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(\n  secret2,\n);\n//var destinationId = msg.payload.sourceAccount;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  //.loadAccount(destinationId)\n  // If the account is not found, surface a nicer error message for logging.\n  //.catch(function (error) {\n   // if (error instanceof StellarSdk.NotFoundError) {\n  //    throw new Error(\"The destination account does not exist!\");\n  //  } else return error;\n // })\n  // If there was no error, load up-to-date information on your account.\n  .loadAccount(sourceKeys.publicKey())\n  \n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.manageSellOffer({\n            selling: new StellarSdk.Asset(sell,selliss),\n            buying: new StellarSdk.Asset.native(),\n            amount: quant2,\n            price: price2\n     }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text(memo))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    //console.log(\"Success! Results:\", result);\n    msg.payload = \"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":450,"y":1280,"wires":[["7152c22e.cb5abc","97321eb4.c24ae","8629d5eb.2e4d08"]]},{"id":"526f7526.dc05cc","type":"switch","z":"e1a3be1e.3571d","name":"sell check","property":"sell","propertyType":"flow","rules":[{"t":"neq","v":"XLM","vt":"str"},{"t":"eq","v":"XLM","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":120,"y":1260,"wires":[["3c738c9e.e8b194"],["27169a60.95b296"]]},{"id":"3c738c9e.e8b194","type":"switch","z":"e1a3be1e.3571d","name":"buy check","property":"buy","propertyType":"flow","rules":[{"t":"neq","v":"XLM","vt":"str"},{"t":"eq","v":"XLM","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":260,"y":1300,"wires":[["2d7d4507.02854a"],["45f65ad4.bc2c34"]]},{"id":"85337a8b.77ec28","type":"tab","label":"Monitor Testnet","disabled":false,"info":""},{"id":"dcdb506b.d454e","type":"function","z":"85337a8b.77ec28","name":"Monitor Account Example","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar accountId = msg.payload.accountId;\n\n// Create an API call to query payments involving the account.\nvar payments = server.payments().forAccount(accountId);\n\n// If some payments have already been handled, start the results from the\n// last seen payment. (See below in `handlePayment` where it gets saved.)\nvar lastToken = loadLastPagingToken();\nif (lastToken) {\n  payments.cursor(lastToken);\n}\n\n// `stream` will send each recorded payment, one by one, then keep the\n// connection open and continue to send you new payments as they occur.\npayments.stream({\n  onmessage: function (payment) {\n    // Record the paging token so we can start from here next time.\n    savePagingToken(payment.paging_token);\n\n    // The payments stream includes both sent and received payments. We only\n    // want to process received payments here.\n    if (payment.to !== accountId) {\n      return;\n    }\n\n    // In Stellar’s API, Lumens are referred to as the “native” type. Other\n    // asset types have more detailed information.\n    var asset;\n    if (payment.asset_type === \"native\") {\n      asset = \"lumens\";\n    } else {\n      asset = payment.asset_code + \":\" + payment.asset_issuer;\n    }\n    //console.log(payment.amount + \" \" + asset + \" from \" + payment.from);\n    msg.payload={\"amount\":payment.amount,\"asset\":asset,\"payment.from\":payment.from}\n    node.send(msg)\n  },\n\n  onerror: function (error) {\n    console.error(\"Error in payment stream\");\n  },\n});\n\nfunction savePagingToken(token) {\n  // In most cases, you should save this to a local database or file so that\n  // you can load it next time you stream new payments.\n}\n\nfunction loadLastPagingToken() {\n  // Get the last paging token from a local database or file\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":410,"y":200,"wires":[[]]},{"id":"c85b0af0.4366d8","type":"inject","z":"85337a8b.77ec28","name":"","props":[{"p":"payload","v":"{\"accountId\":\"GD5LYKVQZYHDNJ3QTEDX3EBF5XK3W5NADGTBT5KLD276OPP7YKDIQIBZ\"}","vt":"json"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"accountId\":\"GD5LYKVQZYHDNJ3QTEDX3EBF5XK3W5NADGTBT5KLD276OPP7YKDIQIBZ\"}","payloadType":"json","x":180,"y":200,"wires":[["dcdb506b.d454e"]]},{"id":"8baef33e.d198b","type":"comment","z":"85337a8b.77ec28","name":"Received payment","info":"","x":380,"y":160,"wires":[]},{"id":"2078c0c7.f9b8e","type":"ui_text","z":"85337a8b.77ec28","group":"1f563092.450a6f","order":7,"width":0,"height":0,"name":"Payment Received","label":"Payment Received","format":"{{msg.payload}}","layout":"row-spread","x":670,"y":240,"wires":[]},{"id":"6492839f.25387c","type":"function","z":"85337a8b.77ec28","name":"Monitor Account","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar accountId = msg.payload;\nflow.set('accountId',accountId);\n\n\n// Create an API call to query payments involving the account.\nvar payments = server.payments().forAccount(accountId);\n\n// If some payments have already been handled, start the results from the\n// last seen payment. (See below in `handlePayment` where it gets saved.)\nvar lastToken = loadLastPagingToken();\nif (lastToken) {\n  payments.cursor(lastToken);\n}\n\n// `stream` will send each recorded payment, one by one, then keep the\n// connection open and continue to send you new payments as they occur.\npayments.stream({\n  onmessage: function (payment) {\n    // Record the paging token so we can start from here next time.\n    savePagingToken(payment.paging_token);\n\n    // The payments stream includes both sent and received payments. We only\n    // want to process received payments here.\n    if (payment.to !== accountId) {\n      return;\n    }\n\n    // In Stellar’s API, Lumens are referred to as the “native” type. Other\n    // asset types have more detailed information.\n    var asset;\n    if (payment.asset_type === \"native\") {\n      asset = \"lumens\";\n    } else {\n      asset = payment.asset_code;\n    }\n    console.log(payment.amount + \" \" + asset + \" from \" + payment.from);\n    msg.payload=\"amount: \"+payment.amount+\" asset: \"+asset+\" payment from: \"+payment.from\n    node.send(msg)\n  },\n\n  onerror: function (error) {\n    console.error(\"Error in payment stream\");\n  },\n});\n\nfunction savePagingToken(token) {\n  // In most cases, you should save this to a local database or file so that\n  // you can load it next time you stream new payments.\n  flow.set('lastToken',lastToken)\n}\n\nfunction loadLastPagingToken() {\n  // Get the last paging token from a local database or file\n  flow.get('lastToken',lastToken)\n}","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is deployed.\nvar lastToken\nflow.set('lastToken',lastToken)","finalize":"","x":380,"y":240,"wires":[["2078c0c7.f9b8e"]]},{"id":"fded4172.10534","type":"ui_text_input","z":"85337a8b.77ec28","name":"Public Key","label":"Public Key to Monitor","tooltip":"","group":"1f563092.450a6f","order":6,"width":"0","height":"0","passthru":true,"mode":"text","delay":"0","topic":"","x":170,"y":240,"wires":[["6492839f.25387c","de8a3890.0ce388"]]},{"id":"de8a3890.0ce388","type":"function","z":"85337a8b.77ec28","name":"Monitor Account","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar accountId = msg.payload;\nflow.set('accountId',accountId);\nvar sender = 0;\nvar type = 0;\nvar amount_rec = 0;\n\n    \n// Create an API call to query payments involving the account.\nvar payments = server.payments().forAccount(accountId);\n\n// If some payments have already been handled, start the results from the\n// last seen payment. (See below in `handlePayment` where it gets saved.)\nvar lastToken = loadLastPagingToken();\nif (lastToken) {\n  payments.cursor(lastToken);\n}\n\n// `stream` will send each recorded payment, one by one, then keep the\n// connection open and continue to send you new payments as they occur.\npayments.stream({\n  onmessage: function (payment) {\n    // Record the paging token so we can start from here next time.\n    savePagingToken(payment.paging_token);\n\n    // The payments stream includes both sent and received payments. We only\n    // want to process received payments here.\n    if (payment.to !== accountId) {\n      return;\n    }\n\n    // In Stellar’s API, Lumens are referred to as the “native” type. Other\n    // asset types have more detailed information.\n    var asset;\n    if (payment.asset_type === \"native\") {\n      asset = \"lumens\";\n    } else {\n      asset = payment.asset_code;\n    }\n    //console.log(payment.amount + \" \" + asset + \" from \" + payment.from);\n    msg.payload=\"amount: \"+payment.amount+\" asset: \"+asset+\" payment from: \"+payment.from\n    sender = payment.from;\n    type = asset;\n    amount_rec = payment.amount;\n    flow.set('sender',sender);\n    flow.set('type',type);\n    flow.set('amount_rec',amount_rec);\n    node.send(msg)\n    //node.send(msg.payload)\n  },\n\n\n\n  onerror: function (error) {\n    console.error(\"Error in payment stream\");\n  },\n});\n\nfunction savePagingToken(token) {\n  // In most cases, you should save this to a local database or file so that\n  // you can load it next time you stream new payments.\n}\n\nfunction loadLastPagingToken() {\n  // Get the last paging token from a local database or file\n}\n\n//return msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":390,"y":444,"wires":[["40262ecb.e69ff"]]},{"id":"fb3f67b0.b4e028","type":"ui_toast","z":"85337a8b.77ec28","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":1070,"y":500,"wires":[]},{"id":"40262ecb.e69ff","type":"switch","z":"85337a8b.77ec28","name":"","property":"type","propertyType":"flow","rules":[{"t":"eq","v":"TRRT","vt":"str"},{"t":"eq","v":"lumens","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":610,"y":460,"wires":[["aa2e4422.c47338","82cfc6e0.b58de8"],["5cda4d0e.738d14","f26b1e9a.f2607","9fac8537.31f928"]]},{"id":"aa2e4422.c47338","type":"debug","z":"85337a8b.77ec28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":970,"y":380,"wires":[]},{"id":"58fdd566.92976c","type":"comment","z":"85337a8b.77ec28","name":"Received payment response","info":"","x":660,"y":380,"wires":[]},{"id":"82cfc6e0.b58de8","type":"function","z":"85337a8b.77ec28","name":"","func":"var amount_rec = flow.get('amount_rec',amount_rec);\n\nmsg.payload = \"Thanks for the \"+amount_rec+\" TRRT!\"\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":840,"y":460,"wires":[["fb3f67b0.b4e028"]]},{"id":"5cda4d0e.738d14","type":"debug","z":"85337a8b.77ec28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1090,"y":560,"wires":[]},{"id":"c7b80c33.94197","type":"function","z":"85337a8b.77ec28","name":"","func":"var amount_rec = flow.get('amount_rec',amount_rec);\n\nmsg.payload = \"Returning your \"+amount_rec+\" XLM\"\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":780,"y":720,"wires":[["5cda4d0e.738d14","fb3f67b0.b4e028"]]},{"id":"2acbba72.0ed566","type":"inject","z":"85337a8b.77ec28","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"sourceKeys\":\"SBSZQMYX2EAT6MGDOAJ3OONFHT6TVVWLLAZEESRIQ7G3CYLHTCWTC3UX\",\"destinationId\":\"GD5LYKVQZYHDNJ3QTEDX3EBF5XK3W5NADGTBT5KLD276OPP7YKDIQIBZ\"}","payloadType":"json","x":490,"y":760,"wires":[["f6af4b2b.aeaf28"]]},{"id":"49b66fc9.50b7c","type":"debug","z":"85337a8b.77ec28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":760,"wires":[]},{"id":"f6af4b2b.aeaf28","type":"function","z":"85337a8b.77ec28","name":"Submit XLM Transaction","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar secret = \"SATY6XOPDHWSMPTYICPDKQEEHNRSDFLM472AKDYYIBJVZFLSYHKHSY7F\";\nvar sender=flow.get('sender',sender);\nvar dest = sender;\nvar amount_rec=flow.get('amount_rec',amount_rec);\nvar quantxlm = amount_rec;\n//var quantxlm = \"69\";\n//var asset = flow.get('asset',asset);\n//var assetiss = flow.get('assetiss',assetiss);\nvar memo = \"Autoreply from TRRTbot\";\n\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secret);\nvar destinationId = dest;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  .loadAccount(destinationId)\n  // If the account is not found, surface a nicer error message for logging.\n  .catch(function (error) {\n    if (error instanceof StellarSdk.NotFoundError) {\n      throw new Error(\"The destination account does not exist!\");\n    } else return error;\n  })\n  // If there was no error, load up-to-date information on your account.\n  .then(function () {\n    return server.loadAccount(sourceKeys.publicKey());\n  })\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: destinationId,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          asset: StellarSdk.Asset.native(),\n          //asset: new StellarSdk.Asset(asset,assetiss),\n          amount: quantxlm,\n        }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text(memo))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":730,"y":760,"wires":[["49b66fc9.50b7c"]]},{"id":"f26b1e9a.f2607","type":"function","z":"85337a8b.77ec28","name":"Submit Token Transaction","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar secret = \"SATY6XOPDHWSMPTYICPDKQEEHNRSDFLM472AKDYYIBJVZFLSYHKHSY7F\";\nvar sender=flow.get('sender',sender);\nvar dest = sender;\nvar amount_rec=flow.get('amount_rec',amount_rec);\nvar quant = amount_rec;\nvar memo = \"Autoreply from TRRTbot\";\nvar asset = \"TRRT\";\nvar assetiss = \"GD5AC55INRNAEJQ5WNDTEJBEAYJWE36WNDRDFGVZ4JUIO3I2U5BK3PZQ\";\n\n\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secret);\nvar destinationId = dest;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  .loadAccount(destinationId)\n  // If the account is not found, surface a nicer error message for logging.\n  .catch(function (error) {\n    if (error instanceof StellarSdk.NotFoundError) {\n      throw new Error(\"The destination account does not exist!\");\n    } else return error;\n  })\n  // If there was no error, load up-to-date information on your account.\n  .then(function () {\n    return server.loadAccount(sourceKeys.publicKey());\n  })\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: destinationId,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          //asset: StellarSdk.Asset.native(),\n          asset: new StellarSdk.Asset(asset,assetiss),\n          amount: quant,\n        }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text(memo))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":770,"y":640,"wires":[["fb3f67b0.b4e028","5cda4d0e.738d14"]]},{"id":"9fac8537.31f928","type":"function","z":"85337a8b.77ec28","name":"","func":"var amount_rec = flow.get('amount_rec',amount_rec);\n\nmsg.payload = \"Sending your \"+amount_rec+\" TRRT\"\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":820,"y":600,"wires":[["fb3f67b0.b4e028"]]},{"id":"347d0dd.fdb38f2","type":"inject","z":"85337a8b.77ec28","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":510,"y":640,"wires":[["f26b1e9a.f2607"]]},{"id":"873223c7.be785","type":"tab","label":"Prices","disabled":false,"info":""},{"id":"2bbf2098.ca1de","type":"group","z":"873223c7.be785","name":"Gui","style":{"fill":"#e3f3d3","label":true},"nodes":["c107c751.7d7688"],"x":654,"y":599,"w":152,"h":82},{"id":"e777ddcb.05936","type":"group","z":"873223c7.be785","name":"Gui","style":{"fill":"#e3f3d3","label":true},"nodes":["6f17882e.936e18","94ffa29c.f4091"],"x":54,"y":179,"w":732,"h":82},{"id":"71ebebaa.e58d04","type":"inject","z":"873223c7.be785","name":"Abfrage jede Stunde","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":100,"wires":[["a14b10f.8596bf"]]},{"id":"a14b10f.8596bf","type":"http request","z":"873223c7.be785","name":"Bitcoin","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.kraken.com/0/public/Ticker?pair=BTCUSD","tls":"","persist":false,"proxy":"","authType":"","x":340,"y":100,"wires":[["ff9ea3b2.f342"]]},{"id":"18a10ec7.a43221","type":"debug","z":"873223c7.be785","name":"Konsole","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":740,"y":100,"wires":[]},{"id":"3e46ce5a.a8aac2","type":"comment","z":"873223c7.be785","name":"Info zu JSON ","info":"JSON:\n      // Last ask price\n      ask: ticker.a[0],\n      // Last bid price\n      bid: ticker.b[0],\n      // Last trade closed\n      lastTrade: ticker.c[0],\n      // Volume traded in the last 24 houurs\n      volume: ticker.v[1],\n      // 24 hour low\n      low: ticker.l[1],\n      // 24 hour high\n      high: ticker.h[1],\n      // Open price\n      open: ticker.o","x":890,"y":240,"wires":[]},{"id":"ff9ea3b2.f342","type":"function","z":"873223c7.be785","name":"JSON to BTC in Euro","func":"msg.payload = msg.payload.result.XXBTZUSD.a[0]\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":100,"wires":[["18a10ec7.a43221","94ffa29c.f4091"]]},{"id":"36521fef.ddd38","type":"comment","z":"873223c7.be785","name":"(c) 2021 Thomas Wenzlaff   www.wenzlaff.info","info":"","x":630,"y":40,"wires":[]},{"id":"ece9544a.5e3098","type":"comment","z":"873223c7.be785","name":"Bitcoin Kurs Ticker","info":"","x":120,"y":40,"wires":[]},{"id":"94ffa29c.f4091","type":"ui_gauge","z":"873223c7.be785","g":"e777ddcb.05936","name":"Gauge","group":"62ad21f6.478228","order":0,"width":0,"height":0,"gtype":"gage","title":"Bitcoin Price USD","label":"USD","format":"{{value}}","min":"40000","max":"100000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":710,"y":220,"wires":[]},{"id":"6f17882e.936e18","type":"ui_button","z":"873223c7.be785","g":"e777ddcb.05936","name":"","group":"62ad21f6.478228","order":3,"width":0,"height":0,"passthru":false,"label":"Update","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":140,"y":220,"wires":[["a14b10f.8596bf","843545aa.216f98"]]},{"id":"3ff03788.f0d168","type":"inject","z":"873223c7.be785","name":"Abfrage jede Stunde","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":520,"wires":[["843545aa.216f98"]]},{"id":"843545aa.216f98","type":"http request","z":"873223c7.be785","name":"XLM","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.kraken.com/0/public/Ticker?pair=XLMUSD","tls":"","persist":false,"proxy":"","authType":"","x":360,"y":520,"wires":[["6b4241db.f052a"]]},{"id":"2da8d73.3c6a928","type":"debug","z":"873223c7.be785","name":"Konsole","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":760,"y":520,"wires":[]},{"id":"6b4241db.f052a","type":"function","z":"873223c7.be785","name":"JSON to BTC in Euro","func":"msg.payload = msg.payload.result.XXLMZUSD.a[0]\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":560,"y":520,"wires":[["2da8d73.3c6a928","c107c751.7d7688"]]},{"id":"c107c751.7d7688","type":"ui_gauge","z":"873223c7.be785","g":"2bbf2098.ca1de","name":"Gauge","group":"62ad21f6.478228","order":0,"width":0,"height":0,"gtype":"gage","title":"XLM Price USD","label":"USD","format":"{{value}}","min":".3","max":"1","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":730,"y":640,"wires":[]},{"id":"a6283819.35aec8","type":"ui_button","z":"873223c7.be785","name":"","group":"62ad21f6.478228","order":3,"width":0,"height":0,"passthru":false,"label":"Start","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":110,"y":320,"wires":[["7d3bf461.d15f0c","a14b10f.8596bf","843545aa.216f98"]]},{"id":"d792b5ca.faeda8","type":"ui_button","z":"873223c7.be785","name":"","group":"62ad21f6.478228","order":3,"width":0,"height":0,"passthru":false,"label":"Stop","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":110,"y":360,"wires":[["1c687fb8.b4edf"]]},{"id":"f727dc32.c7a5d","type":"switch","z":"873223c7.be785","name":"","property":"SS","propertyType":"flow","rules":[{"t":"eq","v":"1","vt":"str"}],"checkall":"false","repair":false,"outputs":1,"x":670,"y":340,"wires":[["7053cc22.909ae4"]]},{"id":"babb4334.61ba1","type":"function","z":"873223c7.be785","name":"","func":"var SS=msg.payload\nflow.set('SS',SS)\nreturn msg;","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is deployed.\nvar SS =0\nflow.set('SS',SS)","finalize":"","x":520,"y":340,"wires":[["f727dc32.c7a5d"]]},{"id":"7d3bf461.d15f0c","type":"change","z":"873223c7.be785","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":320,"wires":[["babb4334.61ba1"]]},{"id":"1c687fb8.b4edf","type":"change","z":"873223c7.be785","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":360,"wires":[["babb4334.61ba1"]]},{"id":"7053cc22.909ae4","type":"delay","z":"873223c7.be785","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":840,"y":340,"wires":[["a14b10f.8596bf","843545aa.216f98","f727dc32.c7a5d"]]},{"id":"421cf1f0.a26fc","type":"tab","label":"Alternate Horizon","disabled":false,"info":""},{"id":"64d3b09c.9e48","type":"debug","z":"421cf1f0.a26fc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":750,"y":280,"wires":[]},{"id":"7712449b.e5cc8c","type":"comment","z":"421cf1f0.a26fc","name":"Coinqvest Horizon Mainnet Instance","info":"","x":400,"y":260,"wires":[]},{"id":"b3d16940.6d5808","type":"ui_text_input","z":"421cf1f0.a26fc","name":"Secret Key","label":"Secret Key","tooltip":"","group":"d19bed92.49b26","order":3,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1050,"y":300,"wires":[["a5a499a5.e0f3c8"]]},{"id":"b62a3ce6.1cbca","type":"ui_text","z":"421cf1f0.a26fc","group":"d19bed92.49b26","order":11,"width":0,"height":0,"name":"Success text display","label":"","format":"{{msg.payload}}","layout":"row-spread","x":840,"y":400,"wires":[]},{"id":"2fcc6a55.3eadd6","type":"ui_text","z":"421cf1f0.a26fc","group":"d19bed92.49b26","order":10,"width":0,"height":0,"name":"Submitting text display","label":"","format":"{{msg.topic}}","layout":"row-spread","x":840,"y":340,"wires":[]},{"id":"1975cb02.0e2cc5","type":"function","z":"421cf1f0.a26fc","name":"Submit XLM Transaction","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon.stellar.coinqvest.com/\");\nvar secret = flow.get('secret',secret);\nvar dest = flow.get('dest',dest);\nvar quantxlm = flow.get('quantxlm',quantxlm);\nvar asset = flow.get('asset',asset);\nvar assetiss = flow.get('assetiss',assetiss);\nvar memo = flow.get('memo',memo);\n\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secret);\nvar destinationId = dest;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  .loadAccount(destinationId)\n  // If the account is not found, surface a nicer error message for logging.\n  .catch(function (error) {\n    if (error instanceof StellarSdk.NotFoundError) {\n      throw new Error(\"The destination account does not exist!\");\n    } else return error;\n  })\n  // If there was no error, load up-to-date information on your account.\n  .then(function () {\n    return server.loadAccount(sourceKeys.publicKey());\n  })\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.PUBLIC,\n    })\n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: destinationId,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          asset: StellarSdk.Asset.native(),\n          //asset: new StellarSdk.Asset(asset,assetiss),\n          amount: quantxlm,\n        }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text(memo))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":410,"y":400,"wires":[["b62a3ce6.1cbca","d7982d52.7bb3e","64d3b09c.9e48"]]},{"id":"4c966cf5.131784","type":"ui_text_input","z":"421cf1f0.a26fc","name":"Destination","label":"Destination","tooltip":"","group":"d19bed92.49b26","order":1,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1050,"y":340,"wires":[["699bde89.ccfb6"]]},{"id":"3bf182dc.e82e0e","type":"ui_button","z":"421cf1f0.a26fc","name":"SendXLM","group":"d19bed92.49b26","order":6,"width":"6","height":"1","passthru":false,"label":"Send XLM","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","topicType":"str","x":140,"y":360,"wires":[["1975cb02.0e2cc5","1b9b3379.9dddbd","652a8762.768eb8"]]},{"id":"a5a499a5.e0f3c8","type":"function","z":"421cf1f0.a26fc","name":"secret","func":"var secret = msg.payload\nflow.set('secret',secret);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1290,"y":300,"wires":[[]]},{"id":"88a41a2e.59f888","type":"ui_text_input","z":"421cf1f0.a26fc","name":"Amount","label":"Amount","tooltip":"","group":"d19bed92.49b26","order":7,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1040,"y":460,"wires":[["ce5c025e.f910f"]]},{"id":"699bde89.ccfb6","type":"function","z":"421cf1f0.a26fc","name":"dest","func":"var dest = msg.payload\nflow.set('dest',dest);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1290,"y":340,"wires":[[]]},{"id":"ce5c025e.f910f","type":"function","z":"421cf1f0.a26fc","name":"quant","func":"var quant = msg.payload\nflow.set('quant',quant);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1290,"y":460,"wires":[[]]},{"id":"1b9b3379.9dddbd","type":"change","z":"421cf1f0.a26fc","name":"Status Update","rules":[{"t":"set","p":"topic","pt":"msg","to":"Sending Transaction To Stellar","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":320,"wires":[["2fcc6a55.3eadd6"]]},{"id":"652a8762.768eb8","type":"change","z":"421cf1f0.a26fc","name":"Reset Field","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":360,"wires":[["b62a3ce6.1cbca"]]},{"id":"d7982d52.7bb3e","type":"change","z":"421cf1f0.a26fc","name":"Reset Field","rules":[{"t":"set","p":"topic","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":340,"wires":[["2fcc6a55.3eadd6"]]},{"id":"7ede5b99.5a7324","type":"ui_text_input","z":"421cf1f0.a26fc","name":"Asset","label":"Asset","tooltip":"","group":"d19bed92.49b26","order":5,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1030,"y":380,"wires":[["b4812685.a4f7a8"]]},{"id":"88f3ba43.e23ca8","type":"ui_text_input","z":"421cf1f0.a26fc","name":"Issuer","label":"Issuer","tooltip":"","group":"d19bed92.49b26","order":8,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1030,"y":420,"wires":[["58cd36ca.269af8"]]},{"id":"b4812685.a4f7a8","type":"function","z":"421cf1f0.a26fc","name":"asset","func":"var asset = msg.payload\nflow.set('asset',asset);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1290,"y":380,"wires":[[]]},{"id":"58cd36ca.269af8","type":"function","z":"421cf1f0.a26fc","name":"assetiss","func":"var assetiss = msg.payload\nflow.set('assetiss',assetiss);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1300,"y":420,"wires":[[]]},{"id":"29f97de.a543a82","type":"ui_text_input","z":"421cf1f0.a26fc","name":"AmountXLM","label":"AmountXLM","tooltip":"","group":"d19bed92.49b26","order":4,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1050,"y":500,"wires":[["436cb433.39035c"]]},{"id":"436cb433.39035c","type":"function","z":"421cf1f0.a26fc","name":"quantxlm","func":"var quantxlm = msg.payload\nflow.set('quantxlm',quantxlm);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1300,"y":500,"wires":[[]]},{"id":"86d19d8e.be6b7","type":"function","z":"421cf1f0.a26fc","name":"Submit Token Transaction","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar secret = flow.get('secret',secret);\nvar dest = flow.get('dest',dest);\nvar quant = flow.get('quant',quant);\nvar asset = flow.get('asset',asset);\nvar assetiss = flow.get('assetiss',assetiss);\nvar memo = flow.get('memo',memo);\n\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secret);\nvar destinationId = dest;\n// Transaction will hold a built transaction we can resubmit if the result is unknown.\nvar transaction;\n\n// First, check to make sure that the destination account exists.\n// You could skip this, but if the account does not exist, you will be charged\n// the transaction fee when the transaction fails.\nserver\n  .loadAccount(destinationId)\n  // If the account is not found, surface a nicer error message for logging.\n  .catch(function (error) {\n    if (error instanceof StellarSdk.NotFoundError) {\n      throw new Error(\"The destination account does not exist!\");\n    } else return error;\n  })\n  // If there was no error, load up-to-date information on your account.\n  .then(function () {\n    return server.loadAccount(sourceKeys.publicKey());\n  })\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: destinationId,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          //asset: StellarSdk.Asset.native(),\n          asset: new StellarSdk.Asset(asset,assetiss),\n          amount: quant,\n        }),\n      )\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text(memo))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    // And finally, send it off to Stellar!\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    console.error(\"Something went wrong!\", error);\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":410,"y":460,"wires":[["b62a3ce6.1cbca","d7982d52.7bb3e","64d3b09c.9e48"]]},{"id":"9a1c8ebf.a96f6","type":"ui_button","z":"421cf1f0.a26fc","name":"Send Token","group":"d19bed92.49b26","order":9,"width":"6","height":"1","passthru":false,"label":"Send Token","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","topicType":"str","x":150,"y":460,"wires":[["86d19d8e.be6b7","1b9b3379.9dddbd","652a8762.768eb8"]]},{"id":"d40c8b91.af2138","type":"comment","z":"421cf1f0.a26fc","name":"Store Variables from Dashboard UI","info":"","x":1180,"y":260,"wires":[]},{"id":"ac3648a.9bc9cb8","type":"ui_text_input","z":"421cf1f0.a26fc","name":"Memo","label":"Memo","tooltip":"","group":"d19bed92.49b26","order":2,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","x":1030,"y":540,"wires":[["3f2ba3c4.891bcc"]]},{"id":"3f2ba3c4.891bcc","type":"function","z":"421cf1f0.a26fc","name":"memo","func":"var memo = msg.payload\nflow.set('memo',memo);\nreturn msg;","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is deployed.\nvar memo = \"Via BlockShangerous NodeRed\"\nflow.set('memo',memo);","finalize":"","x":1290,"y":540,"wires":[[]]},{"id":"e6a7d07c.2f3da","type":"tab","label":"Create Token (batched)","disabled":false,"info":""},{"id":"204498cb.d78108","type":"debug","z":"e6a7d07c.2f3da","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":770,"y":220,"wires":[]},{"id":"75eb5b66.9af5f4","type":"function","z":"e6a7d07c.2f3da","name":"Setup StellarSDK flow.transaction","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar secretiss = flow.get('secretiss',secretiss);\nvar asset = flow.get('asset',asset)\n\n//var op = msg.op\nflow.set('StellarSdk',StellarSdk);\nflow.set('server',server);\n//node.send(msg)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar assetiss = sourceKeys.publicKey()\nflow.set('assetiss',assetiss)\n\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      flow.set('transaction',transaction);\n      node.send(msg)\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":260,"wires":[["204498cb.d78108","2e1d96ac.4c8d5a"]]},{"id":"a1eac9e8.e85648","type":"inject","z":"e6a7d07c.2f3da","name":"","props":[{"p":"secret","v":"SBSZQMYX2EAT6MGDOAJ3OONFHT6TVVWLLAZEESRIQ7G3CYLHTCWTC3UX","vt":"str"},{"p":"name","v":"COOL","vt":"str"},{"p":"iss","v":"GBN5VTPXODILAQTMMB23ML5B7RKF657YXXALLWFKGZPSW53QGR6OUG4L","vt":"str"},{"p":"secretdist","v":"SABNLC3PJUYUV7WNC5V4YC253GHGH4NIZHN7EAUY6FLXRIVHTGU65TGN","vt":"str"},{"p":"dest","v":"GAC4LTCWBQAVRNXP67QMT55KZ3BIYPVMLIC46FYSO6HN2ZFZLFKW5WJX","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":240,"y":240,"wires":[["75eb5b66.9af5f4","1c81da0e.bf9896"]]},{"id":"c9c5d83b.be7b58","type":"comment","z":"e6a7d07c.2f3da","name":"Create Token","info":"","x":390,"y":80,"wires":[]},{"id":"c56d635a.bf1ff","type":"ui_button","z":"e6a7d07c.2f3da","name":"Create Token","group":"9fc23374.89621","order":6,"width":"6","height":"1","passthru":false,"label":"Create Token","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","topicType":"str","x":130,"y":380,"wires":[["fa34583b.14c978","b1306853.a69e18"]]},{"id":"22de365d.ca387a","type":"ui_text","z":"e6a7d07c.2f3da","group":"9fc23374.89621","order":8,"width":0,"height":0,"name":"Success text display","label":"","format":"{{msg.payload}}","layout":"row-spread","x":1380,"y":560,"wires":[]},{"id":"fa34583b.14c978","type":"change","z":"e6a7d07c.2f3da","name":"Status Update","rules":[{"t":"set","p":"payload","pt":"msg","to":"Sending Transaction To Stellar","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1100,"y":560,"wires":[["22de365d.ca387a"]]},{"id":"1c81da0e.bf9896","type":"debug","z":"e6a7d07c.2f3da","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":610,"y":200,"wires":[]},{"id":"2e1d96ac.4c8d5a","type":"function","z":"e6a7d07c.2f3da","name":"add trust","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretdist = flow.get('secretdist',secretdist);\nvar asset = flow.get('asset',asset)\nvar assetiss = flow.get('assetiss',assetiss)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\n\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n      .addOperation(\n        StellarSdk.Operation.changeTrust({\n          asset: new StellarSdk.Asset(asset,assetiss),\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":620,"y":300,"wires":[["6285861b.4ff458","886a7325.935ab"]]},{"id":"6285861b.4ff458","type":"debug","z":"e6a7d07c.2f3da","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":830,"y":260,"wires":[]},{"id":"6e91b204.d3f57c","type":"function","z":"e6a7d07c.2f3da","name":"sign and submit","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretdist = flow.get('secretdist',secretdist);\nvar asset = flow.get('asset',asset)\nvar assetiss = flow.get('assetiss',assetiss)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar secretiss = flow.get('secretiss',secretiss);\nvar domain = flow.get('domain',domain)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar sourceKeys2 = StellarSdk.Keypair.fromSecret(secretdist);\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n  .addOperation(\n        StellarSdk.Operation.setOptions({\n          homeDomain: domain,\n          source: sourceKeys.publicKey()\n        }),\n      )\n    \n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text('Token by RedHorizon'))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    transaction.sign(sourceKeys2);\n    // And finally, send it off to Stellar!\n    msg.xdr=transaction.toEnvelope().toXDR('base64')\n    //node.send(msg)\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    msg.error=\"Something went wrong! \"+ error;\n    msg.send(msg)\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":400,"wires":[["cad8a472.500fa8","58701b24.785984","22de365d.ca387a"]]},{"id":"cad8a472.500fa8","type":"debug","z":"e6a7d07c.2f3da","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1250,"y":360,"wires":[]},{"id":"58701b24.785984","type":"debug","z":"e6a7d07c.2f3da","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1270,"y":420,"wires":[]},{"id":"886a7325.935ab","type":"function","z":"e6a7d07c.2f3da","name":"send token","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretiss = flow.get('secretiss',secretiss);\nvar asset = flow.get('asset',asset)\nvar assetiss = flow.get('assetiss',assetiss)\nvar amount = flow.get('amount',amount)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar secretdist = flow.get('secretdist',secretdist)\nvar destKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar dest = destKeys.publicKey()\n\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: dest,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          //asset: StellarSdk.Asset.native(),\n          asset: new StellarSdk.Asset(asset,assetiss),\n          amount: amount,\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":750,"y":340,"wires":[["6e91b204.d3f57c","3fb338eb.065d88"]]},{"id":"10b3e5e3.3b28fa","type":"ui_text_input","z":"e6a7d07c.2f3da","name":"Asset - Name","label":"Asset - Name","tooltip":"","group":"9fc23374.89621","order":1,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1160,"y":840,"wires":[["d7d940f.7271ec"]]},{"id":"a3f37bb9.582458","type":"ui_text_input","z":"e6a7d07c.2f3da","name":"Amount","label":"Amount","tooltip":"","group":"9fc23374.89621","order":3,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1140,"y":880,"wires":[["eafd4bec.183ed8"]]},{"id":"6a72b9b2.fa8a08","type":"ui_text_input","z":"e6a7d07c.2f3da","name":"Secret Key - Distributor","label":"Secret Key - Distributor","tooltip":"","group":"9fc23374.89621","order":2,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1190,"y":800,"wires":[["aeb26a92.b6daa8"]]},{"id":"3fcfa89d.e7f668","type":"ui_text_input","z":"e6a7d07c.2f3da","name":"Secret Key Issuer","label":"Secret Key Issuer","tooltip":"","group":"9fc23374.89621","order":4,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1170,"y":760,"wires":[["1a8ef1a9.7b9d6e"]]},{"id":"1a8ef1a9.7b9d6e","type":"function","z":"e6a7d07c.2f3da","name":"secretiss","func":"var secretiss = msg.payload\nflow.set('secretiss',secretiss);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1400,"y":760,"wires":[[]]},{"id":"d7d940f.7271ec","type":"function","z":"e6a7d07c.2f3da","name":"asset","func":"var asset = msg.payload\nflow.set('asset',asset);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1390,"y":840,"wires":[[]]},{"id":"eafd4bec.183ed8","type":"function","z":"e6a7d07c.2f3da","name":"amount","func":"var amount = msg.payload\nflow.set('amount',amount);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1400,"y":880,"wires":[[]]},{"id":"aeb26a92.b6daa8","type":"function","z":"e6a7d07c.2f3da","name":"secretdist","func":"var secretdist = msg.payload\nflow.set('secretdist',secretdist);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1400,"y":800,"wires":[[]]},{"id":"3fb338eb.065d88","type":"debug","z":"e6a7d07c.2f3da","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":990,"y":320,"wires":[]},{"id":"983efcc.c7681","type":"ui_dropdown","z":"e6a7d07c.2f3da","name":"","label":"Network","tooltip":"","place":"Test","group":"9fc23374.89621","order":7,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"Test","value":"test","type":"str"},{"label":"Public","value":"public","type":"str"}],"payload":"","topic":"topic","topicType":"msg","x":1140,"y":920,"wires":[["51e327c8.8737d8"]]},{"id":"51e327c8.8737d8","type":"function","z":"e6a7d07c.2f3da","name":"network","func":"var network = msg.payload\nflow.set('network',network);\nreturn msg;","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is deployed.\nvar network = \"test\"\nflow.set('network',network);","finalize":"","x":1400,"y":920,"wires":[[]]},{"id":"91773008.e8c98","type":"function","z":"e6a7d07c.2f3da","name":"Setup StellarSDK flow.transaction","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon.stellar.org\");\nvar secretiss = flow.get('secretiss',secretiss);\nvar asset = flow.get('asset',asset)\n\n//var op = msg.op\nflow.set('StellarSdk',StellarSdk);\nflow.set('server',server);\n//node.send(msg)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar assetiss = sourceKeys.publicKey()\nflow.set('assetiss',assetiss)\n\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.PUBLIC,\n    })\n      flow.set('transaction',transaction);\n      node.send(msg)\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":620,"wires":[["602b3d5c.c81364"]]},{"id":"602b3d5c.c81364","type":"function","z":"e6a7d07c.2f3da","name":"add trust","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretdist = flow.get('secretdist',secretdist);\nvar asset = flow.get('asset',asset)\nvar assetiss = flow.get('assetiss',assetiss)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\n\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n      .addOperation(\n        StellarSdk.Operation.changeTrust({\n          asset: new StellarSdk.Asset(asset,assetiss),\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":660,"y":620,"wires":[["9671381.99a15c8"]]},{"id":"fa7bb152.41544","type":"function","z":"e6a7d07c.2f3da","name":"sign and submit and add domain","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretdist = flow.get('secretdist',secretdist);\nvar asset = flow.get('asset',asset)\nvar assetiss = flow.get('assetiss',assetiss)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar secretiss = flow.get('secretiss',secretiss);\nvar domain = flow.get('domain',domain);\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar sourceKeys2 = StellarSdk.Keypair.fromSecret(secretdist);\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n     .addOperation(\n        StellarSdk.Operation.setOptions({\n          homeDomain: domain,\n          source: sourceKeys.publicKey()\n        }),\n      )\n    \n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text('Token by RedHorizon'))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    transaction.sign(sourceKeys2);\n    // And finally, send it off to Stellar!\n    msg.xdr=transaction.toEnvelope().toXDR('base64')\n    //node.send(msg)\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/public/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    msg.error=\"Something went wrong! \"+ error;\n    msg.send(msg)\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1030,"y":620,"wires":[["78ef6da7.73c934","22de365d.ca387a"]]},{"id":"9671381.99a15c8","type":"function","z":"e6a7d07c.2f3da","name":"send token","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretiss = flow.get('secretiss',secretiss);\nvar asset = flow.get('asset',asset)\nvar assetiss = flow.get('assetiss',assetiss)\nvar amount = flow.get('amount',amount)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar secretdist = flow.get('secretdist',secretdist)\nvar destKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar dest = destKeys.publicKey()\n\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: dest,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          //asset: StellarSdk.Asset.native(),\n          asset: new StellarSdk.Asset(asset,assetiss),\n          amount: amount,\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":810,"y":620,"wires":[["fa7bb152.41544"]]},{"id":"78ef6da7.73c934","type":"debug","z":"e6a7d07c.2f3da","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1250,"y":620,"wires":[]},{"id":"b1306853.a69e18","type":"switch","z":"e6a7d07c.2f3da","name":"Network Switch","property":"network","propertyType":"flow","rules":[{"t":"eq","v":"test","vt":"str"},{"t":"eq","v":"public","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":360,"y":380,"wires":[["75eb5b66.9af5f4"],["91773008.e8c98"]]},{"id":"ed00ac56.92c6c","type":"comment","z":"e6a7d07c.2f3da","name":"Mainnet","info":"","x":430,"y":580,"wires":[]},{"id":"bab1ccc6.70262","type":"comment","z":"e6a7d07c.2f3da","name":"Testnet","info":"","x":350,"y":180,"wires":[]},{"id":"30720e27.c0ad62","type":"comment","z":"e6a7d07c.2f3da","name":"Display","info":"","x":1290,"y":520,"wires":[]},{"id":"224aee72.830442","type":"ui_text_input","z":"e6a7d07c.2f3da","name":"domain","label":"Home domain (no https://www.)","tooltip":"","group":"9fc23374.89621","order":5,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1140,"y":960,"wires":[["3a829560.a4a7aa"]]},{"id":"3a829560.a4a7aa","type":"function","z":"e6a7d07c.2f3da","name":"domain","func":"var domain = msg.payload\nflow.set('domain',domain);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1380,"y":960,"wires":[[]]},{"id":"62be80ab.53a19","type":"tab","label":"Create NFT (batched)","disabled":false,"info":""},{"id":"f3ba7148.5fb2","type":"inject","z":"62be80ab.53a19","name":"","props":[{"p":"secret","v":"SBSZQMYX2EAT6MGDOAJ3OONFHT6TVVWLLAZEESRIQ7G3CYLHTCWTC3UX","vt":"str"},{"p":"name","v":"COOL","vt":"str"},{"p":"iss","v":"GBN5VTPXODILAQTMMB23ML5B7RKF657YXXALLWFKGZPSW53QGR6OUG4L","vt":"str"},{"p":"op","v":"changeTrust","vt":"str"},{"p":"dest","v":"GAC4LTCWBQAVRNXP67QMT55KZ3BIYPVMLIC46FYSO6HN2ZFZLFKW5WJX","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":220,"y":220,"wires":[["19cfd77d.479799"]]},{"id":"aacf328a.6732f","type":"comment","z":"62be80ab.53a19","name":"Create Testnet NFTs","info":"","x":390,"y":160,"wires":[]},{"id":"538aab9.9653254","type":"ui_button","z":"62be80ab.53a19","name":"Create Token","group":"95bece1d.a187c","order":5,"width":"6","height":"1","passthru":false,"label":"Create Token","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","topicType":"str","x":150,"y":360,"wires":[["95c82711.922ac8","18ce53b8.16de5c"]]},{"id":"e50df93c.ba1b18","type":"ui_text_input","z":"62be80ab.53a19","name":"Asset - Name","label":"Asset - Name","tooltip":"","group":"95bece1d.a187c","order":2,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1040,"y":640,"wires":[["e3e074bd.3cd888"]]},{"id":"3ca3f03f.9969d","type":"ui_text_input","z":"62be80ab.53a19","name":"Amount","label":"Amount","tooltip":"","group":"95bece1d.a187c","order":4,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1020,"y":720,"wires":[["e7875606.5d1748"]]},{"id":"49043f22.0bb1b","type":"ui_text_input","z":"62be80ab.53a19","name":"Secret Key - Origin","label":"Secret Key - Origin","tooltip":"","group":"95bece1d.a187c","order":1,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1050,"y":600,"wires":[["7451fc0.3083c04"]]},{"id":"778e4e0.fa958b","type":"ui_text_input","z":"62be80ab.53a19","name":"Data","label":"Data (IPFS CID)","tooltip":"","group":"95bece1d.a187c","order":3,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1010,"y":680,"wires":[["21165c3d.cc5214"]]},{"id":"21165c3d.cc5214","type":"function","z":"62be80ab.53a19","name":"data","func":"var data = msg.payload\nflow.set('data',data);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1250,"y":680,"wires":[[]]},{"id":"e3e074bd.3cd888","type":"function","z":"62be80ab.53a19","name":"asset","func":"var asset = msg.payload\nflow.set('asset',asset);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1250,"y":640,"wires":[[]]},{"id":"7451fc0.3083c04","type":"function","z":"62be80ab.53a19","name":"secretdist","func":"var secretdist = msg.payload\nflow.set('secretdist',secretdist);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1260,"y":600,"wires":[[]]},{"id":"e7875606.5d1748","type":"function","z":"62be80ab.53a19","name":"count","func":"var count = msg.payload\nflow.set('count',count);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1250,"y":720,"wires":[[]]},{"id":"19cfd77d.479799","type":"function","z":"62be80ab.53a19","name":"Setup StellarSDK flow.transaction","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\nvar secretiss = msg.secret;\nvar asset = flow.get('asset',asset)\n\n//var op = msg.op\nflow.set('StellarSdk',StellarSdk);\nflow.set('server',server);\n//node.send(msg)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar assetiss = sourceKeys.publicKey()\nflow.set('assetiss',assetiss)\n\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      flow.set('transaction',transaction);\n      node.send(msg)\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":460,"y":220,"wires":[["44084955.cf43c8","eaa4d40.dd9fe3"]]},{"id":"49407bb.4f8d084","type":"ui_text","z":"62be80ab.53a19","group":"95bece1d.a187c","order":9,"width":0,"height":0,"name":"Success text display","label":"","format":"{{msg.payload}}","layout":"row-spread","x":1000,"y":420,"wires":[]},{"id":"95c82711.922ac8","type":"change","z":"62be80ab.53a19","name":"Status Update","rules":[{"t":"set","p":"payload","pt":"msg","to":"Sending Transaction To Stellar","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":420,"wires":[["49407bb.4f8d084"]]},{"id":"eaa4d40.dd9fe3","type":"function","z":"62be80ab.53a19","name":"add trust","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretdist = flow.get('secretdist',secretdist);\nvar asset = flow.get('asset',asset)\nvar assetiss = msg.public\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar count = flow.get('count',count)\nif (count<10){\n    count=\"0\"+count\n}\nif (count<100){\n    count=\"0\"+count\n}\nflow.set('count',count)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n      .addOperation(\n        StellarSdk.Operation.changeTrust({\n          asset: new StellarSdk.Asset(asset+count,assetiss),\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":740,"y":200,"wires":[["3af99543.fc6c1a","bcf802b7.0633b"]]},{"id":"3af99543.fc6c1a","type":"debug","z":"62be80ab.53a19","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":930,"y":180,"wires":[]},{"id":"dd6071d2.8a06a","type":"function","z":"62be80ab.53a19","name":"sign and submit","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretdist = flow.get('secretdist',secretdist);\nvar asset = flow.get('asset',asset)\nvar assetiss = flow.get('assetiss',assetiss)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar secretiss = msg.secret\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar sourceKeys2 = StellarSdk.Keypair.fromSecret(secretdist);\nvar transaction;\n\nvar data = flow.get('data',data)\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n       .addOperation(\n        StellarSdk.Operation.manageData({\n          name: \"ipfs CID (base64)\",\n          value: data,\n          source: sourceKeys.publicKey()\n        }),\n      )\n    \n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text('NFT by StellarRed'))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    transaction.sign(sourceKeys2);\n    // And finally, send it off to Stellar!\n    msg.xdr=transaction.toEnvelope().toXDR('base64')\n    //node.send(msg)\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    msg.error=\"Something went wrong! \"+ error;\n    msg.send(msg)\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1020,"y":360,"wires":[["49407bb.4f8d084","c90243f9.d2b11"]]},{"id":"bcf802b7.0633b","type":"function","z":"62be80ab.53a19","name":"send token","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretiss = msg.secret;\nvar asset = flow.get('asset',asset)\nvar assetiss = msg.public\n//var amount = flow.get('amount',amount)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar count = flow.get('count',count)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar transaction;\n\nvar secretdist = flow.get('secretdist',secretdist)\nvar distKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar dist = distKeys.publicKey()\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: dist,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          //asset: StellarSdk.Asset.native(),\n          asset: new StellarSdk.Asset(asset+count,assetiss),\n          amount: \".0000001\",\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":910,"y":240,"wires":[["54a9846b.0ee64c","90a259f.256f2a8"]]},{"id":"54a9846b.0ee64c","type":"debug","z":"62be80ab.53a19","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1090,"y":240,"wires":[]},{"id":"18ce53b8.16de5c","type":"function","z":"62be80ab.53a19","name":"fund random keypair \\n msg.secret msg.public \\n fund with friendbot","func":"const fetch = global.get(\"nodefetch\");\n\nvar StellarSdk = global.get(\"stellarsdk\");\n// create a completely new and unique pair of keys\n// see more about KeyPair objects: https://stellar.github.io/js-stellar-sdk/Keypair.html\nconst pair = StellarSdk.Keypair.random();\n\n//msg.payload = \"Pair secret: \" + pair.secret()\n//node.send(msg)\n//msg.payload = \"Pair publickey: \" + pair.publicKey()\n//node.send(msg)\nasync function main() {\n  try {\n    const response = await fetch(\n      `https://friendbot.stellar.org?addr=${encodeURIComponent(\n        pair.publicKey(),\n      )}`,\n    );\n    const responseJSON = await response.json();\n    console.log(\"SUCCESS! You have a new account :)\\n\", responseJSON);\n  } catch (e) {\n    console.log(\"ERROR!\", e);\n  }\n\n\n}\nmain()\n\nmsg.secret=pair.secret();\n\nmsg.public=pair.publicKey();\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":360,"y":340,"wires":[["731ae5da.319d0c","f68740d6.f025"]]},{"id":"90a259f.256f2a8","type":"switch","z":"62be80ab.53a19","name":"count","property":"count","propertyType":"flow","rules":[{"t":"neq","v":"000","vt":"str"},{"t":"eq","v":"000","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":830,"y":340,"wires":[["9e4fdd.d634002"],["dd6071d2.8a06a"]]},{"id":"9e4fdd.d634002","type":"function","z":"62be80ab.53a19","name":"count-1","func":"var count=flow.get('count',count)\ncount= count-1\n\nflow.set('count',count)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1020,"y":320,"wires":[["eaa4d40.dd9fe3","fabfbfe3.87897"]]},{"id":"fabfbfe3.87897","type":"debug","z":"62be80ab.53a19","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1210,"y":300,"wires":[]},{"id":"c90243f9.d2b11","type":"debug","z":"62be80ab.53a19","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1210,"y":360,"wires":[]},{"id":"44084955.cf43c8","type":"debug","z":"62be80ab.53a19","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":160,"wires":[]},{"id":"731ae5da.319d0c","type":"debug","z":"62be80ab.53a19","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":670,"y":360,"wires":[]},{"id":"f68740d6.f025","type":"delay","z":"62be80ab.53a19","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":540,"y":300,"wires":[["19cfd77d.479799"]]},{"id":"9ae7d6dd.0d8cc8","type":"tab","label":"NFT Multimaker","disabled":false,"info":""},{"id":"7cc68034.80b66","type":"inject","z":"9ae7d6dd.0d8cc8","name":"","props":[{"p":"secret","v":"SBSZQMYX2EAT6MGDOAJ3OONFHT6TVVWLLAZEESRIQ7G3CYLHTCWTC3UX","vt":"str"},{"p":"name","v":"COOL","vt":"str"},{"p":"iss","v":"GBN5VTPXODILAQTMMB23ML5B7RKF657YXXALLWFKGZPSW53QGR6OUG4L","vt":"str"},{"p":"op","v":"changeTrust","vt":"str"},{"p":"dest","v":"GAC4LTCWBQAVRNXP67QMT55KZ3BIYPVMLIC46FYSO6HN2ZFZLFKW5WJX","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":170,"y":200,"wires":[["c05795f7.439c38"]]},{"id":"494b6d9d.a6c134","type":"comment","z":"9ae7d6dd.0d8cc8","name":"Create Multiple NFTs","info":"","x":350,"y":140,"wires":[]},{"id":"36b57c07.3a6174","type":"ui_button","z":"9ae7d6dd.0d8cc8","name":"Create NFTs","group":"8d9479b0.c2e3b8","order":7,"width":"6","height":"1","passthru":false,"label":"Create NFTs","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","topicType":"str","x":100,"y":340,"wires":[["8fabd323.bbf3c","ba3f7c31.73156"]]},{"id":"1b8d56c9.cb63e9","type":"ui_text_input","z":"9ae7d6dd.0d8cc8","name":"Asset - Name","label":"Asset - Name","tooltip":"","group":"8d9479b0.c2e3b8","order":2,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1180,"y":940,"wires":[["d96eafa2.323e"]]},{"id":"854704b.d043bf8","type":"ui_text_input","z":"9ae7d6dd.0d8cc8","name":"Amount","label":"Amount (max 30)","tooltip":"","group":"8d9479b0.c2e3b8","order":5,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1160,"y":1060,"wires":[["8b18bc6.68a524"]]},{"id":"69854ef5.4f3de","type":"ui_text_input","z":"9ae7d6dd.0d8cc8","name":"Secret Key - Origin","label":"Secret Key - Origin","tooltip":"","group":"8d9479b0.c2e3b8","order":1,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1190,"y":900,"wires":[["3367fa33.176086"]]},{"id":"fb475935.316798","type":"ui_text_input","z":"9ae7d6dd.0d8cc8","name":"Data","label":"Data (IPFS CID)","tooltip":"","group":"8d9479b0.c2e3b8","order":3,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1150,"y":980,"wires":[["f32c24c3.e9c888"]]},{"id":"f32c24c3.e9c888","type":"function","z":"9ae7d6dd.0d8cc8","name":"data","func":"var data = msg.payload\nflow.set('data',data);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1390,"y":980,"wires":[[]]},{"id":"d96eafa2.323e","type":"function","z":"9ae7d6dd.0d8cc8","name":"asset","func":"var asset = msg.payload\nflow.set('asset',asset);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1390,"y":940,"wires":[[]]},{"id":"3367fa33.176086","type":"function","z":"9ae7d6dd.0d8cc8","name":"secretdist","func":"var secretdist = msg.payload\nflow.set('secretdist',secretdist);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1400,"y":900,"wires":[[]]},{"id":"8b18bc6.68a524","type":"function","z":"9ae7d6dd.0d8cc8","name":"count","func":"var count = msg.payload\nflow.set('count',count);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1390,"y":1060,"wires":[[]]},{"id":"c05795f7.439c38","type":"function","z":"9ae7d6dd.0d8cc8","name":"Setup StellarSDK flow.transaction \\n fund new keypair","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\n\nvar asset = flow.get('asset',asset)\n\n//var op = msg.op\nflow.set('StellarSdk',StellarSdk);\nflow.set('server',server);\n//node.send(msg)\n\nconst pair = StellarSdk.Keypair.random();\nmsg.secret=pair.secret();\nmsg.public=pair.publicKey();\n\nvar secretiss = msg.secret;\nvar assetiss = msg.public\nflow.set('assetiss',assetiss)\n\nvar secretdist = flow.get('secretdist',secretdist);\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretdist);\n\n\nvar transaction;\n\n//node.send(msg)\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.createAccount({\n          destination: msg.public,\n          startingBalance: \"1.5\",\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n      flow.set('transaction',transaction);\n      node.send(msg)\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":410,"y":200,"wires":[["df7cc11d.3dfcd","c034165e.712cc8"]]},{"id":"de59862d.a19f28","type":"ui_text","z":"9ae7d6dd.0d8cc8","group":"8d9479b0.c2e3b8","order":9,"width":0,"height":0,"name":"Success text display","label":"","format":"{{msg.payload}}","layout":"row-spread","x":1340,"y":520,"wires":[]},{"id":"8fabd323.bbf3c","type":"change","z":"9ae7d6dd.0d8cc8","name":"Status Update","rules":[{"t":"set","p":"payload","pt":"msg","to":"Building NFTs","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":520,"wires":[["de59862d.a19f28"]]},{"id":"df7cc11d.3dfcd","type":"function","z":"9ae7d6dd.0d8cc8","name":"add trust","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretdist = flow.get('secretdist',secretdist);\nvar asset = flow.get('asset',asset)\nvar assetiss = msg.public\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar count = flow.get('count',count)\n\nif (count<10){\n    count=\"0\"+count\n}\n\n/*if (count<100){\n    count=\"0\"+count\n}\n*/\nflow.set('count',count)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n      .addOperation(\n        StellarSdk.Operation.changeTrust({\n          asset: new StellarSdk.Asset(asset+count,assetiss),\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":680,"y":200,"wires":[["518c7eba.793c","ed36461a.64d508"]]},{"id":"bfd015a4.6c0748","type":"function","z":"9ae7d6dd.0d8cc8","name":"sign and submit \\n add data+domain \\n lock account","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretdist = flow.get('secretdist',secretdist);\nvar asset = flow.get('asset',asset)\nvar assetiss = flow.get('assetiss',assetiss)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar secretiss = msg.secret\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar distKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar dist = distKeys.publicKey()\nvar transaction;\n\nvar data = flow.get('data',data)\nvar domain = flow.get('domain',domain)\n\nserver\n  .loadAccount(dist)\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n       .addOperation(\n        StellarSdk.Operation.manageData({\n          name: \"ipfs CID (base64)\",\n          value: data,\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n      .addOperation(\n        StellarSdk.Operation.setOptions({\n          masterWeight: \"0\",\n          homeDomain: domain,\n          setFlags: 0x4,\n          //setFlags: 0x4|\"1\",\n          //setFlags: AuthImmutableFlag\n          //setFlags: StellarSdk.AuthImmutableFlag\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n    //node.send(msg)\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text('NFT by RedHorizon'))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n     // msg.xdr=transaction.toEnvelope().toXDR('base64')\n    //node.send(msg)\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    transaction.sign(distKeys);\n    // And finally, send it off to Stellar!\n    msg.xdr=transaction.toEnvelope().toXDR('base64')\n    msg.payload=\"Submitting to Stellar\"\n    node.send(msg)\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    msg.error=\"Something went wrong! \"+ error;\n    node.send(msg)\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1110,"y":440,"wires":[["de59862d.a19f28","dc7cec58.04e1e"]]},{"id":"518c7eba.793c","type":"function","z":"9ae7d6dd.0d8cc8","name":"send token","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretiss = msg.secret;\nvar asset = flow.get('asset',asset)\nvar assetiss = msg.public\n//var amount = flow.get('amount',amount)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar count = flow.get('count',count)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar transaction;\n\nvar secretdist = flow.get('secretdist',secretdist)\nvar distKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar dist = distKeys.publicKey()\n\nserver\n  .loadAccount(dist)\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: dist,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          //asset: StellarSdk.Asset.native(),\n          asset: new StellarSdk.Asset(asset+count,assetiss),\n          amount: \".0000001\",\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":850,"y":200,"wires":[["48a0dce9.2a3374","e862b209.ae8cc"]]},{"id":"18aae072.6534","type":"switch","z":"9ae7d6dd.0d8cc8","name":"count","property":"count","propertyType":"flow","rules":[{"t":"neq","v":"00","vt":"str"},{"t":"eq","v":"00","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":930,"y":360,"wires":[["907c516f.e2d3e","8c6546ec.478878"],["bfd015a4.6c0748"]]},{"id":"907c516f.e2d3e","type":"function","z":"9ae7d6dd.0d8cc8","name":"count-1","func":"var count=flow.get('count',count)\ncount= count-1\n\nflow.set('count',count)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1100,"y":360,"wires":[["df7cc11d.3dfcd","759174be.cd1b1c"]]},{"id":"3d056305.445dbc","type":"ui_text_input","z":"9ae7d6dd.0d8cc8","name":"Sell Price","label":"Sell Price /XLM (max 5)","tooltip":"","group":"8d9479b0.c2e3b8","order":6,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1160,"y":1100,"wires":[["5dc2677.609d298"]]},{"id":"5dc2677.609d298","type":"function","z":"9ae7d6dd.0d8cc8","name":"price","func":"var price = msg.payload*10000000\nflow.set('price',price);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1390,"y":1100,"wires":[[]]},{"id":"7d6437f8.ee3fd8","type":"ui_text_input","z":"9ae7d6dd.0d8cc8","name":"domain","label":"Home domain (no https://www.)","tooltip":"","group":"8d9479b0.c2e3b8","order":4,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1160,"y":1020,"wires":[["a1e53bae.c49498"]]},{"id":"a1e53bae.c49498","type":"function","z":"9ae7d6dd.0d8cc8","name":"domain","func":"var domain = msg.payload\nflow.set('domain',domain);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1400,"y":1020,"wires":[[]]},{"id":"759174be.cd1b1c","type":"change","z":"9ae7d6dd.0d8cc8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"count","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1320,"y":460,"wires":[["de59862d.a19f28"]]},{"id":"1b97bf95.1e7f4","type":"function","z":"9ae7d6dd.0d8cc8","name":"sell offer","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretiss = msg.secret;\nvar asset = flow.get('asset',asset)\nvar assetiss = msg.public\n//var amount = flow.get('amount',amount)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar count = flow.get('count',count)\nvar price = flow.get('price',price)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar transaction;\n\nvar secretdist = flow.get('secretdist',secretdist)\nvar distKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar dist = distKeys.publicKey()\n\nserver\n  .loadAccount(dist)\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n        .addOperation(\n        StellarSdk.Operation.manageSellOffer({\n            selling: new StellarSdk.Asset(asset+count,assetiss),\n            buying: StellarSdk.Asset.native(),\n            amount: \".0000001\",\n            price: price,\n            source: distKeys.publicKey()\n     }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1260,"y":280,"wires":[["18aae072.6534","13fd3a28.66f666"]]},{"id":"d97c4e6e.bbad5","type":"function","z":"9ae7d6dd.0d8cc8","name":"sell offer","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretiss = msg.secret;\nvar asset = flow.get('asset',asset)\nvar assetiss = msg.public\n//var amount = flow.get('amount',amount)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar count = flow.get('count',count)\nvar price = flow.get('price',price)\nprice=price*40\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar transaction;\n\nvar secretdist = flow.get('secretdist',secretdist)\nvar distKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar dist = distKeys.publicKey()\n\nserver\n  .loadAccount(dist)\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n        .addOperation(\n        StellarSdk.Operation.manageSellOffer({\n            selling: new StellarSdk.Asset(asset+count,assetiss),\n            buying: StellarSdk.Asset.native(),\n            amount: \".0000001\",\n            price: price,\n            source: distKeys.publicKey()\n     }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1260,"y":160,"wires":[["18aae072.6534","423bfbfe.7d03b4"]]},{"id":"b1b47223.3c24e","type":"function","z":"9ae7d6dd.0d8cc8","name":"sell offer","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretiss = msg.secret;\nvar asset = flow.get('asset',asset)\nvar assetiss = msg.public\n//var amount = flow.get('amount',amount)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar count = flow.get('count',count)\nvar price = flow.get('price',price)\nprice=price*10\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar transaction;\n\nvar secretdist = flow.get('secretdist',secretdist)\nvar distKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar dist = distKeys.publicKey()\n\nserver\n  .loadAccount(dist)\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n        .addOperation(\n        StellarSdk.Operation.manageSellOffer({\n            selling: new StellarSdk.Asset(asset+count,assetiss),\n            buying: StellarSdk.Asset.native(),\n            amount: \".0000001\",\n            price: price,\n            source: distKeys.publicKey()\n     }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1260,"y":200,"wires":[["18aae072.6534","f001f6f.dec0e08"]]},{"id":"8d2dda8a.c16a58","type":"function","z":"9ae7d6dd.0d8cc8","name":"sell offer","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretiss = msg.secret;\nvar asset = flow.get('asset',asset)\nvar assetiss = msg.public\n//var amount = flow.get('amount',amount)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar count = flow.get('count',count)\nvar price = flow.get('price',price)\nprice=price*2\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar transaction;\n\nvar secretdist = flow.get('secretdist',secretdist)\nvar distKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar dist = distKeys.publicKey()\n\nserver\n  .loadAccount(dist)\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n        .addOperation(\n        StellarSdk.Operation.manageSellOffer({\n            selling: new StellarSdk.Asset(asset+count,assetiss),\n            buying: StellarSdk.Asset.native(),\n            amount: \".0000001\",\n            price: price,\n            source: distKeys.publicKey()\n     }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1260,"y":240,"wires":[["18aae072.6534","bf69fe1e.c09f5"]]},{"id":"48a0dce9.2a3374","type":"switch","z":"9ae7d6dd.0d8cc8","name":"count","property":"count","propertyType":"flow","rules":[{"t":"eq","v":"00","vt":"num"},{"t":"eq","v":"01","vt":"num"},{"t":"eq","v":"02","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":4,"x":1070,"y":220,"wires":[["d97c4e6e.bbad5"],["b1b47223.3c24e"],["8d2dda8a.c16a58"],["1b97bf95.1e7f4"]]},{"id":"ba3f7c31.73156","type":"switch","z":"9ae7d6dd.0d8cc8","name":"Network Switch","property":"network","propertyType":"flow","rules":[{"t":"eq","v":"test","vt":"str"},{"t":"eq","v":"public","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":280,"y":400,"wires":[["c05795f7.439c38"],["3e3e222a.feb0ee"]]},{"id":"3e3e222a.feb0ee","type":"function","z":"9ae7d6dd.0d8cc8","name":"Setup StellarSDK flow.transaction \\n fund new keypair","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon.stellar.org\");\n\nvar asset = flow.get('asset',asset)\n\n//var op = msg.op\nflow.set('StellarSdk',StellarSdk);\nflow.set('server',server);\n//node.send(msg)\n\nconst pair = StellarSdk.Keypair.random();\nmsg.secret=pair.secret();\nmsg.public=pair.publicKey();\n\nvar secretiss = msg.secret;\nvar assetiss = msg.public\nflow.set('assetiss',assetiss)\n\nvar secretdist = flow.get('secretdist',secretdist);\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretdist);\n\n\nvar transaction;\n\n//node.send(msg)\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.PUBLIC,\n    })\n      .addOperation(\n        StellarSdk.Operation.createAccount({\n          destination: msg.public,\n          startingBalance: \"1.5\",\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n      flow.set('transaction',transaction);\n      node.send(msg)\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":460,"y":500,"wires":[["df7cc11d.3dfcd","771e4cb4.c0f634"]]},{"id":"fe25e404.400888","type":"ui_dropdown","z":"9ae7d6dd.0d8cc8","name":"","label":"Network","tooltip":"","place":"Test","group":"8d9479b0.c2e3b8","order":8,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"Test","value":"test","type":"str"},{"label":"Public","value":"public","type":"str"}],"payload":"","topic":"topic","topicType":"msg","x":1160,"y":1140,"wires":[["3f41634b.73b8fc"]]},{"id":"3f41634b.73b8fc","type":"function","z":"9ae7d6dd.0d8cc8","name":"network","func":"var network = msg.payload\nflow.set('network',network);\nreturn msg;","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is deployed.\nvar network = \"test\"\nflow.set('network',network);","finalize":"","x":1420,"y":1140,"wires":[[]]},{"id":"8c6546ec.478878","type":"debug","z":"9ae7d6dd.0d8cc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1320,"y":360,"wires":[]},{"id":"dc7cec58.04e1e","type":"debug","z":"9ae7d6dd.0d8cc8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1310,"y":420,"wires":[]},{"id":"9351e1ec.b79db","type":"comment","z":"9ae7d6dd.0d8cc8","name":"Bug - Cannot create more than 31 \\n Makes 1 more than requested - #00","info":"","x":1180,"y":580,"wires":[]},{"id":"423bfbfe.7d03b4","type":"debug","z":"9ae7d6dd.0d8cc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1430,"y":160,"wires":[]},{"id":"f001f6f.dec0e08","type":"debug","z":"9ae7d6dd.0d8cc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1430,"y":200,"wires":[]},{"id":"bf69fe1e.c09f5","type":"debug","z":"9ae7d6dd.0d8cc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1430,"y":240,"wires":[]},{"id":"13fd3a28.66f666","type":"debug","z":"9ae7d6dd.0d8cc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1430,"y":280,"wires":[]},{"id":"e862b209.ae8cc","type":"debug","z":"9ae7d6dd.0d8cc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":990,"y":120,"wires":[]},{"id":"ed36461a.64d508","type":"debug","z":"9ae7d6dd.0d8cc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":790,"y":120,"wires":[]},{"id":"c034165e.712cc8","type":"debug","z":"9ae7d6dd.0d8cc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":610,"y":120,"wires":[]},{"id":"771e4cb4.c0f634","type":"debug","z":"9ae7d6dd.0d8cc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":540,"wires":[]},{"id":"980b3aa8.a4c208","type":"comment","z":"9ae7d6dd.0d8cc8","name":"Max price 5 \\n Offers 0,1,&2 editions more expensive","info":"","x":1270,"y":100,"wires":[]},{"id":"7dd6660f.e835e8","type":"tab","label":"NFT TOML Generator","disabled":false,"info":""},{"id":"8e58f2f8.fb524","type":"ui_text_input","z":"7dd6660f.e835e8","name":"Asset Code","label":"Asset Code","tooltip":"","group":"d056479a.01bde8","order":1,"width":0,"height":0,"passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":350,"y":80,"wires":[["25496ac8.dcc7d6"]]},{"id":"2e95e494.c6e58c","type":"ui_text","z":"7dd6660f.e835e8","group":"206fda83.d44196","order":1,"width":6,"height":8,"name":"TOML","label":"TOML","format":"{{msg.payload}}","layout":"col-center","x":810,"y":600,"wires":[]},{"id":"25496ac8.dcc7d6","type":"function","z":"7dd6660f.e835e8","name":"code","func":"var code = msg.payload\nflow.set('code',code);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":530,"y":80,"wires":[[]]},{"id":"11011d4f.d5feb3","type":"ui_button","z":"7dd6660f.e835e8","name":"Generate TOML","group":"d056479a.01bde8","order":10,"width":6,"height":1,"passthru":false,"label":"Generate TOML","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","topicType":"str","x":160,"y":600,"wires":[["bf824d52.c80c"]]},{"id":"cbddb6eb.997298","type":"function","z":"7dd6660f.e835e8","name":"00","func":"var code = flow.get('code',code);\nvar issuer = flow.get('issuer',issuer);\nvar decimals = flow.get('decimals',decimals);\nvar anchored = flow.get('anchored',anchored);\nvar name = flow.get('name',name);\nvar desc = flow.get('desc',desc);\nvar conditions = flow.get('conditions',conditions);\nvar image = flow.get('image',image);\nvar count = flow.get('count',count);\n\nmsg.payload=msg.payload+\"\\n\\n[[CURRENCIES]]\\n\"+'code=\"'+code+count+'\"\\n'+'issuer=\"'+issuer+'\"\\n'+'display_decimals='+decimals+'\\n'+\"is_asset_anchored=\"+anchored+'\\n'+'name=\"'+name+'\"\\n'+'desc=\"'+desc+' edition#'+count+'\"\\n'+'conditions=\"'+conditions+'\"\\n'+'image=\"'+image+'\"'\n//msg.payload=msg.payload+'code=\"'+code+'\"'+'issuer=\"'\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":620,"y":600,"wires":[["2e95e494.c6e58c","2ba0e884.d5b8e8"]]},{"id":"e741d3.a8f72e3","type":"ui_text_input","z":"7dd6660f.e835e8","name":"issuer","label":"issuer","tooltip":"","group":"d056479a.01bde8","order":2,"width":0,"height":0,"passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":330,"y":120,"wires":[["6f8e3a4c.a02434"]]},{"id":"6f8e3a4c.a02434","type":"function","z":"7dd6660f.e835e8","name":"issuer","func":"var issuer = msg.payload\nflow.set('issuer',issuer);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":530,"y":120,"wires":[[]]},{"id":"ec3fb106.c1bab","type":"ui_text_input","z":"7dd6660f.e835e8","name":"decimals","label":"decimals","tooltip":"","group":"d056479a.01bde8","order":3,"width":0,"height":0,"passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":340,"y":160,"wires":[["e99b72d4.6bd58"]]},{"id":"e99b72d4.6bd58","type":"function","z":"7dd6660f.e835e8","name":"decimals","func":"var decimals = msg.payload\nflow.set('decimals',decimals);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":160,"wires":[[]]},{"id":"2ba0e884.d5b8e8","type":"debug","z":"7dd6660f.e835e8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":540,"wires":[]},{"id":"dbc4355e.e19a78","type":"ui_text_input","z":"7dd6660f.e835e8","name":"anchored","label":"anchored","tooltip":"","group":"d056479a.01bde8","order":4,"width":0,"height":0,"passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":340,"y":200,"wires":[["2f4afc53.0fcad4"]]},{"id":"2f4afc53.0fcad4","type":"function","z":"7dd6660f.e835e8","name":"anchored","func":"var anchored = msg.payload\nflow.set('anchored',anchored);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":200,"wires":[[]]},{"id":"f65a96ce.d75f48","type":"ui_text_input","z":"7dd6660f.e835e8","name":"name","label":"name","tooltip":"","group":"d056479a.01bde8","order":5,"width":0,"height":0,"passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":330,"y":240,"wires":[["827e48b7.5a1ee8"]]},{"id":"827e48b7.5a1ee8","type":"function","z":"7dd6660f.e835e8","name":"issuer","func":"var name = msg.payload\nflow.set('name',name);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":530,"y":240,"wires":[[]]},{"id":"b396ed8f.b07c9","type":"ui_text_input","z":"7dd6660f.e835e8","name":"desc","label":"desc","tooltip":"","group":"d056479a.01bde8","order":6,"width":0,"height":0,"passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":330,"y":280,"wires":[["94f61f4a.a84f3"]]},{"id":"94f61f4a.a84f3","type":"function","z":"7dd6660f.e835e8","name":"decimals","func":"var desc = msg.payload\nflow.set('desc',desc);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":280,"wires":[[]]},{"id":"fd8e8c5a.c5386","type":"ui_text_input","z":"7dd6660f.e835e8","name":"conditions","label":"conditions","tooltip":"","group":"d056479a.01bde8","order":7,"width":0,"height":0,"passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":340,"y":320,"wires":[["e2e0d121.a5d7c"]]},{"id":"e2e0d121.a5d7c","type":"function","z":"7dd6660f.e835e8","name":"issuer","func":"var conditions = msg.payload\nflow.set('conditions',conditions);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":530,"y":320,"wires":[[]]},{"id":"76c80ad3.d5e834","type":"ui_text_input","z":"7dd6660f.e835e8","name":"image","label":"image","tooltip":"","group":"d056479a.01bde8","order":8,"width":0,"height":0,"passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":330,"y":360,"wires":[["947baa01.11fc48"]]},{"id":"947baa01.11fc48","type":"function","z":"7dd6660f.e835e8","name":"decimals","func":"var image = msg.payload\nflow.set('image',image);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":360,"wires":[[]]},{"id":"25719890.b1a758","type":"ui_text_input","z":"7dd6660f.e835e8","name":"quantity","label":"quantity","tooltip":"","group":"d056479a.01bde8","order":9,"width":0,"height":0,"passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":340,"y":400,"wires":[["d9b0176c.9af988"]]},{"id":"d9b0176c.9af988","type":"function","z":"7dd6660f.e835e8","name":"quantity","func":"var quantity = msg.payload\nflow.set('quantity',quantity);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":400,"wires":[[]]},{"id":"46cc08c1.10a178","type":"function","z":"7dd6660f.e835e8","name":"","func":"var code = flow.get('code',code);\nvar issuer = flow.get('issuer',issuer);\nvar decimals = flow.get('decimals',decimals);\nvar anchored = flow.get('anchored',anchored);\nvar name = flow.get('name',name);\nvar desc = flow.get('desc',desc);\nvar conditions = flow.get('conditions',conditions);\nvar image = flow.get('image',image);\n\nmsg.payload=\"[[CURRENCIES]]\\n\"+'code=\"'+code+'\"\\n'+'issuer=\"'+issuer+'\"\\n'+'decimals='+decimals+'\\n'+\"anchored=\"+anchored+'\\n'+'name=\"'+name+'\"\\n'+'desc=\"'+desc+'\"\\n'+'conditions=\"'+conditions+'\"\\n'+'image=\"'+image+'\"'\n//msg.payload=msg.payload+'code=\"'+code+'\"'+'issuer=\"'\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":640,"y":480,"wires":[[]]},{"id":"a9365ec1.7dfb4","type":"switch","z":"7dd6660f.e835e8","name":"count","property":"count","propertyType":"flow","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":470,"y":660,"wires":[["cbddb6eb.997298"],["a3f3e243.16201"]]},{"id":"fd5e2bcf.dc21e8","type":"function","z":"7dd6660f.e835e8","name":"count-1","func":"var count=flow.get('count',count)\ncount= count-1\n\nflow.set('count',count)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":520,"y":780,"wires":[["a9365ec1.7dfb4"]]},{"id":"bf824d52.c80c","type":"function","z":"7dd6660f.e835e8","name":"setup count","func":"var count = flow.get('quantity',count);\nflow.set('count',count);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":340,"y":600,"wires":[["a9365ec1.7dfb4"]]},{"id":"a3f3e243.16201","type":"function","z":"7dd6660f.e835e8","name":"","func":"var code = flow.get('code',code);\nvar issuer = flow.get('issuer',issuer);\nvar decimals = flow.get('decimals',decimals);\nvar anchored = flow.get('anchored',anchored);\nvar name = flow.get('name',name);\nvar desc = flow.get('desc',desc);\nvar conditions = flow.get('conditions',conditions);\nvar image = flow.get('image',image);\nvar count = flow.get('count',count);\n\nmsg.payload=msg.payload+\"\\n\\n\\n[[CURRENCIES]]\\n\\n\"+'code=\"'+code+count+'\"\\n\\n'+'issuer=\"'+issuer+'\"\\n\\n'+'display_decimals='+decimals+'\\n\\n'+\"is_asset_anchored=\"+anchored+'\\n\\n'+'name=\"'+name+'\"\\n\\n'+'desc=\"'+desc+' edition#'+count+'\"\\n\\n'+'conditions=\"'+conditions+'\"\\n\\n'+'image=\"'+image+'\"'\n//msg.payload=msg.payload+'code=\"'+code+'\"'+'issuer=\"'\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":600,"y":680,"wires":[["fd5e2bcf.dc21e8"]]},{"id":"c24acee5.55115","type":"tab","label":"NFT Multimaker nosell","disabled":false,"info":""},{"id":"5b2c21f7.bd5df","type":"inject","z":"c24acee5.55115","name":"","props":[{"p":"secret","v":"SBSZQMYX2EAT6MGDOAJ3OONFHT6TVVWLLAZEESRIQ7G3CYLHTCWTC3UX","vt":"str"},{"p":"name","v":"COOL","vt":"str"},{"p":"iss","v":"GBN5VTPXODILAQTMMB23ML5B7RKF657YXXALLWFKGZPSW53QGR6OUG4L","vt":"str"},{"p":"op","v":"changeTrust","vt":"str"},{"p":"dest","v":"GAC4LTCWBQAVRNXP67QMT55KZ3BIYPVMLIC46FYSO6HN2ZFZLFKW5WJX","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":170,"y":180,"wires":[["e6f94184.3fe5f"]]},{"id":"224ae177.363a9e","type":"comment","z":"c24acee5.55115","name":"Create Multiple NFTs","info":"","x":350,"y":120,"wires":[]},{"id":"c3cee975.8c5ba8","type":"ui_button","z":"c24acee5.55115","name":"Create NFTs","group":"60973256.20713c","order":8,"width":"6","height":"1","passthru":false,"label":"Create NFTs","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","topicType":"str","x":100,"y":320,"wires":[["8f30390b.9e0e08","ae1fb466.09b438"]]},{"id":"f1c7ce20.95a5d","type":"ui_text_input","z":"c24acee5.55115","name":"Asset - Name","label":"Asset - Name","tooltip":"","group":"60973256.20713c","order":2,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1180,"y":920,"wires":[["70ea4da1.941954"]]},{"id":"8ef3bf7a.660e6","type":"ui_text_input","z":"c24acee5.55115","name":"Amount","label":"Amount (max 30)","tooltip":"","group":"60973256.20713c","order":5,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1160,"y":1040,"wires":[["6ba422a8.9537fc"]]},{"id":"727b6f1.20c869","type":"ui_text_input","z":"c24acee5.55115","name":"Secret Key - Origin","label":"Secret Key - Origin","tooltip":"","group":"60973256.20713c","order":1,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1190,"y":880,"wires":[["4f4e1ede.e3393"]]},{"id":"927c5a37.bdb248","type":"ui_text_input","z":"c24acee5.55115","name":"Data","label":"Data (IPFS CID)","tooltip":"","group":"60973256.20713c","order":3,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1150,"y":960,"wires":[["749f51c4.154fc"]]},{"id":"749f51c4.154fc","type":"function","z":"c24acee5.55115","name":"data","func":"var data = msg.payload\nflow.set('data',data);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1390,"y":960,"wires":[[]]},{"id":"70ea4da1.941954","type":"function","z":"c24acee5.55115","name":"asset","func":"var asset = msg.payload\nflow.set('asset',asset);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1390,"y":920,"wires":[[]]},{"id":"4f4e1ede.e3393","type":"function","z":"c24acee5.55115","name":"secretdist","func":"var secretdist = msg.payload\nflow.set('secretdist',secretdist);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1400,"y":880,"wires":[[]]},{"id":"6ba422a8.9537fc","type":"function","z":"c24acee5.55115","name":"count","func":"var count = msg.payload\nflow.set('count',count);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1390,"y":1040,"wires":[[]]},{"id":"e6f94184.3fe5f","type":"function","z":"c24acee5.55115","name":"Setup StellarSDK flow.transaction \\n fund new keypair","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon-testnet.stellar.org\");\n\nvar asset = flow.get('asset',asset)\n\n//var op = msg.op\nflow.set('StellarSdk',StellarSdk);\nflow.set('server',server);\n//node.send(msg)\n\nconst pair = StellarSdk.Keypair.random();\nmsg.secret=pair.secret();\nmsg.public=pair.publicKey();\n\nvar secretiss = msg.secret;\nvar assetiss = msg.public\nflow.set('assetiss',assetiss)\n\nvar secretdist = flow.get('secretdist',secretdist);\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretdist);\n\n\nvar transaction;\n\n//node.send(msg)\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.TESTNET,\n    })\n      .addOperation(\n        StellarSdk.Operation.createAccount({\n          destination: msg.public,\n          startingBalance: \"1.5\",\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n      flow.set('transaction',transaction);\n      node.send(msg)\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":410,"y":180,"wires":[["51452265.044b4c","8b82cbc0.189d88"]]},{"id":"ec5fe2c2.192f1","type":"ui_text","z":"c24acee5.55115","group":"60973256.20713c","order":9,"width":0,"height":0,"name":"Success text display","label":"","format":"{{msg.payload}}","layout":"row-spread","x":1340,"y":500,"wires":[]},{"id":"8f30390b.9e0e08","type":"change","z":"c24acee5.55115","name":"Status Update","rules":[{"t":"set","p":"payload","pt":"msg","to":"Building NFTs","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":500,"wires":[["ec5fe2c2.192f1"]]},{"id":"51452265.044b4c","type":"function","z":"c24acee5.55115","name":"add trust","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretdist = flow.get('secretdist',secretdist);\nvar asset = flow.get('asset',asset)\nvar assetiss = msg.public\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar count = flow.get('count',count)\n\nif (count<10){\n    count=\"0\"+count\n}\n\n/*if (count<100){\n    count=\"0\"+count\n}\n*/\nflow.set('count',count)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar transaction;\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n      .addOperation(\n        StellarSdk.Operation.changeTrust({\n          asset: new StellarSdk.Asset(asset+count,assetiss),\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":680,"y":180,"wires":[["1421f444.b1155c","e6fb4e45.7764d"]]},{"id":"64865776.81c008","type":"function","z":"c24acee5.55115","name":"sign and submit \\n add data+domain \\n lock account","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretdist = flow.get('secretdist',secretdist);\nvar asset = flow.get('asset',asset)\nvar assetiss = flow.get('assetiss',assetiss)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar secretiss = msg.secret\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar distKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar dist = distKeys.publicKey()\nvar transaction;\n\nvar data = flow.get('data',data)\nvar domain = flow.get('domain',domain)\n\nserver\n  .loadAccount(dist)\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n       .addOperation(\n        StellarSdk.Operation.manageData({\n          name: \"ipfs CID (base64)\",\n          value: data,\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n      .addOperation(\n        StellarSdk.Operation.setOptions({\n          masterWeight: \"0\",\n          homeDomain: domain,\n          setFlags: 0x4,\n          //setFlags: 0x4|\"1\",\n          //setFlags: AuthImmutableFlag\n          //setFlags: StellarSdk.AuthImmutableFlag\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n    //node.send(msg)\n      // A memo allows you to add your own metadata to a transaction. It's\n      // optional and does not affect how Stellar treats the transaction.\n      .addMemo(StellarSdk.Memo.text('NFT by RedHorizon'))\n      // Wait a maximum of three minutes for the transaction\n      .setTimeout(180)\n      .build();\n     // msg.xdr=transaction.toEnvelope().toXDR('base64')\n    //node.send(msg)\n    // Sign the transaction to prove you are actually the person sending it.\n    transaction.sign(sourceKeys);\n    transaction.sign(distKeys);\n    // And finally, send it off to Stellar!\n    msg.xdr=transaction.toEnvelope().toXDR('base64')\n    msg.payload=\"Submitting to Stellar\"\n    node.send(msg)\n    return server.submitTransaction(transaction);\n  })\n  .then(function (result) {\n    console.log(\"Success! Results:\", result);\n    msg.payload=\"Success\"+\" https://stellar.expert/explorer/testnet/account/\"+sourceKeys.publicKey();\n    node.send(msg);\n  })\n  .catch(function (error) {\n    msg.error=\"Something went wrong! \"+ error;\n    node.send(msg)\n    // If the result is unknown (no response body, timeout etc.) we simply resubmit\n    // already built transaction:\n    // server.submitTransaction(transaction);\n  });","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1110,"y":420,"wires":[["ec5fe2c2.192f1","601c642.f33059c"]]},{"id":"1421f444.b1155c","type":"function","z":"c24acee5.55115","name":"send token","func":"var StellarSdk = flow.get(\"StellarSdk\");\nvar server = flow.get('server',server);\nvar secretiss = msg.secret;\nvar asset = flow.get('asset',asset)\nvar assetiss = msg.public\n//var amount = flow.get('amount',amount)\n//var op = msg.op\n//flow.set('StellarSDK',StellarSDK);\n//flow.set('server',server);\nvar count = flow.get('count',count)\n\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretiss);\nvar transaction;\n\nvar secretdist = flow.get('secretdist',secretdist)\nvar distKeys = StellarSdk.Keypair.fromSecret(secretdist);\nvar dist = distKeys.publicKey()\n\nserver\n  .loadAccount(dist)\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = flow.get('transaction',transaction)\n    \n      .addOperation(\n        StellarSdk.Operation.payment({\n          destination: dist,\n          // Because Stellar allows transaction in many currencies, you must\n          // specify the asset type. The special \"native\" asset represents Lumens.\n          //asset: StellarSdk.Asset.native(),\n          asset: new StellarSdk.Asset(asset+count,assetiss),\n          amount: \".0000001\",\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n     flow.set('transaction',transaction);\n      node.send(msg)\n   // return server.submitTransaction(transaction);\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":850,"y":180,"wires":[["b2abbfc7.db2ea","d775854f.ccc6c8"]]},{"id":"d775854f.ccc6c8","type":"switch","z":"c24acee5.55115","name":"count","property":"count","propertyType":"flow","rules":[{"t":"neq","v":"00","vt":"str"},{"t":"eq","v":"00","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":930,"y":340,"wires":[["6a210153.80028","107cf14e.b06d7f"],["64865776.81c008"]]},{"id":"6a210153.80028","type":"function","z":"c24acee5.55115","name":"count-1","func":"var count=flow.get('count',count)\ncount= count-1\n\nflow.set('count',count)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1100,"y":340,"wires":[["51452265.044b4c","e9cc65bb.f02e28"]]},{"id":"e1d8b434.7ff528","type":"ui_text_input","z":"c24acee5.55115","name":"domain","label":"Home domain (no https://www.)","tooltip":"","group":"60973256.20713c","order":4,"width":"0","height":"0","passthru":true,"mode":"text","delay":"300","topic":"","topicType":"str","x":1160,"y":1000,"wires":[["d5f836e6.3ac928"]]},{"id":"d5f836e6.3ac928","type":"function","z":"c24acee5.55115","name":"domain","func":"var domain = msg.payload\nflow.set('domain',domain);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1400,"y":1000,"wires":[[]]},{"id":"e9cc65bb.f02e28","type":"change","z":"c24acee5.55115","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"count","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1320,"y":440,"wires":[["ec5fe2c2.192f1"]]},{"id":"ae1fb466.09b438","type":"switch","z":"c24acee5.55115","name":"Network Switch","property":"network","propertyType":"flow","rules":[{"t":"eq","v":"test","vt":"str"},{"t":"eq","v":"public","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":280,"y":380,"wires":[["e6f94184.3fe5f"],["6653b8d.1f9f648"]]},{"id":"6653b8d.1f9f648","type":"function","z":"c24acee5.55115","name":"Setup StellarSDK flow.transaction \\n fund new keypair","func":"var StellarSdk = global.get(\"stellarsdk\");\nvar server = new StellarSdk.Server(\"https://horizon.stellar.org\");\n\nvar asset = flow.get('asset',asset)\n\n//var op = msg.op\nflow.set('StellarSdk',StellarSdk);\nflow.set('server',server);\n//node.send(msg)\n\nconst pair = StellarSdk.Keypair.random();\nmsg.secret=pair.secret();\nmsg.public=pair.publicKey();\n\nvar secretiss = msg.secret;\nvar assetiss = msg.public\nflow.set('assetiss',assetiss)\n\nvar secretdist = flow.get('secretdist',secretdist);\nvar sourceKeys = StellarSdk.Keypair.fromSecret(secretdist);\n\n\nvar transaction;\n\n//node.send(msg)\n\nserver\n  .loadAccount(sourceKeys.publicKey())\n\n  .then(function (sourceAccount) {\n    // Start building the transaction.\n    transaction = new StellarSdk.TransactionBuilder(sourceAccount, {\n      fee: StellarSdk.BASE_FEE,\n      networkPassphrase: StellarSdk.Networks.PUBLIC,\n    })\n      .addOperation(\n        StellarSdk.Operation.createAccount({\n          destination: msg.public,\n          startingBalance: \"1.5\",\n          source: sourceKeys.publicKey()\n        }),\n      )\n      \n      flow.set('transaction',transaction);\n      node.send(msg)\n  })\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":460,"y":480,"wires":[["51452265.044b4c","e22e931e.cc126"]]},{"id":"801d6251.4f55a","type":"ui_dropdown","z":"c24acee5.55115","name":"","label":"Network","tooltip":"","place":"Test","group":"60973256.20713c","order":7,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"Test","value":"test","type":"str"},{"label":"Public","value":"public","type":"str"}],"payload":"","topic":"topic","topicType":"msg","x":1160,"y":1120,"wires":[["3681bd62.bccd82"]]},{"id":"3681bd62.bccd82","type":"function","z":"c24acee5.55115","name":"network","func":"var network = msg.payload\nflow.set('network',network);\nreturn msg;","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is deployed.\nvar network = \"test\"\nflow.set('network',network);","finalize":"","x":1420,"y":1120,"wires":[[]]},{"id":"107cf14e.b06d7f","type":"debug","z":"c24acee5.55115","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1320,"y":340,"wires":[]},{"id":"601c642.f33059c","type":"debug","z":"c24acee5.55115","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1310,"y":400,"wires":[]},{"id":"1b35241b.74fb2c","type":"comment","z":"c24acee5.55115","name":"Bug - Cannot create more than 31 \\n Makes 1 more than requested - #00","info":"","x":1180,"y":560,"wires":[]},{"id":"b2abbfc7.db2ea","type":"debug","z":"c24acee5.55115","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":990,"y":100,"wires":[]},{"id":"e6fb4e45.7764d","type":"debug","z":"c24acee5.55115","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":790,"y":100,"wires":[]},{"id":"8b82cbc0.189d88","type":"debug","z":"c24acee5.55115","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":610,"y":100,"wires":[]},{"id":"e22e931e.cc126","type":"debug","z":"c24acee5.55115","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":520,"wires":[]},{"id":"1f563092.450a6f","type":"ui_group","name":"Check Balances","tab":"ddc63819.638318","order":1,"disp":true,"width":"7","collapse":false},{"id":"c3c52113.338a9","type":"ui_group","name":"Send Transaction","tab":"ddc63819.638318","order":2,"disp":true,"width":"12","collapse":false},{"id":"ad15b2e3.60848","type":"ui_group","name":"Make Offer","tab":"ddc63819.638318","order":3,"disp":true,"width":"6","collapse":false},{"id":"a947341d.96f6c8","type":"ui_group","name":"Generate New Keypair","tab":"eaad2b20.f0cd48","order":1,"disp":true,"width":"12","collapse":false},{"id":"62ad21f6.478228","type":"ui_group","name":"Kraken Prices","tab":"9ed4e3c0.ac177","order":1,"disp":true,"width":"6","collapse":false},{"id":"d19bed92.49b26","type":"ui_group","name":"Coinqvest Mainnet Horizon","tab":"a42d0f0e.3a4d6","order":1,"disp":true,"width":"6","collapse":false},{"id":"9fc23374.89621","type":"ui_group","name":"Create Token","tab":"db86bec0.04bbb","order":1,"disp":true,"width":"6","collapse":false},{"id":"95bece1d.a187c","type":"ui_group","name":"NFT Maker","tab":"73449d79.7a6494","order":null,"disp":true,"width":"6","collapse":false},{"id":"8d9479b0.c2e3b8","type":"ui_group","name":"NFT Multimaker","tab":"73449d79.7a6494","order":1,"disp":true,"width":"6","collapse":false},{"id":"d056479a.01bde8","type":"ui_group","name":"Group 1","tab":"f24bc689.bae5a8","order":1,"disp":true,"width":"12","collapse":false},{"id":"206fda83.d44196","type":"ui_group","name":"Group 2","tab":"f24bc689.bae5a8","order":2,"disp":true,"width":6},{"id":"60973256.20713c","type":"ui_group","name":"NFT Nosell","tab":"73449d79.7a6494","order":2,"disp":true,"width":"6","collapse":false},{"id":"ddc63819.638318","type":"ui_tab","name":"Testnet Wallet","icon":"dashboard","order":1,"disabled":false,"hidden":false},{"id":"eaad2b20.f0cd48","type":"ui_tab","name":"Account Generator","icon":"dashboard","order":3,"disabled":false,"hidden":false},{"id":"9ed4e3c0.ac177","type":"ui_tab","name":"Prices","icon":"dashboard","order":4,"disabled":false,"hidden":false},{"id":"a42d0f0e.3a4d6","type":"ui_tab","name":"Coinqvest Horizon","icon":"dashboard","order":7,"disabled":false,"hidden":false},{"id":"db86bec0.04bbb","type":"ui_tab","name":"Token Generator","icon":"dashboard","order":5,"disabled":false,"hidden":false},{"id":"73449d79.7a6494","type":"ui_tab","name":"NFT Generator","icon":"dashboard","order":12,"disabled":false,"hidden":false},{"id":"f24bc689.bae5a8","type":"ui_tab","name":"NFT TOML Generator","icon":"dashboard","order":8,"disabled":false,"hidden":false}]

Flow Info

Created 1 year, 4 months ago
Updated 2 months, 3 weeks ago
Rating: not yet rated

Actions

Rate:

Node Types

Core
  • change (x19)
  • comment (x27)
  • debug (x42)
  • delay (x2)
  • function (x114)
  • http request (x2)
  • inject (x14)
  • switch (x12)
Other
  • group (x2)
  • tab (x9)
  • ui_button (x16)
  • ui_dropdown (x3)
  • ui_gauge (x2)
  • ui_group (x12)
  • ui_tab (x7)
  • ui_text (x20)
  • ui_text_input (x53)
  • ui_toast (x1)

Tags

  • Stellar
  • Lumens
  • XLM
  • Horizon
  • SDK
  • blockchain
  • DLT
  • crypto
  • cryptocurrency
  • SDEx
  • decentralized
  • dex
  • stellarred
  • redhorizon
  • blockshangerous
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option