Smart Contracts
SealTrust uses Sui Move smart contracts for on-chain dataset registration and verification.
Deployed Contracts (Sui Testnet)
Packages
| Package | ID | Explorer |
|---|---|---|
| SealTrust Verification | 0xcdc25c90e328f2905c97c01e90424395dd7b10e67769fc8f4ae62b87f1e63e4e | View on SuiVision |
| Seal Allowlist | 0x705937d7b0ffc7c37aa23a445ed52ae521a47adcdffa27fe965e0b73464a9925 | View on SuiVision |
| Enclave (Mysten Labs) | 0x0ff344b5b6f07b79b56a4ce1e9b1ef5a96ba219f6e6f2c49f194dee29dfc8b7f | View on SuiVision |
On-Chain Objects
| Object | ID | Explorer |
|---|---|---|
| EnclaveConfig | 0x55d6a15a5e8822b39f76dc53031d83beddc1e5b0e3ef804b82e8d4bfe4fbdc32 | View on SuiVision |
| Enclave | 0x611b83f2b4d97471a6c164877ff23a2f0570806baf3d9380d1f11433a2b685ec | View on SuiVision |
Module Information
| Property | Value |
|---|---|
| Module | app::sealtrust |
| Witness | SEALTRUST |
| Network | Sui Testnet |
| Deployment Date | November 22, 2025 |
Core Structures
DatasetNFT
The primary on-chain record for a verified dataset.
public struct DatasetNFT has key, store {
id: UID,
name: vector<u8>,
description: vector<u8>,
format: vector<u8>,
size: u64,
original_hash: vector<u8>,
walrus_blob_id: vector<u8>,
seal_policy_id: vector<u8>,
verification_timestamp: u64,
owner: address,
enclave_signature: vector<u8>,
}| Field | Type | Description |
|---|---|---|
id | UID | Unique object identifier |
name | vector<u8> | Dataset display name |
description | vector<u8> | Dataset description |
format | vector<u8> | File format (CSV, JSON, etc.) |
size | u64 | File size in bytes |
original_hash | vector<u8> | SHA-256 hash (32 bytes) |
walrus_blob_id | vector<u8> | Encrypted blob location |
seal_policy_id | vector<u8> | Seal access policy |
verification_timestamp | u64 | Unix timestamp (ms) |
owner | address | Registrant’s address |
enclave_signature | vector<u8> | TEE attestation signature |
DatasetVerification
Internal structure for BCS serialization with Nautilus.
public struct DatasetVerification has copy, drop {
dataset_id: vector<u8>,
name: vector<u8>,
description: vector<u8>,
format: vector<u8>,
size: u64,
original_hash: vector<u8>,
walrus_blob_id: vector<u8>,
seal_policy_id: vector<u8>,
timestamp: u64,
uploader: vector<u8>,
}Entry Functions
register_dataset
Registers a new dataset with TEE-verified metadata.
public entry fun register_dataset(
enclave: &Enclave<SEALTRUST>,
name: vector<u8>,
description: vector<u8>,
format: vector<u8>,
size: u64,
original_hash: vector<u8>,
walrus_blob_id: vector<u8>,
seal_policy_id: vector<u8>,
timestamp: u64,
signature: vector<u8>,
clock: &Clock,
ctx: &mut TxContext,
)Parameters:
| Parameter | Description |
|---|---|
enclave | Reference to registered Nautilus enclave |
name | Dataset name (UTF-8 bytes) |
description | Dataset description (UTF-8 bytes) |
format | File format identifier |
size | File size in bytes |
original_hash | SHA-256 hash of unencrypted data |
walrus_blob_id | Walrus blob identifier |
seal_policy_id | Seal encryption policy |
timestamp | Verification timestamp |
signature | TEE signature from Nautilus |
clock | Sui Clock object |
ctx | Transaction context |
Effects:
- Verifies TEE signature matches enclave public key
- Creates new DatasetNFT object
- Transfers NFT to caller
- Emits
DatasetRegisteredevent
Events
DatasetRegistered
Emitted when a new dataset is registered.
public struct DatasetRegistered has copy, drop {
dataset_id: ID,
name: vector<u8>,
original_hash: vector<u8>,
owner: address,
timestamp: u64,
}View Functions
get_dataset_hash
Returns the original hash of a dataset.
public fun get_dataset_hash(nft: &DatasetNFT): vector<u8>get_dataset_owner
Returns the owner address of a dataset.
public fun get_dataset_owner(nft: &DatasetNFT): addressSource Code
Full source code available at: github.com/Seal-Trust/sealtrust-contracts
Last updated on