Rust: .nota Files
NotaFileClient in the Rust SDK creates, signs, parses, validates, and serializes .nota files. Everything on this page is off-chain and synchronous: no network, no async, just local cryptography over serde_json. Access the client as the nota field on the Notareum factory: ntm.nota.
Builder pattern
The builder is owned: each method consumes and returnsNotaBuilder, which makes signing and validation ordering explicit in the type system.
CreateNotaOptions::new(type_, chain_name, chain_id, identifier) builds an instance with only the required fields populated; the optional fields default to None. The struct field is named type_ (trailing underscore) because type is a reserved Rust keyword.
create(options)
Starts a new builder:
CreateNotaOptions fields mirror the TS/Python SDKs: type_, chain_name, chain_id, network, identifier, name, alias, description, resource_metadata, issuer_name, issuer_entity_type.
sign(private_key_hex)
Signs the builder payload with a private key hex string. Produces a 65-byte ECDSA (secp256k1) signature using EIP-191 personal-sign over a canonical message:
Signature and any further mutation will fail validation.
validate()
Validates schema, field consistency, and signature (if any):
parse(content) and serialize(¬a)
On the client (not the builder):
serialize produces canonical JSON. The same input always produces the same bytes, so hashes line up across SDKs and platforms.
End-to-end example
Errors
All fallible calls returnResult<T, SdkError>. SdkError variants cover parsing failures, schema issues, signature mismatch, and invalid resource type references. Build against the thiserror display impl or pattern-match to branch on specific cases; see Error Codes for a cross-SDK mapping.
Lower-level primitives
The off-chain building blocks (.nota builder/parser/validator, keccak256, EIP-191 signing, resource id derivation, quorum/tier math) live under [notareum::core] and are re-exported transitively by the high-level clients. Reach into notareum::core directly if you need to use the primitives without the contract layer.

