Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Commit

Permalink
Release/v1.1.0 (#255)
Browse files Browse the repository at this point in the history
* feat: add support for simple self-signed app profiles hosted on IPFS

* feat: add support for issc field in requests and on connect obj

* test: add coverage for issc/profiles

* feat: self-sign and upload profile claim to ipfs on construction

* fix: small typo in requestVerificationSignature, formatting changes

* fix: update credentials methods in tests, update credentials dep

also fix vc being passed in unsignedClaim rather than as an additional option.

* feat: move ipfs upload out of constructor

* test: create tests for ipfs upload, fix old tests to avoid upload

* fix: update profile property names to match spec

* chore: update package-lock and remove yarn.lock

* chore: update circle.yml to use npm

* feat: add profileImage, bannerImage and restructure profile claim

* test: fix uport-credentials dep to #develop to fix tests

* chore: update dependency on uport-credentials

* feat: use universal links on first request, deep links after (#214)

* chore: update .babelrc to use preset-env and transform-runtime

* 1.1.0-alpha-3

* feat: use universal links on first request, deep links after

* test: add tests for mobileTransport and URI schemes

* chore: bump version in uport-transports

* feat: add support for eip 712 sig request in Connect and Subprovider (#212)

* feat: add support for signTypedData request in subprovider and connect

* test: fix dependencies and add tests for eth_signTypedData

* chore: bump dependency on uport-transports

* test: add test for wrapped subprovider call in connect

* fix: destructure profile claim (#219)

* Fix profile claim

* Fix profile test

* Fix `sub` of profile jwt (#220)

* fix: use this.keypair.did for profile subject

* 1.1.0-alpha.5

* Revise Headings/ Move tutorial.md (#222)

* Revise Headings

I've made some adjustments to the headings to improve navigation through this document. I also made a few minor changes here and there.

* Create readme

This document was originally under guides as a tutorial, but it fits better here.

* Delete Tutorial.md

This file has been renamed to readme.md and moved to the example-tutorials folder.

* Update readme.md

A few minor changes:
* Heading capitalization
* Fixing a broken link
* Removing unnecessary content

* fix: remove dead link in README (#226)

point to developer site instead.  resolves #188
also change `requestDisclosure({})` to `requestDisclosure()`

* Feat/update eip712 (#227)

* chore: bump uport-transports to 0.1.0

* feat: replace aud with did, callbackUrl with callback

* Feat/update transports (#229)

* chore: bump transports

* 1.1.0-alpha.8

* chore: bump transports to 0.2.0-alpha.4, fix chasqui parsing

* 1.1.0-alpha.9

* Adding protocol to profile url (#234)

Looks good

* feat: add support for personal sign in Connect and Subprovider (#230)

* bump to 1.1.0-alpha.13 and update credentials/transports (#235)

* Remove usage guide from ToC

* Update issue templates (#248)

* Int/shim pubsub (#254)

* Shim the loading of pubsub-js, to not use define as a function (#252)

Looks good, thanks for the contribution! Moving to an integration branch on this repo, and will go to develop from there

* chore: use carrot dependencies

* chore: bump credentials and transports to rc.0

* 1.1.0-rc.0

* do not convert message data type (#253)

ignoring warning for coverage reduction by 0.09%

* 1.1.0-rc.1

* feat: encode signatures as single hex string in subprovider

* 1.1.0-rc.2

* fix: prefix signature with 0x

* fix: prefix signature with 0x

* fix: use from: address instead of riss: did in web3 sig reqs

* chore: bump lib dependencies

* 1.1.0-rc.4

* feat: add net param to web3 sig reqs

* 1.1.0-rc.5

* doc: update release notes

* 1.1.0
  • Loading branch information
rmw2 committed Dec 18, 2018
1 parent cbefeef commit c1d7c42
Show file tree
Hide file tree
Showing 17 changed files with 1,170 additions and 10,212 deletions.
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"plugins": ["transform-es2015-modules-umd"]
},
},
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
"syntax-object-rest-spread",
"transform-runtime",
"transform-object-rest-spread",
"istanbul"
]
Expand Down
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const uport = new Connect('MyDAppName')
To request the DID and address of user use `requestDisclosure()`:

```javascript
uport.requestDisclosure({})
uport.requestDisclosure()

uport.onResponse('disclosureReq').then(res => {
const did = res.payload.did
Expand Down Expand Up @@ -185,9 +185,9 @@ const Connect = window.uportconnect
const uport = new Connect('MyDApp')
```

### <a name="tutorials"></a> Tutorial and Examples
### <a name="tutorials"></a> Tutorials and Developer Site

For a more in depth quick start example follow our [tutorial for building a simple dapp](https://github.com/uport-project/uport-connect/blob/develop/tutorial/tutorial.md) or locally open the `/examples` folder. This simple example will show you how to use our default QR flow to connect and create transactions to send ether or interact with smart contracts.
For a more in depth guide, check out our [developer site](https://developer.uport.me/uport-connect/guides/usage) or clone this repository and check out the sample apps in the `/examples` folder.

---------------------------------------------

Expand Down
70 changes: 70 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,75 @@
# Release notes

## Version 1.1.0

### Personal Sign Flow
The uPort mobile app now supports "personal sign" functionality, and there is a new message to make such a request to a uPort mobile app. For `uport-connect`, support for this feature includes:
* New method `Connect.requestPersonalSign(data, id, sendOpts)` which creates and sends a personal sign request message to a mobile app. Its response may be listened for with `Connect.onResponse` as all other messages.
* Support for `personal_sign` RPC call (invoked by `web3.personal.sign`, e.g.) in `UportSubprovider`, via the above method on `Connect`

### Typed Data (ERC712) Signature Flow
The uPort mobile app also supports the new `eth_signTypedData` RPC call defined by the [EIP712 Specification](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md). Correspondingly, this library now includes:
* New method `Connect.requestTypeDataSignature(typedData, id, sendOpts)`, which creates and sends a typed data signature request message to a mobile app. Its response may be listened for with `Connect.onResponse` as all other messages.
* Support for `eth_signTypedData` and `eth_signTypedData_v3` RPC calls in `UportSubprovider`, via the above method on `Connect`

### Simple App Profiles

It's now possible to include a list of JWTs to better identify an application making a request via a new property `vc`. In particular, a JWT in the form of an "app profile" has semantic meaning to a mobile app, and will be displayed along with the request card. This app profile can contain any subset of the following five fields which are recognized by the uPort Mobile App:

| Key | Type | Description |
|--------------|--------|-------------|
|`name` |`String`| Application name|
|`description` |`String`| Description of application |
|`url` |`String`| URL from which application is being served|
|`profileImage`|IPLD Link| Foreground image to display in requests to mobile app|
|`bannerImage` |IPLD Link| Background image to display in requests to mobile app |

In particular for `uport-connect`, this message will be set up as follows:
* A `Connect` instance can be instantiated with a `vc` option, which is a list of JWTs or IPFS hashes (in the form `/ipfs/${hash}`), which will be passed along with every request from that instance.
* If no `vc` argument is supplied, the first request from the instance will sign and upload to IPFS a JWT identifying the app's name, the URL from which it has been served, and any other supplied keys of the profile claim described above. This will become the only entry of the `vc` array, and be passed along with every request.
---------------------------------------------------------------------------------------------------------------
## Version 1.0

With the release of uPort Connect `v1.0.0`, there are a number of changes to our API -- the main differences to watch out for are described in this document, and the full API reference can be found [here](https://developer.uport.me/uport-connect/reference/index).

### `ConnectCore` -> `Connect`
First, on the module level, there is no longer a `ConnectCore` class. All core functionality is now implemented by the `Connect` object, instantiated as `new Connect(appName, opts)`. Supplemental "transports" which facilitate communcation with the mobile app have moved to a new repository, [`uport-transports`](https://github.com/uport-project/uport-transports). The transports used in `Connect` are configurable, and you also have the option of providing custom transports in the constructor. See the `transport`, `pushTransport`, and `mobileTransport` options in the configuration object.

### No public keys in the browser
There was previously confusion about how to keep private keys safe when `Connect` required its own keypair in order to sign messages. To aleviate this, we no longer require that `Connect` is instantiated with a `privateKey` or `signer`; instead, when a `Connect` is instantiated for the first time on a particular site, it generates a new keypair in the browser to serve as the *instance*'s identity. This is the identity that will sign requests to a mobile app, and the mobile app user can confirm that subsequent requests come from the same identity. It is still the case that signing a claim with a particular unique identity (which may belong to your application or company) requires that the keypair for that identity be stored somewhere secure (such as a server), and client

### `localStorage` Persistance
As mentioned above, the keypair that is created on construction of the `Connect` object is saved to localStorage, and is used to re-instantiate the object with the same keypair when the site is reloaded. Additionally, the `did` and `address` of the most recently authenticated user, and any verified claims they have shared with the application are persisted in localStorage, so that they need not be requested again when a user revisits the page. Note that this does not share the information with any external service, and is intended to allow applications to maintain something akin to a session without storing a user's information on a server. For more information about controlling the persistance behavior of `Connect`, see the API [reference](https://developer.uport.me/uport-connect/reference/index)

### New functions `logout`, `reset`
To clear all saved data about a user from the browser, use the `logout()` method. To additionally destroy the keypair, and so the application's identity, use `reset()`. Note that following a reset, the user will be prompted to create a new identity in the mobile app upon the next interaction, and will not be able to associate the new browser identity with the old.

### `mnid`, `address`, `did`
With v1.0, we have changed our underlying architecture to use [Decentralized Identifiers](https://w3c-ccg.github.io/did-spec/) (DIDs) as our primary ID. We retain support for old identities via the `did:uport:` did method, while new accounts are created using the `ethr:did:` did method. The `did` of the currently authenticated user is readable from a connect instance as `connect.did`. The `address` field now returns the ethereum address of the currently authenticated user, and the `mnid` field is an encoding of the `address` along with the network id, described further [here](https://github.com/uport-project/mnid).

### `<request>.then()` -> `onResponse(requestId).then()`
In order to address issues that can arise with page reloading when switching between mobile browsers and the uPort app, this release decouples the concepts of *requests* and *responses*. Where previously a request would return a promise which would resolve when the response was available, now each request requires a `requestId`, which is then used to listen for the response. This is a much more powerful pattern, that allows for more customized handling of requests and responses potentially on different pages of an app, and the request flow itself is stateless with respect to the browser.

### `requestAddress` -> `requestDisclosure`
The `requestAddress` function has been removed, and `address` and `did` are returned by default for all disclosure requests. Use `requestDisclosure()` instead.

### `attestCredentials` -> `sendVerification`
Renamed to make names more consistent across our libraries.

### `request` -> `send`
This is the function that sends a pre-signed JWT to the mobile app using the appropriate transport. It was renamed to clarify it's role as the function that actually invokes the transports.

### `(new Connect(appName, {provider})).getProvider()` -> `connect.getProvider(provider)`
By default, `uport-connect` now uses `ethjs` as our base web3 provider. To pass a different base provider onto which uport functionality should be applied, pass the provider instance to the `getProvider` instance method, and the returned `UportSubprovider` will wrap the given provider. **Note:** some providers may not play nicely with the added uport functionality.

### `connect.getWeb3` removed
To reduce bundle size for those who do not need it, we no longer bundle `web3` with `uport-connect`. To get a `web3` object configured with uPort functionality, created a new `web3` instance with the `UportSubprovider` returned by `getProvider`, i.e.
```javascript
const web3 = new Web3(connect.getProvider())
```

---------------------------------------------------------------------------------------------------------------

## Version 0.7.0
* Support for encrypted push notifications
* New QR-code modals
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- run:
name: install-dependencies
command: yarn
command: npm i

- run:
name: test
Expand Down

0 comments on commit c1d7c42

Please sign in to comment.