Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: changed license header to SPDX and ran npm run format #1233

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/content/User/StepByStepGuide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Advanced User Guide

For those who would like to have more control or need some customized setups, here are some step by step instructions of how to setup and deploy a solo network.

### Setup Kubernetes cluster

#### Remote cluster
Expand Down Expand Up @@ -28,6 +30,7 @@ Then run the following command to set the kubectl context to the new cluster:
```bash
kind create cluster -n "${SOLO_CLUSTER_NAME}"
```

Example output

```
Expand All @@ -48,7 +51,6 @@ Have a nice day! 👋

You may now view pods in your cluster using `k9s -A` as below:


```
Context: kind-solo <0> all <a> Attach <ctr… ____ __.________
Cluster: kind-solo <ctrl-d> Delete <l> | |/ _/ __ \______
Expand All @@ -75,7 +77,6 @@ You may now view pods in your cluster using `k9s -A` as below:
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```


### Step by Step Instructions

* Initialize `solo` directories:
Expand Down Expand Up @@ -136,13 +137,16 @@ Kubernetes Cluster : kind-solo
✔ Generate gRPC TLS Keys
✔ Finalize
```

PEM key files are generated in `~/.solo/keys` directory.

```
hedera-node1.crt hedera-node3.crt s-private-node1.pem s-public-node1.pem unused-gossip-pem
hedera-node1.key hedera-node3.key s-private-node2.pem s-public-node2.pem unused-tls
hedera-node2.crt hedera-node4.crt s-private-node3.pem s-public-node3.pem
hedera-node2.key hedera-node4.key s-private-node4.pem s-public-node4.pem
```

* Setup cluster with shared components

```
Expand Down
21 changes: 2 additions & 19 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
import globals from 'globals';
import eslintJs from '@eslint/js';
Expand Down Expand Up @@ -54,11 +41,7 @@ export default [
'error',
{
source: 'string',
variables: {
year: '2024',
},
content:
'Copyright (C) {year} Hedera Hashgraph, LLC\n\nLicensed under the Apache License, Version 2.0 (the ""License"");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an ""AS IS"" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n',
content: 'SPDX-License-Identifier: Apache-2.0',
},
],
'prettier/prettier': 'error',
Expand Down
15 changes: 1 addition & 14 deletions examples/create-topic.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
import {
Wallet,
Expand Down
15 changes: 1 addition & 14 deletions examples/sdk-network-connection/solo-network-connection.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
import {AccountBalanceQuery, AccountId, Client, Logger, LogLevel, PrivateKey} from '@hashgraph/sdk';

Expand Down
15 changes: 1 addition & 14 deletions resources/post-build-script.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
'use strict';
import fs from 'node:fs';
Expand Down
15 changes: 1 addition & 14 deletions solo.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
#!/usr/bin/env node
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
import * as fnm from './src/index.js';

Expand Down
15 changes: 1 addition & 14 deletions src/commands/account.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
import chalk from 'chalk';
import {BaseCommand} from './base.js';
Expand Down Expand Up @@ -44,7 +31,7 @@
super(opts);

if (!opts || !opts.accountManager)
throw new IllegalArgumentError('An instance of core/AccountManager is required', opts.accountManager as any);

Check warning on line 34 in src/commands/account.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Unexpected any. Specify a different type

this.accountManager = opts.accountManager;
this.accountInfo = null;
Expand Down Expand Up @@ -79,7 +66,7 @@
try {
const privateKey = PrivateKey.fromStringDer(newAccountInfo.privateKey);
newAccountInfo.privateKeyRaw = privateKey.toStringRaw();
} catch (e: Error | any) {

Check warning on line 69 in src/commands/account.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

'e' is defined but never used

Check warning on line 69 in src/commands/account.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Unexpected any. Specify a different type
this.logger.error(`failed to retrieve EVM address for accountId ${newAccountInfo.accountId}`);
}
}
Expand Down Expand Up @@ -120,7 +107,7 @@
return this.accountManager.accountInfoQuery(ctx.config.accountId);
}

async updateAccountInfo(ctx: any) {

Check warning on line 110 in src/commands/account.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Unexpected any. Specify a different type
let amount = ctx.config.amount;
if (ctx.config.ed25519PrivateKey) {
if (
Expand Down Expand Up @@ -156,7 +143,7 @@
return await this.accountManager.transferAmount(constants.TREASURY_ACCOUNT_ID, toAccountId, amount);
}

async init(argv: any) {

Check warning on line 146 in src/commands/account.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Unexpected any. Specify a different type
const self = this;

interface Context {
Expand Down Expand Up @@ -222,7 +209,7 @@
{
title: 'Update special account key sets',
task: ctx => {
const subTasks: any[] = [];

Check warning on line 212 in src/commands/account.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Unexpected any. Specify a different type
const realm = constants.HEDERA_NODE_ACCOUNT_ID_START.realm;
const shard = constants.HEDERA_NODE_ACCOUNT_ID_START.shard;
for (const currentSet of ctx.accountsBatchedSet) {
Expand Down Expand Up @@ -296,7 +283,7 @@

try {
await tasks.run();
} catch (e: Error | any) {

Check warning on line 286 in src/commands/account.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Unexpected any. Specify a different type
throw new SoloError(`Error in creating account: ${e.message}`, e);
} finally {
await this.closeConnections();
Expand All @@ -308,7 +295,7 @@
return true;
}

async create(argv: any) {

Check warning on line 298 in src/commands/account.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Unexpected any. Specify a different type
const self = this;
const lease = await self.leaseManager.create();

Expand Down Expand Up @@ -384,7 +371,7 @@

try {
await tasks.run();
} catch (e: Error | any) {

Check warning on line 374 in src/commands/account.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Unexpected any. Specify a different type
throw new SoloError(`Error in creating account: ${e.message}`, e);
} finally {
await lease.release();
Expand All @@ -394,7 +381,7 @@
return true;
}

async update(argv: any) {

Check warning on line 384 in src/commands/account.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Unexpected any. Specify a different type
const self = this;

interface Context {
Expand Down
15 changes: 1 addition & 14 deletions src/commands/base.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/

import paths from 'path';
Expand Down
15 changes: 1 addition & 14 deletions src/commands/cluster/configs.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/

import type {NodeAlias} from '../../types/aliases.js';
Expand Down
15 changes: 1 addition & 14 deletions src/commands/cluster/flags.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/

import {Flags as flags} from '../flags.js';
Expand Down
15 changes: 1 addition & 14 deletions src/commands/cluster/handlers.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
import type {BaseCommand, CommandHandlers} from '../base.js';
import type {ClusterCommandTasks} from './tasks.js';
Expand Down
15 changes: 1 addition & 14 deletions src/commands/cluster/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/

import * as ContextFlags from './flags.js';
Expand Down
15 changes: 1 addition & 14 deletions src/commands/cluster/tasks.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
import {Task} from '../../core/task.js';
import {Flags as flags} from '../flags.js';
Expand Down
15 changes: 1 addition & 14 deletions src/commands/deployment.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
import {Listr} from 'listr2';
import {SoloError} from '../core/errors.js';
Expand Down
15 changes: 1 addition & 14 deletions src/commands/explorer.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
import {ListrEnquirerPromptAdapter} from '@listr2/prompt-adapter-enquirer';
import {Listr} from 'listr2';
Expand Down
15 changes: 1 addition & 14 deletions src/commands/flags.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
import * as constants from '../core/constants.js';
import * as version from '../../version.js';
Expand Down
15 changes: 1 addition & 14 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/**
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
import {ClusterCommand} from './cluster/index.js';
import {InitCommand} from './init.js';
Expand Down
Loading
Loading