@ic-reactor/core 2.0.0 → 2.0.1
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
CHANGED
|
@@ -19,7 +19,7 @@ yarn add @ic-reactor/core
|
|
|
19
19
|
or you can use the UMD version:
|
|
20
20
|
|
|
21
21
|
```html
|
|
22
|
-
<script src="https://github.com/B3Pay/ic-reactor/releases/download/
|
|
22
|
+
<script src="https://github.com/B3Pay/ic-reactor/releases/download/v2.0.0/ic-reactor-core.min.js"></script>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
### Using `createReactorCore`
|
|
@@ -25,6 +25,7 @@ export declare class AgentManager {
|
|
|
25
25
|
getAgentHost: () => URL | undefined;
|
|
26
26
|
getAgentHostName: () => string;
|
|
27
27
|
getIsLocal: () => boolean;
|
|
28
|
+
isAuthClientInitialized: () => boolean;
|
|
28
29
|
getNetwork: () => "local" | "remote" | "ic";
|
|
29
30
|
getAgentState: AgentStore["getState"];
|
|
30
31
|
subscribeAgentState: AgentStore["subscribe"];
|
|
@@ -179,6 +179,9 @@ class AgentManager {
|
|
|
179
179
|
getIsLocal = () => {
|
|
180
180
|
return this.getNetwork() !== "ic";
|
|
181
181
|
};
|
|
182
|
+
isAuthClientInitialized = () => {
|
|
183
|
+
return this.getAgentState().isInitialized && this._auth !== null;
|
|
184
|
+
};
|
|
182
185
|
getNetwork = () => {
|
|
183
186
|
const hostname = this.getAgentHostName();
|
|
184
187
|
return (0, helper_1.getNetworkByHostname)(hostname);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ic-reactor/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A library for intracting with the Internet Computer canisters",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=22.0.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "1c8f5bfc6b0fea9347602beeebd6443f79d7d54e"
|
|
60
60
|
}
|