Skip to content

8e8b2c/restructure feat spike #98

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
00244e2
chore: reorganise metadata into dependency crate and inject link types
8e8b2c Aug 15, 2024
b127770
chore: rename to user_metadata; add typeshare + doc comments
8e8b2c Aug 15, 2024
4f9f28c
fix: unwanted wbindgen exports
8e8b2c Aug 16, 2024
c580766
feat: hook up typeshare artefacts
8e8b2c Aug 16, 2024
ec23563
chore: update metadata sweettest
8e8b2c Aug 16, 2024
5e24898
fix: rollback update_metadata_item interface change for sake of test
8e8b2c Aug 16, 2024
4960c85
fix: oops - part of prev commit rollback
8e8b2c Aug 16, 2024
a04023f
chore: mv user_metadata to features directory
8e8b2c Aug 16, 2024
020f9c4
fix: also missing from rollback
8e8b2c Aug 16, 2024
89412c5
Merge branch 'main' into 8e8b2c/restructure-feat-spike
8e8b2c Aug 16, 2024
ad9e2f6
chore: port metadata test to tryorama
8e8b2c Aug 16, 2024
778aa5a
fix: Seems CI test leans on this?
8e8b2c Aug 19, 2024
5f8e0bf
feat: validation error types (#101)
8e8b2c Aug 20, 2024
0bc9b41
chore: see if single threaded tryorama un-breaks CI
8e8b2c Aug 21, 2024
c815218
Merge branch 'main' into 8e8b2c/restructure-feat-spike
8e8b2c Aug 21, 2024
be5c9b1
fix: CI missing dep timing bug workaround
8e8b2c Aug 21, 2024
cf592f3
Revert "fix: CI missing dep timing bug workaround"
8e8b2c Aug 22, 2024
fb18aa1
Revert "chore: see if single threaded tryorama un-breaks CI"
8e8b2c Aug 22, 2024
cdc09a9
chore: CI bug workaround. Don't chain successes on failures.
8e8b2c Aug 22, 2024
5e32aff
fix: poll chain head record until ready
8e8b2c Aug 22, 2024
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
Loading