Skip to content

Commit

Permalink
fix more
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M committed Jun 22, 2023
1 parent e384f78 commit 7ea8baa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ wallet = [ "client" ]
[[example]]
name = "sign_and_verify_ed25519"
path = "examples/how_tos/sign_and_verify_ed25519/sign_ed25519.rs"
required-features = [ "stronghold" ]
required-features = [ "wallet", "stronghold" ]

[[example]]
name = "verify_ed25519_signature"
Expand All @@ -114,6 +114,7 @@ path = "examples/how_tos/sign_and_verify_ed25519/verify_ed25519_signature.rs"
[[example]]
name = "create_mnemonic"
path = "examples/how_tos/accounts_and_addresses/create_mnemonic.rs"
required-features = [ "client" ]

[[example]]
name = "create_account"
Expand Down Expand Up @@ -228,10 +229,12 @@ required-features = [ "rocksdb", "stronghold" ]
[[example]]
name = "output_unlock_conditions"
path = "examples/how_tos/outputs/unlock_conditions.rs"
required-features = [ "client" ]

[[example]]
name = "output_features"
path = "examples/how_tos/outputs/features.rs"
required-features = [ "client" ]

# Block examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
//! cargo run --release --all-features --example verify_ed25519_signature
//! ```

use iota_sdk::{crypto::signatures::ed25519, wallet::Result};
use iota_sdk::{crypto::signatures::ed25519, types::block::Error};

const FOUNDRY_METADATA: &str = r#"{"standard":"IRC30","name":"NativeToken","description":"A native token","symbol":"NT","decimals":6,"logoUrl":"https://my.website/nativeToken.png"}"#;
const PUBLIC_KEY: &str = "0x67b7fc3f78763c9394fc4fcdb52cf3a973b6e064bdc3defb40a6cb2c880e6f5c";
const ED25519_SIGNATURE: &str = "0x5437ee671f182507103c6ae2f6649083475019f2cc372e674be164577dd123edd7a76291ba88732bbe1fae39688b50a3678bce05c9ef32c9494b3968f4f07a01";

fn main() -> Result<()> {
fn main() -> Result<(), Error> {
let ed25519_public_key = ed25519::PublicKey::try_from_bytes(prefix_hex::decode(PUBLIC_KEY).unwrap())?;
let ed25519_signature = ed25519::Signature::from_bytes(prefix_hex::decode(ED25519_SIGNATURE).unwrap());

Expand Down

0 comments on commit 7ea8baa

Please sign in to comment.