p

co.topl

utils

package utils

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package codecs
  2. package exceptions
  3. package serialization

Type Members

  1. trait AsBytes[EncodingFailure, Decoded] extends AnyRef

    A typeclass which encodes a value to a byte array

    A typeclass which encodes a value to a byte array

    Usage:

    import cats.implicits._
    import co.topl.utils.AsBytes.implicits._
    
    sealed abstract class StringAsBytesFailure
    implicit val stringAsBytes: AsBytes[StringAsBytesFailure, String] = _.getBytes("UTF-8").validNec
    
    "Test".encodeAsBytes[StringAsBytesFailure]
    EncodingFailure

    The domain-specific failure conditions from encoding the domain object. If encoding is never expected to fail, you may specify Infallible as the type which grants access to a helper operation for direct encoding without validation

    Decoded

    The domain-specific representation

  2. trait FromBytes[DecodeFailure, Decoded] extends AnyRef

    A typeclass which decodes a value from a byte array

    A typeclass which decodes a value from a byte array

    Usage:

    import cats.implicits._
    import co.topl.utils.FromBytes.implicits._
    
    sealed abstract class BytesAsStringFailure
    implicit val bytesAsString: FromBytes[BytesAsStringFailure, String] = new String(_, "UTF-8").validNec
    
    val bytes: Array[Byte] = ???
    bytes.decodeTo[BytesAsStringFailure, String]
    DecodeFailure

    The domain-specific failure conditions from decoding the domain object. If decoding is never expected to fail, you may specify Infallible as the type which grants access to a helper operation for direct decoding without validation

    Decoded

    The domain-specific representation

  3. trait Identifiable[A] extends AnyRef

    Helper type class to define named methods in abstract classes

  4. case class Identifier(typeString: String, typePrefix: Byte) extends Product with Serializable
  5. final class Infallible extends AnyRef

    This type is used in Codecs that have no failure cases and are only expected to succeed.

    This type is used in Codecs that have no failure cases and are only expected to succeed. Because the constructor is private, implementations are unable to instantiate one, thus guaranteeing a successful encode or decode attempt.

  6. final class Int128 extends ScalaNumber with ScalaNumericConversions with Serializable with Ordered[Int128]
  7. trait Int128IsIntegral extends Integral[Int128]

    A trait demonstrating that Int128 can be seen as both Numeric and "whole"

  8. trait Int128Ordering extends Ordering[Int128]

    A trait demonstrating that Int128 can be seen as Ordering

  9. trait Logging extends StrictLogging
  10. class MalformedModifierError extends Exception with ModifierError

    Permanent modifier error that could not be recovered in future even after any history updates

    Permanent modifier error that could not be recovered in future even after any history updates

    Annotations
    @SuppressWarnings()
  11. trait ModifierError extends AnyRef

    Base trait for errors that were occurred during NodeView Modifier validation

  12. case class MultipleErrors(errors: Seq[ModifierError]) extends Exception with Product with Serializable

    Composite error class that can hold more than one modifier error inside.

    Composite error class that can hold more than one modifier error inside. This was not made a ModifierError instance intentionally to prevent nesting MultipleErrors to MultipleErrors

    Annotations
    @SuppressWarnings()
  13. sealed abstract class NetworkType extends AnyRef

    Attributes of a network type such as its name and whether to start forging once it's ready

  14. class RecoverableModifierError extends Exception with ModifierError

    Temporary modifier error that may be recovered in future after some history updates

    Temporary modifier error that may be recovered in future after some history updates

    Annotations
    @SuppressWarnings()
  15. trait TimeProvider extends AnyRef

Value Members

  1. object AsBytes
  2. object Extensions
  3. object FromBytes
  4. object Gzip
  5. object Identifiable
  6. object Int128 extends VersionSpecificInt128Integral with Serializable

    Container for a 128 bit signed integer stored in big-endian format.

    Container for a 128 bit signed integer stored in big-endian format. Adopted from the original work available at https://github.com/PlatformLab/TorcDB/blob/master/src/main/java/net/ellitron/torc/util/Int128.java by Jonathan Ellithorpe (jde@cs.stanford.edu)

  7. object LocalTimeProvider extends TimeProvider
  8. object NetworkType
  9. object NetworkUtils
  10. object ScorexExtensions
  11. object TimeProvider

Ungrouped