/******************************************************************************* * (c) 2023 unipackage * * Licensed under either the MIT License (the "MIT License") or the Apache License, Version 2.0 * (the "Apache License"). You may not use this file except in compliance with one of these * licenses. You may obtain a copy of the MIT License at * * https://opensource.org/licenses/MIT * * Or the Apache License, Version 2.0 at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the MIT License or the Apache License for the specific language governing permissions and * limitations under the respective licenses. ********************************************************************************/ import { RPCResponse, FilecoinRPCEngine } from "@unipackage/net"; import { Message } from "../../../basic/message/types"; import { BlockMessages } from "../../../basic/block/types"; import { Tipset } from "../../../basic/tipset/types"; import { CidProperty } from "../../../basic/cid/types"; /** * Interface representing the RPC methods for the Filecoin chain. */ interface ChainFilecoinOriginRPC { ChainHead(): Promise>; ChainGetTipSetByHeight(height: number, cids: Array): Promise>; ChainGetBlockMessages(...params: any[]): Promise>; StateReplay(...params: any[]): Promise>; EthGetTransactionHashByCid(cid: CidProperty): Promise>; } /** * Decorator to add request methods to the ChainFilecoinOriginRPC class. */ declare class ChainFilecoinOriginRPC extends FilecoinRPCEngine { } /** * Extended class with additional methods and modifications for handling Filecoin chain RPC. */ export declare class ChainFilecoinRPC extends ChainFilecoinOriginRPC { /** * Retrieves chain head tipset * @returns A promise resolving to the RPC response containing tipset. */ ChainHead(): Promise>; /** * Retrieves chain head tipset * @param height- The .height * @returns A promise resolving to the RPC response containing tipset. */ ChainGetTipSetByHeight(height: number, cids: Array): Promise>; /** * Retrieves block messages for a given tipset and block CID. * @param tipset - The tipset. * @param blockCid - The CID of the block. * @returns A promise resolving to the RPC response containing block messages. */ ChainGetBlockMessages(tipset: Tipset, blockCid: CidProperty): Promise>; /** * Replays a state for a given tipset and message CID. * @param tipset - The tipset. * @param msgCid - The CID of the message. * @returns A promise resolving to the RPC response containing the replayed message. */ StateReplay(tipset: Tipset, msgCid: CidProperty): Promise>; /** * Retrieves the Ethereum transaction hash by CID (Content Identifier). * @param cid The CID (Content Identifier) property. * @returns {Promise>} A Promise resolving to RPCResponse containing the Ethereum transaction hash. */ EthGetTransactionHashByCid(cid: CidProperty): Promise>; } export {}; //# sourceMappingURL=index.d.ts.map