@settlemint/sdk-cli 2.1.4-pr66a97677 → 2.1.4-pr734908a7
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 +279 -63
- package/dist/cli.js.map +24 -22
- package/package.json +3 -3
package/dist/cli.js
CHANGED
@@ -4157,7 +4157,7 @@ var require_webcrypto = __commonJS((exports) => {
|
|
4157
4157
|
exports.gcm = /* @__PURE__ */ (() => generate(mode.GCM))();
|
4158
4158
|
});
|
4159
4159
|
|
4160
|
-
// ../../node_modules/@noble/hashes/_assert.js
|
4160
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/_assert.js
|
4161
4161
|
var require__assert2 = __commonJS((exports) => {
|
4162
4162
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4163
4163
|
exports.anumber = anumber;
|
@@ -4199,7 +4199,7 @@ var require__assert2 = __commonJS((exports) => {
|
|
4199
4199
|
}
|
4200
4200
|
});
|
4201
4201
|
|
4202
|
-
// ../../node_modules/@noble/hashes/cryptoNode.js
|
4202
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/cryptoNode.js
|
4203
4203
|
var require_cryptoNode2 = __commonJS((exports) => {
|
4204
4204
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4205
4205
|
exports.crypto = undefined;
|
@@ -4207,7 +4207,7 @@ var require_cryptoNode2 = __commonJS((exports) => {
|
|
4207
4207
|
exports.crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
|
4208
4208
|
});
|
4209
4209
|
|
4210
|
-
// ../../node_modules/@noble/hashes/utils.js
|
4210
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/utils.js
|
4211
4211
|
var require_utils4 = __commonJS((exports) => {
|
4212
4212
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
4213
4213
|
Object.defineProperty(exports, "__esModule", { value: true });
|
@@ -4386,7 +4386,7 @@ var require_utils4 = __commonJS((exports) => {
|
|
4386
4386
|
}
|
4387
4387
|
});
|
4388
4388
|
|
4389
|
-
// ../../node_modules/@noble/hashes/_md.js
|
4389
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/_md.js
|
4390
4390
|
var require__md = __commonJS((exports) => {
|
4391
4391
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4392
4392
|
exports.HashMD = undefined;
|
@@ -4503,7 +4503,7 @@ var require__md = __commonJS((exports) => {
|
|
4503
4503
|
exports.HashMD = HashMD;
|
4504
4504
|
});
|
4505
4505
|
|
4506
|
-
// ../../node_modules/@noble/hashes/_u64.js
|
4506
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/_u64.js
|
4507
4507
|
var require__u64 = __commonJS((exports) => {
|
4508
4508
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4509
4509
|
exports.add5L = exports.add5H = exports.add4H = exports.add4L = exports.add3H = exports.add3L = exports.rotlBL = exports.rotlBH = exports.rotlSL = exports.rotlSH = exports.rotr32L = exports.rotr32H = exports.rotrBL = exports.rotrBH = exports.rotrSL = exports.rotrSH = exports.shrSL = exports.shrSH = exports.toBig = undefined;
|
@@ -4595,7 +4595,7 @@ var require__u64 = __commonJS((exports) => {
|
|
4595
4595
|
exports.default = u64;
|
4596
4596
|
});
|
4597
4597
|
|
4598
|
-
// ../../node_modules/@noble/hashes/sha512.js
|
4598
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/sha512.js
|
4599
4599
|
var require_sha512 = __commonJS((exports) => {
|
4600
4600
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4601
4601
|
exports.sha384 = exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.SHA384 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA512 = undefined;
|
@@ -4876,7 +4876,7 @@ var require_sha512 = __commonJS((exports) => {
|
|
4876
4876
|
exports.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA384);
|
4877
4877
|
});
|
4878
4878
|
|
4879
|
-
// ../../node_modules/@noble/curves/abstract/utils.js
|
4879
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/utils.js
|
4880
4880
|
var require_utils5 = __commonJS((exports) => {
|
4881
4881
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
4882
4882
|
Object.defineProperty(exports, "__esModule", { value: true });
|
@@ -5146,7 +5146,7 @@ var require_utils5 = __commonJS((exports) => {
|
|
5146
5146
|
}
|
5147
5147
|
});
|
5148
5148
|
|
5149
|
-
// ../../node_modules/@noble/curves/abstract/modular.js
|
5149
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/modular.js
|
5150
5150
|
var require_modular = __commonJS((exports) => {
|
5151
5151
|
Object.defineProperty(exports, "__esModule", { value: true });
|
5152
5152
|
exports.isNegativeLE = undefined;
|
@@ -5481,7 +5481,7 @@ var require_modular = __commonJS((exports) => {
|
|
5481
5481
|
}
|
5482
5482
|
});
|
5483
5483
|
|
5484
|
-
// ../../node_modules/@noble/curves/abstract/curve.js
|
5484
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/curve.js
|
5485
5485
|
var require_curve = __commonJS((exports) => {
|
5486
5486
|
Object.defineProperty(exports, "__esModule", { value: true });
|
5487
5487
|
exports.wNAF = wNAF;
|
@@ -5723,7 +5723,7 @@ var require_curve = __commonJS((exports) => {
|
|
5723
5723
|
}
|
5724
5724
|
});
|
5725
5725
|
|
5726
|
-
// ../../node_modules/@noble/curves/abstract/edwards.js
|
5726
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/edwards.js
|
5727
5727
|
var require_edwards = __commonJS((exports) => {
|
5728
5728
|
Object.defineProperty(exports, "__esModule", { value: true });
|
5729
5729
|
exports.twistedEdwards = twistedEdwards;
|
@@ -6085,7 +6085,7 @@ var require_edwards = __commonJS((exports) => {
|
|
6085
6085
|
}
|
6086
6086
|
});
|
6087
6087
|
|
6088
|
-
// ../../node_modules/@noble/curves/abstract/hash-to-curve.js
|
6088
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/hash-to-curve.js
|
6089
6089
|
var require_hash_to_curve = __commonJS((exports) => {
|
6090
6090
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6091
6091
|
exports.expand_message_xmd = expand_message_xmd;
|
@@ -6232,7 +6232,7 @@ var require_hash_to_curve = __commonJS((exports) => {
|
|
6232
6232
|
}
|
6233
6233
|
});
|
6234
6234
|
|
6235
|
-
// ../../node_modules/@noble/curves/abstract/montgomery.js
|
6235
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/montgomery.js
|
6236
6236
|
var require_montgomery = __commonJS((exports) => {
|
6237
6237
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6238
6238
|
exports.montgomery = montgomery;
|
@@ -6357,7 +6357,7 @@ var require_montgomery = __commonJS((exports) => {
|
|
6357
6357
|
}
|
6358
6358
|
});
|
6359
6359
|
|
6360
|
-
// ../../node_modules/@noble/curves/ed25519.js
|
6360
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/ed25519.js
|
6361
6361
|
var require_ed25519 = __commonJS((exports) => {
|
6362
6362
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6363
6363
|
exports.hash_to_ristretto255 = exports.hashToRistretto255 = exports.RistrettoPoint = exports.encodeToCurve = exports.hashToCurve = exports.edwardsToMontgomery = exports.x25519 = exports.ed25519ph = exports.ed25519ctx = exports.ed25519 = exports.ED25519_TORSION_SUBGROUP = undefined;
|
@@ -6724,7 +6724,7 @@ var require_ed25519 = __commonJS((exports) => {
|
|
6724
6724
|
exports.hash_to_ristretto255 = exports.hashToRistretto255;
|
6725
6725
|
});
|
6726
6726
|
|
6727
|
-
// ../../node_modules/@noble/hashes/sha256.js
|
6727
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/sha256.js
|
6728
6728
|
var require_sha256 = __commonJS((exports) => {
|
6729
6729
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6730
6730
|
exports.sha224 = exports.sha256 = exports.SHA256 = undefined;
|
@@ -6897,7 +6897,7 @@ var require_sha256 = __commonJS((exports) => {
|
|
6897
6897
|
exports.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA224);
|
6898
6898
|
});
|
6899
6899
|
|
6900
|
-
// ../../node_modules/@noble/hashes/hmac.js
|
6900
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/hmac.js
|
6901
6901
|
var require_hmac = __commonJS((exports) => {
|
6902
6902
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6903
6903
|
exports.hmac = exports.HMAC = undefined;
|
@@ -6971,7 +6971,7 @@ var require_hmac = __commonJS((exports) => {
|
|
6971
6971
|
exports.hmac.create = (hash, key) => new HMAC(hash, key);
|
6972
6972
|
});
|
6973
6973
|
|
6974
|
-
// ../../node_modules/@noble/curves/abstract/weierstrass.js
|
6974
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/weierstrass.js
|
6975
6975
|
var require_weierstrass = __commonJS((exports) => {
|
6976
6976
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6977
6977
|
exports.DER = exports.DERErr = undefined;
|
@@ -7878,7 +7878,7 @@ var require_weierstrass = __commonJS((exports) => {
|
|
7878
7878
|
}
|
7879
7879
|
});
|
7880
7880
|
|
7881
|
-
// ../../node_modules/@noble/curves/_shortw_utils.js
|
7881
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/_shortw_utils.js
|
7882
7882
|
var require__shortw_utils = __commonJS((exports) => {
|
7883
7883
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7884
7884
|
exports.getHash = getHash;
|
@@ -7900,7 +7900,7 @@ var require__shortw_utils = __commonJS((exports) => {
|
|
7900
7900
|
}
|
7901
7901
|
});
|
7902
7902
|
|
7903
|
-
// ../../node_modules/@noble/curves/secp256k1.js
|
7903
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/secp256k1.js
|
7904
7904
|
var require_secp256k1 = __commonJS((exports) => {
|
7905
7905
|
Object.defineProperty(exports, "__esModule", { value: true });
|
7906
7906
|
exports.encodeToCurve = exports.hashToCurve = exports.schnorr = exports.secp256k1 = undefined;
|
@@ -8226,7 +8226,7 @@ var require_elliptic = __commonJS((exports) => {
|
|
8226
8226
|
};
|
8227
8227
|
});
|
8228
8228
|
|
8229
|
-
// ../../node_modules/@noble/hashes/hkdf.js
|
8229
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/hkdf.js
|
8230
8230
|
var require_hkdf = __commonJS((exports) => {
|
8231
8231
|
Object.defineProperty(exports, "__esModule", { value: true });
|
8232
8232
|
exports.hkdf = undefined;
|
@@ -245084,8 +245084,11 @@ var DotEnvSchema = z.object({
|
|
245084
245084
|
SETTLEMINT_WORKSPACE: UniqueNameSchema.optional(),
|
245085
245085
|
SETTLEMINT_APPLICATION: UniqueNameSchema.optional(),
|
245086
245086
|
SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema.optional(),
|
245087
|
+
SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID: z.string().optional(),
|
245087
245088
|
SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema.optional(),
|
245089
|
+
SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT: UrlSchema.optional(),
|
245088
245090
|
SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: UniqueNameSchema.optional(),
|
245091
|
+
SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT: UrlSchema.optional(),
|
245089
245092
|
SETTLEMINT_HASURA: UniqueNameSchema.optional(),
|
245090
245093
|
SETTLEMINT_HASURA_ENDPOINT: UrlSchema.optional(),
|
245091
245094
|
SETTLEMINT_HASURA_ADMIN_SECRET: z.string().optional(),
|
@@ -245278,7 +245281,7 @@ function pruneCurrentEnv(currentEnv, env2) {
|
|
245278
245281
|
var package_default = {
|
245279
245282
|
name: "@settlemint/sdk-cli",
|
245280
245283
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
245281
|
-
version: "2.1.4-
|
245284
|
+
version: "2.1.4-pr734908a7",
|
245282
245285
|
type: "module",
|
245283
245286
|
private: false,
|
245284
245287
|
license: "FSL-1.1-MIT",
|
@@ -245327,8 +245330,8 @@ var package_default = {
|
|
245327
245330
|
"@inquirer/input": "4.1.9",
|
245328
245331
|
"@inquirer/password": "4.0.12",
|
245329
245332
|
"@inquirer/select": "4.1.1",
|
245330
|
-
"@settlemint/sdk-js": "2.1.4-
|
245331
|
-
"@settlemint/sdk-utils": "2.1.4-
|
245333
|
+
"@settlemint/sdk-js": "2.1.4-pr734908a7",
|
245334
|
+
"@settlemint/sdk-utils": "2.1.4-pr734908a7",
|
245332
245335
|
"@types/node": "22.14.1",
|
245333
245336
|
"@types/semver": "7.7.0",
|
245334
245337
|
"@types/which": "3.0.4",
|
@@ -246741,8 +246744,11 @@ var DotEnvSchema2 = z.object({
|
|
246741
246744
|
SETTLEMINT_WORKSPACE: UniqueNameSchema2.optional(),
|
246742
246745
|
SETTLEMINT_APPLICATION: UniqueNameSchema2.optional(),
|
246743
246746
|
SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema2.optional(),
|
246747
|
+
SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID: z.string().optional(),
|
246744
246748
|
SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema2.optional(),
|
246749
|
+
SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT: UrlSchema2.optional(),
|
246745
246750
|
SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: UniqueNameSchema2.optional(),
|
246751
|
+
SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT: UrlSchema2.optional(),
|
246746
246752
|
SETTLEMINT_HASURA: UniqueNameSchema2.optional(),
|
246747
246753
|
SETTLEMINT_HASURA_ENDPOINT: UrlSchema2.optional(),
|
246748
246754
|
SETTLEMINT_HASURA_ADMIN_SECRET: z.string().optional(),
|
@@ -247641,11 +247647,61 @@ var BlockchainNetworkFragment = graphql(`
|
|
247641
247647
|
healthStatus
|
247642
247648
|
provider
|
247643
247649
|
region
|
247650
|
+
... on BesuQBFTBlockchainNetwork {
|
247651
|
+
chainId
|
247652
|
+
}
|
247653
|
+
... on BesuIbftv2BlockchainNetwork {
|
247654
|
+
chainId
|
247655
|
+
}
|
247656
|
+
... on GethPoWBlockchainNetwork {
|
247657
|
+
chainId
|
247658
|
+
}
|
247659
|
+
... on GethPoSRinkebyBlockchainNetwork {
|
247660
|
+
chainId
|
247661
|
+
}
|
247662
|
+
... on GethVenidiumBlockchainNetwork {
|
247663
|
+
chainId
|
247664
|
+
}
|
247665
|
+
... on GethGoerliBlockchainNetwork {
|
247666
|
+
chainId
|
247667
|
+
}
|
247668
|
+
... on AvalancheBlockchainNetwork {
|
247669
|
+
chainId
|
247670
|
+
}
|
247671
|
+
... on AvalancheFujiBlockchainNetwork {
|
247672
|
+
chainId
|
247673
|
+
}
|
247674
|
+
... on BscPoWBlockchainNetwork {
|
247675
|
+
chainId
|
247676
|
+
}
|
247677
|
+
... on BscPoWTestnetBlockchainNetwork {
|
247678
|
+
chainId
|
247679
|
+
}
|
247680
|
+
... on PolygonBlockchainNetwork {
|
247681
|
+
chainId
|
247682
|
+
}
|
247683
|
+
... on PolygonMumbaiBlockchainNetwork {
|
247684
|
+
chainId
|
247685
|
+
}
|
247686
|
+
... on PolygonEdgePoABlockchainNetwork {
|
247687
|
+
chainId
|
247688
|
+
}
|
247689
|
+
... on QuorumQBFTBlockchainNetwork {
|
247690
|
+
chainId
|
247691
|
+
}
|
247692
|
+
... on GethCliqueBlockchainNetwork {
|
247693
|
+
chainId
|
247694
|
+
}
|
247644
247695
|
blockchainNodes {
|
247645
247696
|
... on BlockchainNode {
|
247646
247697
|
id
|
247647
247698
|
name
|
247648
247699
|
uniqueName
|
247700
|
+
endpoints {
|
247701
|
+
id
|
247702
|
+
label
|
247703
|
+
displayValue
|
247704
|
+
}
|
247649
247705
|
}
|
247650
247706
|
}
|
247651
247707
|
}
|
@@ -247807,6 +247863,51 @@ var BlockchainNodeFragment = graphql(`
|
|
247807
247863
|
id
|
247808
247864
|
name
|
247809
247865
|
uniqueName
|
247866
|
+
... on BesuQBFTBlockchainNetwork {
|
247867
|
+
chainId
|
247868
|
+
}
|
247869
|
+
... on BesuIbftv2BlockchainNetwork {
|
247870
|
+
chainId
|
247871
|
+
}
|
247872
|
+
... on GethPoWBlockchainNetwork {
|
247873
|
+
chainId
|
247874
|
+
}
|
247875
|
+
... on GethPoSRinkebyBlockchainNetwork {
|
247876
|
+
chainId
|
247877
|
+
}
|
247878
|
+
... on GethVenidiumBlockchainNetwork {
|
247879
|
+
chainId
|
247880
|
+
}
|
247881
|
+
... on GethGoerliBlockchainNetwork {
|
247882
|
+
chainId
|
247883
|
+
}
|
247884
|
+
... on AvalancheBlockchainNetwork {
|
247885
|
+
chainId
|
247886
|
+
}
|
247887
|
+
... on AvalancheFujiBlockchainNetwork {
|
247888
|
+
chainId
|
247889
|
+
}
|
247890
|
+
... on BscPoWBlockchainNetwork {
|
247891
|
+
chainId
|
247892
|
+
}
|
247893
|
+
... on BscPoWTestnetBlockchainNetwork {
|
247894
|
+
chainId
|
247895
|
+
}
|
247896
|
+
... on PolygonBlockchainNetwork {
|
247897
|
+
chainId
|
247898
|
+
}
|
247899
|
+
... on PolygonMumbaiBlockchainNetwork {
|
247900
|
+
chainId
|
247901
|
+
}
|
247902
|
+
... on PolygonEdgePoABlockchainNetwork {
|
247903
|
+
chainId
|
247904
|
+
}
|
247905
|
+
... on QuorumQBFTBlockchainNetwork {
|
247906
|
+
chainId
|
247907
|
+
}
|
247908
|
+
... on GethCliqueBlockchainNetwork {
|
247909
|
+
chainId
|
247910
|
+
}
|
247810
247911
|
}
|
247811
247912
|
}
|
247812
247913
|
privateKeys {
|
@@ -248050,6 +248151,11 @@ var LoadBalancerFragment = graphql(`
|
|
248050
248151
|
healthStatus
|
248051
248152
|
provider
|
248052
248153
|
region
|
248154
|
+
endpoints {
|
248155
|
+
id
|
248156
|
+
label
|
248157
|
+
displayValue
|
248158
|
+
}
|
248053
248159
|
}
|
248054
248160
|
`);
|
248055
248161
|
var getLoadBalancer = graphql(`
|
@@ -250219,7 +250325,7 @@ export const postgresPool = createPostgresPool(process.env.SETTLEMINT_HASURA_DAT
|
|
250219
250325
|
await installDependencies(PACKAGE_NAME, projectDir);
|
250220
250326
|
}
|
250221
250327
|
if (!databaseUrl) {
|
250222
|
-
|
250328
|
+
note("[Codegen] Missing database environment variables", "warn");
|
250223
250329
|
}
|
250224
250330
|
}
|
250225
250331
|
|
@@ -251776,6 +251882,7 @@ async function codegenBlockscout(env2) {
|
|
251776
251882
|
__schema {
|
251777
251883
|
queryType { name }
|
251778
251884
|
mutationType { name }
|
251885
|
+
subscriptionType { name }
|
251779
251886
|
types {
|
251780
251887
|
...FullType
|
251781
251888
|
}
|
@@ -251857,10 +251964,6 @@ async function codegenBlockscout(env2) {
|
|
251857
251964
|
ofType {
|
251858
251965
|
kind
|
251859
251966
|
name
|
251860
|
-
ofType {
|
251861
|
-
kind
|
251862
|
-
name
|
251863
|
-
}
|
251864
251967
|
}
|
251865
251968
|
}
|
251866
251969
|
}
|
@@ -251978,6 +252081,68 @@ export const { client } = createServerMinioClient({
|
|
251978
252081
|
}
|
251979
252082
|
}
|
251980
252083
|
|
252084
|
+
// src/commands/codegen/codegen-viem.ts
|
252085
|
+
var PACKAGE_NAME7 = "@settlemint/sdk-viem";
|
252086
|
+
async function codegenViem(env2) {
|
252087
|
+
const chainId = env2.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID;
|
252088
|
+
if (!chainId) {
|
252089
|
+
return;
|
252090
|
+
}
|
252091
|
+
const loadBalancerRpcEndpoint = env2.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT;
|
252092
|
+
const blockchainNodeRpcEndpoint = env2.SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT;
|
252093
|
+
if (!loadBalancerRpcEndpoint && !blockchainNodeRpcEndpoint) {
|
252094
|
+
return;
|
252095
|
+
}
|
252096
|
+
note("Generating Viem resources");
|
252097
|
+
const projectDir = await projectRoot3();
|
252098
|
+
if (!await isPackageInstalled(PACKAGE_NAME7, projectDir)) {
|
252099
|
+
await installDependencies(PACKAGE_NAME7, projectDir);
|
252100
|
+
}
|
252101
|
+
const imports = [];
|
252102
|
+
if (loadBalancerRpcEndpoint) {
|
252103
|
+
imports.push("getPublicClient");
|
252104
|
+
}
|
252105
|
+
if (blockchainNodeRpcEndpoint) {
|
252106
|
+
imports.push("getWalletClient");
|
252107
|
+
}
|
252108
|
+
const viemTemplate = [`import { ${imports.join(", ")} } from "${PACKAGE_NAME7}";`];
|
252109
|
+
if (loadBalancerRpcEndpoint) {
|
252110
|
+
viemTemplate.push(`
|
252111
|
+
/**
|
252112
|
+
* The public client. Use this if you need to read from the blockchain.
|
252113
|
+
*/
|
252114
|
+
export const publicClient = getPublicClient({
|
252115
|
+
chainId: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID!,
|
252116
|
+
chainName: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK!,
|
252117
|
+
rpcUrl: process.env.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT!,
|
252118
|
+
});`);
|
252119
|
+
}
|
252120
|
+
if (blockchainNodeRpcEndpoint) {
|
252121
|
+
viemTemplate.push(`
|
252122
|
+
/**
|
252123
|
+
* The wallet client. Use this if you need to write to the blockchain.
|
252124
|
+
*/
|
252125
|
+
export const walletClient = getWalletClient({
|
252126
|
+
chainId: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID!,
|
252127
|
+
chainName: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK!,
|
252128
|
+
rpcUrl: process.env.SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT!,
|
252129
|
+
})();
|
252130
|
+
|
252131
|
+
/**
|
252132
|
+
* The wallet client for HD wallets. Use this if you need to write to the blockchain.
|
252133
|
+
* HD wallets require a challenge response to be sent with the request.
|
252134
|
+
*/
|
252135
|
+
export const hdWalletClient = getWalletClient({
|
252136
|
+
chainId: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID!,
|
252137
|
+
chainName: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK!,
|
252138
|
+
rpcUrl: process.env.SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT!,
|
252139
|
+
});`);
|
252140
|
+
}
|
252141
|
+
await writeTemplate(viemTemplate.join(`
|
252142
|
+
`), "/lib/settlemint", "viem.ts");
|
252143
|
+
note("Viem resources generated successfully");
|
252144
|
+
}
|
252145
|
+
|
251981
252146
|
// src/commands/codegen.ts
|
251982
252147
|
function codegenCommand() {
|
251983
252148
|
return new Command("codegen").option("--prod", "Connect to your production environment").option("--thegraph-subgraph-names <subgraph-names...>", "The name(s) of the TheGraph subgraph(s) to generate (skip if you want to generate all)").description("Generate GraphQL and REST types and queries").usage(createExamples([
|
@@ -252007,6 +252172,7 @@ function codegenCommand() {
|
|
252007
252172
|
},
|
252008
252173
|
stopMessage: "Tested GraphQL schemas"
|
252009
252174
|
});
|
252175
|
+
await codegenViem(env2);
|
252010
252176
|
if (hasura) {
|
252011
252177
|
note("Generating Hasura resources");
|
252012
252178
|
await codegenHasura(env2);
|
@@ -252285,6 +252451,9 @@ async function servicePrompt({
|
|
252285
252451
|
}
|
252286
252452
|
const selectedService = services.find((service) => Array.isArray(service) ? false : service.uniqueName === env2[envKey]);
|
252287
252453
|
const autoAccept = isCi || accept;
|
252454
|
+
if (autoAccept && allowAll) {
|
252455
|
+
return services;
|
252456
|
+
}
|
252288
252457
|
if (autoAccept && selectedService) {
|
252289
252458
|
return selectedService;
|
252290
252459
|
}
|
@@ -252319,6 +252488,21 @@ async function servicePrompt({
|
|
252319
252488
|
});
|
252320
252489
|
}
|
252321
252490
|
|
252491
|
+
// src/utils/cluster-service.ts
|
252492
|
+
function isValidPrivateKey(privateKey) {
|
252493
|
+
return privateKey.privateKeyType !== "HD_ECDSA_P256";
|
252494
|
+
}
|
252495
|
+
function hasValidPrivateKey(service) {
|
252496
|
+
return (service.privateKeys ?? []).some(isValidPrivateKey);
|
252497
|
+
}
|
252498
|
+
function hasPrivateKey(service) {
|
252499
|
+
const keys = service.privateKeys ?? [];
|
252500
|
+
return keys.length > 0;
|
252501
|
+
}
|
252502
|
+
function isRunning(service) {
|
252503
|
+
return service === undefined || service?.status === "COMPLETED";
|
252504
|
+
}
|
252505
|
+
|
252322
252506
|
// src/prompts/cluster-service/blockchain-node.prompt.ts
|
252323
252507
|
async function blockchainNodePrompt({
|
252324
252508
|
env: env2,
|
@@ -252338,12 +252522,12 @@ async function blockchainNodePrompt({
|
|
252338
252522
|
isRequired,
|
252339
252523
|
defaultHandler: async ({ defaultService: defaultNode, choices }) => {
|
252340
252524
|
const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => {
|
252341
|
-
return Array.isArray(node) ? true : node
|
252525
|
+
return Array.isArray(node) ? true : isRunning(node);
|
252342
252526
|
}).map((item) => {
|
252343
252527
|
if (Array.isArray(item.value)) {
|
252344
252528
|
return {
|
252345
252529
|
...item,
|
252346
|
-
value: item.value.filter(
|
252530
|
+
value: item.value.filter(isRunning)
|
252347
252531
|
};
|
252348
252532
|
}
|
252349
252533
|
return item;
|
@@ -252721,8 +252905,11 @@ async function writeEnvSpinner(prod, env2) {
|
|
252721
252905
|
SETTLEMINT_WORKSPACE: env2.SETTLEMINT_WORKSPACE,
|
252722
252906
|
SETTLEMINT_APPLICATION: env2.SETTLEMINT_APPLICATION,
|
252723
252907
|
SETTLEMINT_BLOCKCHAIN_NETWORK: env2.SETTLEMINT_BLOCKCHAIN_NETWORK,
|
252908
|
+
SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID: env2.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID,
|
252724
252909
|
SETTLEMINT_BLOCKCHAIN_NODE: env2.SETTLEMINT_BLOCKCHAIN_NODE,
|
252910
|
+
SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT: env2.SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT,
|
252725
252911
|
SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: env2.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER,
|
252912
|
+
SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT: env2.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT,
|
252726
252913
|
SETTLEMINT_HASURA: env2.SETTLEMINT_HASURA,
|
252727
252914
|
SETTLEMINT_HASURA_ENDPOINT: env2.SETTLEMINT_HASURA_ENDPOINT,
|
252728
252915
|
SETTLEMINT_THEGRAPH: env2.SETTLEMINT_THEGRAPH,
|
@@ -252757,6 +252944,14 @@ async function writeEnvSpinner(prod, env2) {
|
|
252757
252944
|
});
|
252758
252945
|
}
|
252759
252946
|
|
252947
|
+
// src/utils/blockchain-network.ts
|
252948
|
+
function getBlockchainNetworkChainId(blockchainNetwork) {
|
252949
|
+
if (!blockchainNetwork) {
|
252950
|
+
return;
|
252951
|
+
}
|
252952
|
+
return "chainId" in blockchainNetwork && typeof blockchainNetwork.chainId === "number" ? blockchainNetwork.chainId.toString() : undefined;
|
252953
|
+
}
|
252954
|
+
|
252760
252955
|
// src/utils/get-cluster-service-endpoint.ts
|
252761
252956
|
async function getGraphEndpoint(settlemint, service, graphName) {
|
252762
252957
|
if (!service || service.__typename !== "HAGraphMiddleware") {
|
@@ -252830,6 +253025,22 @@ function getMinioEndpoints(service) {
|
|
252830
253025
|
SETTLEMINT_MINIO_SECRET_KEY: service?.credentials.find((credential) => credential.id.includes("secret-key"))?.displayValue
|
252831
253026
|
};
|
252832
253027
|
}
|
253028
|
+
function getBlockchainNodeEndpoints(service) {
|
253029
|
+
if (!service) {
|
253030
|
+
return {};
|
253031
|
+
}
|
253032
|
+
return {
|
253033
|
+
SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT: service.endpoints.find((endpoint) => endpoint.id.includes("json-rpc"))?.displayValue
|
253034
|
+
};
|
253035
|
+
}
|
253036
|
+
function getBlockchainNodeOrLoadBalancerEndpoints(service) {
|
253037
|
+
if (!service) {
|
253038
|
+
return {};
|
253039
|
+
}
|
253040
|
+
return {
|
253041
|
+
SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT: service.endpoints.find((endpoint) => endpoint.id.includes("json-rpc"))?.displayValue
|
253042
|
+
};
|
253043
|
+
}
|
252833
253044
|
|
252834
253045
|
// src/prompts/cluster-service/blockchain-node-or-load-balancer.prompt.ts
|
252835
253046
|
async function blockchainNodeOrLoadBalancerPrompt({
|
@@ -252844,7 +253055,7 @@ async function blockchainNodeOrLoadBalancerPrompt({
|
|
252844
253055
|
}) {
|
252845
253056
|
return servicePrompt({
|
252846
253057
|
env: env2,
|
252847
|
-
services: [...
|
253058
|
+
services: [...loadBalancers, ...nodes],
|
252848
253059
|
accept,
|
252849
253060
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
252850
253061
|
isRequired,
|
@@ -252889,20 +253100,20 @@ function connectCommand() {
|
|
252889
253100
|
blockchainNodes,
|
252890
253101
|
loadBalancers
|
252891
253102
|
} = await servicesSpinner(settlemint, application.uniqueName);
|
252892
|
-
const nodesWithPrivateKey = blockchainNodes.filter(
|
253103
|
+
const nodesWithPrivateKey = blockchainNodes.filter(hasPrivateKey);
|
252893
253104
|
const blockchainNode = await blockchainNodePrompt({
|
252894
253105
|
env: env2,
|
252895
253106
|
nodes: nodesWithPrivateKey,
|
252896
253107
|
accept: acceptDefaults,
|
252897
|
-
promptMessage: "Which blockchain node do you want to
|
253108
|
+
promptMessage: "Which blockchain node do you want to use for sending transactions?"
|
252898
253109
|
});
|
252899
|
-
const nodesWithoutPrivateKey = blockchainNodes.filter((node) =>
|
253110
|
+
const nodesWithoutPrivateKey = blockchainNodes.filter((node) => !hasPrivateKey(node));
|
252900
253111
|
const loadBalancerOrBlockchainNode = await blockchainNodeOrLoadBalancerPrompt({
|
252901
253112
|
env: env2,
|
252902
253113
|
nodes: nodesWithoutPrivateKey,
|
252903
253114
|
loadBalancers,
|
252904
253115
|
accept: acceptDefaults,
|
252905
|
-
promptMessage: "Which
|
253116
|
+
promptMessage: "Which load balancer or blockchain node do you want to use for read operations?"
|
252906
253117
|
});
|
252907
253118
|
const hasura = await hasuraPrompt({
|
252908
253119
|
env: env2,
|
@@ -252968,12 +253179,12 @@ function connectCommand() {
|
|
252968
253179
|
uniqueName: blockchainNode.blockchainNetwork?.uniqueName
|
252969
253180
|
},
|
252970
253181
|
blockchainNode && {
|
252971
|
-
type: "Blockchain Node",
|
253182
|
+
type: "Blockchain Node (use for sending transactions)",
|
252972
253183
|
name: blockchainNode.name,
|
252973
253184
|
uniqueName: blockchainNode.uniqueName
|
252974
253185
|
},
|
252975
253186
|
loadBalancerOrBlockchainNode && {
|
252976
|
-
type: "
|
253187
|
+
type: "Load Balancer or Blockchain Node (use for read operations)",
|
252977
253188
|
name: loadBalancerOrBlockchainNode.name,
|
252978
253189
|
uniqueName: loadBalancerOrBlockchainNode.uniqueName
|
252979
253190
|
},
|
@@ -253026,8 +253237,11 @@ function connectCommand() {
|
|
253026
253237
|
SETTLEMINT_WORKSPACE: workspace.uniqueName,
|
253027
253238
|
SETTLEMINT_APPLICATION: application.uniqueName,
|
253028
253239
|
SETTLEMINT_BLOCKCHAIN_NETWORK: blockchainNode?.blockchainNetwork?.uniqueName,
|
253240
|
+
SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID: getBlockchainNetworkChainId(blockchainNode?.blockchainNetwork),
|
253029
253241
|
SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.uniqueName,
|
253242
|
+
...getBlockchainNodeEndpoints(blockchainNode),
|
253030
253243
|
SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: loadBalancerOrBlockchainNode?.uniqueName,
|
253244
|
+
...getBlockchainNodeOrLoadBalancerEndpoints(loadBalancerOrBlockchainNode),
|
253031
253245
|
SETTLEMINT_HASURA: hasura?.uniqueName,
|
253032
253246
|
...getHasuraEndpoints(hasura),
|
253033
253247
|
SETTLEMINT_THEGRAPH: thegraph?.uniqueName,
|
@@ -256894,7 +257108,10 @@ function getCreateCommand({
|
|
256894
257108
|
usePersonalAccessToken = true,
|
256895
257109
|
requiresDeployment = true
|
256896
257110
|
}) {
|
256897
|
-
const cmd2 = new Command(sanitizeCommandName(name3)).
|
257111
|
+
const cmd2 = new Command(sanitizeCommandName(name3)).description(`Create a new ${subType ? `${subType} ${type4}` : type4} in the SettleMint platform.`).usage(createExamples(examples)).argument("<name>", `The ${subType ? `${subType} ${type4}` : type4} name`).option("-a, --accept-defaults", "Accept the default values").option("-d, --default", `Save as default ${type4}`).option("--prod", "Connect to production environment");
|
257112
|
+
if (alias) {
|
257113
|
+
cmd2.alias(alias);
|
257114
|
+
}
|
256898
257115
|
if (requiresDeployment) {
|
256899
257116
|
cmd2.option("-w, --wait", "Wait until deployed").option("-r, --restart-if-timeout", "Restart if wait time is exceeded");
|
256900
257117
|
}
|
@@ -256964,7 +257181,10 @@ function getCreateCommand({
|
|
256964
257181
|
newEnv.SETTLEMINT_WORKSPACE = (await settlemint.application.read(updatedEnv.SETTLEMINT_APPLICATION)).workspace.uniqueName;
|
256965
257182
|
}
|
256966
257183
|
if (newEnv.SETTLEMINT_BLOCKCHAIN_NODE && newEnv.SETTLEMINT_BLOCKCHAIN_NODE !== env2.SETTLEMINT_BLOCKCHAIN_NODE) {
|
256967
|
-
|
257184
|
+
const newNode = await settlemint.blockchainNode.read(newEnv.SETTLEMINT_BLOCKCHAIN_NODE);
|
257185
|
+
newEnv.SETTLEMINT_BLOCKCHAIN_NETWORK = newNode.blockchainNetwork.uniqueName;
|
257186
|
+
newEnv.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID = getBlockchainNetworkChainId(newNode.blockchainNetwork);
|
257187
|
+
newEnv.SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT = getBlockchainNodeEndpoints(newNode).SETTLEMINT_BLOCKCHAIN_NODE_JSON_RPC_ENDPOINT;
|
256968
257188
|
}
|
256969
257189
|
await writeEnvSpinner(!!prod, newEnv);
|
256970
257190
|
note(`${capitalizeFirstLetter2(type4)} ${result.name} set as default`);
|
@@ -257036,7 +257256,11 @@ function blockchainNetworkBesuCreateCommand() {
|
|
257036
257256
|
return {
|
257037
257257
|
SETTLEMINT_APPLICATION: applicationUniqueName,
|
257038
257258
|
SETTLEMINT_BLOCKCHAIN_NETWORK: result.uniqueName,
|
257039
|
-
|
257259
|
+
SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID: getBlockchainNetworkChainId(result),
|
257260
|
+
SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.uniqueName,
|
257261
|
+
...getBlockchainNodeEndpoints(blockchainNode),
|
257262
|
+
SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: undefined,
|
257263
|
+
...getBlockchainNodeOrLoadBalancerEndpoints(undefined)
|
257040
257264
|
};
|
257041
257265
|
}
|
257042
257266
|
};
|
@@ -257608,7 +257832,6 @@ function loadBalancerEvmCreateCommand() {
|
|
257608
257832
|
name: "evm",
|
257609
257833
|
type: "load balancer",
|
257610
257834
|
subType: "EVM",
|
257611
|
-
alias: "e",
|
257612
257835
|
execute: (cmd2, baseAction) => {
|
257613
257836
|
addClusterServiceArgs(cmd2).option("--app, --application <application>", "The application unique name to create the load balancer in (defaults to application from env)").option("--blockchain-nodes <blockchainNodes...>", "Blockchain node unique names where the load balancer connects to (must be from the same network)").action(async (name3, { application, provider, region, size, type: type4, blockchainNodes, acceptDefaults, ...defaultArgs }) => {
|
257614
257837
|
return baseAction({
|
@@ -257634,21 +257857,25 @@ function loadBalancerEvmCreateCommand() {
|
|
257634
257857
|
if (!network) {
|
257635
257858
|
return nothingSelectedError("blockchain network");
|
257636
257859
|
}
|
257860
|
+
networkUniqueName = network.uniqueName;
|
257637
257861
|
const blockchainNodes2 = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
|
257638
257862
|
const connectedNodes = await blockchainNodePrompt({
|
257639
257863
|
env: env2,
|
257640
|
-
nodes: blockchainNodes2.filter((node) => node.blockchainNetwork?.uniqueName ===
|
257864
|
+
nodes: blockchainNodes2.filter((node) => node.blockchainNetwork?.uniqueName === network.uniqueName),
|
257641
257865
|
accept: acceptDefaults,
|
257642
257866
|
promptMessage: "Which blockchain node do you want to connect the load balancer to?",
|
257643
257867
|
allowAll: true
|
257644
257868
|
});
|
257645
257869
|
connectedNodesUniqueNames = Array.isArray(connectedNodes) ? blockchainNodes2.map((node) => node.uniqueName) : connectedNodes ? [connectedNodes.uniqueName] : [];
|
257646
257870
|
}
|
257871
|
+
if (connectedNodesUniqueNames.length === 0) {
|
257872
|
+
return cancel2("A load balancer must connect to at least one blockchain node");
|
257873
|
+
}
|
257647
257874
|
if (!networkUniqueName) {
|
257648
257875
|
const applicationBlockchainNodes = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
|
257649
257876
|
const selectedBlockchainNodes = applicationBlockchainNodes.filter((node) => connectedNodesUniqueNames.includes(node.uniqueName));
|
257650
257877
|
if (selectedBlockchainNodes.length === 0) {
|
257651
|
-
return cancel2("
|
257878
|
+
return cancel2(`Blockchain node(s) '${connectedNodesUniqueNames.join(", ")}' are not part of the application '${applicationUniqueName}'`);
|
257652
257879
|
}
|
257653
257880
|
const onTheSameNetwork = selectedBlockchainNodes.every((node) => node.blockchainNetwork?.uniqueName === selectedBlockchainNodes[0].blockchainNetwork?.uniqueName);
|
257654
257881
|
if (!onTheSameNetwork) {
|
@@ -257685,7 +257912,7 @@ function loadBalancerEvmCreateCommand() {
|
|
257685
257912
|
},
|
257686
257913
|
{
|
257687
257914
|
description: "Create an EVM load balancer and connect to specific blockchain nodes",
|
257688
|
-
command: "platform create load-balancer evm my-lb --blockchain-
|
257915
|
+
command: "platform create load-balancer evm my-lb --blockchain-network my-network --accept-defaults"
|
257689
257916
|
},
|
257690
257917
|
{
|
257691
257918
|
description: "Create an EVM load balancer in a different application",
|
@@ -257811,25 +258038,19 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
257811
258038
|
return missingApplication();
|
257812
258039
|
}
|
257813
258040
|
let blockchainNodeUniqueName = loadBalancer ? undefined : blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
|
257814
|
-
|
258041
|
+
const loadBalancerUniqueName = blockchainNodeUniqueName ? undefined : loadBalancer ?? env2.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER;
|
257815
258042
|
if (!blockchainNodeUniqueName && !loadBalancerUniqueName) {
|
257816
258043
|
const blockchainNodes = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
|
257817
|
-
const
|
257818
|
-
const nodeOrLoadbalancer = await blockchainNodeOrLoadBalancerPrompt({
|
258044
|
+
const node = await blockchainNodePrompt({
|
257819
258045
|
env: env2,
|
257820
|
-
nodes: blockchainNodes,
|
257821
|
-
loadBalancers,
|
258046
|
+
nodes: blockchainNodes.filter(hasValidPrivateKey),
|
257822
258047
|
accept: acceptDefaults,
|
257823
258048
|
isRequired: true
|
257824
258049
|
});
|
257825
|
-
if (!
|
257826
|
-
return nothingSelectedError("blockchain node
|
257827
|
-
}
|
257828
|
-
if (nodeOrLoadbalancer.__typename?.endsWith("LoadBalancer")) {
|
257829
|
-
loadBalancerUniqueName = nodeOrLoadbalancer.uniqueName;
|
257830
|
-
} else {
|
257831
|
-
blockchainNodeUniqueName = nodeOrLoadbalancer.uniqueName;
|
258050
|
+
if (!node) {
|
258051
|
+
return nothingSelectedError("blockchain node");
|
257832
258052
|
}
|
258053
|
+
blockchainNodeUniqueName = node.uniqueName;
|
257833
258054
|
}
|
257834
258055
|
const parsedAbis = [];
|
257835
258056
|
if (abis && abis.length > 0) {
|
@@ -259362,11 +259583,6 @@ function getStatusAction(status) {
|
|
259362
259583
|
return "Please try again later.";
|
259363
259584
|
}
|
259364
259585
|
|
259365
|
-
// src/utils/blockchain-node.ts
|
259366
|
-
function validPrivateKey(privateKey) {
|
259367
|
-
return privateKey.privateKeyType !== "HD_ECDSA_P256";
|
259368
|
-
}
|
259369
|
-
|
259370
259586
|
// src/commands/smart-contract-set/hardhat/utils/select-target-node.ts
|
259371
259587
|
async function selectTargetNode({
|
259372
259588
|
env: env2,
|
@@ -259412,7 +259628,7 @@ function validateNode(node, cancelOnError = true) {
|
|
259412
259628
|
}
|
259413
259629
|
return false;
|
259414
259630
|
}
|
259415
|
-
if (node
|
259631
|
+
if (!hasValidPrivateKey(node)) {
|
259416
259632
|
if (cancelOnError) {
|
259417
259633
|
cancel2(`The specified blockchain node '${node.uniqueName}' does not have an ECDSA P256 or HSM ECDSA P256 private key activated. Please activate an ECDSA P256 or HSM ECDSA P256 private key on your node and try again.`);
|
259418
259634
|
}
|
@@ -259433,7 +259649,7 @@ async function addressPrompt({
|
|
259433
259649
|
node,
|
259434
259650
|
hardhatConfig
|
259435
259651
|
}) {
|
259436
|
-
const possiblePrivateKeys = node.privateKeys?.filter(
|
259652
|
+
const possiblePrivateKeys = node.privateKeys?.filter(isValidPrivateKey) ?? [];
|
259437
259653
|
const defaultAddress = hardhatConfig.networks?.btp?.from ?? possiblePrivateKeys[0]?.address;
|
259438
259654
|
const defaultPossible = accept && defaultAddress;
|
259439
259655
|
if (defaultPossible) {
|
@@ -260189,4 +260405,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
260189
260405
|
// src/cli.ts
|
260190
260406
|
sdkCliCommand();
|
260191
260407
|
|
260192
|
-
//# debugId=
|
260408
|
+
//# debugId=E2120A20A1505D2664756E2164756E21
|