Wallet

@Serializable
data class Wallet(var unspentInputs: List<TransactionInput> = emptyList(), val lockedInputs: List<TransactionInput> = emptyList(), val spentInputs: List<TransactionInput> = emptyList(), val unconfirmedIncomingAmounts: List<UnconfirmedInput> = emptyList(), val publicSpendKey: String, val privateSpendKey: String, val publicViewKey: String, val privateViewKey: String, val syncStartTimestamp: Long = 0, val syncStartHeight: Long = 0, val address: String = "", val primaryAddress: Boolean = false)

Wallet model.

We are using this model for saving to file.

Author

Marcus Cvjeticanin

Since

0.2.0

Constructors

Link copied to clipboard
constructor(unspentInputs: List<TransactionInput> = emptyList(), lockedInputs: List<TransactionInput> = emptyList(), spentInputs: List<TransactionInput> = emptyList(), unconfirmedIncomingAmounts: List<UnconfirmedInput> = emptyList(), publicSpendKey: String, privateSpendKey: String, publicViewKey: String, privateViewKey: String, syncStartTimestamp: Long = 0, syncStartHeight: Long = 0, address: String = "", primaryAddress: Boolean = false)

Properties

Link copied to clipboard

This subwallet's public address.

Link copied to clipboard

Inputs which have been used in a transaction, and are waiting to either be put into a block, or return to our wallet.

Link copied to clipboard
val primaryAddress: Boolean = false

The wallet has one 'main' address which we will use by default when treating it as a single user wallet.

Link copied to clipboard

The subwallet's private spend key (undefined if view wallet).

Link copied to clipboard

The subwallet's private view key.

Link copied to clipboard

This subwallet's public spend key.

Link copied to clipboard

This subwallet's public view key.

Link copied to clipboard

Inputs which have been spent in a transaction.

Link copied to clipboard

The height to begin syncing the wallet at.

Link copied to clipboard

The timestamp to begin syncing the wallet at (usually creation time or zero).

Link copied to clipboard

Inputs which have come in from a transaction we sent - either from change or from sending to ourself - we use this to display unlocked balance correctly.

Link copied to clipboard

A list of the stored transaction input data, to be used for sending transactions later.