@settlemint/sdk-cli 2.5.1-prb961405e → 2.5.1-prc5b5552e

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.
Files changed (3) hide show
  1. package/dist/cli.js +67 -36
  2. package/dist/cli.js.map +12 -12
  3. package/package.json +12 -12
package/dist/cli.js CHANGED
@@ -231623,7 +231623,7 @@ function size(value4) {
231623
231623
  var init_size = () => {};
231624
231624
 
231625
231625
  // ../../node_modules/viem/_esm/errors/version.js
231626
- var version5 = "2.31.7";
231626
+ var version5 = "2.33.0";
231627
231627
 
231628
231628
  // ../../node_modules/viem/_esm/errors/base.js
231629
231629
  function walk(err, fn) {
@@ -239020,7 +239020,7 @@ var init_ccip2 = __esm(() => {
239020
239020
 
239021
239021
  // ../../node_modules/viem/_esm/actions/public/call.js
239022
239022
  async function call(client, args) {
239023
- 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;
239023
+ const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = client.experimental_blockTag ?? "latest", accessList, blobs, blockOverrides, code: code2, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value: value4, stateOverride, ...rest } = args;
239024
239024
  const account = account_ ? parseAccount(account_) : undefined;
239025
239025
  if (code2 && (factory || factoryData))
239026
239026
  throw new BaseError2("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
@@ -239128,7 +239128,7 @@ function shouldPerformMulticall({ request: request2 }) {
239128
239128
  }
239129
239129
  async function scheduleMulticall(client, args) {
239130
239130
  const { batchSize = 1024, wait = 0 } = typeof client.batch?.multicall === "object" ? client.batch.multicall : {};
239131
- const { blockNumber, blockTag = "latest", data, multicallAddress: multicallAddress_, to } = args;
239131
+ const { blockNumber, blockTag = client.experimental_blockTag ?? "latest", data, multicallAddress: multicallAddress_, to } = args;
239132
239132
  let multicallAddress = multicallAddress_;
239133
239133
  if (!multicallAddress) {
239134
239134
  if (!client.chain)
@@ -265083,7 +265083,7 @@ function pruneCurrentEnv(currentEnv, env2) {
265083
265083
  var package_default = {
265084
265084
  name: "@settlemint/sdk-cli",
265085
265085
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
265086
- version: "2.5.1-prb961405e",
265086
+ version: "2.5.1-prc5b5552e",
265087
265087
  type: "module",
265088
265088
  private: false,
265089
265089
  license: "FSL-1.1-MIT",
@@ -265130,15 +265130,15 @@ var package_default = {
265130
265130
  devDependencies: {
265131
265131
  "@commander-js/extra-typings": "14.0.0",
265132
265132
  commander: "14.0.0",
265133
- "@inquirer/confirm": "5.1.13",
265134
- "@inquirer/input": "4.2.0",
265135
- "@inquirer/password": "4.0.16",
265136
- "@inquirer/select": "4.2.4",
265137
- "@settlemint/sdk-hasura": "2.5.1-prb961405e",
265138
- "@settlemint/sdk-js": "2.5.1-prb961405e",
265139
- "@settlemint/sdk-utils": "2.5.1-prb961405e",
265140
- "@settlemint/sdk-viem": "2.5.1-prb961405e",
265141
- "@types/node": "24.0.14",
265133
+ "@inquirer/confirm": "5.1.14",
265134
+ "@inquirer/input": "4.2.1",
265135
+ "@inquirer/password": "4.0.17",
265136
+ "@inquirer/select": "4.3.1",
265137
+ "@settlemint/sdk-hasura": "2.5.1-prc5b5552e",
265138
+ "@settlemint/sdk-js": "2.5.1-prc5b5552e",
265139
+ "@settlemint/sdk-utils": "2.5.1-prc5b5552e",
265140
+ "@settlemint/sdk-viem": "2.5.1-prc5b5552e",
265141
+ "@types/node": "24.1.0",
265142
265142
  "@types/semver": "7.7.0",
265143
265143
  "@types/which": "3.0.4",
265144
265144
  "get-tsconfig": "4.10.1",
@@ -265146,13 +265146,13 @@ var package_default = {
265146
265146
  "is-in-ci": "1.0.0",
265147
265147
  semver: "7.7.2",
265148
265148
  slugify: "1.6.6",
265149
- viem: "2.31.7",
265149
+ viem: "2.33.0",
265150
265150
  which: "5.0.0",
265151
265151
  yaml: "2.8.0",
265152
265152
  yoctocolors: "2.1.1"
265153
265153
  },
265154
265154
  peerDependencies: {
265155
- hardhat: "2.25.0"
265155
+ hardhat: "2.26.1"
265156
265156
  },
265157
265157
  peerDependenciesMeta: {
265158
265158
  hardhat: {
@@ -303428,7 +303428,14 @@ var esm_default3 = createPrompt((config4, done) => {
303428
303428
  setActive(next);
303429
303429
  }
303430
303430
  } else if (isNumberKey(key2) && !Number.isNaN(Number(rl.line))) {
303431
- const position = Number(rl.line) - 1;
303431
+ const selectedIndex = Number(rl.line) - 1;
303432
+ let selectableIndex = -1;
303433
+ const position = items.findIndex((item2) => {
303434
+ if (Separator.isSeparator(item2))
303435
+ return false;
303436
+ selectableIndex++;
303437
+ return selectableIndex === selectedIndex;
303438
+ });
303432
303439
  const item = items[position];
303433
303440
  if (item != null && isSelectable(item)) {
303434
303441
  setActive(position);
@@ -303468,14 +303475,16 @@ ${theme.style.help(`(${config4.instructions?.pager ?? "Use arrow keys to reveal
303468
303475
  helpTipTop = theme.style.help(`(${config4.instructions?.navigation ?? "Use arrow keys"})`);
303469
303476
  }
303470
303477
  }
303478
+ let separatorCount = 0;
303471
303479
  const page = usePagination({
303472
303480
  items,
303473
303481
  active,
303474
303482
  renderItem({ item, isActive, index }) {
303475
303483
  if (Separator.isSeparator(item)) {
303484
+ separatorCount++;
303476
303485
  return ` ${item.separator}`;
303477
303486
  }
303478
- const indexLabel = theme.indexMode === "number" ? `${index + 1}. ` : "";
303487
+ const indexLabel = theme.indexMode === "number" ? `${index + 1 - separatorCount}. ` : "";
303479
303488
  if (item.disabled) {
303480
303489
  const disabledLabel = typeof item.disabled === "string" ? item.disabled : "(disabled)";
303481
303490
  return theme.style.disabled(`${indexLabel}${item.name} ${disabledLabel}`);
@@ -304346,8 +304355,7 @@ function formatBlock(block) {
304346
304355
  }
304347
304356
 
304348
304357
  // ../../node_modules/viem/_esm/actions/public/getBlock.js
304349
- async function getBlock(client, { blockHash, blockNumber, blockTag: blockTag_, includeTransactions: includeTransactions_ } = {}) {
304350
- const blockTag = blockTag_ ?? "latest";
304358
+ async function getBlock(client, { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? "latest", includeTransactions: includeTransactions_ } = {}) {
304351
304359
  const includeTransactions = includeTransactions_ ?? false;
304352
304360
  const blockNumberHex = blockNumber !== undefined ? numberToHex(blockNumber) : undefined;
304353
304361
  let block = null;
@@ -304794,7 +304802,7 @@ async function prepareTransactionRequest(client, args) {
304794
304802
 
304795
304803
  // ../../node_modules/viem/_esm/actions/public/getBalance.js
304796
304804
  init_toHex();
304797
- async function getBalance(client, { address, blockNumber, blockTag = "latest" }) {
304805
+ async function getBalance(client, { address, blockNumber, blockTag = client.experimental_blockTag ?? "latest" }) {
304798
304806
  const blockNumberHex = typeof blockNumber === "bigint" ? numberToHex(blockNumber) : undefined;
304799
304807
  const balance = await client.request({
304800
304808
  method: "eth_getBalance",
@@ -304812,7 +304820,11 @@ async function estimateGas(client, args) {
304812
304820
  const { block: block2, request: request3, rpcStateOverride: rpcStateOverride2 } = parameters;
304813
304821
  return client.request({
304814
304822
  method: "eth_estimateGas",
304815
- params: rpcStateOverride2 ? [request3, block2 ?? "latest", rpcStateOverride2] : block2 ? [request3, block2] : [request3]
304823
+ params: rpcStateOverride2 ? [
304824
+ request3,
304825
+ block2 ?? client.experimental_blockTag ?? "latest",
304826
+ rpcStateOverride2
304827
+ ] : block2 ? [request3, block2] : [request3]
304816
304828
  });
304817
304829
  };
304818
304830
  const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value: value4, stateOverride, ...rest } = await prepareTransactionRequest(client, {
@@ -305626,6 +305638,7 @@ function uid(length = 11) {
305626
305638
  // ../../node_modules/viem/_esm/clients/createClient.js
305627
305639
  function createClient(parameters) {
305628
305640
  const { batch, chain, ccipRead, key: key2 = "base", name: name3 = "Base Client", type: type4 = "base" } = parameters;
305641
+ const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain?.experimental_preconfirmationTime === "number" ? "pending" : undefined);
305629
305642
  const blockTime = chain?.blockTime ?? 12000;
305630
305643
  const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4000);
305631
305644
  const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;
@@ -305648,7 +305661,8 @@ function createClient(parameters) {
305648
305661
  request: request2,
305649
305662
  transport,
305650
305663
  type: type4,
305651
- uid: uid()
305664
+ uid: uid(),
305665
+ ...experimental_blockTag ? { experimental_blockTag } : {}
305652
305666
  };
305653
305667
  function extend4(base2) {
305654
305668
  return (extendFn) => {
@@ -307391,7 +307405,7 @@ init_transactionRequest();
307391
307405
  init_stateOverride2();
307392
307406
  init_assertRequest();
307393
307407
  async function simulateBlocks(client, parameters) {
307394
- const { blockNumber, blockTag = "latest", blocks, returnFullTransactions, traceTransfers, validation } = parameters;
307408
+ const { blockNumber, blockTag = client.experimental_blockTag ?? "latest", blocks, returnFullTransactions, traceTransfers, validation } = parameters;
307395
307409
  try {
307396
307410
  const blockStateCalls = [];
307397
307411
  for (const block2 of blocks) {
@@ -308760,16 +308774,24 @@ function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onB
308760
308774
  }
308761
308775
 
308762
308776
  // ../../node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js
308763
- async function waitForTransactionReceipt(client, {
308764
- confirmations = 1,
308765
- hash: hash2,
308766
- onReplaced,
308767
- pollingInterval = client.pollingInterval,
308768
- retryCount = 6,
308769
- retryDelay = ({ count }) => ~~(1 << count) * 200,
308770
- timeout = 180000
308771
- }) {
308777
+ async function waitForTransactionReceipt(client, parameters) {
308778
+ const {
308779
+ checkReplacement = true,
308780
+ confirmations = 1,
308781
+ hash: hash2,
308782
+ onReplaced,
308783
+ retryCount = 6,
308784
+ retryDelay = ({ count }) => ~~(1 << count) * 200,
308785
+ timeout = 180000
308786
+ } = parameters;
308772
308787
  const observerId = stringify3(["waitForTransactionReceipt", client.uid, hash2]);
308788
+ const pollingInterval = (() => {
308789
+ if (parameters.pollingInterval)
308790
+ return parameters.pollingInterval;
308791
+ if (client.chain?.experimental_preconfirmationTime)
308792
+ return client.chain.experimental_preconfirmationTime;
308793
+ return client.pollingInterval;
308794
+ })();
308773
308795
  let transaction;
308774
308796
  let replacedTransaction;
308775
308797
  let receipt;
@@ -308782,7 +308804,16 @@ async function waitForTransactionReceipt(client, {
308782
308804
  _unobserve();
308783
308805
  reject(new WaitForTransactionReceiptTimeoutError({ hash: hash2 }));
308784
308806
  }, timeout) : undefined;
308785
- _unobserve = observe(observerId, { onReplaced, resolve: resolve6, reject }, (emit) => {
308807
+ _unobserve = observe(observerId, { onReplaced, resolve: resolve6, reject }, async (emit) => {
308808
+ receipt = await getAction(client, getTransactionReceipt, "getTransactionReceipt")({ hash: hash2 }).catch(() => {
308809
+ return;
308810
+ });
308811
+ if (receipt && confirmations <= 1) {
308812
+ clearTimeout(timer);
308813
+ emit.resolve(receipt);
308814
+ _unobserve();
308815
+ return;
308816
+ }
308786
308817
  _unwatch = getAction(client, watchBlockNumber, "watchBlockNumber")({
308787
308818
  emitMissed: true,
308788
308819
  emitOnBegin: true,
@@ -308805,7 +308836,7 @@ async function waitForTransactionReceipt(client, {
308805
308836
  done(() => emit.resolve(receipt));
308806
308837
  return;
308807
308838
  }
308808
- if (!transaction) {
308839
+ if (checkReplacement && !transaction) {
308809
308840
  retrying = true;
308810
308841
  await withRetry(async () => {
308811
308842
  transaction = await getAction(client, getTransaction, "getTransaction")({ hash: hash2 });
@@ -308875,7 +308906,7 @@ async function waitForTransactionReceipt(client, {
308875
308906
  return promise4;
308876
308907
  }
308877
308908
  // ../../node_modules/viem/_esm/actions/public/watchBlocks.js
308878
- function watchBlocks(client, { blockTag = "latest", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {
308909
+ function watchBlocks(client, { blockTag = client.experimental_blockTag ?? "latest", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {
308879
308910
  const enablePolling = (() => {
308880
308911
  if (typeof poll_ !== "undefined")
308881
308912
  return poll_;
@@ -330929,4 +330960,4 @@ async function sdkCliCommand(argv = process.argv) {
330929
330960
  // src/cli.ts
330930
330961
  sdkCliCommand();
330931
330962
 
330932
- //# debugId=9588D5094193B74D64756E2164756E21
330963
+ //# debugId=26E795EB9C9566F764756E2164756E21