com.r3corda.core.node.services / Wallet

# Wallet

`class Wallet`

A wallet (name may be temporary) wraps a set of states that are useful for us to keep track of, for instance, because we own them. This class represents an immutable, stable state of a wallet: it is guaranteed not to change out from underneath you, even though the canonical currently-best-known wallet may change as we learn about new transactions from our peers and generate new transactions that consume states ourselves.

This abstract class has no references to Cash contracts.

states Holds the list of states that are active and relevant. Active means they havent been consumed yet (or we dont know about it). Relevant means they contain at least one of our pubkeys.

### Types

Update | `data class Update` Represents an update observed by the Wallet that will be notified to observers. Include the StateRefs of transaction outputs that were consumed (inputs) and the ContractStates produced (outputs) to/by the transaction or transactions observed and the Wallet.

### Constructors

<init> | `Wallet(states: List<StateAndRef<ContractState>>)` A wallet (name may be temporary) wraps a set of states that are useful for us to keep track of, for instance, because we own them. This class represents an immutable, stable state of a wallet: it is guaranteed not to change out from underneath you, even though the canonical currently-best-known wallet may change as we learn about new transactions from our peers and generate new transactions that consume states ourselves.

### Properties

states | `val states: List<StateAndRef<ContractState>>`

### Functions

statesOfType | `fun <T : OwnableState> statesOfType(): List<StateAndRef<T>>`

### Companion Object Properties

NoUpdate | `val NoUpdate: Update`

### Extension Properties

cashBalances | `val Wallet.cashBalances: Map<Currency, Amount<Currency>>` Returns a map of how much cash we have in each currency, ignoring details like issuer. Note: currencies for which we have no cash evaluate to null (not present in map), not 0.

### Companion Object Extension Properties

clashingThreads | `val Wallet.clashingThreads: Set<SecureHash>`