org.hyperledger.fabric.gateway

## 接口 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`.

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `Identity` | `get(String label)` Get an identity from the wallet.
    `Set<String>` | `list()` 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.

- - ### 方法详细资料

    - #### put

          void put(String label,
                   Identity identity)
            throws IOException

      Put an identity into the wallet.
      参数:
        `label` - Label used to identify the identity within the wallet.
        `identity` - Identity to store in the wallet.
      抛出:
        `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.
      参数:
        `label` - Label used to identify the identity within the wallet.
      返回:
        An identity if it exists; otherwise null.
      抛出:
        `IOException` - if an error occurs accessing the backing store.

    - #### list

          Set<String> list()
                    throws IOException

      Get the labels of all identities in the wallet.
      返回:
        Identity labels.
      抛出:
        `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.
      参数:
        `label` - Label used to identify the identity within the wallet.
      抛出:
        `IOException` - if an error occurs accessing the backing store.

Copyright © 2023. All rights reserved.