pragma language_version 0.16;
import CompactStandardLibrary;
// Unsigned integers - bounded type
export ledger counter: Uint<0..1000>;
// Unsigned integers - sized type (32 bits)
export ledger balance: Uint<32>;
// Field element for ZK computations
export ledger commitment: Field;
// Fixed-length byte array
export ledger hash: Bytes<32>;
// Opaque type for private data
export ledger secretValue: Opaque<"string">;
export circuit updateCounter(newValue: Uint<0..1000>): [] {
disclose(counter = newValue);
}
export circuit updateBalance(amount: Uint<32>): [] {
disclose(balance = balance + amount);
}
export circuit storeCommitment(value: Field): [] {
disclose(commitment = value);
}
export circuit storeHash(data: Bytes<32>): [] {
disclose(hash = data);
}
export circuit updateSecret(secret: Opaque<"string">): [] {
disclose(secretValue = secret);
}