@hashgraphonline/hashinal-wc 1.0.92 → 1.0.95
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/README.md +1 -0
- package/dist/es/hashinal-wc.es.js +25 -7
- package/dist/es/hashinal-wc.es.js.map +1 -1
- package/dist/es/index.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/umd/hashinal-wc.umd.js +8 -8
- package/dist/umd/hashinal-wc.umd.js.map +1 -1
- package/dist/umd/index.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2419,7 +2419,7 @@ function pfGlobalThisOrFallback() {
|
|
|
2419
2419
|
const qt = /* @__PURE__ */ getDefaultExportFromCjs$1(browser$1);
|
|
2420
2420
|
const c = { level: "info" }, n = "custom_context";
|
|
2421
2421
|
var x$1 = Object.defineProperty, S$1 = Object.defineProperties, _ = Object.getOwnPropertyDescriptors, p = Object.getOwnPropertySymbols, T = Object.prototype.hasOwnProperty, z$1 = Object.prototype.propertyIsEnumerable, f = (r, e, t) => e in r ? x$1(r, e, { enumerable: true, configurable: true, writable: true, value: t }) : r[e] = t, i = (r, e) => {
|
|
2422
|
-
for (var t in e
|
|
2422
|
+
for (var t in e) T.call(e, t) && f(r, t, e[t]);
|
|
2423
2423
|
if (p) for (var t of p(e)) z$1.call(e, t) && f(r, t, e[t]);
|
|
2424
2424
|
return r;
|
|
2425
2425
|
}, g = (r, e) => S$1(r, _(e));
|
|
@@ -5948,6 +5948,9 @@ class HashinalsWalletConnectSDK {
|
|
|
5948
5948
|
(signer_) => signer_.getAccountId().toString() === cachedAccountId
|
|
5949
5949
|
);
|
|
5950
5950
|
const accountId = (_b = cachedSigner == null ? void 0 : cachedSigner.getAccountId()) == null ? void 0 : _b.toString();
|
|
5951
|
+
if (!accountId) {
|
|
5952
|
+
return null;
|
|
5953
|
+
}
|
|
5951
5954
|
const network = cachedSigner.getLedgerId();
|
|
5952
5955
|
return {
|
|
5953
5956
|
accountId,
|
|
@@ -5986,9 +5989,9 @@ class HashinalsWalletConnectSDK {
|
|
|
5986
5989
|
let transaction = await new TokenMintTransaction().setTokenId(tokenId).setMetadata([Buffer$1.from(metadata, "utf-8")]).sign(supplyKey);
|
|
5987
5990
|
return this.executeTransaction(transaction);
|
|
5988
5991
|
}
|
|
5989
|
-
async getMessages(topicId, lastTimestamp, disableTimestampFilter = false) {
|
|
5992
|
+
async getMessages(topicId, lastTimestamp, disableTimestampFilter = false, network) {
|
|
5990
5993
|
var _a, _b;
|
|
5991
|
-
const networkPrefix = this.getNetworkPrefix();
|
|
5994
|
+
const networkPrefix = network || this.getNetworkPrefix();
|
|
5992
5995
|
const baseUrl = `https://${networkPrefix}.mirrornode.hedera.com`;
|
|
5993
5996
|
const timestampQuery = Number(lastTimestamp) > 0 && !disableTimestampFilter ? `×tamp=gt:${lastTimestamp}` : "";
|
|
5994
5997
|
const url = `${baseUrl}/api/v1/topics/${topicId}/messages?limit=200${timestampQuery}`;
|
|
@@ -6107,7 +6110,12 @@ class HashinalsWalletConnectSDK {
|
|
|
6107
6110
|
try {
|
|
6108
6111
|
const defaultNetwork = savedNetwork === "mainnet" ? LedgerId.MAINNET : LedgerId.TESTNET;
|
|
6109
6112
|
const network = networkOverride || defaultNetwork;
|
|
6110
|
-
await this.init(
|
|
6113
|
+
await this.init(
|
|
6114
|
+
PROJECT_ID,
|
|
6115
|
+
APP_METADATA,
|
|
6116
|
+
network,
|
|
6117
|
+
onSessionIframeCreated
|
|
6118
|
+
);
|
|
6111
6119
|
const balance = await this.getAccountBalance();
|
|
6112
6120
|
return {
|
|
6113
6121
|
accountId: savedAccountId,
|
|
@@ -6120,8 +6128,16 @@ class HashinalsWalletConnectSDK {
|
|
|
6120
6128
|
}
|
|
6121
6129
|
} else if (networkOverride) {
|
|
6122
6130
|
try {
|
|
6123
|
-
this.logger.info(
|
|
6124
|
-
|
|
6131
|
+
this.logger.info(
|
|
6132
|
+
"initializing normally through override.",
|
|
6133
|
+
networkOverride
|
|
6134
|
+
);
|
|
6135
|
+
await this.init(
|
|
6136
|
+
PROJECT_ID,
|
|
6137
|
+
APP_METADATA,
|
|
6138
|
+
networkOverride,
|
|
6139
|
+
onSessionIframeCreated
|
|
6140
|
+
);
|
|
6125
6141
|
this.logger.info("initialized", networkOverride);
|
|
6126
6142
|
await this.connectViaDappBrowser();
|
|
6127
6143
|
this.logger.info("connected via dapp browser");
|
|
@@ -6141,7 +6157,9 @@ class HashinalsWalletConnectSDK {
|
|
|
6141
6157
|
this.extensionCheckInterval = setInterval(() => {
|
|
6142
6158
|
var _a;
|
|
6143
6159
|
const extensions = ((_a = this.dAppConnector) == null ? void 0 : _a.extensions) || [];
|
|
6144
|
-
const availableExtension = extensions.find(
|
|
6160
|
+
const availableExtension = extensions.find(
|
|
6161
|
+
(ext) => ext.availableInIframe
|
|
6162
|
+
);
|
|
6145
6163
|
if (availableExtension && !this.hasCalledExtensionCallback) {
|
|
6146
6164
|
this.hasCalledExtensionCallback = true;
|
|
6147
6165
|
callback(availableExtension);
|