rosetta-sdk-typescript
Version:
Typescript SDK to create and interact with Rosetta API implementations.
95 lines (94 loc) • 8.59 kB
TypeScript
/**
* Rosetta
* Build Once. Integrate Your Blockchain Everywhere.
*
* The version of the OpenAPI document: 1.4.10
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { CallRequest, CallResponse } from '../models';
import * as runtime from '../runtime';
export interface CallOperationRequest {
callRequest: CallRequest;
}
/**
* CallApi - controller interface for the server side implementation.
*
* @export
* @interface CallApiController
*/
export declare class CallApiController<Req extends {
body: any;
} = {
body: any;
}> {
private readonly service;
/**
*
* @param service - The service that implements
*/
constructor(service: CallApiService);
/**
* Call invokes an arbitrary, network-specific procedure call with network-specific parameters. The guidance for what this endpoint should or could do is purposely left vague. In Ethereum, this could be used to invoke `eth_call` to implement an entire Rosetta API interface for some smart contract that is not parsed by the implementation creator (like a DEX). This endpoint could also be used to provide access to data that does not map to any Rosetta models instead of requiring an integrator to use some network-specific SDK and call some network-specific endpoint (like surfacing staking parameters). Call is NOT a replacement for implementing Rosetta API endpoints or mapping network-specific data to Rosetta models. Rather, it enables developers to build additional Rosetta API interfaces for things they care about without introducing complexity into a base-level Rosetta implementation. Simply put, imagine that the average integrator will use layered Rosetta API implementations that each surfaces unique data.
* Make a Network-Specific Procedure Call
*
* @param req - The request object, where the body is a CallRequest
*/
call(req: Req): Promise<any>;
}
/**
* CallApi - service interface for the server side implementation.
*
*
* @export
* @interface CallApiService
*/
export interface CallApiService {
/**
* Call invokes an arbitrary, network-specific procedure call with network-specific parameters. The guidance for what this endpoint should or could do is purposely left vague. In Ethereum, this could be used to invoke `eth_call` to implement an entire Rosetta API interface for some smart contract that is not parsed by the implementation creator (like a DEX). This endpoint could also be used to provide access to data that does not map to any Rosetta models instead of requiring an integrator to use some network-specific SDK and call some network-specific endpoint (like surfacing staking parameters). Call is NOT a replacement for implementing Rosetta API endpoints or mapping network-specific data to Rosetta models. Rather, it enables developers to build additional Rosetta API interfaces for things they care about without introducing complexity into a base-level Rosetta implementation. Simply put, imagine that the average integrator will use layered Rosetta API implementations that each surfaces unique data.
* Make a Network-Specific Procedure Call
*
* requestParameters - the body of the RPC style request.
*/
call(requestParameters: CallRequest): Promise<CallResponse>;
}
/**
* CallApi - interface
*
* @export
* @interface CallApiInterface
*/
export interface CallApiInterface {
/**
* Call invokes an arbitrary, network-specific procedure call with network-specific parameters. The guidance for what this endpoint should or could do is purposely left vague. In Ethereum, this could be used to invoke `eth_call` to implement an entire Rosetta API interface for some smart contract that is not parsed by the implementation creator (like a DEX). This endpoint could also be used to provide access to data that does not map to any Rosetta models instead of requiring an integrator to use some network-specific SDK and call some network-specific endpoint (like surfacing staking parameters). Call is NOT a replacement for implementing Rosetta API endpoints or mapping network-specific data to Rosetta models. Rather, it enables developers to build additional Rosetta API interfaces for things they care about without introducing complexity into a base-level Rosetta implementation. Simply put, imagine that the average integrator will use layered Rosetta API implementations that each surfaces unique data.
* @summary Make a Network-Specific Procedure Call
* @param {CallRequest} callRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CallApiInterface
*/
callRaw(requestParameters: CallOperationRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<CallResponse>>;
/**
* Call invokes an arbitrary, network-specific procedure call with network-specific parameters. The guidance for what this endpoint should or could do is purposely left vague. In Ethereum, this could be used to invoke `eth_call` to implement an entire Rosetta API interface for some smart contract that is not parsed by the implementation creator (like a DEX). This endpoint could also be used to provide access to data that does not map to any Rosetta models instead of requiring an integrator to use some network-specific SDK and call some network-specific endpoint (like surfacing staking parameters). Call is NOT a replacement for implementing Rosetta API endpoints or mapping network-specific data to Rosetta models. Rather, it enables developers to build additional Rosetta API interfaces for things they care about without introducing complexity into a base-level Rosetta implementation. Simply put, imagine that the average integrator will use layered Rosetta API implementations that each surfaces unique data.
* Make a Network-Specific Procedure Call
*/
call(requestParameters: CallOperationRequest, initOverrides?: RequestInit): Promise<CallResponse>;
}
/**
*
*/
export declare class CallApi extends runtime.BaseAPI implements CallApiInterface {
/**
* Call invokes an arbitrary, network-specific procedure call with network-specific parameters. The guidance for what this endpoint should or could do is purposely left vague. In Ethereum, this could be used to invoke `eth_call` to implement an entire Rosetta API interface for some smart contract that is not parsed by the implementation creator (like a DEX). This endpoint could also be used to provide access to data that does not map to any Rosetta models instead of requiring an integrator to use some network-specific SDK and call some network-specific endpoint (like surfacing staking parameters). Call is NOT a replacement for implementing Rosetta API endpoints or mapping network-specific data to Rosetta models. Rather, it enables developers to build additional Rosetta API interfaces for things they care about without introducing complexity into a base-level Rosetta implementation. Simply put, imagine that the average integrator will use layered Rosetta API implementations that each surfaces unique data.
* Make a Network-Specific Procedure Call
*/
callRaw(requestParameters: CallOperationRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<CallResponse>>;
/**
* Call invokes an arbitrary, network-specific procedure call with network-specific parameters. The guidance for what this endpoint should or could do is purposely left vague. In Ethereum, this could be used to invoke `eth_call` to implement an entire Rosetta API interface for some smart contract that is not parsed by the implementation creator (like a DEX). This endpoint could also be used to provide access to data that does not map to any Rosetta models instead of requiring an integrator to use some network-specific SDK and call some network-specific endpoint (like surfacing staking parameters). Call is NOT a replacement for implementing Rosetta API endpoints or mapping network-specific data to Rosetta models. Rather, it enables developers to build additional Rosetta API interfaces for things they care about without introducing complexity into a base-level Rosetta implementation. Simply put, imagine that the average integrator will use layered Rosetta API implementations that each surfaces unique data.
* Make a Network-Specific Procedure Call
*/
call(requestParameters: CallOperationRequest, initOverrides?: RequestInit): Promise<CallResponse>;
}