@atproto/sync
Version:
atproto sync library
13 lines • 515 B
JavaScript
import { com } from './lexicons/index.js';
export const didAndSeqForEvt = (evt) => {
if (com.atproto.sync.subscribeRepos.commit.$isTypeOf(evt)) {
return { seq: evt.seq, did: evt.repo };
}
else if (com.atproto.sync.subscribeRepos.account.$isTypeOf(evt) ||
com.atproto.sync.subscribeRepos.identity.$isTypeOf(evt) ||
com.atproto.sync.subscribeRepos.sync.$isTypeOf(evt)) {
return { seq: evt.seq, did: evt.did };
}
return undefined;
};
//# sourceMappingURL=util.js.map