Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/messages crate #754

Merged
merged 175 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from 171 commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
328c82c
Initial draft for new messages crate, with implemented MessageType an…
bobozaur Feb 14, 2023
493fc68
Derived more traits and documented transient_from macro
bobozaur Feb 15, 2023
3e55ab0
Added comments to A2AMessage Serialize impl
bobozaur Feb 15, 2023
4f4125c
Directly imported Deserializer
bobozaur Feb 15, 2023
dffe77e
Added error handling in delayed_deserialize impl for ConcreteMessage …
bobozaur Feb 15, 2023
9203ae4
Added better deserialization error to MessageType
bobozaur Feb 15, 2023
56e36bb
Add tests
Patrik-Stas Feb 15, 2023
813f8d5
Added common messages and attachment decorator
bobozaur Feb 16, 2023
8a83f4a
More comments on A2AMessage Serialize and Deserialize impls
bobozaur Feb 16, 2023
c408b8f
Implemented Display on MessageType and adjusted tests
bobozaur Feb 16, 2023
4420baf
Removed AttachmentID
bobozaur Feb 16, 2023
1d91884
Renamed A2AMessage to AriesMessage
bobozaur Feb 16, 2023
817de88
Renamed DelayedSerde::Seg to DelayedSerde::MsgType
bobozaur Feb 16, 2023
a613967
Added messages_macros crate for proc_macros. Added TransientFrom deri…
bobozaur Feb 16, 2023
e520129
Reordered transient_from attribute parameters
bobozaur Feb 16, 2023
7fc26ab
Accept only one transient_from attribute in TransientFrom derive impl
bobozaur Feb 16, 2023
a57d508
Derived TransientFrom in all protocols
bobozaur Feb 16, 2023
31f7daf
Improved and renamed TransientFrom to TransitiveFrom
bobozaur Feb 17, 2023
bb108d7
Fixed test import
bobozaur Feb 17, 2023
7a5e92d
Reorganized traits
bobozaur Feb 17, 2023
e3a3c77
Improved the TransitiveFrom derive macro and added TransitiveTryFrom …
bobozaur Feb 17, 2023
ea73f6a
Renamed integration test for TransitiveFrom
bobozaur Feb 17, 2023
ceb6554
Added Message derive macro
bobozaur Feb 17, 2023
57ec49b
Added MessageType derive macro for semver on message types
bobozaur Feb 17, 2023
14e900c
Factored out common code for transitive macros
bobozaur Feb 20, 2023
dcaa06f
Added try_from test and comments
bobozaur Feb 20, 2023
9b058d8
Added comments to Message and MessageType derive macros
bobozaur Feb 20, 2023
0fbb1db
Replaced transitive macro usage with published crate
bobozaur Feb 20, 2023
817f546
Added preliminary DID struct and some work on message definitions
bobozaur Feb 20, 2023
9c5fd3e
Removed DID type for now and added messages for credential issuace
bobozaur Feb 21, 2023
77ee6fc
Added discover_features draft messages
bobozaur Feb 21, 2023
472e4cb
Added draft for problem report
bobozaur Feb 21, 2023
b513238
Added draft for Forward message
bobozaur Feb 21, 2023
3d0b0df
Added trust_ping messages
bobozaur Feb 22, 2023
f04ed75
Issue credential messages improvement
bobozaur Feb 22, 2023
bf6a891
Added CredentialPreviewMsgType and bumped transitive crate version
bobozaur Feb 22, 2023
ad187d4
Bumped transitive crate version and implemented CredentialPreviewMsgType
bobozaur Feb 22, 2023
b30ce1d
Added connection sig msg type
bobozaur Feb 22, 2023
90725b8
Removed DidError and added not_standalone_msg utility function
bobozaur Feb 22, 2023
298fdf3
Added draft for all protocol messages
bobozaur Feb 23, 2023
07b02da
Added invitation kinds
bobozaur Feb 23, 2023
f9d8c76
Commented tests
bobozaur Feb 23, 2023
d45e9bb
Added messages conversion to AriesMessage
bobozaur Feb 23, 2023
4b5b089
Added ThreadGoalCode
bobozaur Feb 23, 2023
dcb4087
Simplified AriesMessage serialization and added tests
bobozaur Feb 24, 2023
62d2155
Improved deserialization comments
bobozaur Feb 24, 2023
c076c5c
Added Threadlike trait and helper macros for impls
bobozaur Feb 24, 2023
0f141d7
Enhanced/corrected problem_report and localization
bobozaur Feb 24, 2023
53a12e7
Cargo fmt
bobozaur Feb 24, 2023
f609c15
Added basic infrastructure for Message<C, MD, FD>
bobozaur Mar 1, 2023
a64ffc4
Refactored messages impl to use Message<C, MD>
bobozaur Mar 2, 2023
00c396b
Simplified connection Invitation serialization/deserialization
bobozaur Mar 3, 2023
74d01ae
Renamed the MD generic of Message to D
bobozaur Mar 3, 2023
fcaf43a
Added macro for easier conversion between Message and AriesMessage
bobozaur Mar 3, 2023
64dfc15
Added From impls for Message to AriesMessage
bobozaur Mar 3, 2023
6293a4f
Added connection messages aliases
bobozaur Mar 6, 2023
e93a565
Added cred_issuance messages aliases
bobozaur Mar 6, 2023
4a6ecd5
Added discover_features messages aliases
bobozaur Mar 6, 2023
eccce96
Added out_of_band messages aliases
bobozaur Mar 6, 2023
12f3646
Added present_proof messages aliases
bobozaur Mar 6, 2023
4ca11ef
Added revocation messages aliases
bobozaur Mar 6, 2023
fecf47f
Added trust_ping messages aliases
bobozaur Mar 6, 2023
13b9896
Added standalone messages aliases
bobozaur Mar 6, 2023
d8f0fc2
Ran cargo fmt
bobozaur Mar 6, 2023
027f874
Removed the EmptyDecorator trait
bobozaur Mar 7, 2023
0205ff1
Added new methods to necessary types. Resorting to implicit type buil…
bobozaur Mar 7, 2023
3fad8eb
Added more constructors
bobozaur Mar 8, 2023
be77f91
Improved proc macros to aid in protocol registry creation
bobozaur Mar 8, 2023
ddf3522
Draft for protocol registry
bobozaur Mar 8, 2023
d46120d
Fairly functional protocol registry
bobozaur Mar 8, 2023
1962021
Added usage of ProtocolRegistry to Query and Disclose
bobozaur Mar 8, 2023
f22f5e5
Made actors attribute accept paths instead of string literals
bobozaur Mar 8, 2023
de9be8c
Fixed revocation protocol major version
bobozaur Mar 8, 2023
9217141
Ran cargo fmt
bobozaur Mar 8, 2023
843c062
Corrected serde impls for ThreadGoalCode and Actor
bobozaur Mar 9, 2023
e300dbf
Fixed Query::lookup
bobozaur Mar 9, 2023
467ec3c
Added semver fallback for minor versions
bobozaur Mar 9, 2023
62cfaac
Added ProtocolDescriptor::as_pid_parts
bobozaur Mar 9, 2023
2e95484
Ran cargo fmt
bobozaur Mar 9, 2023
e221c9f
Still some way to go for the MessageType refactor, but no compiler er…
bobozaur Mar 11, 2023
3a620c8
Fixed lints
bobozaur Mar 11, 2023
80be3e8
Added custom Serialize/Deserialize for complementary message types
bobozaur Mar 11, 2023
a7fd86e
Removed Prefix
bobozaur Mar 13, 2023
c29d389
Refactored protocol registry and DiscoverFeatures protocol
bobozaur Mar 13, 2023
4956d73
Improved error for MessageType deserialization and serialization of M…
bobozaur Mar 13, 2023
d3c260a
Renamed MessageFamily to Protocol
bobozaur Mar 13, 2023
f6b41e2
Ran cargo fmt
bobozaur Mar 13, 2023
74b15f9
Factored out common DelayedSerde impls through HasKind trait
bobozaur Mar 13, 2023
1aab9b4
Improved minor version resolution to avoid recursion
bobozaur Mar 13, 2023
6a12bda
Added comments in protocol registry
bobozaur Mar 13, 2023
5e508d5
Improved registry comments and added message_type serde comments
bobozaur Mar 13, 2023
4bfd501
Added comments to Actor
bobozaur Mar 13, 2023
6a2396d
Documented the Protocol type
bobozaur Mar 13, 2023
082fdc9
Moved MSG_TYPE constant to utils
bobozaur Mar 13, 2023
e972287
Removed commented out dead code
bobozaur Mar 13, 2023
1b48c27
Renamed 'family' occurrences to variations of 'protocol_name'
bobozaur Mar 14, 2023
3f6292e
Moves and renames
bobozaur Mar 14, 2023
f73a9e4
Moved AriesMessage and Message to lib.rs
bobozaur Mar 14, 2023
480d202
Used fully qualified paths in proc_macros
bobozaur Mar 14, 2023
d150ee1
Added some more rustfmt.toml params. Ran cargo fmt
bobozaur Mar 14, 2023
f776ce6
Added msg types and protocols tests
bobozaur Mar 15, 2023
dc60d2c
Added BasicMessage tests
bobozaur Mar 15, 2023
812d705
Added tests for Forward msg. Removed serde_json 'raw_value' feature flag
bobozaur Mar 16, 2023
d27d9d3
Added tests for ProblemReport. Replaced formatted strings with json! …
bobozaur Mar 16, 2023
6e34c9b
Added Ack message tests
bobozaur Mar 16, 2023
3cd1702
Added the id field to Message::new() and removed obsolete dependencies
bobozaur Mar 16, 2023
db8ecca
Added more test utils and refactored msg tests
bobozaur Mar 16, 2023
6f2e494
Added TrustPing msgs tests
bobozaur Mar 16, 2023
37d8fce
Added old prefix test
bobozaur Mar 16, 2023
4751676
Ran cargo fmt
bobozaur Mar 16, 2023
0e4d77e
Cosmetic change
bobozaur Mar 17, 2023
f6c9d1e
Added revocation msgs tests
bobozaur Mar 18, 2023
9164282
Added decorators tests
bobozaur Mar 19, 2023
c2bd837
Used Protocol in oob invitation message
bobozaur Mar 19, 2023
17ac407
Added attachment decorator tests
bobozaur Mar 20, 2023
fad4ec2
Renamed tests
bobozaur Mar 20, 2023
3d774be
Exposed decorator modules
bobozaur Mar 20, 2023
4fb938c
Refactored tests to re-use test decorator builders
bobozaur Mar 20, 2023
5a734cd
Refactored non-standalone message types deserialization
bobozaur Mar 20, 2023
45b77a9
Messages proc_macros rework
bobozaur Mar 20, 2023
c0355ea
Adjusted tests
bobozaur Mar 20, 2023
80e9f1b
Simplified transitive derives
bobozaur Mar 20, 2023
c07bd1c
Ran cargo fmt
bobozaur Mar 20, 2023
6c4ef2a
Added PresentProof msgs tests
bobozaur Mar 21, 2023
c301075
Correct test names, added OOB msgs tests, added constructor methods t…
bobozaur Mar 21, 2023
e45dc5a
Added DiscoveryFeatures msgs tests
bobozaur Mar 21, 2023
834f429
Added CredIssuance msgs tests, renamed tests to avoid collisions
bobozaur Mar 21, 2023
418e260
Added Connection msgs tests. Factored msg_type out of msgs tests
bobozaur Mar 21, 2023
bf88886
Ran cargo fmt
bobozaur Mar 21, 2023
293db77
Moved Message to its own module. Added MaybeKnown enum
bobozaur Mar 21, 2023
ce327ab
Used MaybeKnown enum with Actor
bobozaur Mar 21, 2023
e20e0f2
Renamed Actor to Role
bobozaur Mar 21, 2023
ee2261d
Used MaybeKnown with ThreadGoalCode
bobozaur Mar 21, 2023
f8de6b5
Used MaybeKnown with OobGoalCode
bobozaur Mar 21, 2023
71d11a7
Used MaybeKnown with RevocationFormat
bobozaur Mar 21, 2023
d4dfb3d
Removed the unnecessary 'Kind' suffix from msg kind enums
bobozaur Mar 21, 2023
23d1801
Removed CompleteInvitation (to be added in aries-vcx for internal use…
bobozaur Mar 21, 2023
dbb6a20
Added docs for Protocol
bobozaur Mar 22, 2023
659e57d
Replaced PhantomData<T> with PhantomData<fn() -> T> for the sake of t…
bobozaur Mar 22, 2023
0774343
Improved message kind type binding and documented proc_macros
bobozaur Mar 22, 2023
2a4d948
Added query lookup tests
bobozaur Mar 22, 2023
1340912
Moved traits outside of msg_types::types
bobozaur Mar 22, 2023
8639241
Moved and renamed Service from 'common' to OobService in 'out_of_band'
bobozaur Mar 22, 2023
2ab0fb8
Added another directory layer to protocols module
bobozaur Mar 22, 2023
95cda0a
Rebased from main
bobozaur Mar 22, 2023
321a06a
Removed formatting options and reverted formatted crates
bobozaur Mar 23, 2023
b5ec0d4
Documented the msg_types::traits module
bobozaur Mar 23, 2023
6ed702a
Renamed test_extensive_* to test_extended_* and improved ProblemRepor…
bobozaur Mar 23, 2023
ed04a97
Replaced enum variant instantiation from verbose PhantomData usage to…
bobozaur Mar 23, 2023
ba7b667
Improved proc_macros docs
bobozaur Mar 23, 2023
447dfcb
Improved datetime serialization and added utils
bobozaur Mar 23, 2023
fa3285d
Improved Timing to use DateTime<Utc> and adjusted tests
bobozaur Mar 23, 2023
cac6c72
Added serialization to the msg_types tests
bobozaur Mar 23, 2023
573205d
Replaced 'json' with 'expected' in tests
bobozaur Mar 23, 2023
2476168
Renamed MajorVersion trait to ProtocolVersion
bobozaur Mar 23, 2023
9235ff1
Made AttachmentType::Base64 variant use Vec<u8> instead of String to …
bobozaur Mar 23, 2023
9c57f1d
Added some comments to AttachmentType variants
bobozaur Mar 23, 2023
7fa32b0
Documented decorators
bobozaur Mar 23, 2023
b75dd76
Documented crate::msg_types module
bobozaur Mar 23, 2023
df96538
Documented crate::protocols module and submodules
bobozaur Mar 23, 2023
cf85b18
Renamed Nothing to NoDecorators
bobozaur Mar 23, 2023
1b48bdb
Re-exported MimeType and NoDecorators
bobozaur Mar 23, 2023
84f5d48
Re-exported Role
bobozaur Mar 23, 2023
7034d0e
Made the module pub(crate)
bobozaur Mar 23, 2023
2325186
Removed awkward re-exports from modules. Made DelayedSerde trait pub…
bobozaur Mar 23, 2023
67620ee
Renamed Message to MsgParts
bobozaur Mar 23, 2023
fa408f2
Simplified AriesMessage serialization and deserialization
bobozaur Mar 24, 2023
41015dd
Introduced MsgKindType to abstract over PhantomData
bobozaur Mar 24, 2023
2cf4aa9
Revised documentation and added MaybeKnown test
bobozaur Mar 24, 2023
66e42bb
Ran cargo fmt
bobozaur Mar 24, 2023
196c1d4
Renamed modules and msg_types enums, replacing 'Protocol' with 'Type'
bobozaur Mar 24, 2023
c0afe44
Shortened (invalid) doc link in messages_macros
bobozaur Mar 27, 2023
026da56
Properly formatted http links in docs
bobozaur Mar 27, 2023
b81c0ac
Renamed arg 'json' to 'expected' in test_utils functions
bobozaur Mar 27, 2023
9e64a10
Fixed serialization/deserialization for types that were wrapped in Ma…
bobozaur Mar 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 136 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ members = [
"agency_client",
"libvdrtools",
"messages",
"messages_macros",
"messages2",
"shared_vcx",
"diddoc",
"agents/rust/aries-vcx-agent",
Expand Down
28 changes: 28 additions & 0 deletions messages2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[package]
name = "messages2"
edition.workspace = true
version.workspace = true
authors.workspace = true
license.workspace = true

[lib]
doctest = false

[features]
test_utils = ["diddoc/test_utils"]
general_test = ["test_utils"]

[dependencies]
serde = { version = "1.0.97", features = ["derive"] }
chrono = { version = "0.4.23", features = ["serde"] }
lazy_static = "1.3"
serde_json = "1.0.40"
url = { version = "2.3", features = ["serde"] }
strum = "0.24.1"
strum_macros = "0.24.3"
thiserror = "1.0.37"
derive_more = "0.99.17"
transitive = "0.4.2"
isolang = { version = "2.2.0" }
messages_macros = { path = "../messages_macros" }
diddoc = { path = "../diddoc" }
Loading