based-auth
Version:
A Next.js/Node.js authentication and wallet API kit for Ethereum and Solana, with utilities for serialization and contract interaction, designed for serverless and API route usage.
36 lines (35 loc) • 1.27 kB
TypeScript
import { UserRole } from '../../../shared/src/types';
import { NetworkSymbols } from '../networks';
export declare function updateOrCreateUserProfile(provider: string, network: string, address: string, social: string, image: string): Promise<import('../../../shared/src/models').IUserProfile & Required<{
_id: import("mongoose").Types.ObjectId;
}> & {
__v: number;
}>;
export declare function saveSocialUser(provider: string, userid: string, image: string, customChainId?: number): Promise<{
id: string;
provider: string;
chainId: number;
network: NetworkSymbols;
address: string;
social: string;
name: string;
image: string;
role: UserRole;
}>;
export declare function saveWalletUser(provider: string, chainId: number, network: string, address: string): Promise<{
id: string;
provider: string;
chainId: number;
network: string;
social: string;
address: string;
name: string;
image: string;
role: UserRole;
}>;
/**
* Update all token owner names when a user profile name changes
* @param userProfile - The user profile that was updated
* @param oldName - The previous name (for logging)
*/
export declare function updateTokenOwnerNames(userProfile: any, oldName?: string): Promise<void>;