@mysten/sui
Version:
Sui TypeScript API
218 lines (216 loc) • 7.55 kB
text/typescript
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
// @generated by protobuf-ts 2.9.6 with parameter force_server_none,optimize_code_size,ts_nocheck
// @generated from protobuf file "sui/rpc/v2/ledger_service.proto" (package "sui.rpc.v2", syntax proto3)
// tslint:disable
// @ts-nocheck
//
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//
import type { RpcTransport } from '@protobuf-ts/runtime-rpc';
import type { ServiceInfo } from '@protobuf-ts/runtime-rpc';
import { LedgerService } from './ledger_service.js';
import type { GetEpochResponse } from './ledger_service.js';
import type { GetEpochRequest } from './ledger_service.js';
import type { GetCheckpointResponse } from './ledger_service.js';
import type { GetCheckpointRequest } from './ledger_service.js';
import type { BatchGetTransactionsResponse } from './ledger_service.js';
import type { BatchGetTransactionsRequest } from './ledger_service.js';
import type { GetTransactionResponse } from './ledger_service.js';
import type { GetTransactionRequest } from './ledger_service.js';
import type { BatchGetObjectsResponse } from './ledger_service.js';
import type { BatchGetObjectsRequest } from './ledger_service.js';
import type { GetObjectResponse } from './ledger_service.js';
import type { GetObjectRequest } from './ledger_service.js';
import { stackIntercept } from '@protobuf-ts/runtime-rpc';
import type { GetServiceInfoResponse } from './ledger_service.js';
import type { GetServiceInfoRequest } from './ledger_service.js';
import type { UnaryCall } from '@protobuf-ts/runtime-rpc';
import type { RpcOptions } from '@protobuf-ts/runtime-rpc';
/**
* @generated from protobuf service sui.rpc.v2.LedgerService
*/
export interface ILedgerServiceClient {
/**
* Query the service for general information about its current state.
*
* @generated from protobuf rpc: GetServiceInfo(sui.rpc.v2.GetServiceInfoRequest) returns (sui.rpc.v2.GetServiceInfoResponse);
*/
getServiceInfo(
input: GetServiceInfoRequest,
options?: RpcOptions,
): UnaryCall<GetServiceInfoRequest, GetServiceInfoResponse>;
/**
* @generated from protobuf rpc: GetObject(sui.rpc.v2.GetObjectRequest) returns (sui.rpc.v2.GetObjectResponse);
*/
getObject(
input: GetObjectRequest,
options?: RpcOptions,
): UnaryCall<GetObjectRequest, GetObjectResponse>;
/**
* @generated from protobuf rpc: BatchGetObjects(sui.rpc.v2.BatchGetObjectsRequest) returns (sui.rpc.v2.BatchGetObjectsResponse);
*/
batchGetObjects(
input: BatchGetObjectsRequest,
options?: RpcOptions,
): UnaryCall<BatchGetObjectsRequest, BatchGetObjectsResponse>;
/**
* @generated from protobuf rpc: GetTransaction(sui.rpc.v2.GetTransactionRequest) returns (sui.rpc.v2.GetTransactionResponse);
*/
getTransaction(
input: GetTransactionRequest,
options?: RpcOptions,
): UnaryCall<GetTransactionRequest, GetTransactionResponse>;
/**
* @generated from protobuf rpc: BatchGetTransactions(sui.rpc.v2.BatchGetTransactionsRequest) returns (sui.rpc.v2.BatchGetTransactionsResponse);
*/
batchGetTransactions(
input: BatchGetTransactionsRequest,
options?: RpcOptions,
): UnaryCall<BatchGetTransactionsRequest, BatchGetTransactionsResponse>;
/**
* @generated from protobuf rpc: GetCheckpoint(sui.rpc.v2.GetCheckpointRequest) returns (sui.rpc.v2.GetCheckpointResponse);
*/
getCheckpoint(
input: GetCheckpointRequest,
options?: RpcOptions,
): UnaryCall<GetCheckpointRequest, GetCheckpointResponse>;
/**
* @generated from protobuf rpc: GetEpoch(sui.rpc.v2.GetEpochRequest) returns (sui.rpc.v2.GetEpochResponse);
*/
getEpoch(
input: GetEpochRequest,
options?: RpcOptions,
): UnaryCall<GetEpochRequest, GetEpochResponse>;
}
/**
* @generated from protobuf service sui.rpc.v2.LedgerService
*/
export class LedgerServiceClient implements ILedgerServiceClient, ServiceInfo {
typeName = LedgerService.typeName;
methods = LedgerService.methods;
options = LedgerService.options;
constructor(private readonly _transport: RpcTransport) {}
/**
* Query the service for general information about its current state.
*
* @generated from protobuf rpc: GetServiceInfo(sui.rpc.v2.GetServiceInfoRequest) returns (sui.rpc.v2.GetServiceInfoResponse);
*/
getServiceInfo(
input: GetServiceInfoRequest,
options?: RpcOptions,
): UnaryCall<GetServiceInfoRequest, GetServiceInfoResponse> {
const method = this.methods[0],
opt = this._transport.mergeOptions(options);
return stackIntercept<GetServiceInfoRequest, GetServiceInfoResponse>(
'unary',
this._transport,
method,
opt,
input,
);
}
/**
* @generated from protobuf rpc: GetObject(sui.rpc.v2.GetObjectRequest) returns (sui.rpc.v2.GetObjectResponse);
*/
getObject(
input: GetObjectRequest,
options?: RpcOptions,
): UnaryCall<GetObjectRequest, GetObjectResponse> {
const method = this.methods[1],
opt = this._transport.mergeOptions(options);
return stackIntercept<GetObjectRequest, GetObjectResponse>(
'unary',
this._transport,
method,
opt,
input,
);
}
/**
* @generated from protobuf rpc: BatchGetObjects(sui.rpc.v2.BatchGetObjectsRequest) returns (sui.rpc.v2.BatchGetObjectsResponse);
*/
batchGetObjects(
input: BatchGetObjectsRequest,
options?: RpcOptions,
): UnaryCall<BatchGetObjectsRequest, BatchGetObjectsResponse> {
const method = this.methods[2],
opt = this._transport.mergeOptions(options);
return stackIntercept<BatchGetObjectsRequest, BatchGetObjectsResponse>(
'unary',
this._transport,
method,
opt,
input,
);
}
/**
* @generated from protobuf rpc: GetTransaction(sui.rpc.v2.GetTransactionRequest) returns (sui.rpc.v2.GetTransactionResponse);
*/
getTransaction(
input: GetTransactionRequest,
options?: RpcOptions,
): UnaryCall<GetTransactionRequest, GetTransactionResponse> {
const method = this.methods[3],
opt = this._transport.mergeOptions(options);
return stackIntercept<GetTransactionRequest, GetTransactionResponse>(
'unary',
this._transport,
method,
opt,
input,
);
}
/**
* @generated from protobuf rpc: BatchGetTransactions(sui.rpc.v2.BatchGetTransactionsRequest) returns (sui.rpc.v2.BatchGetTransactionsResponse);
*/
batchGetTransactions(
input: BatchGetTransactionsRequest,
options?: RpcOptions,
): UnaryCall<BatchGetTransactionsRequest, BatchGetTransactionsResponse> {
const method = this.methods[4],
opt = this._transport.mergeOptions(options);
return stackIntercept<BatchGetTransactionsRequest, BatchGetTransactionsResponse>(
'unary',
this._transport,
method,
opt,
input,
);
}
/**
* @generated from protobuf rpc: GetCheckpoint(sui.rpc.v2.GetCheckpointRequest) returns (sui.rpc.v2.GetCheckpointResponse);
*/
getCheckpoint(
input: GetCheckpointRequest,
options?: RpcOptions,
): UnaryCall<GetCheckpointRequest, GetCheckpointResponse> {
const method = this.methods[5],
opt = this._transport.mergeOptions(options);
return stackIntercept<GetCheckpointRequest, GetCheckpointResponse>(
'unary',
this._transport,
method,
opt,
input,
);
}
/**
* @generated from protobuf rpc: GetEpoch(sui.rpc.v2.GetEpochRequest) returns (sui.rpc.v2.GetEpochResponse);
*/
getEpoch(
input: GetEpochRequest,
options?: RpcOptions,
): UnaryCall<GetEpochRequest, GetEpochResponse> {
const method = this.methods[6],
opt = this._transport.mergeOptions(options);
return stackIntercept<GetEpochRequest, GetEpochResponse>(
'unary',
this._transport,
method,
opt,
input,
);
}
}