@bounded-sh/core 0.0.108 → 0.0.110
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/{index-No5Vz0YM.mjs → index-CVWqE5hO.mjs} +23 -12
- package/dist/index-CVWqE5hO.mjs.map +1 -0
- package/dist/{index-BawH-9Rq.js → index-DOKk4VdC.js} +23 -12
- package/dist/index-DOKk4VdC.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{realtime-store-D_M3T5mH.js → realtime-store-CIrvP17-.js} +2 -2
- package/dist/{realtime-store-D_M3T5mH.js.map → realtime-store-CIrvP17-.js.map} +1 -1
- package/dist/{realtime-store-iXGbzhjG.mjs → realtime-store-Cno1p315.mjs} +2 -2
- package/dist/{realtime-store-iXGbzhjG.mjs.map → realtime-store-Cno1p315.mjs.map} +1 -1
- package/dist/{solana-message-DQVrh3NC.js → solana-message-BMaEWGOW.js} +2 -2
- package/dist/{solana-message-DQVrh3NC.js.map → solana-message-BMaEWGOW.js.map} +1 -1
- package/dist/{solana-message-BBKdydqt.mjs → solana-message-BTs3b7JU.mjs} +2 -2
- package/dist/{solana-message-BBKdydqt.mjs.map → solana-message-BTs3b7JU.mjs.map} +1 -1
- package/dist/{solana-operations-CIiyUG3b.js → solana-operations-BcFqY34S.js} +3 -3
- package/dist/{solana-operations-CIiyUG3b.js.map → solana-operations-BcFqY34S.js.map} +1 -1
- package/dist/{solana-operations-Dtow91W5.mjs → solana-operations-CU-8CFHk.mjs} +3 -3
- package/dist/{solana-operations-Dtow91W5.mjs.map → solana-operations-CU-8CFHk.mjs.map} +1 -1
- package/dist/{solana-v1-operations-BF5aGRmx.mjs → solana-v1-operations-BNLWUYEm.mjs} +3 -3
- package/dist/{solana-v1-operations-BF5aGRmx.mjs.map → solana-v1-operations-BNLWUYEm.mjs.map} +1 -1
- package/dist/{solana-v1-operations-DfZr0cjj.js → solana-v1-operations-RNpyoM03.js} +3 -3
- package/dist/{solana-v1-operations-DfZr0cjj.js.map → solana-v1-operations-RNpyoM03.js.map} +1 -1
- package/package.json +2 -2
- package/dist/index-BawH-9Rq.js.map +0 -1
- package/dist/index-No5Vz0YM.mjs.map +0 -1
|
@@ -4190,7 +4190,7 @@ class ServerSessionManager {
|
|
|
4190
4190
|
const sessionConfig = (_a = this.sessionConfig) !== null && _a !== void 0 ? _a : undefined;
|
|
4191
4191
|
/* fetch nonce from auth API (bound to the snapshotted app+issuer) */
|
|
4192
4192
|
const nonce = await genAuthNonce(sessionConfig);
|
|
4193
|
-
const { genSolanaMessage } = await Promise.resolve().then(function () { return require('./solana-message-
|
|
4193
|
+
const { genSolanaMessage } = await Promise.resolve().then(function () { return require('./solana-message-BMaEWGOW.js'); });
|
|
4194
4194
|
const message = await genSolanaMessage(address, nonce, sessionConfig === null || sessionConfig === void 0 ? void 0 : sessionConfig.appId);
|
|
4195
4195
|
/* sign the message */
|
|
4196
4196
|
const sigBytes = nacl.sign.detached(new TextEncoder().encode(message), kp.secretKey);
|
|
@@ -6655,6 +6655,11 @@ function notifyCallbacks(subscription, data) {
|
|
|
6655
6655
|
// notification don't cause callbacks to be skipped.
|
|
6656
6656
|
notifyCallbackOptions(subscription.callbacks.slice(), data);
|
|
6657
6657
|
}
|
|
6658
|
+
function isTransientAuthReconnect(error) {
|
|
6659
|
+
return !!error
|
|
6660
|
+
&& typeof error === 'object'
|
|
6661
|
+
&& error.__boundedAuthChangeTransient === true;
|
|
6662
|
+
}
|
|
6658
6663
|
function notifyErrorCallback(callback, error) {
|
|
6659
6664
|
let delivered = false;
|
|
6660
6665
|
try {
|
|
@@ -7164,15 +7169,16 @@ async function subscribeV2(path, subscriptionOptions, roomRoutePath) {
|
|
|
7164
7169
|
}
|
|
7165
7170
|
catch (error) {
|
|
7166
7171
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
7172
|
+
const transient = isTransientAuthReconnect(err);
|
|
7167
7173
|
let deliveredLocally = false;
|
|
7168
|
-
if (!err.__boundedDeliveredToOnError) {
|
|
7174
|
+
if (!transient && !err.__boundedDeliveredToOnError) {
|
|
7169
7175
|
deliveredLocally = notifyErrorCallback(subscriptionOptions, err);
|
|
7170
7176
|
}
|
|
7171
|
-
if (!subscriptionOptions.onError) {
|
|
7177
|
+
if (!transient && !subscriptionOptions.onError) {
|
|
7172
7178
|
await removeCallbackFromSubscription(connection, existingSubscription.subscriptionId, subscriptionOptions);
|
|
7173
7179
|
throw err;
|
|
7174
7180
|
}
|
|
7175
|
-
if (!err.__boundedDeliveredToOnError && !deliveredLocally) {
|
|
7181
|
+
if (!transient && !err.__boundedDeliveredToOnError && !deliveredLocally) {
|
|
7176
7182
|
console.warn('[WS v2] Subscription refresh failed, keeping for reconnect recovery:', error);
|
|
7177
7183
|
}
|
|
7178
7184
|
}
|
|
@@ -7263,14 +7269,15 @@ async function subscribeV2(path, subscriptionOptions, roomRoutePath) {
|
|
|
7263
7269
|
}
|
|
7264
7270
|
catch (error) {
|
|
7265
7271
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
7272
|
+
const transient = isTransientAuthReconnect(err);
|
|
7266
7273
|
let deliveredLocally = false;
|
|
7267
|
-
if (!err.__boundedDeliveredToOnError) {
|
|
7274
|
+
if (!transient && !err.__boundedDeliveredToOnError) {
|
|
7268
7275
|
// A local confirmation timeout belongs to the caller that
|
|
7269
7276
|
// originated it. Joined callbacks may already have a viable
|
|
7270
7277
|
// same-id refresh and must not be poisoned by that old attempt.
|
|
7271
7278
|
deliveredLocally = notifyErrorCallback(subscriptionOptions, err);
|
|
7272
7279
|
}
|
|
7273
|
-
if (!subscriptionOptions.onError) {
|
|
7280
|
+
if (!transient && !subscriptionOptions.onError) {
|
|
7274
7281
|
rejectPendingSubscriptionConfirmation(connection, subscriptionId, err);
|
|
7275
7282
|
// This registration may have acquired joined callbacks while
|
|
7276
7283
|
// its confirmation was pending. Remove only the originating
|
|
@@ -7279,7 +7286,7 @@ async function subscribeV2(path, subscriptionOptions, roomRoutePath) {
|
|
|
7279
7286
|
await removeCallbackFromSubscription(connection, subscriptionId, subscriptionOptions);
|
|
7280
7287
|
throw err;
|
|
7281
7288
|
}
|
|
7282
|
-
if (!err.__boundedDeliveredToOnError && !deliveredLocally) {
|
|
7289
|
+
if (!transient && !err.__boundedDeliveredToOnError && !deliveredLocally) {
|
|
7283
7290
|
console.warn('[WS v2] Subscription confirmation failed, keeping for reconnect recovery:', error);
|
|
7284
7291
|
}
|
|
7285
7292
|
}
|
|
@@ -7469,7 +7476,7 @@ async function doReconnectWithNewAuth() {
|
|
|
7469
7476
|
console.warn('[WS v2] Failed to clear HTTP read cache on auth change:', error);
|
|
7470
7477
|
}
|
|
7471
7478
|
try {
|
|
7472
|
-
const { reconnectRealtimeStoreWithNewAuth } = await Promise.resolve().then(function () { return require('./realtime-store-
|
|
7479
|
+
const { reconnectRealtimeStoreWithNewAuth } = await Promise.resolve().then(function () { return require('./realtime-store-CIrvP17-.js'); });
|
|
7473
7480
|
await reconnectRealtimeStoreWithNewAuth();
|
|
7474
7481
|
}
|
|
7475
7482
|
catch (error) {
|
|
@@ -7481,6 +7488,10 @@ async function doReconnectWithNewAuth() {
|
|
|
7481
7488
|
}
|
|
7482
7489
|
cancelIdleConnectionClose(connection);
|
|
7483
7490
|
const reconnectError = new Error('Connection reconnecting due to auth change');
|
|
7491
|
+
// The replay on this same subscription delivers the next snapshot.
|
|
7492
|
+
// Surfacing the reconnect itself leaves a raw subscriber stuck on it
|
|
7493
|
+
// after that data has already arrived.
|
|
7494
|
+
reconnectError.__boundedAuthChangeTransient = true;
|
|
7484
7495
|
for (const subscriptionId of Array.from(connection.pendingSubscriptions.keys())) {
|
|
7485
7496
|
rejectPendingSubscriptionConfirmation(connection, subscriptionId, reconnectError);
|
|
7486
7497
|
}
|
|
@@ -8963,7 +8974,7 @@ async function setMany(many, options) {
|
|
|
8963
8974
|
if (typeof curTx.serializedTransaction !== 'string' || typeof curTx.poofnetIntentId !== 'string') {
|
|
8964
8975
|
throw new Error('Unsupported 202 transaction shape: a poofnet write needs serializedTransaction and poofnetIntentId');
|
|
8965
8976
|
}
|
|
8966
|
-
const { signPoofnetTransaction, buildExpectedWriteIntent } = await Promise.resolve().then(function () { return require('./solana-operations-
|
|
8977
|
+
const { signPoofnetTransaction, buildExpectedWriteIntent } = await Promise.resolve().then(function () { return require('./solana-operations-BcFqY34S.js'); });
|
|
8967
8978
|
const signedTransaction = await signPoofnetTransaction(curTx.serializedTransaction, authProvider, options, buildExpectedWriteIntent(documents));
|
|
8968
8979
|
// Signing-only, exactly as on a real chain: signed and NOT committed.
|
|
8969
8980
|
if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false) {
|
|
@@ -8988,7 +8999,7 @@ async function setMany(many, options) {
|
|
|
8988
8999
|
'Nothing was signed or submitted.');
|
|
8989
9000
|
}
|
|
8990
9001
|
const solanaChain = workerChain;
|
|
8991
|
-
const { handlePreBuiltTransaction, buildExpectedWriteIntent } = await Promise.resolve().then(function () { return require('./solana-operations-
|
|
9002
|
+
const { handlePreBuiltTransaction, buildExpectedWriteIntent } = await Promise.resolve().then(function () { return require('./solana-operations-BcFqY34S.js'); });
|
|
8992
9003
|
// OA-0001: derive the expected intent from OUR OWN request (the one
|
|
8993
9004
|
// ground truth a tampered builder response cannot change) so the
|
|
8994
9005
|
// validator can reject any transaction whose operation semantics
|
|
@@ -10752,7 +10763,7 @@ function toMillis(seconds) {
|
|
|
10752
10763
|
|
|
10753
10764
|
/** SIWS message creation is async already, so its onchain module can be lazy. */
|
|
10754
10765
|
async function genSolanaMessage(address, nonce) {
|
|
10755
|
-
const implementation = await Promise.resolve().then(function () { return require('./solana-message-
|
|
10766
|
+
const implementation = await Promise.resolve().then(function () { return require('./solana-message-BMaEWGOW.js'); });
|
|
10756
10767
|
return implementation.genSolanaMessage(address, nonce);
|
|
10757
10768
|
}
|
|
10758
10769
|
|
|
@@ -11400,4 +11411,4 @@ exports.toSeconds = toSeconds;
|
|
|
11400
11411
|
exports.waitForSetResult = waitForSetResult;
|
|
11401
11412
|
exports.withEffects = withEffects;
|
|
11402
11413
|
exports.writeNotAppliedPhase = writeNotAppliedPhase;
|
|
11403
|
-
//# sourceMappingURL=index-
|
|
11414
|
+
//# sourceMappingURL=index-DOKk4VdC.js.map
|