@unicitylabs/sphere-sdk 0.16.0-dev.2 → 0.17.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 +11 -5
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.cts +4 -1
- package/dist/connect/index.d.ts +4 -1
- package/dist/connect/index.js +11 -5
- package/dist/connect/index.js.map +1 -1
- package/dist/core/index.cjs +568 -172
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +67 -0
- package/dist/core/index.d.ts +67 -0
- package/dist/core/index.js +568 -172
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/connect/index.cjs +11 -5
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.d.cts +3 -1
- package/dist/impl/browser/connect/index.d.ts +3 -1
- package/dist/impl/browser/connect/index.js +11 -5
- package/dist/impl/browser/connect/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +2 -2
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +2 -2
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/nodejs/connect/index.cjs +10 -4
- package/dist/impl/nodejs/connect/index.cjs.map +1 -1
- package/dist/impl/nodejs/connect/index.d.cts +1 -1
- package/dist/impl/nodejs/connect/index.d.ts +1 -1
- package/dist/impl/nodejs/connect/index.js +10 -4
- package/dist/impl/nodejs/connect/index.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +19 -3
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.d.cts +11 -0
- package/dist/impl/nodejs/index.d.ts +11 -0
- package/dist/impl/nodejs/index.js +19 -3
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/impl/shared/wallet-api/index.d.cts +11 -0
- package/dist/impl/shared/wallet-api/index.d.ts +11 -0
- package/dist/impl/wallet-api-v2/index.cjs +2 -0
- package/dist/impl/wallet-api-v2/index.cjs.map +1 -1
- package/dist/impl/wallet-api-v2/index.d.cts +13 -0
- package/dist/impl/wallet-api-v2/index.d.ts +13 -0
- package/dist/impl/wallet-api-v2/index.js +2 -0
- package/dist/impl/wallet-api-v2/index.js.map +1 -1
- package/dist/index.cjs +568 -172
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +568 -172
- package/dist/index.js.map +1 -1
- package/dist/modules/payments-v2/index.cjs +609 -269
- package/dist/modules/payments-v2/index.cjs.map +1 -1
- package/dist/modules/payments-v2/index.d.cts +88 -13
- package/dist/modules/payments-v2/index.d.ts +88 -13
- package/dist/modules/payments-v2/index.js +609 -269
- package/dist/modules/payments-v2/index.js.map +1 -1
- package/dist/token-engine/index.cjs +132 -34
- package/dist/token-engine/index.cjs.map +1 -1
- package/dist/token-engine/index.d.cts +19 -0
- package/dist/token-engine/index.d.ts +19 -0
- package/dist/token-engine/index.js +132 -34
- package/dist/token-engine/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -12684,7 +12684,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
12684
12684
|
"node_modules/undici/lib/mock/snapshot-recorder.js"(exports2, module2) {
|
|
12685
12685
|
"use strict";
|
|
12686
12686
|
var { writeFile, readFile, mkdir } = require("fs/promises");
|
|
12687
|
-
var { dirname, resolve: resolve2 } = require("path");
|
|
12687
|
+
var { dirname: dirname2, resolve: resolve2 } = require("path");
|
|
12688
12688
|
var { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = require("timers");
|
|
12689
12689
|
var { InvalidArgumentError, UndiciError } = require_errors();
|
|
12690
12690
|
var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
|
|
@@ -12915,7 +12915,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
12915
12915
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
12916
12916
|
}
|
|
12917
12917
|
const resolvedPath = resolve2(path2);
|
|
12918
|
-
await mkdir(
|
|
12918
|
+
await mkdir(dirname2(resolvedPath), { recursive: true });
|
|
12919
12919
|
const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
|
|
12920
12920
|
hash,
|
|
12921
12921
|
snapshot
|
|
@@ -23854,6 +23854,22 @@ function mergeTrackedAddresses(onDisk, incoming) {
|
|
|
23854
23854
|
}
|
|
23855
23855
|
|
|
23856
23856
|
// impl/nodejs/storage/FileStorageProvider.ts
|
|
23857
|
+
function canonicalPath(p) {
|
|
23858
|
+
const resolved = path.resolve(p);
|
|
23859
|
+
const tail = [];
|
|
23860
|
+
let cursor = resolved;
|
|
23861
|
+
while (!fs.existsSync(cursor)) {
|
|
23862
|
+
const parent = path.dirname(cursor);
|
|
23863
|
+
if (parent === cursor) return resolved;
|
|
23864
|
+
tail.unshift(path.basename(cursor));
|
|
23865
|
+
cursor = parent;
|
|
23866
|
+
}
|
|
23867
|
+
try {
|
|
23868
|
+
return path.join(fs.realpathSync(cursor), ...tail);
|
|
23869
|
+
} catch {
|
|
23870
|
+
return resolved;
|
|
23871
|
+
}
|
|
23872
|
+
}
|
|
23857
23873
|
var FileStorageProvider = class {
|
|
23858
23874
|
id = "file-storage";
|
|
23859
23875
|
name = "File Storage";
|
|
@@ -23877,7 +23893,7 @@ var FileStorageProvider = class {
|
|
|
23877
23893
|
this.network = config.network;
|
|
23878
23894
|
}
|
|
23879
23895
|
this.isTxtMode = this.filePath.endsWith(".txt");
|
|
23880
|
-
this.backingStoreId = `file:${this.filePath}`;
|
|
23896
|
+
this.backingStoreId = `file:${path.join(canonicalPath(this.dataDir), path.basename(this.filePath))}`;
|
|
23881
23897
|
}
|
|
23882
23898
|
setIdentity(identity) {
|
|
23883
23899
|
this._identity = identity;
|