MCPcopy Create free account
hub / github.com/NextDotID/proof_server / GeneratePostPayload

Method GeneratePostPayload

validator/keybase/keybase.go:52–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52func (kb *Keybase) GeneratePostPayload() (post map[string]string) {
53 kb.Identity = strings.ToLower(kb.Identity)
54 payload := KeybasePayload{
55 Version: "1",
56 Comment: "Here's an NextID proof of this Keybase account.",
57 Comment2: "To validate, base64.decode the signature, and recover pubkey from it using sign_payload with ethereum personal_sign algo.",
58 Persona: "0x" + mycrypto.CompressedPubkeyHex(kb.Pubkey),
59 KeybaseUsername: kb.Identity,
60 SignPayload: kb.GenerateSignPayload(),
61 Signature: "%SIG_BASE64%",
62 CreatedAt: util.TimeToTimestampString(kb.CreatedAt),
63 Uuid: kb.Uuid.String(),
64 }
65 payload_json, _ := json.MarshalIndent(payload, "", "\t")
66 return map[string]string{"default": string(payload_json)}
67}
68
69func (kb *Keybase) GenerateSignPayload() (payload string) {
70 kb.Identity = strings.ToLower(kb.Identity)

Callers

nothing calls this directly

Calls 2

GenerateSignPayloadMethod · 0.95
TimeToTimestampStringFunction · 0.92

Tested by

no test coverage detected