|
1 | | -## |
2 | | -# Environment variables for sdk examples |
3 | | -## |
4 | | -# Account that will pay query and transaction fees |
5 | | -OPERATOR_ID= |
| 1 | +# ============================================================================= |
| 2 | +# Hiero SDK Swift - Environment Configuration |
| 3 | +# ============================================================================= |
| 4 | +# Copy this file to .env and fill in your values. |
| 5 | +# All HIERO_* variables are used by the test suite. |
| 6 | +# OPERATOR_* variables are used by the SDK examples. |
6 | 7 |
|
7 | | -# Default private key to use to sign for all transactions and queries |
8 | | -OPERATOR_KEY= |
| 8 | +# ============================================================================= |
| 9 | +# SDK Examples Configuration |
| 10 | +# ============================================================================= |
| 11 | +# These variables are used when running the examples in the Examples/ directory. |
9 | 12 |
|
10 | | -# Network names: `"localhost"`, `"testnet"`, `"previewnet"`, `"mainnet"` |
11 | | -NETWORK_NAME= |
| 13 | +# Account ID that will pay query and transaction fees for examples |
| 14 | +# Format: shard.realm.num (e.g., 0.0.1234) |
| 15 | +OPERATOR_ID=0.0.1234 |
12 | 16 |
|
13 | | -## |
14 | | -# Environment variables for integration tests |
15 | | -## |
16 | | -# Network names: `"localhost"`, `"testnet"`, `"previewnet"`, `"mainnet"` |
17 | | -TEST_OPERATOR_ID= |
| 17 | +# Private key to sign transactions and queries for examples |
| 18 | +# Format: DER-encoded hex string |
| 19 | +OPERATOR_KEY=302e020100300506032b657004220420... |
18 | 20 |
|
19 | | -# Default private key to use to sign for all transactions and queries |
20 | | -TEST_OPERATOR_KEY= |
| 21 | +# Network to connect to for examples |
| 22 | +# Values: localhost, testnet, previewnet, mainnet |
| 23 | +NETWORK_NAME=testnet |
21 | 24 |
|
22 | | -# Network names: `"localhost"`, `"testnet"`, `"previewnet"`, `"mainnet"` |
23 | | -TEST_NETWORK_NAME= |
| 25 | +# ============================================================================= |
| 26 | +# Integration Tests - Required Configuration |
| 27 | +# ============================================================================= |
| 28 | +# These variables are required to run integration tests (HieroIntegrationTests). |
| 29 | +# Unit tests (HieroUnitTests) do not require any environment configuration. |
24 | 30 |
|
25 | | -# Enables non-free transactions when testing |
26 | | -TEST_RUN_NONFREE=1 |
| 31 | +# Account ID that will pay query and transaction fees for tests |
| 32 | +# Format: shard.realm.num (e.g., 0.0.1234) |
| 33 | +HIERO_OPERATOR_ID=0.0.1234 |
| 34 | + |
| 35 | +# Private key to sign transactions and queries for tests |
| 36 | +# Format: DER-encoded hex string |
| 37 | +HIERO_OPERATOR_KEY=302e020100300506032b657004220420... |
| 38 | + |
| 39 | +# ============================================================================= |
| 40 | +# Integration Tests - Network Configuration |
| 41 | +# ============================================================================= |
| 42 | + |
| 43 | +# Environment type - determines which network to connect to |
| 44 | +# Values: unit, local, testnet, previewnet, mainnet, custom |
| 45 | +# Default: Determined by HIERO_PROFILE (local profile uses 'local') |
| 46 | +HIERO_ENVIRONMENT_TYPE=testnet |
| 47 | + |
| 48 | +# ============================================================================= |
| 49 | +# Integration Tests - Custom Network Configuration |
| 50 | +# ============================================================================= |
| 51 | +# Only needed when HIERO_ENVIRONMENT_TYPE=custom |
| 52 | + |
| 53 | +# Comma-separated list of consensus node addresses |
| 54 | +# Format: host:port,host:port,... |
| 55 | +# Example: 127.0.0.1:50211,192.168.1.100:50211 |
| 56 | +HIERO_CONSENSUS_NODES= |
| 57 | + |
| 58 | +# Comma-separated list of consensus node account IDs (must match HIERO_CONSENSUS_NODES count) |
| 59 | +# Format: shard.realm.num,shard.realm.num,... |
| 60 | +# Example: 0.0.3,0.0.4 |
| 61 | +HIERO_CONSENSUS_NODE_ACCOUNT_IDS= |
| 62 | + |
| 63 | +# Comma-separated list of mirror node addresses |
| 64 | +# Format: host:port,host:port,... |
| 65 | +# Example: 127.0.0.1:5600 or mainnet.mirrornode.hedera.com:443 |
| 66 | +HIERO_MIRROR_NODES= |
| 67 | + |
| 68 | +# ============================================================================= |
| 69 | +# Integration Tests - Test Profile |
| 70 | +# ============================================================================= |
| 71 | + |
| 72 | +# Test profile - provides pre-configured defaults for different scenarios |
| 73 | +# Values: |
| 74 | +# local - Local development with local node (default) |
| 75 | +# ciUnit - CI unit tests (unit environment) |
| 76 | +# ciIntegration - CI integration tests (local environment, verbose logging) |
| 77 | +# development - Development against remote networks (testnet) |
| 78 | +# Default: local |
| 79 | +HIERO_PROFILE=local |
| 80 | + |
| 81 | +# ============================================================================= |
| 82 | +# Integration Tests - Feature Flags |
| 83 | +# ============================================================================= |
| 84 | + |
| 85 | +# Maximum test duration in seconds before timeout |
| 86 | +# Default: 300 (5 minutes) |
| 87 | +HIERO_MAX_DURATION=300 |
| 88 | + |
| 89 | +# Enable parallel test execution |
| 90 | +# Values: 1 (enabled), 0 or unset (disabled) |
| 91 | +# Note: Parallel execution is not yet implemented |
| 92 | +# Default: disabled |
| 93 | +HIERO_PARALLEL=0 |
| 94 | + |
| 95 | +# Enable verbose logging during tests |
| 96 | +# Values: 1 (enabled), 0 or unset (disabled) |
| 97 | +# Default: disabled |
| 98 | +HIERO_VERBOSE=0 |
| 99 | + |
| 100 | +# ============================================================================= |
| 101 | +# Integration Tests - Cleanup Policy |
| 102 | +# ============================================================================= |
| 103 | +# Controls automatic cleanup of test resources after tests complete. |
| 104 | +# Cleanup economics: |
| 105 | +# - Accounts/Contracts: Cleanup RECOVERS HBAR (recommended) |
| 106 | +# - Tokens/Files/Topics: Cleanup COSTS HBAR (optional) |
| 107 | + |
| 108 | +# Master cleanup switch - overrides all individual settings |
| 109 | +# Values: 1 (enable all cleanup), 0 (disable all cleanup), unset (use individual settings) |
| 110 | +# When set, ignores all HIERO_CLEANUP_* individual settings |
| 111 | +HIERO_ENABLE_CLEANUP= |
| 112 | + |
| 113 | +# Clean up test accounts after tests (recovers locked HBAR) |
| 114 | +# Values: 1 (enabled), 0 (disabled) |
| 115 | +# Default: 1 (enabled) - Recommended |
| 116 | +HIERO_CLEANUP_ACCOUNTS=1 |
| 117 | + |
| 118 | +# Clean up test contracts after tests (can recover HBAR) |
| 119 | +# Values: 1 (enabled), 0 (disabled) |
| 120 | +# Default: 1 (enabled) - Recommended |
| 121 | +HIERO_CLEANUP_CONTRACTS=1 |
| 122 | + |
| 123 | +# Clean up test tokens after tests (costs HBAR, no recovery) |
| 124 | +# Values: 1 (enabled), 0 (disabled) |
| 125 | +# Default: 0 (disabled) |
| 126 | +HIERO_CLEANUP_TOKENS=0 |
| 127 | + |
| 128 | +# Clean up test files after tests (costs HBAR, no recovery) |
| 129 | +# Values: 1 (enabled), 0 (disabled) |
| 130 | +# Default: 0 (disabled) |
| 131 | +HIERO_CLEANUP_FILES=0 |
| 132 | + |
| 133 | +# Clean up test topics after tests (costs HBAR, no recovery) |
| 134 | +# Values: 1 (enabled), 0 (disabled) |
| 135 | +# Default: 0 (disabled) |
| 136 | +HIERO_CLEANUP_TOPICS=0 |
0 commit comments