Interface Wallet


public interface Wallet
A wallet stores identity information used to connect to a Hyperledger Fabric network. Instances are created using factory methods on Wallets.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String label)
    Get an identity from the wallet.
    Get the labels of all identities in the wallet.
    void
    put(String label, Identity identity)
    Put an identity into the wallet.
    void
    remove(String label)
    Remove an identity from the wallet.
  • Method Details

    • put

      void put(String label, Identity identity) throws IOException
      Put an identity into the wallet.
      Parameters:
      label - Label used to identify the identity within the wallet.
      identity - Identity to store in the wallet.
      Throws:
      IOException - if an error occurs accessing the backing store.
    • get

      Identity get(String label) throws IOException
      Get an identity from the wallet. The implementation class of the identity object will vary depending on its type.
      Parameters:
      label - Label used to identify the identity within the wallet.
      Returns:
      An identity if it exists; otherwise null.
      Throws:
      IOException - if an error occurs accessing the backing store.
    • list

      Set<String> list() throws IOException
      Get the labels of all identities in the wallet.
      Returns:
      Identity labels.
      Throws:
      IOException - if an error occurs accessing the backing store.
    • remove

      void remove(String label) throws IOException
      Remove an identity from the wallet. If the identity does not exist, this method does nothing.
      Parameters:
      label - Label used to identify the identity within the wallet.
      Throws:
      IOException - if an error occurs accessing the backing store.