Add kotlin api-docs for Address.payload() and Address.network()
This commit is contained in:
parent
20c31d5383
commit
cbd44249f3
@ -794,10 +794,48 @@ class Script(rawOutputScript: List<UByte>)
|
|||||||
* @param address The address in string format.
|
* @param address The address in string format.
|
||||||
*/
|
*/
|
||||||
class Address(address: String) {
|
class Address(address: String) {
|
||||||
|
/** Return the Payload */
|
||||||
|
fun payload(): Payload
|
||||||
|
|
||||||
|
/** Return the Network. */
|
||||||
|
fun Network(): Network
|
||||||
|
|
||||||
/** Return the ScriptPubKey. */
|
/** Return the ScriptPubKey. */
|
||||||
fun scriptPubkey(): Script
|
fun scriptPubkey(): Script
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The method used to produce an address.
|
||||||
|
*/
|
||||||
|
sealed class Payload {
|
||||||
|
/** P2PKH address. */
|
||||||
|
data class PubkeyHash(
|
||||||
|
val `pubkeyHash`: List<UByte>
|
||||||
|
) : Payload()
|
||||||
|
|
||||||
|
/** P2SH address. */
|
||||||
|
data class ScriptHash(
|
||||||
|
val `scriptHash`: List<UByte>
|
||||||
|
) : Payload()
|
||||||
|
/** Segwit address. */
|
||||||
|
data class WitnessProgram(
|
||||||
|
val `version`: WitnessVersion,
|
||||||
|
val `program`: List<UByte>
|
||||||
|
) : Payload()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Version of the witness program.
|
||||||
|
*
|
||||||
|
* Helps limit possible versions of the witness according to the specification. If a plain u8 type
|
||||||
|
* was used instead it would mean that the version may be > 16, which would be incorrect.
|
||||||
|
* First byte of scriptPubkey in transaction output for transactions starting with opcodes ranging
|
||||||
|
* from 0 to 16 (inclusive).
|
||||||
|
*/
|
||||||
|
enum class WitnessVersion {
|
||||||
|
V0,V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mnemonic phrases are a human-readable version of the private keys. Supported number of words are 12, 15, 18, 21 and 24.
|
* Mnemonic phrases are a human-readable version of the private keys. Supported number of words are 12, 15, 18, 21 and 24.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user