Skip to content

Commit

Permalink
Temp 18: Rename JVM tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Oct 11, 2023
1 parent 30a548c commit be982c7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 97 deletions.
97 changes: 0 additions & 97 deletions bdk-jvm/lib/src/test/kotlin/org/bitcoindevkit/JvmLibTest.kt

This file was deleted.

33 changes: 33 additions & 0 deletions bdk-jvm/lib/src/test/kotlin/org/bitcoindevkit/WalletTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package org.bitcoindevkit

import org.junit.Assert.*
import org.junit.Test
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import java.io.File
import java.nio.file.Files

class WalletTest {
@Test
fun testNetwork() {
val signetNetwork = Network.SIGNET
}

@Test
fun testDescriptorBip86() {
val mnemonic = Mnemonic(WordCount.WORDS12)
val descriptorSecretKey = DescriptorSecretKey(Network.TESTNET, mnemonic, null)
val descriptor = Descriptor.newBip86(descriptorSecretKey, KeychainKind.EXTERNAL, Network.TESTNET)
}

@Test
fun testUsedWallet() {
val descriptor1 = Descriptor("wpkh(tprv8ZgxMBicQKsPf2qfrEygW6fdYseJDDrVnDv26PH5BHdvSuG6ecCbHqLVof9yZcMoM31z9ur3tTYbSnr1WBqbGX97CbXcmp5H6qeMpyvx35B/84h/1h/0h/0/*)", Network.TESTNET)
// val mnemonic = Mnemonic(WordCount.WORDS12)
// val descriptorSecretKey = DescriptorSecretKey(Network.TESTNET, mnemonic, null)
// val descriptor = Descriptor.newBip86(descriptorSecretKey, KeychainKind.EXTERNAL, Network.TESTNET)
val wallet = Wallet(descriptor1, null, Network.TESTNET, WalletType.MEMORY)
val (index, address, keychain) = wallet.getAddress(AddressIndex.LastUnused)
println("Address ${address.asString()} at index $index")
}
}

0 comments on commit be982c7

Please sign in to comment.