Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Add auth sdk page
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Sep 2, 2022
1 parent 521b3ff commit 418a618
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/SDKs/rust-auth.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
sidebar_position: 2
title: Soroban Rust Auth SDK
---

The `soroban-auth` Rust crate contains the Soroban Rust Auth SDK. It provides
utilities for verifying signatures on invocations of smart contracts. It is
intended for use alongside the [`soroban-sdk`].

[`soroban-sdk`]: rust

:::caution
The `soroban-auth` crate is in early development. Report issues
[here](https://github.com/stellar/rs-soroban-sdk/issues/new/choose).
:::

## SDK Documentation

Auth documentation is available at:
https://docs.rs/soroban-auth

## Subscribe to Releases

Subscribe to releases on the GitHub repository:
https://github.com/stellar/rs-soroban-sdk

## Add `soroban-auth` as a Dependency

Add the following sections to the `Cargo.toml` to import `soroban-auth`.

```toml
[features]
testutils = ["soroban-auth/testutils"]

[dependencies]
soroban-auth = "0.0.4"

[dev_dependencies]
soroban-auth = { version = "0.0.4", features = ["soroban-auth/testutils"] }
```
15 changes: 15 additions & 0 deletions docs/examples/authorization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ test test::test ... ok
test test::bad_data - should panic ... ok
```

## Dependencies

The authorization example uses the Soroban auth SDK, and has the following
Soroban dependencies in its Cargo.toml file.

```toml title="authorization/src/Cargo.toml
[dependencies]
soroban-sdk = "0.0.4"
soroban-auth = "0.0.4"

[dev_dependencies]
soroban-sdk = { version = "0.0.4", features = ["testutils"] }
soroban-auth = { version = "0.0.4", features = ["testutils"] }
```

## Code

```rust title="authorization/src/lib.rs"
Expand Down

0 comments on commit 418a618

Please sign in to comment.