You can associate your GitHub account with your DEMOS address by following these steps:
1. Connect your wallet
import { Demos } from "@kynesyslabs/demosdk";
import { Identities } from "@kynesyslabs/demosdk/abstraction";
// the DEMOS rpc
const rpc = "https://demosnode.discus.sh"
const demos = new Demos();
await demos.connect(rpc);
await demos.connectWallet(mnemonic);
2. Generate the proof payload
To link your GitHub account to your DEMOS address, you need to create a public gist containing a proof on your GitHub. The proof is a string that contains a message, a signature and your public key.
You can generate a proof as shown below:
const identities = new Identities();
const proofPayload = await identities.createWeb2ProofPayload(demos)
console.log("Upload on GitHub gist: ", proofPayload)