@unicitylabs/sphere-sdk 0.3.6 → 0.3.8

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/index.d.ts CHANGED
@@ -2220,6 +2220,7 @@ type AggregatorEventCallback = OracleEventCallback;
2220
2220
  * Platform-independent abstraction for fetching token market prices.
2221
2221
  * Does not extend BaseProvider — stateless HTTP client with internal caching.
2222
2222
  */
2223
+
2223
2224
  /**
2224
2225
  * Supported price provider platforms
2225
2226
  */
@@ -2255,6 +2256,8 @@ interface PriceProviderConfig {
2255
2256
  timeout?: number;
2256
2257
  /** Enable debug logging */
2257
2258
  debug?: boolean;
2259
+ /** StorageProvider for persistent caching across page reloads (optional) */
2260
+ storage?: StorageProvider;
2258
2261
  }
2259
2262
  /**
2260
2263
  * Price data provider
@@ -2281,7 +2284,7 @@ interface PriceProvider {
2281
2284
  /**
2282
2285
  * Get price for a single token
2283
2286
  * @param tokenName - Token name (e.g., 'bitcoin')
2284
- * @returns Token price or null if not available
2287
+ * @returns Token price (zero-price entry for tokens not listed on the platform), or null on network error with no cache
2285
2288
  */
2286
2289
  getPrice(tokenName: string): Promise<TokenPrice | null>;
2287
2290
  /**
@@ -2295,6 +2298,7 @@ interface PriceProvider {
2295
2298
  *
2296
2299
  * Fetches token prices from CoinGecko API with internal caching.
2297
2300
  * Supports both free and pro API tiers.
2301
+ * Optionally persists cache to StorageProvider for survival across page reloads.
2298
2302
  */
2299
2303
 
2300
2304
  /**
@@ -2308,6 +2312,9 @@ interface PriceProvider {
2308
2312
  * // Pro tier
2309
2313
  * const provider = new CoinGeckoPriceProvider({ apiKey: 'CG-xxx' });
2310
2314
  *
2315
+ * // With persistent cache (survives page reloads)
2316
+ * const provider = new CoinGeckoPriceProvider({ storage: myStorageProvider });
2317
+ *
2311
2318
  * const prices = await provider.getPrices(['bitcoin', 'ethereum']);
2312
2319
  * console.log(prices.get('bitcoin')?.priceUsd);
2313
2320
  * ```
@@ -2320,8 +2327,33 @@ declare class CoinGeckoPriceProvider implements PriceProvider {
2320
2327
  private readonly timeout;
2321
2328
  private readonly debug;
2322
2329
  private readonly baseUrl;
2330
+ private readonly storage;
2331
+ /** In-flight fetch promise for deduplication of concurrent getPrices() calls */
2332
+ private fetchPromise;
2333
+ /** Token names being fetched in the current in-flight request */
2334
+ private fetchNames;
2335
+ /** Whether persistent cache has been loaded into memory */
2336
+ private persistentCacheLoaded;
2337
+ /** Promise for loading persistent cache (deduplication) */
2338
+ private loadCachePromise;
2323
2339
  constructor(config?: Omit<PriceProviderConfig, 'platform'>);
2324
2340
  getPrices(tokenNames: string[]): Promise<Map<string, TokenPrice>>;
2341
+ private doFetch;
2342
+ /**
2343
+ * Load cached prices from StorageProvider into in-memory cache.
2344
+ * Only loads entries that are still within cacheTtlMs.
2345
+ */
2346
+ private loadFromStorage;
2347
+ private doLoadFromStorage;
2348
+ /**
2349
+ * Save current prices to StorageProvider (fire-and-forget).
2350
+ */
2351
+ private saveToStorage;
2352
+ /**
2353
+ * On 429 rate-limit, extend stale cache entries so subsequent calls
2354
+ * don't immediately retry and hammer the API.
2355
+ */
2356
+ private extendCacheOnRateLimit;
2325
2357
  getPrice(tokenName: string): Promise<TokenPrice | null>;
2326
2358
  clearCache(): void;
2327
2359
  }
@@ -3320,155 +3352,6 @@ declare class GroupChatModule {
3320
3352
  }
3321
3353
  declare function createGroupChatModule(config?: GroupChatModuleConfig): GroupChatModule;
3322
3354
 
3323
- /**
3324
- * Market Module Types
3325
- * Intent bulletin board for posting and discovering intents,
3326
- * plus real-time feed subscription.
3327
- */
3328
- type IntentType = 'buy' | 'sell' | 'service' | 'announcement' | 'other' | (string & {});
3329
- type IntentStatus = 'active' | 'closed' | 'expired';
3330
- interface MarketModuleConfig {
3331
- /** Market API base URL (default: https://market-api.unicity.network) */
3332
- apiUrl?: string;
3333
- /** Request timeout in ms (default: 30000) */
3334
- timeout?: number;
3335
- }
3336
- interface MarketModuleDependencies {
3337
- identity: FullIdentity;
3338
- emitEvent: <T extends SphereEventType>(type: T, data: SphereEventMap[T]) => void;
3339
- }
3340
- interface PostIntentRequest {
3341
- description: string;
3342
- intentType: IntentType;
3343
- category?: string;
3344
- price?: number;
3345
- currency?: string;
3346
- location?: string;
3347
- contactHandle?: string;
3348
- expiresInDays?: number;
3349
- }
3350
- interface PostIntentResult {
3351
- intentId: string;
3352
- message: string;
3353
- expiresAt: string;
3354
- }
3355
- interface MarketIntent {
3356
- id: string;
3357
- intentType: IntentType;
3358
- category?: string;
3359
- price?: string;
3360
- currency: string;
3361
- location?: string;
3362
- status: IntentStatus;
3363
- createdAt: string;
3364
- expiresAt: string;
3365
- }
3366
- interface SearchIntentResult {
3367
- id: string;
3368
- score: number;
3369
- agentNametag?: string;
3370
- agentPublicKey: string;
3371
- description: string;
3372
- intentType: IntentType;
3373
- category?: string;
3374
- price?: number;
3375
- currency: string;
3376
- location?: string;
3377
- contactMethod: string;
3378
- contactHandle?: string;
3379
- createdAt: string;
3380
- expiresAt: string;
3381
- }
3382
- interface SearchFilters {
3383
- intentType?: IntentType;
3384
- category?: string;
3385
- minPrice?: number;
3386
- maxPrice?: number;
3387
- location?: string;
3388
- /** Minimum similarity score (0–1). Results below this threshold are excluded (client-side). */
3389
- minScore?: number;
3390
- }
3391
- interface SearchOptions {
3392
- filters?: SearchFilters;
3393
- limit?: number;
3394
- }
3395
- interface SearchResult {
3396
- intents: SearchIntentResult[];
3397
- count: number;
3398
- }
3399
- /** A listing broadcast on the live feed */
3400
- interface FeedListing {
3401
- id: string;
3402
- title: string;
3403
- descriptionPreview: string;
3404
- agentName: string;
3405
- agentId: number;
3406
- type: IntentType;
3407
- createdAt: string;
3408
- }
3409
- /** WebSocket message: initial batch of recent listings */
3410
- interface FeedInitialMessage {
3411
- type: 'initial';
3412
- listings: FeedListing[];
3413
- }
3414
- /** WebSocket message: single new listing */
3415
- interface FeedNewMessage {
3416
- type: 'new';
3417
- listing: FeedListing;
3418
- }
3419
- type FeedMessage = FeedInitialMessage | FeedNewMessage;
3420
- /** Callback for live feed events */
3421
- type FeedListener = (message: FeedMessage) => void;
3422
-
3423
- /**
3424
- * Market Module
3425
- *
3426
- * Intent bulletin board — post and discover intents (buy, sell,
3427
- * service, announcement, other) with secp256k1-signed requests
3428
- * tied to the wallet identity. Includes real-time feed via WebSocket.
3429
- */
3430
-
3431
- declare class MarketModule {
3432
- private readonly apiUrl;
3433
- private readonly timeout;
3434
- private identity;
3435
- private registered;
3436
- constructor(config?: MarketModuleConfig);
3437
- /** Called by Sphere after construction */
3438
- initialize(deps: MarketModuleDependencies): void;
3439
- /** No-op — stateless module */
3440
- load(): Promise<void>;
3441
- /** No-op — stateless module */
3442
- destroy(): void;
3443
- /** Post a new intent (agent is auto-registered on first post) */
3444
- postIntent(intent: PostIntentRequest): Promise<PostIntentResult>;
3445
- /** Semantic search for intents (public — no auth required) */
3446
- search(query: string, opts?: SearchOptions): Promise<SearchResult>;
3447
- /** List own intents (authenticated) */
3448
- getMyIntents(): Promise<MarketIntent[]>;
3449
- /** Close (delete) an intent */
3450
- closeIntent(intentId: string): Promise<void>;
3451
- /** Fetch the most recent listings via REST (public — no auth required) */
3452
- getRecentListings(): Promise<FeedListing[]>;
3453
- /**
3454
- * Subscribe to the live listing feed via WebSocket.
3455
- * Returns an unsubscribe function that closes the connection.
3456
- *
3457
- * Requires a WebSocket implementation — works natively in browsers
3458
- * and in Node.js 21+ (or with the `ws` package).
3459
- */
3460
- subscribeFeed(listener: FeedListener): () => void;
3461
- private ensureIdentity;
3462
- /** Register the agent's public key with the server (idempotent) */
3463
- private ensureRegistered;
3464
- private parseResponse;
3465
- private apiPost;
3466
- private apiGet;
3467
- private apiDelete;
3468
- private apiPublicPost;
3469
- }
3470
- declare function createMarketModule(config?: MarketModuleConfig): MarketModule;
3471
-
3472
3355
  /**
3473
3356
  * SDK2 Constants
3474
3357
  * Default configuration values and storage keys
@@ -3527,6 +3410,10 @@ declare const STORAGE_KEYS: {
3527
3410
  readonly TOKEN_REGISTRY_CACHE: "token_registry_cache";
3528
3411
  /** Timestamp of last token registry cache update (ms since epoch) */
3529
3412
  readonly TOKEN_REGISTRY_CACHE_TS: "token_registry_cache_ts";
3413
+ /** Cached price data JSON (from CoinGecko or other provider) */
3414
+ readonly PRICE_CACHE: "price_cache";
3415
+ /** Timestamp of last price cache update (ms since epoch) */
3416
+ readonly PRICE_CACHE_TS: "price_cache_ts";
3530
3417
  };
3531
3418
  /** Default Nostr relays */
3532
3419
  declare const DEFAULT_NOSTR_RELAYS: readonly ["wss://relay.unicity.network", "wss://relay.damus.io", "wss://nos.lol", "wss://relay.nostr.band"];
@@ -3660,8 +3547,6 @@ declare const TIMEOUTS: {
3660
3547
  /** Sync interval */
3661
3548
  readonly SYNC_INTERVAL: 60000;
3662
3549
  };
3663
- /** Default Market API URL (intent bulletin board) */
3664
- declare const DEFAULT_MARKET_API_URL: "https://market-api.unicity.network";
3665
3550
  /** Validation limits */
3666
3551
  declare const LIMITS: {
3667
3552
  /** Min nametag length */
@@ -3827,8 +3712,6 @@ interface SphereCreateOptions {
3827
3712
  groupChat?: GroupChatModuleConfig | boolean;
3828
3713
  /** Optional password to encrypt the wallet. If omitted, mnemonic is stored as plaintext. */
3829
3714
  password?: string;
3830
- /** Market module configuration. true = enable with defaults, object = custom config. */
3831
- market?: MarketModuleConfig | boolean;
3832
3715
  }
3833
3716
  /** Options for loading existing wallet */
3834
3717
  interface SphereLoadOptions {
@@ -3854,8 +3737,6 @@ interface SphereLoadOptions {
3854
3737
  groupChat?: GroupChatModuleConfig | boolean;
3855
3738
  /** Optional password to decrypt the wallet. Must match the password used during creation. */
3856
3739
  password?: string;
3857
- /** Market module configuration. true = enable with defaults, object = custom config. */
3858
- market?: MarketModuleConfig | boolean;
3859
3740
  }
3860
3741
  /** Options for importing a wallet */
3861
3742
  interface SphereImportOptions {
@@ -3889,8 +3770,6 @@ interface SphereImportOptions {
3889
3770
  groupChat?: GroupChatModuleConfig | boolean;
3890
3771
  /** Optional password to encrypt the wallet. If omitted, mnemonic/key is stored as plaintext. */
3891
3772
  password?: string;
3892
- /** Market module configuration. true = enable with defaults, object = custom config. */
3893
- market?: MarketModuleConfig | boolean;
3894
3773
  }
3895
3774
  /** L1 (ALPHA blockchain) configuration */
3896
3775
  interface L1Config {
@@ -3938,8 +3817,6 @@ interface SphereInitOptions {
3938
3817
  groupChat?: GroupChatModuleConfig | boolean;
3939
3818
  /** Optional password to encrypt/decrypt the wallet. If omitted, mnemonic is stored as plaintext. */
3940
3819
  password?: string;
3941
- /** Market module configuration. true = enable with defaults, object = custom config. */
3942
- market?: MarketModuleConfig | boolean;
3943
3820
  }
3944
3821
  /** Result of init operation */
3945
3822
  interface SphereInitResult {
@@ -3977,7 +3854,6 @@ declare class Sphere {
3977
3854
  private _payments;
3978
3855
  private _communications;
3979
3856
  private _groupChat;
3980
- private _market;
3981
3857
  private eventHandlers;
3982
3858
  private _disabledProviders;
3983
3859
  private _providerEventCleanups;
@@ -4026,12 +3902,15 @@ declare class Sphere {
4026
3902
  */
4027
3903
  private static resolveGroupChatConfig;
4028
3904
  /**
4029
- * Resolve market module config from Sphere.init() options.
4030
- * - `true` → enable with default API URL
4031
- * - `MarketModuleConfig` pass through with defaults
4032
- * - `undefined` no market module
3905
+ * Configure TokenRegistry in the main bundle context.
3906
+ *
3907
+ * The provider factory functions (createBrowserProviders / createNodeProviders)
3908
+ * are compiled into separate bundles by tsup, each with their own inlined copy
3909
+ * of TokenRegistry. Their TokenRegistry.configure() call configures a different
3910
+ * singleton than the one used by PaymentsModule (which lives in the main bundle).
3911
+ * This method ensures the main bundle's TokenRegistry is properly configured.
4033
3912
  */
4034
- private static resolveMarketConfig;
3913
+ private static configureTokenRegistry;
4035
3914
  /**
4036
3915
  * Create new wallet with mnemonic
4037
3916
  */
@@ -4090,8 +3969,6 @@ declare class Sphere {
4090
3969
  get communications(): CommunicationsModule;
4091
3970
  /** Group chat module (NIP-29). Null if not configured. */
4092
3971
  get groupChat(): GroupChatModule | null;
4093
- /** Market module (intent bulletin board). Null if not configured. */
4094
- get market(): MarketModule | null;
4095
3972
  /** Current identity (public info only) */
4096
3973
  get identity(): Identity | null;
4097
3974
  /** Is ready */
@@ -5967,6 +5844,7 @@ declare class TokenRegistry {
5967
5844
  private refreshTimer;
5968
5845
  private lastRefreshAt;
5969
5846
  private refreshPromise;
5847
+ private initialLoadPromise;
5970
5848
  private constructor();
5971
5849
  /**
5972
5850
  * Get singleton instance of TokenRegistry
@@ -5995,6 +5873,18 @@ declare class TokenRegistry {
5995
5873
  * Destroy the singleton: stop auto-refresh and reset.
5996
5874
  */
5997
5875
  static destroy(): void;
5876
+ /**
5877
+ * Wait for the initial data load (cache or remote) to complete.
5878
+ * Returns true if data was loaded, false if not (timeout or no data source).
5879
+ *
5880
+ * @param timeoutMs - Maximum wait time in ms (default: 10s). Set to 0 for no timeout.
5881
+ */
5882
+ static waitForReady(timeoutMs?: number): Promise<boolean>;
5883
+ /**
5884
+ * Perform initial data load: try cache first, fall back to remote fetch.
5885
+ * After initial data is available, start periodic auto-refresh if configured.
5886
+ */
5887
+ private performInitialLoad;
5998
5888
  /**
5999
5889
  * Load definitions from StorageProvider cache.
6000
5890
  * Only applies if cache exists and is fresh (within refreshIntervalMs).
@@ -6161,4 +6051,4 @@ declare function getCoinIdBySymbol(symbol: string): string | undefined;
6161
6051
  */
6162
6052
  declare function getCoinIdByName(name: string): string | undefined;
6163
6053
 
6164
- 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 };
6054
+ 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 };