Skip to content

Commit 506ba28

Browse files
authored
Merge pull request #59 from iotaledger/feat/update-readme
Update README.md
2 parents 845ddd8 + f1a0aab commit 506ba28

31 files changed

+6102
-439
lines changed

β€Ž.github/notarization.svgβ€Ž

Lines changed: 5914 additions & 0 deletions
Loading

β€Ž.github/workflows/build-and-test.ymlβ€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ jobs:
185185
awk '$1 ~ /[0-9].*/' | \
186186
parallel -k -j 4 --retries 3 --joblog report.log ./target/release/examples/{}
187187
cat report.log
188-
# - name: Run Rust Readme examples
189-
# # run examples only on ubuntu for now
190-
# if: matrix.os == 'ubuntu-24.04'
191-
# run: |
192-
# cd bindings/wasm/notarization_wasm
193-
# npm ci
194-
# npm run test:readme:rust
188+
# - name: Run Rust Readme examples
189+
# # run examples only on ubuntu for now
190+
# if: matrix.os == 'ubuntu-24.04'
191+
# run: |
192+
# cd bindings/wasm/notarization_wasm
193+
# npm ci
194+
# npm run test:readme:rust
195195

196196
- name: Archive server logs
197197
if: ${{ env.IOTA_SERVER_LOGFILE }}

β€ŽCargo.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ strum = { version = "0.27", default-features = false, features = ["std", "derive
2626
thiserror = { version = "2.0", default-features = false }
2727

2828
secret-storage = { git = "https://github.com/iotaledger/secret-storage.git", tag = "v0.3.0", default-features = false }
29-
tokio = { version = "1.43", default-features = false, features = ["macros", "sync", "rt", "process"] }
29+
tokio = { version = "1.44.2", default-features = false, features = ["macros", "sync", "rt", "process"] }
3030

3131
[profile.release.package.iota_interaction_ts]
3232
opt-level = 's'

β€ŽREADME.mdβ€Ž

Lines changed: 33 additions & 295 deletions
Large diffs are not rendered by default.

β€Žbindings/wasm/build/replace_paths.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function replace(tsconfig, dist, artifact, mode) {
3939
value = path.relative(absoluteFilePath, absoluteIncludePath).replace(/\\/g, "/");
4040
}
4141

42-
if(key.endsWith('*')) {
42+
if (key.endsWith("*")) {
4343
console.log(`\t dropping '*' from ${key}`);
4444
key = key.slice(0, -1);
4545
}

β€Žbindings/wasm/notarization_wasm/Cargo.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ serde-wasm-bindgen = "0.6.5"
3030
serde_json = { version = "1.0", default-features = false }
3131
serde_repr = { version = "0.1", default-features = false }
3232
# Want to use the nice API of tokio::sync::RwLock for now even though we can't use threads.
33-
tokio = { version = "1.43", default-features = false, features = ["sync"] }
33+
tokio = { version = "1.44.2", default-features = false, features = ["sync"] }
3434
tsify = "0.4.5"
3535
wasm-bindgen = { version = "0.2.100", features = ["serde-serialize"] }
3636
wasm-bindgen-futures = { version = "0.4", default-features = false }

β€Žbindings/wasm/notarization_wasm/src/wasm_types.rsβ€Ž

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use js_sys::Uint8Array;
5-
use notarization::core::types::{Data, ImmutableMetadata, LockMetadata, State};
6-
use notarization::core::NotarizationMethod;
5+
use notarization::core::types::{Data, ImmutableMetadata, LockMetadata, NotarizationMethod, State};
76
use serde::{Deserialize, Serialize};
87
use wasm_bindgen::prelude::*;
98

β€Žexamples/01_create_locked_notarization.rsβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
55

66
use anyhow::Result;
77
use examples::get_funded_client;
8-
use notarization::core::NotarizationMethod;
9-
use notarization::core::types::{State, TimeLock};
8+
use notarization::core::types::{NotarizationMethod, State, TimeLock};
109

1110
#[tokio::main]
1211
async fn main() -> Result<()> {
@@ -19,7 +18,7 @@ async fn main() -> Result<()> {
1918
let now_ts = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs();
2019
let unlock_at = now_ts + 86400; // 24 hours
2120

22-
println!("Creating locked notarization with delete lock until: {}", unlock_at);
21+
println!("Creating locked notarization with delete lock until: {unlock_at}");
2322

2423
// Create a locked notarization with state and delete lock
2524
let locked_notarization = notarization_client

β€Žexamples/02_create_dynamic_notarization.rsβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
55

66
use anyhow::Result;
77
use examples::get_funded_client;
8-
use notarization::core::NotarizationMethod;
9-
use notarization::core::types::{State, TimeLock};
8+
use notarization::core::types::{NotarizationMethod, State, TimeLock};
109

1110
#[tokio::main]
1211
async fn main() -> Result<()> {
@@ -65,7 +64,7 @@ async fn main() -> Result<()> {
6564

6665
println!("\nπŸ“Š Notarization Status:");
6766
println!("Simple notarization - Method: {:?}", simple_notarization.method);
68-
println!("Transfer-locked notarization - Transfer locked: {}", is_transfer_locked);
67+
println!("Transfer-locked notarization - Transfer locked: {is_transfer_locked}");
6968
println!("\nπŸ”„ Dynamic notarizations can be updated and transferred (unless transfer-locked)");
7069
println!("πŸ“ State and metadata can be modified over time");
7170

β€Žexamples/03_update_dynamic_notarization.rsβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async fn main() -> Result<()> {
2828
.output
2929
.id;
3030

31-
println!("βœ… Dynamic notarization created with ID: {:?}", dynamic_notarization_id);
31+
println!("βœ… Dynamic notarization created with ID: {dynamic_notarization_id:?}");
3232

3333
let current_state = notarization_client.state(*dynamic_notarization_id.object_id()).await?;
3434
println!("Initial state: {}", current_state.data.as_text()?);
@@ -44,7 +44,7 @@ async fn main() -> Result<()> {
4444

4545
match state_update_result {
4646
Ok(_) => println!("βœ… State update succeeded"),
47-
Err(e) => println!("❌ State update failed - {}", e),
47+
Err(e) => println!("❌ State update failed - {e}"),
4848
}
4949

5050
println!("\nπŸ“ Updating metadata on dynamic notarization...");
@@ -57,7 +57,7 @@ async fn main() -> Result<()> {
5757

5858
match metadata_update_result {
5959
Ok(_) => println!("βœ… Metadata update succeeded"),
60-
Err(e) => println!("❌ Metadata update failed - {}", e),
60+
Err(e) => println!("❌ Metadata update failed - {e}"),
6161
}
6262

6363
let current_state = notarization_client.state(*dynamic_notarization_id.object_id()).await?;

0 commit comments

Comments
Β (0)