PageSourceSearch

https://smrtbld.ai/js/utils/durable-settlement-owner.js

js smrtbld.ai collected 2026-10-05 15:09:01 UTC 675 bytes, 17 lines download raw bytes

1import { auth } from '../auth.js';
2import { offlineAuth } from '../offline/offline-auth.js';
3
4/** Capture the authenticated tenant partition before a create operation starts. */
5export function captureDurableSettlementOwner() {
6    return Object.freeze({
7        token: auth.getToken(),
8        partitionKey: offlineAuth.getActivePartition()?.key || null,
9    });
10}
11
12/** An accepted follow-up may finish only for the account/partition that began it. */
13export function canContinueDurableSettlement(owner) {
14    return !!owner?.token && !!owner.partitionKey
15        && auth.getToken() === owner.token
16        && offlineAuth.getActivePartition()?.key === owner.partitionKey;
17}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.