diff --git a/contracts/axone-dataverse/src/contract.rs b/contracts/axone-dataverse/src/contract.rs index 53f7b8e7..278b507b 100644 --- a/contracts/axone-dataverse/src/contract.rs +++ b/contracts/axone-dataverse/src/contract.rs @@ -74,10 +74,9 @@ pub fn execute( ) -> Result { nonpayable(&info)?; match msg { - ExecuteMsg::SubmitClaims { - metadata, - format: _, - } => execute::submit_claims(deps, info, metadata), + ExecuteMsg::SubmitClaims { claims, format: _ } => { + execute::submit_claims(deps, info, claims) + } _ => Err(StdError::generic_err("Not implemented").into()), } } @@ -94,9 +93,9 @@ pub mod execute { pub fn submit_claims( deps: DepsMut<'_>, info: MessageInfo, - data: Binary, + claims: Binary, ) -> Result { - let buf = BufReader::new(data.as_slice()); + let buf = BufReader::new(claims.as_slice()); let mut reader = NQuadsReader::new(buf); let rdf_quads = reader.read_all()?; let vc_dataset = Dataset::from(rdf_quads.as_slice()); @@ -275,7 +274,7 @@ mod tests { let info = message_info(&addr(SENDER), &coins(10, "uaxone")); let msg = ExecuteMsg::SubmitClaims { - metadata: Binary::from("data".as_bytes()), + claims: Binary::from("data".as_bytes()), format: Some(RdfDatasetFormat::NQuads), }; @@ -345,7 +344,7 @@ mod tests { &[], ), ExecuteMsg::SubmitClaims { - metadata: Binary::new(read_test_data("vc-eddsa-2020-ok.nq")), + claims: Binary::new(read_test_data("vc-eddsa-2020-ok.nq")), format: Some(RdfDatasetFormat::NQuads), }, ); @@ -410,7 +409,7 @@ _:b0 , }, diff --git a/docs/axone-dataverse.md b/docs/axone-dataverse.md index 2b81d290..80d2d4c4 100644 --- a/docs/axone-dataverse.md +++ b/docs/axone-dataverse.md @@ -96,11 +96,11 @@ To maintain integrity and coherence in the dataverse, several preconditions are - `DataIntegrity` with the following cryptosuites: `eddsa-2022`, `eddsa-rdfc-2022`. -| parameter | description | -| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `submit_claims` | _(Required.) _ **object**. | -| `submit_claims.format` | **[RdfDatasetFormat](#rdfdatasetformat)\|null**. RDF dataset serialization format for the metadata. If not provided, the default format is [N-Quads](https://www.w3.org/TR/n-quads/) format. | -| `submit_claims.metadata` | _(Required.) _ **[Binary](#binary)**. The serialized metadata intended for attachment. This metadata should adhere to the format specified in the `format` field. | +| parameter | description | +| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `submit_claims` | _(Required.) _ **object**. | +| `submit_claims.claims` | _(Required.) _ **[Binary](#binary)**. The Verifiable Credential containing the claims. The claims must be serialized in the format specified by the `format` field. | +| `submit_claims.format` | **[RdfDatasetFormat](#rdfdatasetformat)\|null**. RDF dataset serialization format for the claims. If not provided, the default format is [N-Quads](https://www.w3.org/TR/n-quads/) format. | ### ExecuteMsg::RevokeClaims @@ -238,5 +238,5 @@ let b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ``` --- -*Rendered by [Fadroma](https://fadroma.tech) ([@fadroma/schema 1.1.0](https://www.npmjs.com/package/@fadroma/schema)) from `axone-dataverse.json` (`70aa81be19dd58f9`)* +*Rendered by [Fadroma](https://fadroma.tech) ([@fadroma/schema 1.1.0](https://www.npmjs.com/package/@fadroma/schema)) from `axone-dataverse.json` (`13c4a7b5af578887`)* ````