Skip to content

Commit 34b4d93

Browse files
committed
readme updated
1 parent 5d97e9e commit 34b4d93

File tree

1 file changed

+43
-37
lines changed

1 file changed

+43
-37
lines changed

README.md

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# Hedera Enterprise
2-
This project provides Java modules to integrate [Hedera network](https://hedera.com) smoothless in a Spring Boot or Eclipse Microprofile (like Quarkus) application.
3-
This module is based on the [Hedera Java SDK](https://github.com/hashgraph/hedera-sdk-java).
1+
# Hiero Enterprise
2+
This project provides Java modules to interact with a [Hiero network](https://hiero.org) in a Java Enterprise application.
3+
The project provides integrations to Spring Boot or Eclipse Microprofile (like Quarkus) for interacting with Hiero.
4+
This module is based on the [Hedera Java SDK](https://github.com/hashgraph/hedera-sdk-java)(will be migrated to Hiero Java SDK in near future) and provides a set of managed services to interact with a Hiero network.
45

56
> [!NOTE]
67
> The repo is currently transformed to be compatible with the vendor neutral [Hiero](hiero.org) project.
@@ -13,8 +14,8 @@ To use this module, you need to add the following dependency to your project:
1314

1415
```xml
1516
<dependency>
16-
<groupId>com.open-elements.hedera</groupId>
17-
<artifactId>hedera-spring</artifactId>
17+
<groupId>com.open-elements.hiero</groupId>
18+
<artifactId>hiero-spring</artifactId>
1819
<version>VERSION</version>
1920
</dependency>
2021
```
@@ -24,40 +25,42 @@ To use this module, you need to add the following dependency to your project:
2425
To configure the module, you need to add the following properties to your application.properties file:
2526

2627
```properties
27-
spring.hedera.accountId=0.0.53854625
28-
spring.hedera.privateKey=2130020100312346052b8104400304220420c236508c429395a8180b1230f436d389adc5afaa9145456783b57b2045c6cc37
29-
spring.hedera.network=testnet
28+
spring.hiero.accountId=0.0.53854625
29+
spring.hiero.privateKey=2130020100312346052b8104400304220420c236508c429395a8180b1230f436d389adc5afaa9145456783b57b2045c6cc37
30+
spring.hiero.network=hedera-testnet
3031
```
3132

32-
The account information (accountId, privateKey, publicKey) can all be found at the
33-
[Hedera portal](https://portal.hedera.com/) for a testnet or previewnet account.
34-
Today only the "DER Encoded Private Key" of the "ECDSA" key type is supported for the `spring.hedera.privateKey` property.
33+
The `spring.hiero.network` property defines the network that is used to interact with the Hiero network.
34+
In the given example, the [Hedera](https://hedera.com) testnet network is used.
35+
Hedera is based on Hiero and therefore the testnet can be used to interact with a Hiero network.
36+
The account information (`accountId`, `privateKey`) can all be found at the [Hedera portal](https://portal.hedera.com/) for a testnet or previewnet account.
37+
Today only the "DER Encoded Private Key" of the "ECDSA" key type is supported for the `spring.hiero.privateKey` property.
3538

36-
The 2 properties `spring.hedera.accountId` and `spring.hedera.privateKey` define the so called "operation account".
37-
The operational account is used as the account that sends all transactions against the Hedera network.
39+
The 2 properties `spring.hiero.accountId` and `spring.hiero.privateKey` define the "operator account".
40+
The operator account is used as the account that sends all transactions against the Hiero network.
3841

3942
### Usage
4043

41-
To use the module, you need to add the `@EnableHedera` annotation to your Spring Boot application class.
44+
To use the module, you need to add the `@EnableHiero` annotation to your Spring Boot application class.
4245

4346
```java
44-
import com.open.elements.spring.hedera.EnableHedera;
47+
import com.open.elements.spring.hiero.EnableHiero;
4548

4649
@SpringBootApplication
47-
@EnableHedera
50+
@EnableHiero
4851
public class Application {
4952
public static void main(String[] args) {
5053
SpringApplication.run(Application.class, args);
5154
}
5255
}
5356
```
5457

55-
Once that is done you can for example autowire the `FileClient` class and call the methods to interact with the Hedera network.
58+
Once that is done you can for example autowire the `FileClient` class and call the methods to interact with a Hiero network.
5659

5760
```java
5861

5962
@Service
60-
public class HederaAccountService {
63+
public class HieroAccountService {
6164

6265
@Autowired
6366
private FileClient fileClient;
@@ -70,19 +73,18 @@ public class HederaAccountService {
7073
}
7174
```
7275

73-
All APIs of the client are synchronous and return the result of the operation. For asynchronous operations, you can
74-
easily wrap calls by use the [`@Async` annotation of spring](https://spring.io/guides/gs/async-method).
76+
All APIs of the client are synchronous and return the result of the operation.
77+
For asynchronous operations, you can easily wrap calls by use the [`@Async` annotation of spring](https://spring.io/guides/gs/async-method).
7578

76-
### Hedera Spring Sample
79+
### Hiero Spring Sample
7780

78-
A sample application that uses the Hedera Spring module can be found in the `hedera-spring-sample` module.
79-
The sample application is a simple Spring Boot application that reads has a REST endpoint at `localhost:8080/` and
80-
shows the hbar balance of the account `0.0.100`.
81+
A sample application that uses the Hiero Spring module can be found in the `hiero-spring-sample` module.
82+
The sample application is a simple Spring Boot application that reads has a REST endpoint at `localhost:8080/` and shows the hbar balance of the account `0.0.100` on the Hedera testnet.
8183
To use the application, you need to have created a Hedera testnet account at the [Hedera portal](https://portal.hedera.com/).
8284
The account information can be added to the `application.properties` file in the `hedera-spring-sample` module:
8385
```properties
84-
spring.hedera.accountId=0.0.3447271
85-
spring.hedera.privateKey=2130020100312346052b8104400304220420c236508c429395a8180b1230f436d389adc5afaa9145456783b57b2045c6cc37
86+
spring.hiero.accountId=0.0.3447271
87+
spring.hiero.privateKey=2130020100312346052b8104400304220420c236508c429395a8180b1230f436d389adc5afaa9145456783b57b2045c6cc37
8688
```
8789

8890
Alternatively, you can provide the account information as environment variables:
@@ -97,30 +99,34 @@ The support for Microprofile is still in development and can not be used yet.
9799

98100
## Managed services
99101

100-
The module provides a set of managed services that can be used to interact with the Hedera network.
102+
The module provides a set of managed services that can be used to interact with a Hiero network.
101103
The following services are available in spring and microprofile:
102104

103-
- `com.openelements.hiero.base.AccountClient`: to interact with Hedera accounts
104-
- `com.openelements.hiero.base.FileClient`: to interact with Hedera files
105-
- `com.openelements.hiero.base.SmartContractClient`: to interact with Hedera smart contracts
105+
- `com.openelements.hiero.base.AccountClient`: to interact with accounts
106+
- `com.openelements.hiero.base.FileClient`: to interact with files
107+
- `com.openelements.hiero.base.SmartContractClient`: to interact with smart contracts
106108
- `com.openelements.hiero.base.ContractVerificationClient`: to verify smart contracts
107-
- `com.openelements.hiero.base.NftClient`: to interact with Hedera NFTs
109+
- `com.openelements.hiero.base.NftClient`: to interact with NFTs
108110
- `com.openelements.hiero.base.NftRepository`: to query NFTs
109111

110112
Next to that the following low-level services are available:
111113

112-
- `com.openelements.hiero.base.protocol.ProtocolLayerClient`: to interact with the Hedera protocol layer
113-
- `com.openelements.hiero.base.mirrornode.MirrorNodeClient`: to query the Hedera mirror node
114+
- `com.openelements.hiero.base.protocol.ProtocolLayerClient`: to interact with the Hiero protocol layer
115+
- `com.openelements.hiero.base.mirrornode.MirrorNodeClient`: to query the Hiero mirror node
114116

115117
## Built the project
116118

117-
The project is based on [Maven](https://maven.apache.org/). To build the project, you can use the following command:
119+
The project is based on [Maven](https://maven.apache.org/).
120+
To build the project, you can use the following command:
118121

119122
```shell
120123
./mvnw verify
121124
```
122125

123-
The tests in the project are working against the Hedera testnet.
126+
The tests in the project are working against any Hiero network.
127+
You need to provide the account id and the private key of an account that is used to run the tests.
128+
**If no account is provided, the tests will fail.**
129+
The most easy way to run the tests is to use the Hedera testnet network.
124130
To run the tests, you need to provide the account id and the "DER Encoded Private Key" of the "ECDSA" testnet account.
125131
That information can be provided as environemt variables:
126132

@@ -134,8 +140,8 @@ As an alternative you can define the information in a `.env` file in each sub-mo
134140
The file should look like this:
135141

136142
```
137-
spring.hedera.accountId=0.0.3447271
138-
spring.hedera.privateKey=2130020100312346052b8104400304220420c236508c429395a8180b1230f436d389adc5afaa9145456783b57b2045c6cc37
143+
spring.hiero.accountId=0.0.3447271
144+
spring.hiero.privateKey=2130020100312346052b8104400304220420c236508c429395a8180b1230f436d389adc5afaa9145456783b57b2045c6cc37
139145
```
140146

141147
### Create a release

0 commit comments

Comments
 (0)