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.
153 lines • 9.52 kB
JavaScript
"use strict";
/**
* @fileoverview gRPC-Web generated client stub for web3auth
* @enhanceable
* @public
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Web3AuthServiceClient = void 0;
// Code generated by protoc-gen-grpc-web. DO NOT EDIT.
// versions:
// protoc-gen-grpc-web v1.5.0
// protoc v3.19.1
// source: web3auth/service.proto
/* eslint-disable */
// @ts-nocheck
const grpcWeb = __importStar(require("grpc-web"));
const web3auth_service_pb = __importStar(require("./service_pb")); // proto import: "web3auth/service.proto"
class Web3AuthServiceClient {
constructor(hostname, credentials, options) {
this.methodDescriptorGetChallenge = new grpcWeb.MethodDescriptor('/web3auth.Web3AuthService/GetChallenge', grpcWeb.MethodType.UNARY, web3auth_service_pb.GetChallengeRequest, web3auth_service_pb.GetChallengeResponse, (request) => {
return request.serializeBinary();
}, web3auth_service_pb.GetChallengeResponse.deserializeBinary);
this.methodDescriptorAuthWithSignature = new grpcWeb.MethodDescriptor('/web3auth.Web3AuthService/AuthWithSignature', grpcWeb.MethodType.UNARY, web3auth_service_pb.AuthWithSignatureRequest, web3auth_service_pb.AuthWithSignatureResponse, (request) => {
return request.serializeBinary();
}, web3auth_service_pb.AuthWithSignatureResponse.deserializeBinary);
this.methodDescriptorAuthWithProof = new grpcWeb.MethodDescriptor('/web3auth.Web3AuthService/AuthWithProof', grpcWeb.MethodType.UNARY, web3auth_service_pb.AuthWithProofRequest, web3auth_service_pb.AuthWithProofResponse, (request) => {
return request.serializeBinary();
}, web3auth_service_pb.AuthWithProofResponse.deserializeBinary);
this.methodDescriptorLinkWalletToWeb2Account = new grpcWeb.MethodDescriptor('/web3auth.Web3AuthService/LinkWalletToWeb2Account', grpcWeb.MethodType.UNARY, web3auth_service_pb.LinkWalletToWeb2AccountRequest, web3auth_service_pb.LinkWalletToWeb2AccountResponse, (request) => {
return request.serializeBinary();
}, web3auth_service_pb.LinkWalletToWeb2AccountResponse.deserializeBinary);
this.methodDescriptorCheckWalletLinkingStatus = new grpcWeb.MethodDescriptor('/web3auth.Web3AuthService/CheckWalletLinkingStatus', grpcWeb.MethodType.UNARY, web3auth_service_pb.CheckWalletLinkingStatusRequest, web3auth_service_pb.CheckWalletLinkingStatusResponse, (request) => {
return request.serializeBinary();
}, web3auth_service_pb.CheckWalletLinkingStatusResponse.deserializeBinary);
this.methodDescriptorCheckEmailLinkingStatus = new grpcWeb.MethodDescriptor('/web3auth.Web3AuthService/CheckEmailLinkingStatus', grpcWeb.MethodType.UNARY, web3auth_service_pb.CheckEmailLinkingStatusRequest, web3auth_service_pb.CheckEmailLinkingStatusResponse, (request) => {
return request.serializeBinary();
}, web3auth_service_pb.CheckEmailLinkingStatusResponse.deserializeBinary);
this.methodDescriptorLinkEmailToWeb3Account = new grpcWeb.MethodDescriptor('/web3auth.Web3AuthService/LinkEmailToWeb3Account', grpcWeb.MethodType.UNARY, web3auth_service_pb.LinkEmailToWeb3AccountRequest, web3auth_service_pb.LinkEmailToWeb3AccountResponse, (request) => {
return request.serializeBinary();
}, web3auth_service_pb.LinkEmailToWeb3AccountResponse.deserializeBinary);
this.methodDescriptorGetAccountStatus = new grpcWeb.MethodDescriptor('/web3auth.Web3AuthService/GetAccountStatus', grpcWeb.MethodType.UNARY, web3auth_service_pb.GetAccountStatusRequest, web3auth_service_pb.GetAccountStatusResponse, (request) => {
return request.serializeBinary();
}, web3auth_service_pb.GetAccountStatusResponse.deserializeBinary);
if (!options)
options = {};
if (!credentials)
credentials = {};
options['format'] = 'text';
this.client_ = new grpcWeb.GrpcWebClientBase(options);
this.hostname_ = hostname.replace(/\/+$/, '');
this.credentials_ = credentials;
this.options_ = options;
}
getChallenge(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/web3auth.Web3AuthService/GetChallenge', request, metadata || {}, this.methodDescriptorGetChallenge, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/web3auth.Web3AuthService/GetChallenge', request, metadata || {}, this.methodDescriptorGetChallenge);
}
authWithSignature(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/web3auth.Web3AuthService/AuthWithSignature', request, metadata || {}, this.methodDescriptorAuthWithSignature, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/web3auth.Web3AuthService/AuthWithSignature', request, metadata || {}, this.methodDescriptorAuthWithSignature);
}
authWithProof(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/web3auth.Web3AuthService/AuthWithProof', request, metadata || {}, this.methodDescriptorAuthWithProof, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/web3auth.Web3AuthService/AuthWithProof', request, metadata || {}, this.methodDescriptorAuthWithProof);
}
linkWalletToWeb2Account(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/web3auth.Web3AuthService/LinkWalletToWeb2Account', request, metadata || {}, this.methodDescriptorLinkWalletToWeb2Account, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/web3auth.Web3AuthService/LinkWalletToWeb2Account', request, metadata || {}, this.methodDescriptorLinkWalletToWeb2Account);
}
checkWalletLinkingStatus(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/web3auth.Web3AuthService/CheckWalletLinkingStatus', request, metadata || {}, this.methodDescriptorCheckWalletLinkingStatus, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/web3auth.Web3AuthService/CheckWalletLinkingStatus', request, metadata || {}, this.methodDescriptorCheckWalletLinkingStatus);
}
checkEmailLinkingStatus(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/web3auth.Web3AuthService/CheckEmailLinkingStatus', request, metadata || {}, this.methodDescriptorCheckEmailLinkingStatus, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/web3auth.Web3AuthService/CheckEmailLinkingStatus', request, metadata || {}, this.methodDescriptorCheckEmailLinkingStatus);
}
linkEmailToWeb3Account(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/web3auth.Web3AuthService/LinkEmailToWeb3Account', request, metadata || {}, this.methodDescriptorLinkEmailToWeb3Account, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/web3auth.Web3AuthService/LinkEmailToWeb3Account', request, metadata || {}, this.methodDescriptorLinkEmailToWeb3Account);
}
getAccountStatus(request, metadata, callback) {
if (callback !== undefined) {
return this.client_.rpcCall(this.hostname_ +
'/web3auth.Web3AuthService/GetAccountStatus', request, metadata || {}, this.methodDescriptorGetAccountStatus, callback);
}
return this.client_.unaryCall(this.hostname_ +
'/web3auth.Web3AuthService/GetAccountStatus', request, metadata || {}, this.methodDescriptorGetAccountStatus);
}
}
exports.Web3AuthServiceClient = Web3AuthServiceClient;
//# sourceMappingURL=ServiceServiceClientPb.js.map