Skip to content

How to create invite to DAO invite links for the wallet.

Nikolaus Heger edited this page Aug 10, 2023 · 4 revisions

Overview

The invite functionality is simple from a user perspective:

Any user in the DAO who is an enroller - who has the right to enroll members - can create an invite link to invite new people into a DAO.

The wallet consumes the invite link, and calls an action on join.hypha to enroll the member directly into the DAO without having to apply to be a member or be enrolled by an enroller.

Hypha Wallet

The hypha wallet consumes invite / onboarding links the same, they contain an onboarding code which the wallet is using to call a backend to create an account, and it contains an invite code in an "enroll_secret"

The hypha wallet onboarding link contains the following data:

class InviteLinkData {
  final String code;
  final Network network;
  final String? dao;
  final String? enrollSecret;

  const InviteLinkData({required this.code, required this.network, this.dao, this.enrollSecret,});
}

Invite link specification

The invite link is the same as the onboarding link which we already create, with the addition of a field called enroll_secret.

The link is presented as QR Code to scan with phone, or a URL opened on the phone where it will download the wallet, onboard the user, and enroll the user. The QR code basically just encodes the URL

The URL looks like this:

https://hyphawallet.page.link/?link=https://hypha.earth/invite?code%3D811096b0301a614c%26chain%3DtelosTestnet%26dao%3D219987%26enroll_secret%3D<ENROLL_SECRET>%26env%3Ddev%26apn%3Dearth.hypha.wallet.hypha_wallet%26isi%3D1659926348%26ibi%3Dearth.hypha.wallet.hyphaWallet

The link in link=... is a URL encoded link as follows:

CHAIN = telos | telosTestnet | eos | eosTestnet
DAO_ID = 219987 (the DAOs numeric ID)
INVITE_CODE = invite code from account creator (a string)
ENROLL_SECRET = enroll secret created as below

https://hypha.earth/invite?code=<INVITE_CODE>&chain=<CHAIN>&dao=<DAO_ID>&enroll_secret=<ENROLL_SECRET>&env=dev&apn=earth.hypha.wallet.hypha_wallet&isi=1659926348&ibi=earth.hypha.wallet.hyphaWallet
Clone this wiki locally