Similar to the current AccountReader, it might be useful to have a NoteReader that would hold a reference to the store and implement methods to retrieve notes.
This would be useful in the context of the faucet, where we need to be able to retrieve notes while another task is generating transactions. The NoteReader would allow the client to give reading access to the notes to a separate task.
Alternatively, we could share the client behind a Mutex, but since generating transactions requires to lock the client, the access to read notes would be obstructed. Another potential solution could be to add interior mutability to the client so that generating transactions does not need to lock the whole client.
Context: 0xMiden/faucet#220
Similar to the current
AccountReader, it might be useful to have aNoteReaderthat would hold a reference to the store and implement methods to retrieve notes.This would be useful in the context of the faucet, where we need to be able to retrieve notes while another task is generating transactions. The
NoteReaderwould allow the client to give reading access to the notes to a separate task.Alternatively, we could share the client behind a Mutex, but since generating transactions requires to lock the client, the access to read notes would be obstructed. Another potential solution could be to add interior mutability to the client so that generating transactions does not need to lock the whole client.
Context: 0xMiden/faucet#220