# Table of Contents - [IOTA Notarization | IOTA Documentation](#iota-notarization-iota-documentation) - [Getting Started with Rust | IOTA Documentation](#getting-started-with-rust-iota-documentation) - [Getting Started with Wasm | IOTA Documentation](#getting-started-with-wasm-iota-documentation) - [Local Network Setup | IOTA Documentation](#local-network-setup-iota-documentation) - [Contribute to the project | IOTA Documentation](#contribute-to-the-project-iota-documentation) - [The Notarization Object | IOTA Documentation](#the-notarization-object-iota-documentation) - [IoT Weather Station - Dynamic Notarization | IOTA Documentation](#iot-weather-station-dynamic-notarization-iota-documentation) - [api_ref | IOTA Documentation](#api-ref-iota-documentation) - [Dynamic Notarization | IOTA Documentation](#dynamic-notarization-iota-documentation) - [Locked Notarization | IOTA Documentation](#locked-notarization-iota-documentation) - [Legal Contract - Locked Notarization | IOTA Documentation](#legal-contract-locked-notarization-iota-documentation) - [Comparison: Dynamic vs. Locked Notarization | IOTA Documentation](#comparison-dynamic-vs-locked-notarization-iota-documentation) - [Access Read-Only Methods in Notarizations | IOTA Documentation](#access-read-only-methods-in-notarizations-iota-documentation) - [Create a Locked Notarization | IOTA Documentation](#create-a-locked-notarization-iota-documentation) - [Create a Dynamic Notarization | IOTA Documentation](#create-a-dynamic-notarization-iota-documentation) - [Update State in Dynamic Notarizations | IOTA Documentation](#update-state-in-dynamic-notarizations-iota-documentation) - [Destroy Locked Notarization | IOTA Documentation](#destroy-locked-notarization-iota-documentation) - [Update Metadata in Dynamic Notarizations | IOTA Documentation](#update-metadata-in-dynamic-notarizations-iota-documentation) - [Destroy Dynamic Notarization | IOTA Documentation](#destroy-dynamic-notarization-iota-documentation) - [Transfer Dynamic Notarization | IOTA Documentation](#transfer-dynamic-notarization-iota-documentation) --- # IOTA Notarization | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page ![IOTA Notarization](https://docs.iota.org/assets/images/banner_notarization-89c4ff389e9153af28d18d739ba2a533.png) The IOTA Notarization provides a powerful suite of tools for creating verifiable, on-chain records of any digital data. It is designed to act as a universal layer of trust, ensuring the integrity and provenance of data for applications, organizations, and digital assets. By anchoring data to the IOTA ledger, Notarization transforms it into a permanent, tamper-proof asset that can be independently verified by anyone, at any time. Introduction to Data Notarization[​](https://docs.iota.org/developer/iota-notarization/#introduction-to-data-notarization "Direct link to Introduction to Data Notarization") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ In our digital world, proving that a piece of information existed at a specific time and has not been altered since is a fundamental challenge. Traditional systems often rely on centralized authorities, which can be single points of failure, expensive, and inefficient. Decentralized Notarization on a Distributed Ledger Technology (DLT) solves this by providing a trustless, immutable, and transparent platform for recording data. When a document, transaction, or event is notarized on the IOTA ledger, it gains a verifiable timestamp and a cryptographic seal, securing it against unauthorized changes and providing a robust audit trail. ### Notarization for Legal and Compliance[​](https://docs.iota.org/developer/iota-notarization/#notarization-for-legal-and-compliance "Direct link to Notarization for Legal and Compliance") TRUST IOTA Notarization allows organizations to create legally admissible, tamper-proof records for compliance and dispute resolution among many other use cases. In regulated industries, maintaining the integrity of records is not just good practice—it's a legal requirement. Organizations face significant challenges with data retention, auditability, and proving compliance. Data can be altered, logs can be lost, and demonstrating the historical state of a record can be nearly impossible. IOTA Notarization offers a direct solution. By creating an on-chain, timestamped record of contracts, financial statements, or compliance documents, organizations can build an unchangeable audit trail. This fundamentally shifts the burden of proof; instead of trusting an organization's internal database, auditors and regulators can rely on the mathematical certainty of the IOTA ledger. This reduces the risk of disputes, simplifies compliance with regulations like GDPR by proving data handling steps, and provides a cost-efficient method for long-term, secure data archiving. ### Notarization for Products and Assets[​](https://docs.iota.org/developer/iota-notarization/#notarization-for-products-and-assets "Direct link to Notarization for Products and Assets") TRACEABILITY IOTA Notarization enables full traceability, letting you follow an asset’s journey from creation to final destination—perfect for supply chains, collectibles, and more! For both physical goods and digital assets, their value is often tied to their history, authenticity, and integrity. Has this software been tampered with? Is this luxury good authentic? Was this component manufactured to specification? Answering these questions requires a trusted record of the asset's lifecycle. IOTA Notarization provides this by allowing manufacturers, creators, and owners to create an immutable log for any asset. This is the foundation of technologies like the Digital Product Passport (DPP), where every step from manufacturing to recycling is verifiably recorded. For digital assets, such as creative works or source code, notarization establishes a permanent proof of authorship and existence. This layer of trust prevents fraud, enhances value, and enables new business models based on the verifiable history of an asset. ### One Framework. Two Powerful Methods.[​](https://docs.iota.org/developer/iota-notarization/#one-framework-two-powerful-methods "Direct link to One Framework. Two Powerful Methods.") The IOTA Notarization framework is not a one-size-fits-all solution. It offers two powerful, distinct methods to cater to a wide range of use cases: * **Locked Notarization**: For creating permanent, static records that can not be changed until the object is destroyed. Ideal for contracts, certificates, and legal evidence. * **Dynamic Notarization**: For creating records of evolving data where only the most current version is relevant. Ideal for tracking asset status, managing registries, or versioning living documents. Together, these methods provide a comprehensive toolkit for building applications that require a robust foundation of digital trust. ### Why IOTA for Notarization?[​](https://docs.iota.org/developer/iota-notarization/#why-iota-for-notarization "Direct link to Why IOTA for Notarization?") IOTA stands apart as a scalable Distributed Ledger Technology (DLT), making it uniquely suitable for a universal notarization solution. Key features include: * **Cost-Effectiveness**: Creating Notarizations on IOTA involves a refundable storage deposit for the ledger space occupied. This deposit can be fully reclaimed when the record is no longer needed, making long-term storage highly affordable. * **High Availability**: Notarized data is stored on every node in the IOTA network, ensuring it is always available for verifiers around the globe. * **Security**: Write access to a Notarization object is exclusively controlled by the owner's private keys, preventing any unauthorized modifications. * **Integrity**: Updates and state transitions are secured by the same robust consensus mechanism that secures the entire IOTA network, guaranteeing the consistency and immutability of every record. Key Actors in the Notarization Process[​](https://docs.iota.org/developer/iota-notarization/#key-actors-in-the-notarization-process "Direct link to Key Actors in the Notarization Process") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The IOTA Notarization framework involves two primary actors that work together to ensure data integrity and verification: ### Prover[​](https://docs.iota.org/developer/iota-notarization/#prover "Direct link to Prover") The **Prover** is responsible for creating and submitting notarization transactions that embed immutable data into the IOTA network. **Key Responsibilities:** * Generate cryptographic hashes of documents, media files, or any data requiring notarization * Submit transactions that store this data on the IOTA network, ensuring immutability * Maintain original documents off-chain while linking them to on-chain records through unique object IDs (for privacy-focused implementations) * Optionally store complete data on-chain using the notarization object as the official data repository ### Verifier[​](https://docs.iota.org/developer/iota-notarization/#verifier "Direct link to Verifier") The **Verifier** confirms the integrity and immutability of data by validating information stored on the IOTA ledger. **Key Responsibilities:** * Request original documents and their associated object IDs from the Prover * Query the IOTA network through the Notarization Library to retrieve stored data using object IDs * Validate that data stored in the ledger matches the original document (for hash-based verification) * Verify the authenticity and integrity of on-chain stored data independently Give Feedback * [Introduction to Data Notarization](https://docs.iota.org/developer/iota-notarization/#introduction-to-data-notarization) * [Notarization for Legal and Compliance](https://docs.iota.org/developer/iota-notarization/#notarization-for-legal-and-compliance) * [Notarization for Products and Assets](https://docs.iota.org/developer/iota-notarization/#notarization-for-products-and-assets) * [One Framework. Two Powerful Methods.](https://docs.iota.org/developer/iota-notarization/#one-framework-two-powerful-methods) * [Why IOTA for Notarization?](https://docs.iota.org/developer/iota-notarization/#why-iota-for-notarization) * [Key Actors in the Notarization Process](https://docs.iota.org/developer/iota-notarization/#key-actors-in-the-notarization-process) * [Prover](https://docs.iota.org/developer/iota-notarization/#prover) * [Verifier](https://docs.iota.org/developer/iota-notarization/#verifier) --- # Getting Started with Rust | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/getting-started/rust#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page Requirements[​](https://docs.iota.org/developer/iota-notarization/getting-started/rust#requirements "Direct link to Requirements") ----------------------------------------------------------------------------------------------------------------------------------- * [Rust](https://www.rust-lang.org/) (latest) * [Cargo](https://doc.rust-lang.org/cargo/) (latest) * for running example: a local network node with the IOTA Notarization package deployed as described [here](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup) Include the Library[​](https://docs.iota.org/developer/iota-notarization/getting-started/rust#include-the-library "Direct link to Include the Library") -------------------------------------------------------------------------------------------------------------------------------------------------------- To include IOTA Notarization in your project, add it as a dependency in your `Cargo.toml`: [dependencies]notarization = { git = "https://github.com/iotaledger/notarization", tag = "v0.1"} Examples[​](https://docs.iota.org/developer/iota-notarization/getting-started/rust#examples "Direct link to Examples") ----------------------------------------------------------------------------------------------------------------------- To try out the [examples](https://github.com/iotaledger/notarization/tree/v0.1/examples) , you should: 1. Clone the repository: git clone https://github.com/iotaledger/notarization 2. Build the repository: cargo build 3. Run your first example: cargo run --example 01_create_locked_notarization API Reference[​](https://docs.iota.org/developer/iota-notarization/getting-started/rust#api-reference "Direct link to API Reference") -------------------------------------------------------------------------------------------------------------------------------------- You can find the API reference for the Rust library [here](https://iotaledger.github.io/notarization/notarization/index.html) . If you would like to build the documentation, locally you can do so with the following command: RUSTDOCFLAGS='--cfg docsrs' cargo +nightly doc -p notarization --all-features --no-deps --open Give Feedback * [Requirements](https://docs.iota.org/developer/iota-notarization/getting-started/rust#requirements) * [Include the Library](https://docs.iota.org/developer/iota-notarization/getting-started/rust#include-the-library) * [Examples](https://docs.iota.org/developer/iota-notarization/getting-started/rust#examples) * [API Reference](https://docs.iota.org/developer/iota-notarization/getting-started/rust#api-reference) --- # Getting Started with Wasm | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page Minimum Requirements[​](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#minimum-requirements "Direct link to Minimum Requirements") ----------------------------------------------------------------------------------------------------------------------------------------------------------- * [Node.js](https://nodejs.org/en) (>= `v20`) Install the Library[​](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#install-the-library "Direct link to Install the Library") -------------------------------------------------------------------------------------------------------------------------------------------------------- If your project does not contain it already, install the peer dependency `@iota/iota-sdk` as well. * npm * Yarn * pnpm npm install @iota/iota-sdk yarn add @iota/iota-sdk pnpm add @iota/iota-sdk You can install the latest beta version of the library by running the following command: * npm * Yarn * pnpm npm install @iota/notarization@alpha yarn add @iota/notarization@alpha pnpm add @iota/notarization@alpha Build the Library[​](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#build-the-library "Direct link to Build the Library") -------------------------------------------------------------------------------------------------------------------------------------------------- Alternatively, you can build the bindings to work with currently unreleased features. You can find instructions for this in the [`notarization` repository](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm#build) . Usage in Node.js and Web[​](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#usage-in-nodejs-and-web "Direct link to Usage in Node.js and Web") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- The Wasm packages are bundled for both Node.js and web. To use them, you must import them from the correct entry point: **Node.js** import { ... } from '@iota/notarization/node'; **Web** import { ... } from '@iota/notarization/web'; Usage Examples[​](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#usage-examples "Direct link to Usage Examples") ----------------------------------------------------------------------------------------------------------------------------------------- * Typescript (Node.js) * Typescript (Web) bindings/wasm/notarization\_wasm/examples/src/01\_create\_locked.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/01_create_locked.ts) import { TimeLock } from "@iota/notarization/web";import { strict as assert } from "assert";import { getFundedClient } from "./util";/** Demonstrate how to create a Locked Notarization and publish it. */export async function createLocked(): Promise { console.log("Creating a simple locked notarization example"); // create a new client that offers notarization related functions const notarizationClient = await getFundedClient(); // Calculate an unlock time (24 hours from now) to be used for deleteLock const delete_unlock_at = Math.round(Date.now() / 1000 + 86400); // 24 hours const utf8Encode = new TextEncoder(); // ... Rest of the code} See [utils](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/util.ts) for details about the implementations about the helper functions used here. API Reference[​](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#api-reference "Direct link to API Reference") -------------------------------------------------------------------------------------------------------------------------------------- For complete API documentation, see the [WASM API Reference](https://docs.iota.org/developer/iota-notarization/references/wasm/api_ref) . Examples[​](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#examples "Direct link to Examples") ----------------------------------------------------------------------------------------------------------------------- You can find more usage examples and tutorials in the [notarization examples repository](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples) . Give Feedback * [Minimum Requirements](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#minimum-requirements) * [Install the Library](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#install-the-library) * [Build the Library](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#build-the-library) * [Usage in Node.js and Web](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#usage-in-nodejs-and-web) * [Usage Examples](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#usage-examples) * [API Reference](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#api-reference) * [Examples](https://docs.iota.org/developer/iota-notarization/getting-started/wasm#examples) --- # Local Network Setup | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page Start the Local Chain[​](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#start-the-local-chain "Direct link to Start the Local Chain") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The examples in the repository and in this getting started section require a test network running locally, so if you do not already have one, [install the IOTA CLI tool](https://docs.iota.org/developer/getting-started/install-iota) . Next, [start the local network](https://docs.iota.org/developer/getting-started/local-network) with the following command. RUST_LOG="off,iota_node=info" iota start --force-regenesis --with-faucet Configure IOTA Client For the Local Chain[​](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#configure-iota-client-for-the-local-chain "Direct link to Configure IOTA Client For the Local Chain") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Fresh IOTA Client[​](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#fresh-iota-client "Direct link to Fresh IOTA Client") If you haven't started the IOTA CLI client features tool yet, you have to generate a config file during the first start by calling: iota client Agree to connect to a full node server. Now you can interactively provide the config values: * URL: "[http://127.0.0.1:9000](http://127.0.0.1:9000/) " * alias: "localnet" * key scheme: 0 (ed25519) ### New Env[​](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#new-env "Direct link to New Env") Alternatively, if you don't already have an environment pointing to the local node, create a new env for an IOTA full node server with the same values as described above. iota client new-env --rpc "http://127.0.0.1:9000" --alias localnet ### Switch to Local Node Env[​](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#switch-to-local-node-env "Direct link to Switch to Local Node Env") If you did one of the steps above or already have an env as described above, make sure to switch to it. Check active env with: iota client env If your localnet does not have the asterisk in the "active" column, switch to it with: iota client switch --env localnet ### Request Funds for Active Accounts[​](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#request-funds-for-active-accounts "Direct link to Request Funds for Active Accounts") Request funds for the active account, as the next step will need them. This can be done with: iota client faucet ### Publish the IOTA Notarization Package[​](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#publish-the-iota-notarization-package "Direct link to Publish the IOTA Notarization Package") Now that you have your env pointing to a local node, and have an account, you're almost ready to put a checkmark on the last requirement for using the IOTA Notarization locally: The deployment of the smart contracts used by the library. Clone the IOTA Notarization [repository](https://github.com/iotaledger/notarization) , and switch to the tag matching the version, you're working with. Next, publish the Notarization package to your local test network: ./notarization-move/scripts/publish_package.sh The last line of the output will be the id of the package that was just published. You'll need this ID when creating an instance of `NotarizationClient` and `NotarizationClientReadOnly` for a custom network, like the local network. The [create a locked notarization example](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create) , as well as the following examples, fetch this value from the environment variable `IOTA_NOTARIZATION_PKG_ID`, so in order to run them, set this variable, e.g. for package id `0x20f640b0dc01c50c04a84443d4320d7a77a15ed94f9bc19ebb6d0a5805045ddc` with: export IOTA_NOTARIZATION_PKG_ID=0x20f640b0dc01c50c04a84443d4320d7a77a15ed94f9bc19ebb6d0a5805045ddc Give Feedback * [Start the Local Chain](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#start-the-local-chain) * [Configure IOTA Client For the Local Chain](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#configure-iota-client-for-the-local-chain) * [Fresh IOTA Client](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#fresh-iota-client) * [New Env](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#new-env) * [Switch to Local Node Env](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#switch-to-local-node-env) * [Request Funds for Active Accounts](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#request-funds-for-active-accounts) * [Publish the IOTA Notarization Package](https://docs.iota.org/developer/iota-notarization/getting-started/local-network-setup#publish-the-iota-notarization-package) --- # Contribute to the project | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/contribute#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page **Thanks for thinking about contributing to the project! You can contribute using the following ways.** Contribute to the Project's GitHub Repository[​](https://docs.iota.org/developer/iota-notarization/contribute#contribute-to-the-projects-github-repository "Direct link to Contribute to the Project's GitHub Repository") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- All of the code is open source and hosted on [GitHub](https://github.com/iotaledger/notarization) where you can: * [Report a bug](https://github.com/iotaledger/notarization/issues/new/choose) . * [Suggest a new feature](https://github.com/iotaledger/notarization/blob/main/.github/CONTRIBUTING.md) . * [Contribute to the documentation](https://docs.iota.org/developer/iota-notarization/contribute#contribute-to-the-documentation) . Contribute to the Documentation[​](https://docs.iota.org/developer/iota-notarization/contribute#contribute-to-the-documentation "Direct link to Contribute to the Documentation") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This documentation is also open source and hosted on GitHub. If you want to contribute new documentation or fix an error, see the [contribution guidelines](https://docs.iota.org/developer/references/contribute/contribution-process) . Share Your Knowledge[​](https://docs.iota.org/developer/iota-notarization/contribute#share-your-knowledge "Direct link to Share Your Knowledge") ------------------------------------------------------------------------------------------------------------------------------------------------- Helping others is an important part of any open source ecosystem. By sharing your knowledge with others, you can provide a lot of value to the community and maybe inspire someone else to learn and contribute. Take a look at what discussions are going on in the `#notarization-dev` channel on the [IOTA Builders Discord](https://discord.gg/iota-builders) . Thanks ❤️ Give Feedback * [Contribute to the Project's GitHub Repository](https://docs.iota.org/developer/iota-notarization/contribute#contribute-to-the-projects-github-repository) * [Contribute to the Documentation](https://docs.iota.org/developer/iota-notarization/contribute#contribute-to-the-documentation) * [Share Your Knowledge](https://docs.iota.org/developer/iota-notarization/contribute#share-your-knowledge) --- # The Notarization Object | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page 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. IOTA Notarization is composed of two primary components: * **Notarization Move Package**: The on-chain smart contracts that define the behavior and structure of notarization objects. * **Notarization Library (Rust/Wasm)**: A client-side library that provides developers with convenient functions to create, manage, and verify `Notarization` objects on the network. The `Notarization` Object[​](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#the-notarization-object "Direct link to the-notarization-object") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The core of the suite is the `Notarization` object, a unified Move `struct` that holds the notarized data and its associated metadata. The Notarization Object is owned by an address. The `Notarization` object is designed to be flexible and supports two distinct methods, `Locked` and `Dynamic`, which are determined by the `method` field upon creation. // A unified notarization type that can be either dynamic or lockedpublic struct Notarization has key { id: UID, state: State, // The state of the `Notarization` that can be updated immutable_metadata: ImmutableMetadata, // Variant-specific metadata updatable_metadata: Option, // Provides context or additional information for third parties last_state_change_at: u64, // Timestamp of the last state change state_version_count: u64, // Counter for the number of state updates method: NotarizationMethod, // Notarization Method} ### Notarization Methods[​](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#notarization-methods "Direct link to Notarization Methods") #### Locked Notarization[​](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#locked-notarization "Direct link to Locked Notarization") A `Locked Notarization` is designed for creating a permanent, tamper-proof record that cannot be changed after its creation. * **Immutable**: The state and metadata cannot be changed after creation. * **Non-transferable**: It cannot be transferred to other addresses. * **Time-based Destruction**: If `delete_lock` is used, it can only be destroyed after its `delete_lock` expires. #### Dynamic Notarization[​](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#dynamic-notarization "Direct link to Dynamic Notarization") A `Dynamic Notarization` is designed for use cases where data evolves over time and high availability of the _latest version_ is critical. * **Mutable**: The state can be updated by the owner. * **Version Tracking**: Every state update increments a `state_version_count`. * **Transferable**: It can be transferred to a new owner, unless a `transfer_lock` is active. Core Data Structures[​](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#core-data-structures "Direct link to Core Data Structures") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- The `Notarization` object is composed of several smaller `structs` that organize its data and control its behavior. ### The `State` Struct[​](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#the-state-struct "Direct link to the-state-struct") This `struct` represents the core content of the notarization that can be updated in the `Dynamic` method. public struct State has store, drop, copy { data: D, // The data being notarized metadata: Option, // Mutable metadata that can be updated together with the state data} * `data`: Holds the `Stored Data` being notarized. `D` is a generic type, allowing storage of different data forms, such as `vector` or `String`. * `metadata`: An optional string that can be used to describe the current state, for example, to specify a document revision number. It can only be updated together with the `data`. ### Metadata Structs[​](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#metadata-structs "Direct link to Metadata Structs") Metadata is divided into immutable and updatable parts. * **`ImmutableMetadata`**: Contains fields that are set at creation and cannot be changed. This includes the creation timestamp (`created_at`), an optional `description`, and the `locking` configuration. * **`updatable_metadata`**: An optional, arbitrary string that can be updated at any time by the owner without affecting the `state_version_count`. * **`LockMetadata`**: Defines the specific timelock conditions for the notarization, including `update_lock`, `delete_lock`, and `transfer_lock`. Timelocks and Access Control[​](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#timelocks-and-access-control "Direct link to Timelocks and Access Control") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Access to critical functions like destroying or transferring a `Notarization` object is controlled by timelocks. The `TimeLock` `enum` provides public enum TimeLock has store { UnlockAt(u32), // A lock that unlocks at a specific Unix timestamp UntilDestroyed, // A lock that is unlocked when the notarization is destroyed None, // No lock applied} These locks are applied as follows: * **`delete_lock`**: Used only in `Locked Notarization`, it prevents the object from being destroyed until the specified `UnlockAt` timestamp is reached. This lock cannot be set to `UntilDestroyed`. * **`transfer_lock`**: Used only in `Dynamic Notarization`, it prevents the object from being transferred until the lock expires. * **`update_lock`**: This is permanently set to `UntilDestroyed` for all `Locked Notarization` objects, ensuring their immutability. Give Feedback * [The `Notarization` Object](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#the-notarization-object) * [Notarization Methods](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#notarization-methods) * [Core Data Structures](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#core-data-structures) * [The `State` Struct](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#the-state-struct) * [Metadata Structs](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#metadata-structs) * [Timelocks and Access Control](https://docs.iota.org/developer/iota-notarization/explanations/about-notarization#timelocks-and-access-control) --- # IoT Weather Station - Dynamic Notarization | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page This real-world example demonstrates how to use IOTA Notarization to create an IoT weather station system that continuously reports temperature, humidity, and pressure readings while maintaining data integrity and providing an immutable audit trail. Business Context[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#business-context "Direct link to Business Context") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- IoT weather stations need to provide verifiable, timestamped environmental data that can be trusted by: * Weather monitoring services requiring certified data feeds * Agricultural systems making irrigation decisions * Smart city infrastructure optimizing energy consumption * Insurance companies assessing weather-related claims * Research institutions collecting climate data * Emergency services monitoring environmental conditions Field Usage Strategy[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#field-usage-strategy "Direct link to Field Usage Strategy") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The system leverages different notarization fields for optimal data organization: * **`state.data`**: Current sensor readings (temperature, humidity, pressure) in JSON format * **`state.metadata`**: Measurement context (location, coordinates, timestamp) * **`immutable_description`**: Static device information (model, sensors, installation date) * **`updatable_metadata`**: Dynamic operational status (battery level, signal strength, maintenance info) This separation enables efficient updates while maintaining clear data categorization and integrity. Prerequisites[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#prerequisites "Direct link to Prerequisites") -------------------------------------------------------------------------------------------------------------------------------------------------------- * A funded IOTA account * Access to an IOTA network (testnet, devnet, or local) * Notarization client SDK installed * IoT device with environmental sensors (or simulated data) Implementation Overview[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#implementation-overview "Direct link to Implementation Overview") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### 1\. Initialize Weather Station Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#1-initialize-weather-station-notarization "Direct link to 1. Initialize Weather Station Notarization") Create the initial dynamic notarization with device information and first sensor reading: * Rust * Typescript (Node.js) examples/real-world/01\_iot\_weather\_station.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/real-world/01_iot_weather_station.rs#L35-L70) bindings/wasm/notarization\_wasm/examples/src/real-world/01\_iot\_weather\_station.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/real-world/01_iot_weather_station.ts#L44-L84) ### 2\. Update Sensor Readings[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#2-update-sensor-readings "Direct link to 2. Update Sensor Readings") Continuously update the weather station with new sensor measurements: * Rust * Typescript (Node.js) examples/real-world/01\_iot\_weather\_station.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/real-world/01_iot_weather_station.rs#L80-L112) bindings/wasm/notarization\_wasm/examples/src/real-world/01\_iot\_weather\_station.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/real-world/01_iot_weather_station.ts#L92-L123) ### 3\. Update Device Status[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#3-update-device-status "Direct link to 3. Update Device Status") Periodically update operational metadata like battery level and signal strength: * Rust * Typescript (Node.js) examples/real-world/01\_iot\_weather\_station.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/real-world/01_iot_weather_station.rs#L120-L140) bindings/wasm/notarization\_wasm/examples/src/real-world/01\_iot\_weather\_station.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/real-world/01_iot_weather_station.ts#L135-L148) Real-World Applications[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#real-world-applications "Direct link to Real-World Applications") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Agricultural Monitoring[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#agricultural-monitoring "Direct link to Agricultural Monitoring") * **Scenario**: Smart farming system monitoring field conditions * **Process**: Hourly weather updates informing automated irrigation decisions * **Benefits**: Water conservation, crop optimization, yield prediction ### Smart City Infrastructure[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#smart-city-infrastructure "Direct link to Smart City Infrastructure") * **Scenario**: Urban environmental monitoring network * **Process**: Real-time air quality and weather data collection * **Benefits**: Traffic optimization, energy management, pollution control ### Weather Service Integration[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#weather-service-integration "Direct link to Weather Service Integration") * **Scenario**: Professional weather forecasting service data feeds * **Process**: Certified meteorological station data with audit trails * **Benefits**: Regulatory compliance, data quality assurance, liability protection ### Insurance Claims Verification[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#insurance-claims-verification "Direct link to Insurance Claims Verification") * **Scenario**: Weather-related damage assessment * **Process**: Historical weather data verification for claim validation * **Benefits**: Fraud prevention, accurate assessments, automated processing ### Research Data Collection[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#research-data-collection "Direct link to Research Data Collection") * **Scenario**: Climate research institution data gathering * **Process**: Long-term environmental monitoring with data provenance * **Benefits**: Research integrity, reproducible results, data sharing ### Emergency Response[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#emergency-response "Direct link to Emergency Response") * **Scenario**: Severe weather monitoring and alerting * **Process**: Real-time condition monitoring with alert thresholds * **Benefits**: Public safety, early warnings, emergency preparedness Data Structure Design[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#data-structure-design "Direct link to Data Structure Design") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Sensor Readings (state.data)[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#sensor-readings-statedata "Direct link to Sensor Readings (state.data)") { "temperature_celsius": 18.3, "humidity_percent": 61.0, "pressure_hpa": 1010.5, "timestamp": 1703098800, "reading_id": "WS001-20231220-1400"} ### Measurement Context (state.metadata)[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#measurement-context-statemetadata "Direct link to Measurement Context (state.metadata)") Location: Hamburg, Germany | Coordinates: 53.5488°N, 9.9872°E | Recorded: 2024-12-20 14:00:00 UTC | Sensor Calibration: Valid ### Device Information (immutable\_description)[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#device-information-immutable_description "Direct link to Device Information (immutable_description)") Weather Station Model: WS-2024-HH01 | Sensors: DHT22 (Temp/Humidity), BMP280 (Pressure) | Installation: 2024-12-15 | Certification: ISO 17025 ### Operational Status (updatable\_metadata)[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#operational-status-updatable_metadata "Direct link to Operational Status (updatable_metadata)") Battery: 87% | Signal: Good | Last Calibration: 2024-12-20 | Status: Operational | Firmware: v2.1.3 Key Features[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#key-features "Direct link to Key Features") ----------------------------------------------------------------------------------------------------------------------------------------------------- ### Data Integrity & Verification[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#data-integrity--verification "Direct link to Data Integrity & Verification") * **Cryptographic Signatures**: Each update is cryptographically signed * **Tamper Detection**: Any modification attempts are immediately detectable * **Version Control**: Complete history of all sensor readings and device changes * **Audit Trail**: Immutable record of all data collection activities ### Efficient Data Management[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#efficient-data-management "Direct link to Efficient Data Management") * **Structured Updates**: Separate handling of sensor data vs. device status * **Optimized Storage**: JSON format for sensor readings, text for metadata * **Version Tracking**: Automatic increment of state version counters * **Timestamp Management**: Precise recording of measurement times ### Device Lifecycle Management[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#device-lifecycle-management "Direct link to Device Lifecycle Management") * **Installation Tracking**: Permanent record of device deployment * **Maintenance Logging**: Updates to calibration and maintenance activities * **Status Monitoring**: Battery level, connectivity, and health tracking * **Firmware Management**: Version tracking and update logging ### Integration Capabilities[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#integration-capabilities "Direct link to Integration Capabilities") * **API Access**: Standard interfaces for data retrieval * **Real-time Updates**: Immediate availability of latest measurements * **Historical Analysis**: Access to complete measurement history * **Export Functions**: Data format compatibility with analysis tools Benefits Achieved[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#benefits-achieved "Direct link to Benefits Achieved") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- * **Data Integrity**: Cryptographic proof prevents tampering and fraud * **Regulatory Compliance**: Audit trails meet meteorological standards * **Real-time Monitoring**: Immediate access to latest sensor readings * **Historical Analysis**: Complete measurement history for trend analysis * **Device Management**: Comprehensive tracking of device health and status * **Automated Validation**: Built-in data quality and consistency checks * **Scalable Architecture**: Support for multiple weather stations * **Cost Efficiency**: Reduced manual data collection and verification * **Integration Ready**: Standard APIs for third-party system integration * **Emergency Response**: Rapid access to critical weather information Full Example Code[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#full-example-code "Direct link to Full Example Code") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Rust * Typescript (Node.js) examples/real-world/01\_iot\_weather\_station.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/real-world/01_iot_weather_station.rs) bindings/wasm/notarization\_wasm/examples/src/real-world/01\_iot\_weather\_station.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/real-world/01_iot_weather_station.ts) Give Feedback * [Business Context](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#business-context) * [Field Usage Strategy](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#field-usage-strategy) * [Prerequisites](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#prerequisites) * [Implementation Overview](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#implementation-overview) * [1\. Initialize Weather Station Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#1-initialize-weather-station-notarization) * [2\. Update Sensor Readings](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#2-update-sensor-readings) * [3\. Update Device Status](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#3-update-device-status) * [Real-World Applications](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#real-world-applications) * [Agricultural Monitoring](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#agricultural-monitoring) * [Smart City Infrastructure](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#smart-city-infrastructure) * [Weather Service Integration](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#weather-service-integration) * [Insurance Claims Verification](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#insurance-claims-verification) * [Research Data Collection](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#research-data-collection) * [Emergency Response](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#emergency-response) * [Data Structure Design](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#data-structure-design) * [Sensor Readings (state.data)](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#sensor-readings-statedata) * [Measurement Context (state.metadata)](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#measurement-context-statemetadata) * [Device Information (immutable\_description)](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#device-information-immutable_description) * [Operational Status (updatable\_metadata)](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#operational-status-updatable_metadata) * [Key Features](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#key-features) * [Data Integrity & Verification](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#data-integrity--verification) * [Efficient Data Management](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#efficient-data-management) * [Device Lifecycle Management](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#device-lifecycle-management) * [Integration Capabilities](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#integration-capabilities) * [Benefits Achieved](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#benefits-achieved) * [Full Example Code](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/iot-weather-station#full-example-code) --- # api_ref | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/references/wasm/api_ref#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page **@iota/notarization API documentation** * * * @iota/notarization API documentation ==================================== Modules[​](https://docs.iota.org/developer/iota-notarization/references/wasm/api_ref#modules "Direct link to Modules") ----------------------------------------------------------------------------------------------------------------------- * [notarization\_wasm](https://docs.iota.org/developer/iota-notarization/references/wasm/notarization_wasm/api_ref) Give Feedback * [Modules](https://docs.iota.org/developer/iota-notarization/references/wasm/api_ref#modules) --- # Dynamic Notarization | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/explanations/dynamic-notarization#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page **Dynamic Notarization** is the method within the IOTA Notarization suite designed for data that evolves over time. Unlike Locked Notarization, which prioritizes permanent immutability, the Dynamic method emphasizes on-chain data availability and continuous updates. This ensures that verifiers can always access the most recent version of the data directly from the IOTA network. This model is ideal for applications where continuous, real-time access to current data is critical. The system relies on the Prover's intrinsic motivation to keep the latest state accurate, rather than on enforced immutability. * * * Core Characteristics[​](https://docs.iota.org/developer/iota-notarization/explanations/dynamic-notarization#core-characteristics "Direct link to Core Characteristics") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ While all Notarization objects share a common underlying structure, the `Dynamic` method configures it for maximum flexibility. Its key characteristics are: * **Mutable State & High Availability** The owner can update the object's `state` at any time. When an update occurs, the new state completely overwrites the previous one on-chain, ensuring that only the **Latest State** is visible. The `Latest State` is composed of the `Stored Data` and optional `State Metadata`, which can only be updated together in a single function call. This design choice guarantees high data availability for the most current information, as verifiers do not need to parse a history of changes to find the relevant record. This is the primary difference from [Locked Notarization](https://docs.iota.org/developer/iota-notarization/explanations/locked-notarization) , which is immutable. * **Version Tracking & Verification** Every time the state is updated, a `state_version_count` is automatically incremented. This, along with the `last_state_change_at` timestamp, forms the object's `Calculated Metadata`. This mechanism is crucial for verification and is unique to the Dynamic method. To prevent validating against stale data, a verifier must first confirm that the `State Version Count` they received from the Prover matches the current count on the network before comparing the data hashes. * **Transferable Ownership & Timelocks** Control over a Dynamic Notarization can be transferred to another party, allowing for changes in ownership or management responsibilities. This is in direct contrast to a [Locked Notarization](https://docs.iota.org/developer/iota-notarization/explanations/locked-notarization) , which is non-transferable. This capability can be optionally restricted by a **Transfer Timelock**, a time-locking period during which the Ledger Object cannot be transferred. This is useful for scenarios where control should be temporarily fixed, such as during an audit or a contractual waiting period. * **Flexible Metadata Structure** All Notarizations feature a three-tiered metadata system, which the Dynamic method utilizes for flexibility: * **Immutable Description**: An optional string set once at the time of creation to describe the object's purpose. It cannot be changed in any notarization method. * **State Metadata**: An optional string that is bundled with the `State` and can only be updated when the state itself is updated. It's useful for describing the specific version of the data (e.g., "Document Revision 2.1"). * **Updatable Metadata**: An optional, arbitrary string that can be modified independently of the core `state` at any time. Updating this field provides additional useful information (like a status note or a reference URL) without affecting the `state_version_count`. In a [Locked Notarization](https://docs.iota.org/developer/iota-notarization/explanations/locked-notarization) , this field is write-once. * **Refundable Storage Deposit** Like any object on the IOTA ledger, a Dynamic Notarization requires a storage deposit to be stored on-chain. This deposit is fully refundable to the owner when the object is eventually deleted. * * * The `DynamicNotarization` Object in Practice[​](https://docs.iota.org/developer/iota-notarization/explanations/dynamic-notarization#the-dynamicnotarization-object-in-practice "Direct link to the-dynamicnotarization-object-in-practice") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- A Dynamic Notarization is not a separate Move object but rather an instance of the core `Notarization` object where the `method` field is set to `NotarizationMethod::Dynamic`. This configuration enforces specific invariants within the `ImmutableMetadata` struct to ensure it behaves correctly: * The `update_lock` and `delete_lock` fields within its `LockMetadata` must be set to `TimeLock::None`. * The only lock that is permitted is the `transfer_lock`. If no `transfer_lock` is needed, the entire `locking` field within `ImmutableMetadata` is set to `None`. * * * Use Cases and Applications[​](https://docs.iota.org/developer/iota-notarization/explanations/dynamic-notarization#use-cases-and-applications "Direct link to Use Cases and Applications") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The properties of Dynamic Notarization make it particularly suitable for scenarios where the most current information is the single source of truth. * **Public Registries and Revocation Lists** For applications like managing an identity revocation list, only the most recent version of the list is relevant. Dynamic Notarization provides a stable `ObjectId` that always points to the current list, allowing applications to reliably check for revocations without needing to parse a history of changes. * **Evolving Metadata for Digital Product Passports (DPPs)** A physical asset or component may have metadata that changes over its lifecycle, such as its current status, custodian, or recent maintenance events. Dynamic Notarization allows the DPP to have a single, updatable on-chain record that always reflects the asset's latest information. For example, the `State` could be a JSON object `{"status": "in-transit", "custodian": "xyz-logistics"}` parsed as a `String`. When the item arrives at its destination, the owner updates the state to `{"status": "in-warehouse", "custodian": "abc-inc"}`. The `ObjectId` remains the same, always providing the current status to any interested party. * **Living Documents and Version Control** For documents that undergo multiple revisions, such as legal agreements, technical specifications, or policies, Dynamic Notarization can be used to always point to the latest approved version. Stakeholders can reference a single `ObjectId` to be certain they are viewing the current version of the document, with the `state_version_count` providing a clear indicator of how many official revisions have been logged on-chain. Give Feedback * [Core Characteristics](https://docs.iota.org/developer/iota-notarization/explanations/dynamic-notarization#core-characteristics) * [The `DynamicNotarization` Object in Practice](https://docs.iota.org/developer/iota-notarization/explanations/dynamic-notarization#the-dynamicnotarization-object-in-practice) * [Use Cases and Applications](https://docs.iota.org/developer/iota-notarization/explanations/dynamic-notarization#use-cases-and-applications) --- # Locked Notarization | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/explanations/locked-notarization#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page **Locked Notarization** is the method within the IOTA Notarization suite focused on creating a singular and tamper-proof on-chain record. It is the ideal solution for scenarios where absolute data integrity and long-term immutability are paramount. Once a Locked Notarization is created, its content is permanently sealed. This provides a powerful guarantee that the data existed in a specific state at a specific point in time and has not been altered since. It is designed to address critical needs for traceability, transparency, and accountability across industries like legal services, supply chain, and digital product ecosystems. * * * Core Characteristics[​](https://docs.iota.org/developer/iota-notarization/explanations/locked-notarization#core-characteristics "Direct link to Core Characteristics") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- A `Notarization` object configured with the `Locked` method is defined by its strict and uncompromising rules, prioritizing immutable records with clear guarantees of existence over the flexibility of [Dynamic Notarization](https://docs.iota.org/developer/iota-notarization/explanations/dynamic-notarization) . * **Immutable State and Metadata** The core principle of Locked Notarization is that its data is written to the ledger once and can never be changed. This applies to both the `state` and its associated metadata, providing a permanent, verifiable record until the notarization object is destroyed. This is the primary difference from [Dynamic Notarization](https://docs.iota.org/developer/iota-notarization/explanations/dynamic-notarization) , which allows for state updates. The standard three-tiered metadata structure is locked down as follows: * **Immutable Description**: An optional string set once at the time of creation. It is immutable by default in all notarization methods. * **State Metadata**: An optional string bundled with the `state`. Since the `state` is immutable, this metadata is also write-once. * **Updatable Metadata**: This field, designed for flexible updates in the Dynamic method, is also locked from creation. This comprehensive immutability is enforced on-chain by setting the `update_lock` to `TimeLock::UntilDestroyed`. * **Non-Transferable Ownership** Ownership of a Locked Notarization object is permanent, in direct contrast to the transferable nature of a [Dynamic Notarization](https://docs.iota.org/developer/iota-notarization/explanations/dynamic-notarization) . It cannot be transferred to another address, ensuring that the original creator (the Prover) remains the sole entity associated with its creation and eventual deletion. This is enforced by setting the `transfer_lock` to `TimeLock::UntilDestroyed`. * **Controlled and Timed Destruction** While the data is immutable, the object itself can eventually be deleted by its owner to recover the storage deposit. This action can optionally be controlled by a **Delete Timelock**. The creator can specify a `delete_lock` using `TimeLock::UnlockAt(timestamp)`, which defines the _earliest possible time_ the object can be deleted. This feature is critical for compliance and data retention policies, guaranteeing the record remains on-chain for a required period. * **Cost-Efficient Permanence** Like all on-chain objects, the notarized record is secured on the IOTA ledger via a storage deposit. This deposit makes on-chain storage viable for long-term use and is fully refundable to the owner when the object is destroyed. * * * The `LockedNotarization` Object in Practice[​](https://docs.iota.org/developer/iota-notarization/explanations/locked-notarization#the-lockednotarization-object-in-practice "Direct link to the-lockednotarization-object-in-practice") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- A Locked Notarization is an instance of the core `Notarization` object where the `method` field is set to `NotarizationMethod::Locked`. This configuration is validated by the smart contract, which enforces a strict set of invariants on the object's `LockMetadata`: * The `update_lock` must be `TimeLock::UntilDestroyed`. * The `transfer_lock` must be `TimeLock::UntilDestroyed`. * The `delete_lock` must be either `TimeLock::UnlockAt(timestamp)` or `TimeLock::None`. It is not permitted to be `TimeLock::UntilDestroyed`, as that would render the storage deposit permanently irrecoverable. * * * Use Cases and Applications[​](https://docs.iota.org/developer/iota-notarization/explanations/locked-notarization#use-cases-and-applications "Direct link to Use Cases and Applications") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The guarantees provided by Locked Notarization are essential for use cases where the integrity and authenticity of a record must be beyond reproach. * **Legal Evidence and Contract Notarization** Legal documents, contracts, or pieces of evidence can be notarized to create an immutable record with a verifiable timestamp. This can be used in legal proceedings to prove the exact state of a document at a specific time, preventing disputes over alterations. * **Intellectual Property and Creative Works** Creators can notarize their work (e.g., source code, manuscripts, designs) to establish a timestamped proof of authorship and existence. This serves as a powerful deterrent against copyright infringement and intellectual property theft. * **Auditing and Financial Snapshots** Companies can create immutable snapshots of financial records, compliance reports, or internal audits. These locked records can be presented to auditors or regulators to prove that the information has not been tampered with since the date of notarization. * **Issuance of Certificates and Credentials** Institutions can issue academic degrees, professional certifications, or birth certificates as Locked Notarizations. This provides recipients with a permanent, verifiable credential that is resistant to forgery and can be easily validated by third parties without relying on a centralized database. Give Feedback * [Core Characteristics](https://docs.iota.org/developer/iota-notarization/explanations/locked-notarization#core-characteristics) * [The `LockedNotarization` Object in Practice](https://docs.iota.org/developer/iota-notarization/explanations/locked-notarization#the-lockednotarization-object-in-practice) * [Use Cases and Applications](https://docs.iota.org/developer/iota-notarization/explanations/locked-notarization#use-cases-and-applications) --- # Legal Contract - Locked Notarization | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page This real-world example demonstrates how to use IOTA Locked Notarization to create immutable legal contracts that ensure document integrity, meet regulatory compliance requirements, and provide tamper-proof legal evidence. Business Context[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#business-context "Direct link to Business Context") ------------------------------------------------------------------------------------------------------------------------------------------------------------- Legal contracts require absolute integrity and immutability to ensure: * **Legal Enforceability**: Courts require proof that documents haven't been altered * **Regulatory Compliance**: Many jurisdictions mandate specific document retention periods * **Dispute Resolution**: Immutable contracts prevent tampering claims in litigation * **Audit Requirements**: Financial and legal audits need verifiable document trails * **Insurance Coverage**: Policies require authentic contract documentation * **International Trade**: Cross-border agreements need universally verifiable authenticity Field Usage Strategy[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#field-usage-strategy "Direct link to Field Usage Strategy") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Locked notarizations make ALL fields immutable after creation, providing comprehensive legal protection: * **`state.data`**: Document hash (SHA-256) ensuring content integrity verification * **`state.metadata`**: Structured contract details (parties, dates, terms, governing law) * **`immutable_description`**: Human-readable contract summary for legal identification * **`updatable_metadata`**: Administrative filing information (becomes immutable when locked) **Important**: Unlike dynamic notarizations, locked notarizations cannot be modified after creation, making them ideal for legal documents. Prerequisites[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#prerequisites "Direct link to Prerequisites") ---------------------------------------------------------------------------------------------------------------------------------------------------- * A funded IOTA account * Access to an IOTA network (testnet, devnet, or local) * Notarization client SDK installed * Legal document content (contract, agreement, etc.) * Understanding of applicable retention requirements Implementation Overview[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#implementation-overview "Direct link to Implementation Overview") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### 1\. Create Immutable Contract Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#1-create-immutable-contract-notarization "Direct link to 1. Create Immutable Contract Notarization") Generate document hash and create locked notarization with legal metadata: * Rust * Typescript (Node.js) examples/real-world/02\_legal\_contract.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/real-world/02_legal_contract.rs#L41-L125) bindings/wasm/notarization\_wasm/examples/src/real-world/02\_legal\_contract.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/real-world/02_legal_contract.ts#L51-L131) ### 2\. Configure Legal Retention Period[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#2-configure-legal-retention-period "Direct link to 2. Configure Legal Retention Period") Set deletion locks to comply with legal document retention requirements: * Rust * Typescript (Node.js) examples/real-world/02\_legal\_contract.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/real-world/02_legal_contract.rs#L90-L122) bindings/wasm/notarization\_wasm/examples/src/real-world/02\_legal\_contract.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/real-world/02_legal_contract.ts#L99-L129) ### 3\. Demonstrate Immutability Protection[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#3-demonstrate-immutability-protection "Direct link to 3. Demonstrate Immutability Protection") Verify that attempts to modify locked contracts are automatically rejected: * Rust * Typescript (Node.js) examples/real-world/02\_legal\_contract.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/real-world/02_legal_contract.rs#L135-L166) bindings/wasm/notarization\_wasm/examples/src/real-world/02\_legal\_contract.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/real-world/02_legal_contract.ts#L140-L170) ### 4\. Verify Document Integrity[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#4-verify-document-integrity "Direct link to 4. Verify Document Integrity") Demonstrate cryptographic verification of contract authenticity: * Rust * Typescript (Node.js) examples/real-world/02\_legal\_contract.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/real-world/02_legal_contract.rs#L169-L177) bindings/wasm/notarization\_wasm/examples/src/real-world/02\_legal\_contract.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/real-world/02_legal_contract.ts#L173-L183) ### 5\. Legal Discovery and Evidence[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#5-legal-discovery-and-evidence "Direct link to 5. Legal Discovery and Evidence") Access contract details for legal proceedings and compliance audits: * Rust * Typescript (Node.js) examples/real-world/02\_legal\_contract.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/real-world/02_legal_contract.rs#L180-L200) bindings/wasm/notarization\_wasm/examples/src/real-world/02\_legal\_contract.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/real-world/02_legal_contract.ts#L155-L175) Real-World Applications[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#real-world-applications "Direct link to Real-World Applications") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Employment Agreements[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#employment-agreements "Direct link to Employment Agreements") * **Scenario**: HR department recording employment contracts * **Process**: Hash contract PDF, notarize with employee/employer details * **Benefits**: Prevents contract disputes, meets labor law requirements ### Real Estate Transactions[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#real-estate-transactions "Direct link to Real Estate Transactions") * **Scenario**: Property purchase agreements and deed transfers * **Process**: Immutable record of transaction terms and conditions * **Benefits**: Title insurance compliance, fraud prevention, clear ownership ### Intellectual Property Licensing[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#intellectual-property-licensing "Direct link to Intellectual Property Licensing") * **Scenario**: Software licensing agreements and patent transfers * **Process**: Timestamped, immutable IP rights documentation * **Benefits**: Priority disputes resolution, licensing compliance, royalty audits ### International Trade Contracts[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#international-trade-contracts "Direct link to International Trade Contracts") * **Scenario**: Cross-border supply agreements and Letters of Credit * **Process**: Multi-jurisdictional contract verification with governing law * **Benefits**: Customs compliance, trade dispute resolution, payment security ### Insurance Policies[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#insurance-policies "Direct link to Insurance Policies") * **Scenario**: Policy documents and claims settlement agreements * **Process**: Immutable policy terms with coverage details * **Benefits**: Claims dispute prevention, regulatory compliance, audit trails ### Government Procurement[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#government-procurement "Direct link to Government Procurement") * **Scenario**: Public sector contracts and vendor agreements * **Process**: Transparent, tamper-proof government contracting * **Benefits**: Anti-corruption compliance, public accountability, audit readiness Contract Data Structure[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#contract-data-structure "Direct link to Contract Data Structure") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Document Hash (state.data)[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#document-hash-statedata "Direct link to Document Hash (state.data)") SHA-256: a7f8d9c2b1e4567890abcdef1234567890abcdef1234567890abcdef12345678 ### Contract Metadata (state.metadata)[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#contract-metadata-statemetadata "Direct link to Contract Metadata (state.metadata)") { "contract_type": "Employment Agreement", "effective_date": "2025-02-01", "expiration_date": "2027-01-31", "duration_years": 2, "employer": "ACME Corporation", "employee": "John Doe", "governing_law": "German Labor Law", "hash_algorithm": "SHA-256", "document_size_bytes": 2847, "created_timestamp": 1735689600} ### Contract Summary (immutable\_description)[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#contract-summary-immutable_description "Direct link to Contract Summary (immutable_description)") Employment Agreement between ACME Corporation (Employer) and John Doe (Employee) |Effective: Feb 1, 2025 - Jan 31, 2027 | Position: Senior Software Engineer ### Administrative Info (updatable\_metadata - immutable when locked)[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#administrative-info-updatable_metadata---immutable-when-locked "Direct link to Administrative Info (updatable_metadata - immutable when locked)") Filed: 2025-01-28 14:30:00 UTC | HR Reference: HR-2025-001-EA |Legal Review: Completed | Storage: Digital Vault A7 Key Legal Features[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#key-legal-features "Direct link to Key Legal Features") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Document Integrity Protection[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#document-integrity-protection "Direct link to Document Integrity Protection") * **Cryptographic Hashing**: SHA-256 ensures any document change is detectable * **Tamper Evidence**: Blockchain immutability prevents unauthorized modifications * **Version Control**: Locked contracts maintain single, authoritative version * **Chain of Custody**: Complete audit trail from creation to deletion ### Compliance & Retention Management[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#compliance--retention-management "Direct link to Compliance & Retention Management") * **Retention Periods**: Configurable deletion locks for legal requirements * **Regulatory Standards**: Meets various jurisdictional document retention laws * **Discovery Support**: Easy retrieval for legal proceedings and audits * **Privacy Controls**: Selective disclosure of contract terms when required ### Legal Enforceability[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#legal-enforceability "Direct link to Legal Enforceability") * **Court Admissibility**: Cryptographic proof acceptable in legal proceedings * **Authentication**: Digital signatures and timestamps provide legal validity * **Non-Repudiation**: Parties cannot deny contract existence or terms * **Jurisdictional Compliance**: Supports multi-jurisdiction legal requirements ### Business Process Integration[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#business-process-integration "Direct link to Business Process Integration") * **ERP Integration**: Connect with enterprise resource planning systems * **Legal Case Management**: Direct integration with law firm management tools * **Compliance Dashboards**: Real-time monitoring of retention and obligations * **Automated Workflows**: Trigger business processes based on contract events Benefits Achieved[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#benefits-achieved "Direct link to Benefits Achieved") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- * **Legal Enforceability**: Court-admissible evidence with cryptographic proof * **Regulatory Compliance**: Automated retention and discovery management * **Fraud Prevention**: Impossible to forge or backdated contracts * **Cost Reduction**: Eliminated manual verification and authentication processes * **Risk Mitigation**: Reduced litigation risk through tamper-proof documentation * **Audit Readiness**: Instant compliance verification for regulatory inspections * **International Recognition**: Cross-border enforceability with universal verification * **Process Automation**: Streamlined contract lifecycle management * **Dispute Prevention**: Clear, immutable terms prevent interpretation conflicts * **Professional Standards**: Meets legal industry best practices and ethics requirements Full Example Code[​](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#full-example-code "Direct link to Full Example Code") ---------------------------------------------------------------------------------------------------------------------------------------------------------------- * Rust * Typescript (Node.js) examples/real-world/02\_legal\_contract.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/real-world/02_legal_contract.rs) bindings/wasm/notarization\_wasm/examples/src/real-world/02\_legal\_contract.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/real-world/02_legal_contract.ts) Give Feedback * [Business Context](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#business-context) * [Field Usage Strategy](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#field-usage-strategy) * [Prerequisites](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#prerequisites) * [Implementation Overview](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#implementation-overview) * [1\. Create Immutable Contract Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#1-create-immutable-contract-notarization) * [2\. Configure Legal Retention Period](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#2-configure-legal-retention-period) * [3\. Demonstrate Immutability Protection](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#3-demonstrate-immutability-protection) * [4\. Verify Document Integrity](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#4-verify-document-integrity) * [5\. Legal Discovery and Evidence](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#5-legal-discovery-and-evidence) * [Real-World Applications](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#real-world-applications) * [Employment Agreements](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#employment-agreements) * [Real Estate Transactions](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#real-estate-transactions) * [Intellectual Property Licensing](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#intellectual-property-licensing) * [International Trade Contracts](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#international-trade-contracts) * [Insurance Policies](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#insurance-policies) * [Government Procurement](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#government-procurement) * [Contract Data Structure](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#contract-data-structure) * [Document Hash (state.data)](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#document-hash-statedata) * [Contract Metadata (state.metadata)](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#contract-metadata-statemetadata) * [Contract Summary (immutable\_description)](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#contract-summary-immutable_description) * [Administrative Info (updatable\_metadata - immutable when locked)](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#administrative-info-updatable_metadata---immutable-when-locked) * [Key Legal Features](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#key-legal-features) * [Document Integrity Protection](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#document-integrity-protection) * [Compliance & Retention Management](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#compliance--retention-management) * [Legal Enforceability](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#legal-enforceability) * [Business Process Integration](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#business-process-integration) * [Benefits Achieved](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#benefits-achieved) * [Full Example Code](https://docs.iota.org/developer/iota-notarization/how-tos/real-world/legal-contracts#full-example-code) --- # Comparison: Dynamic vs. Locked Notarization | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/explanations/notarization-comparison#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page The IOTA Notarization offers two distinct methods for creating on-chain records: **Dynamic** and **Locked**. While both leverage the power of the IOTA ledger to guarantee data integrity, they are designed for fundamentally different purposes. Choosing the right method is crucial for the success of your application. This guide provides a detailed comparison, analogies, and clear criteria to help you decide which method best suits your needs. * * * The Core Analogy: A Living Document vs. A Stone Tablet[​](https://docs.iota.org/developer/iota-notarization/explanations/notarization-comparison#the-core-analogy-a-living-document-vs-a-stone-tablet "Direct link to The Core Analogy: A Living Document vs. A Stone Tablet") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- To understand the difference intuitively, consider this analogy: * **Locked Notarization is a Stone Tablet.** You carve a message into it once. The message is permanent, unchangeable, and serves as a definitive record of a fact at a single point in time. It cannot be altered or passed to someone else to alter. Its purpose is to exist as an immutable artifact. * **Dynamic Notarization is a Living Document or a Public Registry.** It has a permanent, well-known location (its `ObjectId`), but the content inside can be updated. Think of a vehicle's registration status. The car (the object) remains the same, but its status can change from "registered" to "expired" to "sold". Observers only care about the _current_ status, not the history of every previous status. * * * Detailed Feature Comparison[​](https://docs.iota.org/developer/iota-notarization/explanations/notarization-comparison#detailed-feature-comparison "Direct link to Detailed Feature Comparison") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Feature | Locked Notarization | Dynamic Notarization | | --- | --- | --- | | **Core Principle** | **Immutability**. Creates a permanent, unchangeable record of a past state. | **Availability**. Provides a stable reference to the most current, up-to-date state. | | **State Changes** | **Not Allowed**. The `state` is written once and is permanently locked. | **Allowed**. The owner can update the `state`, overwriting the previous version. | | **Ownership** | **Permanent & Non-Transferable**. The original creator is the sole and final owner. | **Transferable**. Ownership can be passed to another address or entity. | | **Primary Goal** | To **prove** that specific data existed in a fixed state at a specific time. | To **provide** a reliable and always-current version of evolving data. | | **Version Tracking** | Not applicable, as there is only one version. | **Essential**. The `state_version_count` increments with each update. | | **Timelocks** | Optional, Recommended: `delete_lock` to ensure data remains on-chain for a required period. | Optional: `transfer_lock` to temporarily prevent change of ownership. | | **Lifecycle** | Create → Hold → Destroy | Create → Update → (Optional) Transfer → Destroy | * * * When to Use Which Method?[​](https://docs.iota.org/developer/iota-notarization/explanations/notarization-comparison#when-to-use-which-method "Direct link to When to Use Which Method?") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Your choice depends entirely on the nature of the data you are notarizing: is it a static fact or an evolving state? ### Use Locked Notarization if:[​](https://docs.iota.org/developer/iota-notarization/explanations/notarization-comparison#use-locked-notarization-if "Direct link to Use Locked Notarization if:") You need to create a permanent, historical record that must be proven to be unaltered. Your primary concern is finality and legal-admissibility. * **You need to prove authorship or existence.** * _Example_: Timestamping a patent application, a manuscript, or a piece of software to prove it existed before a certain date. * **The data represents a final, unchangeable event.** * _Example_: Issuing a birth certificate, a university diploma, or a legal verdict. These are facts that, once established, do not change. * **You are creating a legally binding snapshot.** * _Example_: Notarizing a signed contract, a financial statement at the end of a fiscal year, or an audit report. * **The record must remain on-chain for a specific compliance period.** * _Example_: A Digital Product Passport for a non-serviceable part, where the manufacturing data must be available for 10 years. ### Use Dynamic Notarization if:[​](https://docs.iota.org/developer/iota-notarization/explanations/notarization-comparison#use-dynamic-notarization-if "Direct link to Use Dynamic Notarization if:") You need to provide a single, reliable source of truth for data that changes over time. Your primary concern is ensuring everyone has access to the _latest_ information. * **The data tracks the status of an asset or process.** * _Example_: A Digital Product Passport for a car, where the `state` is updated to reflect maintenance, ownership changes, and repairs over its lifetime. * **You are managing a public list or registry.** * _Example_: An allowlist for a service, a list of authorized members in a consortium, or an identity revocation list. * **The data is a "living document" that undergoes official revisions.** * _Example_: The terms and conditions for a service, an internal company policy, or a set of technical standards that are periodically updated. The `ObjectId` always points to the current, authoritative version. * **Control or ownership of the data may need to change hands.** * _Example_: A project's master plan is notarized, and when the project lead changes, ownership of the notarization object is transferred to the new lead. Give Feedback * [The Core Analogy: A Living Document vs. A Stone Tablet](https://docs.iota.org/developer/iota-notarization/explanations/notarization-comparison#the-core-analogy-a-living-document-vs-a-stone-tablet) * [Detailed Feature Comparison](https://docs.iota.org/developer/iota-notarization/explanations/notarization-comparison#detailed-feature-comparison) * [When to Use Which Method?](https://docs.iota.org/developer/iota-notarization/explanations/notarization-comparison#when-to-use-which-method) * [Use Locked Notarization if:](https://docs.iota.org/developer/iota-notarization/explanations/notarization-comparison#use-locked-notarization-if) * [Use Dynamic Notarization if:](https://docs.iota.org/developer/iota-notarization/explanations/notarization-comparison#use-dynamic-notarization-if) --- # Access Read-Only Methods in Notarizations | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page Access Read-Only Methods[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#access-read-only-methods "Direct link to Access Read-Only Methods") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This guide demonstrates how to use all available read-only methods to inspect and query notarizations. These methods work for both dynamic and locked notarizations and provide comprehensive information about their state, metadata, and configuration. ### Prerequisites[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#prerequisites "Direct link to Prerequisites") * An existing notarization (dynamic or locked) on the IOTA network * Access to a notarization client (read-only access is sufficient) ### Available Read-Only Methods[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#available-read-only-methods "Direct link to Available Read-Only Methods") All notarizations support the same comprehensive read-only interface: * **Content inspection**: State, metadata, and description * **Timestamp queries**: Creation and modification times * **Lock status checking**: Transfer, update, and destruction permissions * **Version tracking**: State version counters * **Method identification**: Notarization type detection ### 1\. Set Up Read-Only Client[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#1-set-up-read-only-client "Direct link to 1. Set Up Read-Only Client") You can use either a full client or a read-only client for inspection: * Rust * Typescript (Node.js) examples/utils/utils.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/utils/utils.rs#L27) bindings/wasm/notarization\_wasm/examples/src/util.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/util.ts#L26) ### 2\. Create Test Notarizations[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#2-create-test-notarizations "Direct link to 2. Create Test Notarizations") Create both dynamic and locked notarizations for comprehensive testing: * Rust * Typescript (Node.js) examples/08\_access\_read\_only\_methods.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/08_access_read_only_methods.rs#L22-L33) bindings/wasm/notarization\_wasm/examples/src/08\_access\_read\_only\_methods.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/08_access_read_only_methods.ts#L20-L26) Content and Metadata Inspection[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#content-and-metadata-inspection "Direct link to Content and Metadata Inspection") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### 3\. Read Description and Metadata[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#3-read-description-and-metadata "Direct link to 3. Read Description and Metadata") Access the immutable description and updatable metadata: * Rust * Typescript (Node.js) examples/08\_access\_read\_only\_methods.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/08_access_read_only_methods.rs#L41-L52) bindings/wasm/notarization\_wasm/examples/src/08\_access\_read\_only\_methods.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/08_access_read_only_methods.ts#L34-L42) ### 4\. Read Current State[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#4-read-current-state "Direct link to 4. Read Current State") Access the current state content and its metadata: * Rust * Typescript (Node.js) examples/08\_access\_read\_only\_methods.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/08_access_read_only_methods.rs#L52-L57) bindings/wasm/notarization\_wasm/examples/src/08\_access\_read\_only\_methods.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/08_access_read_only_methods.ts#L45-L47) Timestamp Queries[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#timestamp-queries "Direct link to Timestamp Queries") -------------------------------------------------------------------------------------------------------------------------------------------------------------- ### 5\. Get Creation and Modification Times[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#5-get-creation-and-modification-times "Direct link to 5. Get Creation and Modification Times") Query when the notarization was created and last modified: * Rust * Typescript (Node.js) examples/08\_access\_read\_only\_methods.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/08_access_read_only_methods.rs#L58-L69) bindings/wasm/notarization\_wasm/examples/src/08\_access\_read\_only\_methods.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/08_access_read_only_methods.ts#L50-L59) Version and Type Information[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#version-and-type-information "Direct link to Version and Type Information") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### 6\. Get Version Count and Method Type[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#6-get-version-count-and-method-type "Direct link to 6. Get Version Count and Method Type") Check the state version counter and notarization method: * Rust * Typescript (Node.js) examples/08\_access\_read\_only\_methods.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/08_access_read_only_methods.rs#L70-L81) bindings/wasm/notarization\_wasm/examples/src/08\_access\_read\_only\_methods.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/08_access_read_only_methods.ts#L60-L70) Lock Status Checking[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#lock-status-checking "Direct link to Lock Status Checking") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### 7\. Check All Lock Statuses[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#7-check-all-lock-statuses "Direct link to 7. Check All Lock Statuses") Verify transfer, update, and destruction permissions: * Rust * Typescript (Node.js) examples/08\_access\_read\_only\_methods.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/08_access_read_only_methods.rs#L83-L95) bindings/wasm/notarization\_wasm/examples/src/08\_access\_read\_only\_methods.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/08_access_read_only_methods.ts#L73-L84) ### 8\. Get Lock Metadata[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#8-get-lock-metadata "Direct link to 8. Get Lock Metadata") Access detailed information about applied locks: * Rust * Typescript (Node.js) examples/08\_access\_read\_only\_methods.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/08_access_read_only_methods.rs#L168-L171) bindings/wasm/notarization\_wasm/examples/src/08\_access\_read\_only\_methods.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/08_access_read_only_methods.ts#L87-L90) Demonstrating Version Tracking[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#demonstrating-version-tracking "Direct link to Demonstrating Version Tracking") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### 9\. Update State and Show Version Changes[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#9-update-state-and-show-version-changes "Direct link to 9. Update State and Show Version Changes") For dynamic notarizations, demonstrate how version tracking works: * Rust * Typescript (Node.js) examples/08\_access\_read\_only\_methods.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/08_access_read_only_methods.rs#L103-L128) bindings/wasm/notarization\_wasm/examples/src/08\_access\_read\_only\_methods.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/08_access_read_only_methods.ts#L92-L124) Read-Only Methods Summary[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#read-only-methods-summary "Direct link to Read-Only Methods Summary") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Method | Returns | Description | | --- | --- | --- | | `description()` | `String` | Immutable description set at creation | | `updatable_metadata()` | `Option` | Current updatable metadata | | `state()` | `State` | Current state content and metadata | | `created_at_ts()` | `u64` | Creation timestamp | | `last_state_change_ts()` | `u64` | Last state modification timestamp | | `state_version_count()` | `u64` | Number of state updates | | `notarization_method()` | `NotarizationMethod` | Dynamic or Locked | | `is_transfer_locked()` | `bool` | Whether transfers are blocked | | `is_update_locked()` | `bool` | Whether updates are blocked | | `is_destroy_allowed()` | `bool` | Whether destruction is allowed | | `lock_metadata()` | `Option` | Detailed lock information | Use Cases for Read-Only Methods[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#use-cases-for-read-only-methods "Direct link to Use Cases for Read-Only Methods") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Auditing and Compliance[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#auditing-and-compliance "Direct link to Auditing and Compliance") * **Verify immutability**: Check that locked notarizations haven't changed * **Track modifications**: Monitor version counts and timestamps * **Compliance checking**: Verify lock status for regulatory requirements ### Integration and Automation[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#integration-and-automation "Direct link to Integration and Automation") * **Status monitoring**: Check lock status before operations * **Content verification**: Validate state and metadata * **Type detection**: Handle dynamic and locked notarizations differently ### User Interfaces[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#user-interfaces "Direct link to User Interfaces") * **Display information**: Show content, metadata, and status * **Permission checking**: Enable/disable UI actions based on locks * **History tracking**: Display version information and timestamps Full Example Code[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#full-example-code "Direct link to Full Example Code") -------------------------------------------------------------------------------------------------------------------------------------------------------------- * Rust * Typescript (Node.js) examples/08\_access\_read\_only\_methods.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/08_access_read_only_methods.rs) bindings/wasm/notarization\_wasm/examples/src/08\_access\_read\_only\_methods.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/08_access_read_only_methods.ts) Running Examples Locally[​](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#running-examples-locally "Direct link to Running Examples Locally") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In order to run the examples, you will need to run an IOTA network locally. If you want to use something different, you will need to modify the API and faucet endpoints in the examples to match your setup. Give Feedback * [Access Read-Only Methods](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#access-read-only-methods) * [Prerequisites](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#prerequisites) * [Available Read-Only Methods](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#available-read-only-methods) * [1\. Set Up Read-Only Client](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#1-set-up-read-only-client) * [2\. Create Test Notarizations](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#2-create-test-notarizations) * [Content and Metadata Inspection](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#content-and-metadata-inspection) * [3\. Read Description and Metadata](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#3-read-description-and-metadata) * [4\. Read Current State](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#4-read-current-state) * [Timestamp Queries](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#timestamp-queries) * [5\. Get Creation and Modification Times](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#5-get-creation-and-modification-times) * [Version and Type Information](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#version-and-type-information) * [6\. Get Version Count and Method Type](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#6-get-version-count-and-method-type) * [Lock Status Checking](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#lock-status-checking) * [7\. Check All Lock Statuses](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#7-check-all-lock-statuses) * [8\. Get Lock Metadata](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#8-get-lock-metadata) * [Demonstrating Version Tracking](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#demonstrating-version-tracking) * [9\. Update State and Show Version Changes](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#9-update-state-and-show-version-changes) * [Read-Only Methods Summary](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#read-only-methods-summary) * [Use Cases for Read-Only Methods](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#use-cases-for-read-only-methods) * [Auditing and Compliance](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#auditing-and-compliance) * [Integration and Automation](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#integration-and-automation) * [User Interfaces](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#user-interfaces) * [Full Example Code](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#full-example-code) * [Running Examples Locally](https://docs.iota.org/developer/iota-notarization/how-tos/access-read-only-methods#running-examples-locally) --- # Create a Locked Notarization | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page Create a Locked Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#create-a-locked-notarization "Direct link to Create a Locked Notarization") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This guide will walk you through the process of creating a Locked Notarization and publishing it to an IOTA network. Locked notarizations are immutable and non-transferable, making them ideal for permanent records and compliance scenarios. ### Key Characteristics of Locked Notarizations[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#key-characteristics-of-locked-notarizations "Direct link to Key Characteristics of Locked Notarizations") * **Immutable**: State and metadata cannot be changed after creation * **Non-transferable**: Cannot be transferred to other addresses * **Delete locks**: Support time-based destruction restrictions * **Permanent record**: Provides immutable document notarization until the **Delete Lock** expires In the current implementation, it isn't possible to create infinitely permanent records with Locked Notarizations. The delete lock must either be set to `None` (allowing immediate deletion) or to `UnlockAt(timestamp)` (restricting deletion until a specified time). This design ensures that storage deposits can be reclaimed in the future. To have a nearly infinitely permanent record choose a very distant future timestamp for the delete lock. ### 1\. Get Funds to cover the gas costs[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#1-get-funds-to-cover-the-gas-costs "Direct link to 1. Get Funds to cover the gas costs") To create a Locked Notarization, you will need to have an IOTA network node running. You will also need an address with enough funds to cover the gas cost of the whole procedure. In test networks as well as local ones, you can use a faucet to request funds. tip If you want to use the main IOTA network, you will need an address with actual IOTA funds to create a new Locked Notarization. * Rust * Typescript (Node.js) examples/utils/utils.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/utils/utils.rs#L27) bindings/wasm/notarization\_wasm/examples/src/util.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/util.ts#L26) ### 2\. Create a Locked Notarization with Delete Lock[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#2-create-a-locked-notarization-with-delete-lock "Direct link to 2. Create a Locked Notarization with Delete Lock") The `Notarization` uses builder pattern to create a new `Locked Notarization` object with delete lock controls. * Rust * Typescript (Node.js) examples/01\_create\_locked\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/01_create_locked_notarization.rs#L22-L37) bindings/wasm/notarization\_wasm/examples/src/01\_create\_locked.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/01_create_locked.ts#L22-L39) ### 3\. Publish the Locked Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#3-publish-the-locked-notarization "Direct link to 3. Publish the Locked Notarization") To publish the Locked Notarization, you will need to call the `build_and_execute` method. * Rust * Typescript (Node.js) examples/01\_create\_locked\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/01_create_locked_notarization.rs#L34-L37) bindings/wasm/notarization\_wasm/examples/src/01\_create\_locked.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/01_create_locked.ts#L35-L37) ### End Result[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#end-result "Direct link to End Result") The end result will be a `Locked Notarization` object that is published to the IOTA network with the following characteristics: * **Immutable content**: State and metadata cannot be modified * **Non-transferable**: Ownership cannot be changed * **Delete protection**: Controlled by the specified delete lock * **Permanent record**: Ideal for compliance and audit requirements Delete Lock Types[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#delete-lock-types "Direct link to Delete Lock Types") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Locked notarizations support different delete lock options: * **None**: Can be destroyed immediately after creation * **UnlockAt(timestamp)**: Cannot be destroyed until specified timestamp * **UntilDestroyed**: This option can **not** be used for delete locks Use Cases for Locked Notarizations[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#use-cases-for-locked-notarizations "Direct link to Use Cases for Locked Notarizations") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Legal and Compliance[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#legal-and-compliance "Direct link to Legal and Compliance") * **Regulatory compliance**: Documents that must remain unchanged * **Legal records**: Court documents, contracts, certifications * **Audit trails**: Immutable records for compliance purposes ### Long-term Archival[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#long-term-archival "Direct link to Long-term Archival") * **Historical records**: Documents of historical significance * **Academic research**: Research data that must remain unaltered * **Digital preservation**: Long-term storage of important documents ### Trust and Verification[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#trust-and-verification "Direct link to Trust and Verification") * **Certificates**: Educational or professional certifications * **Attestations**: Third-party verifications * **Timestamps**: Proof of existence at specific times Full Example Code[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#full-example-code "Direct link to Full Example Code") ----------------------------------------------------------------------------------------------------------------------------------------------------------------- * Rust * Typescript (Node.js) examples/01\_create\_locked\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/01_create_locked_notarization.rs) bindings/wasm/notarization\_wasm/examples/src/01\_create\_locked.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/01_create_locked.ts) Running Examples Locally[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#running-examples-locally "Direct link to Running Examples Locally") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In order to run the examples, you will need to run an IOTA network locally. If you want to use something different, you will need to modify the API and faucet endpoints in the examples to match your setup. Give Feedback * [Create a Locked Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#create-a-locked-notarization) * [Key Characteristics of Locked Notarizations](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#key-characteristics-of-locked-notarizations) * [1\. Get Funds to cover the gas costs](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#1-get-funds-to-cover-the-gas-costs) * [2\. Create a Locked Notarization with Delete Lock](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#2-create-a-locked-notarization-with-delete-lock) * [3\. Publish the Locked Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#3-publish-the-locked-notarization) * [End Result](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#end-result) * [Delete Lock Types](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#delete-lock-types) * [Use Cases for Locked Notarizations](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#use-cases-for-locked-notarizations) * [Legal and Compliance](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#legal-and-compliance) * [Long-term Archival](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#long-term-archival) * [Trust and Verification](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#trust-and-verification) * [Full Example Code](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#full-example-code) * [Running Examples Locally](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/create#running-examples-locally) --- # Create a Dynamic Notarization | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page Create a Dynamic Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#create-a-dynamic-notarization "Direct link to Create a Dynamic Notarization") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This guide will walk you through the process of creating a Dynamic Notarization and publishing it to an IOTA network. Dynamic notarizations are mutable, allowing you to update their state and metadata after creation, and they can be transferred between addresses. ### 1\. Get Funds to cover the gas costs[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#1-get-funds-to-cover-the-gas-costs "Direct link to 1. Get Funds to cover the gas costs") To create a Dynamic Notarization, you will need to have an IOTA network node running. You will also need an address with enough funds to cover the gas cost of the whole procedure. In test networks as well as local ones, you can use a faucet to request funds. tip If you want to use the main IOTA network, you will need an address with actual IOTA funds to create a new Dynamic Notarization. * Rust * Typescript (Node.js) examples/utils/utils.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/utils/utils.rs#L27) bindings/wasm/notarization\_wasm/examples/src/util.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/util.ts#L26) ### 2\. Create a Simple Dynamic Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#2-create-a-simple-dynamic-notarization "Direct link to 2. Create a Simple Dynamic Notarization") The simplest form of a Dynamic Notarization can be created without any locks, making it fully mutable and transferable. * Rust * Typescript (Node.js) examples/02\_create\_dynamic\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/02_create_dynamic_notarization.rs#L20-L32) const { output: notarization } = await notarizationClient .createDynamic() // Control the type of State data by choosing one of the `with...State` functions below. // Uncomment or comment the following lines to choose between string or byte State data. // // .withStringState("Live document content", "Version 1.0") // .withBytesState(utf8Encode.encode("Live document content"), "Version 1.0") .withBytesState(Uint8Array.from([14, 255, 0, 125, 64, 87, 11, 114, 108, 100]), "Version 1.0") .withImmutableDescription("This can not be changed any more") .withUpdatableMetadata("This can be updated") .finish() .buildAndExecute(notarizationClient); ### 3\. Create a Dynamic Notarization with Transfer Lock[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#3-create-a-dynamic-notarization-with-transfer-lock "Direct link to 3. Create a Dynamic Notarization with Transfer Lock") You can also create a Dynamic Notarization with a transfer lock to prevent transfers until a specified time. * Rust * Typescript (Node.js) examples/02\_create\_dynamic\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/02_create_dynamic_notarization.rs#L43-L53) bindings/wasm/notarization\_wasm/examples/src/02\_create\_dynamic.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/02_create_dynamic.ts#L21-L34) ### 4\. Publish the Dynamic Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#4-publish-the-dynamic-notarization "Direct link to 4. Publish the Dynamic Notarization") To publish the Dynamic Notarization, you will need to call the `build_and_execute` method. * Rust * Typescript (Node.js) examples/02\_create\_dynamic\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/02_create_dynamic_notarization.rs#L29-L32) bindings/wasm/notarization\_wasm/examples/src/02\_create\_dynamic.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/02_create_dynamic.ts#L33-L34) ### End Result[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#end-result "Direct link to End Result") The end result will be a `Dynamic Notarization` object that is published to the IOTA network. Unlike locked notarizations, dynamic notarizations can be: * **Updated**: State and metadata can be modified after creation * **Transferred**: Ownership can be transferred to other addresses (unless transfer-locked) * **Versioned**: Each state update increments the version counter Transfer Lock Types[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#transfer-lock-types "Direct link to Transfer Lock Types") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Dynamic notarizations support optional transfer locks: * **None**: No transfer restrictions (default) * **UnlockAt(timestamp)**: Locked until specified timestamp * **UntilDestroyed**: Locked until notarization is destroyed Full Example Code[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#full-example-code "Direct link to Full Example Code") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ * Rust * Typescript (Node.js) examples/02\_create\_dynamic\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/02_create_dynamic_notarization.rs) bindings/wasm/notarization\_wasm/examples/src/02\_create\_dynamic.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/02_create_dynamic.ts) Running Examples Locally[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#running-examples-locally "Direct link to Running Examples Locally") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In order to run the examples, you will need to run an IOTA network locally. If you want to use something different, you will need to modify the API and faucet endpoints in the examples to match your setup. Give Feedback * [Create a Dynamic Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#create-a-dynamic-notarization) * [1\. Get Funds to cover the gas costs](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#1-get-funds-to-cover-the-gas-costs) * [2\. Create a Simple Dynamic Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#2-create-a-simple-dynamic-notarization) * [3\. Create a Dynamic Notarization with Transfer Lock](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#3-create-a-dynamic-notarization-with-transfer-lock) * [4\. Publish the Dynamic Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#4-publish-the-dynamic-notarization) * [End Result](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#end-result) * [Transfer Lock Types](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#transfer-lock-types) * [Full Example Code](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#full-example-code) * [Running Examples Locally](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/create#running-examples-locally) --- # Update State in Dynamic Notarizations | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page Update State in Dynamic Notarizations[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#update-state-in-dynamic-notarizations "Direct link to Update State in Dynamic Notarizations") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This guide demonstrates how to update the state of a Dynamic Notarization. Unlike locked notarizations, dynamic notarizations allow you to modify their content and state metadata after creation. ### Prerequisites[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#prerequisites "Direct link to Prerequisites") * A Dynamic Notarization already created and published to the IOTA network * The notarization must not be update-locked * Sufficient funds for gas costs ### 1\. Get the Notarization Client[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#1-get-the-notarization-client "Direct link to 1. Get the Notarization Client") First, ensure you have a funded notarization client with the necessary permissions to update the notarization. * Rust * Typescript (Node.js) examples/utils/utils.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/utils/utils.rs#L27) bindings/wasm/notarization\_wasm/examples/src/util.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/util.ts#L26) ### 2\. Create a Dynamic Notarization for Testing[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#2-create-a-dynamic-notarization-for-testing "Direct link to 2. Create a Dynamic Notarization for Testing") If you don't have an existing dynamic notarization, create one first: * Rust * Typescript (Node.js) examples/05\_update\_state.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/05_update_state.rs#L17-L28) bindings/wasm/notarization\_wasm/examples/src/05\_update\_state.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/05_update_state.ts#L16-L24) ### 3\. Check Current State[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#3-check-current-state "Direct link to 3. Check Current State") Before updating, you can inspect the current state of the notarization: * Rust * Typescript (Node.js) examples/05\_update\_state.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/05_update_state.rs#L33-L36) bindings/wasm/notarization\_wasm/examples/src/05\_update\_state.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/05_update_state.ts#L26-L36) ### 4\. Update the State[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#4-update-the-state "Direct link to 4. Update the State") Update the state with new content and metadata: * Rust * Typescript (Node.js) examples/05\_update\_state.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/05_update_state.rs#L55-L59) bindings/wasm/notarization\_wasm/examples/src/05\_update\_state.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/05_update_state.ts#L49-L54) ### 5\. Verify the Update[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#5-verify-the-update "Direct link to 5. Verify the Update") After updating, verify that the changes were applied successfully: * Rust * Typescript (Node.js) examples/05\_update\_state.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/05_update_state.rs#L83) bindings/wasm/notarization\_wasm/examples/src/05\_update\_state.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/05_update_state.ts#L59) Key Features of State Updates[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#key-features-of-state-updates "Direct link to Key Features of State Updates") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ### Version Tracking[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#version-tracking "Direct link to Version Tracking") Each state update increments the version counter: * Initial state has version count 0 * First update increments to version 1 * Subsequent updates continue incrementing ### State Types[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#state-types "Direct link to State Types") Dynamic notarizations support both text and binary data: * **Text content**: Use `State::from_string()` for textual data * **Binary content**: Use `State::from_bytes()` for binary data * **Metadata**: Optional metadata can be included with either type ### Timestamps[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#timestamps "Direct link to Timestamps") State updates automatically update the "last state change" timestamp, which can be queried separately from the creation timestamp. Error Handling[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#error-handling "Direct link to Error Handling") --------------------------------------------------------------------------------------------------------------------------------------------------------------- State updates may fail if: * The notarization is update-locked (locked notarizations cannot be updated) * Insufficient gas funds * Invalid state data format * Network connectivity issues Full Example Code[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#full-example-code "Direct link to Full Example Code") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ * Rust * Typescript (Node.js) examples/05\_update\_state.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/05_update_state.rs) bindings/wasm/notarization\_wasm/examples/src/05\_update\_state.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/05_update_state.ts) Running Examples Locally[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#running-examples-locally "Direct link to Running Examples Locally") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In order to run the examples, you will need to run an IOTA network locally. If you want to use something different, you will need to modify the API and faucet endpoints in the examples to match your setup. Give Feedback * [Update State in Dynamic Notarizations](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#update-state-in-dynamic-notarizations) * [Prerequisites](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#prerequisites) * [1\. Get the Notarization Client](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#1-get-the-notarization-client) * [2\. Create a Dynamic Notarization for Testing](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#2-create-a-dynamic-notarization-for-testing) * [3\. Check Current State](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#3-check-current-state) * [4\. Update the State](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#4-update-the-state) * [5\. Verify the Update](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#5-verify-the-update) * [Key Features of State Updates](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#key-features-of-state-updates) * [Version Tracking](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#version-tracking) * [State Types](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#state-types) * [Timestamps](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#timestamps) * [Error Handling](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#error-handling) * [Full Example Code](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#full-example-code) * [Running Examples Locally](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-state#running-examples-locally) --- # Destroy Locked Notarization | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page Destroy Locked Notarizations[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#destroy-locked-notarizations "Direct link to Destroy Locked Notarizations") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This guide demonstrates how to destroy Locked Notarizations based on their delete lock configuration. Unlike dynamic notarizations, locked notarizations have special destruction rules based on their delete locks. ### Prerequisites[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#prerequisites "Direct link to Prerequisites") * A Locked Notarization owned by your address * Sufficient funds for gas costs * Understanding of the notarization's delete lock status ### Understanding Delete Lock Rules[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#understanding-delete-lock-rules "Direct link to Understanding Delete Lock Rules") Locked notarizations follow these destruction rules based on their delete locks: * **TimeLock::None**: Can be destroyed immediately * **TimeLock::UnlockAt(timestamp)**: Can only be destroyed after the specified timestamp * **TimeLock::UntilDestroyed**: This option can **not** be used for delete locks warning Once destroyed, a locked notarization cannot be recovered. This is permanent deletion. ### 1\. Get the Notarization Client[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#1-get-the-notarization-client "Direct link to 1. Get the Notarization Client") First, ensure you have a funded notarization client with ownership of the notarization. * Rust * Typescript (Node.js) examples/utils/utils.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/utils/utils.rs#L27) bindings/wasm/notarization\_wasm/examples/src/util.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/util.ts#L26) ### 2\. Create a Locked Notarization with No Delete Lock[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#2-create-a-locked-notarization-with-no-delete-lock "Direct link to 2. Create a Locked Notarization with No Delete Lock") First, let's create a locked notarization that can be destroyed immediately: * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs#L122-L134) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts#L100-L110) ### 3\. Check Destruction Permission[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#3-check-destruction-permission "Direct link to 3. Check Destruction Permission") Before attempting to destroy, check if destruction is allowed: * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs#L132-L139) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts#L112-L114) ### 4\. Destroy the Unlocked Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#4-destroy-the-unlocked-notarization "Direct link to 4. Destroy the Unlocked Notarization") Destroy the locked notarization with no delete lock (should succeed): * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs#L140-L152) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts#L117-L120) Time-Locked Notarization Scenario[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#time-locked-notarization-scenario "Direct link to Time-Locked Notarization Scenario") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Time-locked notarizations cannot be destroyed until their delete lock expires: ### 5\. Create a Time-Locked Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#5-create-a-time-locked-notarization "Direct link to 5. Create a Time-Locked Notarization") * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs#L89-L100) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts#L74-L84) ### 6\. Attempt to Destroy Time-Locked Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#6-attempt-to-destroy-time-locked-notarization "Direct link to 6. Attempt to Destroy Time-Locked Notarization") * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs#L109-L119) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts#L89-L97) Delete Lock Scenarios Summary[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#delete-lock-scenarios-summary "Direct link to Delete Lock Scenarios Summary") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Delete Lock | Can Destroy? | When? | Notes | | --- | --- | --- | --- | | `TimeLock::None` | ✅ Yes | Immediately | No restrictions | | `TimeLock::UnlockAt(future)` | ❌ No | After timestamp | Must wait for expiration | | `TimeLock::UnlockAt(past)` | ✅ Yes | Immediately | Lock has expired | | `TimeLock::UntilDestroyed` | \- | \- | Can **not** be used for delete locks | Comparison with Dynamic Notarizations[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#comparison-with-dynamic-notarizations "Direct link to Comparison with Dynamic Notarizations") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | Feature | Locked Notarization | Dynamic Notarization | | --- | --- | --- | | Destruction control | Delete locks | Transfer locks | | Default behavior | May have restrictions | Usually destroyable | | Lock purpose | Preserve immutable records | Control ownership transfers | | Typical use case | Compliance, legal records | Evolving documents | Error Handling[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#error-handling "Direct link to Error Handling") --------------------------------------------------------------------------------------------------------------------------------------------------------- Destruction attempts may fail due to: * **Active delete locks**: Time-locked notarizations before expiration * **Insufficient funds**: Not enough gas to complete the transaction * **Ownership**: Only the current owner can destroy the notarization * **Network issues**: Connectivity or node problems Best Practices[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#best-practices "Direct link to Best Practices") --------------------------------------------------------------------------------------------------------------------------------------------------------- 1. **Check delete lock status**: Always verify with `is_destroy_allowed()` before attempting 2. **Understand lock types**: Know the delete lock configuration before creation 3. **Plan for compliance**: Use appropriate delete locks for regulatory requirements 4. **Backup critical data**: Ensure important content is preserved elsewhere Full Example Code[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#full-example-code "Direct link to Full Example Code") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ The complete example demonstrates various destruction scenarios for locked notarizations: * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts) Running Examples Locally[​](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#running-examples-locally "Direct link to Running Examples Locally") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In order to run the examples, you will need to run an IOTA network locally. If you want to use something different, you will need to modify the API and faucet endpoints in the examples to match your setup. Give Feedback * [Destroy Locked Notarizations](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#destroy-locked-notarizations) * [Prerequisites](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#prerequisites) * [Understanding Delete Lock Rules](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#understanding-delete-lock-rules) * [1\. Get the Notarization Client](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#1-get-the-notarization-client) * [2\. Create a Locked Notarization with No Delete Lock](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#2-create-a-locked-notarization-with-no-delete-lock) * [3\. Check Destruction Permission](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#3-check-destruction-permission) * [4\. Destroy the Unlocked Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#4-destroy-the-unlocked-notarization) * [Time-Locked Notarization Scenario](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#time-locked-notarization-scenario) * [5\. Create a Time-Locked Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#5-create-a-time-locked-notarization) * [6\. Attempt to Destroy Time-Locked Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#6-attempt-to-destroy-time-locked-notarization) * [Delete Lock Scenarios Summary](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#delete-lock-scenarios-summary) * [Comparison with Dynamic Notarizations](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#comparison-with-dynamic-notarizations) * [Error Handling](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#error-handling) * [Best Practices](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#best-practices) * [Full Example Code](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#full-example-code) * [Running Examples Locally](https://docs.iota.org/developer/iota-notarization/how-tos/locked-notarizations/destroy#running-examples-locally) --- # Update Metadata in Dynamic Notarizations | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page Update Metadata in Dynamic Notarizations[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#update-metadata-in-dynamic-notarizations "Direct link to Update Metadata in Dynamic Notarizations") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ This guide demonstrates how to update the updatable metadata of a Dynamic Notarization. Metadata updates are independent of state updates and do not affect the version counter. ### Prerequisites[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#prerequisites "Direct link to Prerequisites") * A Dynamic Notarization already created and published to the IOTA network * The notarization must not be update-locked * Sufficient funds for gas costs ### Understanding Metadata Types[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#understanding-metadata-types "Direct link to Understanding Metadata Types") Dynamic notarizations have two types of metadata: * **Immutable Description**: Set at creation time and cannot be changed * **Updatable Metadata**: Can be modified after creation ### 1\. Get the Notarization Client[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#1-get-the-notarization-client "Direct link to 1. Get the Notarization Client") First, ensure you have a funded notarization client with the necessary permissions. * Rust * Typescript (Node.js) examples/utils/utils.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/utils/utils.rs#L27) bindings/wasm/notarization\_wasm/examples/src/util.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/util.ts#L26) ### 2\. Create a Dynamic Notarization with Metadata[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#2-create-a-dynamic-notarization-with-metadata "Direct link to 2. Create a Dynamic Notarization with Metadata") Create a dynamic notarization with initial updatable metadata: * Rust * Typescript (Node.js) examples/06\_update\_metadata.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/06_update_metadata.rs#L16-L28) bindings/wasm/notarization\_wasm/examples/src/06\_update\_metadata.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/06_update_metadata.ts#L16-L24) ### 3\. Check Current Metadata[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#3-check-current-metadata "Direct link to 3. Check Current Metadata") Before updating, inspect the current metadata state: * Rust * Typescript (Node.js) examples/06\_update\_metadata.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/06_update_metadata.rs#L34-L38) bindings/wasm/notarization\_wasm/examples/src/06\_update\_metadata.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/06_update_metadata.ts#L26-L32) ### 4\. Update Metadata[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#4-update-metadata "Direct link to 4. Update Metadata") Update the metadata with new content. You can set it to a new value or clear it entirely: * Rust * Typescript (Node.js) examples/06\_update\_metadata.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/06_update_metadata.rs#L64-L67) bindings/wasm/notarization\_wasm/examples/src/06\_update\_metadata.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/06_update_metadata.ts#L59-L61) ### 5\. Clear Metadata[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#5-clear-metadata "Direct link to 5. Clear Metadata") You can also clear the metadata by setting it to `None`: * Rust * Typescript (Node.js) examples/06\_update\_metadata.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/06_update_metadata.rs#L56) bindings/wasm/notarization\_wasm/examples/src/06\_update\_metadata.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/06_update_metadata.ts#L49) Key Features of Metadata Updates[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#key-features-of-metadata-updates "Direct link to Key Features of Metadata Updates") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ### Version Counter Independence[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#version-counter-independence "Direct link to Version Counter Independence") Unlike state updates, metadata updates do **not** affect the state version counter: * State version count remains unchanged after metadata updates * Only state content updates increment the version counter ### Timestamp Behavior[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#timestamp-behavior "Direct link to Timestamp Behavior") Metadata updates do **not** change the "last state change" timestamp: * Creation timestamp remains unchanged * Last state change timestamp is only updated by state content changes * Metadata changes have their own tracking mechanism ### Immutable vs Updatable[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#immutable-vs-updatable "Direct link to Immutable vs Updatable") * **Immutable Description**: Cannot be changed after creation * **Updatable Metadata**: Can be modified, cleared, or reset multiple times ### Metadata Operations[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#metadata-operations "Direct link to Metadata Operations") You can perform several operations on updatable metadata: * **Set new value**: Replace existing metadata with new content * **Clear metadata**: Set to `None` to remove metadata * **Multiple updates**: Update as many times as needed Error Handling[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#error-handling "Direct link to Error Handling") ------------------------------------------------------------------------------------------------------------------------------------------------------------------ Metadata updates may fail if: * The notarization is update-locked (locked notarizations cannot be updated) * Insufficient gas funds * Network connectivity issues note Metadata updates are allowed on dynamic notarizations even when they have transfer locks. Only update locks prevent metadata modifications. Full Example Code[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#full-example-code "Direct link to Full Example Code") --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Rust * Typescript (Node.js) examples/06\_update\_metadata.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/06_update_metadata.rs) bindings/wasm/notarization\_wasm/examples/src/06\_update\_metadata.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/06_update_metadata.ts) Running Examples Locally[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#running-examples-locally "Direct link to Running Examples Locally") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ In order to run the examples, you will need to run an IOTA network locally. If you want to use something different, you will need to modify the API and faucet endpoints in the examples to match your setup. Give Feedback * [Update Metadata in Dynamic Notarizations](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#update-metadata-in-dynamic-notarizations) * [Prerequisites](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#prerequisites) * [Understanding Metadata Types](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#understanding-metadata-types) * [1\. Get the Notarization Client](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#1-get-the-notarization-client) * [2\. Create a Dynamic Notarization with Metadata](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#2-create-a-dynamic-notarization-with-metadata) * [3\. Check Current Metadata](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#3-check-current-metadata) * [4\. Update Metadata](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#4-update-metadata) * [5\. Clear Metadata](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#5-clear-metadata) * [Key Features of Metadata Updates](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#key-features-of-metadata-updates) * [Version Counter Independence](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#version-counter-independence) * [Timestamp Behavior](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#timestamp-behavior) * [Immutable vs Updatable](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#immutable-vs-updatable) * [Metadata Operations](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#metadata-operations) * [Error Handling](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#error-handling) * [Full Example Code](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#full-example-code) * [Running Examples Locally](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/update-metadata#running-examples-locally) --- # Destroy Dynamic Notarization | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page Destroy Dynamic Notarizations[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#destroy-dynamic-notarizations "Direct link to Destroy Dynamic Notarizations") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This guide demonstrates how to destroy Dynamic Notarizations and explains the different scenarios based on lock status. Dynamic notarizations can be destroyed under certain conditions depending on their transfer locks. ### Prerequisites[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#prerequisites "Direct link to Prerequisites") * A Dynamic Notarization owned by your address * Sufficient funds for gas costs * Understanding of the notarization's lock status ### Understanding Destruction Rules[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#understanding-destruction-rules "Direct link to Understanding Destruction Rules") Dynamic notarizations follow these destruction rules: * **Unlocked**: Can be destroyed immediately * **Transfer-locked**: Cannot be destroyed while locked * **Time-locked**: Can be destroyed after lock expires warning Once destroyed, a notarization cannot be recovered. Ensure you really want to delete it permanently. ### 1\. Get the Notarization Client[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#1-get-the-notarization-client "Direct link to 1. Get the Notarization Client") First, ensure you have a funded notarization client with ownership of the notarization. * Rust * Typescript (Node.js) examples/utils/utils.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/utils/utils.rs#L27) bindings/wasm/notarization\_wasm/examples/src/util.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/util.ts#L26) ### 2\. Create an Unlocked Dynamic Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#2-create-an-unlocked-dynamic-notarization "Direct link to 2. Create an Unlocked Dynamic Notarization") First, let's create an unlocked dynamic notarization that can be destroyed immediately: * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs#L14-L25) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts#L18-L25) ### 3\. Check Destruction Permission[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#3-check-destruction-permission "Direct link to 3. Check Destruction Permission") Before attempting to destroy a notarization, check if it's allowed: * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs#L32-L37) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts#L30) ### 4\. Destroy the Unlocked Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#4-destroy-the-unlocked-notarization "Direct link to 4. Destroy the Unlocked Notarization") Destroy the unlocked notarization (should succeed): * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs#L38-L44) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts#L35-L38) Transfer-Locked Notarization Scenario[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#transfer-locked-notarization-scenario "Direct link to Transfer-Locked Notarization Scenario") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Transfer-locked notarizations cannot be destroyed while the lock is active: ### 5\. Create a Transfer-Locked Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#5-create-a-transfer-locked-notarization "Direct link to 5. Create a Transfer-Locked Notarization") * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs#L55-L66) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts#L50-L59) ### 6\. Attempt to Destroy Transfer-Locked Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#6-attempt-to-destroy-transfer-locked-notarization "Direct link to 6. Attempt to Destroy Transfer-Locked Notarization") * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs#L75-L79) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts#L64-L71) Destruction Scenarios Summary[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#destruction-scenarios-summary "Direct link to Destruction Scenarios Summary") ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Transfer Lock | Can Destroy? | Notes | | --- | --- | --- | | No lock | ✅ Yes | Immediate destruction allowed | | UnlockAt(future) | ❌ No | Must wait for lock to expire | | UnlockAt(past) | ✅ Yes | Can destroy after expiration | | UntilDestroyed | ✅ Yes | Can not be transferred until object is destroyed but destruction is allowed | Error Handling[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#error-handling "Direct link to Error Handling") ---------------------------------------------------------------------------------------------------------------------------------------------------------- Destruction operations may fail due to: * **Active transfer locks**: Transfer-locked notarizations cannot be destroyed * **Insufficient funds**: Not enough gas to complete the transaction * **Ownership**: Only the current owner can destroy the notarization * **Network issues**: Connectivity or node problems Best Practices[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#best-practices "Direct link to Best Practices") ---------------------------------------------------------------------------------------------------------------------------------------------------------- 1. **Check destruction status**: Always verify with `is_destroy_allowed()` before attempting 2. **Handle errors gracefully**: Implement proper error handling for failed destruction 3. **Consider lock expiration**: For time-locked notarizations, wait for expiration 4. **Backup important data**: Ensure you have copies of important notarized content 5. **Confirm Notarization is destroyed**: Check the network to confirm the notarization is destroyed Full Example Code[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#full-example-code "Direct link to Full Example Code") ------------------------------------------------------------------------------------------------------------------------------------------------------------------- The complete example demonstrates various destruction scenarios: * Rust * Typescript (Node.js) examples/04\_destroy\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/04_destroy_notarization.rs) bindings/wasm/notarization\_wasm/examples/src/04\_destroy\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/04_destroy_notarization.ts) Running Examples Locally[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#running-examples-locally "Direct link to Running Examples Locally") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In order to run the examples, you will need to run an IOTA network locally. If you want to use something different, you will need to modify the API and faucet endpoints in the examples to match your setup. Give Feedback * [Destroy Dynamic Notarizations](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#destroy-dynamic-notarizations) * [Prerequisites](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#prerequisites) * [Understanding Destruction Rules](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#understanding-destruction-rules) * [1\. Get the Notarization Client](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#1-get-the-notarization-client) * [2\. Create an Unlocked Dynamic Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#2-create-an-unlocked-dynamic-notarization) * [3\. Check Destruction Permission](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#3-check-destruction-permission) * [4\. Destroy the Unlocked Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#4-destroy-the-unlocked-notarization) * [Transfer-Locked Notarization Scenario](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#transfer-locked-notarization-scenario) * [5\. Create a Transfer-Locked Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#5-create-a-transfer-locked-notarization) * [6\. Attempt to Destroy Transfer-Locked Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#6-attempt-to-destroy-transfer-locked-notarization) * [Destruction Scenarios Summary](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#destruction-scenarios-summary) * [Error Handling](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#error-handling) * [Best Practices](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#best-practices) * [Full Example Code](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#full-example-code) * [Running Examples Locally](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/destroy#running-examples-locally) --- # Transfer Dynamic Notarization | IOTA Documentation [Skip to main content](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#__docusaurus_skipToContent_fallback) Discover [IOTA Notarization Alpha](https://docs.iota.org/developer/iota-notarization) a toolkit for creating and managing tamper-proof records. On this page Transfer Dynamic Notarizations[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#transfer-dynamic-notarizations "Direct link to Transfer Dynamic Notarizations") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This guide demonstrates how to transfer ownership of a Dynamic Notarization to another address. Dynamic notarizations can be transferred unless they have active transfer locks. ### Prerequisites[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#prerequisites "Direct link to Prerequisites") * A Dynamic Notarization owned by your address * The notarization must not be transfer-locked * Sufficient funds for gas costs * Target recipient address ### Understanding Transfer Locks[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#understanding-transfer-locks "Direct link to Understanding Transfer Locks") Dynamic notarizations can have transfer locks that prevent ownership changes: * **None**: No transfer restrictions (transferable) * **UnlockAt(timestamp)**: Locked until specified timestamp * **UntilDestroyed**: Locked until notarization is destroyed note Locked notarizations can **never** be transferred, regardless of any settings. ### 1\. Get the Notarization Client[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#1-get-the-notarization-client "Direct link to 1. Get the Notarization Client") First, ensure you have a funded notarization client with ownership of the notarization. * Rust * Typescript (Node.js) examples/utils/utils.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/utils/utils.rs#L27) bindings/wasm/notarization\_wasm/examples/src/util.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/util.ts#L26) ### 2\. Create Recipients[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#2-create-recipients "Direct link to 2. Create Recipients") Generate or specify the recipient addresses for the transfer: * Rust * Typescript (Node.js) examples/07\_transfer\_dynamic\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/07_transfer_dynamic_notarization.rs#L19) bindings/wasm/notarization\_wasm/examples/src/07\_transfer\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/07_transfer_notarization.ts#L16-L18) ### 3\. Create an Unlocked Dynamic Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#3-create-an-unlocked-dynamic-notarization "Direct link to 3. Create an Unlocked Dynamic Notarization") Create a dynamic notarization without transfer locks for successful transfer: * Rust * Typescript (Node.js) examples/07\_transfer\_dynamic\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/07_transfer_dynamic_notarization.rs#L28-L40) bindings/wasm/notarization\_wasm/examples/src/07\_transfer\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/07_transfer_notarization.ts#L26-L33) ### 4\. Check Transfer Lock Status[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#4-check-transfer-lock-status "Direct link to 4. Check Transfer Lock Status") Before attempting a transfer, check if the notarization is transfer-locked: * Rust * Typescript (Node.js) examples/07\_transfer\_dynamic\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/07_transfer_dynamic_notarization.rs#L42-L50) bindings/wasm/notarization\_wasm/examples/src/07\_transfer\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/07_transfer_notarization.ts#L36-L40) ### 5\. Transfer the Notarization[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#5-transfer-the-notarization "Direct link to 5. Transfer the Notarization") Transfer the unlocked notarization to the recipient: * Rust * Typescript (Node.js) examples/07\_transfer\_dynamic\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/07_transfer_dynamic_notarization.rs#L49-L58) bindings/wasm/notarization\_wasm/examples/src/07\_transfer\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/07_transfer_notarization.ts#L44-L47) Transfer Lock Scenarios[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#transfer-lock-scenarios "Direct link to Transfer Lock Scenarios") -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### Transfer-Locked Notarizations[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#transfer-locked-notarizations "Direct link to Transfer-Locked Notarizations") If you attempt to transfer a transfer-locked notarization, the operation will fail: * Rust * Typescript (Node.js) examples/07\_transfer\_dynamic\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/07_transfer_dynamic_notarization.rs#L67-L96) bindings/wasm/notarization\_wasm/examples/src/07\_transfer\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/07_transfer_notarization.ts#L54-L82) ### Locked Notarizations[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#locked-notarizations "Direct link to Locked Notarizations") Locked notarizations can never be transferred: * Rust * Typescript (Node.js) examples/07\_transfer\_dynamic\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/07_transfer_dynamic_notarization.rs#L99-L128) bindings/wasm/notarization\_wasm/examples/src/07\_transfer\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/07_transfer_notarization.ts#L87-L110) Transfer Rules Summary[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#transfer-rules-summary "Direct link to Transfer Rules Summary") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Notarization Type | Transfer Lock | Can Transfer? | Notes | | --- | --- | --- | --- | | Dynamic | None | ✅ Yes | Free to transfer | | Dynamic | UnlockAt(future) | ❌ No | Wait until unlock time | | Dynamic | UnlockAt(past) | ✅ Yes | Lock has expired | | Dynamic | UntilDestroyed | ❌ No | Cannot transfer until destroyed | | Locked | UntilDestroyed | ❌ No | Locked notarizations are non-transferable therefore Transfer Lock is always set to UntilDestroyed | Error Handling[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#error-handling "Direct link to Error Handling") ----------------------------------------------------------------------------------------------------------------------------------------------------------- Transfer operations may fail due to: * **Transfer locks**: Active transfer locks prevent ownership changes * **Insufficient funds**: Not enough gas to complete the transaction * **Invalid recipient**: Malformed or invalid recipient address * **Ownership**: Only the current owner can initiate transfers * **Network issues**: Connectivity or node problems Best Practices[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#best-practices "Direct link to Best Practices") ----------------------------------------------------------------------------------------------------------------------------------------------------------- 1. **Check lock status**: Always verify transfer lock status before attempting transfer 2. **Handle errors gracefully**: Implement proper error handling for failed transfers 3. **Verify recipient**: Ensure the recipient address is valid and intended 4. **Gas estimation**: Estimate gas costs before initiating transfers 5. **Time awareness**: Consider time-based locks and their expiration Full Example Code[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#full-example-code "Direct link to Full Example Code") -------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Rust * Typescript (Node.js) examples/07\_transfer\_dynamic\_notarization.rs loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/examples/07_transfer_dynamic_notarization.rs) bindings/wasm/notarization\_wasm/examples/src/07\_transfer\_notarization.ts loading... [See full example on GitHub](https://github.com/iotaledger/notarization/tree/v0.1/bindings/wasm/notarization_wasm/examples/src/07_transfer_notarization.ts) Running Examples Locally[​](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#running-examples-locally "Direct link to Running Examples Locally") ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- In order to run the examples, you will need to run an IOTA network locally. If you want to use something different, you will need to modify the API and faucet endpoints in the examples to match your setup. Give Feedback * [Transfer Dynamic Notarizations](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#transfer-dynamic-notarizations) * [Prerequisites](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#prerequisites) * [Understanding Transfer Locks](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#understanding-transfer-locks) * [1\. Get the Notarization Client](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#1-get-the-notarization-client) * [2\. Create Recipients](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#2-create-recipients) * [3\. Create an Unlocked Dynamic Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#3-create-an-unlocked-dynamic-notarization) * [4\. Check Transfer Lock Status](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#4-check-transfer-lock-status) * [5\. Transfer the Notarization](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#5-transfer-the-notarization) * [Transfer Lock Scenarios](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#transfer-lock-scenarios) * [Transfer-Locked Notarizations](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#transfer-locked-notarizations) * [Locked Notarizations](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#locked-notarizations) * [Transfer Rules Summary](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#transfer-rules-summary) * [Error Handling](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#error-handling) * [Best Practices](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#best-practices) * [Full Example Code](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#full-example-code) * [Running Examples Locally](https://docs.iota.org/developer/iota-notarization/how-tos/dynamic-notarizations/transfer#running-examples-locally) ---