UNPKG

echofi-client

Version:

A comprehensive TypeScript/JavaScript client library for EchoFi services with automatic gRPC-Web code generation, unified service access, and real-time WebSocket communication.

599 lines (485 loc) 23.7 kB
import * as jspb from 'google-protobuf' import * as web3auth_wallet_pb from '../web3auth/wallet_pb'; // proto import: "web3auth/wallet.proto" import * as web3auth_auth_proof_pb from '../web3auth/auth_proof_pb'; // proto import: "web3auth/auth_proof.proto" export class GetChallengeRequest extends jspb.Message { getWalletAddress(): string; setWalletAddress(value: string): GetChallengeRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetChallengeRequest.AsObject; static toObject(includeInstance: boolean, msg: GetChallengeRequest): GetChallengeRequest.AsObject; static serializeBinaryToWriter(message: GetChallengeRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetChallengeRequest; static deserializeBinaryFromReader(message: GetChallengeRequest, reader: jspb.BinaryReader): GetChallengeRequest; } export namespace GetChallengeRequest { export type AsObject = { walletAddress: string, } } export class GetChallengeResponse extends jspb.Message { getChallenge(): string; setChallenge(value: string): GetChallengeResponse; getExpiresAt(): number; setExpiresAt(value: number): GetChallengeResponse; getProofLifetimeSeconds(): number; setProofLifetimeSeconds(value: number): GetChallengeResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetChallengeResponse.AsObject; static toObject(includeInstance: boolean, msg: GetChallengeResponse): GetChallengeResponse.AsObject; static serializeBinaryToWriter(message: GetChallengeResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetChallengeResponse; static deserializeBinaryFromReader(message: GetChallengeResponse, reader: jspb.BinaryReader): GetChallengeResponse; } export namespace GetChallengeResponse { export type AsObject = { challenge: string, expiresAt: number, proofLifetimeSeconds: number, } } export class AuthWithSignatureRequest extends jspb.Message { getWalletAddress(): string; setWalletAddress(value: string): AuthWithSignatureRequest; getChallenge(): string; setChallenge(value: string): AuthWithSignatureRequest; getSignature(): string; setSignature(value: string): AuthWithSignatureRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): AuthWithSignatureRequest.AsObject; static toObject(includeInstance: boolean, msg: AuthWithSignatureRequest): AuthWithSignatureRequest.AsObject; static serializeBinaryToWriter(message: AuthWithSignatureRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): AuthWithSignatureRequest; static deserializeBinaryFromReader(message: AuthWithSignatureRequest, reader: jspb.BinaryReader): AuthWithSignatureRequest; } export namespace AuthWithSignatureRequest { export type AsObject = { walletAddress: string, challenge: string, signature: string, } } export class AuthWithSignatureResponse extends jspb.Message { getUser(): web3auth_wallet_pb.Web3User | undefined; setUser(value?: web3auth_wallet_pb.Web3User): AuthWithSignatureResponse; hasUser(): boolean; clearUser(): AuthWithSignatureResponse; getSessionToken(): string; setSessionToken(value: string): AuthWithSignatureResponse; getSessionExpiresAt(): number; setSessionExpiresAt(value: number): AuthWithSignatureResponse; getIsNewUser(): boolean; setIsNewUser(value: boolean): AuthWithSignatureResponse; getAuthProof(): AuthProof | undefined; setAuthProof(value?: AuthProof): AuthWithSignatureResponse; hasAuthProof(): boolean; clearAuthProof(): AuthWithSignatureResponse; getMessage(): string; setMessage(value: string): AuthWithSignatureResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): AuthWithSignatureResponse.AsObject; static toObject(includeInstance: boolean, msg: AuthWithSignatureResponse): AuthWithSignatureResponse.AsObject; static serializeBinaryToWriter(message: AuthWithSignatureResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): AuthWithSignatureResponse; static deserializeBinaryFromReader(message: AuthWithSignatureResponse, reader: jspb.BinaryReader): AuthWithSignatureResponse; } export namespace AuthWithSignatureResponse { export type AsObject = { user?: web3auth_wallet_pb.Web3User.AsObject, sessionToken: string, sessionExpiresAt: number, isNewUser: boolean, authProof?: AuthProof.AsObject, message: string, } } export class AuthWithProofRequest extends jspb.Message { getWalletAddress(): string; setWalletAddress(value: string): AuthWithProofRequest; getAuthProof(): AuthProof | undefined; setAuthProof(value?: AuthProof): AuthWithProofRequest; hasAuthProof(): boolean; clearAuthProof(): AuthWithProofRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): AuthWithProofRequest.AsObject; static toObject(includeInstance: boolean, msg: AuthWithProofRequest): AuthWithProofRequest.AsObject; static serializeBinaryToWriter(message: AuthWithProofRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): AuthWithProofRequest; static deserializeBinaryFromReader(message: AuthWithProofRequest, reader: jspb.BinaryReader): AuthWithProofRequest; } export namespace AuthWithProofRequest { export type AsObject = { walletAddress: string, authProof?: AuthProof.AsObject, } } export class AuthWithProofResponse extends jspb.Message { getUser(): web3auth_wallet_pb.Web3User | undefined; setUser(value?: web3auth_wallet_pb.Web3User): AuthWithProofResponse; hasUser(): boolean; clearUser(): AuthWithProofResponse; getSessionToken(): string; setSessionToken(value: string): AuthWithProofResponse; getSessionExpiresAt(): number; setSessionExpiresAt(value: number): AuthWithProofResponse; getMessage(): string; setMessage(value: string): AuthWithProofResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): AuthWithProofResponse.AsObject; static toObject(includeInstance: boolean, msg: AuthWithProofResponse): AuthWithProofResponse.AsObject; static serializeBinaryToWriter(message: AuthWithProofResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): AuthWithProofResponse; static deserializeBinaryFromReader(message: AuthWithProofResponse, reader: jspb.BinaryReader): AuthWithProofResponse; } export namespace AuthWithProofResponse { export type AsObject = { user?: web3auth_wallet_pb.Web3User.AsObject, sessionToken: string, sessionExpiresAt: number, message: string, } } export class AuthProof extends jspb.Message { getWalletAddress(): string; setWalletAddress(value: string): AuthProof; getChallenge(): string; setChallenge(value: string): AuthProof; getSignature(): string; setSignature(value: string): AuthProof; getIssuedAt(): number; setIssuedAt(value: number): AuthProof; getExpiresAt(): number; setExpiresAt(value: number): AuthProof; getUserId(): string; setUserId(value: string): AuthProof; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): AuthProof.AsObject; static toObject(includeInstance: boolean, msg: AuthProof): AuthProof.AsObject; static serializeBinaryToWriter(message: AuthProof, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): AuthProof; static deserializeBinaryFromReader(message: AuthProof, reader: jspb.BinaryReader): AuthProof; } export namespace AuthProof { export type AsObject = { walletAddress: string, challenge: string, signature: string, issuedAt: number, expiresAt: number, userId: string, } } export class ConnectWalletToUserRequest extends jspb.Message { getWalletAddress(): string; setWalletAddress(value: string): ConnectWalletToUserRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ConnectWalletToUserRequest.AsObject; static toObject(includeInstance: boolean, msg: ConnectWalletToUserRequest): ConnectWalletToUserRequest.AsObject; static serializeBinaryToWriter(message: ConnectWalletToUserRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): ConnectWalletToUserRequest; static deserializeBinaryFromReader(message: ConnectWalletToUserRequest, reader: jspb.BinaryReader): ConnectWalletToUserRequest; } export namespace ConnectWalletToUserRequest { export type AsObject = { walletAddress: string, } } export class ConnectWalletToUserResponse extends jspb.Message { getUser(): web3auth_wallet_pb.Web3User | undefined; setUser(value?: web3auth_wallet_pb.Web3User): ConnectWalletToUserResponse; hasUser(): boolean; clearUser(): ConnectWalletToUserResponse; getMessage(): string; setMessage(value: string): ConnectWalletToUserResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ConnectWalletToUserResponse.AsObject; static toObject(includeInstance: boolean, msg: ConnectWalletToUserResponse): ConnectWalletToUserResponse.AsObject; static serializeBinaryToWriter(message: ConnectWalletToUserResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): ConnectWalletToUserResponse; static deserializeBinaryFromReader(message: ConnectWalletToUserResponse, reader: jspb.BinaryReader): ConnectWalletToUserResponse; } export namespace ConnectWalletToUserResponse { export type AsObject = { user?: web3auth_wallet_pb.Web3User.AsObject, message: string, } } export class LinkWalletToAccountRequest extends jspb.Message { getWalletAddress(): string; setWalletAddress(value: string): LinkWalletToAccountRequest; getSessionToken(): string; setSessionToken(value: string): LinkWalletToAccountRequest; getEmailPassword(): EmailPasswordAuth | undefined; setEmailPassword(value?: EmailPasswordAuth): LinkWalletToAccountRequest; hasEmailPassword(): boolean; clearEmailPassword(): LinkWalletToAccountRequest; getAuthMethodCase(): LinkWalletToAccountRequest.AuthMethodCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): LinkWalletToAccountRequest.AsObject; static toObject(includeInstance: boolean, msg: LinkWalletToAccountRequest): LinkWalletToAccountRequest.AsObject; static serializeBinaryToWriter(message: LinkWalletToAccountRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): LinkWalletToAccountRequest; static deserializeBinaryFromReader(message: LinkWalletToAccountRequest, reader: jspb.BinaryReader): LinkWalletToAccountRequest; } export namespace LinkWalletToAccountRequest { export type AsObject = { walletAddress: string, sessionToken: string, emailPassword?: EmailPasswordAuth.AsObject, } export enum AuthMethodCase { AUTH_METHOD_NOT_SET = 0, SESSION_TOKEN = 2, EMAIL_PASSWORD = 3, } } export class EmailPasswordAuth extends jspb.Message { getEmail(): string; setEmail(value: string): EmailPasswordAuth; getPassword(): string; setPassword(value: string): EmailPasswordAuth; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): EmailPasswordAuth.AsObject; static toObject(includeInstance: boolean, msg: EmailPasswordAuth): EmailPasswordAuth.AsObject; static serializeBinaryToWriter(message: EmailPasswordAuth, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): EmailPasswordAuth; static deserializeBinaryFromReader(message: EmailPasswordAuth, reader: jspb.BinaryReader): EmailPasswordAuth; } export namespace EmailPasswordAuth { export type AsObject = { email: string, password: string, } } export class LinkWalletToAccountResponse extends jspb.Message { getUser(): web3auth_wallet_pb.Web3User | undefined; setUser(value?: web3auth_wallet_pb.Web3User): LinkWalletToAccountResponse; hasUser(): boolean; clearUser(): LinkWalletToAccountResponse; getSessionToken(): string; setSessionToken(value: string): LinkWalletToAccountResponse; getExpiresAt(): number; setExpiresAt(value: number): LinkWalletToAccountResponse; getMessage(): string; setMessage(value: string): LinkWalletToAccountResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): LinkWalletToAccountResponse.AsObject; static toObject(includeInstance: boolean, msg: LinkWalletToAccountResponse): LinkWalletToAccountResponse.AsObject; static serializeBinaryToWriter(message: LinkWalletToAccountResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): LinkWalletToAccountResponse; static deserializeBinaryFromReader(message: LinkWalletToAccountResponse, reader: jspb.BinaryReader): LinkWalletToAccountResponse; } export namespace LinkWalletToAccountResponse { export type AsObject = { user?: web3auth_wallet_pb.Web3User.AsObject, sessionToken: string, expiresAt: number, message: string, } } export class GetAccountStatusRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetAccountStatusRequest.AsObject; static toObject(includeInstance: boolean, msg: GetAccountStatusRequest): GetAccountStatusRequest.AsObject; static serializeBinaryToWriter(message: GetAccountStatusRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetAccountStatusRequest; static deserializeBinaryFromReader(message: GetAccountStatusRequest, reader: jspb.BinaryReader): GetAccountStatusRequest; } export namespace GetAccountStatusRequest { export type AsObject = { } } export class GetAccountStatusResponse extends jspb.Message { getUser(): web3auth_wallet_pb.Web3User | undefined; setUser(value?: web3auth_wallet_pb.Web3User): GetAccountStatusResponse; hasUser(): boolean; clearUser(): GetAccountStatusResponse; getHasEmail(): boolean; setHasEmail(value: boolean): GetAccountStatusResponse; getHasWallet(): boolean; setHasWallet(value: boolean): GetAccountStatusResponse; getIsLinkedAccount(): boolean; setIsLinkedAccount(value: boolean): GetAccountStatusResponse; getCanConnectWallet(): boolean; setCanConnectWallet(value: boolean): GetAccountStatusResponse; getCanDisconnectWallet(): boolean; setCanDisconnectWallet(value: boolean): GetAccountStatusResponse; getCanLinkEmail(): boolean; setCanLinkEmail(value: boolean): GetAccountStatusResponse; getCanUnlinkEmail(): boolean; setCanUnlinkEmail(value: boolean): GetAccountStatusResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetAccountStatusResponse.AsObject; static toObject(includeInstance: boolean, msg: GetAccountStatusResponse): GetAccountStatusResponse.AsObject; static serializeBinaryToWriter(message: GetAccountStatusResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetAccountStatusResponse; static deserializeBinaryFromReader(message: GetAccountStatusResponse, reader: jspb.BinaryReader): GetAccountStatusResponse; } export namespace GetAccountStatusResponse { export type AsObject = { user?: web3auth_wallet_pb.Web3User.AsObject, hasEmail: boolean, hasWallet: boolean, isLinkedAccount: boolean, canConnectWallet: boolean, canDisconnectWallet: boolean, canLinkEmail: boolean, canUnlinkEmail: boolean, } } export class LinkWalletToWeb2AccountRequest extends jspb.Message { getWalletAddress(): string; setWalletAddress(value: string): LinkWalletToWeb2AccountRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): LinkWalletToWeb2AccountRequest.AsObject; static toObject(includeInstance: boolean, msg: LinkWalletToWeb2AccountRequest): LinkWalletToWeb2AccountRequest.AsObject; static serializeBinaryToWriter(message: LinkWalletToWeb2AccountRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): LinkWalletToWeb2AccountRequest; static deserializeBinaryFromReader(message: LinkWalletToWeb2AccountRequest, reader: jspb.BinaryReader): LinkWalletToWeb2AccountRequest; } export namespace LinkWalletToWeb2AccountRequest { export type AsObject = { walletAddress: string, } } export class LinkWalletToWeb2AccountResponse extends jspb.Message { getUser(): web3auth_wallet_pb.Web3User | undefined; setUser(value?: web3auth_wallet_pb.Web3User): LinkWalletToWeb2AccountResponse; hasUser(): boolean; clearUser(): LinkWalletToWeb2AccountResponse; getMessage(): string; setMessage(value: string): LinkWalletToWeb2AccountResponse; getLinkingComplete(): boolean; setLinkingComplete(value: boolean): LinkWalletToWeb2AccountResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): LinkWalletToWeb2AccountResponse.AsObject; static toObject(includeInstance: boolean, msg: LinkWalletToWeb2AccountResponse): LinkWalletToWeb2AccountResponse.AsObject; static serializeBinaryToWriter(message: LinkWalletToWeb2AccountResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): LinkWalletToWeb2AccountResponse; static deserializeBinaryFromReader(message: LinkWalletToWeb2AccountResponse, reader: jspb.BinaryReader): LinkWalletToWeb2AccountResponse; } export namespace LinkWalletToWeb2AccountResponse { export type AsObject = { user?: web3auth_wallet_pb.Web3User.AsObject, message: string, linkingComplete: boolean, } } export class CheckWalletLinkingStatusRequest extends jspb.Message { getWalletAddress(): string; setWalletAddress(value: string): CheckWalletLinkingStatusRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CheckWalletLinkingStatusRequest.AsObject; static toObject(includeInstance: boolean, msg: CheckWalletLinkingStatusRequest): CheckWalletLinkingStatusRequest.AsObject; static serializeBinaryToWriter(message: CheckWalletLinkingStatusRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): CheckWalletLinkingStatusRequest; static deserializeBinaryFromReader(message: CheckWalletLinkingStatusRequest, reader: jspb.BinaryReader): CheckWalletLinkingStatusRequest; } export namespace CheckWalletLinkingStatusRequest { export type AsObject = { walletAddress: string, } } export class CheckWalletLinkingStatusResponse extends jspb.Message { getCanLink(): boolean; setCanLink(value: boolean): CheckWalletLinkingStatusResponse; getErrorMessage(): string; setErrorMessage(value: string): CheckWalletLinkingStatusResponse; getAlreadyLinked(): boolean; setAlreadyLinked(value: boolean): CheckWalletLinkingStatusResponse; getLinkedUserId(): string; setLinkedUserId(value: string): CheckWalletLinkingStatusResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CheckWalletLinkingStatusResponse.AsObject; static toObject(includeInstance: boolean, msg: CheckWalletLinkingStatusResponse): CheckWalletLinkingStatusResponse.AsObject; static serializeBinaryToWriter(message: CheckWalletLinkingStatusResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): CheckWalletLinkingStatusResponse; static deserializeBinaryFromReader(message: CheckWalletLinkingStatusResponse, reader: jspb.BinaryReader): CheckWalletLinkingStatusResponse; } export namespace CheckWalletLinkingStatusResponse { export type AsObject = { canLink: boolean, errorMessage: string, alreadyLinked: boolean, linkedUserId: string, } } export class CheckEmailLinkingStatusRequest extends jspb.Message { getEmail(): string; setEmail(value: string): CheckEmailLinkingStatusRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CheckEmailLinkingStatusRequest.AsObject; static toObject(includeInstance: boolean, msg: CheckEmailLinkingStatusRequest): CheckEmailLinkingStatusRequest.AsObject; static serializeBinaryToWriter(message: CheckEmailLinkingStatusRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): CheckEmailLinkingStatusRequest; static deserializeBinaryFromReader(message: CheckEmailLinkingStatusRequest, reader: jspb.BinaryReader): CheckEmailLinkingStatusRequest; } export namespace CheckEmailLinkingStatusRequest { export type AsObject = { email: string, } } export class CheckEmailLinkingStatusResponse extends jspb.Message { getCanLink(): boolean; setCanLink(value: boolean): CheckEmailLinkingStatusResponse; getErrorMessage(): string; setErrorMessage(value: string): CheckEmailLinkingStatusResponse; getAlreadyLinked(): boolean; setAlreadyLinked(value: boolean): CheckEmailLinkingStatusResponse; getLinkedToGoogle(): boolean; setLinkedToGoogle(value: boolean): CheckEmailLinkingStatusResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CheckEmailLinkingStatusResponse.AsObject; static toObject(includeInstance: boolean, msg: CheckEmailLinkingStatusResponse): CheckEmailLinkingStatusResponse.AsObject; static serializeBinaryToWriter(message: CheckEmailLinkingStatusResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): CheckEmailLinkingStatusResponse; static deserializeBinaryFromReader(message: CheckEmailLinkingStatusResponse, reader: jspb.BinaryReader): CheckEmailLinkingStatusResponse; } export namespace CheckEmailLinkingStatusResponse { export type AsObject = { canLink: boolean, errorMessage: string, alreadyLinked: boolean, linkedToGoogle: boolean, } } export class LinkEmailToWeb3AccountRequest extends jspb.Message { getEmail(): string; setEmail(value: string): LinkEmailToWeb3AccountRequest; getPassword(): string; setPassword(value: string): LinkEmailToWeb3AccountRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): LinkEmailToWeb3AccountRequest.AsObject; static toObject(includeInstance: boolean, msg: LinkEmailToWeb3AccountRequest): LinkEmailToWeb3AccountRequest.AsObject; static serializeBinaryToWriter(message: LinkEmailToWeb3AccountRequest, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): LinkEmailToWeb3AccountRequest; static deserializeBinaryFromReader(message: LinkEmailToWeb3AccountRequest, reader: jspb.BinaryReader): LinkEmailToWeb3AccountRequest; } export namespace LinkEmailToWeb3AccountRequest { export type AsObject = { email: string, password: string, } } export class LinkEmailToWeb3AccountResponse extends jspb.Message { getUser(): web3auth_wallet_pb.Web3User | undefined; setUser(value?: web3auth_wallet_pb.Web3User): LinkEmailToWeb3AccountResponse; hasUser(): boolean; clearUser(): LinkEmailToWeb3AccountResponse; getMessage(): string; setMessage(value: string): LinkEmailToWeb3AccountResponse; getLinkingComplete(): boolean; setLinkingComplete(value: boolean): LinkEmailToWeb3AccountResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): LinkEmailToWeb3AccountResponse.AsObject; static toObject(includeInstance: boolean, msg: LinkEmailToWeb3AccountResponse): LinkEmailToWeb3AccountResponse.AsObject; static serializeBinaryToWriter(message: LinkEmailToWeb3AccountResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): LinkEmailToWeb3AccountResponse; static deserializeBinaryFromReader(message: LinkEmailToWeb3AccountResponse, reader: jspb.BinaryReader): LinkEmailToWeb3AccountResponse; } export namespace LinkEmailToWeb3AccountResponse { export type AsObject = { user?: web3auth_wallet_pb.Web3User.AsObject, message: string, linkingComplete: boolean, } }