Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

ghverify source realm

Readme View source

ghverify

This realm is intended to enable off chain gno address to github handle verification. The steps are as follows:

  • A user calls RequestVerification and provides a github handle. This creates a new static oracle feed.
  • An off-chain agent controlled by the owner of this realm requests current feeds using the GnorkleEntrypoint function and provides a message of "request"
  • The agent receives the task information that includes the github handle and the gno address. It performs the verification step by checking whether this github user has the address in a github repository it controls.
  • The agent publishes the result of the verification by calling GnorkleEntrypoint with a message structured like: "ingest,<task id>,<verification status>". The verification status is OK if verification succeeded and any other value if it failed.
  • The oracle feed's ingester processes the verification and the handle to address mapping is written to the avl trees that exist as ghverify realm variables.

Functions 6

func GetAddressByHandle

crossing Action
1func GetAddressByHandle(cur realm, handle string) string
source

GetAddressByHandle returns the gno address associated with the given github handle.

func GetHandleByAddress

crossing Action
1func GetHandleByAddress(cur realm, address_XXX string) string
source

GetHandleByAddress returns the github handle associated with the given gno address.

func GnorkleEntrypoint

crossing Action
1func GnorkleEntrypoint(cur realm, message string) string
source

GnorkleEntrypoint is the entrypoint to the gnorkle oracle handler.

func Render

1func Render(_ string) string
source

Render returns a json object string will all verified handle -> address mappings.

func RequestVerification

crossing Action
1func RequestVerification(cur realm, githubHandle string)
source

RequestVerification creates a new static feed with a single task that will instruct an agent to verify the github handle / gno address pair.

func SetOwner

crossing Action
1func SetOwner(_ realm, owner address)
source

SetOwner transfers ownership of the contract to the given address.

Imports 9

Source Files 4