Implement RPCOp getCashBalances().

This commit is contained in:
Chris Rankin
2017-02-22 13:57:15 +00:00
parent 8b1864e07c
commit 221278197a
4 changed files with 52 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package net.corda.core.messaging
import com.google.common.util.concurrent.ListenableFuture
import net.corda.core.contracts.Amount
import net.corda.core.contracts.ContractState
import net.corda.core.contracts.StateAndRef
import net.corda.core.contracts.UpgradedContract
@ -18,6 +19,7 @@ import rx.Observable
import java.io.InputStream
import java.io.OutputStream
import java.time.Instant
import java.util.*
data class StateMachineInfo(
val id: StateMachineRunId,
@ -95,6 +97,12 @@ interface CordaRPCOps : RPCOps {
*/
fun getVaultTransactionNotes(txnId: SecureHash): Iterable<String>
/*
* 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.
*/
fun getCashBalances(): Map<Currency, Amount<Currency>>
/**
* Checks whether an attachment with the given hash is stored on the node.
*/