@unicitylabs/sphere-sdk 0.3.7 → 0.3.9

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.
Files changed (45) hide show
  1. package/dist/connect/index.cjs +770 -0
  2. package/dist/connect/index.cjs.map +1 -0
  3. package/dist/connect/index.d.cts +312 -0
  4. package/dist/connect/index.d.ts +312 -0
  5. package/dist/connect/index.js +747 -0
  6. package/dist/connect/index.js.map +1 -0
  7. package/dist/core/index.cjs +90 -2502
  8. package/dist/core/index.cjs.map +1 -1
  9. package/dist/core/index.d.cts +10 -165
  10. package/dist/core/index.d.ts +10 -165
  11. package/dist/core/index.js +86 -2498
  12. package/dist/core/index.js.map +1 -1
  13. package/dist/impl/browser/connect/index.cjs +271 -0
  14. package/dist/impl/browser/connect/index.cjs.map +1 -0
  15. package/dist/impl/browser/connect/index.d.cts +137 -0
  16. package/dist/impl/browser/connect/index.d.ts +137 -0
  17. package/dist/impl/browser/connect/index.js +248 -0
  18. package/dist/impl/browser/connect/index.js.map +1 -0
  19. package/dist/impl/browser/index.cjs +201 -28
  20. package/dist/impl/browser/index.cjs.map +1 -1
  21. package/dist/impl/browser/index.js +201 -28
  22. package/dist/impl/browser/index.js.map +1 -1
  23. package/dist/impl/browser/ipfs.cjs +6 -1
  24. package/dist/impl/browser/ipfs.cjs.map +1 -1
  25. package/dist/impl/browser/ipfs.js +6 -1
  26. package/dist/impl/browser/ipfs.js.map +1 -1
  27. package/dist/impl/nodejs/connect/index.cjs +372 -0
  28. package/dist/impl/nodejs/connect/index.cjs.map +1 -0
  29. package/dist/impl/nodejs/connect/index.d.cts +178 -0
  30. package/dist/impl/nodejs/connect/index.d.ts +178 -0
  31. package/dist/impl/nodejs/connect/index.js +333 -0
  32. package/dist/impl/nodejs/connect/index.js.map +1 -0
  33. package/dist/impl/nodejs/index.cjs +201 -28
  34. package/dist/impl/nodejs/index.cjs.map +1 -1
  35. package/dist/impl/nodejs/index.d.cts +2 -21
  36. package/dist/impl/nodejs/index.d.ts +2 -21
  37. package/dist/impl/nodejs/index.js +201 -28
  38. package/dist/impl/nodejs/index.js.map +1 -1
  39. package/dist/index.cjs +232 -2513
  40. package/dist/index.cjs.map +1 -1
  41. package/dist/index.d.cts +59 -169
  42. package/dist/index.d.ts +59 -169
  43. package/dist/index.js +228 -2506
  44. package/dist/index.js.map +1 -1
  45. package/package.json +31 -1
package/dist/index.d.cts CHANGED
@@ -2272,6 +2272,7 @@ type AggregatorEventCallback = OracleEventCallback;
2272
2272
  * Platform-independent abstraction for fetching token market prices.
2273
2273
  * Does not extend BaseProvider — stateless HTTP client with internal caching.
2274
2274
  */
2275
+
2275
2276
  /**
2276
2277
  * Supported price provider platforms
2277
2278
  */
@@ -2307,6 +2308,8 @@ interface PriceProviderConfig {
2307
2308
  timeout?: number;
2308
2309
  /** Enable debug logging */
2309
2310
  debug?: boolean;
2311
+ /** StorageProvider for persistent caching across page reloads (optional) */
2312
+ storage?: StorageProvider;
2310
2313
  }
2311
2314
  /**
2312
2315
  * Price data provider
@@ -2333,7 +2336,7 @@ interface PriceProvider {
2333
2336
  /**
2334
2337
  * Get price for a single token
2335
2338
  * @param tokenName - Token name (e.g., 'bitcoin')
2336
- * @returns Token price or null if not available
2339
+ * @returns Token price (zero-price entry for tokens not listed on the platform), or null on network error with no cache
2337
2340
  */
2338
2341
  getPrice(tokenName: string): Promise<TokenPrice | null>;
2339
2342
  /**
@@ -2347,6 +2350,7 @@ interface PriceProvider {
2347
2350
  *
2348
2351
  * Fetches token prices from CoinGecko API with internal caching.
2349
2352
  * Supports both free and pro API tiers.
2353
+ * Optionally persists cache to StorageProvider for survival across page reloads.
2350
2354
  */
2351
2355
 
2352
2356
  /**
@@ -2360,6 +2364,9 @@ interface PriceProvider {
2360
2364
  * // Pro tier
2361
2365
  * const provider = new CoinGeckoPriceProvider({ apiKey: 'CG-xxx' });
2362
2366
  *
2367
+ * // With persistent cache (survives page reloads)
2368
+ * const provider = new CoinGeckoPriceProvider({ storage: myStorageProvider });
2369
+ *
2363
2370
  * const prices = await provider.getPrices(['bitcoin', 'ethereum']);
2364
2371
  * console.log(prices.get('bitcoin')?.priceUsd);
2365
2372
  * ```
@@ -2372,8 +2379,33 @@ declare class CoinGeckoPriceProvider implements PriceProvider {
2372
2379
  private readonly timeout;
2373
2380
  private readonly debug;
2374
2381
  private readonly baseUrl;
2382
+ private readonly storage;
2383
+ /** In-flight fetch promise for deduplication of concurrent getPrices() calls */
2384
+ private fetchPromise;
2385
+ /** Token names being fetched in the current in-flight request */
2386
+ private fetchNames;
2387
+ /** Whether persistent cache has been loaded into memory */
2388
+ private persistentCacheLoaded;
2389
+ /** Promise for loading persistent cache (deduplication) */
2390
+ private loadCachePromise;
2375
2391
  constructor(config?: Omit<PriceProviderConfig, 'platform'>);
2376
2392
  getPrices(tokenNames: string[]): Promise<Map<string, TokenPrice>>;
2393
+ private doFetch;
2394
+ /**
2395
+ * Load cached prices from StorageProvider into in-memory cache.
2396
+ * Only loads entries that are still within cacheTtlMs.
2397
+ */
2398
+ private loadFromStorage;
2399
+ private doLoadFromStorage;
2400
+ /**
2401
+ * Save current prices to StorageProvider (fire-and-forget).
2402
+ */
2403
+ private saveToStorage;
2404
+ /**
2405
+ * On 429 rate-limit, extend stale cache entries so subsequent calls
2406
+ * don't immediately retry and hammer the API.
2407
+ */
2408
+ private extendCacheOnRateLimit;
2377
2409
  getPrice(tokenName: string): Promise<TokenPrice | null>;
2378
2410
  clearCache(): void;
2379
2411
  }
@@ -3376,155 +3408,6 @@ declare class GroupChatModule {
3376
3408
  }
3377
3409
  declare function createGroupChatModule(config?: GroupChatModuleConfig): GroupChatModule;
3378
3410
 
3379
- /**
3380
- * Market Module Types
3381
- * Intent bulletin board for posting and discovering intents,
3382
- * plus real-time feed subscription.
3383
- */
3384
- type IntentType = 'buy' | 'sell' | 'service' | 'announcement' | 'other' | (string & {});
3385
- type IntentStatus = 'active' | 'closed' | 'expired';
3386
- interface MarketModuleConfig {
3387
- /** Market API base URL (default: https://market-api.unicity.network) */
3388
- apiUrl?: string;
3389
- /** Request timeout in ms (default: 30000) */
3390
- timeout?: number;
3391
- }
3392
- interface MarketModuleDependencies {
3393
- identity: FullIdentity;
3394
- emitEvent: <T extends SphereEventType>(type: T, data: SphereEventMap[T]) => void;
3395
- }
3396
- interface PostIntentRequest {
3397
- description: string;
3398
- intentType: IntentType;
3399
- category?: string;
3400
- price?: number;
3401
- currency?: string;
3402
- location?: string;
3403
- contactHandle?: string;
3404
- expiresInDays?: number;
3405
- }
3406
- interface PostIntentResult {
3407
- intentId: string;
3408
- message: string;
3409
- expiresAt: string;
3410
- }
3411
- interface MarketIntent {
3412
- id: string;
3413
- intentType: IntentType;
3414
- category?: string;
3415
- price?: string;
3416
- currency: string;
3417
- location?: string;
3418
- status: IntentStatus;
3419
- createdAt: string;
3420
- expiresAt: string;
3421
- }
3422
- interface SearchIntentResult {
3423
- id: string;
3424
- score: number;
3425
- agentNametag?: string;
3426
- agentPublicKey: string;
3427
- description: string;
3428
- intentType: IntentType;
3429
- category?: string;
3430
- price?: number;
3431
- currency: string;
3432
- location?: string;
3433
- contactMethod: string;
3434
- contactHandle?: string;
3435
- createdAt: string;
3436
- expiresAt: string;
3437
- }
3438
- interface SearchFilters {
3439
- intentType?: IntentType;
3440
- category?: string;
3441
- minPrice?: number;
3442
- maxPrice?: number;
3443
- location?: string;
3444
- /** Minimum similarity score (0–1). Results below this threshold are excluded (client-side). */
3445
- minScore?: number;
3446
- }
3447
- interface SearchOptions {
3448
- filters?: SearchFilters;
3449
- limit?: number;
3450
- }
3451
- interface SearchResult {
3452
- intents: SearchIntentResult[];
3453
- count: number;
3454
- }
3455
- /** A listing broadcast on the live feed */
3456
- interface FeedListing {
3457
- id: string;
3458
- title: string;
3459
- descriptionPreview: string;
3460
- agentName: string;
3461
- agentId: number;
3462
- type: IntentType;
3463
- createdAt: string;
3464
- }
3465
- /** WebSocket message: initial batch of recent listings */
3466
- interface FeedInitialMessage {
3467
- type: 'initial';
3468
- listings: FeedListing[];
3469
- }
3470
- /** WebSocket message: single new listing */
3471
- interface FeedNewMessage {
3472
- type: 'new';
3473
- listing: FeedListing;
3474
- }
3475
- type FeedMessage = FeedInitialMessage | FeedNewMessage;
3476
- /** Callback for live feed events */
3477
- type FeedListener = (message: FeedMessage) => void;
3478
-
3479
- /**
3480
- * Market Module
3481
- *
3482
- * Intent bulletin board — post and discover intents (buy, sell,
3483
- * service, announcement, other) with secp256k1-signed requests
3484
- * tied to the wallet identity. Includes real-time feed via WebSocket.
3485
- */
3486
-
3487
- declare class MarketModule {
3488
- private readonly apiUrl;
3489
- private readonly timeout;
3490
- private identity;
3491
- private registered;
3492
- constructor(config?: MarketModuleConfig);
3493
- /** Called by Sphere after construction */
3494
- initialize(deps: MarketModuleDependencies): void;
3495
- /** No-op — stateless module */
3496
- load(): Promise<void>;
3497
- /** No-op — stateless module */
3498
- destroy(): void;
3499
- /** Post a new intent (agent is auto-registered on first post) */
3500
- postIntent(intent: PostIntentRequest): Promise<PostIntentResult>;
3501
- /** Semantic search for intents (public — no auth required) */
3502
- search(query: string, opts?: SearchOptions): Promise<SearchResult>;
3503
- /** List own intents (authenticated) */
3504
- getMyIntents(): Promise<MarketIntent[]>;
3505
- /** Close (delete) an intent */
3506
- closeIntent(intentId: string): Promise<void>;
3507
- /** Fetch the most recent listings via REST (public — no auth required) */
3508
- getRecentListings(): Promise<FeedListing[]>;
3509
- /**
3510
- * Subscribe to the live listing feed via WebSocket.
3511
- * Returns an unsubscribe function that closes the connection.
3512
- *
3513
- * Requires a WebSocket implementation — works natively in browsers
3514
- * and in Node.js 21+ (or with the `ws` package).
3515
- */
3516
- subscribeFeed(listener: FeedListener): () => void;
3517
- private ensureIdentity;
3518
- /** Register the agent's public key with the server (idempotent) */
3519
- private ensureRegistered;
3520
- private parseResponse;
3521
- private apiPost;
3522
- private apiGet;
3523
- private apiDelete;
3524
- private apiPublicPost;
3525
- }
3526
- declare function createMarketModule(config?: MarketModuleConfig): MarketModule;
3527
-
3528
3411
  /**
3529
3412
  * SDK2 Constants
3530
3413
  * Default configuration values and storage keys
@@ -3583,6 +3466,10 @@ declare const STORAGE_KEYS: {
3583
3466
  readonly TOKEN_REGISTRY_CACHE: "token_registry_cache";
3584
3467
  /** Timestamp of last token registry cache update (ms since epoch) */
3585
3468
  readonly TOKEN_REGISTRY_CACHE_TS: "token_registry_cache_ts";
3469
+ /** Cached price data JSON (from CoinGecko or other provider) */
3470
+ readonly PRICE_CACHE: "price_cache";
3471
+ /** Timestamp of last price cache update (ms since epoch) */
3472
+ readonly PRICE_CACHE_TS: "price_cache_ts";
3586
3473
  };
3587
3474
  /** Default Nostr relays */
3588
3475
  declare const DEFAULT_NOSTR_RELAYS: readonly ["wss://relay.unicity.network", "wss://relay.damus.io", "wss://nos.lol", "wss://relay.nostr.band"];
@@ -3716,8 +3603,6 @@ declare const TIMEOUTS: {
3716
3603
  /** Sync interval */
3717
3604
  readonly SYNC_INTERVAL: 60000;
3718
3605
  };
3719
- /** Default Market API URL (intent bulletin board) */
3720
- declare const DEFAULT_MARKET_API_URL: "https://market-api.unicity.network";
3721
3606
  /** Validation limits */
3722
3607
  declare const LIMITS: {
3723
3608
  /** Min nametag length */
@@ -3883,8 +3768,6 @@ interface SphereCreateOptions {
3883
3768
  groupChat?: GroupChatModuleConfig | boolean;
3884
3769
  /** Optional password to encrypt the wallet. If omitted, mnemonic is stored as plaintext. */
3885
3770
  password?: string;
3886
- /** Market module configuration. true = enable with defaults, object = custom config. */
3887
- market?: MarketModuleConfig | boolean;
3888
3771
  }
3889
3772
  /** Options for loading existing wallet */
3890
3773
  interface SphereLoadOptions {
@@ -3910,8 +3793,6 @@ interface SphereLoadOptions {
3910
3793
  groupChat?: GroupChatModuleConfig | boolean;
3911
3794
  /** Optional password to decrypt the wallet. Must match the password used during creation. */
3912
3795
  password?: string;
3913
- /** Market module configuration. true = enable with defaults, object = custom config. */
3914
- market?: MarketModuleConfig | boolean;
3915
3796
  }
3916
3797
  /** Options for importing a wallet */
3917
3798
  interface SphereImportOptions {
@@ -3945,8 +3826,6 @@ interface SphereImportOptions {
3945
3826
  groupChat?: GroupChatModuleConfig | boolean;
3946
3827
  /** Optional password to encrypt the wallet. If omitted, mnemonic/key is stored as plaintext. */
3947
3828
  password?: string;
3948
- /** Market module configuration. true = enable with defaults, object = custom config. */
3949
- market?: MarketModuleConfig | boolean;
3950
3829
  }
3951
3830
  /** L1 (ALPHA blockchain) configuration */
3952
3831
  interface L1Config {
@@ -3994,8 +3873,6 @@ interface SphereInitOptions {
3994
3873
  groupChat?: GroupChatModuleConfig | boolean;
3995
3874
  /** Optional password to encrypt/decrypt the wallet. If omitted, mnemonic is stored as plaintext. */
3996
3875
  password?: string;
3997
- /** Market module configuration. true = enable with defaults, object = custom config. */
3998
- market?: MarketModuleConfig | boolean;
3999
3876
  }
4000
3877
  /** Result of init operation */
4001
3878
  interface SphereInitResult {
@@ -4033,7 +3910,6 @@ declare class Sphere {
4033
3910
  private _payments;
4034
3911
  private _communications;
4035
3912
  private _groupChat;
4036
- private _market;
4037
3913
  private eventHandlers;
4038
3914
  private _disabledProviders;
4039
3915
  private _providerEventCleanups;
@@ -4082,12 +3958,15 @@ declare class Sphere {
4082
3958
  */
4083
3959
  private static resolveGroupChatConfig;
4084
3960
  /**
4085
- * Resolve market module config from Sphere.init() options.
4086
- * - `true` → enable with default API URL
4087
- * - `MarketModuleConfig` pass through with defaults
4088
- * - `undefined` no market module
3961
+ * Configure TokenRegistry in the main bundle context.
3962
+ *
3963
+ * The provider factory functions (createBrowserProviders / createNodeProviders)
3964
+ * are compiled into separate bundles by tsup, each with their own inlined copy
3965
+ * of TokenRegistry. Their TokenRegistry.configure() call configures a different
3966
+ * singleton than the one used by PaymentsModule (which lives in the main bundle).
3967
+ * This method ensures the main bundle's TokenRegistry is properly configured.
4089
3968
  */
4090
- private static resolveMarketConfig;
3969
+ private static configureTokenRegistry;
4091
3970
  /**
4092
3971
  * Create new wallet with mnemonic
4093
3972
  */
@@ -4146,8 +4025,6 @@ declare class Sphere {
4146
4025
  get communications(): CommunicationsModule;
4147
4026
  /** Group chat module (NIP-29). Null if not configured. */
4148
4027
  get groupChat(): GroupChatModule | null;
4149
- /** Market module (intent bulletin board). Null if not configured. */
4150
- get market(): MarketModule | null;
4151
4028
  /** Current identity (public info only) */
4152
4029
  get identity(): Identity | null;
4153
4030
  /** Is ready */
@@ -6023,6 +5900,7 @@ declare class TokenRegistry {
6023
5900
  private refreshTimer;
6024
5901
  private lastRefreshAt;
6025
5902
  private refreshPromise;
5903
+ private initialLoadPromise;
6026
5904
  private constructor();
6027
5905
  /**
6028
5906
  * Get singleton instance of TokenRegistry
@@ -6051,6 +5929,18 @@ declare class TokenRegistry {
6051
5929
  * Destroy the singleton: stop auto-refresh and reset.
6052
5930
  */
6053
5931
  static destroy(): void;
5932
+ /**
5933
+ * Wait for the initial data load (cache or remote) to complete.
5934
+ * Returns true if data was loaded, false if not (timeout or no data source).
5935
+ *
5936
+ * @param timeoutMs - Maximum wait time in ms (default: 10s). Set to 0 for no timeout.
5937
+ */
5938
+ static waitForReady(timeoutMs?: number): Promise<boolean>;
5939
+ /**
5940
+ * Perform initial data load: try cache first, fall back to remote fetch.
5941
+ * After initial data is available, start periodic auto-refresh if configured.
5942
+ */
5943
+ private performInitialLoad;
6054
5944
  /**
6055
5945
  * Load definitions from StorageProvider cache.
6056
5946
  * Only applies if cache exists and is fresh (within refreshIntervalMs).
@@ -6217,4 +6107,4 @@ declare function getCoinIdBySymbol(symbol: string): string | undefined;
6217
6107
  */
6218
6108
  declare function getCoinIdByName(name: string): string | undefined;
6219
6109
 
6220
- export { type AddressInfo, type AddressMode, type AggregatorClient, type AggregatorEvent, type AggregatorEventCallback, type AggregatorEventType, type AggregatorProvider, type AggregatorProviderConfig, type Asset, type BackgroundProgressStatus, type BaseProvider, type BroadcastHandler, type BroadcastMessage, type CMasterKeyData, COIN_TYPES, type CheckNetworkHealthOptions, CoinGeckoPriceProvider, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type CreateGroupOptions, DEFAULT_AGGREGATOR_TIMEOUT, DEFAULT_AGGREGATOR_URL, DEFAULT_DERIVATION_PATH, DEFAULT_ELECTRUM_URL, DEFAULT_GROUP_RELAYS, DEFAULT_IPFS_BOOTSTRAP_PEERS, DEFAULT_IPFS_GATEWAYS, DEFAULT_MARKET_API_URL, DEFAULT_NOSTR_RELAYS, DEV_AGGREGATOR_URL, type DecryptionProgressCallback, type DerivationMode, type DirectMessage, type ExtendedValidationResult, type FullIdentity, GroupChatModule, type GroupChatModuleConfig, type GroupChatModuleDependencies, type GroupData, type GroupMemberData, type GroupMessageData, GroupRole, GroupVisibility, type HealthCheckFn, type Identity, type IdentityConfig, type InclusionProof, type IncomingBroadcast, type IncomingMessage, type IncomingPaymentRequest$1 as IncomingPaymentRequest, type IncomingTokenTransfer, type IncomingTransfer, type InstantSplitBundle, type InstantSplitBundleV4, type InstantSplitBundleV5, type InstantSplitOptions, type InstantSplitProcessResult, type InstantSplitResult, type InstantSplitV5RecoveryMetadata, type IntentStatus, type IntentType, type InvalidatedNametagEntry, index as L1, type L1Balance, L1PaymentsModule, type L1PaymentsModuleConfig, type L1PaymentsModuleDependencies, type L1SendRequest, type L1SendResult, type L1Transaction, type L1Utxo, LIMITS, type LegacyFileImportOptions, type LegacyFileInfo, type LegacyFileParseResult, type LegacyFileParsedData, type LegacyFileType, type LoadResult, type LoggingConfig, type MarketIntent, MarketModule, type MarketModuleConfig, type MarketModuleDependencies, type MessageHandler, type MintOutboxEntry, type MintParams, type MintResult, NETWORKS, NIP29_KINDS, NOSTR_EVENT_KINDS, type NametagData, type NetworkHealthResult, type NetworkType, type OracleEvent, type OracleEventCallback, type OracleEventType, type OracleProvider, type OutboxEntry, type OutgoingPaymentRequest, type ParsedStorageData, type PaymentRequest, type PaymentRequestHandler$1 as PaymentRequestHandler, type PaymentRequestResponse, type PaymentRequestResponseHandler$1 as PaymentRequestResponseHandler, type PaymentRequestResponseType$1 as PaymentRequestResponseType, type PaymentRequestResult, type PaymentRequestStatus, type PaymentSession, type PaymentSessionDirection, type PaymentSessionError, type PaymentSessionErrorCode, type PaymentSessionStatus, PaymentsModule, type PaymentsModuleConfig, type PaymentsModuleDependencies, type PeerInfo, type PendingV5Finalization, type PostIntentRequest, type PostIntentResult, type PricePlatform, type PriceProvider, type PriceProviderConfig, type ProviderMetadata, type ProviderRole, type ProviderStatus, type ProviderStatusInfo, type ReceiveOptions, type ReceiveResult, type RegistryNetwork, STORAGE_KEYS, STORAGE_PREFIX, type SaveResult, type ScanAddressProgress, type ScanAddressesOptions, type ScanAddressesResult, type ScannedAddressResult, type SearchFilters, type SearchIntentResult, type SearchOptions, type SearchResult, type ServiceHealthResult, type SpentTokenInfo, type SpentTokenResult, Sphere, type SphereConfig, type SphereCreateOptions, SphereError, type SphereErrorCode, type SphereEventHandler, type SphereEventMap, type SphereEventType, type SphereInitOptions, type SphereInitResult, type SphereLoadOptions, type SphereStatus, type SplitPaymentSession, type SplitRecoveryResult, type StorageEvent, type StorageEventCallback, type StorageEventType, type StorageProvider, type StorageProviderConfig, type SubmitResult, type SyncResult, TEST_AGGREGATOR_URL, TEST_ELECTRUM_URL, TEST_NOSTR_RELAYS, TIMEOUTS, type Token, type TokenDefinition, type TokenIcon, type TokenPrice, TokenRegistry, type TokenState, type TokenStatus, type TokenStorageProvider, type TokenTransferDetail, type TokenTransferHandler, type TokenTransferPayload, type ValidationResult as TokenValidationResult, TokenValidator, type TombstoneEntry, type TrackedAddress, type TrackedAddressEntry, type TransactionHistoryEntry, type TransferCommitment, type TransferMode, type TransferRequest, type TransferResult, type TransferStatus, type TransportEvent, type TransportEventCallback, type TransportEventType, type TransportProvider, type TransportProviderConfig, type TrustBaseLoader, type TxfAuthenticator, type TxfGenesis, type TxfGenesisData, type TxfInclusionProof, type TxfIntegrity, type TxfInvalidEntry, type TxfMerkleStep, type TxfMerkleTreePath, type TxfMeta, type TxfOutboxEntry, type TxfSentEntry, type TxfState, type TxfStorageData, type TxfStorageDataBase, type TxfToken, type TxfTombstone, type TxfTransaction, type UnconfirmedResolutionResult, type V5FinalizationStage, type ValidationAction, type ValidationIssue, type ValidationResult$1 as ValidationResult, type WaitOptions, type WalletDatInfo, type WalletInfo, type WalletJSON$1 as WalletJSON, type WalletJSONExportOptions$1 as WalletJSONExportOptions, type WalletSource, archivedKeyFromTokenId, base58Decode, base58Encode, buildTxfStorageData, bytesToHex, checkNetworkHealth, countCommittedTransactions, createAddress, createCommunicationsModule, createGroupChatModule, createKeyPair, createL1PaymentsModule, createMarketModule, createPaymentSession, createPaymentSessionError, createPaymentsModule, createPriceProvider, createSphere, createSplitPaymentSession, createTokenValidator, decodeBech32, decryptCMasterKey, decryptPrivateKey, decryptTextFormatKey, deriveAddressInfo, deriveChildKey$1 as deriveChildKey, deriveKeyAtPath$1 as deriveKeyAtPath, doubleSha256, encodeBech32, extractFromText, findPattern, forkedKeyFromTokenIdAndState, formatAmount, generateMasterKey, generateMnemonic, getAddressHrp, getCoinIdByName, getCoinIdBySymbol, getCurrentStateHash, getPublicKey, getSphere, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenId, getTokenName, getTokenSymbol, hasMissingNewStateHash, hasUncommittedTransactions, hasValidTxfData, hash160, hexToBytes, identityFromMnemonicSync, initSphere, isArchivedKey, isForkedKey, isInstantSplitBundle, isInstantSplitBundleV4, isInstantSplitBundleV5, isKnownToken, isPaymentSessionTerminal, isPaymentSessionTimedOut, isSQLiteDatabase, isTextWalletEncrypted, isTokenKey, isValidBech32, isValidNametag, isValidPrivateKey, isValidTokenId, isWalletDatEncrypted, isWalletTextFormat, keyFromTokenId, loadSphere, mnemonicToSeedSync, normalizeSdkTokenToStorage, objectToTxf, parseAndDecryptWalletDat, parseAndDecryptWalletText, parseForkedKey, parseTxfStorageData, parseWalletDat, parseWalletText, randomBytes, randomHex, randomUUID, ripemd160, sha256, sleep, sphereExists, toHumanReadable, toSmallestUnit, tokenIdFromArchivedKey, tokenIdFromKey, tokenToTxf, txfToToken, validateMnemonic };
6110
+ export { type AddressInfo, type AddressMode, type AggregatorClient, type AggregatorEvent, type AggregatorEventCallback, type AggregatorEventType, type AggregatorProvider, type AggregatorProviderConfig, type Asset, type BackgroundProgressStatus, type BaseProvider, type BroadcastHandler, type BroadcastMessage, type CMasterKeyData, COIN_TYPES, type CheckNetworkHealthOptions, CoinGeckoPriceProvider, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type CreateGroupOptions, DEFAULT_AGGREGATOR_TIMEOUT, DEFAULT_AGGREGATOR_URL, DEFAULT_DERIVATION_PATH, DEFAULT_ELECTRUM_URL, DEFAULT_GROUP_RELAYS, DEFAULT_IPFS_BOOTSTRAP_PEERS, DEFAULT_IPFS_GATEWAYS, DEFAULT_NOSTR_RELAYS, DEV_AGGREGATOR_URL, type DecryptionProgressCallback, type DerivationMode, type DirectMessage, type ExtendedValidationResult, type FullIdentity, GroupChatModule, type GroupChatModuleConfig, type GroupChatModuleDependencies, type GroupData, type GroupMemberData, type GroupMessageData, GroupRole, GroupVisibility, type HealthCheckFn, type Identity, type IdentityConfig, type InclusionProof, type IncomingBroadcast, type IncomingMessage, type IncomingPaymentRequest$1 as IncomingPaymentRequest, type IncomingTokenTransfer, type IncomingTransfer, type InstantSplitBundle, type InstantSplitBundleV4, type InstantSplitBundleV5, type InstantSplitOptions, type InstantSplitProcessResult, type InstantSplitResult, type InstantSplitV5RecoveryMetadata, type InvalidatedNametagEntry, index as L1, type L1Balance, L1PaymentsModule, type L1PaymentsModuleConfig, type L1PaymentsModuleDependencies, type L1SendRequest, type L1SendResult, type L1Transaction, type L1Utxo, LIMITS, type LegacyFileImportOptions, type LegacyFileInfo, type LegacyFileParseResult, type LegacyFileParsedData, type LegacyFileType, type LoadResult, type LoggingConfig, type MessageHandler, type MintOutboxEntry, type MintParams, type MintResult, NETWORKS, NIP29_KINDS, NOSTR_EVENT_KINDS, type NametagData, type NetworkHealthResult, type NetworkType, type OracleEvent, type OracleEventCallback, type OracleEventType, type OracleProvider, type OutboxEntry, type OutgoingPaymentRequest, type ParsedStorageData, type PaymentRequest, type PaymentRequestHandler$1 as PaymentRequestHandler, type PaymentRequestResponse, type PaymentRequestResponseHandler$1 as PaymentRequestResponseHandler, type PaymentRequestResponseType$1 as PaymentRequestResponseType, type PaymentRequestResult, type PaymentRequestStatus, type PaymentSession, type PaymentSessionDirection, type PaymentSessionError, type PaymentSessionErrorCode, type PaymentSessionStatus, PaymentsModule, type PaymentsModuleConfig, type PaymentsModuleDependencies, type PeerInfo, type PendingV5Finalization, type PricePlatform, type PriceProvider, type PriceProviderConfig, type ProviderMetadata, type ProviderRole, type ProviderStatus, type ProviderStatusInfo, type ReceiveOptions, type ReceiveResult, type RegistryNetwork, STORAGE_KEYS, STORAGE_PREFIX, type SaveResult, type ScanAddressProgress, type ScanAddressesOptions, type ScanAddressesResult, type ScannedAddressResult, type ServiceHealthResult, type SpentTokenInfo, type SpentTokenResult, Sphere, type SphereConfig, type SphereCreateOptions, SphereError, type SphereErrorCode, type SphereEventHandler, type SphereEventMap, type SphereEventType, type SphereInitOptions, type SphereInitResult, type SphereLoadOptions, type SphereStatus, type SplitPaymentSession, type SplitRecoveryResult, type StorageEvent, type StorageEventCallback, type StorageEventType, type StorageProvider, type StorageProviderConfig, type SubmitResult, type SyncResult, TEST_AGGREGATOR_URL, TEST_ELECTRUM_URL, TEST_NOSTR_RELAYS, TIMEOUTS, type Token, type TokenDefinition, type TokenIcon, type TokenPrice, TokenRegistry, type TokenState, type TokenStatus, type TokenStorageProvider, type TokenTransferDetail, type TokenTransferHandler, type TokenTransferPayload, type ValidationResult as TokenValidationResult, TokenValidator, type TombstoneEntry, type TrackedAddress, type TrackedAddressEntry, type TransactionHistoryEntry, type TransferCommitment, type TransferMode, type TransferRequest, type TransferResult, type TransferStatus, type TransportEvent, type TransportEventCallback, type TransportEventType, type TransportProvider, type TransportProviderConfig, type TrustBaseLoader, type TxfAuthenticator, type TxfGenesis, type TxfGenesisData, type TxfInclusionProof, type TxfIntegrity, type TxfInvalidEntry, type TxfMerkleStep, type TxfMerkleTreePath, type TxfMeta, type TxfOutboxEntry, type TxfSentEntry, type TxfState, type TxfStorageData, type TxfStorageDataBase, type TxfToken, type TxfTombstone, type TxfTransaction, type UnconfirmedResolutionResult, type V5FinalizationStage, type ValidationAction, type ValidationIssue, type ValidationResult$1 as ValidationResult, type WaitOptions, type WalletDatInfo, type WalletInfo, type WalletJSON$1 as WalletJSON, type WalletJSONExportOptions$1 as WalletJSONExportOptions, type WalletSource, archivedKeyFromTokenId, base58Decode, base58Encode, buildTxfStorageData, bytesToHex, checkNetworkHealth, countCommittedTransactions, createAddress, createCommunicationsModule, createGroupChatModule, createKeyPair, createL1PaymentsModule, createPaymentSession, createPaymentSessionError, createPaymentsModule, createPriceProvider, createSphere, createSplitPaymentSession, createTokenValidator, decodeBech32, decryptCMasterKey, decryptPrivateKey, decryptTextFormatKey, deriveAddressInfo, deriveChildKey$1 as deriveChildKey, deriveKeyAtPath$1 as deriveKeyAtPath, doubleSha256, encodeBech32, extractFromText, findPattern, forkedKeyFromTokenIdAndState, formatAmount, generateMasterKey, generateMnemonic, getAddressHrp, getCoinIdByName, getCoinIdBySymbol, getCurrentStateHash, getPublicKey, getSphere, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenId, getTokenName, getTokenSymbol, hasMissingNewStateHash, hasUncommittedTransactions, hasValidTxfData, hash160, hexToBytes, identityFromMnemonicSync, initSphere, isArchivedKey, isForkedKey, isInstantSplitBundle, isInstantSplitBundleV4, isInstantSplitBundleV5, isKnownToken, isPaymentSessionTerminal, isPaymentSessionTimedOut, isSQLiteDatabase, isTextWalletEncrypted, isTokenKey, isValidBech32, isValidNametag, isValidPrivateKey, isValidTokenId, isWalletDatEncrypted, isWalletTextFormat, keyFromTokenId, loadSphere, mnemonicToSeedSync, normalizeSdkTokenToStorage, objectToTxf, parseAndDecryptWalletDat, parseAndDecryptWalletText, parseForkedKey, parseTxfStorageData, parseWalletDat, parseWalletText, randomBytes, randomHex, randomUUID, ripemd160, sha256, sleep, sphereExists, toHumanReadable, toSmallestUnit, tokenIdFromArchivedKey, tokenIdFromKey, tokenToTxf, txfToToken, validateMnemonic };