forked from hyperledger-archives/indy-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstep3.java
12 lines (11 loc) · 780 Bytes
/
step3.java
1
2
3
4
5
6
7
8
9
10
11
12
System.out.println("\n9. Build the SCHEMA request to add new schema to the ledger as a Steward\n");
String name = "gvt";
String version = "1.0";
String attributes = "[\"age\", \"sex\", \"height\", \"name\"]";
String schemaDataJSON = "{\"name\":\"" + name + "\",\"version\":\"" + version + "\",\"attr_names\":" + attributes + "}";
System.out.println("Schema: " + schemaDataJSON);
String schemaRequest = buildSchemaRequest(defaultStewardDid, schemaDataJSON).get();
System.out.println("Schema request:\n" + schemaRequest);
System.out.println("\n10. Sending the SCHEMA request to the ledger\n");
String schemaResponse = signAndSubmitRequest(pool, walletHandle, defaultStewardDid, schemaRequest).get();
System.out.println("Schema response:\n" + schemaResponse);