diff --git a/README.md b/README.md index 57ac895..7c0950d 100644 --- a/README.md +++ b/README.md @@ -26,31 +26,13 @@ npm run build npm run lint ``` -## Tests -### Web-push -For your own web-push tests, change the 'vapid' URL in App.vue, and install apps on the same domain. -### Test key contents - -See [this page](openssl_signing_console.rst) +## Tests ### Register new user on test server -New users require registration. This can be done with a claim payload like this -by an existing user: - -``` - const vcClaim = { - "@context": "https://schema.org", - "@type": "RegisterAction", - agent: { identifier: identity0.did }, - object: SERVICE_ID, - participant: { identifier: newIdentity.did }, - }; -``` - On the test server, User #0 has rights to register others, so you can start playing one of two ways: @@ -66,14 +48,35 @@ playing one of two ways: ### Create multiple identifiers -Go to /start and create or import a new one. Then switch identifiers on the bottom of the Your Identity page. +Under the "Your Identity" screen, click "Advanced", click "Switch Identity / No Identity", then "Add Another Identity...". ### Create keys with alternate tools -See [this page](openssl_signing_console.rst) +[This page](openssl_signing_console.rst) is a tool to create a JWT from a locally-generated keypair. + +### Web-push + +For your own web-push tests, change the 'vapid' URL in App.vue, and install apps on the same domain. + +### Manual walk-through + +- Clear the browser cache for localhost for a new user. + - See that it's using the test API. + - On each page, verify the messaging. + - On the home page, see the feed without names, and see a message prompting to generate an ID. + - On the discovery page, check that they can see projects, and set a search area to see projects nearby. +- As User #0 in another browser on the test API, add a give & a project. (See User #0 details above.) + - With the new user on the home page, see the feed that shows User #0 in network but without the name. +- As the new user on the contacts page, add User #0 as a contact. + - On the home page, see the feed that shows User #0 with a name. +- Generate an ID. + - On the home page, check that it now prompts them to get registered. + - On the account page, check that they see messages on limits. +- Register the ID from User #0. + - As the new user on the home page, check that they can now record a gift. + - On the contacts page, check that they cannot register someone else yet. +- Walk through the functions on each page. -### Customize Vue configuration -See [Configuration Reference](https://cli.vuejs.org/config/). ## Scenarios @@ -90,8 +93,8 @@ See [Configuration Reference](https://cli.vuejs.org/config/). ### Clear data & restart -Clear cache for localhost, then go to http://localhost:8080/start -(because it'll generate a new one automatically if you start on the `/account` page). +Clear the browser cache for localhost. + @@ -102,110 +105,10 @@ Clear cache for localhost, then go to http://localhost:8080/start * Notifications can be type of `toast` (self-dismiss), `info`, `success`, `warning`, and `danger`. They are done via [notiwind](https://www.npmjs.com/package/notiwind) and set up in App.vue. -``` -// reference material from https://github.com/trentlarson/endorser-mobile/blob/8dc8e0353e0cc80ffa7ed89ded15c8b0da92726b/src/utility/idUtility.ts#L83 - -// Import an existing ID -export const importAndStoreIdentifier = async (mnemonic: string, mnemonicPassword: string, toLowercase: boolean, previousIdentifiers: Array) => { - - // just to get rid of variability that might cause an error - mnemonic = mnemonic.trim().toLowerCase() - - /** - // an approach I pieced together - // requires: yarn add elliptic - // ... plus: - // const EC = require('elliptic').ec - // const secp256k1 = new EC('secp256k1') - // - const keyHex: string = bip39.mnemonicToEntropy(mnemonic) - // returns a KeyPair from the elliptic.ec library - const keyPair = secp256k1.keyFromPrivate(keyHex, 'hex') - // this code is from did-provider-eth createIdentifier - const privateHex = keyPair.getPrivate('hex') - const publicHex = keyPair.getPublic('hex') - const address = didJwt.toEthereumAddress(publicHex) - **/ - - /** - // from https://github.com/uport-project/veramo/discussions/346#discussioncomment-302234 - // ... which almost works but the didJwt.toEthereumAddress is wrong - // requires: yarn add bip32 - // ... plus: import * as bip32 from 'bip32' - // - const seed: Buffer = await bip39.mnemonicToSeed(mnemonic) - const root = bip32.fromSeed(seed) - const node = root.derivePath(UPORT_ROOT_DERIVATION_PATH) - const privateHex = node.privateKey.toString("hex") - const publicHex = node.publicKey.toString("hex") - const address = didJwt.toEthereumAddress('0x' + publicHex) - **/ - - /** - // from https://github.com/uport-project/veramo/discussions/346#discussioncomment-302234 - // requires: yarn add @ethersproject/hdnode - // ... plus: import { HDNode } from '@ethersproject/hdnode' - **/ - const hdnode: HDNode = HDNode.fromMnemonic(mnemonic) - const rootNode: HDNode = hdnode.derivePath(UPORT_ROOT_DERIVATION_PATH) - const privateHex = rootNode.privateKey.substring(2) // original starts with '0x' - const publicHex = rootNode.publicKey.substring(2) // original starts with '0x' - let address = rootNode.address - - const prevIds = previousIdentifiers || []; - - if (toLowercase) { - const foundEqual = R.find( - (id) => utility.rawAddressOfDid(id.did) === address, - prevIds - ) - if (foundEqual) { - // They're trying to create a lowercase version of one that exists in normal case. - // (We really should notify the user.) - appStore.dispatch(appSlice.actions.addLog({log: true, msg: "Will create a normal-case version of the DID since a regular version exists."})) - } else { - address = address.toLowerCase() - } - } else { - // They're not trying to convert to lowercase. - const foundLower = R.find((id) => - utility.rawAddressOfDid(id.did) === address.toLowerCase(), - prevIds - ) - if (foundLower) { - // They're trying to create a normal case version of one that exists in lowercase. - // (We really should notify the user.) - appStore.dispatch(appSlice.actions.addLog({log: true, msg: "Will create a lowercase version of the DID since a lowercase version exists."})) - address = address.toLowerCase() - } - } - - appStore.dispatch(appSlice.actions.addLog({log: false, msg: "... derived keys and address..."})) - - const newId = newIdentifier(address, publicHex, privateHex, UPORT_ROOT_DERIVATION_PATH) - appStore.dispatch(appSlice.actions.addLog({log: false, msg: "... created new ID..."})) - - // awaiting because otherwise the UI may not see that a mnemonic was created - const savedId = await storeIdentifier(newId, mnemonic, mnemonicPassword) - appStore.dispatch(appSlice.actions.addLog({log: false, msg: "... stored new ID..."})) - return savedId -} - -// Create a totally new ID -export const createAndStoreIdentifier = async (mnemonicPassword) => { - - // This doesn't give us the entropy/seed. - //const id = await agent.didManagerCreate() - - const entropy = crypto.randomBytes(32) - const mnemonic = bip39.entropyToMnemonic(entropy) - appStore.dispatch(appSlice.actions.addLog({log: false, msg: "... generated mnemonic..."})) - - return importAndStoreIdentifier(mnemonic, mnemonicPassword, false, []) -} -``` +* [Customize Vue configuration](https://cli.vuejs.org/config/). + -## Kudos +### Kudos Gifts make the world go 'round! diff --git a/project.task.yaml b/project.task.yaml index 271c5e9..6312fb5 100644 --- a/project.task.yaml +++ b/project.task.yaml @@ -5,41 +5,32 @@ tasks: - 40 notifications : - push, where we trigger a ServiceWorker(?) in the app to reach out and check for new data assignee:matthew -- 01 Ensure each action sent to the server has a confirmation - eg registration (ie a toast something that dismisses after 5-10s) - -- Home Feed & Quick Give screen : - - 01 save the feed-viewed status in settings storage ("afterQuery") - - 01 quick action - send action, maybe choose via canvas tool - - SEE: https://github.com/konvajs/vue-konva - -- 24 Move to Vite assignee:matthew +- .5 add project ID to the URL of the project-view, to make a project publicly-accessible +- .5 add link to further project / people when a project pays ahead +- .5 show checkbox on "gave" modal to say that user is recipient (so it could be uncheked for someone unspecified) +- .5 allow to manage their notifications even without an identity +- .5 bug - on the discover page, enter a search term and search and see a duplicate project show at the end of the list +- 01 Ensure each action sent to the server has a confirmation - eg registration (ie a toast something that dismisses after 5-10s) - .3 fix the Project-location-selection map display to not show on top of bottom icons (and any other UI tweaks on the map flow) assignee-group:ui -- .5 switch so DiscoverView shows anywhere by default, and no number unless search is done (and maybe a better filter UI, including "mine" to consolidate with ProjectsView) + - .5 Add infinite scroll to gifts on the home page - .5 bug - search for "Safari" does not find the project, but if already on the "Anywhere" tab it shows all - .2 figure out why endorser-mobile search doesn't find recently created PlanAction - .1 when creating a plan, select location and then make sure you can deselect on Android -- .5 add link to further project / people when a project pays ahead -- .5 add project ID to the URL of the project-view, to make a project publicly-accessible - .5 fix where user 0 sees no txns from user 1 on contacts page but sees them on list page -- .2 on ProjectViewView, show different messages for "to" and "from" sections if none exist -- .2 fix rate limit verbiage (with the new one-per-day allowance) assignee:trent -- .1 remove the logic to exclude beforeId in list of plans after server has commit 26b25af605e715600d4f12b6416ed9fd7142d164 +- .1 remove the logic to exclude beforeId in list of plans after server has commit 26b25af605e715600d4f12b6416ed9fd7142d164 assignee:trent - .2 in SeedBackupView, don't load the mnemonic and keep it in memory; only load it when they click "show" -- .1 Make give description text box into something that expands as they type -- .1 Make contact info specific to Time Safari - rather pointing at CommunityCred.org - Discuss whether the remaining tasks are worthwhile before MVP release. +- .1 Make give description text box into something that expands as they type? - 04 allow user to download claims, mine + ones I can see about me from others -- 02 allow user to create new DIDs from the same seed phrase (ie. increment derivation path) -- .5 on ProjectView page, show immediate feedback when a gift is given (on list?) -- and consider the same for Home & Contacts pages - .5 customize favicon assignee-group:ui - .2 Show a warning if both giver and recipient are the same (but still allow?) - 01 Would it look better to shrink the buttons on many pages so they don't expand to the width of the screen? assignee-group:ui - .5 Display a more appealing confirmation on the map when erasing the marker -- .5 make a VC details page +- .5 make a VC details page, or link to endorser.ch - .1 Add units or different icon to the coins (to distinguish $, BTC, hours, etc) - .5 include the hash of the latest commit on help page next to version - .5 remove references to localStorage for projectId (now that it's pulling from the path) @@ -51,7 +42,7 @@ tasks: - stats v1 : - 01 show numeric stats - - 04 show different graphic for projects vs people on world + - 04 show different graphic for projects vs people (gnome?) on world - 01 link to world for specific stats - .5 don't load another instance of a bush if it already exists - maybe - allow type annotations in World.js & landmarks.js (since we get this error - "Types are not supported by current JavaScript version") @@ -69,7 +60,9 @@ tasks: blocks: ref:https://raw.githubusercontent.com/trentlarson/lives-of-gifts/master/project.yaml#kickstarter%20for%20time - .5 show seed phrase in a QR code for transfer to another device +- .5 on DiscoverView, switch to a filter UI (eg. just from friend +- 24 Move to Vite - 32 accept images for projects - 32 accept images for contacts @@ -99,11 +92,10 @@ tasks: - Multiple identities -- Peer DID - -- DIDComm - -- Write to or read from a different ledger (eg. private ACDC, attest.sh) +- Support KERI AIDs +- Support Peer DIDs +- Support messaging through DIDComm +- Write to or read from a different ledger (eg. private ACDC, EAS & attest.sh) - Do we want split first name & last name? @@ -111,6 +103,7 @@ tasks: - pull, w/ scheduled runs - 01 On nearby search, if user starts changing their box but cancels and goes back to the map it is zoomed far out. Fix to fit the box better. +- 16 From the home screen, make the quick action even easier. log: - videos for multiple identities https://youtu.be/p8L87AeD76w and for adding time to contacts https://youtu.be/7Yylczevp10 done:2023-03-29 diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index a04dae8..7f1fa52 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -186,8 +186,9 @@

You have done {{ limits.doneRegistrationsThisMonth }} registrations - out of {{ limits.maxRegistrationsPerMonth }} for this month. Your - registrations counter resets at + out of {{ limits.maxRegistrationsPerMonth }} for this month. (You can + register nobody on your first day, and after that only one a day in + your first month.) Your registration counter resets at {{ readableTime(limits.nextMonthBeginDateTime) }}

diff --git a/src/views/ContactQRScanShowView.vue b/src/views/ContactQRScanShowView.vue index 21a924e..f7a2999 100644 --- a/src/views/ContactQRScanShowView.vue +++ b/src/views/ContactQRScanShowView.vue @@ -2,10 +2,23 @@
- -

- Your Contact Info -

+ +
+ +
+

+ +

+
+ + +

+ Your Contact Info +

+
- +
  • acc.did); - this.searchLocal(); + if (this.searchBox) { + await this.searchLocal(); + } else { + this.isLocalActive = false; + this.isRemoteActive = true; + await this.searchAll(); + } } public async buildHeaders(): Promise { diff --git a/src/views/HelpView.vue b/src/views/HelpView.vue index 26fb9d7..cb11292 100644 --- a/src/views/HelpView.vue +++ b/src/views/HelpView.vue @@ -1,11 +1,25 @@