Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,053 changes: 652 additions & 401 deletions Cargo.lock

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ bcs = "0.1"
chrono = { version = "0.4", default-features = false }
clap = { version = "4.6.1", features = ["derive"] }
hyper = "1"
iota-grpc-client = { git = "https://github.com/iotaledger/iota-rust-sdk.git", package = "iota-sdk-grpc-client", rev = "2f021d0556e47564e9b04bcd0b3e8347c41a0a26" }
iota-grpc-types = { git = "https://github.com/iotaledger/iota-rust-sdk.git", package = "iota-sdk-grpc-types", rev = "2f021d0556e47564e9b04bcd0b3e8347c41a0a26" }
iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.29.0" }
iota-sdk-types = { git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "2f021d0556e47564e9b04bcd0b3e8347c41a0a26", default-features = false }
iota-types = { git = "https://github.com/iotaledger/iota.git", tag = "v1.29.0" }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.24", default-features = false, package = "iota_interaction" }
iota_interaction_rust = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.24", default-features = false, package = "iota_interaction_rust" }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.24", default-features = false, package = "iota_interaction_ts" }
product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.24", default-features = false, package = "product_common" }
iota-grpc-client = { version = "1.0.0-rc.2", package = "iota-sdk-grpc-client" }
iota-grpc-types = { version = "1.0.0-rc.1", package = "iota-sdk-grpc-types" }
iota-sdk = { git = "https://github.com/iotaledger/iota.git", package = "iota-sdk", tag = "v1.35.2" }
iota-sdk-move-types = { version = "1.0.0-rc.2", default-features = false, features = ["serde"] }
iota-sdk-types = { version = "1.0.0-rc.2", default-features = false }
iota-types = { git = "https://github.com/iotaledger/iota.git", tag = "v1.35.2" }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", branch = "chore/bump-iota-v1.35.2", default-features = false, package = "iota_interaction" }
iota_interaction_rust = { git = "https://github.com/iotaledger/product-core.git", branch = "chore/bump-iota-v1.35.2", default-features = false, package = "iota_interaction_rust" }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", branch = "chore/bump-iota-v1.35.2", default-features = false, package = "iota_interaction_ts" }
product_common = { git = "https://github.com/iotaledger/product-core.git", branch = "chore/bump-iota-v1.35.2", default-features = false, package = "product_common" }
reqwest = { version = "0.12.28", default-features = false, features = ["rustls-tls"] }
secret-storage = { git = "https://github.com/iotaledger/secret-storage.git", tag = "v0.3.0", default-features = false }
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
Expand Down
1 change: 1 addition & 0 deletions audit-trail-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ anyhow.workspace = true
async-trait.workspace = true
bcs.workspace = true
iota-caip = { git = "https://github.com/iotaledger/iota-caip.git", default-features = false, features = ["iota"], optional = true }
iota-sdk-move-types.workspace = true
iota-sdk-types.workspace = true
iota_interaction = { workspace = true, default-features = false }
product_common = { workspace = true, default-features = false, features = ["transaction"] }
Expand Down
8 changes: 3 additions & 5 deletions audit-trail-rs/src/core/internal/capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ use std::collections::HashSet;
use iota_interaction::rpc_types::{
IotaObjectDataFilter, IotaObjectDataOptions, IotaObjectResponseQuery, IotaParsedData,
};
use iota_interaction::types::MoveTypeTagTrait;
use iota_interaction::types::dynamic_field::DynamicFieldName;
use iota_interaction::types::id::ID;
use iota_interaction::{IotaClientTrait, OptionalSync};
use iota_sdk_types::{Address, ObjectId, ObjectReference, StructTag};
use product_common::core_client::CoreClientReadOnly;
Expand Down Expand Up @@ -139,9 +137,9 @@ where

let node = linked_table::fetch_node::<_, ObjectId, u64>(
client,
table.id,
*table.id.object_id(),
DynamicFieldName {
type_: ID::get_type_tag(),
type_tag: iota_sdk_types::TypeTag::Struct(Box::new(StructTag::new_id())),
value: serde_json::Value::String(Address::from(key).to_string()),
},
)
Expand Down Expand Up @@ -254,7 +252,7 @@ mod tests {
use std::collections::HashSet;

use iota_interaction::types::base_types::dbg_object_id;
use iota_interaction::types::id::UID;
use iota_sdk_move_types::iota_framework::object::UID;
use iota_sdk_types::{Address, ObjectId};

use super::capability_matches;
Expand Down
5 changes: 3 additions & 2 deletions audit-trail-rs/src/core/internal/linked_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
//! Helpers for reading Move `LinkedTable` nodes through dynamic fields.

use iota_interaction::rpc_types::{IotaData as _, IotaObjectDataOptions};
use iota_interaction::types::collection_types::LinkedTableNode;
use iota_interaction::types::dynamic_field::{DynamicFieldName, Field};
use iota_interaction::types::dynamic_field::DynamicFieldName;
use iota_interaction::{IotaClientTrait, OptionalSync};
use iota_sdk_move_types::iota_framework::dynamic_field::Field;
use iota_sdk_move_types::iota_framework::linked_table::Node as LinkedTableNode;
use iota_sdk_types::ObjectId;
use product_common::core_client::CoreClientReadOnly;
use serde::de::DeserializeOwned;
Expand Down
3 changes: 2 additions & 1 deletion audit-trail-rs/src/core/internal/move_collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use std::collections::{HashMap, HashSet};
use std::fmt::Debug;
use std::hash::Hash;

use iota_interaction::types::collection_types::{VecMap, VecSet};
use iota_sdk_move_types::iota_framework::vec_map::VecMap;
use iota_sdk_move_types::iota_framework::vec_set::VecSet;
use serde::{Deserialize, Deserializer};

/// Deserializes a Move `VecMap<K, V>` into a Rust [`HashMap`].
Expand Down
12 changes: 6 additions & 6 deletions audit-trail-rs/src/core/records/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use std::marker::PhantomData;

use iota_interaction::move_core_types::annotated_value::MoveValue;
use iota_interaction::rpc_types::IotaMoveValue;
use iota_interaction::types::collection_types::LinkedTable;
use iota_interaction::types::dynamic_field::DynamicFieldName;
use iota_interaction::{IotaKeySignature, OptionalSync};
use iota_sdk_move_types::iota_framework::linked_table::LinkedTable;
use iota_sdk_types::{ObjectId, TypeTag};
use product_common::core_client::{CoreClient, CoreClientReadOnly};
use product_common::transaction::transaction_builder::TransactionBuilder;
Expand Down Expand Up @@ -275,7 +275,7 @@ impl<'a, C, D> TrailRecords<'a, C, D> {
})
}

async fn load_records_table(&self) -> Result<LinkedTable<u64>, Error>
async fn load_records_table(&self) -> Result<LinkedTable<u64, Record>, Error>
where
C: AuditTrailReadOnly,
{
Expand All @@ -287,7 +287,7 @@ impl<'a, C, D> TrailRecords<'a, C, D> {

async fn list_linked_table_page<C, V>(
client: &C,
table: &LinkedTable<u64>,
table: &LinkedTable<u64, Record>,
start_key: Option<u64>,
limit: usize,
) -> Result<(BTreeMap<u64, V>, Option<u64>), Error>
Expand Down Expand Up @@ -315,9 +315,9 @@ where

let node = linked_table::fetch_node::<_, u64, V>(
client,
table.id,
*table.id.object_id(),
DynamicFieldName {
type_: TypeTag::U64,
type_tag: TypeTag::U64,
value: IotaMoveValue::from(MoveValue::U64(key)).to_json_value(),
},
)
Expand All @@ -332,7 +332,7 @@ where

async fn list_linked_table<C, V>(
client: &C,
table: &LinkedTable<u64>,
table: &LinkedTable<u64, Record>,
max_entries: Option<usize>,
) -> Result<HashMap<u64, V>, Error>
where
Expand Down
4 changes: 2 additions & 2 deletions audit-trail-rs/src/core/records/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ impl RecordsOps {

let replaced = linked_table::fetch_node::<_, u64, Record<Data>>(
client,
trail.records.id,
*trail.records.id.object_id(),
DynamicFieldName {
type_: TypeTag::U64,
type_tag: TypeTag::U64,
value: IotaMoveValue::from(MoveValue::U64(sequence_number)).to_json_value(),
},
)
Expand Down
7 changes: 4 additions & 3 deletions audit-trail-rs/src/core/types/audit_trail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ use std::collections::HashMap;
use std::str::FromStr;

use iota_interaction::ident_str;
use iota_interaction::types::collection_types::LinkedTable;
use iota_interaction::types::id::UID;
use iota_interaction::types::programmable_transaction_builder::ProgrammableTransactionBuilder as Ptb;
use iota_sdk_move_types::iota_framework::linked_table::LinkedTable;
use iota_sdk_move_types::iota_framework::object::UID;
use iota_sdk_types::{Address, Argument, ObjectId, TypeTag};
use serde::{Deserialize, Serialize};

use super::locking::LockingConfig;
use super::record::Record;
use super::role_map::RoleMap;
use crate::core::internal::move_collections::deserialize_vec_map;
use crate::core::internal::tx;
Expand Down Expand Up @@ -71,7 +72,7 @@ pub struct OnChainAuditTrail {
/// Current record sequence number cursor.
pub sequence_number: u64,
/// Linked table containing the trail records.
pub records: LinkedTable<u64>,
pub records: LinkedTable<u64, Record>,
/// Registry of allowed record tags.
pub tags: TagRegistry,
/// Active locking rules for the trail.
Expand Down
2 changes: 1 addition & 1 deletion audit-trail-rs/src/core/types/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use std::collections::HashSet;

use iota_interaction::types::collection_types::VecSet;
use iota_sdk_move_types::iota_framework::vec_set::VecSet;
use iota_sdk_types::{Address, ObjectId};
use serde::{Deserialize, Serialize};
use serde_aux::field_attributes::{deserialize_number_from_string, deserialize_option_number_from_string};
Expand Down
2 changes: 1 addition & 1 deletion audit-trail-rs/src/core/types/permission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl PermissionSet {
.collect::<Result<Vec<_>, _>>()?;

Ok(ptb.command(Command::MakeMoveVector(MakeMoveVector {
type_: Some(permission_type),
type_tag: Some(permission_type),
elements: permission_args,
})))
}
Expand Down
8 changes: 4 additions & 4 deletions audit-trail-rs/src/core/types/role_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
use std::collections::{HashMap, HashSet};
use std::str::FromStr;

use iota_interaction::types::collection_types::LinkedTable;
use iota_interaction::types::id::UID;
use iota_interaction::types::programmable_transaction_builder::ProgrammableTransactionBuilder as Ptb;
use iota_interaction::{MoveType, ident_str};
use iota_sdk_move_types::iota_framework::linked_table::LinkedTable;
use iota_sdk_move_types::iota_framework::object::UID;
use iota_sdk_types::{Address, Argument, ObjectId, TypeTag};
use serde::{Deserialize, Serialize};
use serde_aux::field_attributes::deserialize_option_number_from_string;
Expand All @@ -32,7 +32,7 @@ pub struct RoleMap {
/// Move `INITIAL_ADMIN_ROLE_NAME` constant). The role bearing this name cannot be deleted.
pub initial_admin_role_name: String,
/// Denylist of revoked capability IDs.
pub revoked_capabilities: LinkedTable<ObjectId>,
pub revoked_capabilities: LinkedTable<ObjectId, u64>,
/// Capability IDs currently recognized as initial-admin capabilities.
#[serde(deserialize_with = "deserialize_vec_set")]
pub initial_admin_cap_ids: HashSet<ObjectId>,
Expand Down Expand Up @@ -183,7 +183,7 @@ impl MoveType for Capability {
#[cfg(test)]
mod tests {
use iota_interaction::types::base_types::dbg_object_id;
use iota_interaction::types::id::UID;
use iota_sdk_move_types::iota_framework::object::UID;
use iota_sdk_types::Address;
use serde_json::json;

Expand Down
9 changes: 5 additions & 4 deletions bindings/wasm/audit_trail_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ anyhow = "1.0.95"
audit_trails = { path = "../../../audit-trail-rs", default-features = false, features = ["gas-station", "default-http-client"] }
bcs = "0.1.6"
console_error_panic_hook = { version = "0.1" }
iota-sdk-types = { git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "2f021d0556e47564e9b04bcd0b3e8347c41a0a26", default-features = false }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.24", default-features = false }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.24" }
iota-sdk-move-types = { version = "1.0.0-rc.2", default-features = false, features = ["serde"] }
iota-sdk-types = { version = "1.0.0-rc.2", default-features = false }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", branch = "chore/bump-iota-v1.35.2", default-features = false }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", branch = "chore/bump-iota-v1.35.2" }
js-sys = { version = "0.3.61" }
product_common = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.24", features = ["core-client", "transaction", "bindings", "binding-utils", "gas-station", "default-http-client"] }
product_common = { git = "https://github.com/iotaledger/product-core.git", branch = "chore/bump-iota-v1.35.2", features = ["core-client", "transaction", "bindings", "binding-utils", "gas-station", "default-http-client"] }
serde = { version = "1.0", features = ["derive"] }
serde-wasm-bindgen = "0.6.5"
tokio = { version = "1.49.0", default-features = false, features = ["sync"] }
Expand Down
10 changes: 5 additions & 5 deletions bindings/wasm/audit_trail_wasm/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use audit_trails::core::types::{
RevokedCapabilitiesCleanedUp, Role, RoleAdminPermissions, RoleCreated, RoleDeleted, RoleMap, RoleTags, RoleUpdated,
TimeLock,
};
use iota_interaction::types::collection_types::LinkedTable;
use iota_sdk_move_types::iota_framework::linked_table::LinkedTable;
use iota_sdk_types::ObjectId;
use js_sys::Uint8Array;
use product_common::bindings::WasmAddress;
Expand Down Expand Up @@ -432,8 +432,8 @@ pub struct WasmLinkedTable {
pub tail: Option<u64>,
}

impl From<LinkedTable<u64>> for WasmLinkedTable {
fn from(value: LinkedTable<u64>) -> Self {
impl From<LinkedTable<u64, Record>> for WasmLinkedTable {
fn from(value: LinkedTable<u64, Record>) -> Self {
Self {
id: value.id.to_string(),
size: value.size,
Expand Down Expand Up @@ -618,8 +618,8 @@ pub struct WasmObjectIdLinkedTable {
pub tail: Option<String>,
}

impl From<LinkedTable<ObjectId>> for WasmObjectIdLinkedTable {
fn from(value: LinkedTable<ObjectId>) -> Self {
impl From<LinkedTable<ObjectId, u64>> for WasmObjectIdLinkedTable {
fn from(value: LinkedTable<ObjectId, u64>) -> Self {
Self {
id: value.id.to_string(),
size: value.size,
Expand Down
8 changes: 4 additions & 4 deletions bindings/wasm/notarization_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ async-trait = { version = "0.1", default-features = false }
bcs = "0.1.6"
console_error_panic_hook = { version = "0.1" }
fastcrypto = { version = "0.1.11" }
iota-sdk-types = { git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "2f021d0556e47564e9b04bcd0b3e8347c41a0a26", default-features = false }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.24", default-features = false }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", tag = "v0.8.24" }
iota-sdk-types = { version = "1.0.0-rc.2", default-features = false }
iota_interaction = { git = "https://github.com/iotaledger/product-core.git", branch = "chore/bump-iota-v1.35.2", default-features = false }
iota_interaction_ts = { git = "https://github.com/iotaledger/product-core.git", branch = "chore/bump-iota-v1.35.2" }
js-sys = { version = "=0.3.85" }
prefix-hex = { version = "0.7", default-features = false }
serde = { version = "1.0", features = ["derive"] }
Expand All @@ -38,7 +38,7 @@ wasm-bindgen-futures = { version = "0.4", default-features = false }

[dependencies.product_common]
git = "https://github.com/iotaledger/product-core.git"
tag = "v0.8.24"
branch = "chore/bump-iota-v1.35.2"
features = [
"core-client",
"transaction",
Expand Down
4 changes: 2 additions & 2 deletions bindings/wasm/poi_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ async-trait = { version = "0.1", default-features = false }
bcs = "0.1.6"
console_error_panic_hook = "0.1"
fastcrypto = "=0.1.11"
iota-sdk-types = { git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "2f021d0556e47564e9b04bcd0b3e8347c41a0a26", default-features = false, features = ["serde"] }
iota-types = { git = "https://github.com/iotaledger/iota.git", tag = "v1.29.0" }
iota-sdk-types = { version = "1.0.0-rc.2", default-features = false, features = ["serde"] }
iota-types = { git = "https://github.com/iotaledger/iota.git", tag = "v1.35.2" }
js-sys = "=0.3.85"
poi-rs = { path = "../../../poi-rs", default-features = false }
serde = { version = "1.0", features = ["derive"] }
Expand Down
9 changes: 4 additions & 5 deletions bindings/wasm/poi_wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,11 @@ Successful verification authenticates the following targets relative to the supp

## JSON Compatibility

Proof JSON is a versioned persistence and exchange format. Releases that support `ProofV1` continue to deserialize its
existing JSON shape and serialize the same field structure. Frozen V1 fixtures enforce this contract for transaction,
object, and event proofs.
Proof JSON is a versioned exchange format. The `ProofV1` representation embeds the serde encoding of the IOTA SDK
types it contains, so a dependency upgrade can change it. The format is not stable before 1.0: a proof serialized by
one release is not guaranteed to deserialize in another.

Dependency upgrades must not silently change the `ProofV1` representation. Preserve the existing shape with custom
serialization when necessary, or introduce a new `Proof` variant for an incompatible format change.
Frozen V1 fixtures detect representation changes for the transaction, object, and event proofs they cover.

## Trust Boundaries

Expand Down
6 changes: 3 additions & 3 deletions bindings/wasm/poi_wasm/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ use async_trait::async_trait;
use fastcrypto::traits::ToFromBytes;
use iota_sdk_types::{
CheckpointContents, CheckpointDigest, ObjectId, SignedCheckpointSummary, SignedTransaction, Transaction,
TransactionDigest, UserSignature, Version,
TransactionDigest, TransactionEffects, TransactionEvents, UserSignature, Version,
};
use iota_types::base_types::AuthorityName;
use iota_types::committee::{Committee, EpochId};
use iota_types::digests::ChainIdentifier;
use iota_types::effects::{TransactionEffects, TransactionEffectsAPI, TransactionEvents};
use iota_types::effects::TransactionEffectsAPI;
use iota_types::messages_checkpoint::CertifiedCheckpointSummary;
use iota_types::object::Object;
use js_sys::Uint8Array;
Expand Down Expand Up @@ -226,7 +226,7 @@ fn decode_transaction(evidence: JsTransactionEvidence) -> Result<SourceTransacti
.map(|bytes| decode_bcs::<UserSignature>(bytes))
.collect::<Result<Vec<_>, _>>()
.map_err(SourceError::invalid_response)?;
let transaction: iota_types::transaction::Transaction = SignedTransaction {
let transaction: iota_types::transaction::TransactionEnvelope = SignedTransaction {
transaction,
signatures,
}
Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async-trait.workspace = true
audit_trails = { path = "../audit-trail-rs" }
bcs.workspace = true
chrono.workspace = true
iota-config = { git = "https://github.com/iotaledger/iota.git", tag = "v1.29.0" }
iota-config = { git = "https://github.com/iotaledger/iota.git", tag = "v1.35.2" }
iota-grpc-client.workspace = true
iota-sdk.workspace = true
iota-sdk-types.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion examples/poi/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::path::PathBuf;

use anyhow::{Context, Result, bail, ensure};
use iota_config::{IOTA_GENESIS_FILENAME, iota_config_dir};
use iota_grpc_client::Client as GrpcClient;
use iota_grpc_client::GrpcClient;
use iota_interaction::KeytoolSigner;
use iota_sdk_types::{ObjectId, TransactionDigest};
use iota_types::event::EventID;
Expand Down
1 change: 1 addition & 0 deletions notarization-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ anyhow.workspace = true
async-trait.workspace = true
bcs.workspace = true
iota-caip = { git = "https://github.com/iotaledger/iota-caip.git", default-features = false, features = ["iota"], optional = true }
iota-sdk-move-types.workspace = true
iota-sdk-types.workspace = true
iota_interaction = { workspace = true, default-features = false }
product_common = { workspace = true, default-features = false, features = ["transaction"] }
Expand Down
2 changes: 1 addition & 1 deletion notarization-rs/src/core/types/notarization.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2020-2025 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use iota_interaction::types::id::UID;
use iota_sdk_move_types::iota_framework::object::UID;
use iota_sdk_types::Address;
use serde::{Deserialize, Serialize};

Expand Down
Loading
Loading