@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
|
@@ -1246,7 +1246,18 @@ interface InventoryItemWire {
|
|
|
1246
1246
|
status: 'active' | 'removed';
|
|
1247
1247
|
seq: number;
|
|
1248
1248
|
stateHash: string;
|
|
1249
|
+
/**
|
|
1250
|
+
* Omitted for a tombstone AND for an ACTIVE COINLESS token (wallet-api#140),
|
|
1251
|
+
* so absence is never "removed" or "not loaded" — discriminate on `status`.
|
|
1252
|
+
*/
|
|
1249
1253
|
assets?: AssetWire[];
|
|
1254
|
+
/**
|
|
1255
|
+
* Genesis `TokenType`, lowercase hex (1-64 bytes ⇒ 2-128 chars). Names the
|
|
1256
|
+
* token's CLASS, not the instance (wallet-api#147). Absent on rows written
|
|
1257
|
+
* before wallet-api migration 0015. An unrecognised type is legitimate: never
|
|
1258
|
+
* reject or hide a token for it.
|
|
1259
|
+
*/
|
|
1260
|
+
tokenType?: string;
|
|
1250
1261
|
}
|
|
1251
1262
|
interface InventoryPageWire {
|
|
1252
1263
|
cursor: number;
|
|
@@ -1246,7 +1246,18 @@ interface InventoryItemWire {
|
|
|
1246
1246
|
status: 'active' | 'removed';
|
|
1247
1247
|
seq: number;
|
|
1248
1248
|
stateHash: string;
|
|
1249
|
+
/**
|
|
1250
|
+
* Omitted for a tombstone AND for an ACTIVE COINLESS token (wallet-api#140),
|
|
1251
|
+
* so absence is never "removed" or "not loaded" — discriminate on `status`.
|
|
1252
|
+
*/
|
|
1249
1253
|
assets?: AssetWire[];
|
|
1254
|
+
/**
|
|
1255
|
+
* Genesis `TokenType`, lowercase hex (1-64 bytes ⇒ 2-128 chars). Names the
|
|
1256
|
+
* token's CLASS, not the instance (wallet-api#147). Absent on rows written
|
|
1257
|
+
* before wallet-api migration 0015. An unrecognised type is legitimate: never
|
|
1258
|
+
* reject or hide a token for it.
|
|
1259
|
+
*/
|
|
1260
|
+
tokenType?: string;
|
|
1250
1261
|
}
|
|
1251
1262
|
interface InventoryPageWire {
|
|
1252
1263
|
cursor: number;
|
|
@@ -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
|
|
@@ -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;
|