Skip to main content

Crate duckity

Crate duckity 

Source
Expand description

A pure-Rust Duckity API client.

For a more detailed documentation, check out Duckity Docs on the Rust SDK.

§Installation

To add the package to your project, install it with cargo:

$ cargo add duckity

§Quick Start

First of all, you need a Duckity application. Head over to the Duckity dashboard to create one if you don’t have created it yet.

To solve a challenge, use duckity::solve.

let solution = duckity::solve(application_id, protection_profile_id).await?;

§Compiling

Make sure to compile in release mode when testing challenge solving. Given solving challenges is completely CPU-bound, you will see massive differences between solving in debug and release mode (debug was x23 slower to solve in our tests).

§Contributing

Contributions of any kind are welcome! Suggestions, issues, PRs, and everything else goes into our SDKs repository in GitHub.

Modules§

core
Low-level implementation of challenge decoding, solving, and encoding.

Structs§

ChallengeGetter
Challenge-getting builder. Initialize with solve.
SolutionValidator
Solution validation builder. Initialized via validate. Awaitable.

Enums§

DuckityError
Wrapper over all possible errors returned by the duckity crate.

Functions§

solve
Gets a challenge from the Duckling API, solves it, and returns the solution.
validate
Validates a solution token.