Im kinda noob with Corda accounts. It says on the documentation that Node operators can partition the vault on a per entity basis. For example on one node I have created 3 accounts (say its Alice, Bob and Charlie). A simple IOU flow where Alice borrowed 50 from Bob. How do you run Alice's/Bob's/Charlie's vault? Just to make sure that Charlie wont be able to see any of Bob's or Alice's previous transaction on the same node.
0
votes
1 Answers
0
votes
//Get your accountInfo
val myAccount = accountService.accountInfo(Your_AccountUUID)?.state!!.data
//Build Vault Criteria
val criteria = QueryCriteria.VaultQueryCriteria(
externalIds = listOf(myAccount.identifier.id))
//Do the query
serviceHub.vaultService.queryBy(
contractStateType = [YOUR_CORDA_STATE]::class.java,
criteria = criteria).states
Note: Account is not officially GA yet, so there is no R3 support yet. We would suggest waiting until the official release to use it in production.