This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box. | |
✅ did:3:bafyreie33homqk3nukfqc3aa5yypft2fv3sdxaywijmotzp7ewept3yp2q ✅ | |
Create your profile today to start building social connection and trust online at https://3Box.io/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am joaoaguiam on github. | |
* I am joaoaguiam (https://keybase.io/joaoaguiam) on keybase. | |
* I have a public key ASC4ElT7-PeexDYUxCFQfxCnrkK3h16N26J1quk9NMMK-wo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3Box is a social profiles network for web3. This post links my 3Box profile to my Github account! | |
✅ did:muport:QmWDjTTmxsFU1E7ecugdx6T3DWKHbYoKtZduqK87YD6ADM ✅ | |
Create your profile today to start building social connection and trust online. https://3box.io/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3Box is a social profiles network for web3. This post links my 3Box profile to my Github account! | |
✅ did:muport:QmWDjTTmxsFU1E7ecugdx6T3DWKHbYoKtZduqK87YD6ADM ✅ | |
Create your profile today to start building social connection and trust online. https://3box.io/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
did:muport:0x12345 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test gist api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const verifiers = require("./utils/verifiers"); | |
class VerifiedAccounts { | |
constructor(box) { | |
this._box = box; | |
this._did = box._muportDID.getDid(); | |
} | |
/** | |
* Internal function to prevent using the methods without having been initialized with a 3Box |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
/** | |
* Verify github account method. It will return the github username if verified correctly. | |
* @param did DID of the user to be verified | |
* @param proof URL to the gist file under the user account containing the user DID. | |
* @returns Object containing the github user in the data field and in case of error, the error message under the error field. | |
*/ | |
verifyGithub: async (did, proof) => { | |
if (!proof || proof.trim() === "") { | |
throw new Error("verifyGithub: proof (gist url) parameter is not present"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
did:muport:QmXfdXB8h9UzCT5XNmMhkuYuG49LYTPJcJAwhWorHhsCo4----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const abi = require('ethereumjs-abi') | |
const BN = require('bn.js') | |
const Web3 = require('web3'); | |
const account = web3.eth.accounts.privateKeyToAccount(privateKey); | |
let messageHash = "0x" + abi.soliditySHA3( | |
["address", "uint", "uint"], | |
[new BN(userAddress, 16), new BN(String(stakeAmount), 10), new BN(String(expiryDate), 10)] | |
).toString("hex"); |
NewerOlder