Comments (2)
let _longhand_account_id = account_id_struct {
name: name.parse().expect("Unable to parse Name"),
domain_id: domain_id.parse().expect("Unable to parse domain id"),
};
let _id: AccountId = account_id
.parse::<account_id_struct>()
.expect("Unable to parse account id");
let pub_key = PublicKey::from_str(
"ed01207233BFC89DCBD68C19FDE6CE6158225298EC1131B6A130D1AEB454C1AB5183C1",
)
.unwrap();
##################################### Getting two errors from the line below
// error: the trait bound `RegistrableBox: std::convert::From<IdentifiableBox>` is not satisfied
//label: required by a bound introduced by this call
//error: the trait bound `RegistrableBox: std::convert::From<IdentifiableBox>` is not satisfied
//label: the trait `std::convert::From<IdentifiableBox>` is not implemented for `RegistrableBox`
let _create_account = RegisterBox::new(IdentifiableBox::from(Account::new(_id, [pub_key])));
}
Hi, I am getting this above error even after I followed official documentation and the above example
from iroha-2-docs.
`
pub mod services_methods {
use iroha_crypto::PublicKey;
use iroha_data_model::{
account::{Account, Id as account_id_struct},
prelude::{AccountId, Domain, DomainId, Instruction, RegisterBox},
IdentifiableBox,
};
pub fn create_new_account(account_id: String, domain_id: String, name: String) {
let _longhand_account_id = account_id_struct {
name: name.parse().expect("Unable to parse Name"),
domain_id: domain_id.parse().expect("Unable to parse domain id"),
};
let _id: AccountId = account_id
.parse::<AccountId>()
.expect("Unable to parse account id");
let pub_key = PublicKey::from_str(
"ed01207233BFC89DCBD68C19FDE6CE6158225298EC1131B6A130D1AEB454C1AB5183C1",
)
.unwrap();
let _create_account = RegisterBox::new(IdentifiableBox::from(Account::new(_id, [pub_key])));
}
}
`
above is the entire module.
from iroha-2-docs.
Related Issues (20)
- Add a cheatsheet HOT 1
- Update the README document for each crate
- Creating the new peers and removing them HOT 1
- Provide a migration guide for configuration from `2.0.0-pre-rc.20` to the new system
- Add CONTRIBUTING.md
- Update Branch Names in Tutorial HOT 1
- Replace `docker-compose` with `docker compose`
- Pin issues to specific Iroha versions HOT 2
- Tracking Issue for Example Repositories
- Rust SDK example repository
- JVM SDK example repository
- Python SDK example repository
- JavaScript SDK example repository
- CLI example repository
- Implement a Request to Fetch Test Case Overview Deletion Data and Update Visibility HOT 3
- Incorrect Commands for Iroha Client CLI in Documentation HOT 1
- Verify all `iroha` repo-related links HOT 1
- Update crate names HOT 1
- Interim review of the Blockchain section HOT 1
- Document usage of the Docker image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iroha-2-docs.