Object

org.ergoplatform.sdk

JavaHelpers

Related Doc: package sdk

Permalink

object JavaHelpers

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JavaHelpers
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit final class StringExtensions extends AnyVal

    Permalink
  2. type TokenColl = Coll[Token]

    Permalink

    Type synonym for a collection of tokens represented using Coll

  3. implicit final class UniversalConverter[A] extends AnyVal

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def Algos: ErgoAlgos

    Permalink
  5. def AvlTreeRType: RType[AvlTree]

    Permalink
  6. def BigIntRType: RType[BigInt]

    Permalink
  7. def BoxRType: RType[Box]

    Permalink
  8. def GroupElementRType: RType[GroupElement]

    Permalink
  9. val HeaderRType: RType[Header]

    Permalink
  10. implicit val JBooleanRType: RType[Boolean]

    Permalink
  11. implicit val JByteRType: RType[Byte]

    Permalink
  12. implicit val JIntRType: RType[Integer]

    Permalink
  13. implicit val JLongRType: RType[Long]

    Permalink
  14. implicit val JShortRType: RType[Short]

    Permalink
  15. val PreHeaderRType: RType[PreHeader]

    Permalink
  16. def SigmaDsl: CostingSigmaDslBuilder

    Permalink
  17. def SigmaPropRType: RType[SigmaProp]

    Permalink
  18. implicit val TokenIdRType: RType[TokenId]

    Permalink
  19. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  20. def checkAllTokensPositive(tokens: TokenColl): TokenColl

    Permalink

    Ensures that all tokens have strictly positive value.

    Ensures that all tokens have strictly positive value.

    returns

    the original tokens collection (passes the argument through to the result)

    Exceptions thrown

    IllegalArgumentException when any token have value <= 0

  21. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. def collFrom(arr: Array[Short]): Coll[Short]

    Permalink
  23. def collFrom(arr: Array[Boolean]): Coll[Boolean]

    Permalink
  24. def collFrom(arr: Array[Int]): Coll[Int]

    Permalink
  25. def collFrom(arr: Array[Long]): Coll[Long]

    Permalink
  26. def collFrom(arr: Array[Byte]): Coll[Byte]

    Permalink
  27. def collRType[T](tItem: RType[T]): RType[Coll[T]]

    Permalink
  28. def collToByteArray(in: Coll[Byte]): Array[Byte]

    Permalink
  29. def createDataInput(boxIdBytes: Array[Byte]): DataInput

    Permalink
  30. def createDiffieHellmanTupleProverInput(g: EcPointType, h: EcPointType, u: EcPointType, v: EcPointType, x: BigInteger): DiffieHellmanTupleProverInput

    Permalink
  31. def createDiffieHellmanTupleProverInput(g: GroupElement, h: GroupElement, u: GroupElement, v: GroupElement, x: BigInteger): DiffieHellmanTupleProverInput

    Permalink
  32. def createP2PKAddress(pk: ProveDlog, networkPrefix: NetworkPrefix): P2PKAddress

    Permalink
  33. def createP2SAddress(ergoTree: ErgoTree, networkPrefix: NetworkPrefix): Pay2SAddress

    Permalink
  34. def createTokensMap(linkedMap: LinkedHashMap[ModifierId, Long]): TokensMap

    Permalink
  35. def createUnsignedInput(boxIdBytes: Array[Byte]): UnsignedInput

    Permalink
  36. def createUnsignedInput(boxId: String): UnsignedInput

    Permalink
  37. def decodeStringToBytes(base16: String): Array[Byte]

    Permalink

    Decodes this base16 string to byte array.

  38. def decodeStringToColl(base16: String): Coll[Byte]

    Permalink

    Decodes this base16 string to byte array and wrap it as Coll[Byte].

  39. def decodeStringToErgoTree(base16: String): ErgoTree

    Permalink

    Decodes this base16 string to byte array and parse it using ErgoTreeSerializer.deserializeErgoTree().

  40. def decodeStringToGE(base16: String): GroupElement

    Permalink

    Decodes this base16 string to byte array and parse it using GroupElementSerializer.

  41. def deserializeValue[T <: SValue](bytes: Array[Byte]): T

    Permalink
  42. def eip3DerivationParent(): DerivationPath

    Permalink

    Creates a new EIP-3 derivation parent path.

    Creates a new EIP-3 derivation parent path. The resulting path is the m/44'/429'/0'/0 path.

  43. def eip3DerivationWithLastIndex(index: Int): DerivationPath

    Permalink

    Creates a new EIP-3 derivation path with the given last index.

    Creates a new EIP-3 derivation path with the given last index. The resulting path corresponds to m/44'/429'/0'/0/index path.

  44. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  45. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  46. def ergoTreeTemplateBytes(ergoTree: ErgoTree): Array[Byte]

    Permalink
  47. def extractAssets(boxes: IndexedSeq[ErgoBoxCandidate]): (Map[Digest32Coll, Long], Int)

    Permalink

    Extracts a mapping (assets -> total amount) from a set of boxes passed as a parameter.

    Extracts a mapping (assets -> total amount) from a set of boxes passed as a parameter. That is, the method is checking amounts of assets in the boxes(i.e. that a box contains positive amount for an asset) and then summarize and group their corresponding amounts.

    boxes

    - boxes to check and extract assets from

    returns

    a mapping from asset id to to balance and total assets number

  48. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  49. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  50. def getStateDigest(tree: AvlTree): Array[Byte]

    Permalink
  51. def hash(s: String): String

    Permalink
  52. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  53. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  54. def mnemonicToSeed(mnemonic: String, passOpt: Option[String] = None): Array[Byte]

    Permalink

    Converts mnemonic phrase to seed it was derived from.

    Converts mnemonic phrase to seed it was derived from. This method should be equivalent to Mnemonic.toSeed().

  55. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  56. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  57. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  58. def seedToMasterKey(seedPhrase: SecretString, pass: SecretString = null, usePre1627KeyDerivation: Boolean): ExtendedSecretKey

    Permalink

    Create an extended secret key from mnemonic

    Create an extended secret key from mnemonic

    seedPhrase

    secret seed phrase to be used in prover for generating proofs.

    pass

    password to protect secret seed phrase.

    usePre1627KeyDerivation

    use incorrect(previous) BIP32 derivation, expected to be false for new wallets, and true for old pre-1627 wallets (see https://github.com/ergoplatform/ergo/issues/1627 for details)

  59. def subtractTokenColls(reducedTokens: TokenColl, subtractedTokens: TokenColl): TokenColl

    Permalink

    Compute the difference between reducedTokens collection and subtractedTokens collection.

    Compute the difference between reducedTokens collection and subtractedTokens collection. It can be thought as reducedTokens - subtractedTokens operation.

    Each collection can have many (tokenId, amount) pairs with the same tokenId. The method works by first combining all the pairs with the same tokenId and then computing the difference. The resulting collection contain a single pair for each tokenId and those token ids form a subset of tokens from the argument collections.

    One concrete use case to think of is subtractTokenColls(outputTokens, inputTokens). In this case the resulting collection of (tokenId, amount) pairs can be interpreted as: - when amount < 0 then it is to be burnt - when amount > 0 then it is to be minted

    reducedTokens

    the tokens to be subracted from

    subtractedTokens

    the tokens which amounts will be subtracted from the corresponding tokens from reducedTokens

    returns

    the differences between token amounts (matched by token ids)

  60. def subtractTokens(reducedTokens: IndexedSeq[Token], subtractedTokens: IndexedSeq[Token]): TokenColl

    Permalink

    Compute the difference between reducedTokens collection and subtractedTokens collection.

    Compute the difference between reducedTokens collection and subtractedTokens collection.

    See also

    subtractTokenColls for details

  61. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  62. def toErgoTree(sigmaBoolean: SigmaBoolean): ErgoTree

    Permalink
  63. def toIndexedSeq[T](xs: List[T]): IndexedSeq[T]

    Permalink
  64. def toSigmaBoolean(ergoTree: ErgoTree): SigmaBoolean

    Permalink
  65. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  66. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  67. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  68. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped