@settlemint/sdk-cli 2.3.5-main551b6bba → 2.3.5-main5b6e68f8
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.js +61 -43
- package/dist/cli.js.map +15 -15
- package/package.json +6 -6
package/dist/cli.js
CHANGED
@@ -231606,7 +231606,7 @@ function size(value4) {
|
|
231606
231606
|
var init_size = () => {};
|
231607
231607
|
|
231608
231608
|
// ../../node_modules/viem/_esm/errors/version.js
|
231609
|
-
var version5 = "2.
|
231609
|
+
var version5 = "2.31.0";
|
231610
231610
|
|
231611
231611
|
// ../../node_modules/viem/_esm/errors/base.js
|
231612
231612
|
function walk(err, fn) {
|
@@ -238927,7 +238927,7 @@ var init_ccip2 = __esm(() => {
|
|
238927
238927
|
|
238928
238928
|
// ../../node_modules/viem/_esm/actions/public/call.js
|
238929
238929
|
async function call(client, args) {
|
238930
|
-
const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = "
|
238930
|
+
const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = "latest", accessList, blobs, blockOverrides, code: code2, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value: value4, stateOverride, ...rest } = args;
|
238931
238931
|
const account = account_ ? parseAccount(account_) : undefined;
|
238932
238932
|
if (code2 && (factory || factoryData))
|
238933
238933
|
throw new BaseError2("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
@@ -239035,7 +239035,7 @@ function shouldPerformMulticall({ request: request2 }) {
|
|
239035
239035
|
}
|
239036
239036
|
async function scheduleMulticall(client, args) {
|
239037
239037
|
const { batchSize = 1024, wait = 0 } = typeof client.batch?.multicall === "object" ? client.batch.multicall : {};
|
239038
|
-
const { blockNumber, blockTag = "
|
239038
|
+
const { blockNumber, blockTag = "latest", data, multicallAddress: multicallAddress_, to } = args;
|
239039
239039
|
let multicallAddress = multicallAddress_;
|
239040
239040
|
if (!multicallAddress) {
|
239041
239041
|
if (!client.chain)
|
@@ -246161,7 +246161,7 @@ var isInteractive = (stream) => Boolean(stream.isTTY && process2.env.TERM !== "d
|
|
246161
246161
|
var infoSymbol = exports_base.blue(isUnicodeSupported ? "ℹ" : "i");
|
246162
246162
|
var successSymbol = exports_base.green(isUnicodeSupported ? "✔" : "√");
|
246163
246163
|
var warningSymbol = exports_base.yellow(isUnicodeSupported ? "⚠" : "‼");
|
246164
|
-
var errorSymbol = exports_base.red(isUnicodeSupported ? "
|
246164
|
+
var errorSymbol = exports_base.red(isUnicodeSupported ? "✖" : "×");
|
246165
246165
|
var defaultSpinner = {
|
246166
246166
|
frames: isUnicodeSupported ? [
|
246167
246167
|
"⠋",
|
@@ -246195,6 +246195,7 @@ class YoctoSpinner {
|
|
246195
246195
|
#exitHandlerBound;
|
246196
246196
|
#isInteractive;
|
246197
246197
|
#lastSpinnerFrameTime = 0;
|
246198
|
+
#isSpinning = false;
|
246198
246199
|
constructor(options = {}) {
|
246199
246200
|
const spinner = options.spinner ?? defaultSpinner;
|
246200
246201
|
this.#frames = spinner.frames;
|
@@ -246212,20 +246213,26 @@ class YoctoSpinner {
|
|
246212
246213
|
if (this.isSpinning) {
|
246213
246214
|
return this;
|
246214
246215
|
}
|
246216
|
+
this.#isSpinning = true;
|
246215
246217
|
this.#hideCursor();
|
246216
246218
|
this.#render();
|
246217
246219
|
this.#subscribeToProcessEvents();
|
246218
|
-
this.#
|
246219
|
-
this.#
|
246220
|
-
|
246220
|
+
if (this.#isInteractive) {
|
246221
|
+
this.#timer = setInterval(() => {
|
246222
|
+
this.#render();
|
246223
|
+
}, this.#interval);
|
246224
|
+
}
|
246221
246225
|
return this;
|
246222
246226
|
}
|
246223
246227
|
stop(finalText) {
|
246224
246228
|
if (!this.isSpinning) {
|
246225
246229
|
return this;
|
246226
246230
|
}
|
246227
|
-
|
246228
|
-
this.#timer
|
246231
|
+
this.#isSpinning = false;
|
246232
|
+
if (this.#timer) {
|
246233
|
+
clearInterval(this.#timer);
|
246234
|
+
this.#timer = undefined;
|
246235
|
+
}
|
246229
246236
|
this.#showCursor();
|
246230
246237
|
this.clear();
|
246231
246238
|
this.#unsubscribeFromProcessEvents();
|
@@ -246251,7 +246258,7 @@ class YoctoSpinner {
|
|
246251
246258
|
return this.#symbolStop(infoSymbol, text);
|
246252
246259
|
}
|
246253
246260
|
get isSpinning() {
|
246254
|
-
return this.#
|
246261
|
+
return this.#isSpinning;
|
246255
246262
|
}
|
246256
246263
|
get text() {
|
246257
246264
|
return this.#text;
|
@@ -257480,7 +257487,8 @@ var DotEnvSchema = object({
|
|
257480
257487
|
"warn",
|
257481
257488
|
"error",
|
257482
257489
|
"none"
|
257483
|
-
]).default("warn")
|
257490
|
+
]).default("warn"),
|
257491
|
+
NODE_TLS_REJECT_UNAUTHORIZED: _enum(["0", "1"]).optional()
|
257484
257492
|
});
|
257485
257493
|
var DotEnvSchemaPartial = DotEnvSchema.partial();
|
257486
257494
|
var IdSchema = union([string().uuid(), string().regex(/^[0-9a-fA-F]{24}$/)]);
|
@@ -263121,7 +263129,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
263121
263129
|
var package_default = {
|
263122
263130
|
name: "@settlemint/sdk-cli",
|
263123
263131
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
263124
|
-
version: "2.3.5-
|
263132
|
+
version: "2.3.5-main5b6e68f8",
|
263125
263133
|
type: "module",
|
263126
263134
|
private: false,
|
263127
263135
|
license: "FSL-1.1-MIT",
|
@@ -263170,9 +263178,9 @@ var package_default = {
|
|
263170
263178
|
"@inquirer/input": "4.1.12",
|
263171
263179
|
"@inquirer/password": "4.0.15",
|
263172
263180
|
"@inquirer/select": "4.2.3",
|
263173
|
-
"@settlemint/sdk-js": "2.3.5-
|
263174
|
-
"@settlemint/sdk-utils": "2.3.5-
|
263175
|
-
"@types/node": "
|
263181
|
+
"@settlemint/sdk-js": "2.3.5-main5b6e68f8",
|
263182
|
+
"@settlemint/sdk-utils": "2.3.5-main5b6e68f8",
|
263183
|
+
"@types/node": "24.0.0",
|
263176
263184
|
"@types/semver": "7.7.0",
|
263177
263185
|
"@types/which": "3.0.4",
|
263178
263186
|
"get-tsconfig": "4.10.1",
|
@@ -263180,13 +263188,13 @@ var package_default = {
|
|
263180
263188
|
"is-in-ci": "1.0.0",
|
263181
263189
|
semver: "7.7.2",
|
263182
263190
|
slugify: "1.6.6",
|
263183
|
-
viem: "2.
|
263191
|
+
viem: "2.31.0",
|
263184
263192
|
which: "5.0.0",
|
263185
263193
|
yaml: "2.8.0",
|
263186
263194
|
yoctocolors: "2.1.1"
|
263187
263195
|
},
|
263188
263196
|
peerDependencies: {
|
263189
|
-
hardhat: "2.24.
|
263197
|
+
hardhat: "2.24.2"
|
263190
263198
|
},
|
263191
263199
|
peerDependenciesMeta: {
|
263192
263200
|
hardhat: {
|
@@ -275244,7 +275252,8 @@ var DotEnvSchema2 = object2({
|
|
275244
275252
|
"warn",
|
275245
275253
|
"error",
|
275246
275254
|
"none"
|
275247
|
-
]).default("warn")
|
275255
|
+
]).default("warn"),
|
275256
|
+
NODE_TLS_REJECT_UNAUTHORIZED: _enum2(["0", "1"]).optional()
|
275248
275257
|
});
|
275249
275258
|
var DotEnvSchemaPartial2 = DotEnvSchema2.partial();
|
275250
275259
|
var IdSchema2 = union2([string2().uuid(), string2().regex(/^[0-9a-fA-F]{24}$/)]);
|
@@ -302582,7 +302591,7 @@ async function estimateGas(client, args) {
|
|
302582
302591
|
const { block: block2, request: request3, rpcStateOverride: rpcStateOverride2 } = parameters;
|
302583
302592
|
return client.request({
|
302584
302593
|
method: "eth_estimateGas",
|
302585
|
-
params: rpcStateOverride2 ? [request3, block2 ?? "
|
302594
|
+
params: rpcStateOverride2 ? [request3, block2 ?? "latest", rpcStateOverride2] : block2 ? [request3, block2] : [request3]
|
302586
302595
|
});
|
302587
302596
|
};
|
302588
302597
|
const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value: value4, stateOverride, ...rest } = await prepareTransactionRequest(client, {
|
@@ -302705,26 +302714,25 @@ function decodeEventLog(parameters) {
|
|
302705
302714
|
const [signature, ...argTopics] = topics;
|
302706
302715
|
if (!signature)
|
302707
302716
|
throw new AbiEventSignatureEmptyTopicsError({ docsPath: docsPath3 });
|
302708
|
-
const abiItem = (() =>
|
302709
|
-
if (abi.length === 1)
|
302710
|
-
return abi[0];
|
302711
|
-
return abi.find((x6) => x6.type === "event" && signature === toEventSelector(formatAbiItem2(x6)));
|
302712
|
-
})();
|
302717
|
+
const abiItem = abi.find((x6) => x6.type === "event" && signature === toEventSelector(formatAbiItem2(x6)));
|
302713
302718
|
if (!(abiItem && ("name" in abiItem)) || abiItem.type !== "event")
|
302714
302719
|
throw new AbiEventSignatureNotFoundError(signature, { docsPath: docsPath3 });
|
302715
302720
|
const { name: name3, inputs } = abiItem;
|
302716
302721
|
const isUnnamed = inputs?.some((x6) => !(("name" in x6) && x6.name));
|
302717
|
-
|
302718
|
-
const indexedInputs = inputs.filter((x6) => ("indexed" in x6) && x6.indexed);
|
302722
|
+
const args = isUnnamed ? [] : {};
|
302723
|
+
const indexedInputs = inputs.map((x6, i6) => [x6, i6]).filter(([x6]) => ("indexed" in x6) && x6.indexed);
|
302719
302724
|
for (let i6 = 0;i6 < indexedInputs.length; i6++) {
|
302720
|
-
const param = indexedInputs[i6];
|
302725
|
+
const [param, argIndex] = indexedInputs[i6];
|
302721
302726
|
const topic = argTopics[i6];
|
302722
302727
|
if (!topic)
|
302723
302728
|
throw new DecodeLogTopicsMismatch({
|
302724
302729
|
abiItem,
|
302725
302730
|
param
|
302726
302731
|
});
|
302727
|
-
args[isUnnamed ?
|
302732
|
+
args[isUnnamed ? argIndex : param.name || argIndex] = decodeTopic({
|
302733
|
+
param,
|
302734
|
+
value: topic
|
302735
|
+
});
|
302728
302736
|
}
|
302729
302737
|
const nonIndexedInputs = inputs.filter((x6) => !(("indexed" in x6) && x6.indexed));
|
302730
302738
|
if (nonIndexedInputs.length > 0) {
|
@@ -302733,12 +302741,11 @@ function decodeEventLog(parameters) {
|
|
302733
302741
|
const decodedData = decodeAbiParameters(nonIndexedInputs, data);
|
302734
302742
|
if (decodedData) {
|
302735
302743
|
if (isUnnamed)
|
302736
|
-
|
302737
|
-
|
302738
|
-
|
302744
|
+
for (let i6 = 0;i6 < inputs.length; i6++)
|
302745
|
+
args[i6] = args[i6] ?? decodedData.shift();
|
302746
|
+
else
|
302747
|
+
for (let i6 = 0;i6 < nonIndexedInputs.length; i6++)
|
302739
302748
|
args[nonIndexedInputs[i6].name] = decodedData[i6];
|
302740
|
-
}
|
302741
|
-
}
|
302742
302749
|
}
|
302743
302750
|
} catch (err) {
|
302744
302751
|
if (strict) {
|
@@ -303394,8 +303401,11 @@ function uid(length = 11) {
|
|
303394
303401
|
|
303395
303402
|
// ../../node_modules/viem/_esm/clients/createClient.js
|
303396
303403
|
function createClient(parameters) {
|
303397
|
-
const { batch,
|
303398
|
-
const
|
303404
|
+
const { batch, chain, ccipRead, key: key2 = "base", name: name3 = "Base Client", type: type4 = "base" } = parameters;
|
303405
|
+
const blockTime = chain?.blockTime ?? 12000;
|
303406
|
+
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4000);
|
303407
|
+
const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;
|
303408
|
+
const cacheTime = parameters.cacheTime ?? pollingInterval;
|
303399
303409
|
const account = parameters.account ? parseAccount(parameters.account) : undefined;
|
303400
303410
|
const { config: config4, request: request2, value: value4 } = parameters.transport({
|
303401
303411
|
chain,
|
@@ -305157,7 +305167,7 @@ init_transactionRequest();
|
|
305157
305167
|
init_stateOverride2();
|
305158
305168
|
init_assertRequest();
|
305159
305169
|
async function simulateBlocks(client, parameters) {
|
305160
|
-
const { blockNumber, blockTag = "
|
305170
|
+
const { blockNumber, blockTag = "latest", blocks, returnFullTransactions, traceTransfers, validation } = parameters;
|
305161
305171
|
try {
|
305162
305172
|
const blockStateCalls = [];
|
305163
305173
|
for (const block2 of blocks) {
|
@@ -318660,7 +318670,8 @@ async function writeEnvSpinner(prod, env2) {
|
|
318660
318670
|
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT,
|
318661
318671
|
SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT,
|
318662
318672
|
SETTLEMINT_NEW_PROJECT_NAME: env2.SETTLEMINT_NEW_PROJECT_NAME,
|
318663
|
-
SETTLEMINT_LOG_LEVEL: env2.SETTLEMINT_LOG_LEVEL
|
318673
|
+
SETTLEMINT_LOG_LEVEL: env2.SETTLEMINT_LOG_LEVEL,
|
318674
|
+
NODE_TLS_REJECT_UNAUTHORIZED: env2.NODE_TLS_REJECT_UNAUTHORIZED
|
318664
318675
|
};
|
318665
318676
|
await writeEnv({
|
318666
318677
|
prod,
|
@@ -318894,9 +318905,9 @@ function getUpdatedSubgraphEndpoints({
|
|
318894
318905
|
if (!middlewareAdminUrl) {
|
318895
318906
|
throw new Error("Middleware admin URL is required to add a new subgraph");
|
318896
318907
|
}
|
318897
|
-
const baseUrl =
|
318908
|
+
const baseUrl = middlewareAdminUrl.replace(/\/admin\/?$/, "");
|
318898
318909
|
if (baseUrl) {
|
318899
|
-
const endpoint =
|
318910
|
+
const endpoint = getTheGraphSubgraphUrl(baseUrl, newSubgraphName);
|
318900
318911
|
if (!existingEndpointsWithoutRemoved.includes(endpoint)) {
|
318901
318912
|
existingEndpointsWithoutRemoved.push(endpoint);
|
318902
318913
|
}
|
@@ -318917,7 +318928,12 @@ function getTheGraphSubgraphNames(subgraphUrls) {
|
|
318917
318928
|
return [];
|
318918
318929
|
}
|
318919
318930
|
function getTheGraphSubgraphUrl(theGraphUrl, subgraphName) {
|
318920
|
-
|
318931
|
+
const url5 = new URL(theGraphUrl);
|
318932
|
+
if (!url5.pathname.endsWith("/")) {
|
318933
|
+
url5.pathname += "/";
|
318934
|
+
}
|
318935
|
+
url5.pathname += `subgraphs/name/${subgraphName}`;
|
318936
|
+
return url5.toString();
|
318921
318937
|
}
|
318922
318938
|
|
318923
318939
|
// ../utils/dist/logging.js
|
@@ -319217,7 +319233,8 @@ async function connectToPlatform(env2, selectedInstance, acceptDefaults, prod) {
|
|
319217
319233
|
SETTLEMINT_CUSTOM_DEPLOYMENT: cDeployment?.uniqueName,
|
319218
319234
|
...getCustomDeploymentEnv(cDeployment),
|
319219
319235
|
SETTLEMINT_BLOCKSCOUT: blockscout?.uniqueName,
|
319220
|
-
...getBlockscoutEnv(blockscout)
|
319236
|
+
...getBlockscoutEnv(blockscout),
|
319237
|
+
NODE_TLS_REJECT_UNAUTHORIZED: "1"
|
319221
319238
|
});
|
319222
319239
|
}
|
319223
319240
|
async function connectToStandalone(env2, acceptDefaults, prod) {
|
@@ -319376,7 +319393,8 @@ async function connectToStandalone(env2, acceptDefaults, prod) {
|
|
319376
319393
|
SETTLEMINT_MINIO_ACCESS_KEY: selectedServices.minioAccessKey?.result,
|
319377
319394
|
SETTLEMINT_MINIO_SECRET_KEY: selectedServices.minioSecretKey?.result,
|
319378
319395
|
SETTLEMINT_IPFS_API_ENDPOINT: selectedServices.ipfsApiEndpoint?.result,
|
319379
|
-
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: selectedServices.blockscoutGraphqlEndpoint?.result
|
319396
|
+
SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: selectedServices.blockscoutGraphqlEndpoint?.result,
|
319397
|
+
NODE_TLS_REJECT_UNAUTHORIZED: "0"
|
319380
319398
|
});
|
319381
319399
|
}
|
319382
319400
|
|
@@ -327375,4 +327393,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
327375
327393
|
// src/cli.ts
|
327376
327394
|
sdkCliCommand();
|
327377
327395
|
|
327378
|
-
//# debugId=
|
327396
|
+
//# debugId=E0115C0D05C472E264756E2164756E21
|