@unicitylabs/sphere-sdk 0.8.0-dev.4 → 0.8.0-dev.5
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/core/index.cjs +9 -9
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +4 -3
- package/dist/core/index.d.ts +4 -3
- package/dist/core/index.js +9 -9
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +32 -7
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +32 -7
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +30 -8
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.d.cts +8 -2
- package/dist/impl/nodejs/index.d.ts +8 -2
- package/dist/impl/nodejs/index.js +30 -8
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28507,13 +28507,14 @@ var Sphere = class _Sphere {
|
|
|
28507
28507
|
*/
|
|
28508
28508
|
static resolveGroupChatConfig(config, network) {
|
|
28509
28509
|
if (!config) return void 0;
|
|
28510
|
+
if (!network) {
|
|
28511
|
+
throw new SphereError("network is required to resolve group chat relays.", "INVALID_CONFIG");
|
|
28512
|
+
}
|
|
28510
28513
|
if (config === true) {
|
|
28511
|
-
|
|
28512
|
-
return { relays: [...netConfig.groupRelays] };
|
|
28514
|
+
return { relays: [...NETWORKS[network].groupRelays] };
|
|
28513
28515
|
}
|
|
28514
28516
|
if (!config.relays || config.relays.length === 0) {
|
|
28515
|
-
|
|
28516
|
-
return { ...config, relays: [...netConfig.groupRelays] };
|
|
28517
|
+
return { ...config, relays: [...NETWORKS[network].groupRelays] };
|
|
28517
28518
|
}
|
|
28518
28519
|
return config;
|
|
28519
28520
|
}
|
|
@@ -28561,13 +28562,12 @@ var Sphere = class _Sphere {
|
|
|
28561
28562
|
*/
|
|
28562
28563
|
static configureTokenRegistry(storage, network) {
|
|
28563
28564
|
if (!network) {
|
|
28564
|
-
|
|
28565
|
-
"Sphere",
|
|
28566
|
-
"
|
|
28565
|
+
throw new SphereError(
|
|
28566
|
+
"network is required to configure the TokenRegistry. Every Sphere entry point must forward options.network.",
|
|
28567
|
+
"INVALID_CONFIG"
|
|
28567
28568
|
);
|
|
28568
28569
|
}
|
|
28569
|
-
|
|
28570
|
-
TokenRegistry.configure({ remoteUrl: netConfig.tokenRegistryUrl, storage });
|
|
28570
|
+
TokenRegistry.configure({ remoteUrl: NETWORKS[network].tokenRegistryUrl, storage });
|
|
28571
28571
|
}
|
|
28572
28572
|
/**
|
|
28573
28573
|
* Create new wallet with mnemonic
|