@blockrun/llm 3.24.6 → 3.24.7
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.cjs +25 -2
- package/dist/index.js +25 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5089,7 +5089,7 @@ function getCostSummary() {
|
|
|
5089
5089
|
}
|
|
5090
5090
|
|
|
5091
5091
|
// src/version.ts
|
|
5092
|
-
var SDK_VERSION = "3.24.
|
|
5092
|
+
var SDK_VERSION = "3.24.7";
|
|
5093
5093
|
var USER_AGENT = `blockrun-ts/${SDK_VERSION}`;
|
|
5094
5094
|
|
|
5095
5095
|
// src/client.ts
|
|
@@ -10809,6 +10809,7 @@ function checkChannelLayout() {
|
|
|
10809
10809
|
return layoutChecked;
|
|
10810
10810
|
}
|
|
10811
10811
|
var LANDING_MARGIN_BLOCKS = 300;
|
|
10812
|
+
var SECONDS_PER_SLOT = 0.4;
|
|
10812
10813
|
function maxOf(a, b) {
|
|
10813
10814
|
if (a === void 0) return b;
|
|
10814
10815
|
if (b === void 0) return a;
|
|
@@ -12363,7 +12364,29 @@ var SolanaBatchPayer = class {
|
|
|
12363
12364
|
`could not read channel ${record.channelId} before topping it up: ${err instanceof Error ? err.message : String(err)}`
|
|
12364
12365
|
);
|
|
12365
12366
|
}
|
|
12366
|
-
if (channel === void 0)
|
|
12367
|
+
if (channel === void 0) {
|
|
12368
|
+
const openSlot = Number(record.channelConfig.openSlot);
|
|
12369
|
+
const delaySlots = Math.ceil((record.channelConfig.withdrawDelay ?? 86400) / SECONDS_PER_SLOT);
|
|
12370
|
+
let finalizedSlot;
|
|
12371
|
+
try {
|
|
12372
|
+
const epoch = await rpcRequest(this.init.rpcUrl, "getEpochInfo", [{ commitment: "finalized" }], this.init.rpcHeaders);
|
|
12373
|
+
finalizedSlot = rpcInteger(epoch.absoluteSlot, "getEpochInfo absoluteSlot");
|
|
12374
|
+
} catch {
|
|
12375
|
+
return;
|
|
12376
|
+
}
|
|
12377
|
+
if (!Number.isSafeInteger(openSlot) || openSlot <= 0 || finalizedSlot <= openSlot + delaySlots) return;
|
|
12378
|
+
addResyncTarget(wallet, {
|
|
12379
|
+
key,
|
|
12380
|
+
channelId: record.channelId,
|
|
12381
|
+
channelConfig: record.channelConfig,
|
|
12382
|
+
cumulative: parseAtomic(record.chargedCumulativeAmount),
|
|
12383
|
+
knownDeposit: deposit,
|
|
12384
|
+
// No deposit is in doubt: nothing can still land in a reclaimed account.
|
|
12385
|
+
anchorHeight: 0,
|
|
12386
|
+
reason: "channel_unusable"
|
|
12387
|
+
});
|
|
12388
|
+
throw new ChannelResyncRequiredError(record.channelId);
|
|
12389
|
+
}
|
|
12367
12390
|
if (!channel.open || channel.payer !== await this.init.address() || channel.authorizedSigner !== record.channelConfig.payerAuthorizer || channel.mint !== record.channelConfig.token) {
|
|
12368
12391
|
addResyncTarget(wallet, {
|
|
12369
12392
|
key,
|
package/dist/index.js
CHANGED
|
@@ -4958,7 +4958,7 @@ function getCostSummary() {
|
|
|
4958
4958
|
}
|
|
4959
4959
|
|
|
4960
4960
|
// src/version.ts
|
|
4961
|
-
var SDK_VERSION = "3.24.
|
|
4961
|
+
var SDK_VERSION = "3.24.7";
|
|
4962
4962
|
var USER_AGENT = `blockrun-ts/${SDK_VERSION}`;
|
|
4963
4963
|
|
|
4964
4964
|
// src/client.ts
|
|
@@ -10678,6 +10678,7 @@ function checkChannelLayout() {
|
|
|
10678
10678
|
return layoutChecked;
|
|
10679
10679
|
}
|
|
10680
10680
|
var LANDING_MARGIN_BLOCKS = 300;
|
|
10681
|
+
var SECONDS_PER_SLOT = 0.4;
|
|
10681
10682
|
function maxOf(a, b) {
|
|
10682
10683
|
if (a === void 0) return b;
|
|
10683
10684
|
if (b === void 0) return a;
|
|
@@ -12232,7 +12233,29 @@ var SolanaBatchPayer = class {
|
|
|
12232
12233
|
`could not read channel ${record.channelId} before topping it up: ${err instanceof Error ? err.message : String(err)}`
|
|
12233
12234
|
);
|
|
12234
12235
|
}
|
|
12235
|
-
if (channel === void 0)
|
|
12236
|
+
if (channel === void 0) {
|
|
12237
|
+
const openSlot = Number(record.channelConfig.openSlot);
|
|
12238
|
+
const delaySlots = Math.ceil((record.channelConfig.withdrawDelay ?? 86400) / SECONDS_PER_SLOT);
|
|
12239
|
+
let finalizedSlot;
|
|
12240
|
+
try {
|
|
12241
|
+
const epoch = await rpcRequest(this.init.rpcUrl, "getEpochInfo", [{ commitment: "finalized" }], this.init.rpcHeaders);
|
|
12242
|
+
finalizedSlot = rpcInteger(epoch.absoluteSlot, "getEpochInfo absoluteSlot");
|
|
12243
|
+
} catch {
|
|
12244
|
+
return;
|
|
12245
|
+
}
|
|
12246
|
+
if (!Number.isSafeInteger(openSlot) || openSlot <= 0 || finalizedSlot <= openSlot + delaySlots) return;
|
|
12247
|
+
addResyncTarget(wallet, {
|
|
12248
|
+
key,
|
|
12249
|
+
channelId: record.channelId,
|
|
12250
|
+
channelConfig: record.channelConfig,
|
|
12251
|
+
cumulative: parseAtomic(record.chargedCumulativeAmount),
|
|
12252
|
+
knownDeposit: deposit,
|
|
12253
|
+
// No deposit is in doubt: nothing can still land in a reclaimed account.
|
|
12254
|
+
anchorHeight: 0,
|
|
12255
|
+
reason: "channel_unusable"
|
|
12256
|
+
});
|
|
12257
|
+
throw new ChannelResyncRequiredError(record.channelId);
|
|
12258
|
+
}
|
|
12236
12259
|
if (!channel.open || channel.payer !== await this.init.address() || channel.authorizedSigner !== record.channelConfig.payerAuthorizer || channel.mint !== record.channelConfig.token) {
|
|
12237
12260
|
addResyncTarget(wallet, {
|
|
12238
12261
|
key,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockrun/llm",
|
|
3
|
-
"version": "3.24.
|
|
3
|
+
"version": "3.24.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TypeScript SDK for BlockRun - every frontier model behind one OpenAI-compatible client. Pay with a BlockRun API key or per-call in USDC. Smart routing picks the cheapest capable model. No rate limits.",
|
|
6
6
|
"main": "dist/index.cjs",
|