-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c87a13a
commit 501379d
Showing
20 changed files
with
120 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ description = "Soroban authorization sdk" | |
homepage = "https://github.com/stellar/rs-soroban-sdk" | ||
repository = "https://github.com/stellar/rs-soroban-sdk" | ||
authors = ["Stellar Development Foundation <[email protected]>"] | ||
readme = "../README.md" | ||
readme = "README.md" | ||
license = "Apache-2.0" | ||
version.workspace = true | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Soroban auth provides basic authentication capabilities to Soroban | ||
contracts. | ||
|
||
For contracts that require basic authentication capabilities this crate may | ||
do some of the heavy lifting for supporting authentication by Stellar | ||
accounts, ed25519 signatures, or other contracts. For contracts that require | ||
more bespoke authentication this crate may not be suitable. | ||
|
||
See [`verify`] for how to use. | ||
|
||
See [`testutils`] for test utilities. | ||
|
||
**The utilities in this crate provide no replay protection. Contracts must | ||
provide their own mechanism suitable for replay prevention that prevents | ||
contract invocations to be replayable if it is important they are not.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ description = "Soroban SDK." | |
homepage = "https://github.com/stellar/rs-soroban-sdk" | ||
repository = "https://github.com/stellar/rs-soroban-sdk" | ||
authors = ["Stellar Development Foundation <[email protected]>"] | ||
readme = "../README.md" | ||
readme = "README.md" | ||
license = "Apache-2.0" | ||
version.workspace = true | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Soroban SDK supports writing programs for the Soroban smart contract | ||
platform. | ||
|
||
### Docs | ||
|
||
See [soroban.stellar.org](https://soroban.stellar.org) for documentation. | ||
|
||
### Examples | ||
|
||
```rust | ||
use soroban_sdk::{contractimpl, symbol, vec, BytesN, Env, Symbol, Vec}; | ||
|
||
pub struct HelloContract; | ||
|
||
#[contractimpl] | ||
impl HelloContract { | ||
pub fn hello(env: Env, to: Symbol) -> Vec<Symbol> { | ||
vec![&env, symbol!("Hello"), to] | ||
} | ||
} | ||
|
||
#[test] | ||
fn test() { | ||
let env = Env::default(); | ||
let contract_id = env.register_contract(None, HelloContract); | ||
let client = HelloContractClient::new(&env, &contract_id); | ||
|
||
let words = client.hello(&symbol!("Dev")); | ||
|
||
assert_eq!(words, vec![&env, symbol!("Hello"), symbol!("Dev"),]); | ||
} | ||
``` | ||
|
||
More examples are available at <https://soroban.stellar.org/docs/category/examples>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "test_add_i128" | ||
version = "0.2.1" | ||
version.workspace = true | ||
authors = ["Stellar Development Foundation <[email protected]>"] | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "test_add_u128" | ||
version = "0.2.1" | ||
version.workspace = true | ||
authors = ["Stellar Development Foundation <[email protected]>"] | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "test_add_u64" | ||
version = "0.2.1" | ||
version.workspace = true | ||
authors = ["Stellar Development Foundation <[email protected]>"] | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
|
Oops, something went wrong.