@hiero-ledger/sdk 2.78.0-beta.3 → 2.79.0-beta.11
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/umd.js +45 -10
- package/dist/umd.min.js +3 -3
- package/lib/Executable.cjs +27 -0
- package/lib/Executable.js +1 -1
- package/lib/Executable.js.map +1 -1
- package/lib/channel/WebChannel.cjs +1 -1
- package/lib/channel/WebChannel.js +1 -1
- package/lib/channel/WebChannel.js.map +1 -1
- package/lib/client/Network.cjs +1 -4
- package/lib/client/Network.js +1 -1
- package/lib/client/Network.js.map +1 -1
- package/lib/client/addressbooks/mainnet.cjs +1 -1
- package/lib/client/addressbooks/mainnet.d.ts +1 -1
- package/lib/client/addressbooks/mainnet.js +1 -1
- package/lib/client/addressbooks/mainnet.js.map +1 -1
- package/lib/client/addressbooks/previewnet.cjs +1 -1
- package/lib/client/addressbooks/previewnet.d.ts +1 -1
- package/lib/client/addressbooks/previewnet.js +1 -1
- package/lib/client/addressbooks/previewnet.js.map +1 -1
- package/lib/client/addressbooks/testnet.cjs +1 -1
- package/lib/client/addressbooks/testnet.d.ts +1 -1
- package/lib/client/addressbooks/testnet.js +1 -1
- package/lib/client/addressbooks/testnet.js.map +1 -1
- package/lib/transaction/Transaction.cjs +1 -0
- package/lib/transaction/Transaction.js +1 -1
- package/lib/transaction/Transaction.js.map +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/Executable.js +37 -0
- package/src/channel/WebChannel.js +3 -1
- package/src/client/Network.js +1 -6
- package/src/client/addressbooks/mainnet.js +1 -1
- package/src/client/addressbooks/previewnet.js +1 -1
- package/src/client/addressbooks/testnet.js +1 -1
- package/src/transaction/Transaction.js +1 -0
package/dist/umd.js
CHANGED
|
@@ -16446,13 +16446,13 @@
|
|
|
16446
16446
|
}
|
|
16447
16447
|
|
|
16448
16448
|
/**
|
|
16449
|
-
* @deprecated - use `@
|
|
16449
|
+
* @deprecated - use `@hashgraph/sdk`.PublicKey instead
|
|
16450
16450
|
* @param {Transaction} transaction
|
|
16451
16451
|
* @returns {boolean}
|
|
16452
16452
|
*/
|
|
16453
16453
|
verifyTransaction(transaction) {
|
|
16454
16454
|
//NOSONAR
|
|
16455
|
-
console.log("Deprecated: use `@
|
|
16455
|
+
console.log("Deprecated: use `@hashgraph/sdk`.PublicKey instead");
|
|
16456
16456
|
|
|
16457
16457
|
transaction._requireFrozen();
|
|
16458
16458
|
|
|
@@ -44183,6 +44183,43 @@
|
|
|
44183
44183
|
// Determine by the executing state what we should do
|
|
44184
44184
|
switch (shouldRetry) {
|
|
44185
44185
|
case ExecutionState.Retry:
|
|
44186
|
+
// Special handling for INVALID_NODE_ACCOUNT: mark node as unusable
|
|
44187
|
+
// and update network to get latest node account IDs
|
|
44188
|
+
if (status === Status.InvalidNodeAccount) {
|
|
44189
|
+
if (this._logger) {
|
|
44190
|
+
this._logger.debug(
|
|
44191
|
+
`[${this._getLogId()}] node with accountId: ${node.accountId.toString()} and proxy IP: ${node.address.toString()} has invalid node account ID, marking as unhealthy and updating network`,
|
|
44192
|
+
);
|
|
44193
|
+
}
|
|
44194
|
+
|
|
44195
|
+
// Mark the node as unusable by increasing its backoff and removing it from the healthy nodes list
|
|
44196
|
+
client._network.increaseBackoff(node);
|
|
44197
|
+
|
|
44198
|
+
// Initiate addressbook query and update the client's network
|
|
44199
|
+
// This will make the SDK client have the latest node account IDs for subsequent transactions
|
|
44200
|
+
try {
|
|
44201
|
+
if (client.mirrorNetwork.length > 0) {
|
|
44202
|
+
await client.updateNetwork();
|
|
44203
|
+
} else {
|
|
44204
|
+
if (this._logger) {
|
|
44205
|
+
this._logger.warn(
|
|
44206
|
+
"Cannot update address book: no mirror network configured. Retrying with existing network configuration.",
|
|
44207
|
+
);
|
|
44208
|
+
}
|
|
44209
|
+
}
|
|
44210
|
+
} catch (error) {
|
|
44211
|
+
if (this._logger) {
|
|
44212
|
+
const errorMessage =
|
|
44213
|
+
error instanceof Error
|
|
44214
|
+
? error.message
|
|
44215
|
+
: String(error);
|
|
44216
|
+
this._logger.trace(
|
|
44217
|
+
`failed to update client address book after INVALID_NODE_ACCOUNT_ID: ${errorMessage}`,
|
|
44218
|
+
);
|
|
44219
|
+
}
|
|
44220
|
+
}
|
|
44221
|
+
}
|
|
44222
|
+
|
|
44186
44223
|
await delayForAttempt(
|
|
44187
44224
|
isLocalNode,
|
|
44188
44225
|
attempt,
|
|
@@ -59239,6 +59276,7 @@
|
|
|
59239
59276
|
case Status.Unknown:
|
|
59240
59277
|
case Status.PlatformTransactionNotCreated:
|
|
59241
59278
|
case Status.PlatformNotActive:
|
|
59279
|
+
case Status.InvalidNodeAccount:
|
|
59242
59280
|
return [status, ExecutionState.Retry];
|
|
59243
59281
|
case Status.Ok:
|
|
59244
59282
|
return [status, ExecutionState.Finished];
|
|
@@ -96983,12 +97021,7 @@
|
|
|
96983
97021
|
if (this._maxNodesPerTransaction > 0) {
|
|
96984
97022
|
return this._maxNodesPerTransaction;
|
|
96985
97023
|
}
|
|
96986
|
-
|
|
96987
|
-
// if we round up, we will eventually take one more healthy node for execution
|
|
96988
|
-
// and we would hit the 'nodes.length == count' check in _getNumberOfMostHealthyNodes() less often
|
|
96989
|
-
return this._nodes.length <= 9
|
|
96990
|
-
? this._nodes.length
|
|
96991
|
-
: Math.floor((this._nodes.length + 3 - 1) / 3);
|
|
97024
|
+
return this._nodes.length;
|
|
96992
97025
|
}
|
|
96993
97026
|
|
|
96994
97027
|
/**
|
|
@@ -98696,7 +98729,7 @@
|
|
|
98696
98729
|
|
|
98697
98730
|
const SDK_NAME = "hiero-sdk-js";
|
|
98698
98731
|
const SDK_VERSION =
|
|
98699
|
-
"2.
|
|
98732
|
+
"2.79.0-beta.11" ;
|
|
98700
98733
|
|
|
98701
98734
|
// SPDX-License-Identifier: Apache-2.0
|
|
98702
98735
|
|
|
@@ -99105,7 +99138,9 @@
|
|
|
99105
99138
|
*/
|
|
99106
99139
|
_shouldUseHttps(address) {
|
|
99107
99140
|
return !(
|
|
99108
|
-
address.includes("localhost") ||
|
|
99141
|
+
address.includes("localhost") ||
|
|
99142
|
+
address.includes("127.0.0.1") ||
|
|
99143
|
+
address.includes(".cluster.local")
|
|
99109
99144
|
);
|
|
99110
99145
|
}
|
|
99111
99146
|
|