Show / Hide Table of Contents

    Interface ICustomWallet

    Features all custom wallets must implement.

    Namespace: Hyperledger.Indy.WalletApi
    Assembly: Hyperledger.Indy.Sdk.dll
    Syntax
    public interface ICustomWallet

    Methods

    Get(String, out String)

    Allows an implementer to get a value from the wallet.

    Declaration
    ErrorCode Get(string key, out string value)
    Parameters
    Type Name Description
    System.String key

    The key of the value to get.

    System.String value

    The value obtained from the wallet.

    Returns
    Type Description
    ErrorCode

    An ErrorCode value indicating the outcome of the operation.

    Remarks

    If the key does not exist the method should return WalletNotFoundError.

    GetNotExpired(String, out String)

    Allows an implementer to get a value from the wallet if it has not expired.

    Declaration
    ErrorCode GetNotExpired(string key, out string value)
    Parameters
    Type Name Description
    System.String key

    The key of the value to get.

    System.String value

    The value obtained from the wallet.

    Returns
    Type Description
    ErrorCode

    An ErrorCode value indicating the outcome of the operation.

    Remarks

    If the key does not exist or the record associated with the key has expired then the method should return WalletNotFoundError.

    List(String, out String)

    Allows an implementer to get a list of values from the wallet that match a key prefix.

    Declaration
    ErrorCode List(string keyPrefix, out string valuesJson)
    Parameters
    Type Name Description
    System.String keyPrefix

    The key prefix for the values requested.

    System.String valuesJson

    The JSON string containing the values associated with the key prefix.

    Returns
    Type Description
    ErrorCode

    An ErrorCode value indicating the outcome of the operation.

    Remarks

    The method should return a JSON string that conforms to the following format:

    {
        "values":[
            {"key":"key_1", "value":"value_1"}, 
            ...
        ]
    }

    If no values matching the keyPrefix parameter are found the values array in the JSON should be empty.

    Set(String, String)

    Allows an implementer to set a value in the wallet.

    Declaration
    ErrorCode Set(string key, string value)
    Parameters
    Type Name Description
    System.String key

    The key of the value to set.

    System.String value

    The value to set.

    Returns
    Type Description
    ErrorCode

    An ErrorCode value indicating the outcome of the operation.

    Back to top Copyright © 2017 The Linux Foundation®