Closed jeluard closed 5 years ago
Tentative syntax:
Given an event
that generates a response through another event:
[ethereum/send-transaction {:from ...
:to ...
:on-result [store/put {:key :some-key}]}]
This response is stored in an isolated location of the app-db
specific to this extension (based on the unique extension id -per host-).
This data can then be accessed via a matching query:
views/some-view
(let [{content :content} [store/get {:key :some-key}]]
[text {}
content])
Are you thinking that store/put
syntax will work for key paths? [store/put {:key [:some-key :other-key] }]
No necessarily suggesting this syntax just wondering about common cases.
As a first step I was considering using dumb key/value. Probably is sufficient for most of use cases and for more advanced scenarios we could investigate something like datomic pull API.
If we introduce seq keys then the get
becomes trickier: how do we handle partial seq of keys? e.g. [store/get {:key [:some-key :other-key]}]
Each extension can easily store and retrieve isolated data. Datomic pull API will be considered. https://anmonteiro.com/2016/01/om-next-query-syntax/