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
Copy file name to clipboardExpand all lines: README.md
+43-37Lines changed: 43 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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.
4
5
5
6
> [!NOTE]
6
7
> 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:
13
14
14
15
```xml
15
16
<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>
18
19
<version>VERSION</version>
19
20
</dependency>
20
21
```
@@ -24,40 +25,42 @@ To use this module, you need to add the following dependency to your project:
24
25
To configure the module, you need to add the following properties to your application.properties file:
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.
35
38
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.
38
41
39
42
### Usage
40
43
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.
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.
56
59
57
60
```java
58
61
59
62
@Service
60
-
publicclassHederaAccountService {
63
+
publicclassHieroAccountService {
61
64
62
65
@Autowired
63
66
privateFileClient fileClient;
@@ -70,19 +73,18 @@ public class HederaAccountService {
70
73
}
71
74
```
72
75
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).
75
78
76
-
### Hedera Spring Sample
79
+
### Hiero Spring Sample
77
80
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.
81
83
To use the application, you need to have created a Hedera testnet account at the [Hedera portal](https://portal.hedera.com/).
82
84
The account information can be added to the `application.properties` file in the `hedera-spring-sample` module:
0 commit comments