@unicitylabs/sphere-sdk 0.16.0-dev.1 → 0.16.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/connect/index.cjs +13 -3
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +13 -3
- package/dist/connect/index.js.map +1 -1
- package/dist/core/index.cjs +4 -3
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +4 -3
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/connect/index.cjs +3 -3
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.js +3 -3
- package/dist/impl/browser/connect/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +4 -4
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +4 -4
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/nodejs/connect/index.cjs +2 -2
- package/dist/impl/nodejs/connect/index.cjs.map +1 -1
- package/dist/impl/nodejs/connect/index.js +2 -2
- package/dist/impl/nodejs/connect/index.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +21 -5
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.d.cts +2 -2
- package/dist/impl/nodejs/index.d.ts +2 -2
- package/dist/impl/nodejs/index.js +21 -5
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -174,7 +174,7 @@ declare const NETWORKS: {
|
|
|
174
174
|
readonly tokenRegistryUrl: "https://raw.githubusercontent.com/unicitynetwork/unicity-ids/refs/heads/main/unicity-ids.mainnet.json";
|
|
175
175
|
};
|
|
176
176
|
readonly testnet: {
|
|
177
|
-
readonly name: "
|
|
177
|
+
readonly name: "Testnet";
|
|
178
178
|
readonly networkId: 4;
|
|
179
179
|
readonly aggregatorUrl: "https://gateway.testnet2.unicity.network";
|
|
180
180
|
readonly nostrRelays: readonly ["wss://nostr-relay.testnet.unicity.network"];
|
|
@@ -182,7 +182,7 @@ declare const NETWORKS: {
|
|
|
182
182
|
readonly tokenRegistryUrl: "https://raw.githubusercontent.com/unicitynetwork/unicity-ids/refs/heads/main/unicity-ids.testnet2.json";
|
|
183
183
|
};
|
|
184
184
|
readonly testnet2: {
|
|
185
|
-
readonly name: "
|
|
185
|
+
readonly name: "Testnet";
|
|
186
186
|
readonly networkId: 4;
|
|
187
187
|
readonly aggregatorUrl: "https://gateway.testnet2.unicity.network";
|
|
188
188
|
readonly nostrRelays: readonly ["wss://nostr-relay.testnet.unicity.network"];
|
|
@@ -174,7 +174,7 @@ declare const NETWORKS: {
|
|
|
174
174
|
readonly tokenRegistryUrl: "https://raw.githubusercontent.com/unicitynetwork/unicity-ids/refs/heads/main/unicity-ids.mainnet.json";
|
|
175
175
|
};
|
|
176
176
|
readonly testnet: {
|
|
177
|
-
readonly name: "
|
|
177
|
+
readonly name: "Testnet";
|
|
178
178
|
readonly networkId: 4;
|
|
179
179
|
readonly aggregatorUrl: "https://gateway.testnet2.unicity.network";
|
|
180
180
|
readonly nostrRelays: readonly ["wss://nostr-relay.testnet.unicity.network"];
|
|
@@ -182,7 +182,7 @@ declare const NETWORKS: {
|
|
|
182
182
|
readonly tokenRegistryUrl: "https://raw.githubusercontent.com/unicitynetwork/unicity-ids/refs/heads/main/unicity-ids.testnet2.json";
|
|
183
183
|
};
|
|
184
184
|
readonly testnet2: {
|
|
185
|
-
readonly name: "
|
|
185
|
+
readonly name: "Testnet";
|
|
186
186
|
readonly networkId: 4;
|
|
187
187
|
readonly aggregatorUrl: "https://gateway.testnet2.unicity.network";
|
|
188
188
|
readonly nostrRelays: readonly ["wss://nostr-relay.testnet.unicity.network"];
|
|
@@ -12663,7 +12663,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
12663
12663
|
"node_modules/undici/lib/mock/snapshot-recorder.js"(exports, module) {
|
|
12664
12664
|
"use strict";
|
|
12665
12665
|
var { writeFile, readFile, mkdir } = __require("fs/promises");
|
|
12666
|
-
var { dirname, resolve: resolve2 } = __require("path");
|
|
12666
|
+
var { dirname: dirname2, resolve: resolve2 } = __require("path");
|
|
12667
12667
|
var { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = __require("timers");
|
|
12668
12668
|
var { InvalidArgumentError, UndiciError } = require_errors();
|
|
12669
12669
|
var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
|
|
@@ -12894,7 +12894,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
12894
12894
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
12895
12895
|
}
|
|
12896
12896
|
const resolvedPath = resolve2(path2);
|
|
12897
|
-
await mkdir(
|
|
12897
|
+
await mkdir(dirname2(resolvedPath), { recursive: true });
|
|
12898
12898
|
const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
|
|
12899
12899
|
hash,
|
|
12900
12900
|
snapshot
|
|
@@ -23690,7 +23690,7 @@ var NETWORKS = {
|
|
|
23690
23690
|
// old goggregator testnet spoke the removed v1 protocol — a v2 engine cannot
|
|
23691
23691
|
// run against it. 'testnet2' stays as an alias of the same configuration.
|
|
23692
23692
|
testnet: {
|
|
23693
|
-
name: "
|
|
23693
|
+
name: "Testnet",
|
|
23694
23694
|
networkId: 4,
|
|
23695
23695
|
// v2 state-transition gateway (networkId 4 comes from the trust base). apiKey is env-injected.
|
|
23696
23696
|
aggregatorUrl: "https://gateway.testnet2.unicity.network",
|
|
@@ -23700,7 +23700,7 @@ var NETWORKS = {
|
|
|
23700
23700
|
tokenRegistryUrl: "https://raw.githubusercontent.com/unicitynetwork/unicity-ids/refs/heads/main/unicity-ids.testnet2.json"
|
|
23701
23701
|
},
|
|
23702
23702
|
testnet2: {
|
|
23703
|
-
name: "
|
|
23703
|
+
name: "Testnet",
|
|
23704
23704
|
networkId: 4,
|
|
23705
23705
|
// v2 state-transition gateway (networkId 4 comes from the trust base). apiKey is env-injected.
|
|
23706
23706
|
aggregatorUrl: "https://gateway.testnet2.unicity.network",
|
|
@@ -23813,6 +23813,22 @@ function mergeTrackedAddresses(onDisk, incoming) {
|
|
|
23813
23813
|
}
|
|
23814
23814
|
|
|
23815
23815
|
// impl/nodejs/storage/FileStorageProvider.ts
|
|
23816
|
+
function canonicalPath(p) {
|
|
23817
|
+
const resolved = path.resolve(p);
|
|
23818
|
+
const tail = [];
|
|
23819
|
+
let cursor = resolved;
|
|
23820
|
+
while (!fs.existsSync(cursor)) {
|
|
23821
|
+
const parent = path.dirname(cursor);
|
|
23822
|
+
if (parent === cursor) return resolved;
|
|
23823
|
+
tail.unshift(path.basename(cursor));
|
|
23824
|
+
cursor = parent;
|
|
23825
|
+
}
|
|
23826
|
+
try {
|
|
23827
|
+
return path.join(fs.realpathSync(cursor), ...tail);
|
|
23828
|
+
} catch {
|
|
23829
|
+
return resolved;
|
|
23830
|
+
}
|
|
23831
|
+
}
|
|
23816
23832
|
var FileStorageProvider = class {
|
|
23817
23833
|
id = "file-storage";
|
|
23818
23834
|
name = "File Storage";
|
|
@@ -23836,7 +23852,7 @@ var FileStorageProvider = class {
|
|
|
23836
23852
|
this.network = config.network;
|
|
23837
23853
|
}
|
|
23838
23854
|
this.isTxtMode = this.filePath.endsWith(".txt");
|
|
23839
|
-
this.backingStoreId = `file:${this.filePath}`;
|
|
23855
|
+
this.backingStoreId = `file:${path.join(canonicalPath(this.dataDir), path.basename(this.filePath))}`;
|
|
23840
23856
|
}
|
|
23841
23857
|
setIdentity(identity) {
|
|
23842
23858
|
this._identity = identity;
|