Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVP Implementation of On-Chain Wallet API #4483

Closed
samsiegart opened this issue Feb 7, 2022 · 4 comments
Closed

MVP Implementation of On-Chain Wallet API #4483

samsiegart opened this issue Feb 7, 2022 · 4 comments
Assignees
Labels
read-no-tx topic: reading from the chain without a transaction wallet wontfix This will not be worked on
Milestone

Comments

@samsiegart
Copy link
Contributor

samsiegart commented Feb 7, 2022

Implement the backend as an adapter to the collection of existing wallet backends.

Define the minimal API surface.

The wallet UI needs an API from the on-chain wallet, the current functionality of the UI requires the following schema:

  const firstSchema = harden({
    actions: Far('schemaActions', {
      createPurse: (issuer, id = newId('Purse')) =>
        E(walletBridge).makeEmptyPurse(issuer?.issuerPetname, id),
      createContact: (depositFacet, id = newId('Contact')) =>
        E(walletBridge).addContact(id, depositFacet),
      createIssuer: (issuer, id = newId('Issuer')) =>
        E(walletBridge).addIssuer(id, issuer, true),
    }),
    services: iterateNotifier(servicesNotifier),
    dapps: iterateNotifier(E(walletBridge).getDappsNotifier()),
    contacts: iterateNotifier(E(walletBridge).getContactsNotifier()),
    issuers: iterateNotifier(E(walletBridge).getIssuersNotifier()),
    offers: wrapOffersIterator(
      iterateNotifier(E(walletBridge).getOffersNotifier()),
    ),
    payments: iterateNotifier(E(walletBridge).getPaymentsNotifier()),
    purses: iterateNotifier(E(walletBridge).getPursesNotifier()),
  });

The wallet contract will contain all the users' wallets and expose one of these schemas to each user. The objects within the schema (e.g. services, dapps, etc.) need to be typed and documented properly.

@samsiegart samsiegart changed the title Expose API from on-chain wallet MVP Implementation of On-Chain Wallet API Feb 7, 2022
@Tartuffo Tartuffo removed the MN-1 label Feb 7, 2022
@Tartuffo Tartuffo added this to the Mainnet 1 milestone Mar 23, 2022
@dckc dckc added the read-no-tx topic: reading from the chain without a transaction label May 31, 2022
@turadg
Copy link
Member

turadg commented May 31, 2022

@michaelfig this is listed as part of #5356 but this morning we didn't include it in the release planning. Which is correct? cc @dckc

@dckc
Copy link
Member

dckc commented May 31, 2022

@dckc
Copy link
Member

dckc commented May 31, 2022

@michaelfig tells me yes, this blocks #5354

@dckc
Copy link
Member

dckc commented May 31, 2022

on further consideration, some work already done makes this not necessary.

@dckc dckc closed this as completed May 31, 2022
@dckc dckc added the wontfix This will not be worked on label May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
read-no-tx topic: reading from the chain without a transaction wallet wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants