Add Kotlin API docs for new AddressInfo type
This commit is contained in:
parent
ac600a1312
commit
5ee8698e0a
@ -24,12 +24,14 @@ enum class Network {
|
|||||||
*
|
*
|
||||||
* @property index Child index of this address.
|
* @property index Child index of this address.
|
||||||
* @property address Address.
|
* @property address Address.
|
||||||
|
* @property keychain Type of keychain.
|
||||||
*
|
*
|
||||||
* @sample org.bitcoindevkit.addressInfoSample
|
* @sample org.bitcoindevkit.addressInfoSample
|
||||||
*/
|
*/
|
||||||
data class AddressInfo (
|
data class AddressInfo (
|
||||||
var index: UInt,
|
var index: UInt,
|
||||||
var address: String
|
var address: Address,
|
||||||
|
var keychain: KeychainKind
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -846,6 +848,9 @@ class Address(address: String) {
|
|||||||
* Quoting BIP 173 "inside QR codes uppercase SHOULD be used, as those permit the use of alphanumeric mode, which is 45% more compact than the normal byte mode."
|
* Quoting BIP 173 "inside QR codes uppercase SHOULD be used, as those permit the use of alphanumeric mode, which is 45% more compact than the normal byte mode."
|
||||||
*/
|
*/
|
||||||
fun toQrUri(): String
|
fun toQrUri(): String
|
||||||
|
|
||||||
|
/** Return the address as a string. */
|
||||||
|
fun asString(): String
|
||||||
}}
|
}}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,7 +87,7 @@ fun addressInfoSample() {
|
|||||||
|
|
||||||
val newAddress: AddressInfo = wallet.getAddress(AddressIndex.New)
|
val newAddress: AddressInfo = wallet.getAddress(AddressIndex.New)
|
||||||
|
|
||||||
println("New address at index ${newAddress.index} is ${newAddress.address}")
|
println("New address at index ${newAddress.index} is ${newAddress.address.asString()}")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun blockchainSample() {
|
fun blockchainSample() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user