@ceramicnetwork/core
Version:
Typescript implementation of the Ceramic protocol
16 lines • 507 B
JavaScript
import { Observable, of } from 'rxjs';
import { StreamID } from '@ceramicnetwork/streamid';
export class SnapshotState extends Observable {
constructor(value) {
super((subscriber) => {
of(value).subscribe(subscriber);
});
this.value = value;
this.state = value;
this.id = new StreamID(this.state.type, this.state.log[0].cid);
}
next() {
throw new Error('Snapshot can not be updated');
}
}
//# sourceMappingURL=snapshot-state.js.map