SpendingProposal

abstract class SpendingProposal(val onAccept: suspend SpendingProposal.() -> Unit)

Inheritors

Constructors

Link copied to clipboard
constructor(onAccept: suspend SpendingProposal.() -> Unit)

Properties

Link copied to clipboard

Is this spending proposal accepted? Accepted means that this wallet has "oked" it. But it might not be ready yet. call accept() to set 0 if not accepted, otherwise millinow at the time of acceptance

Link copied to clipboard

Automatically post the completed transaction to the blockchain when completed

Link copied to clipboard

Derived class sets to millinow when this spending proposal contains enough information to actually spend

Link copied to clipboard
Link copied to clipboard
abstract val info: String?
Link copied to clipboard
var job: Job?
Link copied to clipboard
Link copied to clipboard
val onAccept: suspend SpendingProposal.() -> Unit
Link copied to clipboard

Wallet sets to millinow when this completed proposal's transaction is seen in tx pools.

Link copied to clipboard
abstract val title: String?
Link copied to clipboard

Is this spending proposal valid? call invalidate() to assign to false

Functions

Link copied to clipboard
open suspend fun accept()
Link copied to clipboard
open suspend fun go()

You need to override this function to actually do what should be done after acceptance. Set completed to millinow once the proposal is complete. This does not need to happen right away. There may be other steps (such as other wallet's acceptances) needed before a proposal can be completed. On startup, this function will be called again for every accepted-but-not-completed proposal.

Link copied to clipboard
open fun invalidate(reason: String)
Link copied to clipboard
open suspend fun reject()