merkletree
Module Contents
alltypes
Module Contents
class
MerkleTree
Module Contents
MerkleTree
(
leafs
:
List
<
Sha256Hash
>
)
fun
generateProof
(
leafIndex
:
Int
)
:
Proof
val
leafs
:
List
<
Sha256Hash
>
val
root
:
Sha256Hash
data
class
Proof
Module Contents
Proof
(
proofItems
:
List
<
ProofItem
>
)
val
proofItems
:
List
<
ProofItem
>
fun
validates
(
merkleRoot
:
Sha256Hash
,
targetHash
:
Sha256Hash
)
:
Boolean
data
class
ProofItem
Module Contents
ProofItem
(
direction
:
ProofItemDirection
,
hash
:
Sha256Hash
)
val
direction
:
ProofItemDirection
val
hash
:
Sha256Hash
enum
class
ProofItemDirection
Module Contents
LEFT
RIGHT
data
class
Sha256Hash
Module Contents
Sha256Hash
(
digest
:
ByteArray
)
val
digest
:
ByteArray
fun
equals
(
other
:
Any
?
)
:
Boolean
fun
hashCode
(
)
:
Int
fun
toString
(
)
:
String
kotlin.ByteArray
Module Contents
fun
ByteArray
.
toHexString
(
)
:
String
kotlin.String
Module Contents
fun
String
.
toHexByteArray
(
)
:
ByteArray
package
com.btcassessors
Module Contents
class
MerkleTree
Module Contents
MerkleTree
(
leafs
:
List
<
Sha256Hash
>
)
fun
generateProof
(
leafIndex
:
Int
)
:
Proof
val
leafs
:
List
<
Sha256Hash
>
val
root
:
Sha256Hash
data
class
Sha256Hash
Module Contents
Sha256Hash
(
digest
:
ByteArray
)
val
digest
:
ByteArray
fun
equals
(
other
:
Any
?
)
:
Boolean
fun
hashCode
(
)
:
Int
fun
toString
(
)
:
String
kotlin.ByteArray
Module Contents
fun
ByteArray
.
toHexString
(
)
:
String
kotlin.String
Module Contents
fun
String
.
toHexByteArray
(
)
:
ByteArray
package
com.btcassessors.proof
Module Contents
data
class
Proof
Module Contents
Proof
(
proofItems
:
List
<
ProofItem
>
)
val
proofItems
:
List
<
ProofItem
>
fun
validates
(
merkleRoot
:
Sha256Hash
,
targetHash
:
Sha256Hash
)
:
Boolean
data
class
ProofItem
Module Contents
ProofItem
(
direction
:
ProofItemDirection
,
hash
:
Sha256Hash
)
val
direction
:
ProofItemDirection
val
hash
:
Sha256Hash
enum
class
ProofItemDirection
Module Contents
LEFT
RIGHT