ChainVine API Docs
  • Chainvine
    • Product and Features
    • Technical Overview
  • ⚙️Developers
    • 🔨Use Cases
      • Leverage cookies
      • Link Claimer/Referrer
      • Record Link Click
      • Generate a Referrer Link
      • Record a Transfer Event
      • Complete a Requirement
    • 🖼️Embedded Widget
      • Implementation
      • FAQ
    • 🧰SDK
      • Implementation
      • Configuring the Client
      • Classes and Functions
        • Utility Methods
        • ChainvineClient
          • getReferralUrl(walletAddress)
          • recordClick(referrer)
          • linkReferrer([payload,])
          • referralConversion([payload,])
          • syncUser(walletAddress)
          • getCampaignReferralStats([payload,])
        • ChainvineUser
          • Initializing the client
          • joinCampaign([campaignParams,])
          • getRequirement([payload,])
          • getUserStats([payload,])
          • verifyRequirement([payload,])
          • completeRequirement([payload,])
          • claimEligibleEarnings([payload,])
          • transferEvent([payload,])
          • referral([campaignParams,])
            • linkToReferrer(referrer)
            • url()
          • setRewardTiersOverride([payload,])
        • Errors
        • Authentication
          • Getting your API Key
          • Allow-listing a domain
      • FAQ
    • 🪝Webhooks
    • 📔Open API Specification
  • Rewards
    • Claiming For Users
      • On ChainVine
Powered by GitBook
On this page
  • EVM Wallet Addresses
  • Params
  • Response
  1. Developers
  2. SDK
  3. Classes and Functions
  4. ChainvineClient

syncUser(walletAddress)

Allows you to clone ChainvineClient instance scoped to a single wallet address without having to fetch your ClientConfig.

PreviousreferralConversion([payload,])NextgetCampaignReferralStats([payload,])

Last updated 1 year ago

In addition to creating a instance from your , this method will sync the wallet to the database and return the wallet's ChainVine User Id.

EVM Wallet Addresses

import { ChainvineClient } from '@chainvine/sdk';

const client = new ChainvineClient({
    apiKey: '9dj022didj', //your api key
});

//Get a user's wallet address by id
const userClient = await client.syncUser(
    '0x0384093304u83', // your user's wallet address
);

Params

Param
Required
Description

walletAddress

required

the wallet of the user to general a referral link for

Response

A ChainvineUser client instance

⚙️
🧰
ChaivineUser
ChainvineClient