View Source Kadena.Pact.Number (Kadena v0.19.0)

Implementation for Pact.Number functions.

Link to this section Summary

Link to this section Types

@type error() :: {:error, Keyword.t()}
@type pact_decimal() :: Kadena.Types.PactDecimal.t()
@type pact_int() :: Kadena.Types.PactInt.t()
@type pact_number() :: pact_decimal() | pact_int()
@type str() :: String.t()
@type valid_json_str() :: {:ok, str()}
@type valid_pact_number() :: {:ok, pact_number()}
@type value() :: str() | pact_number()

Link to this section Functions

@spec to_json_string(value()) :: valid_json_str() | error()
@spec to_pact_decimal(str :: str()) :: valid_pact_number() | error()
@spec to_pact_integer(str :: str()) :: valid_pact_number() | error()