opentool 0.7.12 → 0.7.14
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/cli/index.d.ts +5 -0
- package/dist/cli/index.js +58 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +50 -3
- package/dist/index.js.map +1 -1
- package/dist/wallets/index.js +45 -1
- package/dist/wallets/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { zodToJsonSchema } from '@alcyone-labs/zod-to-json-schema';
|
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { zeroAddress, createWalletClient, http, createPublicClient } from 'viem';
|
|
10
10
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
11
|
-
import { baseSepolia, mainnet, base } from 'viem/chains';
|
|
11
|
+
import { arbitrumSepolia, arbitrum, baseSepolia, mainnet, base } from 'viem/chains';
|
|
12
12
|
import { Turnkey } from '@turnkey/sdk-server';
|
|
13
13
|
import { createAccount } from '@turnkey/viem';
|
|
14
14
|
import { tmpdir } from 'os';
|
|
@@ -1195,6 +1195,8 @@ var HTTP_METHODS2 = [
|
|
|
1195
1195
|
var BASE_ALCHEMY_HOST = "https://base-mainnet.g.alchemy.com/v2/";
|
|
1196
1196
|
var ETHEREUM_ALCHEMY_HOST = "https://eth-mainnet.g.alchemy.com/v2/";
|
|
1197
1197
|
var BASE_SEPOLIA_ALCHEMY_HOST = "https://base-sepolia.g.alchemy.com/v2/";
|
|
1198
|
+
var ARBITRUM_ALCHEMY_HOST = "https://arb-mainnet.g.alchemy.com/v2/";
|
|
1199
|
+
var ARBITRUM_SEPOLIA_ALCHEMY_HOST = "https://arb-sepolia.g.alchemy.com/v2/";
|
|
1198
1200
|
function buildRpcResolver(host, fallbackUrls) {
|
|
1199
1201
|
return (options) => {
|
|
1200
1202
|
if (options?.url) {
|
|
@@ -1240,6 +1242,28 @@ var chains = {
|
|
|
1240
1242
|
BASE_SEPOLIA_ALCHEMY_HOST,
|
|
1241
1243
|
baseSepolia.rpcUrls.default.http
|
|
1242
1244
|
)
|
|
1245
|
+
},
|
|
1246
|
+
arbitrum: {
|
|
1247
|
+
id: arbitrum.id,
|
|
1248
|
+
slug: "arbitrum",
|
|
1249
|
+
name: "Arbitrum One",
|
|
1250
|
+
chain: arbitrum,
|
|
1251
|
+
rpcUrl: buildRpcResolver(
|
|
1252
|
+
ARBITRUM_ALCHEMY_HOST,
|
|
1253
|
+
arbitrum.rpcUrls.default.http
|
|
1254
|
+
),
|
|
1255
|
+
publicRpcUrls: arbitrum.rpcUrls.default.http
|
|
1256
|
+
},
|
|
1257
|
+
arbitrumSepolia: {
|
|
1258
|
+
id: arbitrumSepolia.id,
|
|
1259
|
+
slug: "arbitrum-sepolia",
|
|
1260
|
+
name: "Arbitrum Sepolia",
|
|
1261
|
+
chain: arbitrumSepolia,
|
|
1262
|
+
rpcUrl: buildRpcResolver(
|
|
1263
|
+
ARBITRUM_SEPOLIA_ALCHEMY_HOST,
|
|
1264
|
+
arbitrumSepolia.rpcUrls.default.http
|
|
1265
|
+
),
|
|
1266
|
+
publicRpcUrls: arbitrumSepolia.rpcUrls.default.http
|
|
1243
1267
|
}
|
|
1244
1268
|
};
|
|
1245
1269
|
function createNativeToken(chainId, symbol, name) {
|
|
@@ -1283,6 +1307,26 @@ var tokens = {
|
|
|
1283
1307
|
"0xA0b86991c6218b36c1d19d4a2e9Eb0cE3606eB48",
|
|
1284
1308
|
6
|
|
1285
1309
|
)
|
|
1310
|
+
},
|
|
1311
|
+
arbitrum: {
|
|
1312
|
+
...createNativeToken(arbitrum.id, "ETH", "Ether"),
|
|
1313
|
+
USDC: token(
|
|
1314
|
+
arbitrum.id,
|
|
1315
|
+
"USDC",
|
|
1316
|
+
"USD Coin",
|
|
1317
|
+
"0xaf88d065e77c8cc2239327c5edb3a432268e5831",
|
|
1318
|
+
6
|
|
1319
|
+
)
|
|
1320
|
+
},
|
|
1321
|
+
arbitrumSepolia: {
|
|
1322
|
+
...createNativeToken(arbitrumSepolia.id, "ETH", "Ether"),
|
|
1323
|
+
USDC: token(
|
|
1324
|
+
arbitrumSepolia.id,
|
|
1325
|
+
"USDC",
|
|
1326
|
+
"USD Coin",
|
|
1327
|
+
"0x1baAbB04529D43a73232B713C0FE471f7c7334d5",
|
|
1328
|
+
6
|
|
1329
|
+
)
|
|
1286
1330
|
}
|
|
1287
1331
|
};
|
|
1288
1332
|
var DEFAULT_CHAIN = chains.base;
|
|
@@ -2482,7 +2526,7 @@ async function transpileWithEsbuild(options) {
|
|
|
2482
2526
|
format: options.format,
|
|
2483
2527
|
platform: "node",
|
|
2484
2528
|
target: "node20",
|
|
2485
|
-
logLevel: "warning",
|
|
2529
|
+
logLevel: options.logLevel ?? "warning",
|
|
2486
2530
|
sourcesContent: false,
|
|
2487
2531
|
sourcemap: false,
|
|
2488
2532
|
loader: {
|
|
@@ -2496,13 +2540,16 @@ async function transpileWithEsbuild(options) {
|
|
|
2496
2540
|
".cjs": "js",
|
|
2497
2541
|
".json": "json"
|
|
2498
2542
|
},
|
|
2499
|
-
metafile: false,
|
|
2543
|
+
metafile: options.metafile ?? false,
|
|
2500
2544
|
allowOverwrite: true,
|
|
2501
2545
|
absWorkingDir: projectRoot
|
|
2502
2546
|
};
|
|
2503
2547
|
if (options.external && options.external.length > 0) {
|
|
2504
2548
|
buildOptions.external = options.external;
|
|
2505
2549
|
}
|
|
2550
|
+
if (options.outBase) {
|
|
2551
|
+
buildOptions.outbase = options.outBase;
|
|
2552
|
+
}
|
|
2506
2553
|
if (!buildOptions.bundle) {
|
|
2507
2554
|
buildOptions.packages = "external";
|
|
2508
2555
|
}
|