forked from hiero-ledger/hiero-sdk-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* web proxy issues tracking Signed-off-by: ochikov <[email protected]> * added nodeAccountIds unlocking Signed-off-by: Petar Tonev <[email protected]> * unhealthy nodes now are handled correctly Signed-off-by: Petar Tonev <[email protected]> * added additional proxies urls and after task build refactoring Signed-off-by: Petar Tonev <[email protected]> * add urls to a new client constants file Signed-off-by: Petar Tonev <[email protected]> * fix integration tests Signed-off-by: Petar Tonev <[email protected]> * handle some corner cases Signed-off-by: Petar Tonev <[email protected]> Signed-off-by: ochikov <[email protected]> Signed-off-by: Petar Tonev <[email protected]> Co-authored-by: ochikov <[email protected]>
- Loading branch information
Showing
10 changed files
with
232 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import AccountId from "../account/AccountId.js"; | ||
|
||
// MAINNET node proxies are the same for both 'WebClient' and 'NativeClient' | ||
export const MAINNET = { | ||
"https://grpc-web.myhbarwallet.com:443": new AccountId(3), | ||
"https://node01-00-grpc.swirlds.com:443": new AccountId(4), | ||
"https://node02.swirldslabs.com:443": new AccountId(5), | ||
"https://node03.swirldslabs.com:443": new AccountId(6), | ||
"https://node04.swirldslabs.com:443": new AccountId(7), | ||
"https://node05.swirldslabs.com:443": new AccountId(8), | ||
"https://node06.swirldslabs.com:443": new AccountId(9), | ||
"https://node07.swirldslabs.com:443": new AccountId(10), | ||
"https://node08.swirldslabs.com:443": new AccountId(11), | ||
"https://node09.swirldslabs.com:443": new AccountId(12), | ||
"https://node10.swirldslabs.com:443": new AccountId(13), | ||
"https://node11.swirldslabs.com:443": new AccountId(14), | ||
"https://node12.swirldslabs.com:443": new AccountId(15), | ||
"https://node13.swirldslabs.com:443": new AccountId(16), | ||
"https://node14.swirldslabs.com:443": new AccountId(17), | ||
"https://node16.swirldslabs.com:443": new AccountId(19), | ||
"https://node17.swirldslabs.com:443": new AccountId(20), | ||
"https://node18.swirldslabs.com:443": new AccountId(21), | ||
"https://node19.swirldslabs.com:443": new AccountId(22), | ||
"https://node20.swirldslabs.com:443": new AccountId(23), | ||
"https://node21.swirldslabs.com:443": new AccountId(24), | ||
"https://node22.swirldslabs.com:443": new AccountId(25), | ||
"https://node23.swirldslabs.com:443": new AccountId(26), | ||
"https://node24.swirldslabs.com:443": new AccountId(27), | ||
"https://node25.swirldslabs.com:443": new AccountId(28), | ||
"https://node26.swirldslabs.com:443": new AccountId(29), | ||
}; | ||
|
||
export const WEB_TESTNET = { | ||
"https://testnet-node00-00-grpc.hedera.com:443": new AccountId(3), | ||
"https://testnet-node01-00-grpc.hedera.com:443": new AccountId(4), | ||
"https://testnet-node02-00-grpc.hedera.com:443": new AccountId(5), | ||
"https://testnet-node03-00-grpc.hedera.com:443": new AccountId(6), | ||
"https://testnet-node04-00-grpc.hedera.com:443": new AccountId(7), | ||
"https://testnet-node05-00-grpc.hedera.com:443": new AccountId(8), | ||
"https://testnet-node06-00-grpc.hedera.com:443": new AccountId(9), | ||
}; | ||
|
||
export const WEB_PREVIEWNET = { | ||
"https://previewnet-node00-00-grpc.hedera.com:443": new AccountId(3), | ||
"https://previewnet-node01-00-grpc.hedera.com:443": new AccountId(4), | ||
"https://previewnet-node02-00-grpc.hedera.com:443": new AccountId(5), | ||
"https://previewnet-node03-00-grpc.hedera.com:443": new AccountId(6), | ||
"https://previewnet-node04-00-grpc.hedera.com:443": new AccountId(7), | ||
"https://previewnet-node05-00-grpc.hedera.com:443": new AccountId(8), | ||
"https://previewnet-node06-00-grpc.hedera.com:443": new AccountId(9), | ||
}; | ||
|
||
export const NATIVE_TESTNET = { | ||
"https://grpc-web.testnet.myhbarwallet.com:443": new AccountId(3), | ||
}; | ||
|
||
export const NATIVE_PREVIEWNET = { | ||
"https://grpc-web.previewnet.myhbarwallet.com:443": new AccountId(3), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/*- | ||
* | ||
* Hedera JavaScript SDK | ||
* | ||
* Copyright (C) 2020 - 2022 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. | ||
* | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
import HttpStatus from "./HttpStatus.js"; | ||
|
||
/** | ||
* Describes how the http request failed. | ||
*/ | ||
export default class HttpError extends Error { | ||
/** | ||
* @param {HttpStatus} status | ||
*/ | ||
constructor(status) { | ||
super(`failed with error code: ${status.toString()}`); | ||
|
||
/** | ||
* @readonly | ||
*/ | ||
this.status = status; | ||
|
||
this.name = "HttpError"; | ||
|
||
if (typeof Error.captureStackTrace !== "undefined") { | ||
Error.captureStackTrace(this, HttpError); | ||
} | ||
} | ||
} |
Oops, something went wrong.