You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// IdentityIDs returns the identifiers contained in this role
70
-
IdentityIDs() ([]string, error)
71
-
}
72
-
```
73
-
54
+
The role is defined by the [`Role`](./../../token/services/identity/roles.go) interface.
74
55
This interface offers functions for managing identities within the role.
75
56
You, as the developer, have the flexibility to implement a role using any identity representation that best fits your application's needs.
76
57
77
58
A default implementation is provided under [`token/services/identity/role`](./../../token/services/identity/role).
78
59
79
60
## Understanding Wallets in More Detail
80
61
81
-
The Token-SDK abstracts the wallet management via a service called `WalletService`.
82
-
Here is the interface that defines such a service:
62
+
The Token-SDK abstracts the wallet management via an interface called [`WalletService`](./../../token/driver/wallet.go) that is part of the `Driver API`.
63
+
The `WalletService` interface gives access to the available wallets.
64
+
You, as the developer, have the flexibility to implement a `WalletService` that best fits your application's needs.
83
65
84
-
```go
85
-
// WalletService models the wallet service that handles issuer, recipient, auditor and certifier wallets
86
-
typeWalletServiceinterface {
87
-
// RegisterRecipientIdentity registers the passed recipient identity together with the associated audit information
The HashiCorp Vault Secrets Engine is a modular component of Vault designed to securely manage, store, or generate sensitive data such as API keys, passwords, certificates, and encryption keys.
90
+
The identity service provides an implementation for both the `IdentityDB` and `Keystore` based on the `HashiCorp Vault Secrets Engine`.
91
+
This implementation can be found under [`hashicorp`](./../../token/services/identity/storage/kvs/hashicorp).
92
+
This implementation requires to configure the `HashiCorp Vault Secrets Engine` to run in non-versioned mode (i.e., stores the most recently written value for a key).
93
+
For more information about non-versioned secrets engine mode, refer to the (https://developer.hashicorp.com/vault/docs/secrets/kv/kv-v1).
110
94
111
-
// OwnerWalletIDs returns the list of owner wallet identifiers
112
-
OwnerWalletIDs() ([]string, error)
95
+
In order to use this integration, the developer must do the following:
96
+
1. Implement the `identity.StorageProvider` interface.
97
+
2. Register this implementation in [`Dig`](https://github.com/hyperledger-labs/fabric-smart-client/blob/main/docs/sdk.md) via decoration like this:
98
+
```go
99
+
p.Container().Decorate(NewMixedStorageProvider)
100
+
```
101
+
This can be added in the Application Dig SDK that links that token-sdk Dig SDK.
113
102
114
-
// OwnerWallet returns an instance of the OwnerWallet interface bound to the passed id.
115
-
// The id can be: the wallet identifier or a unique id of a view identity belonging to the wallet.
Copy file name to clipboardExpand all lines: docs/services/storage.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,25 +6,26 @@ This system leverages several databases, each with a specific purpose:
6
6
***Transaction Database (`ttxdb`)**:
7
7
This critical database serves as the central repository for all transaction records.
8
8
It captures every token issuance, transfer, or redemption, providing a complete historical record of token activity within the network.
9
-
The `ttxdb` service is locate under [`token/services/ttxdb`](./../../token/services/ttxdb).
9
+
The `ttxdb` service is locate under [`token/services/ttxdb`](./../../token/services/ttxdb). It is accessible via the `ttx` service.
10
10
11
11
***Token Database (`tokendb`)**:
12
12
The `tokendb` acts as the registry for all tokens within the system.
13
13
It stores detailed information about each token, including its unique identifier, denomination type (think currency or unique identifier), current ownership, and total quantity in circulation.
14
14
By referencing the `tokendb`, developers and network participants can obtain a clear picture of the token landscape.
15
15
The `tokendb` is used by the `Token Selector`, to select the tokens to use in each transaction, and by the `Token Vault Service` to provide its services.
16
-
The `tokendb` service is locate under [`token/services/tokendb`](./../../token/services/tokendb).
16
+
The `tokendb` service is locate under [`token/services/tokendb`](./../../token/services/tokendb). It is accessible via the `tokens` service.
17
17
18
18
***Audit Database (`auditdb`)** (if applicable):
19
19
For applications requiring enhanced auditability, the `auditdb` provides an additional layer of transparency.
20
20
It meticulously stores audit records for transactions that have undergone the auditing process.
21
21
This functionality is particularly valuable for scenarios where regulatory compliance or tamper-proof records are essential.
22
-
The `auditdb` service is locate under [`token/services/auditdb`](./../../token/services/auditdb).
22
+
The `auditdb` service is locate under [`token/services/auditdb`](./../../token/services/auditdb). It is accessible via the `auditor` service.
23
23
24
24
***Identity Database (`identitydb`)**:
25
25
The `identitydb` plays a crucial role in managing user identities and wallets within the network.
26
26
It securely stores wallet configurations, identity-related audit information, and so on, enabling secure interactions with the token system.
27
-
The `identitydb` service is locate under [`token/services/identitydb`](./../../token/services/identitydb).
27
+
The `identitydb` service is locate under [`token/services/identitydb`](./../../token/services/identitydb).
28
+
It is used by the `identity` service via its interfaces. Please, refer to the [`identity service`](identity.md) for more information about the storage part.
0 commit comments