@tangle-network/sandbox 0.68.0 → 0.68.1
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.js +1 -1
- package/dist/openai/index.js +23 -8
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-uptUv4ZY.js → tangle-BvWc00mJ.js} +44 -33
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { C as SandboxOperationFailedError, D as validateDeferredProfileFileMount
|
|
|
8
8
|
import { i as profileChannelReference, n as SandboxLines, r as lineInstanceKey, t as LinesClient } from "./lines-BO1jPFsj.js";
|
|
9
9
|
import { PublicTemplatePublishError, PublicTemplatesClient } from "./public-templates.js";
|
|
10
10
|
import { a as LINE_APPLICATION_REPLY_MAX_CHARS, c as parseLineApplicationResult, i as gatewaySeatTransport, n as SeatSelectionError, o as LINE_APPLICATION_REQUEST_MAX_BYTES, r as createSelectSeat, s as parseLineApplicationRequest, t as ISOLATED_CREATION_ATTESTATION_VERSION } from "./core-DUpukePg.js";
|
|
11
|
-
import { s as TangleSandboxClient } from "./tangle-
|
|
11
|
+
import { s as TangleSandboxClient } from "./tangle-BvWc00mJ.js";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { SANDBOX_SIZE_PRESET_NAMES, agentProfileConfidentialSchema, agentProfileSchema } from "@tangle-network/agent-interface";
|
|
14
14
|
//#region ../../../packages/runtime-contracts/dist/model-key-proxy.js
|
package/dist/openai/index.js
CHANGED
|
@@ -1109,7 +1109,10 @@ function emptyResponseUsage() {
|
|
|
1109
1109
|
input_tokens: 0,
|
|
1110
1110
|
output_tokens: 0,
|
|
1111
1111
|
total_tokens: 0,
|
|
1112
|
-
input_tokens_details: {
|
|
1112
|
+
input_tokens_details: {
|
|
1113
|
+
cached_tokens: 0,
|
|
1114
|
+
cache_write_tokens: 0
|
|
1115
|
+
},
|
|
1113
1116
|
output_tokens_details: { reasoning_tokens: 0 }
|
|
1114
1117
|
};
|
|
1115
1118
|
}
|
|
@@ -1118,7 +1121,10 @@ function usageFromTokens(usage) {
|
|
|
1118
1121
|
input_tokens: usage.prompt_tokens,
|
|
1119
1122
|
output_tokens: usage.completion_tokens,
|
|
1120
1123
|
total_tokens: usage.total_tokens,
|
|
1121
|
-
input_tokens_details: {
|
|
1124
|
+
input_tokens_details: {
|
|
1125
|
+
cached_tokens: 0,
|
|
1126
|
+
cache_write_tokens: 0
|
|
1127
|
+
},
|
|
1122
1128
|
output_tokens_details: { reasoning_tokens: 0 }
|
|
1123
1129
|
};
|
|
1124
1130
|
}
|
|
@@ -1549,7 +1555,10 @@ function emptyUsage() {
|
|
|
1549
1555
|
input_tokens: 0,
|
|
1550
1556
|
output_tokens: 0,
|
|
1551
1557
|
total_tokens: 0,
|
|
1552
|
-
input_tokens_details: {
|
|
1558
|
+
input_tokens_details: {
|
|
1559
|
+
cached_tokens: 0,
|
|
1560
|
+
cache_write_tokens: 0
|
|
1561
|
+
},
|
|
1553
1562
|
output_tokens_details: { reasoning_tokens: 0 }
|
|
1554
1563
|
};
|
|
1555
1564
|
}
|
|
@@ -1559,14 +1568,16 @@ function readUsageFromEvent(event) {
|
|
|
1559
1568
|
const output = Number(u.output_tokens ?? u.completion_tokens ?? u.outputTokens ?? 0);
|
|
1560
1569
|
if (input === 0 && output === 0 && !("total_tokens" in u)) return null;
|
|
1561
1570
|
const total = Number(u.total_tokens ?? input + output);
|
|
1562
|
-
const
|
|
1563
|
-
const reasoning = Number(u.output_tokens_details?.reasoning_tokens ?? u.reasoning_tokens ?? 0);
|
|
1571
|
+
const detail = (group, key) => Number(u[group]?.[key] ?? u[key] ?? 0);
|
|
1564
1572
|
return {
|
|
1565
1573
|
input_tokens: input,
|
|
1566
1574
|
output_tokens: output,
|
|
1567
1575
|
total_tokens: total,
|
|
1568
|
-
input_tokens_details: {
|
|
1569
|
-
|
|
1576
|
+
input_tokens_details: {
|
|
1577
|
+
cached_tokens: detail("input_tokens_details", "cached_tokens"),
|
|
1578
|
+
cache_write_tokens: detail("input_tokens_details", "cache_write_tokens")
|
|
1579
|
+
},
|
|
1580
|
+
output_tokens_details: { reasoning_tokens: detail("output_tokens_details", "reasoning_tokens") }
|
|
1570
1581
|
};
|
|
1571
1582
|
}
|
|
1572
1583
|
function readToolInvocationFromRaw(event) {
|
|
@@ -1695,11 +1706,15 @@ function assembleResponseOutput(events) {
|
|
|
1695
1706
|
};
|
|
1696
1707
|
}
|
|
1697
1708
|
function foldUsage(a, b) {
|
|
1709
|
+
const input = (k) => a.input_tokens_details[k] + b.input_tokens_details[k];
|
|
1698
1710
|
return {
|
|
1699
1711
|
input_tokens: a.input_tokens + b.input_tokens,
|
|
1700
1712
|
output_tokens: a.output_tokens + b.output_tokens,
|
|
1701
1713
|
total_tokens: a.total_tokens + b.total_tokens,
|
|
1702
|
-
input_tokens_details: {
|
|
1714
|
+
input_tokens_details: {
|
|
1715
|
+
cached_tokens: input("cached_tokens"),
|
|
1716
|
+
cache_write_tokens: input("cache_write_tokens")
|
|
1717
|
+
},
|
|
1703
1718
|
output_tokens_details: { reasoning_tokens: a.output_tokens_details.reasoning_tokens + b.output_tokens_details.reasoning_tokens }
|
|
1704
1719
|
};
|
|
1705
1720
|
}
|
package/dist/tangle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-
|
|
1
|
+
import { _ as SandboxCreateParamTypes, a as parseQuoteResponse, c as OperatorSession, d as TANGLE_JOBS_CONTRACT, f as ITangleJobsAbi, g as JsonResponseParamTypes, h as JOB_SANDBOX_DELETE, i as jobQuoteDigest, l as OperatorSessionError, m as JOB_SANDBOX_CREATE, n as fetchQuote, o as validateQuote, p as AgentSandboxBlueprintAbi, r as inputsHashOf, s as TangleSandboxClient, t as QuoteError, u as TANGLE_CHAIN_ID, v as SandboxCreateResponseParamTypes, y as SandboxIdParamTypes } from "../tangle-BvWc00mJ.js";
|
|
2
2
|
export { AgentSandboxBlueprintAbi, ITangleJobsAbi, JOB_SANDBOX_CREATE, JOB_SANDBOX_DELETE, JsonResponseParamTypes, OperatorSession, OperatorSessionError, QuoteError, SandboxCreateParamTypes, SandboxCreateResponseParamTypes, SandboxIdParamTypes, TANGLE_CHAIN_ID, TANGLE_JOBS_CONTRACT, TangleSandboxClient, fetchQuote, inputsHashOf, jobQuoteDigest, parseQuoteResponse, validateQuote };
|
|
@@ -1147,10 +1147,10 @@ var TangleSandboxClient = class {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
};
|
|
1149
1149
|
//#endregion
|
|
1150
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1151
|
-
const version = "2.
|
|
1150
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/errors/version.js
|
|
1151
|
+
const version = "2.57.10";
|
|
1152
1152
|
//#endregion
|
|
1153
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1153
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/errors/base.js
|
|
1154
1154
|
let errorConfig = {
|
|
1155
1155
|
getDocsUrl: ({ docsBaseUrl, docsPath = "", docsSlug }) => docsPath ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath}${docsSlug ? `#${docsSlug}` : ""}` : void 0,
|
|
1156
1156
|
version: `viem@${version}`
|
|
@@ -1232,7 +1232,7 @@ function walk(err, fn) {
|
|
|
1232
1232
|
return fn ? null : err;
|
|
1233
1233
|
}
|
|
1234
1234
|
//#endregion
|
|
1235
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1235
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/errors/address.js
|
|
1236
1236
|
var InvalidAddressError = class extends BaseError {
|
|
1237
1237
|
constructor({ address }) {
|
|
1238
1238
|
super(`Address "${address}" is invalid.`, {
|
|
@@ -1242,14 +1242,14 @@ var InvalidAddressError = class extends BaseError {
|
|
|
1242
1242
|
}
|
|
1243
1243
|
};
|
|
1244
1244
|
//#endregion
|
|
1245
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1245
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/data/isHex.js
|
|
1246
1246
|
function isHex(value, { strict = true } = {}) {
|
|
1247
1247
|
if (!value) return false;
|
|
1248
1248
|
if (typeof value !== "string") return false;
|
|
1249
1249
|
return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
|
|
1250
1250
|
}
|
|
1251
1251
|
//#endregion
|
|
1252
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1252
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/errors/data.js
|
|
1253
1253
|
var SliceOffsetOutOfBoundsError = class extends BaseError {
|
|
1254
1254
|
constructor({ offset, position, size }) {
|
|
1255
1255
|
super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset}" is out-of-bounds (size: ${size}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
@@ -1261,7 +1261,7 @@ var SizeExceedsPaddingSizeError = class extends BaseError {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
};
|
|
1263
1263
|
//#endregion
|
|
1264
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1264
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/data/pad.js
|
|
1265
1265
|
function pad(hexOrBytes, { dir, size = 32 } = {}) {
|
|
1266
1266
|
if (typeof hexOrBytes === "string") return padHex(hexOrBytes, {
|
|
1267
1267
|
dir,
|
|
@@ -1297,7 +1297,7 @@ function padBytes(bytes, { dir, size = 32 } = {}) {
|
|
|
1297
1297
|
return paddedBytes;
|
|
1298
1298
|
}
|
|
1299
1299
|
//#endregion
|
|
1300
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1300
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/errors/encoding.js
|
|
1301
1301
|
var IntegerOutOfRangeError = class extends BaseError {
|
|
1302
1302
|
constructor({ max, min, signed, size, value }) {
|
|
1303
1303
|
super(`Number "${value}" is not in safe ${size ? `${size * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: "IntegerOutOfRangeError" });
|
|
@@ -1309,7 +1309,7 @@ var SizeOverflowError = class extends BaseError {
|
|
|
1309
1309
|
}
|
|
1310
1310
|
};
|
|
1311
1311
|
//#endregion
|
|
1312
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1312
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/data/size.js
|
|
1313
1313
|
/**
|
|
1314
1314
|
* @description Retrieves the size of the value (in bytes).
|
|
1315
1315
|
*
|
|
@@ -1321,7 +1321,7 @@ function size(value) {
|
|
|
1321
1321
|
return value.length;
|
|
1322
1322
|
}
|
|
1323
1323
|
//#endregion
|
|
1324
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1324
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/encoding/fromHex.js
|
|
1325
1325
|
function assertSize(hexOrBytes, { size: size$1 }) {
|
|
1326
1326
|
if (size(hexOrBytes) > size$1) throw new SizeOverflowError({
|
|
1327
1327
|
givenSize: size(hexOrBytes),
|
|
@@ -1352,7 +1352,7 @@ function hexToBigInt(hex, opts = {}) {
|
|
|
1352
1352
|
if (opts.size) assertSize(hex, { size: opts.size });
|
|
1353
1353
|
const value = BigInt(hex);
|
|
1354
1354
|
if (!signed) return value;
|
|
1355
|
-
const size = (hex.length - 2) / 2;
|
|
1355
|
+
const size = Math.ceil((hex.length - 2) / 2);
|
|
1356
1356
|
if (value <= (1n << BigInt(size) * 8n - 1n) - 1n) return value;
|
|
1357
1357
|
return value - BigInt(`0x${"f".padStart(size * 2, "f")}`) - 1n;
|
|
1358
1358
|
}
|
|
@@ -1388,7 +1388,7 @@ function hexToNumber(hex, opts = {}) {
|
|
|
1388
1388
|
return number;
|
|
1389
1389
|
}
|
|
1390
1390
|
//#endregion
|
|
1391
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1391
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/encoding/toHex.js
|
|
1392
1392
|
const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, "0"));
|
|
1393
1393
|
/**
|
|
1394
1394
|
* Encodes a string, number, bigint, or ByteArray into a hex string
|
|
@@ -1550,7 +1550,7 @@ function stringToHex(value_, opts = {}) {
|
|
|
1550
1550
|
return bytesToHex(encoder$1.encode(value_), opts);
|
|
1551
1551
|
}
|
|
1552
1552
|
//#endregion
|
|
1553
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1553
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/encoding/toBytes.js
|
|
1554
1554
|
const encoder = /* @__PURE__ */ new TextEncoder();
|
|
1555
1555
|
/**
|
|
1556
1556
|
* Encodes a UTF-8 string, hex value, bigint, number or boolean to a byte array.
|
|
@@ -1909,7 +1909,7 @@ const genShake = (suffix, blockLen, outputLen) => createXOFer((opts = {}) => new
|
|
|
1909
1909
|
genShake(31, 168, 128 / 8);
|
|
1910
1910
|
genShake(31, 136, 256 / 8);
|
|
1911
1911
|
//#endregion
|
|
1912
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1912
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/hash/keccak256.js
|
|
1913
1913
|
function keccak256(value, to_) {
|
|
1914
1914
|
const to = to_ || "hex";
|
|
1915
1915
|
const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);
|
|
@@ -1917,7 +1917,7 @@ function keccak256(value, to_) {
|
|
|
1917
1917
|
return toHex(bytes);
|
|
1918
1918
|
}
|
|
1919
1919
|
//#endregion
|
|
1920
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1920
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/lru.js
|
|
1921
1921
|
/**
|
|
1922
1922
|
* Map with a LRU (Least recently used) policy.
|
|
1923
1923
|
*
|
|
@@ -1953,7 +1953,7 @@ var LruMap = class extends Map {
|
|
|
1953
1953
|
}
|
|
1954
1954
|
};
|
|
1955
1955
|
//#endregion
|
|
1956
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1956
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/address/isAddress.js
|
|
1957
1957
|
const addressRegex = /^0x[a-fA-F0-9]{40}$/;
|
|
1958
1958
|
/** @internal */
|
|
1959
1959
|
const isAddressCache = /* @__PURE__ */ new LruMap(8192);
|
|
@@ -1971,7 +1971,7 @@ function isAddress(address, options) {
|
|
|
1971
1971
|
return result;
|
|
1972
1972
|
}
|
|
1973
1973
|
//#endregion
|
|
1974
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1974
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/address/getAddress.js
|
|
1975
1975
|
const checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
|
|
1976
1976
|
function checksumAddress(address_, chainId) {
|
|
1977
1977
|
if (checksumAddressCache.has(`${address_}.${chainId}`)) return checksumAddressCache.get(`${address_}.${chainId}`);
|
|
@@ -1991,7 +1991,7 @@ function getAddress(address, chainId) {
|
|
|
1991
1991
|
return checksumAddress(address, chainId);
|
|
1992
1992
|
}
|
|
1993
1993
|
//#endregion
|
|
1994
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
1994
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js
|
|
1995
1995
|
/**
|
|
1996
1996
|
* @description Converts an ECDSA public key to an address.
|
|
1997
1997
|
*
|
|
@@ -2003,7 +2003,7 @@ function publicKeyToAddress(publicKey) {
|
|
|
2003
2003
|
return checksumAddress(`0x${keccak256(`0x${publicKey.substring(4)}`).substring(26)}`);
|
|
2004
2004
|
}
|
|
2005
2005
|
//#endregion
|
|
2006
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2006
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/errors/abi.js
|
|
2007
2007
|
var AbiEncodingArrayLengthMismatchError = class extends BaseError {
|
|
2008
2008
|
constructor({ expectedLength, givenLength, type }) {
|
|
2009
2009
|
super([
|
|
@@ -2046,7 +2046,7 @@ var InvalidArrayError = class extends BaseError {
|
|
|
2046
2046
|
}
|
|
2047
2047
|
};
|
|
2048
2048
|
//#endregion
|
|
2049
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2049
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/data/slice.js
|
|
2050
2050
|
/**
|
|
2051
2051
|
* @description Returns a section of the hex or byte array given a start/end bytes offset.
|
|
2052
2052
|
*
|
|
@@ -2099,7 +2099,7 @@ function sliceHex(value_, start, end, { strict } = {}) {
|
|
|
2099
2099
|
return value;
|
|
2100
2100
|
}
|
|
2101
2101
|
//#endregion
|
|
2102
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2102
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/data/concat.js
|
|
2103
2103
|
function concat(values) {
|
|
2104
2104
|
if (typeof values[0] === "string") return concatHex(values);
|
|
2105
2105
|
return concatBytes(values);
|
|
@@ -2119,11 +2119,11 @@ function concatHex(values) {
|
|
|
2119
2119
|
return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
|
2120
2120
|
}
|
|
2121
2121
|
//#endregion
|
|
2122
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2122
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/regex.js
|
|
2123
2123
|
const bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
|
|
2124
2124
|
const integerRegex = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
|
|
2125
2125
|
//#endregion
|
|
2126
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2126
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
|
|
2127
2127
|
/**
|
|
2128
2128
|
* @description Encodes a list of primitive values into an ABI-encoded hex value.
|
|
2129
2129
|
*
|
|
@@ -2360,20 +2360,20 @@ function isDynamicType(param) {
|
|
|
2360
2360
|
return false;
|
|
2361
2361
|
}
|
|
2362
2362
|
//#endregion
|
|
2363
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2363
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/stringify.js
|
|
2364
2364
|
const stringify = (value, replacer, space) => JSON.stringify(value, (key, value_) => {
|
|
2365
2365
|
const value = typeof value_ === "bigint" ? value_.toString() : value_;
|
|
2366
2366
|
return typeof replacer === "function" ? replacer(key, value) : value;
|
|
2367
2367
|
}, space);
|
|
2368
2368
|
//#endregion
|
|
2369
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2369
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/address/isAddressEqual.js
|
|
2370
2370
|
function isAddressEqual(a, b) {
|
|
2371
2371
|
if (!isAddress(a, { strict: false })) throw new InvalidAddressError({ address: a });
|
|
2372
2372
|
if (!isAddress(b, { strict: false })) throw new InvalidAddressError({ address: b });
|
|
2373
2373
|
return a.toLowerCase() === b.toLowerCase();
|
|
2374
2374
|
}
|
|
2375
2375
|
//#endregion
|
|
2376
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2376
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/signature/recoverPublicKey.js
|
|
2377
2377
|
async function recoverPublicKey({ hash, signature }) {
|
|
2378
2378
|
const hashHex = isHex(hash) ? hash : toHex(hash);
|
|
2379
2379
|
const { secp256k1 } = await import("./secp256k1-_-uZfzOX.js");
|
|
@@ -2396,7 +2396,7 @@ function toRecoveryBit(yParityOrV) {
|
|
|
2396
2396
|
throw new Error("Invalid yParityOrV value");
|
|
2397
2397
|
}
|
|
2398
2398
|
//#endregion
|
|
2399
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2399
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/signature/recoverAddress.js
|
|
2400
2400
|
async function recoverAddress({ hash, signature }) {
|
|
2401
2401
|
return publicKeyToAddress(await recoverPublicKey({
|
|
2402
2402
|
hash,
|
|
@@ -2404,7 +2404,7 @@ async function recoverAddress({ hash, signature }) {
|
|
|
2404
2404
|
}));
|
|
2405
2405
|
}
|
|
2406
2406
|
//#endregion
|
|
2407
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2407
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/errors/typedData.js
|
|
2408
2408
|
var InvalidDomainError = class extends BaseError {
|
|
2409
2409
|
constructor({ domain }) {
|
|
2410
2410
|
super(`Invalid domain "${stringify(domain)}".`, { metaMessages: ["Must be a valid EIP-712 domain."] });
|
|
@@ -2426,14 +2426,25 @@ var InvalidStructTypeError = class extends BaseError {
|
|
|
2426
2426
|
});
|
|
2427
2427
|
}
|
|
2428
2428
|
};
|
|
2429
|
+
var InvalidTypedDataTypeError = class extends BaseError {
|
|
2430
|
+
constructor({ type }) {
|
|
2431
|
+
const canonicalType = type.replace(/^(u?int)/, "$&256");
|
|
2432
|
+
super(`Type "${type}" is not a valid EIP-712 type.`, {
|
|
2433
|
+
metaMessages: [`Use "${canonicalType}" instead.`],
|
|
2434
|
+
name: "InvalidTypedDataTypeError"
|
|
2435
|
+
});
|
|
2436
|
+
}
|
|
2437
|
+
};
|
|
2429
2438
|
//#endregion
|
|
2430
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2439
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/typedData.js
|
|
2431
2440
|
function validateTypedData(parameters) {
|
|
2432
2441
|
const { domain, message, primaryType, types } = parameters;
|
|
2433
2442
|
const validateData = (struct, data) => {
|
|
2434
2443
|
for (const param of struct) {
|
|
2435
2444
|
const { name, type } = param;
|
|
2436
2445
|
const value = data[name];
|
|
2446
|
+
const baseType = type.replace(/(\[[0-9]*\])+$/, "");
|
|
2447
|
+
if (baseType === "int" || baseType === "uint") throw new InvalidTypedDataTypeError({ type });
|
|
2437
2448
|
const integerMatch = type.match(integerRegex);
|
|
2438
2449
|
if (integerMatch && (typeof value === "number" || typeof value === "bigint")) {
|
|
2439
2450
|
const [_type, base, size_] = integerMatch;
|
|
@@ -2474,7 +2485,7 @@ function getTypesForEIP712Domain({ domain }) {
|
|
|
2474
2485
|
name: "name",
|
|
2475
2486
|
type: "string"
|
|
2476
2487
|
},
|
|
2477
|
-
domain?.version && {
|
|
2488
|
+
typeof domain?.version === "string" && {
|
|
2478
2489
|
name: "version",
|
|
2479
2490
|
type: "string"
|
|
2480
2491
|
},
|
|
@@ -2497,7 +2508,7 @@ function validateReference(type) {
|
|
|
2497
2508
|
if (type === "address" || type === "bool" || type === "string" || type.startsWith("bytes") || type.startsWith("uint") || type.startsWith("int")) throw new InvalidStructTypeError({ type });
|
|
2498
2509
|
}
|
|
2499
2510
|
//#endregion
|
|
2500
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2511
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/signature/hashTypedData.js
|
|
2501
2512
|
function hashTypedData(parameters) {
|
|
2502
2513
|
const { domain = {}, message, primaryType } = parameters;
|
|
2503
2514
|
const types = {
|
|
@@ -2602,7 +2613,7 @@ function encodeField({ types, name, type, value }) {
|
|
|
2602
2613
|
return [{ type }, value];
|
|
2603
2614
|
}
|
|
2604
2615
|
//#endregion
|
|
2605
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2616
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/signature/recoverTypedDataAddress.js
|
|
2606
2617
|
async function recoverTypedDataAddress(parameters) {
|
|
2607
2618
|
const { domain, message, primaryType, signature, types } = parameters;
|
|
2608
2619
|
return recoverAddress({
|
|
@@ -2616,7 +2627,7 @@ async function recoverTypedDataAddress(parameters) {
|
|
|
2616
2627
|
});
|
|
2617
2628
|
}
|
|
2618
2629
|
//#endregion
|
|
2619
|
-
//#region ../../../node_modules/.pnpm/viem@2.
|
|
2630
|
+
//#region ../../../node_modules/.pnpm/viem@2.57.10_bufferutil@4.1.0_typescript@6.0.3_utf-8-validate@5.0.10_zod@4.6.6/node_modules/viem/_esm/utils/signature/verifyTypedData.js
|
|
2620
2631
|
/**
|
|
2621
2632
|
* Verify that typed data was signed by the provided address.
|
|
2622
2633
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox",
|
|
3
|
-
"version": "0.68.
|
|
3
|
+
"version": "0.68.1",
|
|
4
4
|
"description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -150,31 +150,31 @@
|
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
"devDependencies": {
|
|
153
|
-
"@hocuspocus/provider": "^4.
|
|
153
|
+
"@hocuspocus/provider": "^4.7.1",
|
|
154
154
|
"@mastra/core": "1.67.0",
|
|
155
155
|
"@types/node": "25.6.0",
|
|
156
156
|
"@types/tar-stream": "3.1.4",
|
|
157
|
-
"@types/ws": "^8.18.
|
|
158
|
-
"@vitest/coverage-v8": "^4.1.
|
|
157
|
+
"@types/ws": "^8.18.2",
|
|
158
|
+
"@vitest/coverage-v8": "^4.1.12",
|
|
159
159
|
"ai": "7.0.107",
|
|
160
|
-
"openai": "^6.
|
|
160
|
+
"openai": "^6.49.0",
|
|
161
161
|
"proper-lockfile": "4.1.2",
|
|
162
162
|
"tsdown": "0.21.10",
|
|
163
163
|
"typescript": "^6.0.3",
|
|
164
|
-
"vitest": "^4.1.
|
|
165
|
-
"ws": "^8.
|
|
164
|
+
"vitest": "^4.1.12",
|
|
165
|
+
"ws": "^8.22.0",
|
|
166
166
|
"yjs": "13.6.30",
|
|
167
167
|
"@products/sandbox-test-utils": "0.0.0",
|
|
168
168
|
"@repo/shared": "0.0.0",
|
|
169
|
-
"@tangle-network/agent-profile-materialize": "0.26.0",
|
|
170
169
|
"@tangle-network/cli-agent-registry": "0.10.2",
|
|
171
|
-
"@tangle-network/
|
|
170
|
+
"@tangle-network/agent-profile-materialize": "0.26.0",
|
|
172
171
|
"@tangle-network/sdk": "4.0.16",
|
|
172
|
+
"@tangle-network/runtime-contracts": "0.19.0",
|
|
173
173
|
"@tangle-network/sse-core": "0.0.0"
|
|
174
174
|
},
|
|
175
175
|
"tangleRelease": {
|
|
176
|
-
"sourceSha": "
|
|
177
|
-
"mergedAt": "2026-10-
|
|
176
|
+
"sourceSha": "9effe22463d47174aeb888de1290676a643ecc81",
|
|
177
|
+
"mergedAt": "2026-10-25T19:12:10-06:00"
|
|
178
178
|
},
|
|
179
179
|
"scripts": {
|
|
180
180
|
"build": "node scripts/build-dist.mjs",
|