Skip to content

Commit b56127a

Browse files
committed
refactor: rearrange packages
Signed-off-by: Daniel Bluhm <[email protected]>
1 parent 0ed568d commit b56127a

File tree

12 files changed

+30
-16
lines changed

12 files changed

+30
-16
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""V1 DIDComm v1 Interfaces.
1+
"""DIDComm v1 Interfaces.
22
33
These components are intended to provide a similar structure to the DIDComm v2
44
interfaces provided by this library. While the community is transitioning from
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""V1 DIDComm Crypto interfaces.
2+
3+
These components are intended to provide a similar structure to the DIDComm v2
4+
interfaces provided by this library. While the community is transitioning from
5+
DIDComm v1 to v2, having a consistent interface to interact with will help
6+
implementers to support both versions until the transition is complete.
7+
8+
It is expected that a future version of this library will eventually remove
9+
these interfaces.
10+
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pydid import VerificationMethod
88

99
from didcomm_messaging.crypto.jwe import JweBuilder, JweEnvelope, JweRecipient
10-
from didcomm_messaging.legacy.base import (
10+
from .base import (
1111
V1CryptoService,
1212
V1UnpackResult,
1313
RecipData,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import nacl.utils
1919
except ImportError as err:
2020
raise ImportError(
21-
"V1 implementation requires 'legacy' extra to be installed"
21+
"V1 nacl implementation requires 'nacl' extra to be installed"
2222
) from err
2323

2424

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
from pydid.service import DIDCommV1Service
1111

1212
from didcomm_messaging.crypto import P, S, SecretsManager
13-
from didcomm_messaging.legacy.base import V1CryptoService
14-
from didcomm_messaging.legacy.packaging import V1PackagingService
13+
from didcomm_messaging.v1.crypto.base import V1CryptoService
14+
from didcomm_messaging.v1.packaging import V1PackagingService
1515
from didcomm_messaging.resolver import DIDResolver
1616

1717

1818
class V1DIDCommMessagingError(Exception):
19-
"""Raised on error in legacy didcomm messaging."""
19+
"""Raised on error in v1 didcomm messaging."""
2020

2121

2222
@dataclass
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from didcomm_messaging.crypto.base import P, S, SecretsManager
66
from didcomm_messaging.crypto.jwe import JweEnvelope, JweRecipient
7-
from didcomm_messaging.legacy.base import (
7+
from didcomm_messaging.v1.crypto.base import (
88
V1CryptoService,
99
V1UnpackResult,
1010
RecipData,

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ legacy = [
3131
"msgpack>=1.0.8",
3232
"PyNaCl>=1.5.0",
3333
]
34+
nacl = [
35+
"msgpack>=1.0.8",
36+
"PyNaCl>=1.5.0",
37+
]
3438

3539
[build-system]
3640
requires = ["pdm-backend"]

tests/legacy/test_crypto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44
from didcomm_messaging.legacy import crypto
5-
from didcomm_messaging.legacy.nacl import KeyPair
5+
from didcomm_messaging.v1.crypto.nacl import KeyPair
66

77

88
@pytest.fixture

tests/v1/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)