// package: injective_referral_rpc // file: referral-api/injective_referral_rpc.proto import * as referral_api_injective_referral_rpc_pb from "../referral-api/injective_referral_rpc_pb"; import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; import {grpc} from "@improbable-eng/grpc-web"; type InjectiveReferralRPCRefer = { readonly methodName: string; readonly service: typeof InjectiveReferralRPC; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof referral_api_injective_referral_rpc_pb.ReferReq; readonly responseType: typeof google_protobuf_empty_pb.Empty; }; type InjectiveReferralRPCGetFeeRecipient = { readonly methodName: string; readonly service: typeof InjectiveReferralRPC; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof referral_api_injective_referral_rpc_pb.GetFeeRecipientReq; readonly responseType: typeof referral_api_injective_referral_rpc_pb.GetFeeRecipientResp; }; type InjectiveReferralRPCGetReferralInfo = { readonly methodName: string; readonly service: typeof InjectiveReferralRPC; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof referral_api_injective_referral_rpc_pb.GetReferralInfoReq; readonly responseType: typeof referral_api_injective_referral_rpc_pb.GetReferralInfoResp; }; type InjectiveReferralRPCClaimCommissions = { readonly methodName: string; readonly service: typeof InjectiveReferralRPC; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof referral_api_injective_referral_rpc_pb.ClaimCommissionsReq; readonly responseType: typeof google_protobuf_empty_pb.Empty; }; type InjectiveReferralRPCListReferees = { readonly methodName: string; readonly service: typeof InjectiveReferralRPC; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof referral_api_injective_referral_rpc_pb.ListRefereesReq; readonly responseType: typeof referral_api_injective_referral_rpc_pb.ListRefereesResp; }; type InjectiveReferralRPCListReferrers = { readonly methodName: string; readonly service: typeof InjectiveReferralRPC; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof referral_api_injective_referral_rpc_pb.ListReferrersReq; readonly responseType: typeof referral_api_injective_referral_rpc_pb.ListReferrersResp; }; type InjectiveReferralRPCAddReferrer = { readonly methodName: string; readonly service: typeof InjectiveReferralRPC; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof referral_api_injective_referral_rpc_pb.AddReferrerReq; readonly responseType: typeof referral_api_injective_referral_rpc_pb.AddReferrerResp; }; type InjectiveReferralRPCUpdateReferrer = { readonly methodName: string; readonly service: typeof InjectiveReferralRPC; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof referral_api_injective_referral_rpc_pb.UpdateReferrerReq; readonly responseType: typeof google_protobuf_empty_pb.Empty; }; export class InjectiveReferralRPC { static readonly serviceName: string; static readonly Refer: InjectiveReferralRPCRefer; static readonly GetFeeRecipient: InjectiveReferralRPCGetFeeRecipient; static readonly GetReferralInfo: InjectiveReferralRPCGetReferralInfo; static readonly ClaimCommissions: InjectiveReferralRPCClaimCommissions; static readonly ListReferees: InjectiveReferralRPCListReferees; static readonly ListReferrers: InjectiveReferralRPCListReferrers; static readonly AddReferrer: InjectiveReferralRPCAddReferrer; static readonly UpdateReferrer: InjectiveReferralRPCUpdateReferrer; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } export type Status = { details: string, code: number; metadata: grpc.Metadata } interface UnaryResponse { cancel(): void; } interface ResponseStream { cancel(): void; on(type: 'data', handler: (message: T) => void): ResponseStream; on(type: 'end', handler: (status?: Status) => void): ResponseStream; on(type: 'status', handler: (status: Status) => void): ResponseStream; } interface RequestStream { write(message: T): RequestStream; end(): void; cancel(): void; on(type: 'end', handler: (status?: Status) => void): RequestStream; on(type: 'status', handler: (status: Status) => void): RequestStream; } interface BidirectionalStream { write(message: ReqT): BidirectionalStream; end(): void; cancel(): void; on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; on(type: 'status', handler: (status: Status) => void): BidirectionalStream; } export class InjectiveReferralRPCClient { readonly serviceHost: string; constructor(serviceHost: string, options?: grpc.RpcOptions); refer( requestMessage: referral_api_injective_referral_rpc_pb.ReferReq, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): UnaryResponse; refer( requestMessage: referral_api_injective_referral_rpc_pb.ReferReq, callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): UnaryResponse; getFeeRecipient( requestMessage: referral_api_injective_referral_rpc_pb.GetFeeRecipientReq, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: referral_api_injective_referral_rpc_pb.GetFeeRecipientResp|null) => void ): UnaryResponse; getFeeRecipient( requestMessage: referral_api_injective_referral_rpc_pb.GetFeeRecipientReq, callback: (error: ServiceError|null, responseMessage: referral_api_injective_referral_rpc_pb.GetFeeRecipientResp|null) => void ): UnaryResponse; getReferralInfo( requestMessage: referral_api_injective_referral_rpc_pb.GetReferralInfoReq, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: referral_api_injective_referral_rpc_pb.GetReferralInfoResp|null) => void ): UnaryResponse; getReferralInfo( requestMessage: referral_api_injective_referral_rpc_pb.GetReferralInfoReq, callback: (error: ServiceError|null, responseMessage: referral_api_injective_referral_rpc_pb.GetReferralInfoResp|null) => void ): UnaryResponse; claimCommissions( requestMessage: referral_api_injective_referral_rpc_pb.ClaimCommissionsReq, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): UnaryResponse; claimCommissions( requestMessage: referral_api_injective_referral_rpc_pb.ClaimCommissionsReq, callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): UnaryResponse; listReferees( requestMessage: referral_api_injective_referral_rpc_pb.ListRefereesReq, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: referral_api_injective_referral_rpc_pb.ListRefereesResp|null) => void ): UnaryResponse; listReferees( requestMessage: referral_api_injective_referral_rpc_pb.ListRefereesReq, callback: (error: ServiceError|null, responseMessage: referral_api_injective_referral_rpc_pb.ListRefereesResp|null) => void ): UnaryResponse; listReferrers( requestMessage: referral_api_injective_referral_rpc_pb.ListReferrersReq, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: referral_api_injective_referral_rpc_pb.ListReferrersResp|null) => void ): UnaryResponse; listReferrers( requestMessage: referral_api_injective_referral_rpc_pb.ListReferrersReq, callback: (error: ServiceError|null, responseMessage: referral_api_injective_referral_rpc_pb.ListReferrersResp|null) => void ): UnaryResponse; addReferrer( requestMessage: referral_api_injective_referral_rpc_pb.AddReferrerReq, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: referral_api_injective_referral_rpc_pb.AddReferrerResp|null) => void ): UnaryResponse; addReferrer( requestMessage: referral_api_injective_referral_rpc_pb.AddReferrerReq, callback: (error: ServiceError|null, responseMessage: referral_api_injective_referral_rpc_pb.AddReferrerResp|null) => void ): UnaryResponse; updateReferrer( requestMessage: referral_api_injective_referral_rpc_pb.UpdateReferrerReq, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): UnaryResponse; updateReferrer( requestMessage: referral_api_injective_referral_rpc_pb.UpdateReferrerReq, callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void ): UnaryResponse; }