Issue Trust Bonus as a W3C Verifiable Credential to 3Box#9032
Issue Trust Bonus as a W3C Verifiable Credential to 3Box#9032wyc wants to merge 14 commits intogitcoinco:masterfrom
Conversation
17dd2c1 to
cbecdf9
Compare
49978e0 to
94faf41
Compare
thelostone-mc
left a comment
There was a problem hiding this comment.
Will need to review this further as though isolated. It introduces
- typescript
- svelte
- tailwind
- it's own linter + webpack config
| GTC_DIST_KEY = env('GTC_DIST_KEY', default='') | ||
| DIDKIT_KEY_JWK = env.json('DIDKIT_KEY_JWK', default={}) | ||
| POPP_VC_ISSUER = env.str('POPP_VC_ISSUER', default='') | ||
| POPP_VC_VERIFIER = env.str('POPP_VC_VERIFIER', default='') |
There was a problem hiding this comment.
^ could we add in doc on where this would be populated from
app/app/urls.py
Outdated
|
|
||
| #passport | ||
| re_path(r'^passport/$', passport.views.index, name='passport_gen'), | ||
| re_path(r'^passport-vc$', passport.views.verifiable_credential, name='passport_vc'), |
There was a problem hiding this comment.
could we rename it tp passport/verify-credentials
| return JsonResponse(context) | ||
|
|
||
|
|
||
| def verifiable_credential(request): |
There was a problem hiding this comment.
let's use the login decorator that django offers
@login_required
app/passport/views.py
Outdated
| network = request.GET.get("network") | ||
|
|
||
| if not request.user.is_authenticated: | ||
| return JsonResponse({"status": "error", "msg": "You must login"}) |
There was a problem hiding this comment.
^ this can be removed since we are using the decorator
ops/popp-tools/public/index.html
Outdated
| </head> | ||
|
|
||
| <body></body> | ||
| </html> |
There was a problem hiding this comment.
^ reindent to 2 spaces
|
The issues that were listed above have been resolved in the latest commits. It's ready for another review, especially the doc section, since I wasn't sure about the level of detail to use there. |
0523e1b to
21eda8e
Compare
|
Rebased onto current |
|
The code looks alright to me but I'm not very comfortable on adding
Can this not be done outside this repo and we just end up including the minified file @wyc / @theosirian cc @octavioamu / @gdixon / @chibie / @zacheryschiller could you guys check this out as well ? Also from UI I'm not sure this sticks to out styleguide / presskit. |
|
Sure thing, we will move it out of this PR for now. Perhaps a good home for it is https://github.com/gitcoinco/PersonhoodPassport |
21eda8e to
3ab6fd7
Compare
|
The items mentioned in #9032 (comment) have been moved into gitcoinco/PersonhoodPassport#1. Ready for another review, thanks! |
a994cde to
8132353
Compare
ef9e5dd to
d260dfb
Compare
octavioamu
left a comment
There was a problem hiding this comment.
looking nice, left a few comments about functions and data that already exist.
| const accounts = web3.eth.getAccounts(); | ||
|
|
||
| $.when(accounts).then((result) => { | ||
| ethAddress = result[0]; | ||
| ethProvider = web3.currentProvider; |
There was a problem hiding this comment.
there are already some methods used on wallet.js that could be used here instead. You will find some global variables like selectedAccount, provider and others generated when someone connect to the site using web3modal
| const vcCopy = () => { | ||
| const str = JSON.stringify(credential, null, 2); | ||
|
|
||
| navigator.clipboard.writeText(str); | ||
| }; |
There was a problem hiding this comment.
please use the code on clipboard.js
you can use it like
Copy Text
There was a problem hiding this comment.
is not using the last clipboard api but that could be updated if required (we already did it on our clipboard component in vue-components.js
d260dfb to
e32dea6
Compare
|
Resolved the changes requested by @octavioamu and rebased onto current master. |
e32dea6 to
8b741f7
Compare
8b741f7 to
12e4ea9
Compare
|
Hey @octavioamu - we've since migrated this to Ceramic. We're ready for another review - thanks! |
credential issuer
Signed-off-by: Tiago Nascimento <tiago.nascimento@spruceid.com>
Signed-off-by: Tiago Nascimento <tiago.nascimento@spruceid.com>
Signed-off-by: Tiago Nascimento <tiago.nascimento@spruceid.com>
Signed-off-by: Tiago Nascimento <tiago.nascimento@spruceid.com>
Signed-off-by: Tiago Nascimento <tiago.nascimento@spruceid.com>
Signed-off-by: Tiago Nascimento <tiago.nascimento@spruceid.com>
…o clipboard script Signed-off-by: Tiago Nascimento <tiago.nascimento@spruceid.com>
Signed-off-by: Tiago Nascimento <tiago.nascimento@spruceid.com>
Signed-off-by: Tiago Nascimento <tiago.nascimento@spruceid.com>
12e4ea9 to
5df725d
Compare
|
kuvvet itlir |
e276966 to
df02065
Compare
a15aeb3 to
c0d45b0
Compare
Description
This change allows users to download their Trust Bonus as a signed W3C Verifiable Credential to their local machine or 3Box profile in addition to minting an NFT. This can then be used to demonstrate their Trust Bonus anywhere supporting the same global data standards. The signing happens with a did-web DID from gitcoin.co, but this component can be further decentralized in the future using ENS + did-eth.
Progress:
A demo deployment with this PR incorporated can be found here: https://gitcoin-demo.spruceid.com/
Tool to retrieve & test the credential: https://demo.spruceid.com/popp/tools/
did-web JSON source: https://gitcoin-demo.spruceid.com/.well-known/did.json
Refers/Fixes
#8811
Testing