snowbridge_outbound_queue_v2_runtime_api/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
3
4//! Ethereum Outbound Queue V2 Runtime API
5//!
6//! * `prove_message`: Generate a merkle proof for a committed message
7
8#![cfg_attr(not(feature = "std"), no_std)]
9use frame_support::traits::tokens::Balance as BalanceT;
10use snowbridge_merkle_tree::MerkleProof;
11
12sp_api::decl_runtime_apis! {
13 pub trait OutboundQueueV2Api<Balance> where Balance: BalanceT
14 {
15 /// Generate a merkle proof for a committed message identified by `leaf_index`.
16 fn prove_message(leaf_index: u64) -> Option<MerkleProof>;
17 }
18}