-
-
Notifications
You must be signed in to change notification settings - Fork 774
Issue Trust Bonus as a W3C Verifiable Credential to 3Box #9032
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
base: master
Are you sure you want to change the base?
Issue Trust Bonus as a W3C Verifiable Credential to 3Box #9032
Conversation
17dd2c1
to
cbecdf9
Compare
49978e0
to
94faf41
Compare
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.
Will need to review this further as though isolated. It introduces
- typescript
- svelte
- tailwind
- it's own linter + webpack config
@@ -939,3 +939,6 @@ def callback(request): | |||
# GTC Token Distribution | |||
GTC_DIST_API_URL = env('GTC_DIST_API_URL', default='http://localhost:8000/not-valid-url') | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ could we add in doc on where this would be populated from
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.
Added in 0523e1b
app/app/urls.py
Outdated
@@ -271,6 +271,7 @@ | |||
|
|||
#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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we rename it tp passport/verify-credentials
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.
Resolved in 17ac7e5
@@ -103,3 +105,80 @@ def passport(request, pattern): | |||
], | |||
} | |||
return JsonResponse(context) | |||
|
|||
|
|||
def verifiable_credential(request): |
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.
let's use the login decorator that django offers
@login_required
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.
Resolved in 91afdb8
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ this can be removed since we are using the decorator
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.
Resolved in 91afdb8
ops/popp-tools/public/index.html
Outdated
</head> | ||
|
||
<body></body> | ||
</html> |
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.
^ reindent to 2 spaces
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.
Done in 5ad8ee2
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
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.
Resolved in e32dea6.
const vcCopy = () => { | ||
const str = JSON.stringify(credential, null, 2); | ||
|
||
navigator.clipboard.writeText(str); | ||
}; |
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.
please use the code on clipboard.js
you can use it like
Copy Text
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.
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
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.
Resolved in e32dea6.
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 <[email protected]>
Signed-off-by: Tiago Nascimento <[email protected]>
Signed-off-by: Tiago Nascimento <[email protected]>
Signed-off-by: Tiago Nascimento <[email protected]>
Signed-off-by: Tiago Nascimento <[email protected]>
Signed-off-by: Tiago Nascimento <[email protected]>
…o clipboard script Signed-off-by: Tiago Nascimento <[email protected]>
Signed-off-by: Tiago Nascimento <[email protected]>
Signed-off-by: Tiago Nascimento <[email protected]>
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