forked from hyperledger-indy/indy-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstep3.rs
More file actions
10 lines (8 loc) · 642 Bytes
/
Copy pathstep3.rs
File metadata and controls
10 lines (8 loc) · 642 Bytes
1
2
3
4
5
6
7
8
9
10
println!("9. Create Schema and Build the SCHEMA request to add new schema to the ledger as a Steward");
let name = "gvt";
let version = "1.0";
let attributes = r#"["age", "sex", "height", "name"]"#;
let (_schema_id, schema_json) = anoncreds::issuer_create_schema(&steward_did, name, version, attributes).wait().unwrap();
let build_schema_request: String = ledger::build_schema_request(&steward_did, &schema_json).wait().unwrap();
println!("10. Sending the SCHEMA request to the ledger");
let _signed_schema_request_response = ledger::sign_and_submit_request(pool_handle, wallet_handle, &steward_did, &build_schema_request).wait().unwrap();