Skip to content

Commit 10202af

Browse files
Support "solo" network name
Signed-off-by: Alexander Shenshin <alexander.shenshin@dsr-corporation.com>
1 parent 5dd2f22 commit 10202af

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

hiero_did_sdk_python/did/did_syntax.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
HEDERA_NETWORK_MAINNET = "mainnet"
99
HEDERA_NETWORK_TESTNET = "testnet"
1010
HEDERA_NETWORK_PREVIEWNET = "previewnet"
11+
HEDERA_NETWORK_SOLO = "solo"
1112

1213
HEDERA_DID_METHOD = "hedera"
1314

hiero_did_sdk_python/did/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
HEDERA_DID_METHOD,
1010
HEDERA_NETWORK_MAINNET,
1111
HEDERA_NETWORK_PREVIEWNET,
12+
HEDERA_NETWORK_SOLO,
1213
HEDERA_NETWORK_TESTNET,
1314
)
1415

@@ -94,6 +95,7 @@ def parse_identifier(identifier: str) -> ParsedIdentifier:
9495
network_name != HEDERA_NETWORK_MAINNET
9596
and network_name != HEDERA_NETWORK_TESTNET
9697
and network_name != HEDERA_NETWORK_PREVIEWNET
98+
and network_name != HEDERA_NETWORK_SOLO
9799
):
98100
raise DidException("DID string is invalid. Invalid Hedera network.", DidErrorCode.INVALID_NETWORK)
99101

tests/integration/test_hedera_anoncreds_registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
from hiero_did_sdk_python.anoncreds.utils import AnonCredsObjectType, parse_anoncreds_identifier
3333
from hiero_did_sdk_python.hcs import HcsMessageResolver
3434

35-
from .conftest import OPERATOR_KEY_DER
35+
from .conftest import NETWORK, OPERATOR_KEY_DER
3636

37-
ISSUER_ID = "did:hedera:testnet:zvAQyPeUecGck2EsxcsihxhAB6jZurFrBbj2gC7CNkS5o_0.0.5063027"
37+
ISSUER_ID = f"did:hedera:{NETWORK}:zvAQyPeUecGck2EsxcsihxhAB6jZurFrBbj2gC7CNkS5o_0.0.5063027"
3838

3939
MOCK_SCHEMA_PARAMS = {
4040
"name": "mock-schema",

0 commit comments

Comments
 (0)