Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ parachain-staking = {path = "pallets/parachain-staking", default-features = fals
public-credentials = {path = "pallets/public-credentials", default-features = false}

# Internal support (with default disabled)
dip-support = {path = "crates/dip", default-features = false}
dip-support = {path = "crates/dip-support", default-features = false}
kilt-asset-dids = {path = "crates/assets", default-features = false}
kilt-dip-support = {path = "crates/kilt-dip-support", default-features = false}
kilt-support = {path = "support", default-features = false}
runtime-common = {path = "runtimes/common", default-features = false}

Expand Down
2 changes: 0 additions & 2 deletions crates/dip/Cargo.toml → crates/dip-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ version.workspace = true
# Parity dependencies
parity-scale-codec = {workspace = true, features = ["derive"]}
scale-info = {workspace = true, features = ["derive"]}
sp-std.workspace = true

# Substrate dependencies
frame-support.workspace = true
Expand All @@ -24,6 +23,5 @@ default = ["std"]
std = [
"parity-scale-codec/std",
"scale-info/std",
"sp-std/std",
"frame-support/std"
]
14 changes: 5 additions & 9 deletions crates/dip/src/v1.rs → crates/dip-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,16 @@

// If you feel like getting in touch with us, you can do so at info@botlabs.org

// TODO: Crate documentation

#![cfg_attr(not(feature = "std"), no_std)]

use frame_support::RuntimeDebug;
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use sp_std::vec::Vec;

#[derive(Clone, Eq, PartialEq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen)]
#[derive(Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen, RuntimeDebug)]
pub enum IdentityProofAction<Identifier, Proof, Details = ()> {
Updated(Identifier, Proof, Details),
Deleted(Identifier),
}

#[derive(Encode, Decode, RuntimeDebug, Clone, Eq, PartialEq, TypeInfo, Default)]
pub struct Proof<BlindedValue, Leaf> {
pub blinded: BlindedValue,
// TODO: Probably replace with a different data structure for better lookup capabilities
pub revealed: Vec<Leaf>,
}
73 changes: 0 additions & 73 deletions crates/dip/src/lib.rs

This file was deleted.

44 changes: 44 additions & 0 deletions crates/kilt-dip-support/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[package]
authors.workspace = true
description = "Support types, traits, and functions for the KILT Decentralized Identity Provider (DIP) functionality as implemented by the KILT blockchain."
documentation.workspace = true
edition.workspace = true
homepage.workspace = true
license-file.workspace = true
name = "kilt-dip-support"
readme.workspace = true
repository.workspace = true
version.workspace = true

[dependencies]
# Internal dependencies
did.workspace = true
pallet-dip-consumer.workspace = true

# Parity dependencies
parity-scale-codec = {workspace = true, features = ["derive"]}
scale-info = {workspace = true, features = ["derive"]}

# Substrate dependencies
frame-system.workspace = true
frame-support.workspace = true
sp-runtime.workspace = true
sp-core.workspace = true
sp-trie.workspace = true
sp-std.workspace = true

[features]
default = ["std"]
std = [
"did/std",
"pallet-dip-consumer/std",
"parity-scale-codec/std",
"scale-info/std",
"frame-system/std",
"frame-support/std",
"sp-runtime/std",
"sp-core/std",
"sp-trie/std",
"sp-std/std"
]
runtime-benchmarks = []
Loading