@bounded-sh/core 0.0.115 → 0.0.117-sync.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/operations.d.ts +6 -5
- package/dist/{index-5TMFraRK.js → index-BcJOeks0.js} +118 -43
- package/dist/index-BcJOeks0.js.map +1 -0
- package/dist/{index-BilGFb3V.mjs → index-l5JPD7_a.mjs} +116 -44
- package/dist/index-l5JPD7_a.mjs.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{realtime-store-BiChlioj.js → realtime-store-5vXHb5Br.js} +2 -2
- package/dist/{realtime-store-BiChlioj.js.map → realtime-store-5vXHb5Br.js.map} +1 -1
- package/dist/{realtime-store-Bc71mTWr.mjs → realtime-store-CofPUMMC.mjs} +2 -2
- package/dist/{realtime-store-Bc71mTWr.mjs.map → realtime-store-CofPUMMC.mjs.map} +1 -1
- package/dist/{solana-message-BVwD6WVm.js → solana-message-CaPunjVI.js} +2 -2
- package/dist/{solana-message-BVwD6WVm.js.map → solana-message-CaPunjVI.js.map} +1 -1
- package/dist/{solana-message-BNGEBst_.mjs → solana-message-DXWlEuK5.mjs} +2 -2
- package/dist/{solana-message-BNGEBst_.mjs.map → solana-message-DXWlEuK5.mjs.map} +1 -1
- package/dist/{solana-operations-B3u6Arbf.js → solana-operations-BPOTddBI.js} +3 -3
- package/dist/{solana-operations-B3u6Arbf.js.map → solana-operations-BPOTddBI.js.map} +1 -1
- package/dist/{solana-operations-BLbRO1rE.mjs → solana-operations-CuWKt_pG.mjs} +3 -3
- package/dist/{solana-operations-BLbRO1rE.mjs.map → solana-operations-CuWKt_pG.mjs.map} +1 -1
- package/dist/{solana-v1-operations-BxTmxUMN.js → solana-v1-operations-DTXPM_aZ.js} +3 -3
- package/dist/{solana-v1-operations-BxTmxUMN.js.map → solana-v1-operations-DTXPM_aZ.js.map} +1 -1
- package/dist/{solana-v1-operations-b1rmLBUP.mjs → solana-v1-operations-MbUM3wgC.mjs} +3 -3
- package/dist/{solana-v1-operations-b1rmLBUP.mjs.map → solana-v1-operations-MbUM3wgC.mjs.map} +1 -1
- package/dist/utils/session-signal.d.ts +7 -0
- package/package.json +2 -2
- package/dist/index-5TMFraRK.js.map +0 -1
- package/dist/index-BilGFb3V.mjs.map +0 -1
|
@@ -283,12 +283,12 @@ export declare function runExpressionMany(many: {
|
|
|
283
283
|
_overrides?: RequestOverrides;
|
|
284
284
|
}[]): Promise<RunExpressionResult[]>;
|
|
285
285
|
/**
|
|
286
|
-
* Best-effort
|
|
286
|
+
* Best-effort chain synchronization. A confirmed transaction must NEVER be lost to a
|
|
287
287
|
* synchronization failure, so this reports its outcome in `mirrorSync` and
|
|
288
|
-
* never rejects.
|
|
289
|
-
*
|
|
288
|
+
* never rejects. The signature lets the server index the exact transaction,
|
|
289
|
+
* including hook-mutated documents beyond the requested destination paths.
|
|
290
290
|
*/
|
|
291
|
-
export declare function attemptMirrorSync(paths: string[], options?: SetOptions,
|
|
291
|
+
export declare function attemptMirrorSync(paths: string[], options?: SetOptions, transactionSignature?: string): Promise<MirrorSync>;
|
|
292
292
|
/**
|
|
293
293
|
* Write a document at `path`. Sugar for a one-element {@link setMany}.
|
|
294
294
|
*
|
|
@@ -395,4 +395,5 @@ export declare function setFile(path: string, file: File | null, options?: {
|
|
|
395
395
|
export declare function signMessage(message: string): Promise<string>;
|
|
396
396
|
export declare function signTransaction(transaction: Transaction | VersionedTransaction): Promise<Transaction | VersionedTransaction>;
|
|
397
397
|
export declare function signAndSubmitTransaction(transaction: Transaction | VersionedTransaction, feePayer?: PublicKey): Promise<string>;
|
|
398
|
-
|
|
398
|
+
/** Refresh concrete paths, or index a confirmed transaction and read its requested paths. */
|
|
399
|
+
export declare function syncItems(paths: string[], options?: SetOptions, transactionSignature?: string): Promise<any>;
|
|
@@ -826,6 +826,63 @@ function notifySessionCleared() {
|
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
|
|
829
|
+
// Same-tab session change signal.
|
|
830
|
+
//
|
|
831
|
+
// A page can run more than one copy of the SDK: the app's own bundle and the hosted widget
|
|
832
|
+
// bounded-router injects (which bundles its own, pinned copy). They share one session record in
|
|
833
|
+
// localStorage, keyed by issuer and app id, but the browser fires `storage` events only in OTHER
|
|
834
|
+
// tabs, so a copy that signs in never tells the other copy in the same tab. Until a reload, the
|
|
835
|
+
// app stayed signed out after a widget sign-in and the widget stayed signed out after an app
|
|
836
|
+
// sign-in (observed on staging, 2026-10-07).
|
|
837
|
+
//
|
|
838
|
+
// This announces "the record changed" on a BroadcastChannel, which reaches every other channel
|
|
839
|
+
// on the origin, same tab included, and never the announcing instance itself. The message is a
|
|
840
|
+
// nudge, not an authority: it carries no token and no identity, and a listener only re-reads the
|
|
841
|
+
// record through its ordinary restore path. Nothing signs in or out because of the message alone.
|
|
842
|
+
const SESSION_SIGNAL_CHANNEL = "bounded.session";
|
|
843
|
+
let channel;
|
|
844
|
+
function openChannel() {
|
|
845
|
+
var _a;
|
|
846
|
+
if (channel !== undefined)
|
|
847
|
+
return channel;
|
|
848
|
+
try {
|
|
849
|
+
channel = typeof BroadcastChannel === "function" ? new BroadcastChannel(SESSION_SIGNAL_CHANNEL) : null;
|
|
850
|
+
// Node's BroadcastChannel holds the event loop open until closed; a Node consumer (tests,
|
|
851
|
+
// tarobase-server) must not hang on exit because of a nudge channel. Browsers have no unref.
|
|
852
|
+
(_a = channel === null || channel === void 0 ? void 0 : channel.unref) === null || _a === void 0 ? void 0 : _a.call(channel);
|
|
853
|
+
}
|
|
854
|
+
catch (_b) {
|
|
855
|
+
channel = null;
|
|
856
|
+
}
|
|
857
|
+
return channel;
|
|
858
|
+
}
|
|
859
|
+
/** Tell the other SDK copies on this origin that the session record under `key` changed. */
|
|
860
|
+
function announceSessionChange(key) {
|
|
861
|
+
const ch = openChannel();
|
|
862
|
+
if (!ch)
|
|
863
|
+
return;
|
|
864
|
+
try {
|
|
865
|
+
ch.postMessage({ type: "session-changed", key });
|
|
866
|
+
}
|
|
867
|
+
catch (_a) {
|
|
868
|
+
// A closed or unavailable channel loses the nudge; the record itself is unaffected.
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
/** Run `listener` when another SDK copy announces a session change. Returns the unsubscribe. */
|
|
872
|
+
function onSessionChange(listener) {
|
|
873
|
+
const ch = openChannel();
|
|
874
|
+
if (!ch)
|
|
875
|
+
return () => { };
|
|
876
|
+
const handler = (event) => {
|
|
877
|
+
const data = event.data;
|
|
878
|
+
if (!data || data.type !== "session-changed" || typeof data.key !== "string")
|
|
879
|
+
return;
|
|
880
|
+
listener(data.key);
|
|
881
|
+
};
|
|
882
|
+
ch.addEventListener("message", handler);
|
|
883
|
+
return () => ch.removeEventListener("message", handler);
|
|
884
|
+
}
|
|
885
|
+
|
|
829
886
|
/**
|
|
830
887
|
* The one protocol every session-storage mutation goes through.
|
|
831
888
|
*
|
|
@@ -1022,6 +1079,7 @@ class WebSessionManager {
|
|
|
1022
1079
|
}
|
|
1023
1080
|
static writeRaw(sessionObj) {
|
|
1024
1081
|
localStorage.setItem(this.BOUNDED_SESSION_STORAGE_KEY, JSON.stringify(sessionObj));
|
|
1082
|
+
announceSessionChange(this.BOUNDED_SESSION_STORAGE_KEY);
|
|
1025
1083
|
}
|
|
1026
1084
|
/**
|
|
1027
1085
|
* Read the session, stamping a `sessionGeneration` if it predates them.
|
|
@@ -1118,6 +1176,7 @@ class WebSessionManager {
|
|
|
1118
1176
|
idToken,
|
|
1119
1177
|
refreshToken, appId: currentAppId, sessionGeneration: generation }, (sessionIssuer ? { issuer: sessionIssuer } : {}))));
|
|
1120
1178
|
});
|
|
1179
|
+
announceSessionChange(storageKey);
|
|
1121
1180
|
// Adoption can fail after persistence (for example, logout while the
|
|
1122
1181
|
// provider is loading). Remove only this incomplete login, even if the
|
|
1123
1182
|
// caller has since switched app configuration or another tab signed in.
|
|
@@ -1129,6 +1188,8 @@ class WebSessionManager {
|
|
|
1129
1188
|
localStorage.removeItem(storageKey);
|
|
1130
1189
|
return true;
|
|
1131
1190
|
});
|
|
1191
|
+
if (removed)
|
|
1192
|
+
announceSessionChange(storageKey);
|
|
1132
1193
|
if (removed)
|
|
1133
1194
|
notifySessionCleared();
|
|
1134
1195
|
};
|
|
@@ -1258,8 +1319,10 @@ class WebSessionManager {
|
|
|
1258
1319
|
});
|
|
1259
1320
|
// Only announce a clear that actually happened, so a no-op cannot sign out
|
|
1260
1321
|
// a UI that was already signed out.
|
|
1261
|
-
if (removed)
|
|
1322
|
+
if (removed) {
|
|
1262
1323
|
notifySessionCleared();
|
|
1324
|
+
announceSessionChange(key);
|
|
1325
|
+
}
|
|
1263
1326
|
}
|
|
1264
1327
|
/**
|
|
1265
1328
|
* Remove the session only if it is still the one identified by `generation`.
|
|
@@ -1284,8 +1347,10 @@ class WebSessionManager {
|
|
|
1284
1347
|
localStorage.removeItem(this.BOUNDED_SESSION_STORAGE_KEY);
|
|
1285
1348
|
return true;
|
|
1286
1349
|
});
|
|
1287
|
-
if (removed)
|
|
1350
|
+
if (removed) {
|
|
1288
1351
|
notifySessionCleared();
|
|
1352
|
+
announceSessionChange(this.BOUNDED_SESSION_STORAGE_KEY);
|
|
1353
|
+
}
|
|
1289
1354
|
}
|
|
1290
1355
|
/* ------------------------------------------------------------------ */
|
|
1291
1356
|
/* IS-AUTH */
|
|
@@ -4242,7 +4307,7 @@ class ServerSessionManager {
|
|
|
4242
4307
|
const sessionConfig = (_a = this.sessionConfig) !== null && _a !== void 0 ? _a : undefined;
|
|
4243
4308
|
/* fetch nonce from auth API (bound to the snapshotted app+issuer) */
|
|
4244
4309
|
const nonce = await genAuthNonce(sessionConfig);
|
|
4245
|
-
const { genSolanaMessage } = await Promise.resolve().then(function () { return require('./solana-message-
|
|
4310
|
+
const { genSolanaMessage } = await Promise.resolve().then(function () { return require('./solana-message-CaPunjVI.js'); });
|
|
4246
4311
|
const message = await genSolanaMessage(address, nonce, sessionConfig === null || sessionConfig === void 0 ? void 0 : sessionConfig.appId);
|
|
4247
4312
|
/* sign the message */
|
|
4248
4313
|
const sigBytes = nacl.sign.detached(new TextEncoder().encode(message), kp.secretKey);
|
|
@@ -4988,6 +5053,7 @@ class BoundedDeclineError extends Error {
|
|
|
4988
5053
|
|
|
4989
5054
|
const apiClient = axios.create();
|
|
4990
5055
|
const TRANSIENT_GET_STATUSES = new Set([500, 502, 503, 504]);
|
|
5056
|
+
const TRANSIENT_SYNC_STATUSES = new Set([502, 503, 504]);
|
|
4991
5057
|
const RATE_LIMIT_RETRY_BASE_DELAY_MS = 100;
|
|
4992
5058
|
/** The window event emitted when the API responds with HTTP 429. */
|
|
4993
5059
|
const RATE_LIMIT_EVENT_NAME = 'bounded:ratelimit';
|
|
@@ -5036,7 +5102,7 @@ function getRateLimitAttempt(error) {
|
|
|
5036
5102
|
axiosRetry(apiClient, {
|
|
5037
5103
|
retries: 2,
|
|
5038
5104
|
retryCondition: (error) => {
|
|
5039
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5105
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
5040
5106
|
// A caller cancellation is final. In particular, never turn a route
|
|
5041
5107
|
// unmount into a fresh GET after its AbortSignal has fired.
|
|
5042
5108
|
const canceled = axios.isCancel(error)
|
|
@@ -5052,15 +5118,27 @@ axiosRetry(apiClient, {
|
|
|
5052
5118
|
// safe for every method, including POST requests to the queries API.
|
|
5053
5119
|
if (((_d = error.response) === null || _d === void 0 ? void 0 : _d.status) === 429)
|
|
5054
5120
|
return true;
|
|
5055
|
-
//
|
|
5056
|
-
//
|
|
5057
|
-
//
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
if (
|
|
5121
|
+
// Sync only indexes existing chain state, so repeating it cannot submit
|
|
5122
|
+
// a second transaction. Keep its retries in this same bounded transport
|
|
5123
|
+
// loop instead of multiplying them with another SDK retry loop.
|
|
5124
|
+
const method = (_f = (_e = error.config) === null || _e === void 0 ? void 0 : _e.method) === null || _f === void 0 ? void 0 : _f.toLowerCase();
|
|
5125
|
+
let isSync = false;
|
|
5126
|
+
if (method === 'put') {
|
|
5127
|
+
try {
|
|
5128
|
+
isSync = new URL(String((_g = error.config) === null || _g === void 0 ? void 0 : _g.url)).pathname === '/items/sync';
|
|
5129
|
+
}
|
|
5130
|
+
catch ( /* An unrecognized URL is never safe to retry. */_m) { /* An unrecognized URL is never safe to retry. */ }
|
|
5131
|
+
}
|
|
5132
|
+
if (isSync) {
|
|
5133
|
+
return axiosRetry.isNetworkError(error)
|
|
5134
|
+
|| TRANSIENT_SYNC_STATUSES.has((_j = (_h = error.response) === null || _h === void 0 ? void 0 : _h.status) !== null && _j !== void 0 ? _j : 0);
|
|
5135
|
+
}
|
|
5136
|
+
// Ordinary writes are never retried: a lost response may follow commit.
|
|
5137
|
+
// GET network and selected gateway/runtime failures are safe to repeat.
|
|
5138
|
+
if (method !== 'get')
|
|
5061
5139
|
return false;
|
|
5062
5140
|
return axiosRetry.isNetworkError(error)
|
|
5063
|
-
|| TRANSIENT_GET_STATUSES.has((
|
|
5141
|
+
|| TRANSIENT_GET_STATUSES.has((_l = (_k = error.response) === null || _k === void 0 ? void 0 : _k.status) !== null && _l !== void 0 ? _l : 0);
|
|
5064
5142
|
},
|
|
5065
5143
|
retryDelay: (retryCount, error) => {
|
|
5066
5144
|
var _a;
|
|
@@ -7601,7 +7679,7 @@ async function doReconnectWithNewAuth() {
|
|
|
7601
7679
|
console.warn('[WS v2] Failed to clear HTTP read cache on auth change:', error);
|
|
7602
7680
|
}
|
|
7603
7681
|
try {
|
|
7604
|
-
const { reconnectRealtimeStoreWithNewAuth } = await Promise.resolve().then(function () { return require('./realtime-store-
|
|
7682
|
+
const { reconnectRealtimeStoreWithNewAuth } = await Promise.resolve().then(function () { return require('./realtime-store-5vXHb5Br.js'); });
|
|
7605
7683
|
await reconnectRealtimeStoreWithNewAuth();
|
|
7606
7684
|
}
|
|
7607
7685
|
catch (error) {
|
|
@@ -8787,12 +8865,6 @@ async function runExpressionMany(many) {
|
|
|
8787
8865
|
}
|
|
8788
8866
|
}
|
|
8789
8867
|
/* ===================== WRITE RECEIPT HELPERS (W4) ======================== */
|
|
8790
|
-
/**
|
|
8791
|
-
* Settle delay before the best-effort mirror read on an on-chain write. It is
|
|
8792
|
-
* an optimization, not a correctness guarantee: the receipt is captured first
|
|
8793
|
-
* and returned regardless of what the mirror read reports.
|
|
8794
|
-
*/
|
|
8795
|
-
const MIRROR_SYNC_SETTLE_MS = 1500;
|
|
8796
8868
|
const SOLANA_CHAIN_TAGS = new Set(['solana_devnet', 'solana_mainnet']);
|
|
8797
8869
|
/**
|
|
8798
8870
|
* Read the execution-lane tag the WORKER reported. The SDK never infers it: a
|
|
@@ -8867,16 +8939,14 @@ function validatePathKeyedDocuments(paths, source) {
|
|
|
8867
8939
|
return { observed: true, documents };
|
|
8868
8940
|
}
|
|
8869
8941
|
/**
|
|
8870
|
-
* Best-effort
|
|
8942
|
+
* Best-effort chain synchronization. A confirmed transaction must NEVER be lost to a
|
|
8871
8943
|
* synchronization failure, so this reports its outcome in `mirrorSync` and
|
|
8872
|
-
* never rejects.
|
|
8873
|
-
*
|
|
8944
|
+
* never rejects. The signature lets the server index the exact transaction,
|
|
8945
|
+
* including hook-mutated documents beyond the requested destination paths.
|
|
8874
8946
|
*/
|
|
8875
|
-
async function attemptMirrorSync(paths, options,
|
|
8947
|
+
async function attemptMirrorSync(paths, options, transactionSignature) {
|
|
8876
8948
|
try {
|
|
8877
|
-
|
|
8878
|
-
await new Promise(resolve => setTimeout(resolve, settleMs));
|
|
8879
|
-
const synced = await syncItems(paths, options);
|
|
8949
|
+
const synced = await syncItems(paths, options, transactionSignature);
|
|
8880
8950
|
// The sync endpoint answers `{ data: <path-keyed map>, status }`; a document
|
|
8881
8951
|
// path always contains a `/`, so a top-level `data` key is never one.
|
|
8882
8952
|
const map = (synced && typeof synced === 'object' && !Array.isArray(synced) && 'data' in synced)
|
|
@@ -9101,7 +9171,7 @@ async function setMany(many, options) {
|
|
|
9101
9171
|
if (typeof curTx.serializedTransaction !== 'string' || typeof curTx.poofnetIntentId !== 'string') {
|
|
9102
9172
|
throw new Error('Unsupported 202 transaction shape: a poofnet write needs serializedTransaction and poofnetIntentId');
|
|
9103
9173
|
}
|
|
9104
|
-
const { signPoofnetTransaction, buildExpectedWriteIntent } = await Promise.resolve().then(function () { return require('./solana-operations-
|
|
9174
|
+
const { signPoofnetTransaction, buildExpectedWriteIntent } = await Promise.resolve().then(function () { return require('./solana-operations-BPOTddBI.js'); });
|
|
9105
9175
|
const signedTransaction = await signPoofnetTransaction(curTx.serializedTransaction, authProvider, options, buildExpectedWriteIntent(documents));
|
|
9106
9176
|
// Signing-only, exactly as on a real chain: signed and NOT committed.
|
|
9107
9177
|
if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false) {
|
|
@@ -9139,7 +9209,7 @@ async function setMany(many, options) {
|
|
|
9139
9209
|
'Nothing was signed or submitted.');
|
|
9140
9210
|
}
|
|
9141
9211
|
const solanaChain = workerChain;
|
|
9142
|
-
const { handlePreBuiltTransaction, buildExpectedWriteIntent } = await Promise.resolve().then(function () { return require('./solana-operations-
|
|
9212
|
+
const { handlePreBuiltTransaction, buildExpectedWriteIntent } = await Promise.resolve().then(function () { return require('./solana-operations-BPOTddBI.js'); });
|
|
9143
9213
|
// OA-0001: derive the expected intent from OUR OWN request (the one
|
|
9144
9214
|
// ground truth a tampered builder response cannot change) so the
|
|
9145
9215
|
// validator can reject any transaction whose operation semantics
|
|
@@ -9180,7 +9250,7 @@ async function setMany(many, options) {
|
|
|
9180
9250
|
// best-effort enrichment reported in `mirrorSync`, never a rejection.
|
|
9181
9251
|
const mirrorSync = grantLane
|
|
9182
9252
|
? { observed: false, reason: 'not attempted: a venue grant authorizes only the write' }
|
|
9183
|
-
: await attemptMirrorSync(requestedPaths, options);
|
|
9253
|
+
: await attemptMirrorSync(requestedPaths, Object.assign(Object.assign({}, options), { _overrides: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options._overrides), { _config: config }) }), solanaOutcome.transactionSignature);
|
|
9184
9254
|
return {
|
|
9185
9255
|
status: 'confirmed', appId, requestedDocuments, chain: solanaChain,
|
|
9186
9256
|
transactionId: solanaOutcome.transactionSignature,
|
|
@@ -9452,14 +9522,18 @@ async function signAndSubmitTransaction(transaction, feePayer) {
|
|
|
9452
9522
|
}
|
|
9453
9523
|
return config.authProvider.signAndSubmitTransaction(transaction, feePayer);
|
|
9454
9524
|
}
|
|
9455
|
-
|
|
9456
|
-
|
|
9457
|
-
|
|
9458
|
-
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
9525
|
+
/** Refresh concrete paths, or index a confirmed transaction and read its requested paths. */
|
|
9526
|
+
async function syncItems(paths, options, transactionSignature) {
|
|
9527
|
+
var _a, _b;
|
|
9528
|
+
const response = await makeApiRequest('PUT', 'items/sync', Object.assign({ paths }, (transactionSignature !== undefined ? { transactionSignature } : {})), options === null || options === void 0 ? void 0 : options._overrides);
|
|
9529
|
+
if (transactionSignature !== undefined && (response.status !== 200
|
|
9530
|
+
|| ((_a = response.data) === null || _a === void 0 ? void 0 : _a.synchronized) !== true
|
|
9531
|
+
|| ((_b = response.data) === null || _b === void 0 ? void 0 : _b.transactionSignature) !== transactionSignature)) {
|
|
9532
|
+
// An older server's local-read stub can return 200 with stale documents.
|
|
9533
|
+
// Only the matching server acknowledgment proves this transaction was indexed.
|
|
9534
|
+
throw new Error('the synchronization response did not acknowledge the confirmed transaction');
|
|
9462
9535
|
}
|
|
9536
|
+
return response.data;
|
|
9463
9537
|
}
|
|
9464
9538
|
|
|
9465
9539
|
var operations = /*#__PURE__*/Object.freeze({
|
|
@@ -9492,8 +9566,6 @@ var operations = /*#__PURE__*/Object.freeze({
|
|
|
9492
9566
|
const DEFAULT_TIMEOUT_MS = 60000;
|
|
9493
9567
|
const DEFAULT_MAX_ATTEMPTS$1 = 20;
|
|
9494
9568
|
const DEFAULT_POLL_INTERVAL_MS = 3000;
|
|
9495
|
-
/** Mirror read after a late confirmation. No settle delay: the tx already landed. */
|
|
9496
|
-
const RECONCILE_MIRROR_SETTLE_MS = 0;
|
|
9497
9569
|
function errorText(error) {
|
|
9498
9570
|
const message = error === null || error === void 0 ? void 0 : error.message;
|
|
9499
9571
|
return typeof message === 'string' && message.length > 0 ? message : String(error);
|
|
@@ -9542,12 +9614,12 @@ function assertReceiptMatchesContext(receipt, config) {
|
|
|
9542
9614
|
function stillSubmitted(receipt, reason) {
|
|
9543
9615
|
return Object.assign(Object.assign({}, receipt), { confirmation: Object.assign(Object.assign({}, receipt.confirmation), { reason }) });
|
|
9544
9616
|
}
|
|
9545
|
-
async function mirrorFor(receipt, options) {
|
|
9617
|
+
async function mirrorFor(receipt, config, options) {
|
|
9546
9618
|
const paths = receipt.requestedDocuments.map(entry => entry.path);
|
|
9547
9619
|
if (paths.length === 0)
|
|
9548
9620
|
return { observed: false, reason: 'the receipt carried no requested paths' };
|
|
9549
|
-
const setOptions = (options === null || options === void 0 ? void 0 : options._overrides)
|
|
9550
|
-
return attemptMirrorSync(paths, setOptions,
|
|
9621
|
+
const setOptions = { _overrides: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options._overrides), { _config: config }) };
|
|
9622
|
+
return attemptMirrorSync(paths, setOptions, receipt.transactionId);
|
|
9551
9623
|
}
|
|
9552
9624
|
async function resolveSolanaRpc(config, options) {
|
|
9553
9625
|
var _a, _b;
|
|
@@ -9629,7 +9701,7 @@ async function reconcileSolana(receipt, config, options) {
|
|
|
9629
9701
|
signedTransaction: receipt.signedTransaction,
|
|
9630
9702
|
fence: receipt.fence,
|
|
9631
9703
|
confirmationContextSlot: typeof statusValue.slot === 'number' ? statusValue.slot : (contextSlot !== null && contextSlot !== void 0 ? contextSlot : 0),
|
|
9632
|
-
mirrorSync: await mirrorFor(receipt, options),
|
|
9704
|
+
mirrorSync: await mirrorFor(receipt, config, options),
|
|
9633
9705
|
};
|
|
9634
9706
|
return confirmed;
|
|
9635
9707
|
}
|
|
@@ -10983,7 +11055,7 @@ function toMillis(seconds) {
|
|
|
10983
11055
|
|
|
10984
11056
|
/** SIWS message creation is async already, so its onchain module can be lazy. */
|
|
10985
11057
|
async function genSolanaMessage(address, nonce) {
|
|
10986
|
-
const implementation = await Promise.resolve().then(function () { return require('./solana-message-
|
|
11058
|
+
const implementation = await Promise.resolve().then(function () { return require('./solana-message-CaPunjVI.js'); });
|
|
10987
11059
|
return implementation.genSolanaMessage(address, nonce);
|
|
10988
11060
|
}
|
|
10989
11061
|
|
|
@@ -11545,6 +11617,7 @@ exports.LiveIntentError = LiveIntentError;
|
|
|
11545
11617
|
exports.MIN_QUERY_POLL_INTERVAL_MS = MIN_QUERY_POLL_INTERVAL_MS;
|
|
11546
11618
|
exports.RATE_LIMIT_EVENT_NAME = RATE_LIMIT_EVENT_NAME;
|
|
11547
11619
|
exports.ReactNativeSessionManager = ReactNativeSessionManager;
|
|
11620
|
+
exports.SESSION_SIGNAL_CHANNEL = SESSION_SIGNAL_CHANNEL;
|
|
11548
11621
|
exports.SOLANA_SIGN_IN_STATEMENT = SOLANA_SIGN_IN_STATEMENT;
|
|
11549
11622
|
exports.ScopedClientReadOnlyError = ScopedClientReadOnlyError;
|
|
11550
11623
|
exports.ServerSessionManager = ServerSessionManager;
|
|
@@ -11552,6 +11625,7 @@ exports.SessionEnvironmentError = SessionEnvironmentError;
|
|
|
11552
11625
|
exports.UNSUPPORTED_ENVIRONMENT_CODE = UNSUPPORTED_ENVIRONMENT_CODE;
|
|
11553
11626
|
exports.WebSessionManager = WebSessionManager;
|
|
11554
11627
|
exports.aggregate = aggregate;
|
|
11628
|
+
exports.announceSessionChange = announceSessionChange;
|
|
11555
11629
|
exports.browserSignInDomain = browserSignInDomain;
|
|
11556
11630
|
exports.bufferExports = bufferExports;
|
|
11557
11631
|
exports.canonicalizeArgs = canonicalizeArgs;
|
|
@@ -11602,6 +11676,7 @@ exports.live = live;
|
|
|
11602
11676
|
exports.markWriteNotApplied = markWriteNotApplied;
|
|
11603
11677
|
exports.normalizeEvmAddress = normalizeEvmAddress;
|
|
11604
11678
|
exports.now = now;
|
|
11679
|
+
exports.onSessionChange = onSessionChange;
|
|
11605
11680
|
exports.onSessionCleared = onSessionCleared;
|
|
11606
11681
|
exports.queryAggregate = queryAggregate;
|
|
11607
11682
|
exports.reconcileSetResult = reconcileSetResult;
|
|
@@ -11633,4 +11708,4 @@ exports.toSeconds = toSeconds;
|
|
|
11633
11708
|
exports.waitForSetResult = waitForSetResult;
|
|
11634
11709
|
exports.withEffects = withEffects;
|
|
11635
11710
|
exports.writeNotAppliedPhase = writeNotAppliedPhase;
|
|
11636
|
-
//# sourceMappingURL=index-
|
|
11711
|
+
//# sourceMappingURL=index-BcJOeks0.js.map
|