aftermath-ts-sdk - v3.3.3
    Preparing search index...

    The ReferralVault class provides functionality for querying and managing referral information within the Aftermath protocol. It allows you to look up the referrer for a given address.

    Use Referral class instead

    Hierarchy (View Summary)

    Index
    config: CallerConfig

    The mutable configuration used for subsequent requests.

    constants: {} = {}

    Contains static configuration relevant to the referral system, if any. Currently empty but can be extended for future needs.

    • Retrieves the referrer address for a specified referee (user).

      Parameters

      • inputs: { referee: string }

        An object containing the referee Sui address.

      Returns Promise<string>

      A promise that resolves to either the referrer's SuiAddress or the string "None" if no referrer exists.

      Use Referral class instead

      const afSdk = await Aftermath.create({ network: "MAINNET" });

      const referralVault = afSdk.ReferralVault();

      const referrer = await referralVault.getReferrer({ referee: "0x<user_address>" });
      console.log("Referrer address:", referrer);
    • Returns the canonical Aftermath API host for a Sui network.

      To target a custom or local host, pass baseUrl in CallerConfig to the constructor instead.

      Parameters

      • network: SuiNetwork

        The Sui network whose host to return.

      Returns string

      The network's HTTPS or local HTTP API host.