Repository: sugyan/atrium (language: rust)

Issue:
Identity resolution
It looks like there's already an implementation in `atrium-oath/identity` but AFAICT it isn't exported or published anywhere.


Discussion / hints:
Sorry for the delay in responding.
Yes, I was thinking of implementing atrium-identity as a library for atrium-oauth and releasing it together with atrium-oauth-client once its development is complete.
But actually, it might not be a problem to release it first as an independent library not related to oauth.

(The official TypeScript SDK has `@atproto/identity` while the oauth-client uses `@atproto-labs/did-resolver` etc. and I was thinking of investigating what the difference is before making a decision. If you know about it that would be great to know :)
The `@proto-labs` packages appear to be internal or experimental packages, but `@atproto-labs/did-resolver` doesn't appear to do anything that `@atproto/identity` can't. Maybe there's a historical reason for the duplicated code.

@sugyan, would you be willing to move forward with releasing `atrium-identity` as an independent library? It would be very useful to other projects that need identity resolution without oauth, like the labeler I'm developing. It looks like the heavy lifting is mostly done, but I'd be willing to write up a pull request to move `/atrium-oauth/identity` to `/atrium-identity`, write some documentation, and maybe add some tests if you wanted me to...

Fix patch:
diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml
index 4f84f176..5efe5015 100644
--- a/.github/workflows/wasm.yml
+++ b/.github/workflows/wasm.yml
@@ -66,5 +66,5 @@ jobs:
       - run: wasm-pack test --node atrium-api
       - run: wasm-pack test --node atrium-xrpc
       - run: wasm-pack test --node atrium-xrpc-client
-      - run: wasm-pack test --node atrium-oauth/identity
+      - run: wasm-pack test --node atrium-identity
       - run: wasm-pack test --node atrium-common
diff --git a/Cargo.toml b/Cargo.toml
index 6c8ff954..8abcfb75 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,7 +5,7 @@ members = [
     "atrium-crypto",
     "atrium-xrpc",
     "atrium-xrpc-client",
-    "atrium-oauth/identity",
+    "atrium-identity",
     "atrium-oauth/oauth-client",
     "bsky-cli",
     "bsky-sdk",
@@ -26,7 +26,7 @@ keywords = ["atproto", "bluesky"]
 # Intra-workspace dependencies
 atrium-api = { version = "0.25.0", path = "atrium-api", default-features = false }
 atrium-common = { version = "0.1.0", path = "atrium-common" }
-atrium-identity = { version = "0.1.0", path = "atrium-oauth/identity" }
+atrium-identity = { version = "0.1.0", path = "atrium-identity" }
 atrium-xrpc = { version = "0.12.1", path = "atrium-xrpc" }
 atrium-xrpc-client = { version = "0.5.11", path = "atrium-xrpc-client" }
 bsky-sdk = { version = "0.1.16", path = "bsky-sdk" }
diff --git a/atrium-oauth/identity/Cargo.toml b/atrium-identity/Cargo.toml
similarity index 100%
rename from atrium-oauth/identity/Cargo.toml
rename to atrium-identity/Cargo.toml
diff --git a/atrium-identity/README.md b/atrium-identity/README.md
new file mode 100644
index 00000000..bfcbd5c0
--- /dev/null
+++ b/atrium-identity/README.md
@@ -0,0 +1,8 @@
+# ATrium Identity
+
+[![](https://img.shields.io/crates/v/atrium-identity)](https://crates.io/crates/atrium-identity)
+[![](https://img.shields.io/docsrs/atrium-identity)](https://docs.rs/atrium-identity)
+[![](https://img.shields.io/crates/l/atrium-identity)](https://github.com/sugyan/atrium/blob/main/LICENSE)
+[![Rust](https://github.com/sugyan/atrium/actions/workflows/identity.yml/badge.svg?branch=main)](https://github.com/sugyan/atrium/actions/workflows/identity.yml)
+
+Resolver library for decentralized identities in atproto using DIDs and handles.
diff --git a/atrium-oauth/identity/src/did.rs b/atrium-identity/src/did.rs
similarity index 100%
rename from atrium-oauth/identity/src/did.rs
rename to atrium-identity/src/did.rs
diff --git a/atrium-oauth/identity/src/did/common_resolver.rs b/atrium-identity/src/did/common_resolver.rs
similarity index 100%
rename from atrium-oauth/identity/src/did/common_resolver.rs
rename to atrium-identity/src/did/common_resolver.rs
diff --git a/atrium-oauth/identity/src/did/plc_resolver.rs b/atrium-identity/src/did/plc_resolver.rs
similarity index 100%
rename from atrium-oauth/identity/src/did/plc_resolver.rs
rename to atrium-identity/src/did/plc_resolver.rs
diff --git a/atrium-oauth/identity/src/did/web_resolver.rs b/atrium-identity/src/did/web_resolver.rs
similarity index 100%
rename from atrium-oauth/identity/src/did/web_resolver.rs
rename to atrium-identity/src/did/web_resolver.rs
diff --git a/atrium-oauth/identity/src/error.rs b/atrium-identity/src/error.rs
similarity index 100%
rename from atrium-oauth/identity/src/error.rs
rename to atrium-identity/src/error.rs
diff --git a/atrium-oauth/identity/src/handle.rs b/atrium-identity/src/handle.rs
similarity index 100%
rename from atrium-oauth/identity/src/handle.rs
rename to atrium-identity/src/handle.rs
diff --git a/atrium-oauth/identity/src/handle/appview_resolver.rs b/atrium-identity/src/handle/appview_resolver.rs
similarity index 100%
rename from atrium-oauth/identity/src/handle/appview_resolver.rs
rename to atrium-identity/src/handle/appview_resolver.rs
diff --git a/atrium-oauth/identity/src/handle/atproto_resolver.rs b/atrium-identity/src/handle/atproto_resolver.rs
similarity index 100%
rename from atrium-oauth/identity/src/handle/atproto_resolver.rs
rename to atrium-identity/src/handle/atproto_resolver.rs
diff --git a/atrium-oauth/identity/src/handle/dns_resolver.rs b/atrium-identity/src/handle/dns_resolver.rs
similarity index 100%
rename from atrium-oauth/identity/src/handle/dns_resolver.rs
rename to atrium-identity/src/handle/dns_resolver.rs
diff --git a/atrium-oauth/identity/src/handle/doh_dns_txt_resolver.rs b/atrium-identity/src/handle/doh_dns_txt_resolver.rs
similarity index 100%
rename from atrium-oauth/identity/src/handle/doh_dns_txt_resolver.rs
rename to atrium-identity/src/handle/doh_dns_txt_resolver.rs
diff --git a/atrium-oauth/identity/src/handle/well_known_resolver.rs b/atrium-identity/src/handle/well_known_resolver.rs
similarity index 100%
rename from atrium-oauth/identity/src/handle/well_known_resolver.rs
rename to atrium-identity/src/handle/well_known_resolver.rs
diff --git a/atrium-oauth/identity/src/identity_resolver.rs b/atrium-identity/src/identity_resolver.rs
similarity index 100%
rename from atrium-oauth/identity/src/identity_resolver.rs
rename to atrium-identity/src/identity_resolver.rs
diff --git a/atrium-oauth/identity/src/lib.rs b/atrium-identity/src/lib.rs
similarity index 73%
rename from atrium-oauth/identity/src/lib.rs
rename to atrium-identity/src/lib.rs
index 9f397322..d3fd3583 100644
--- a/atrium-oauth/identity/src/lib.rs
+++ b/atrium-identity/src/lib.rs
@@ -1,7 +1,7 @@
+#![doc = include_str!("../README.md")]
 pub mod did;
 mod error;
 pub mod handle;
 pub mod identity_resolver;
-pub mod resolver;
 
 pub use self::error::{Error, Result};
diff --git a/atrium-oauth/identity/src/resolver.rs b/atrium-oauth/identity/src/resolver.rs
deleted file mode 100644
index 3f3d911d..00000000
--- a/atrium-oauth/identity/src/resolver.rs
+++ /dev/null
@@ -1,1 +0,0 @@
-pub use crate::error::Result;
diff --git a/release-plz.toml b/release-plz.toml
index 97d553f6..cd6c482c 100644
--- a/release-plz.toml
+++ b/release-plz.toml
@@ -39,6 +39,13 @@ git_release_enable = true
 git_tag_enable = true
 changelog_update = true
 
+[[package]]
+name = "atrium-identity"
+publish = true
+git_release_enable = true
+git_tag_enable = true
+changelog_update = true
+
 [[package]]
 name = "bsky-sdk"
 publish = true


Test patch: