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

Create a universal resolver binding in rust #246

Open
nitro-neal opened this issue Jun 21, 2024 · 0 comments
Open

Create a universal resolver binding in rust #246

nitro-neal opened this issue Jun 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nitro-neal
Copy link
Contributor

currently doing this in kotlin because Resolver is not exporter in the udl file:

        @JvmStatic
        suspend fun resolve(uri: String): ResolutionResult {
            // TODO: Add a concept of a universal resolver
            val method = uri.substringAfter(":").substringBefore(":")
            if(method == "jwk") {
                return rustCoreDidJwkResolve(uri).getData()
            }

            if(method == "dht") {
                return rustCoreDidDhtResolve(uri).getData()
            }

            if(method == "web") {
                return rustCoreDidWebResolve(uri).getData()
            }

            throw IllegalArgumentException("Unknown method '$method'")
        }
@nitro-neal nitro-neal added the bug Something isn't working label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant