Skip to main content

ISMEVerifier

ISMEVerifier provides verification of social accounts, currently only supports Twitter.

constructor

Type

class ISMEVerifier {
constructor(client: ISMEClient, endpoint: string)
}
info

ISMEVerifier and ISMEClient are not the same endpoint

Method

requestTwitter

Create signature message for Twitter verification

Type

class ISMEVerifier {
requestTwitter(): {
link: string
text: string
msghash: string
}
}

Details

Calling this method returns below three fields

  • link: the link to post the tweet
  • text: the content of the tweet
  • msghash: content hash

verifyTwitter

Verify Tweets

Type

interface VerifyInfo {
proof: string
did: string
type: string
account: string
verifier_key: string
}
interface VerifyResult extends VerifyInfo {
result: boolean
}
class ISMEVerifier {
verifyTwitter(account: string, msghash: string): Promise<VerifyResult>
}

Details

Tweets validation need to be passed in

  • account: Twitter account
  • msghash: the hash of the previously generated content

verifyProof

Verify that the credentials are issued by Gateway

Type

class ISMEVerifier {
verifyProof(info: VerifyInfo, verifierKey?: string): boolean
}