devman
devman

Reputation: 504

corda - how to implement corda accounts in a node?

I am using Corda Version 4.

My CorDapp has four nodes - Notary node (validating), "Node A", "Node B" and "Node C".

Node A and Node B are to be designed as private nodes, being accessible to one user each. Node C is a public node, accessible to 5 users.

From documentation in URL "https://github.com/corda/accounts", I understood that by using Corda Accounts the Node C can partition the vault into 5 subsets, where each subset represents an account or user.

To achieve this should I define accounts in node configuration in build.gradle? Is there any example in the git?

Upvotes: 1

Views: 333

Answers (1)

Adel Rustum
Adel Rustum

Reputation: 2548

  1. RPC users are defined inside node.conf, where the user is able to connect to the node and call flows.
  2. Accounts is something different, before Corda 4.3 a state would be owned by a party/node so for every user you had to have a node, with Accounts library they introduced a stated called AccountInfo which has a host field which is the node that hosts the account, UUID field (unique on network level), and name field (sort of a username) which is unique on host level (i.e. you can create an account devman on NodeA and account devman on NodeB and they are considered different).

Anyway, there are a lot of concepts in the Accounts library and it's not possible to answer them here, have a look at the IOU example using accounts: https://github.com/opticyclic/corda-accounts-demo
Also the library itself has 3 examples, I recommend looking at the GoldTrading one since it's the most simple one.

Upvotes: 3

Related Questions