Scenario:
Hyperledger Fabric: v2.2.x
What is done?
*Note: Docker based development is followed
What's next?
Now, I want to build a web app and for that, I have to use node.js sdk to execute transactions (query, invoke).
So, for doing that I need to use a File system "wallet", but I don't understand what to put inside the wallet folder or which files(crypto material) to provide?.
As per documentation
The wallet holds a set of identities – X.509 digital certificates
You can see my crypto material at the end of the question, please tell me in that what is X.509 digital certificates that the documentation is suggesting here?
Crypto material for the users of Org1
(Other folders of generated crypto material are not provided to avoid confusion)
users
├── Admin@org1.example.com
│ ├── msp
│ │ ├── admincerts
│ │ ├── cacerts
│ │ │ └── ca.org1.example.com-cert.pem
│ │ ├── config.yaml
│ │ ├── keystore
│ │ │ └── priv_sk
│ │ ├── signcerts
│ │ │ └── Admin@org1.example.com-cert.pem
│ │ └── tlscacerts
│ │ └── tlsca.org1.example.com-cert.pem
│ └── tls
│ ├── ca.crt
│ ├── client.crt
│ └── client.key
└── User1@org1.example.com
├── msp
│ ├── admincerts
│ ├── cacerts
│ │ └── ca.org1.example.com-cert.pem
│ ├── config.yaml
│ ├── keystore
│ │ └── priv_sk
│ ├── signcerts
│ │ └── User1@org1.example.com-cert.pem
│ └── tlscacerts
│ └── tlsca.org1.example.com-cert.pem
└── tls
├── ca.crt
├── client.crt
└── client.key
You should use the client APIs to populate your wallet, not just copy files to the wallet directory.
The credentials required for a client identity that you want to use to transact with a Fabric network are typically an X.509 certificate (which is effectively the identity's public key, signed by a trusted certificate authority), and associated private key (for signing messages). In the files you listed as output from crytogen, the credentials for the Org1 admin identity are:
users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
users/Admin@org1.example.com/msp/keystore/priv_sk
For the Org1 user identity, the credentials are:
users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem
users/User1@org1.example.com/msp/keystore/priv_sk
However, the sample application referred to in the tutorial you've linked uses the Certificate Authority to create new user identities (and corresponding credentials) programmatically for use by the application. I suggest you read carefully through both the tutorial, and the sample application code it refers to, to understand how this is done.