feat: initialize Kurdistan SDK - independent fork of Polkadot SDK

This commit is contained in:
2025-12-13 15:44:15 +03:00
commit 286de54384
6841 changed files with 1848356 additions and 0 deletions
@@ -0,0 +1,46 @@
[package]
name = "snowbridge-outbound-queue-runtime-api"
description = "Snowbridge Outbound Queue Runtime API"
version = "0.2.0"
authors = ["Snowfork <contact@snowfork.com>"]
edition.workspace = true
repository.workspace = true
license = "Apache-2.0"
categories = ["cryptography::cryptocurrencies"]
[lints]
workspace = true
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[package.metadata.pezkuwi-sdk]
exclude-from-umbrella = true
[dependencies]
codec = { features = ["derive"], workspace = true }
frame-support = { workspace = true }
snowbridge-core = { workspace = true }
snowbridge-merkle-tree = { workspace = true }
snowbridge-outbound-queue-primitives = { workspace = true }
sp-api = { workspace = true }
sp-std = { workspace = true }
[features]
default = ["std"]
std = [
"codec/std",
"frame-support/std",
"snowbridge-core/std",
"snowbridge-merkle-tree/std",
"snowbridge-outbound-queue-primitives/std",
"sp-api/std",
"sp-std/std",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"snowbridge-core/runtime-benchmarks",
"snowbridge-merkle-tree/runtime-benchmarks",
"snowbridge-outbound-queue-primitives/runtime-benchmarks",
"sp-api/runtime-benchmarks",
]
@@ -0,0 +1,6 @@
# Ethereum Outbound Queue Runtime API
Provides an API:
- to generate merkle proofs for outbound messages
- calculate delivery fee for delivering messages to Ethereum
@@ -0,0 +1,21 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
#![cfg_attr(not(feature = "std"), no_std)]
use frame_support::traits::tokens::Balance as BalanceT;
use snowbridge_core::PricingParameters;
use snowbridge_merkle_tree::MerkleProof;
use snowbridge_outbound_queue_primitives::v1::{Command, Fee};
sp_api::decl_runtime_apis! {
pub trait OutboundQueueApi<Balance> where Balance: BalanceT
{
/// Generate a merkle proof for a committed message identified by `leaf_index`.
/// The merkle root is stored in the block header as a
/// `sp_runtime::generic::DigestItem::Other`
fn prove_message(leaf_index: u64) -> Option<MerkleProof>;
/// Calculate the delivery fee for `command`
fn calculate_fee(command: Command, parameters: Option<PricingParameters<Balance>>) -> Fee<Balance>;
}
}