Add Kotlin API docs for new Transaction methods

This commit is contained in:
thunderbiscuit 2023-03-08 15:20:14 -05:00
parent 1e9ecfbe52
commit d3e183a498
No known key found for this signature in database
GPG Key ID: 88253696EB836462

View File

@ -290,6 +290,23 @@ class Blockchain(
class Transaction(transactionBytes: List<UByte>) { class Transaction(transactionBytes: List<UByte>) {
/** Return the transaction bytes, bitcoin consensus encoded. */ /** Return the transaction bytes, bitcoin consensus encoded. */
fun serialize(): List<UByte> {} fun serialize(): List<UByte> {}
/**
* Returns the "weight" of this transaction, as defined by BIP141.
*
* For transactions with an empty witness, this is simply the consensus-serialized size times four. For transactions with a witness, this is the non-witness consensus-serialized size multiplied by three plus the with-witness consensus-serialized size.
*/
fun weight(): ULong {}
/** Returns the regular byte-wise consensus-serialized size of this transaction. */
fun size(): ULong {}
/**
* Returns the "virtual size" (vsize) of this transaction.
*
* Will be ceil(weight / 4.0). Note this implements the virtual size as per BIP141, which is different to what is implemented in Bitcoin Core. The computation should be the same for any remotely sane transaction.
*/
fun vsize(): ULong {}
} }
/** /**