pezkuwi-sdk

Crates.iopezkuwi-sdk
lib.rspezkuwi-sdk
version0.1.2
created_at2026-01-01 18:02:29.42519+00
updated_at2026-01-02 08:59:36.977221+00
descriptionPezkuwi SDK umbrella crate - Kurdish blockchain SDK.
homepagehttps://pezkuwichain.io/
repositoryhttps://github.com/pezkuwichain/pezkuwi-sdk.git
max_upload_size
id2016668
size727,278
(SatoshiQaziMuhammed)

documentation

README

SDK Logo SDK Logo

pezkuwi-sdk

StackExchange

pezkuwi-sdk is an umbrella crate for the PezkuwiChain SDK, in the sense that it is an "umbrella" that encompasses other components. More specifically, it re-exports all the crates that are needed by builders.

pezkuwi-sdk aims to be the entry to the PezkuwiChain and Bizinikiwi ecosystem and make the SDK more approachable—the entire development environment made available with one dependency. More importantly, it guarantees the compatible combination of crate versions. So even if you know exactly which crates to use, you may still benefit from using pezkuwi-sdk for painless dependency updates.

You may have seen another umbrella crate named pezkuwi-sdk-frame, also known as the FRAME umbrella crate. For clarification, while pezkuwi-sdk aims to ease dependency management, pezkuwi-sdk-frame intends to simplify FRAME pezpallet implementation, as demonstrated in the example below.

💻 Usage

The re-exported crates are grouped under the following feature sets.

  • node: Anything that you need to build a node
  • runtime: Most things that you need to build a runtime
  • runtime-full: Also the extended runtime features that are sometimes needed
🏋️ Power User Features
  • experimental
  • runtime-benchmarks
  • serde
  • tuples-96
  • try-runtime
  • with-tracing

The power user features are meant to use alongside node, runtime, or runtime-full for extra development support. For example, if the runtime relies on serde for serialization, and needs tracing and benchmarking for debugging and profiling, the Cargo.toml may contain the following.

[dependencies]
pezkuwi-sdk = { version = "0.12.0", features = ["runtime", "serde"], default-features = false }

[features]
runtime-benchmarks = ["pezkuwi-sdk/runtime-benchmarks"]
with-tracing = ["pezkuwi-sdk/with-tracing"]
cargo build --features "runtime-benchmarks,with-tracing"

Bizinikiwi's try-runtime is an essential tool for testing runtime protocol upgrades locally, which can be enabled with the try-runtime feature.

[dependencies]
pezkuwi-sdk = { version = "0.12.0", features = ["runtime"], default-features = false }

[features]
try-runtime = ["pezkuwi-sdk/try-runtime"]
cargo build --features "try-runtime"

In Bizinikiwi, a runtime can be seen as a tuple of various pallets. Since the number of pallets can vary and there is no way to anticipate it, we have to generate impl-trait for tuples of different sizes upfront, from 0-tuple to 64-tuple to be specific (64 is chosen to balance between usability and compile time).

Seldomly, when the runtime grows to have more than 64 pallets, the trait implementations will cease to apply, in which case the feature tuples-96 (or even tuples-128) must be enabled (at the cost of increased compile time).

[dependencies]
pezkuwi-sdk = { version = "0.12.0", features = ["runtime", "tuples-96"], default-features = false }

In addition to all the features mentioned earlier, each exported crate is feature-gated individually with the name identical to the crate name, to provide fine-grained control over the dependencies. Enabling features like node may pull in dependencies that you don't need. As you become more knowledgeable about the SDK, you may consider specifying the exact crate names in the features list instead to reduce build time.


When using pezkuwi-sdk to build a node, it is a good start to enable the node feature.

[dependencies]
pezkuwi-sdk = { version = "0.12.0", features = ["node"] }

For a runtime implementation, you need the runtime feature instead. Besides, you may want to opt out of std with default-features = false to allow the runtime to be executed in environments where std isn't available.

[dependencies]
pezkuwi-sdk = { version = "0.12.0", features = ["runtime"], default-features = false }

When building a runtime or writing an application pezpallet, pezkuwi-sdk-frame can be a handy toolkit to start with. It gathers all the common types, traits, and functions from many different crates so that you can import them with a one-liner.

pezkuwi-sdk-frame is also a part of pezkuwi-sdk. It is enabled by the runtime feature.

// It's a convention to rename it to `frame`.
use pezkuwi_sdk::pezkuwi_sdk_frame as frame;

#[frame::pezpallet(dev_mode)]
pub mod pezpallet {
    // Import declarations aren't automatically inherited.
    // Need to "re-import" to make `frame` available here.
    use super::*;
    // One-liner to import all the dependencies used here.
    use frame::prelude::*;

    pub type Balance = u128;

    #[pezpallet::pezpallet]
    pub struct Pezpallet<T>(_);

    #[pezpallet::config]
    #[pezpallet::disable_frame_system_supertrait_check]
    pub trait Config: frame_system::Config {}

    #[pezpallet::storage]
    pub type Balances<T: Config> = StorageMap<_, _, T::AccountId, Balance>;

    impl<T: Config> Pezpallet<T> {
        pub fn transfer(
            from: T::RuntimeOrigin,
            to: T::AccountId,
            amount: Balance,
        ) -> DispatchResult {
            let sender = ensure_signed(from)?;
            let sender_balance = Balances::<T>::get(&sender).ok_or("NonExistentAccount")?;
            let sender_remainder = sender_balance
                .checked_sub(amount)
                .ok_or("InsufficientBalance")?;

            Balances::<T>::mutate(to, |b| *b = Some(b.unwrap_or(0) + amount));
            Balances::<T>::insert(&sender, sender_remainder);

            Ok(())
        }
    }
}

For more detailed documentation and examples on pezkuwi-sdk-frame, see pezkuwi_sdk_frame.

To learn more about building with the Pezkuwi SDK, you may start with these guides and our official docs.

🚀 Versioning

We do a stable release for the SDK every three months with a version schema reflecting the release cadence, which is tracked in the release registry. At the time of writing, the latest version is stable2412 (released in 2024 December). To avoid confusion, we will align the versioning of pezkuwi-sdk with the established schema. For instance, the next stable version will be 2503.0.0.

Commit count: 185

cargo fmt