Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Validating IOTA address
// The snippet is a part of the IOTA Developer Essentials project. You can reach it at
// Complete description and story behind the snippet is available at:
// Requirement: Tangle.Net library (!nuget install Tangle.Net)
#r "Tangle.Net.dll"
using Tangle.Net.Entity;
using Tangle.Net.Utils;
//address including checksum
if (!InputValidator.IsTrytes(InputAddr) || InputAddr.Length != 90)
Console.WriteLine("Not valid input address incl. checksum was given.");
} else {
var Adr = new Address(InputAddr);
Console.WriteLine("Input address incl checksum:");
Console.WriteLine("Is it valid addr based on checksum? " + Adr.HasValidChecksum().ToString());
Console.WriteLine("Input address excl checksum:");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment