AddressInfo

data class AddressInfo(var index: UInt, var address: String)

A derived address and the index it was found at.

Samples


fun main() { 
   //sampleStart 
   val wallet: Wallet = Wallet(
    descriptor = descriptor,
    changeDescriptor = changeDescriptor,
    network = Network.TESTNET,
    databaseConfig = DatabaseConfig.Memory
)

fun getLastUnusedAddress(): AddressInfo {
    return wallet.getAddress(AddressIndex.NEW)
}

val newAddress: AddressInfo = getLastUnusedAddress()

println("New address at index ${newAddress.index} is ${newAddress.address}") 
   //sampleEnd
}

Constructors

Link copied to clipboard
fun AddressInfo(index: UInt, address: String)

Properties

Link copied to clipboard
var address: String

Address.

Link copied to clipboard
var index: UInt

Child index of this address.