@settlemint/sdk-cli 2.3.2-prf63bb3f0 → 2.3.2-prfabe9cf1
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 +149 -337
- package/dist/cli.js.map +10 -12
- package/package.json +4 -3
package/dist/cli.js
CHANGED
@@ -232319,7 +232319,7 @@ var init_toBytes = __esm(() => {
|
|
232319
232319
|
};
|
232320
232320
|
});
|
232321
232321
|
|
232322
|
-
// ../../node_modules
|
232322
|
+
// ../../node_modules/@noble/hashes/esm/_assert.js
|
232323
232323
|
function anumber(n6) {
|
232324
232324
|
if (!Number.isSafeInteger(n6) || n6 < 0)
|
232325
232325
|
throw new Error("positive integer expected, got " + n6);
|
@@ -232354,7 +232354,7 @@ function aoutput(out, instance) {
|
|
232354
232354
|
}
|
232355
232355
|
var init__assert = () => {};
|
232356
232356
|
|
232357
|
-
// ../../node_modules
|
232357
|
+
// ../../node_modules/@noble/hashes/esm/_u64.js
|
232358
232358
|
function fromBig(n6, le4 = false) {
|
232359
232359
|
if (le4)
|
232360
232360
|
return { h: Number(n6 & U32_MASK64), l: Number(n6 >> _32n & U32_MASK64) };
|
@@ -232375,14 +232375,14 @@ var init__u64 = __esm(() => {
|
|
232375
232375
|
_32n = /* @__PURE__ */ BigInt(32);
|
232376
232376
|
});
|
232377
232377
|
|
232378
|
-
// ../../node_modules
|
232378
|
+
// ../../node_modules/@noble/hashes/esm/cryptoNode.js
|
232379
232379
|
import * as nc from "node:crypto";
|
232380
232380
|
var crypto2;
|
232381
232381
|
var init_cryptoNode = __esm(() => {
|
232382
232382
|
crypto2 = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
|
232383
232383
|
});
|
232384
232384
|
|
232385
|
-
// ../../node_modules
|
232385
|
+
// ../../node_modules/@noble/hashes/esm/utils.js
|
232386
232386
|
function u32(arr) {
|
232387
232387
|
return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
232388
232388
|
}
|
@@ -232466,7 +232466,7 @@ var init_utils2 = __esm(() => {
|
|
232466
232466
|
hasHexBuiltin = typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function";
|
232467
232467
|
});
|
232468
232468
|
|
232469
|
-
// ../../node_modules
|
232469
|
+
// ../../node_modules/@noble/hashes/esm/sha3.js
|
232470
232470
|
function keccakP(s7, rounds = 24) {
|
232471
232471
|
const B4 = new Uint32Array(5 * 2);
|
232472
232472
|
for (let round = 24 - rounds;round < 24; round++) {
|
@@ -234796,7 +234796,7 @@ var init_rpc = __esm(() => {
|
|
234796
234796
|
};
|
234797
234797
|
});
|
234798
234798
|
|
234799
|
-
// ../../node_modules
|
234799
|
+
// ../../node_modules/@noble/hashes/esm/_md.js
|
234800
234800
|
function setBigUint64(view, byteOffset, value4, isLE2) {
|
234801
234801
|
if (typeof view.setBigUint64 === "function")
|
234802
234802
|
return view.setBigUint64(byteOffset, value4, isLE2);
|
@@ -234907,7 +234907,7 @@ var init__md = __esm(() => {
|
|
234907
234907
|
};
|
234908
234908
|
});
|
234909
234909
|
|
234910
|
-
// ../../node_modules
|
234910
|
+
// ../../node_modules/@noble/hashes/esm/sha256.js
|
234911
234911
|
var SHA256_K, SHA256_IV, SHA256_W, SHA256, sha256;
|
234912
234912
|
var init_sha256 = __esm(() => {
|
234913
234913
|
init__md();
|
@@ -235061,12 +235061,12 @@ var init_sha256 = __esm(() => {
|
|
235061
235061
|
sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256);
|
235062
235062
|
});
|
235063
235063
|
|
235064
|
-
// ../../node_modules
|
235064
|
+
// ../../node_modules/@noble/hashes/esm/sha2.js
|
235065
235065
|
var init_sha2 = __esm(() => {
|
235066
235066
|
init_sha256();
|
235067
235067
|
});
|
235068
235068
|
|
235069
|
-
// ../../node_modules
|
235069
|
+
// ../../node_modules/@noble/hashes/esm/hmac.js
|
235070
235070
|
var HMAC, hmac = (hash2, key2, message) => new HMAC(hash2, key2).update(message).digest();
|
235071
235071
|
var init_hmac = __esm(() => {
|
235072
235072
|
init__assert();
|
@@ -235135,7 +235135,7 @@ var init_hmac = __esm(() => {
|
|
235135
235135
|
hmac.create = (hash2, key2) => new HMAC(hash2, key2);
|
235136
235136
|
});
|
235137
235137
|
|
235138
|
-
// ../../node_modules
|
235138
|
+
// ../../node_modules/@noble/curves/esm/abstract/utils.js
|
235139
235139
|
function isBytes2(a7) {
|
235140
235140
|
return a7 instanceof Uint8Array || ArrayBuffer.isView(a7) && a7.constructor.name === "Uint8Array";
|
235141
235141
|
}
|
@@ -235358,7 +235358,7 @@ var init_utils3 = __esm(() => {
|
|
235358
235358
|
};
|
235359
235359
|
});
|
235360
235360
|
|
235361
|
-
// ../../node_modules
|
235361
|
+
// ../../node_modules/@noble/curves/esm/abstract/modular.js
|
235362
235362
|
function mod(a7, b4) {
|
235363
235363
|
const result = a7 % b4;
|
235364
235364
|
return result >= _0n3 ? result : b4 + result;
|
@@ -235635,7 +235635,7 @@ var init_modular = __esm(() => {
|
|
235635
235635
|
];
|
235636
235636
|
});
|
235637
235637
|
|
235638
|
-
// ../../node_modules
|
235638
|
+
// ../../node_modules/@noble/curves/esm/abstract/curve.js
|
235639
235639
|
function constTimeNegate(condition, item) {
|
235640
235640
|
const neg = item.negate();
|
235641
235641
|
return condition ? neg : item;
|
@@ -235836,7 +235836,7 @@ var init_curve = __esm(() => {
|
|
235836
235836
|
pointWindowSizes = new WeakMap;
|
235837
235837
|
});
|
235838
235838
|
|
235839
|
-
// ../../node_modules
|
235839
|
+
// ../../node_modules/@noble/curves/esm/abstract/weierstrass.js
|
235840
235840
|
function validateSigVerOpts(opts) {
|
235841
235841
|
if (opts.lowS !== undefined)
|
235842
235842
|
abool("lowS", opts.lowS);
|
@@ -236733,7 +236733,7 @@ var init_weierstrass = __esm(() => {
|
|
236733
236733
|
_4n2 = BigInt(4);
|
236734
236734
|
});
|
236735
236735
|
|
236736
|
-
// ../../node_modules
|
236736
|
+
// ../../node_modules/@noble/curves/esm/_shortw_utils.js
|
236737
236737
|
function getHash(hash2) {
|
236738
236738
|
return {
|
236739
236739
|
hash: hash2,
|
@@ -236752,7 +236752,7 @@ var init__shortw_utils = __esm(() => {
|
|
236752
236752
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
236753
236753
|
});
|
236754
236754
|
|
236755
|
-
// ../../node_modules
|
236755
|
+
// ../../node_modules/@noble/curves/esm/abstract/hash-to-curve.js
|
236756
236756
|
function i2osp(value4, length) {
|
236757
236757
|
anum(value4);
|
236758
236758
|
anum(length);
|
@@ -236896,7 +236896,7 @@ var init_hash_to_curve = __esm(() => {
|
|
236896
236896
|
os2ip = bytesToNumberBE;
|
236897
236897
|
});
|
236898
236898
|
|
236899
|
-
// ../../node_modules
|
236899
|
+
// ../../node_modules/@noble/curves/esm/secp256k1.js
|
236900
236900
|
var exports_secp256k1 = {};
|
236901
236901
|
__export(exports_secp256k1, {
|
236902
236902
|
secp256k1: () => secp256k1,
|
@@ -240012,7 +240012,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
240012
240012
|
else
|
240013
240013
|
end = lineWidth - indentAtStart;
|
240014
240014
|
}
|
240015
|
-
let
|
240015
|
+
let split4 = undefined;
|
240016
240016
|
let prev = undefined;
|
240017
240017
|
let overflow = false;
|
240018
240018
|
let i7 = -1;
|
@@ -240046,20 +240046,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
240046
240046
|
if (mode === FOLD_BLOCK)
|
240047
240047
|
i7 = consumeMoreIndentedLines(text2, i7, indent2.length);
|
240048
240048
|
end = i7 + indent2.length + endStep;
|
240049
|
-
|
240049
|
+
split4 = undefined;
|
240050
240050
|
} else {
|
240051
240051
|
if (ch === " " && prev && prev !== " " && prev !== `
|
240052
240052
|
` && prev !== "\t") {
|
240053
240053
|
const next = text2[i7 + 1];
|
240054
240054
|
if (next && next !== " " && next !== `
|
240055
240055
|
` && next !== "\t")
|
240056
|
-
|
240056
|
+
split4 = i7;
|
240057
240057
|
}
|
240058
240058
|
if (i7 >= end) {
|
240059
|
-
if (
|
240060
|
-
folds.push(
|
240061
|
-
end =
|
240062
|
-
|
240059
|
+
if (split4) {
|
240060
|
+
folds.push(split4);
|
240061
|
+
end = split4 + endStep;
|
240062
|
+
split4 = undefined;
|
240063
240063
|
} else if (mode === FOLD_QUOTED) {
|
240064
240064
|
while (prev === " " || prev === "\t") {
|
240065
240065
|
prev = ch;
|
@@ -240072,7 +240072,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
240072
240072
|
folds.push(j4);
|
240073
240073
|
escapedFolds[j4] = true;
|
240074
240074
|
end = j4 + endStep;
|
240075
|
-
|
240075
|
+
split4 = undefined;
|
240076
240076
|
} else {
|
240077
240077
|
overflow = true;
|
240078
240078
|
}
|
@@ -243393,13 +243393,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
243393
243393
|
return { mode, indent: indent2, chomp, comment, length };
|
243394
243394
|
}
|
243395
243395
|
function splitLines(source) {
|
243396
|
-
const
|
243397
|
-
const first =
|
243396
|
+
const split4 = source.split(/\n( *)/);
|
243397
|
+
const first = split4[0];
|
243398
243398
|
const m8 = first.match(/^( *)/);
|
243399
243399
|
const line0 = m8?.[1] ? [m8[1], first.slice(m8[1].length)] : ["", first];
|
243400
243400
|
const lines2 = [line0];
|
243401
|
-
for (let i7 = 1;i7 <
|
243402
|
-
lines2.push([
|
243401
|
+
for (let i7 = 1;i7 < split4.length; i7 += 2)
|
243402
|
+
lines2.push([split4[i7], split4[i7 + 1]]);
|
243403
243403
|
return lines2;
|
243404
243404
|
}
|
243405
243405
|
exports.resolveBlockScalar = resolveBlockScalar;
|
@@ -262458,7 +262458,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
262458
262458
|
var package_default = {
|
262459
262459
|
name: "@settlemint/sdk-cli",
|
262460
262460
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
262461
|
-
version: "2.3.2-
|
262461
|
+
version: "2.3.2-prfabe9cf1",
|
262462
262462
|
type: "module",
|
262463
262463
|
private: false,
|
262464
262464
|
license: "FSL-1.1-MIT",
|
@@ -262507,8 +262507,8 @@ var package_default = {
|
|
262507
262507
|
"@inquirer/input": "4.1.10",
|
262508
262508
|
"@inquirer/password": "4.0.13",
|
262509
262509
|
"@inquirer/select": "4.2.1",
|
262510
|
-
"@settlemint/sdk-js": "2.3.2-
|
262511
|
-
"@settlemint/sdk-utils": "2.3.2-
|
262510
|
+
"@settlemint/sdk-js": "2.3.2-prfabe9cf1",
|
262511
|
+
"@settlemint/sdk-utils": "2.3.2-prfabe9cf1",
|
262512
262512
|
"@types/node": "22.15.21",
|
262513
262513
|
"@types/semver": "7.7.0",
|
262514
262514
|
"@types/which": "3.0.4",
|
@@ -262517,6 +262517,7 @@ var package_default = {
|
|
262517
262517
|
"is-in-ci": "1.0.0",
|
262518
262518
|
semver: "7.7.2",
|
262519
262519
|
slugify: "1.6.6",
|
262520
|
+
viem: "2.30.0",
|
262520
262521
|
which: "5.0.0",
|
262521
262522
|
yaml: "2.8.0",
|
262522
262523
|
yoctocolors: "2.1.1"
|
@@ -267243,7 +267244,9 @@ async function validateSdkVersionFromCommand(command, interval = 5 * 60 * 1000)
|
|
267243
267244
|
}
|
267244
267245
|
await setLastSdkVersionCheck(new Date(now).toJSON());
|
267245
267246
|
const instance = await getInstanceFromCommand(command);
|
267246
|
-
|
267247
|
+
if (instance !== "STANDALONE") {
|
267248
|
+
await validateSdkVersion(instance);
|
267249
|
+
}
|
267247
267250
|
}
|
267248
267251
|
async function validateSdkVersion(instance) {
|
267249
267252
|
const settlemint = createSettleMintClient({
|
@@ -272868,297 +272871,13 @@ async function simulateBlocks(client, parameters) {
|
|
272868
272871
|
init_exports();
|
272869
272872
|
init_Errors();
|
272870
272873
|
|
272871
|
-
// ../../node_modules/ox/node_modules/@noble/hashes/esm/_assert.js
|
272872
|
-
function anumber2(n6) {
|
272873
|
-
if (!Number.isSafeInteger(n6) || n6 < 0)
|
272874
|
-
throw new Error("positive integer expected, got " + n6);
|
272875
|
-
}
|
272876
|
-
function isBytes3(a7) {
|
272877
|
-
return a7 instanceof Uint8Array || ArrayBuffer.isView(a7) && a7.constructor.name === "Uint8Array";
|
272878
|
-
}
|
272879
|
-
function abytes3(b4, ...lengths) {
|
272880
|
-
if (!isBytes3(b4))
|
272881
|
-
throw new Error("Uint8Array expected");
|
272882
|
-
if (lengths.length > 0 && !lengths.includes(b4.length))
|
272883
|
-
throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b4.length);
|
272884
|
-
}
|
272885
|
-
function aexists2(instance, checkFinished = true) {
|
272886
|
-
if (instance.destroyed)
|
272887
|
-
throw new Error("Hash instance has been destroyed");
|
272888
|
-
if (checkFinished && instance.finished)
|
272889
|
-
throw new Error("Hash#digest() has already been called");
|
272890
|
-
}
|
272891
|
-
function aoutput2(out, instance) {
|
272892
|
-
abytes3(out);
|
272893
|
-
const min = instance.outputLen;
|
272894
|
-
if (out.length < min) {
|
272895
|
-
throw new Error("digestInto() expects output buffer of length at least " + min);
|
272896
|
-
}
|
272897
|
-
}
|
272898
|
-
|
272899
|
-
// ../../node_modules/ox/node_modules/@noble/hashes/esm/utils.js
|
272900
|
-
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
272901
|
-
function u322(arr) {
|
272902
|
-
return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
272903
|
-
}
|
272904
|
-
var isLE2 = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
|
272905
|
-
function byteSwap2(word2) {
|
272906
|
-
return word2 << 24 & 4278190080 | word2 << 8 & 16711680 | word2 >>> 8 & 65280 | word2 >>> 24 & 255;
|
272907
|
-
}
|
272908
|
-
function byteSwap322(arr) {
|
272909
|
-
for (let i6 = 0;i6 < arr.length; i6++) {
|
272910
|
-
arr[i6] = byteSwap2(arr[i6]);
|
272911
|
-
}
|
272912
|
-
}
|
272913
|
-
var hasHexBuiltin3 = typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function";
|
272914
|
-
function utf8ToBytes3(str) {
|
272915
|
-
if (typeof str !== "string")
|
272916
|
-
throw new Error("utf8ToBytes expected string, got " + typeof str);
|
272917
|
-
return new Uint8Array(new TextEncoder().encode(str));
|
272918
|
-
}
|
272919
|
-
function toBytes3(data) {
|
272920
|
-
if (typeof data === "string")
|
272921
|
-
data = utf8ToBytes3(data);
|
272922
|
-
abytes3(data);
|
272923
|
-
return data;
|
272924
|
-
}
|
272925
|
-
class Hash2 {
|
272926
|
-
clone() {
|
272927
|
-
return this._cloneInto();
|
272928
|
-
}
|
272929
|
-
}
|
272930
|
-
function wrapConstructor2(hashCons) {
|
272931
|
-
const hashC = (msg) => hashCons().update(toBytes3(msg)).digest();
|
272932
|
-
const tmp = hashCons();
|
272933
|
-
hashC.outputLen = tmp.outputLen;
|
272934
|
-
hashC.blockLen = tmp.blockLen;
|
272935
|
-
hashC.create = () => hashCons();
|
272936
|
-
return hashC;
|
272937
|
-
}
|
272938
|
-
function wrapXOFConstructorWithOpts2(hashCons) {
|
272939
|
-
const hashC = (msg, opts) => hashCons(opts).update(toBytes3(msg)).digest();
|
272940
|
-
const tmp = hashCons({});
|
272941
|
-
hashC.outputLen = tmp.outputLen;
|
272942
|
-
hashC.blockLen = tmp.blockLen;
|
272943
|
-
hashC.create = (opts) => hashCons(opts);
|
272944
|
-
return hashC;
|
272945
|
-
}
|
272946
|
-
|
272947
|
-
// ../../node_modules/ox/node_modules/@noble/hashes/esm/_u64.js
|
272948
|
-
var U32_MASK642 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
272949
|
-
var _32n2 = /* @__PURE__ */ BigInt(32);
|
272950
|
-
function fromBig2(n6, le4 = false) {
|
272951
|
-
if (le4)
|
272952
|
-
return { h: Number(n6 & U32_MASK642), l: Number(n6 >> _32n2 & U32_MASK642) };
|
272953
|
-
return { h: Number(n6 >> _32n2 & U32_MASK642) | 0, l: Number(n6 & U32_MASK642) | 0 };
|
272954
|
-
}
|
272955
|
-
function split4(lst, le4 = false) {
|
272956
|
-
let Ah = new Uint32Array(lst.length);
|
272957
|
-
let Al = new Uint32Array(lst.length);
|
272958
|
-
for (let i6 = 0;i6 < lst.length; i6++) {
|
272959
|
-
const { h: h8, l: l3 } = fromBig2(lst[i6], le4);
|
272960
|
-
[Ah[i6], Al[i6]] = [h8, l3];
|
272961
|
-
}
|
272962
|
-
return [Ah, Al];
|
272963
|
-
}
|
272964
|
-
var rotlSH2 = (h8, l3, s7) => h8 << s7 | l3 >>> 32 - s7;
|
272965
|
-
var rotlSL2 = (h8, l3, s7) => l3 << s7 | h8 >>> 32 - s7;
|
272966
|
-
var rotlBH2 = (h8, l3, s7) => l3 << s7 - 32 | h8 >>> 64 - s7;
|
272967
|
-
var rotlBL2 = (h8, l3, s7) => h8 << s7 - 32 | l3 >>> 64 - s7;
|
272968
|
-
|
272969
|
-
// ../../node_modules/ox/node_modules/@noble/hashes/esm/sha3.js
|
272970
|
-
var SHA3_PI2 = [];
|
272971
|
-
var SHA3_ROTL2 = [];
|
272972
|
-
var _SHA3_IOTA2 = [];
|
272973
|
-
var _0n7 = /* @__PURE__ */ BigInt(0);
|
272974
|
-
var _1n7 = /* @__PURE__ */ BigInt(1);
|
272975
|
-
var _2n5 = /* @__PURE__ */ BigInt(2);
|
272976
|
-
var _7n2 = /* @__PURE__ */ BigInt(7);
|
272977
|
-
var _256n2 = /* @__PURE__ */ BigInt(256);
|
272978
|
-
var _0x71n2 = /* @__PURE__ */ BigInt(113);
|
272979
|
-
for (let round = 0, R7 = _1n7, x6 = 1, y4 = 0;round < 24; round++) {
|
272980
|
-
[x6, y4] = [y4, (2 * x6 + 3 * y4) % 5];
|
272981
|
-
SHA3_PI2.push(2 * (5 * y4 + x6));
|
272982
|
-
SHA3_ROTL2.push((round + 1) * (round + 2) / 2 % 64);
|
272983
|
-
let t8 = _0n7;
|
272984
|
-
for (let j3 = 0;j3 < 7; j3++) {
|
272985
|
-
R7 = (R7 << _1n7 ^ (R7 >> _7n2) * _0x71n2) % _256n2;
|
272986
|
-
if (R7 & _2n5)
|
272987
|
-
t8 ^= _1n7 << (_1n7 << /* @__PURE__ */ BigInt(j3)) - _1n7;
|
272988
|
-
}
|
272989
|
-
_SHA3_IOTA2.push(t8);
|
272990
|
-
}
|
272991
|
-
var [SHA3_IOTA_H2, SHA3_IOTA_L2] = /* @__PURE__ */ split4(_SHA3_IOTA2, true);
|
272992
|
-
var rotlH2 = (h8, l3, s7) => s7 > 32 ? rotlBH2(h8, l3, s7) : rotlSH2(h8, l3, s7);
|
272993
|
-
var rotlL2 = (h8, l3, s7) => s7 > 32 ? rotlBL2(h8, l3, s7) : rotlSL2(h8, l3, s7);
|
272994
|
-
function keccakP2(s7, rounds = 24) {
|
272995
|
-
const B4 = new Uint32Array(5 * 2);
|
272996
|
-
for (let round = 24 - rounds;round < 24; round++) {
|
272997
|
-
for (let x6 = 0;x6 < 10; x6++)
|
272998
|
-
B4[x6] = s7[x6] ^ s7[x6 + 10] ^ s7[x6 + 20] ^ s7[x6 + 30] ^ s7[x6 + 40];
|
272999
|
-
for (let x6 = 0;x6 < 10; x6 += 2) {
|
273000
|
-
const idx1 = (x6 + 8) % 10;
|
273001
|
-
const idx0 = (x6 + 2) % 10;
|
273002
|
-
const B0 = B4[idx0];
|
273003
|
-
const B1 = B4[idx0 + 1];
|
273004
|
-
const Th = rotlH2(B0, B1, 1) ^ B4[idx1];
|
273005
|
-
const Tl = rotlL2(B0, B1, 1) ^ B4[idx1 + 1];
|
273006
|
-
for (let y4 = 0;y4 < 50; y4 += 10) {
|
273007
|
-
s7[x6 + y4] ^= Th;
|
273008
|
-
s7[x6 + y4 + 1] ^= Tl;
|
273009
|
-
}
|
273010
|
-
}
|
273011
|
-
let curH = s7[2];
|
273012
|
-
let curL = s7[3];
|
273013
|
-
for (let t8 = 0;t8 < 24; t8++) {
|
273014
|
-
const shift = SHA3_ROTL2[t8];
|
273015
|
-
const Th = rotlH2(curH, curL, shift);
|
273016
|
-
const Tl = rotlL2(curH, curL, shift);
|
273017
|
-
const PI = SHA3_PI2[t8];
|
273018
|
-
curH = s7[PI];
|
273019
|
-
curL = s7[PI + 1];
|
273020
|
-
s7[PI] = Th;
|
273021
|
-
s7[PI + 1] = Tl;
|
273022
|
-
}
|
273023
|
-
for (let y4 = 0;y4 < 50; y4 += 10) {
|
273024
|
-
for (let x6 = 0;x6 < 10; x6++)
|
273025
|
-
B4[x6] = s7[y4 + x6];
|
273026
|
-
for (let x6 = 0;x6 < 10; x6++)
|
273027
|
-
s7[y4 + x6] ^= ~B4[(x6 + 2) % 10] & B4[(x6 + 4) % 10];
|
273028
|
-
}
|
273029
|
-
s7[0] ^= SHA3_IOTA_H2[round];
|
273030
|
-
s7[1] ^= SHA3_IOTA_L2[round];
|
273031
|
-
}
|
273032
|
-
B4.fill(0);
|
273033
|
-
}
|
273034
|
-
|
273035
|
-
class Keccak2 extends Hash2 {
|
273036
|
-
constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
|
273037
|
-
super();
|
273038
|
-
this.pos = 0;
|
273039
|
-
this.posOut = 0;
|
273040
|
-
this.finished = false;
|
273041
|
-
this.destroyed = false;
|
273042
|
-
this.enableXOF = false;
|
273043
|
-
this.blockLen = blockLen;
|
273044
|
-
this.suffix = suffix;
|
273045
|
-
this.outputLen = outputLen;
|
273046
|
-
this.enableXOF = enableXOF;
|
273047
|
-
this.rounds = rounds;
|
273048
|
-
anumber2(outputLen);
|
273049
|
-
if (0 >= this.blockLen || this.blockLen >= 200)
|
273050
|
-
throw new Error("Sha3 supports only keccak-f1600 function");
|
273051
|
-
this.state = new Uint8Array(200);
|
273052
|
-
this.state32 = u322(this.state);
|
273053
|
-
}
|
273054
|
-
keccak() {
|
273055
|
-
if (!isLE2)
|
273056
|
-
byteSwap322(this.state32);
|
273057
|
-
keccakP2(this.state32, this.rounds);
|
273058
|
-
if (!isLE2)
|
273059
|
-
byteSwap322(this.state32);
|
273060
|
-
this.posOut = 0;
|
273061
|
-
this.pos = 0;
|
273062
|
-
}
|
273063
|
-
update(data) {
|
273064
|
-
aexists2(this);
|
273065
|
-
const { blockLen, state } = this;
|
273066
|
-
data = toBytes3(data);
|
273067
|
-
const len = data.length;
|
273068
|
-
for (let pos = 0;pos < len; ) {
|
273069
|
-
const take2 = Math.min(blockLen - this.pos, len - pos);
|
273070
|
-
for (let i6 = 0;i6 < take2; i6++)
|
273071
|
-
state[this.pos++] ^= data[pos++];
|
273072
|
-
if (this.pos === blockLen)
|
273073
|
-
this.keccak();
|
273074
|
-
}
|
273075
|
-
return this;
|
273076
|
-
}
|
273077
|
-
finish() {
|
273078
|
-
if (this.finished)
|
273079
|
-
return;
|
273080
|
-
this.finished = true;
|
273081
|
-
const { state, suffix, pos, blockLen } = this;
|
273082
|
-
state[pos] ^= suffix;
|
273083
|
-
if ((suffix & 128) !== 0 && pos === blockLen - 1)
|
273084
|
-
this.keccak();
|
273085
|
-
state[blockLen - 1] ^= 128;
|
273086
|
-
this.keccak();
|
273087
|
-
}
|
273088
|
-
writeInto(out) {
|
273089
|
-
aexists2(this, false);
|
273090
|
-
abytes3(out);
|
273091
|
-
this.finish();
|
273092
|
-
const bufferOut = this.state;
|
273093
|
-
const { blockLen } = this;
|
273094
|
-
for (let pos = 0, len = out.length;pos < len; ) {
|
273095
|
-
if (this.posOut >= blockLen)
|
273096
|
-
this.keccak();
|
273097
|
-
const take2 = Math.min(blockLen - this.posOut, len - pos);
|
273098
|
-
out.set(bufferOut.subarray(this.posOut, this.posOut + take2), pos);
|
273099
|
-
this.posOut += take2;
|
273100
|
-
pos += take2;
|
273101
|
-
}
|
273102
|
-
return out;
|
273103
|
-
}
|
273104
|
-
xofInto(out) {
|
273105
|
-
if (!this.enableXOF)
|
273106
|
-
throw new Error("XOF is not possible for this instance");
|
273107
|
-
return this.writeInto(out);
|
273108
|
-
}
|
273109
|
-
xof(bytes) {
|
273110
|
-
anumber2(bytes);
|
273111
|
-
return this.xofInto(new Uint8Array(bytes));
|
273112
|
-
}
|
273113
|
-
digestInto(out) {
|
273114
|
-
aoutput2(out, this);
|
273115
|
-
if (this.finished)
|
273116
|
-
throw new Error("digest() was already called");
|
273117
|
-
this.writeInto(out);
|
273118
|
-
this.destroy();
|
273119
|
-
return out;
|
273120
|
-
}
|
273121
|
-
digest() {
|
273122
|
-
return this.digestInto(new Uint8Array(this.outputLen));
|
273123
|
-
}
|
273124
|
-
destroy() {
|
273125
|
-
this.destroyed = true;
|
273126
|
-
this.state.fill(0);
|
273127
|
-
}
|
273128
|
-
_cloneInto(to) {
|
273129
|
-
const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
|
273130
|
-
to || (to = new Keccak2(blockLen, suffix, outputLen, enableXOF, rounds));
|
273131
|
-
to.state32.set(this.state32);
|
273132
|
-
to.pos = this.pos;
|
273133
|
-
to.posOut = this.posOut;
|
273134
|
-
to.finished = this.finished;
|
273135
|
-
to.rounds = rounds;
|
273136
|
-
to.suffix = suffix;
|
273137
|
-
to.outputLen = outputLen;
|
273138
|
-
to.enableXOF = enableXOF;
|
273139
|
-
to.destroyed = this.destroyed;
|
273140
|
-
return to;
|
273141
|
-
}
|
273142
|
-
}
|
273143
|
-
var gen2 = (suffix, blockLen, outputLen) => wrapConstructor2(() => new Keccak2(blockLen, suffix, outputLen));
|
273144
|
-
var sha3_2242 = /* @__PURE__ */ gen2(6, 144, 224 / 8);
|
273145
|
-
var sha3_2562 = /* @__PURE__ */ gen2(6, 136, 256 / 8);
|
273146
|
-
var sha3_3842 = /* @__PURE__ */ gen2(6, 104, 384 / 8);
|
273147
|
-
var sha3_5122 = /* @__PURE__ */ gen2(6, 72, 512 / 8);
|
273148
|
-
var keccak_2242 = /* @__PURE__ */ gen2(1, 144, 224 / 8);
|
273149
|
-
var keccak_2562 = /* @__PURE__ */ gen2(1, 136, 256 / 8);
|
273150
|
-
var keccak_3842 = /* @__PURE__ */ gen2(1, 104, 384 / 8);
|
273151
|
-
var keccak_5122 = /* @__PURE__ */ gen2(1, 72, 512 / 8);
|
273152
|
-
var genShake2 = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts2((opts = {}) => new Keccak2(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));
|
273153
|
-
var shake1282 = /* @__PURE__ */ genShake2(31, 168, 128 / 8);
|
273154
|
-
var shake2562 = /* @__PURE__ */ genShake2(31, 136, 256 / 8);
|
273155
|
-
|
273156
272874
|
// ../../node_modules/ox/_esm/core/Hash.js
|
272875
|
+
init_sha3();
|
273157
272876
|
init_Bytes();
|
273158
272877
|
init_Hex();
|
273159
272878
|
function keccak2562(value4, options = {}) {
|
273160
272879
|
const { as = typeof value4 === "string" ? "Hex" : "Bytes" } = options;
|
273161
|
-
const bytes =
|
272880
|
+
const bytes = keccak_256(from(value4));
|
273162
272881
|
if (as === "Bytes")
|
273163
272882
|
return bytes;
|
273164
272883
|
return fromBytes(bytes);
|
@@ -275046,6 +274765,9 @@ function createPublicClient(parameters) {
|
|
275046
274765
|
});
|
275047
274766
|
return client.extend(publicActions);
|
275048
274767
|
}
|
274768
|
+
// ../../node_modules/viem/_esm/index.js
|
274769
|
+
init_isAddress();
|
274770
|
+
|
275049
274771
|
// ../viem/dist/viem.mjs
|
275050
274772
|
var u6 = ((r6) => (r6.PINCODE = "PINCODE", r6.OTP = "OTP", r6.SECRET_CODES = "SECRET_CODES", r6))(u6 || {});
|
275051
274773
|
var g5 = ((i6) => (i6.SHA1 = "SHA1", i6.SHA224 = "SHA224", i6.SHA256 = "SHA256", i6.SHA384 = "SHA384", i6.SHA512 = "SHA512", i6.SHA3_224 = "SHA3-224", i6.SHA3_256 = "SHA3-256", i6.SHA3_384 = "SHA3-384", i6.SHA3_512 = "SHA3-512", i6))(g5 || {});
|
@@ -275957,7 +275679,7 @@ async function workspaceSpinner(settlemint) {
|
|
275957
275679
|
}
|
275958
275680
|
|
275959
275681
|
// src/spinners/write-env.spinner.ts
|
275960
|
-
async function writeEnvSpinner(prod, env2) {
|
275682
|
+
async function writeEnvSpinner(prod, env2, cwd) {
|
275961
275683
|
return spinner({
|
275962
275684
|
startMessage: "Saving .env and .env.local files",
|
275963
275685
|
stopMessage: "Written .env and .env.local file",
|
@@ -275971,7 +275693,8 @@ async function writeEnvSpinner(prod, env2) {
|
|
275971
275693
|
await writeEnv({
|
275972
275694
|
prod,
|
275973
275695
|
env: updatedSecrets,
|
275974
|
-
secrets: true
|
275696
|
+
secrets: true,
|
275697
|
+
cwd
|
275975
275698
|
});
|
275976
275699
|
const updatedEnv = {
|
275977
275700
|
SETTLEMINT_INSTANCE: env2.SETTLEMINT_INSTANCE,
|
@@ -276013,7 +275736,8 @@ async function writeEnvSpinner(prod, env2) {
|
|
276013
275736
|
await writeEnv({
|
276014
275737
|
prod,
|
276015
275738
|
env: updatedEnv,
|
276016
|
-
secrets: false
|
275739
|
+
secrets: false,
|
275740
|
+
cwd
|
276017
275741
|
});
|
276018
275742
|
}
|
276019
275743
|
});
|
@@ -276136,6 +275860,65 @@ function getHdPrivateKeyEnv(service) {
|
|
276136
275860
|
};
|
276137
275861
|
}
|
276138
275862
|
|
275863
|
+
// ../utils/dist/logging.mjs
|
275864
|
+
var maskTokens4 = (output) => {
|
275865
|
+
return output.replace(/sm_(pat|aat|sat)_[0-9a-zA-Z]+/g, "***");
|
275866
|
+
};
|
275867
|
+
function createLogger(options = {}) {
|
275868
|
+
const { level = "warn", prefix = "" } = options;
|
275869
|
+
const logLevels = {
|
275870
|
+
debug: 0,
|
275871
|
+
info: 1,
|
275872
|
+
warn: 2,
|
275873
|
+
error: 3,
|
275874
|
+
none: 4
|
275875
|
+
};
|
275876
|
+
const currentLevelValue = logLevels[level];
|
275877
|
+
const formatArgs = (args) => {
|
275878
|
+
if (args.length === 0 || args.every((arg) => arg === undefined || arg === null)) {
|
275879
|
+
return "";
|
275880
|
+
}
|
275881
|
+
const formatted = args.map((arg) => {
|
275882
|
+
if (arg instanceof Error) {
|
275883
|
+
return `
|
275884
|
+
${arg.stack || arg.message}`;
|
275885
|
+
}
|
275886
|
+
if (typeof arg === "object" && arg !== null) {
|
275887
|
+
return `
|
275888
|
+
${JSON.stringify(arg, null, 2)}`;
|
275889
|
+
}
|
275890
|
+
return ` ${String(arg)}`;
|
275891
|
+
}).join("");
|
275892
|
+
return `, args:${formatted}`;
|
275893
|
+
};
|
275894
|
+
const shouldLog = (level2) => {
|
275895
|
+
return logLevels[level2] >= currentLevelValue;
|
275896
|
+
};
|
275897
|
+
return {
|
275898
|
+
debug: (message, ...args) => {
|
275899
|
+
if (shouldLog("debug")) {
|
275900
|
+
console.debug(`\x1B[32m${prefix}[DEBUG] ${maskTokens4(message)}${maskTokens4(formatArgs(args))}\x1B[0m`);
|
275901
|
+
}
|
275902
|
+
},
|
275903
|
+
info: (message, ...args) => {
|
275904
|
+
if (shouldLog("info")) {
|
275905
|
+
console.info(`\x1B[34m${prefix}[INFO] ${maskTokens4(message)}${maskTokens4(formatArgs(args))}\x1B[0m`);
|
275906
|
+
}
|
275907
|
+
},
|
275908
|
+
warn: (message, ...args) => {
|
275909
|
+
if (shouldLog("warn")) {
|
275910
|
+
console.warn(`\x1B[33m${prefix}[WARN] ${maskTokens4(message)}${maskTokens4(formatArgs(args))}\x1B[0m`);
|
275911
|
+
}
|
275912
|
+
},
|
275913
|
+
error: (message, ...args) => {
|
275914
|
+
if (shouldLog("error")) {
|
275915
|
+
console.error(`\x1B[31m${prefix}[ERROR] ${maskTokens4(message)}${maskTokens4(formatArgs(args))}\x1B[0m`);
|
275916
|
+
}
|
275917
|
+
}
|
275918
|
+
};
|
275919
|
+
}
|
275920
|
+
var logger = createLogger();
|
275921
|
+
|
276139
275922
|
// src/commands/connect.ts
|
276140
275923
|
function connectCommand() {
|
276141
275924
|
return new Command("connect").option("--prod", "Connect to your production environment").option("-a, --accept-defaults", "Accept the default and previously set values").option("-i, --instance <instance>", "The instance to connect to (defaults to the instance in the .env file). Use 'standalone' if your resources are not deployed on the SettleMint platform").description("Connects your dApp to your application").usage(createExamples([
|
@@ -276466,11 +276249,23 @@ async function connectToStandalone(env2, acceptDefaults, prod) {
|
|
276466
276249
|
});
|
276467
276250
|
selectedServices[id] = {
|
276468
276251
|
label: prompt.label,
|
276469
|
-
result
|
276252
|
+
result,
|
276253
|
+
isSecret
|
276470
276254
|
};
|
276471
276255
|
}
|
276472
276256
|
if (acceptDefaults) {
|
276473
|
-
table("Selected services", Object.values(selectedServices).
|
276257
|
+
table("Selected services", Object.values(selectedServices).map((item) => {
|
276258
|
+
if (item.isSecret) {
|
276259
|
+
return {
|
276260
|
+
...item,
|
276261
|
+
result: "********"
|
276262
|
+
};
|
276263
|
+
}
|
276264
|
+
return {
|
276265
|
+
...item,
|
276266
|
+
result: item.result ? maskTokens4(item.result) : undefined
|
276267
|
+
};
|
276268
|
+
}).filter(Boolean));
|
276474
276269
|
}
|
276475
276270
|
await writeEnvSpinner(!!prod, {
|
276476
276271
|
SETTLEMINT_INSTANCE: STANDALONE_INSTANCE2,
|
@@ -283536,6 +283331,17 @@ async function addressPrompt({
|
|
283536
283331
|
node,
|
283537
283332
|
hardhatConfig
|
283538
283333
|
}) {
|
283334
|
+
if (!node) {
|
283335
|
+
return esm_default2({
|
283336
|
+
message: "Which private key address do you want to deploy from?",
|
283337
|
+
validate: (value4) => {
|
283338
|
+
if (!isAddress(value4)) {
|
283339
|
+
return "Invalid address";
|
283340
|
+
}
|
283341
|
+
return true;
|
283342
|
+
}
|
283343
|
+
});
|
283344
|
+
}
|
283539
283345
|
const possiblePrivateKeys = node.privateKeys?.filter(isValidPrivateKey) ?? [];
|
283540
283346
|
const defaultAddress = hardhatConfig.networks?.btp?.from ?? possiblePrivateKeys[0]?.address;
|
283541
283347
|
const defaultPossible = accept && defaultAddress;
|
@@ -283634,19 +283440,25 @@ function hardhatDeployRemoteCommand() {
|
|
283634
283440
|
await validateIfRequiredPackagesAreInstalled(["hardhat"]);
|
283635
283441
|
const autoAccept = !!acceptDefaults || is_in_ci_default;
|
283636
283442
|
const env2 = await loadEnv(false, !!prod);
|
283443
|
+
let node;
|
283444
|
+
let envHardhatConfig = {};
|
283637
283445
|
const instance = await instancePrompt(env2, true);
|
283638
|
-
|
283639
|
-
|
283640
|
-
|
283641
|
-
|
283642
|
-
|
283643
|
-
|
283644
|
-
|
283645
|
-
|
283646
|
-
|
283647
|
-
|
283648
|
-
|
283649
|
-
|
283446
|
+
if (instance === STANDALONE_INSTANCE2) {
|
283447
|
+
envHardhatConfig.BTP_RPC_URL = env2.SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT ?? "";
|
283448
|
+
} else {
|
283449
|
+
const accessToken = await getApplicationOrPersonalAccessToken({
|
283450
|
+
env: env2,
|
283451
|
+
instance,
|
283452
|
+
prefer: "application"
|
283453
|
+
});
|
283454
|
+
const settlemint = createSettleMintClient({
|
283455
|
+
accessToken,
|
283456
|
+
instance
|
283457
|
+
});
|
283458
|
+
const node2 = await selectTargetNode({ env: env2, blockchainNodeUniqueName, autoAccept, settlemint });
|
283459
|
+
envHardhatConfig = await settlemint.foundry.env(node2.uniqueName);
|
283460
|
+
}
|
283461
|
+
const hardhatConfig = await getHardhatConfigData(envHardhatConfig);
|
283650
283462
|
if (verify && !hardhatConfig?.etherscan?.apiKey) {
|
283651
283463
|
cancel2("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardhat.config.ts file");
|
283652
283464
|
}
|
@@ -283674,7 +283486,7 @@ function hardhatDeployRemoteCommand() {
|
|
283674
283486
|
"--default-sender",
|
283675
283487
|
address,
|
283676
283488
|
module ?? "ignition/modules/main.ts"
|
283677
|
-
].filter(Boolean), { env:
|
283489
|
+
].filter(Boolean), { env: envHardhatConfig });
|
283678
283490
|
const outputStr = output.join(`
|
283679
283491
|
`);
|
283680
283492
|
if (!outputStr.includes("Deploy cancelled")) {
|
@@ -284320,4 +284132,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
284320
284132
|
// src/cli.ts
|
284321
284133
|
sdkCliCommand();
|
284322
284134
|
|
284323
|
-
//# debugId=
|
284135
|
+
//# debugId=1C4CE70BF4F8C6A164756E2164756E21
|