-
Notifications
You must be signed in to change notification settings - Fork 0
/
record_receipt.ts
38 lines (34 loc) · 961 Bytes
/
record_receipt.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import * as proto from "../../bridge/proto/integrity_entities";
/**
* Represents a receipt for a record, including anchor ID, client, record, and status information.
*/
export class RecordReceipt {
anchor: number;
client: string;
record: string;
status: string;
/**
* Constructs a RecordReceipt object with the specified parameters.
* @param anchor
* @param client
* @param record
* @param status
*/
constructor(anchor: number, client: string, record: string, status: string) {
this.anchor = anchor;
this.client = client;
this.record = record;
this.status = status;
}
static fromProto(r: proto.RecordReceipt): RecordReceipt {
return new RecordReceipt(r.anchor, r.client, r.record, r.status);
}
toProto(): proto.RecordReceipt {
return proto.RecordReceipt.fromPartial({
anchor: this.anchor,
client: this.client,
record: this.record,
status: this.status
});
}
}