Skip to content

Commit fc98670

Browse files
committed
docs: improve notarization and audit trail docs
1 parent d75ce2c commit fc98670

42 files changed

Lines changed: 1076 additions & 81 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,48 +9,66 @@
99

1010
<p align="center">
1111
<a href="#introduction">Introduction</a> ◈
12+
<a href="#packages">Packages</a> ◈
1213
<a href="#documentation-and-resources">Documentation & Resources</a> ◈
1314
<a href="#bindings">Bindings</a> ◈
1415
<a href="#contributing">Contributing</a>
1516
</p>
1617

1718
---
1819

19-
# IOTA Notarization
20+
# IOTA Notarization And Audit Trail
2021

2122
## Introduction
2223

23-
IOTA Notarization enables the creation of immutable, on-chain records for any arbitrary data. This is achieved by storing the data, or a hash of it, inside a dedicated Move object on the IOTA ledger. This process provides a verifiable, timestamped proof of the data's existence and integrity at a specific point in time.
24+
This repository contains two complementary IOTA ledger toolkits:
2425

25-
IOTA Notarization is composed of two primary components:
26+
- **IOTA Notarization**
27+
Creates verifiable on-chain proof objects for arbitrary data, including dynamic and locked notarization flows.
28+
- **IOTA Audit Trail**
29+
Creates shared on-chain audit trails with sequential records, role-based access control, locking, and tagging.
2630

27-
- **Notarization Move Package**: The on-chain smart contracts that define the behavior and structure of notarization objects.
28-
- **Notarization Library (Rust/Wasm)**: A client-side library that provides developers with convenient functions to create, manage, and verify `Notarization` objects on the network.
31+
Each toolkit is split into:
2932

30-
## Documentation and Resources
33+
- a Move package that defines the on-chain object model and behavior
34+
- a Rust SDK that provides typed client access and transaction builders
35+
- wasm bindings for JavaScript and TypeScript integrations
3136

32-
- [Notarization Documentation Pages](https://docs.iota.org/developer/iota-notarization): Supplementing documentation with context around notarization and simple examples on library usage.
33-
- API References:
34-
- [Rust API Reference](https://iotaledger.github.io/notarization/notarization/index.html): Package documentation (cargo docs).
37+
## Packages
3538

36-
<!-- - [Wasm API Reference](https://docs.iota.org/references/iota-notarization/wasm/api_ref): Wasm Package documentation. -->
39+
| Toolkit | Move Package | Rust SDK | Wasm SDK |
40+
| ------- | ------------ | -------- | -------- |
41+
| Notarization | [`notarization-move`](./notarization-move) | [`notarization-rs`](./notarization-rs) | [`bindings/wasm/notarization_wasm`](./bindings/wasm/notarization_wasm) |
42+
| Audit Trail | [`audit-trail-move`](./audit-trail-move) | [`audit-trail-rs`](./audit-trail-rs) | [`bindings/wasm/audit_trail_wasm`](./bindings/wasm/audit_trail_wasm) |
3743

38-
- Examples:
39-
- [Rust Examples](https://github.com/iotaledger/notarization/tree/main/examples/README.md): Practical code snippets to get you started with the library in Rust.
40-
- [Wasm Examples](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/notarization_wasm/examples/README.md): Practical code snippets to get you started with the library in TypeScript/JavaScript.
44+
## Documentation And Resources
45+
46+
- IOTA Notarization:
47+
- [Notarization Rust SDK README](https://github.com/iotaledger/notarization/tree/main/notarization-rs/README.md)
48+
- [Notarization Wasm README](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/notarization_wasm/README.md)
49+
- [Notarization Examples](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/notarization_wasm/examples/README.md)
50+
- [IOTA Notarization Docs Portal](https://docs.iota.org/developer/iota-notarization)
51+
- IOTA Audit Trail:
52+
- [Audit Trail Rust SDK README](https://github.com/iotaledger/notarization/tree/main/audit-trail-rs/README.md)
53+
- [Audit Trail Move Package README](https://github.com/iotaledger/notarization/tree/main/audit-trail-move/README.md)
54+
- [Audit Trail Wasm README](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/audit_trail_wasm/README.md)
55+
- [Audit Trail Wasm Examples](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/audit_trail_wasm/examples/README.md)
56+
- Shared:
57+
- [Repository Examples](https://github.com/iotaledger/notarization/tree/main/examples/README.md)
4158

4259
## Bindings
4360

44-
[Foreign Function Interface (FFI)](https://en.wikipedia.org/wiki/Foreign_function_interface) Bindings of this [Rust](https://www.rust-lang.org/) library to other programming languages:
61+
[Foreign Function Interface (FFI)](https://en.wikipedia.org/wiki/Foreign_function_interface) bindings in this repository:
4562

46-
- [Web Assembly](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/notarization_wasm) (JavaScript/TypeScript)
63+
- [Web Assembly](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/notarization_wasm) for IOTA Notarization
64+
- [Web Assembly](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/audit_trail_wasm) for IOTA Audit Trail
4765

4866
## Contributing
4967

50-
We would love to have you help us with the development of IOTA Notarization. Each and every contribution is greatly valued!
68+
We would love to have you help us with the development of IOTA Notarization and Audit Trail. Each and every contribution is greatly valued.
5169

5270
Please review the [contribution](https://docs.iota.org/developer/iota-notarization/contribute) sections in the [IOTA Docs Portal](https://docs.iota.org/developer/iota-notarization/).
5371

54-
To contribute directly to the repository, simply fork the project, push your changes to your fork and create a pull request to get them included!
72+
To contribute directly to the repository, simply fork the project, push your changes to your fork and create a pull request to get them included.
5573

56-
The best place to get involved in discussions about this library or to look for support at is the `#notarization` channel on the [IOTA Discord](https://discord.gg/iota-builders). You can also ask questions on our [Stack Exchange](https://iota.stackexchange.com/).
74+
The best place to get involved in discussions about these libraries or to look for support at is the `#notarization` channel on the [IOTA Discord](https://discord.gg/iota-builders). You can also ask questions on our [Stack Exchange](https://iota.stackexchange.com/).

audit-trail-move/README.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
![banner](https://github.com/iotaledger/notarization/raw/HEAD/.github/banner_notarization.png)
2+
3+
<p align="center">
4+
<a href="https://iota.stackexchange.com/" style="text-decoration:none;"><img src="https://img.shields.io/badge/StackExchange-9cf.svg?logo=stackexchange" alt="StackExchange"></a>
5+
<a href="https://discord.gg/iota-builders" style="text-decoration:none;"><img src="https://img.shields.io/badge/Discord-9cf.svg?logo=discord" alt="Discord"></a>
6+
<a href="https://github.com/iotaledger/notarization/blob/develop/LICENSE" style="text-decoration:none;"><img src="https://img.shields.io/github/license/iotaledger/notarization.svg" alt="Apache 2.0 license"></a>
7+
</p>
8+
9+
<p align="center">
10+
<a href="#introduction">Introduction</a> ◈
11+
<a href="#modules">Modules</a> ◈
12+
<a href="#development-and-testing">Development & Testing</a> ◈
13+
<a href="#related-libraries">Related Libraries</a> ◈
14+
<a href="#contributing">Contributing</a>
15+
</p>
16+
17+
---
18+
19+
# IOTA Audit Trail Move Package
20+
21+
## Introduction
22+
23+
`audit-trail-move` is the on-chain Move package behind IOTA Audit Trail.
24+
25+
It defines the shared `AuditTrail` object and the supporting types needed for:
26+
27+
- sequential record storage
28+
- role-based access control through capabilities
29+
- trail-wide locking for writes and deletions
30+
- record tags and role tag restrictions
31+
- immutable and updatable trail metadata
32+
- emitted events for trail and record lifecycle changes
33+
34+
The package depends on `TfComponents` for reusable capability, role-map, and timelock primitives.
35+
36+
## Modules
37+
38+
- `audit_trail::main`
39+
Core shared object, events, trail lifecycle, record mutation, metadata updates, roles, and capabilities.
40+
- `audit_trail::record`
41+
Record payloads, initial records, and correction metadata.
42+
- `audit_trail::locking`
43+
Locking configuration and lock evaluation helpers.
44+
- `audit_trail::permission`
45+
Permission constructors and admin permission presets.
46+
- `audit_trail::record_tags`
47+
Tag registry and role tag helpers.
48+
49+
## Development And Testing
50+
51+
Build the Move package:
52+
53+
```bash
54+
cd audit-trail-move
55+
iota move build
56+
```
57+
58+
Run the Move test suite:
59+
60+
```bash
61+
cd audit-trail-move
62+
iota move test
63+
```
64+
65+
Publish locally:
66+
67+
```bash
68+
cd audit-trail-move
69+
./scripts/publish_package.sh
70+
```
71+
72+
The publish script prints `IOTA_AUDIT_TRAIL_PKG_ID` and, on `localnet`, also exports `IOTA_TF_COMPONENTS_PKG_ID`.
73+
74+
The package history files [`Move.lock`](./Move.lock) and [`Move.history.json`](./Move.history.json) are used by the Rust SDK to resolve and track deployed package versions.
75+
76+
## Related Libraries
77+
78+
- [Rust SDK](https://github.com/iotaledger/notarization/tree/main/audit-trail-rs/README.md)
79+
- [Wasm SDK](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/audit_trail_wasm/README.md)
80+
- [Repository Root](https://github.com/iotaledger/notarization/tree/main/README.md)
81+
82+
## Contributing
83+
84+
We would love to have you help us with the development of IOTA Audit Trail. Each and every contribution is greatly valued.
85+
86+
Please review the [contribution](https://docs.iota.org/developer/iota-notarization/contribute) sections in the [IOTA Docs Portal](https://docs.iota.org/developer/iota-notarization/).
87+
88+
To contribute directly to the repository, simply fork the project, push your changes to your fork and create a pull request to get them included.
89+
90+
The best place to get involved in discussions about this package or to look for support at is the `#notarization` channel on the [IOTA Discord](https://discord.gg/iota-builders). You can also ask questions on our [Stack Exchange](https://iota.stackexchange.com/).

audit-trail-rs/README.md

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,99 @@
1-
# IOTA Audit Trail (WIP)
1+
![banner](https://github.com/iotaledger/notarization/raw/HEAD/.github/banner_notarization.png)
2+
3+
<p align="center">
4+
<a href="https://iota.stackexchange.com/" style="text-decoration:none;"><img src="https://img.shields.io/badge/StackExchange-9cf.svg?logo=stackexchange" alt="StackExchange"></a>
5+
<a href="https://discord.gg/iota-builders" style="text-decoration:none;"><img src="https://img.shields.io/badge/Discord-9cf.svg?logo=discord" alt="Discord"></a>
6+
<a href="https://github.com/iotaledger/notarization/blob/develop/LICENSE" style="text-decoration:none;"><img src="https://img.shields.io/github/license/iotaledger/notarization.svg" alt="Apache 2.0 license"></a>
7+
</p>
8+
9+
<p align="center">
10+
<a href="#introduction">Introduction</a> ◈
11+
<a href="#documentation-and-resources">Documentation & Resources</a> ◈
12+
<a href="#feature-overview">Feature Overview</a> ◈
13+
<a href="#bindings">Bindings</a> ◈
14+
<a href="#contributing">Contributing</a>
15+
</p>
16+
17+
---
18+
19+
# IOTA Audit Trail Rust SDK
20+
21+
## Introduction
22+
23+
`audit_trail` is the Rust SDK for reading and writing audit trails on the IOTA ledger.
24+
25+
An audit trail is a shared on-chain object that stores a sequential series of records together with:
26+
27+
- role-based access control backed by capabilities
28+
- trail-level locking rules for writes and deletions
29+
- tag registries for record categorization
30+
- immutable creation metadata and optional updatable metadata
31+
32+
The crate provides:
33+
34+
- read-only and signing client wrappers for the on-chain audit-trail package
35+
- typed trail handles for records, locking, access control, and tags
36+
- serializable Rust representations of on-chain objects and emitted events
37+
- transaction builders that integrate with the shared `product_common` transaction flow
38+
39+
## Documentation And Resources
40+
41+
- [Audit Trail Move Package](https://github.com/iotaledger/notarization/tree/main/audit-trail-move): On-chain contract package that defines the shared object model, permissions, locking, and events.
42+
- [Wasm SDK](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/audit_trail_wasm): JavaScript and TypeScript bindings for browser and Node.js integrations.
43+
- [Wasm Examples](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/audit_trail_wasm/examples/README.md): Runnable audit-trail examples for JS and TS consumers.
44+
- [Repository Examples](https://github.com/iotaledger/notarization/tree/main/examples/README.md): End-to-end examples across the broader repository.
45+
46+
This README is also used as the crate-level rustdoc entry point, while the source files provide detailed API documentation for all public types and methods.
47+
48+
## Feature Overview
49+
50+
The public API is organized around a small set of entry points:
51+
52+
- [`AuditTrailClientReadOnly`] for package resolution, trail-scoped reads, and inspected transactions
53+
- [`AuditTrailClient`] for signed write flows
54+
- [`AuditTrailHandle`] for operations scoped to one trail object
55+
- [`AuditTrailBuilder`] for configuring trail creation
56+
- [`core::types`] for domain types such as [`Data`], [`Record`], [`LockingConfig`], and [`PermissionSet`]
57+
58+
Typical flow:
59+
60+
1. Construct an [`AuditTrailClientReadOnly`] or [`AuditTrailClient`].
61+
2. Resolve a trail with [`AuditTrailClientReadOnly::trail`] or [`AuditTrailClient::trail`].
62+
3. Read state with [`AuditTrailHandle::get`] or move into one of the trail subsystems:
63+
- [`AuditTrailHandle::records`]
64+
- [`AuditTrailHandle::locking`]
65+
- [`AuditTrailHandle::access`]
66+
- [`AuditTrailHandle::tags`]
67+
4. For writes, build a typed transaction from the client, trail handle, or subsystem handle and execute it through the surrounding transaction infrastructure.
68+
69+
The crate deliberately separates transaction construction from submission so applications can keep signing, sponsorship, gas selection, and batching policy outside the SDK.
70+
71+
Pure value types expose executable doctests where the behavior is self-contained and stable:
72+
73+
```rust
74+
use audit_trail::core::types::{Data, InitialRecord};
75+
76+
let record = InitialRecord::new(Data::text("hello"), Some("first write".to_string()), None);
77+
78+
assert_eq!(record.data, Data::text("hello"));
79+
assert_eq!(record.metadata.as_deref(), Some("first write"));
80+
assert!(record.tag.is_none());
81+
```
82+
83+
If you are integrating against a custom deployment, use [`PackageOverrides`] during client construction so the crate does not rely on the built-in package registry for that environment.
84+
85+
## Bindings
86+
87+
[Foreign Function Interface (FFI)](https://en.wikipedia.org/wiki/Foreign_function_interface) bindings of this Rust SDK to other programming languages:
88+
89+
- [Web Assembly](https://github.com/iotaledger/notarization/tree/main/bindings/wasm/audit_trail_wasm) (JavaScript/TypeScript)
90+
91+
## Contributing
92+
93+
We would love to have you help us with the development of IOTA Audit Trail. Each and every contribution is greatly valued.
94+
95+
Please review the [contribution](https://docs.iota.org/developer/iota-notarization/contribute) sections in the [IOTA Docs Portal](https://docs.iota.org/developer/iota-notarization/).
96+
97+
To contribute directly to the repository, simply fork the project, push your changes to your fork and create a pull request to get them included.
98+
99+
The best place to get involved in discussions about this library or to look for support at is the `#notarization` channel on the [IOTA Discord](https://discord.gg/iota-builders). You can also ask questions on our [Stack Exchange](https://iota.stackexchange.com/).

0 commit comments

Comments
 (0)