View simple_message.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INDEX_PAYLOAD=$(printf "hello-world-index" | xxd -ps)\ | |
&& DATA_PAYLOAD=$(printf "some data" | xxd -ps)\ | |
&& PAYLOAD=$(echo -e "{\"payload\": {\"type\": 2,\"index\": \"$INDEX_PAYLOAD\", \"data\": \"$DATA_PAYLOAD\"}}")\ | |
&& curl --request POST --header "Content-Type: application/json" --data "$PAYLOAD" --url https://api.lb-0.testnet.chrysalis2.com/api/v1/messages |
View IOTA101_07CFD43B146C.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at https://hribek25.github.io/IOTA101/ | |
// Complete description and story behind the snippet is available at: https://hribek25.github.io/IOTA101/Allchapters_csharp.ipynb.html#07CFD43B146C | |
// Requirement: Tangle.Net library (!nuget install Tangle.Net) | |
// Requirement: Newtonsoft Json library (!nuget install Newtonsoft.Json) | |
// Requirement: RestSharp library (Simple REST and HTTP API Client used with Tangle.Net) (!nuget install RestSharp) | |
#r "Tangle.Net.dll" | |
#r "Newtonsoft.Json.dll" | |
#r "RestSharp.dll" |
View IOTA101_00663E550ADF.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at https://hribek25.github.io/IOTA101/ | |
// Complete description and story behind the snippet is available at: https://hribek25.github.io/IOTA101/Allchapters_csharp.ipynb.html#00663E550ADF | |
// Requirement: Tangle.Net library (!nuget install Tangle.Net) | |
// Requirement: Newtonsoft Json library (!nuget install Newtonsoft.Json) | |
// Requirement: RestSharp library (Simple REST and HTTP API Client used with Tangle.Net) (!nuget install RestSharp) | |
#r "Tangle.Net.dll" | |
#r "Newtonsoft.Json.dll" | |
#r "RestSharp.dll" |
View IOTA101_445C2B9485C6.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at https://hribek25.github.io/IOTA101/ | |
// Complete description and story behind the snippet is available at: https://hribek25.github.io/IOTA101/Allchapters_csharp.ipynb.html#445C2B9485C6 | |
// Requirement: Tangle.Net library (!nuget install Tangle.Net) | |
// Requirement: Newtonsoft Json library (!nuget install Newtonsoft.Json) | |
#r "Tangle.Net.dll" | |
#r "Newtonsoft.Json.dll" | |
using Tangle.Net.Entity; | |
using Newtonsoft.Json; |
View IOTA101_C65223B0864A.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at https://hribek25.github.io/IOTA101/ | |
// Complete description and story behind the snippet is available at: https://hribek25.github.io/IOTA101/Allchapters_csharp.ipynb.html#C65223B0864A | |
// Requirement: Tangle.Net library (!nuget install Tangle.Net) | |
#r "Tangle.Net.dll" | |
using Tangle.Net.Entity; | |
using Tangle.Net.Utils; | |
//address including checksum | |
var InputAddr = "CYJV9DRIE9NCQJYLOYOJOGKQGOOELTWXVWUYGQSWCNODHJAHACADUAAHQ9ODUICCESOIVZABA9LTMM9RWTHBIRSXTA"; |
View IOTA101_39B011574CF0.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at https://hribek25.github.io/IOTA101/ | |
// Complete description and story behind the snippet is available at: https://hribek25.github.io/IOTA101/Allchapters_csharp.ipynb.html#39B011574CF0 | |
// Requirement: Tangle.Net library (!nuget install Tangle.Net) | |
#r "Tangle.Net.dll" | |
using Tangle.Net.Entity; | |
var myAddr = new Address("CYJV9DRIE9NCQJYLOYOJOGKQGOOELTWXVWUYGQSWCNODHJAHACADUAAHQ9ODUICCESOIVZABA9LTMM9RW"); //some IOTA address | |
Console.WriteLine("Original input excl. checksum address:"); |
View IOTA101_2508A6FF9241.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at https://hribek25.github.io/IOTA101/ | |
// Complete description and story behind the snippet is available at: https://hribek25.github.io/IOTA101/Allchapters_csharp.ipynb.html#2508A6FF9241 | |
// Requirement: Tangle.Net library (!nuget install Tangle.Net) | |
// Requirement: Newtonsoft Json library (!nuget install Newtonsoft.Json) | |
#r "Tangle.Net.dll" | |
#r "Newtonsoft.Json.dll" | |
using Tangle.Net.Cryptography; | |
using Tangle.Net.Entity; |
View IOTA101_65788F1C3FCB.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at https://hribek25.github.io/IOTA101/ | |
// Complete description and story behind the snippet is available at: https://hribek25.github.io/IOTA101/Allchapters_csharp.ipynb.html#65788F1C3FCB | |
// Requirement: Tangle.Net library (!nuget install Tangle.Net) | |
#r "Tangle.Net.dll" | |
using Tangle.Net.Entity; | |
var seed = Seed.Random(); // Initializing new random seed | |
Console.WriteLine(seed.ToString()); | |
Console.WriteLine("Length :" + seed.ToString().Length); |
View IOTA101_67D98D069B61.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at https://hribek25.github.io/IOTA101/ | |
// Complete description and story behind the snippet is available at: https://hribek25.github.io/IOTA101/Allchapters_csharp.ipynb.html#67D98D069B61 | |
//based on https://github.com/siqniz/IOTA-Random-Seed-Generator | |
using System.Security.Cryptography; | |
private static string NewRandomSeed() | |
{ | |
string iotaseed = string.Empty; | |
using (RNGCryptoServiceProvider _ran = new RNGCryptoServiceProvider()) // The class provides crypto-safe random generator |
View IOTA101_696A395DC61B.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at https://hribek25.github.io/IOTA101/ | |
// Complete description and story behind the snippet is available at: https://hribek25.github.io/IOTA101/Allchapters_csharp.ipynb.html#696A395DC61B | |
// Requirement: Tangle.Net library (!nuget install Tangle.Net) | |
// Requirement: Newtonsoft Json library (!nuget install Newtonsoft.Json) | |
// Requirement: RestSharp library (Simple REST and HTTP API Client used with Tangle.Net) (!nuget install RestSharp) | |
#r "Tangle.Net.dll" | |
#r "Newtonsoft.Json.dll" | |
#r "RestSharp.dll" |
NewerOlder