-
Notifications
You must be signed in to change notification settings - Fork 13
Add temporary API docs #88
Add temporary API docs #88
Conversation
937ac67
to
a08dc63
Compare
a08dc63
to
69d0e95
Compare
The current PR builds into this website. |
/** Return a new address after incrementing the current descriptor index. */ | ||
NEW, | ||
|
||
/** Return the address for the current descriptor index if it has not been used in a received transaction. Otherwise return a new address as with `AddressIndex.NEW`. Use with caution, if the wallet has not yet detected an address has been used it could return an already used address. This function is primarily meant for situations where the caller is untrusted; for example when deriving donation addresses on-demand for a public web page. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another nit, but I'd wrap this into multiple lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I brought all the long lines back, but didn't apply any particular rule. Do you have one in mind that you know is standard (length of line I mean?). I'm happy to apply a bit more consistently if there is a commonly agreed way to do KDocs/Javadoc documentation.
These docs look great, but for Java and Kotlin the docs can be a bit more expressive than in Rust. I recommend using this plugin: https://plugins.jetbrains.com/plugin/10389-kdoc-generator It allows you do type If you want to start with the short docs and fill in more details later I think what you have is fine for now. /**
* A blockchain client.
*
* @constructor Create a new blockchain client.
*
* @param the config for this blockchain client.
*/
class Blockchain(
config: BlockchainConfig
) {
/**
* Broadcast a transaction.
*
* @param psbt the PSBT to broadcast.
* @return the corresponding transaction id.
*/
fun broadcast(psbt: PartiallySignedBitcoinTransaction): String {}
/**
* Get the current height of the blockchain.
*
* @return the block height.
*/
fun getHeight(): UInt {}
/**
* Get the block hash of a given block.
*
* @param height the height of the block.
* @return block hash base64 encoded.
*/
fun getBlockHash(height: UInt): String {}
}
|
4971356
to
3e96aad
Compare
Thanks for the plugin recommendation! Made my life much easier. All comments have been addressed, I think this is now ready for merging. We should consider filling them up a little bit before the next release with more samples, but otherwise the core is good IMO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 3f35a18
Thanks for doing all this! should help new folks get started, and also gives a great framework for filling in more docs. |
Description
This PR adds a directory that contains the required files to build the API docs for bdk-android and bdk-jvm. The docs need to be updated and published once a release.
Notes to the reviewers
After getting comments on how specific-language API docs are useful in dev calls, I add these (albeit in a temporary fashion). We don't know how long it will be before the ability to use inline documentation is added to uniffi-rs, and so for the foreseeable future this is a good solution that will allow us to publish Kotlin API docs that work well and look good, and keep track of them in the same repository as the libraries themselves. I fully expect to remove this directory once the new workflows are in.
All Submissions: