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

feat: add tari collectibles app #3480

Merged
Merged
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,324 changes: 2,254 additions & 70 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,20 @@ members = [
# "applications/installer",
"applications/tari_base_node",
"applications/tari_console_wallet",
"applications/tari_collectibles/src-tauri",
"applications/test_faucet",
"applications/tari_app_utilities",
"applications/tari_merge_mining_proxy",
"applications/tari_stratum_transcoder",
"applications/tari_mining_node",
"applications/tari_validator_node",

]
#
#[profile.release]
#debug = true


# Shutdown when panicking so we can see the error, specifically for the wallet
[profile.release]
panic = 'abort'
1 change: 1 addition & 0 deletions applications/tari_app_grpc/proto/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ message OutputFeatures {

message AssetOutputFeatures {
bytes public_key = 1;
repeated uint32 template_ids_implemented = 2;
}

message MintNonFungibleFeatures {
Expand Down
25 changes: 24 additions & 1 deletion applications/tari_app_grpc/proto/wallet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ service Wallet {
rpc CancelTransaction (CancelTransactionRequest) returns (CancelTransactionResponse);

rpc RegisterAsset(RegisterAssetRequest) returns (RegisterAssetResponse);

rpc CreateInitialAssetCheckpoint(CreateInitialAssetCheckpointRequest) returns (CreateInitialAssetCheckpointResponse);

rpc GetOwnedAssets(Empty) returns (GetOwnedAssetsResponse);

// Mint base layer tokens for an asset
Expand Down Expand Up @@ -199,12 +202,25 @@ message ImportUtxosResponse {

message RegisterAssetRequest {
string name = 1;
repeated uint32 template_ids_implemented = 2;
string description =3;
string image = 4;
}

message RegisterAssetResponse {
bytes public_key = 1;
}

message CreateInitialAssetCheckpointRequest {
bytes asset_public_key = 1;
bytes merkle_root = 2;
repeated bytes committee = 3;
}

message CreateInitialAssetCheckpointResponse {

}

message GetOwnedAssetsResponse {
repeated Asset assets = 1;
}
Expand All @@ -214,11 +230,18 @@ message Asset {
string registration_output_status = 2;
bytes public_key = 3;
bytes owner_commitment = 4;
string description =5;
string image = 6;
}

message MintTokensRequest {
bytes asset_public_key = 1;
repeated bytes unique_ids = 2;
repeated MintTokenInfo tokens = 2;
}

message MintTokenInfo {
bytes unique_id = 1;
OutputFeatures features = 2;
}

message MintTokensResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,18 @@ impl TryFrom<grpc::AssetOutputFeatures> for AssetOutputFeatures {
fn try_from(features: grpc::AssetOutputFeatures) -> Result<Self, Self::Error> {
let public_key = PublicKey::from_bytes(features.public_key.as_bytes()).map_err(|err| format!("{:?}", err))?;

Ok(Self { public_key })
Ok(Self {
public_key,
template_ids_implemented: features.template_ids_implemented,
})
}
}

impl From<AssetOutputFeatures> for grpc::AssetOutputFeatures {
fn from(features: AssetOutputFeatures) -> Self {
Self {
public_key: features.public_key.as_bytes().to_vec(),
template_ids_implemented: features.template_ids_implemented,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion applications/tari_base_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tari_common_types = {path = "../../base_layer/common_types"}
tari_comms_dht = { path = "../../comms/dht" }
tari_core = { path = "../../base_layer/core", default-features = false, features = ["transactions"] }
tari_crypto = { git = "https://github.com/tari-project/tari-crypto.git", branch = "main" }
tari_mmr = { path = "../../base_layer/mmr" }
tari_mmr = { path = "../../base_layer/mmr", features=["native_bitmap"] }
tari_p2p = { path = "../../base_layer/p2p", features = ["auto-update"] }
tari_service_framework = { path = "../../base_layer/service_framework" }
tari_shutdown = { path = "../../infrastructure/shutdown" }
Expand Down
Loading