User Transactions
The User Transactions module provides methods for creating transaction payloads related to user profiles and referral operations within the Mirage system. These transactions handle user profile creation, referral code management, and VIP referral rates.
User Profile Operations
getUserProfilePayload
Creates a payload for generating a new user profile.
getUserProfilePayload(
code: string
): InputEntryFunctionDataExample:
const payload = mirageClient.userProfile.transactions.getUserProfilePayload(
"WELCOME2024" // Initial code
)getUserProfileWithCodePayload
Creates a payload for generating a new user profile with a specific referral code.
getUserProfileWithCodePayload(
code: string
): InputEntryFunctionDataExample:
const payload = mirageClient.userProfile.transactions.getUserProfileWithCodePayload(
"REFERRAL123" // Referral code
)Referral Management
getAddCustomReferralCodePayload
Creates a payload for adding a custom referral code to a user's profile.
getAddCustomReferralCodePayload(
code: string
): InputEntryFunctionDataExample:
const payload = mirageClient.userProfile.transactions.getAddCustomReferralCodePayload(
"MYCUSTOMCODE" // Custom referral code
)getUpdateReferralDepositAddressPayload
Creates a payload for updating the deposit address for referral rewards.
getUpdateReferralDepositAddressPayload(
toAddress: string
): InputEntryFunctionDataExample:
const payload = mirageClient.userProfile.transactions.getUpdateReferralDepositAddressPayload(
"0x123..." // New deposit address
)getReferViaCustomCodePayload
Creates a payload for referring a user using a custom referral code.
getReferViaCustomCodePayload(
code: string
): InputEntryFunctionDataExample:
const payload = mirageClient.userProfile.transactions.getReferViaCustomCodePayload(
"CUSTOMREF123" // Custom referral code
)getReferPayload
Creates a payload for referring a user using their address.
getReferPayload(
referrerAddress: string
): InputEntryFunctionDataExample:
const payload = mirageClient.userProfile.transactions.getReferPayload(
"0x123..." // Referrer's address
)