diff --git a/packages/ternary/ternary.go b/packages/ternary/ternary.go index 31ada8e4465e97a1953cee8e51f493c863bfc0cb..cedfbebd47a1c4b3f23d705a599b1bc30daf0c02 100644 --- a/packages/ternary/ternary.go +++ b/packages/ternary/ternary.go @@ -30,6 +30,10 @@ func (trytes Trytes) ToTrits() Trits { return trits } +func (trytes Trytes) ToString() string { + return string(trytes) +} + func (this Trits) ToBytes() []byte { tritsLength := len(this) bytesLength := (tritsLength + NUMBER_OF_TRITS_IN_A_BYTE - 1) / NUMBER_OF_TRITS_IN_A_BYTE