sui_json_rpc_api/
bridge.rs

1// Copyright (c) Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4use jsonrpsee::core::RpcResult;
5use jsonrpsee::proc_macros::rpc;
6
7use sui_open_rpc_macros::open_rpc;
8use sui_types::bridge::BridgeSummary;
9
10#[open_rpc(namespace = "suix", tag = "Bridge Read API")]
11#[rpc(server, client, namespace = "suix")]
12pub trait BridgeReadApi {
13    /// Returns the latest BridgeSummary
14    #[method(name = "getLatestBridge")]
15    async fn get_latest_bridge(&self) -> RpcResult<BridgeSummary>;
16
17    /// Returns the initial shared version of the bridge object, usually
18    /// for the purpose of constructing an ObjectArg in a transaction.
19    #[method(name = "getBridgeObjectInitialSharedVersion")]
20    async fn get_bridge_object_initial_shared_version(&self) -> RpcResult<u64>;
21}