Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug raw test #104

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
"happ",
"Holochain",
"Holoom",
"msgpack",
"PKCE",
"pubkey",
"Solana",
"tryorama",
"typeshare",
"workdir",
"zome",
"zomes"
Expand Down
68 changes: 65 additions & 3 deletions Cargo.lock

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

21 changes: 19 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ opt-level = "z"

[workspace]
resolver = "2"
members = ["crates/*"]
members = [
"features/*/types",
"features/*/validation",
"features/*/handlers",
"crates/*",
]

[workspace.dependencies]
hdi = "=0.5.0-dev.9"
hdk = "=0.4.0-dev.10"
holo_hash = { version = "=0.4.0-dev.8", features = ["encoding"] }
serde = "1"
serde_json = "1"
bincode = "1.3.3"
hex = "0.4.3"
alloy-primitives = { version = "0.6.3", features = ["serde", "k256"] }
ed25519-dalek = { version = "2.1.1", features = ["serde"] }
Expand All @@ -23,6 +27,19 @@ ethers-signers = "0.6.2"
holochain = { version = "=0.4.0-dev.12", default-features = false, features = [
"test_utils",
] }
typeshare = { git = "https://github.com/8e8b2c/typeshare", rev = "ccb29d34411824f2758109c3e844a8f8bc147b63", default-features = false }

[workspace.dependencies.hdk_utils]
path = "crates/hdk_utils"

[workspace.dependencies.user_metadata_types]
path = "features/user_metadata/types"

[workspace.dependencies.user_metadata_validation]
path = "features/user_metadata/validation"

[workspace.dependencies.user_metadata_handlers]
path = "features/user_metadata/handlers"

[workspace.dependencies.holoom_types]
path = "crates/holoom_types"
Expand Down
11 changes: 11 additions & 0 deletions crates/hdk_utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "hdk_utils"
version = "0.0.1"
edition = "2021"

[lib]
crate-type = ["cdylib", "rlib"]
name = "hdk_utils"

[dependencies]
hdk = { workspace = true }
25 changes: 25 additions & 0 deletions crates/hdk_utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
use hdk::prelude::*;

pub fn create_link(
base_address: impl Into<AnyLinkableHash>,
target_address: impl Into<AnyLinkableHash>,
link_type: impl TryInto<ScopedLinkType>,
tag: impl Into<LinkTag>,
) -> ExternResult<ActionHash> {
let ScopedLinkType {
zome_index,
zome_type: link_type,
} = link_type
.try_into()
.map_err(|_| wasm_error!("Isn't valid link type for this zome".to_string()))?;
HDK.with(|h| {
h.borrow().create_link(CreateLinkInput::new(
base_address.into(),
target_address.into(),
zome_index,
link_type,
tag.into(),
ChainTopOrdering::default(),
))
})
}
1 change: 1 addition & 0 deletions crates/holoom_dna_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ name = "holoom_dna_tests"
[dependencies]
serde = { workspace = true }
holoom_types = { workspace = true }
username_registry_coordinator = { workspace = true }
hdk = { workspace = true, features = ["encoding", "test_utils"] }
holochain = { workspace = true, default-features = false, features = [
"test_utils",
Expand Down
1 change: 0 additions & 1 deletion crates/holoom_dna_tests/src/tests/username_registry/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
mod external_id_attestation;
mod oracle;
mod recipe;
mod user_metadata;
mod username_attestation;
mod wallet_attestation;

This file was deleted.

2 changes: 0 additions & 2 deletions crates/holoom_types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ use ts_rs::TS;
pub mod external_id;
pub use external_id::*;
pub mod evm_signing_offer;
pub mod metadata;
pub mod recipe;
pub use metadata::*;
pub mod wallet;
pub use wallet::*;
pub mod username;
Expand Down
27 changes: 0 additions & 27 deletions crates/holoom_types/src/metadata.rs

This file was deleted.

1 change: 1 addition & 0 deletions crates/records_coordinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ name = "records_coordinator"
[dependencies]
hdk = { workspace = true }
serde = { workspace = true }
typeshare = { workspace = true }
Loading