-
Notifications
You must be signed in to change notification settings - Fork 148
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
docs: add configuration.md file #2687
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
4eeece9
to
2cb086e
Compare
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
Signed-off-by: Ivaylo Nikolov <[email protected]>
7d052b7
to
50dea5f
Compare
Signed-off-by: Ivaylo Nikolov <[email protected]>
Quality Gate passedIssues Measures |
|
||
To verify which type of key is required, check the example code for the initialization method in the client/wallet. Look for either `fromStringED25519` or `fromStringECDSA`. | ||
|
||
_Note that some examples (like the ones that interact with the relay) are designed to work only with ECDSA private keys. _ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe format error here?
|
||
### Examples | ||
|
||
The examples use both ED25519 and ECDSA keys. These examples come with a pre-filled .env file, so you generally don’t need to make changes. However, if you modify the .env file, ensure the correct type of private key is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would emphasize the word .env either by bolding it or formatting it as code.
### React Native Example | ||
|
||
This example uses `fromString`, which internally will try to execute the example with `fromStringED25519`. | ||
|
||
### Simple REST Signature Provider | ||
|
||
This example behaves the same as the React Native example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider including the file path in the examples to make it easier for the user to navigate.
- If local-node has been inactive for a while, it might enter sleep mode. Restarting it is often necessary to rerun tests. This is not an SDK-related issue but is a frequently encountered scenario. | ||
- Always use the `task install` command to install dependencies. Avoid manual installation with npm or yarn, as it can lead to configuration problems. | ||
|
||
## Should I have multiple .env files like .env.local, .env.production, .envdevelopment etc? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could give an example what we're doing here—adding environment variables for all networks, commenting out the ones not in use, and leaving only the one needed at the moment.
```javascript | ||
const operatorId = AccountId.fromString("..."); | ||
const operatorKey = PrivateKey.generateED25519(); | ||
let client = Client.forNetwork().setOperator(operatorId, operatorKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use const
for consistency across examples.
``` | ||
|
||
- `setTransportSecurity` - The `setTransportSecurity` method in the Hedera JavaScript SDK is used to enable or disable transport security for the communication between the SDK and the Hedera network nodes. Transport security refers to the mechanisms used to secure the communication channel, typically involving encryption and authentication protocols. | ||
When transport security is enabled, the SDK will establish a secure connection with the Hedera network nodes using protocols like Transport Layer Security (TLS) or its predecessor, Secure Sockets Layer (SSL). This ensures that the data transmitted between the SDK and the nodes is encrypted, protecting it from eavesdropping and tampering. It also provides authentication mechanisms to verify the identity of the nodes and prevent man-in-the-middle attacks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's specify that only TLS is being used because that is how it is currently implemented, avoiding any impression that we're uncertain about what is being used.
|
||
The setSignOnDemand method in the Hedera JavaScript SDK allows you to configure how transactions are signed before being submitted to the Hedera network. By default, transactions are signed immediately after being constructed. However, in some cases, you may want to delay the signing process until just before the transaction is submitted. This can be useful in scenarios where you need to perform additional operations or validations on the transaction before signing it. | ||
|
||
When you call client.setSignOnDemand(true), it instructs the SDK to defer the signing of transactions until the transaction.sign() method is explicitly called. This means that when you create a transaction using the SDK, it will not be signed automatically. Instead, you will need to call transaction.sign() manually before submitting the transaction to the network. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe present the code examples with "code" formatting for better visualization
### Node Management | ||
|
||
- `setMaxNodesPerTransaction` - Set maximum nodes per transaction | ||
This sets the maximum amount of nodes that the transaction will try to execute to.Setting a higher value for setMaxNodesPerTransaction can improve the reliability of transaction execution, but it also increases the network load and the overall cost of the transaction (since you'll be paying transaction fees for each node that executes the transaction). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to.Setting
typo?
|
||
- `setNodeMaxBackoff` - It sets the maximum seconds allowed for the node backoff explained in the previous setting. | ||
|
||
- `setNodeMinReadmitPeriod` - Set minimum node readmit period |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
typo?
client.setLogger(infoLogger); | ||
``` | ||
|
||
There are different LogLevels: `LogLevel.Info`, ``LogLevel.Silent`, `LogLeve.Trace`, `LogLevel.Debug`, `LogLevel.Warn`, `LogLevel.Error`, `LogLevel.Fatal`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Visualization typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the coverage here.
Just suggestions on organization for developer experience and one missing item ut in general this was the missing doc. Thanks
|
||
There are different LogLevels: `LogLevel.Info`, ``LogLevel.Silent`, `LogLeve.Trace`, `LogLevel.Debug`, `LogLevel.Warn`, `LogLevel.Error`, `LogLevel.Fatal`. | ||
|
||
### Default values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setMaxExecutionTime()
is missing
|
||
### Default values: | ||
|
||
| Key Name | Default Value | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would actually move this to the top right below the table with operator.
As a dev I want to quickly know what all my options are with summaries.
Then I can read further down to dig into details
Description:
Add CONFIGURATION.md file.
Fixes
#2627
Checklist