@hiero-ledger/sdk 2.75.0 → 2.76.0
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 +34 -9
- package/dist/umd.min.js +1 -1
- package/lib/channel/WebChannel.cjs +11 -2
- package/lib/channel/WebChannel.js +1 -1
- package/lib/channel/WebChannel.js.map +1 -1
- package/lib/client/WebClient.cjs +6 -0
- package/lib/client/WebClient.js +1 -1
- package/lib/client/WebClient.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/constants/ClientConstants.cjs +1 -1
- package/lib/constants/ClientConstants.d.ts +1 -0
- package/lib/constants/ClientConstants.js +1 -1
- package/lib/constants/ClientConstants.js.map +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/src/channel/WebChannel.js +19 -7
- package/src/client/WebClient.js +13 -0
- 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/constants/ClientConstants.js +1 -1
package/dist/umd.js
CHANGED
|
@@ -96899,7 +96899,7 @@
|
|
|
96899
96899
|
"node29.swirldslabs.com:443": new AccountId(32),
|
|
96900
96900
|
"node30.swirldslabs.com:443": new AccountId(33),
|
|
96901
96901
|
"node31.swirldslabs.com:443": new AccountId(34),
|
|
96902
|
-
|
|
96902
|
+
"node32.swirldslabs.com:443": new AccountId(35),
|
|
96903
96903
|
"node33.swirldslabs.com:443": new AccountId(36),
|
|
96904
96904
|
"node34.swirldslabs.com:443": new AccountId(37),
|
|
96905
96905
|
};
|
|
@@ -98288,7 +98288,7 @@
|
|
|
98288
98288
|
|
|
98289
98289
|
const SDK_NAME = "hiero-sdk-js";
|
|
98290
98290
|
const SDK_VERSION =
|
|
98291
|
-
"2.
|
|
98291
|
+
"2.76.0" ;
|
|
98292
98292
|
|
|
98293
98293
|
// SPDX-License-Identifier: Apache-2.0
|
|
98294
98294
|
|
|
@@ -98663,14 +98663,26 @@
|
|
|
98663
98663
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
98664
98664
|
return async (method, requestData, callback) => {
|
|
98665
98665
|
try {
|
|
98666
|
-
|
|
98667
|
-
|
|
98668
|
-
this._address.
|
|
98669
|
-
|
|
98666
|
+
// Check if address already contains a scheme
|
|
98667
|
+
const hasScheme =
|
|
98668
|
+
this._address.startsWith("http://") ||
|
|
98669
|
+
this._address.startsWith("https://");
|
|
98670
|
+
|
|
98671
|
+
let address;
|
|
98672
|
+
if (hasScheme) {
|
|
98673
|
+
// Use the address as-is if it already has a scheme
|
|
98674
|
+
address = this._address;
|
|
98675
|
+
} else {
|
|
98676
|
+
// Only prepend scheme if none exists
|
|
98677
|
+
const shouldUseHttps = !(
|
|
98678
|
+
this._address.includes("localhost") ||
|
|
98679
|
+
this._address.includes("127.0.0.1")
|
|
98680
|
+
);
|
|
98670
98681
|
|
|
98671
|
-
|
|
98672
|
-
|
|
98673
|
-
|
|
98682
|
+
address = shouldUseHttps
|
|
98683
|
+
? `https://${this._address}`
|
|
98684
|
+
: `http://${this._address}`;
|
|
98685
|
+
}
|
|
98674
98686
|
// this will be executed in a browser environment so eslint is
|
|
98675
98687
|
// disabled for the fetch call
|
|
98676
98688
|
//eslint-disable-next-line n/no-unsupported-features/node-builtins
|
|
@@ -98967,6 +98979,19 @@
|
|
|
98967
98979
|
break;
|
|
98968
98980
|
}
|
|
98969
98981
|
} else {
|
|
98982
|
+
// Check for deprecation warnings for network endpoints with schemes
|
|
98983
|
+
for (const [key] of Object.entries(network)) {
|
|
98984
|
+
if (key.startsWith("https://") || key.startsWith("http://")) {
|
|
98985
|
+
console.warn(
|
|
98986
|
+
'[Deprecation Notice] Hiero SDK: Network endpoint "' +
|
|
98987
|
+
key +
|
|
98988
|
+
'" includes a URL scheme (e.g. "https://"). ' +
|
|
98989
|
+
"This format was accepted in earlier versions but is now deprecated. " +
|
|
98990
|
+
'Please remove the scheme and use "host:port" instead (e.g. "node00.swirldslabs.com:443"). ' +
|
|
98991
|
+
"Support for scheme-prefixed endpoints will be removed in a future major release.",
|
|
98992
|
+
);
|
|
98993
|
+
}
|
|
98994
|
+
}
|
|
98970
98995
|
this._network.setNetwork(network);
|
|
98971
98996
|
}
|
|
98972
98997
|
}
|