Using the SDK
In this Section, you will learn what are the functions provided by the SDK to integrate authentication, user management, and Aptos transaction execution into your project.
Functions Overview
1. signInWithGoogle: (network: NetworkConfigs, apiKey: string, logEnabled?: boolean) => Promise<SignInWithGoogleReturn>
const signInWithGoogle: (network: NetworkConfigs, apiKey: string, logEnabled?: boolean) => Promise<SignInWithGoogleReturn>This function allows users to sign in with Google using OAuthProvider.
* @param {NetworkConfigs} network - Network Type Enum.
* @param {string} apiKey - Your API key from generated from LYNC dashboard - https://dashboard.lync.world
* @param {boolean} [logEnabled] - Enable/disable logging. The default is true
* @returns {object} SignInWithGoogleReturn - Returns an object with the success status and the user data or error message.
* @typedef {object} SignInWithGoogleReturn - { success: true; user: UserData } | { success: false; message: string };
* @typedef {object} UserData - { id: string; walletAddress: string; name: string; email: string; providerId: string; avatar: string; }
* @errors - The function can throw an error if the sign-in operation fails. The error message is logged if logging is enabled.2. signOutUser: (logEnabled?: boolean) => Promise<SignOutUserReturn>
3. getUserProfile: (email: string, network: NetworkConfigs, apiKey: string, logEnabled?: boolean) => Promise<GetUserProfileReturn>
4. aptosTransaction: (args: AptosTransactionFuncArgs,apiKey: string, logEnabled?: boolean) => Promise<AptosTransactionReturn>
Last updated