iop_node_wasm/doc.rs
1use super::*;
2
3#[wasm_bindgen(js_name = DidDocument)]
4pub struct JsDidDocument {
5 inner: DidDocument,
6}
7
8#[wasm_bindgen(js_class = DidDocument)]
9impl JsDidDocument {
10 // readonly height: number;
11 // readonly did: Did;
12
13 // hasRightAt(auth: Crypto.Authentication, right: Sdk.Right, height: number): boolean;
14 // isTombstonedAt(height: number): boolean;
15
16 // toData(): IDidDocumentData;
17 // fromData(data: IDidDocumentData): void;
18}
19
20impl Wraps<DidDocument> for JsDidDocument {
21 fn inner(&self) -> &DidDocument {
22 &self.inner
23 }
24}
25
26impl From<DidDocument> for JsDidDocument {
27 fn from(inner: DidDocument) -> Self {
28 Self { inner }
29 }
30}