@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/core/index.cjs
CHANGED
|
@@ -28148,13 +28148,14 @@ var Sphere = class _Sphere {
|
|
|
28148
28148
|
*/
|
|
28149
28149
|
static resolveGroupChatConfig(config, network) {
|
|
28150
28150
|
if (!config) return void 0;
|
|
28151
|
+
if (!network) {
|
|
28152
|
+
throw new SphereError("network is required to resolve group chat relays.", "INVALID_CONFIG");
|
|
28153
|
+
}
|
|
28151
28154
|
if (config === true) {
|
|
28152
|
-
|
|
28153
|
-
return { relays: [...netConfig.groupRelays] };
|
|
28155
|
+
return { relays: [...NETWORKS[network].groupRelays] };
|
|
28154
28156
|
}
|
|
28155
28157
|
if (!config.relays || config.relays.length === 0) {
|
|
28156
|
-
|
|
28157
|
-
return { ...config, relays: [...netConfig.groupRelays] };
|
|
28158
|
+
return { ...config, relays: [...NETWORKS[network].groupRelays] };
|
|
28158
28159
|
}
|
|
28159
28160
|
return config;
|
|
28160
28161
|
}
|
|
@@ -28202,13 +28203,12 @@ var Sphere = class _Sphere {
|
|
|
28202
28203
|
*/
|
|
28203
28204
|
static configureTokenRegistry(storage, network) {
|
|
28204
28205
|
if (!network) {
|
|
28205
|
-
|
|
28206
|
-
"Sphere",
|
|
28207
|
-
"
|
|
28206
|
+
throw new SphereError(
|
|
28207
|
+
"network is required to configure the TokenRegistry. Every Sphere entry point must forward options.network.",
|
|
28208
|
+
"INVALID_CONFIG"
|
|
28208
28209
|
);
|
|
28209
28210
|
}
|
|
28210
|
-
|
|
28211
|
-
TokenRegistry.configure({ remoteUrl: netConfig.tokenRegistryUrl, storage });
|
|
28211
|
+
TokenRegistry.configure({ remoteUrl: NETWORKS[network].tokenRegistryUrl, storage });
|
|
28212
28212
|
}
|
|
28213
28213
|
/**
|
|
28214
28214
|
* Create new wallet with mnemonic
|