w3c-ccg / universal-wallet-interop-spec

A data model and abstract interfaces for digital wallets
http://w3id.org/wallet
Other
56 stars 13 forks source link

Add Add and Remove interfaces to spec #69

Closed kimdhamilton closed 3 years ago

kimdhamilton commented 3 years ago

There will be a separate issue discussing interface/plugin grouping. Per discussion in #46, Add / Remove accepted types are expected to correspond to specific "flavors" (e.g., Currency wallet vs VC wallet).

Nonetheless, Query is defined in the spec interfaces, so I'm assuming Add and Remove belong there as well, even if that's realized by grouping into a Storage interface.

Some examples I expect we'll want to handle follow:

Remove is similar

sudeshrshetty commented 3 years ago

We can introduce add/remove interfaces to spec. And also, get (to get a wallet content directly by id).

We can standardize these interfaces to support any data models, for example to add credential

let type = 'credential' // data model type
let vc = ..... // credential data model
wallet.add(type, vc)
// note: we also need to pass collection id in above function call for grouping VCs

The only drawback I can think of now is that, few data models may have correlation with other data models. For example: A credential can belong to a specific collection. We may have to consider such scenarios while adding/removing the data models.

sudeshrshetty commented 3 years ago

@kimdhamilton we may also have to consider this

OR13 commented 3 years ago

I did this work, https://w3c-ccg.github.io/universal-wallet-interop-spec/#add I am going to close this for now.