Skip to content

StateSet primitive #455

@rpanic

Description

@rpanic

Build a new State primitive for Runtimes (and protocol hooks) that behaves like a Set.

A example for usage of this would be storing the "set of UTXOs" or "set of nullifiers".
Generalized, it's useful where the existence of a specific entity is unique and that's the only "fact" we are interested in.

@state() myStateSet = new StateSet(Field)
stateSet.add(value) => void
stateSet.contains(value) => Bool
stateSet.remove(value) => Bool

Behind the scenes, it will just be a StateMap<Field, Value> where the key is the hash of the value

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions