Class WalletType
Base type for implementing custom wallet types.
Inheritance
Namespace: Hyperledger.Indy.WalletApi
Assembly: Hyperledger.Indy.Sdk.dll
Syntax
public abstract class WalletType : Object
Constructors
WalletType()
Initializes a new WalletType.
Declaration
protected WalletType()
Methods
Close(Int32)
Allows an implementer to close a wallet.
Declaration
public abstract ErrorCode Close(int walletHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | walletHandle | The handle of the wallet to close. |
Returns
Type | Description |
---|---|
ErrorCode | An ErrorCode value indicating the outcome of the operation. |
Remarks
When implementing a custom wallet this method is responsible for closing the wallet with the handle allocated earlier in the Open(String, String, String, String, out Int32) method.
Create(String, String, String)
Allows an implementer to create a new wallet.
Declaration
public abstract ErrorCode Create(string name, string config, string credentials)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the wallet to create. |
System.String | config | The configuration for the wallet. |
System.String | credentials | The credentials for the wallet. |
Returns
Type | Description |
---|---|
ErrorCode | An ErrorCode value indicating the outcome of the operation. |
Remarks
When implementing a custom wallet this method is responsible for creating the new wallet and storing its configuration and credentials.
Delete(String, String, String)
Allows an implementer to delete a wallet.
Declaration
public abstract ErrorCode Delete(string name, string config, string credentials)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the wallet being deleted |
System.String | config | The configuration of the wallet. |
System.String | credentials | The credentials of the wallet. |
Returns
Type | Description |
---|---|
ErrorCode | An ErrorCode value indicating the outcome of the operation. |
Remarks
When implementing a custom wallet this method is responsible for deleting a wallet created
earlier via the Create(String, String, String) method. The value of the
credentials
parameter should be used to control access whether or not
the wallet can be deleted.
GetWalletByHandle(Int32)
Gets a wallet by its handle.
Declaration
protected abstract ICustomWallet GetWalletByHandle(int walletHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | walletHandle | The handle of the wallet. |
Returns
Type | Description |
---|---|
ICustomWallet | The wallet instance associated with the handle. |
Open(String, String, String, String, out Int32)
Allows an implementer to open a wallet.
Declaration
public abstract ErrorCode Open(string name, string config, string runtimeConfig, string credentials, out int walletHandle)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the wallet to open. |
System.String | config | The configuration for the wallet. |
System.String | runtimeConfig | The runtime configuration for the wallet. |
System.String | credentials | The credentials of the wallet. |
System.Int32 | walletHandle | The handle assigned to the wallet. |
Returns
Type | Description |
---|---|
ErrorCode | An ErrorCode value indicating the outcome of the operation. |
Remarks
When implementing a custom wallet this method is responsible for opening the wallet and returning
a handle for the opened wallet. The value of the runtimeConfig
parameter
should override any corresponding values provided in the config
parameter
and value of the credentials
parameter should be used to control access
to the wallet.