-
Notifications
You must be signed in to change notification settings - Fork 86
Conversation
* 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
* 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
…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 profile claim * Fix profile test
* 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
point to developer site instead. resolves #188 also change `requestDisclosure({})` to `requestDisclosure()`
* chore: bump uport-transports to 0.1.0 * feat: replace aud with did, callbackUrl with callback
* 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
Looks good
* 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
ignoring warning for coverage reduction by 0.09%
Codecov Report
@@ Coverage Diff @@
## master #255 +/- ##
==========================================
- Coverage 93.23% 89.15% -4.09%
==========================================
Files 2 2
Lines 207 249 +42
==========================================
+ Hits 193 222 +29
- Misses 14 27 +13
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #255 +/- ##
==========================================
- Coverage 93.23% 89.32% -3.91%
==========================================
Files 2 2
Lines 207 253 +46
==========================================
+ Hits 193 226 +33
- Misses 14 27 +13
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rmw2 please see my question about the return value from the two new signing methods
@@ -44,6 +44,20 @@ class UportSubprovider { | |||
error => cb(error) | |||
) | |||
} | |||
|
|||
this.signTypedData = (typedData, cb) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these two methods return the unified hex value per EIP spec for the JSON-RPC call or a r
, s
, v
object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, it's returning the r
, s
, v
, right now. I'll fix that, good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify in the highlevel uPort connect functions I think it's way more useful to return the {r
,s
, v
} values, but for the provider it needs to follow standard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So do the fix only in the provider. Everywhere else is fine @rmw2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just add a 0x prefix and you’re good to go
test/UportSubprovider.js
Outdated
@@ -12,6 +12,10 @@ const address = '0x122bd1a75ae8c741f7e2ab0a28bd30b8dbb1a67e' | |||
const mnid = '2oeXufHGDpU51bfKBsZDdu7Je9weJ3r7sVG' | |||
const badMnid = '2nSX6hxNMgvgP9MtvoJDgSjVHGRsTuxpyPi' | |||
|
|||
function encodeSignature({r,s,v}) { | |||
return `${r.padStart(64, '0')}${s.padStart(64, '0')}${v}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rmw2 I’m not 100% sure but I think it expects this to have a 0x
prefix. Can you look at the spec and make sure. If it’s good then merge it in, if not just add that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is definitely required from EIP712:
DATA: Signature. As in eth_sign it is a hex encoded 129 byte array starting with 0x. It encodes the r, s and v parameters from appendix F of the yellow paper in big-endian format. Bytes 0…64 contain the r parameter, bytes 64…128 the s parameter and the last byte the v parameter. Note that the v parameter includes the chain id as specified in EIP-155.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah gotcha, thanks will fix !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
Can we test this branch before its merged with master |
* feat: use universal links on first request, deep links after * test: add tests for mobileTransport and URI schemes * chore: bump version in uport-transports * 1.0.0-alpha-6 * Fix dependency in web3 example (#221) * 1.0.0-alpha-6 * chore: update dependency on uport-connect to '../../' * feat: switch back to deep links only, preserve support for switching * 1.0.0-beta.1 * 1.0.0 * test: increase coverage of less important cases to please CI * chore: bump transports to include uri fix (#233) * feat: allow verification sig req to specify exp (#237) * feat: allow verification sig req to specify exp * doc: update jsdoc for opts params, throw error if sub is missing * chore: bump to latest uport-credentials * test: add coverage for missing sub case * v1.0.2 * Release/v1.1.0 (#255) * 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 * fix: update deep link handling * fix: resolved broken tests after merge * 1.1.2-rc.0 * fix: style and remove extra console logs
Adds support for
vc
field of a requestrequestTypedDataSignature
eth_signTypedData
RPC call inUportSubprovider
requestPersonalSign
personal_sign
RPC call inUportSubprovider
Fixes