@@ -43,6 +43,7 @@ The C++ SDK for interacting with a [Hiero](https://hiero.org) network.
4343- [ NASM] ( https://www.nasm.us ) (` nasm.exe ` must be added to ` %PATH% ` )
4444
4545#### Run
46+
4647``` powershell
4748New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
4849```
@@ -93,12 +94,12 @@ cmake --build --preset macos-arm64-release
9394
9495The following optional flags can be added during configuration:
9596
96- | Flag | Default | Description |
97- | ------| ---------| -------------|
98- | ` BUILD_TESTS ` | ` OFF ` | Include the test suite in the build |
99- | ` BUILD_TCK ` | ` OFF ` | Include TCK tests in the build |
100- | ` BUILD_EXAMPLES ` | ` OFF ` | Include example programs in the build |
101- | ` BUILD_TCK_TESTS ` | ` OFF ` | Include TCK Server unit tests in the build |
97+ | Flag | Default | Description |
98+ | ----------------- | ------- | ------------------------------------------ |
99+ | ` BUILD_TESTS ` | ` OFF ` | Include the test suite in the build |
100+ | ` BUILD_TCK ` | ` OFF ` | Include TCK tests in the build |
101+ | ` BUILD_EXAMPLES ` | ` OFF ` | Include example programs in the build |
102+ | ` BUILD_TCK_TESTS ` | ` OFF ` | Include TCK Server unit tests in the build |
102103
103104Example with all options enabled:
104105
@@ -148,9 +149,7 @@ Once your local network is running, verify the configuration in `config/local_no
148149 "network" : {
149150 "0.0.3" : " 127.0.0.1:50211"
150151 },
151- "mirrorNetwork" : [
152- " 127.0.0.1:5600"
153- ],
152+ "mirrorNetwork" : [" 127.0.0.1:5600" ],
154153 "operator" : {
155154 "accountId" : " 0.0.2" ,
156155 "privateKey" : " 302e020100300506032b65700422042091132178e72057a1d7528025956fe39b0b847f200ab59b2fdd367017f3087137"
@@ -172,21 +171,23 @@ Examples demonstrate various SDK features and must be run from the project root
172171
173172Create a ` .env ` file in the project root with the following variables:
174173
175- | Variable | Description |
176- | ----------| -------------|
177- | ` OPERATOR_ID ` | The ID of the operator account (e.g., ` 0.0.1234 ` ) |
178- | ` OPERATOR_KEY ` | The DER-encoded hex private key of the operator account |
179- | ` HIERO_NETWORK ` | Network name: ` mainnet ` , ` testnet ` , or ` previewnet ` |
180- | ` PASSPHRASE ` | (Optional) Passphrase for mnemonic-based key generation |
174+ | Variable | Description |
175+ | --------------- | ------------------------------------------------------- |
176+ | ` OPERATOR_ID ` | The ID of the operator account (e.g., ` 0.0.1234 ` ) |
177+ | ` OPERATOR_KEY ` | The DER-encoded hex private key of the operator account |
178+ | ` HIERO_NETWORK ` | Network name: ` mainnet ` , ` testnet ` , or ` previewnet ` |
179+ | ` PASSPHRASE ` | (Optional) Passphrase for mnemonic-based key generation |
181180
182181### Running Examples
183182
184183#### Mac
184+
185185``` C++
186186package/Release/Darwin/arm64/examples/Release/<EXAMPLE -NAME >
187187```
188188
189189#### Windows
190+
190191``` C++
191192package\Release\Windows\AMD64 \examples\Release\<EXAMPLE -NAME >
192193```
@@ -212,7 +213,30 @@ You can run all examples using the provided scripts:
212213- macOS/Linux: ` run_examples.sh `
213214- Windows: ` run_examples.bat `
214215
215- Before running, update the ` EXECUTABLES_DIRECTORY ` variable in the script to point to your build output folder.
216+ By default, ` run_examples.sh ` auto-detects common build output folders. You can override with:
217+
218+ ``` sh
219+ EXECUTABLES_DIRECTORY=build/linux-x64-release/src/sdk/examples/Release ./run_examples.sh
220+ ```
221+
222+ The script also supports manifest-driven behavior for CI:
223+
224+ - ` EXAMPLE_MANIFEST_PATH ` : Override the manifest path (defaults to ` .ci/examples-manifest.txt ` )
225+ - ` DEFAULT_TIMEOUT_SECONDS ` : Per-example timeout default (defaults to ` 180 ` )
226+
227+ ### CI Example Validation
228+
229+ Examples are automatically validated in CI by the ` Run Examples ` workflow:
230+
231+ - Workflow: ` .github/workflows/flow-run-examples.yaml `
232+ - Manifest: ` .ci/examples-manifest.txt `
233+ - Results: ` .ci/example-results.txt `
234+ - Failure excerpts: ` .ci/example-failures.txt `
235+
236+ The CI workflow sets ` HIERO_TESTNET_CONFIG_PATH=config/local_node.json ` so examples that call ` Client::forTestnet() `
237+ execute against a Solo local network instead of public testnet.
238+
239+ The workflow fails when any non-skipped example fails.
216240
217241## Contributing
218242
0 commit comments