@unicitylabs/sphere-sdk 0.14.0-dev.5 → 0.14.0-dev.7

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.cts CHANGED
@@ -2504,7 +2504,7 @@ declare class PaymentsModule {
2504
2504
  onPaymentRequest(handler: PaymentRequestHandler): () => void;
2505
2505
  /** Get all payment requests. @see PaymentRequests.getPaymentRequests */
2506
2506
  getPaymentRequests(filter?: {
2507
- status?: PaymentRequestStatus$1;
2507
+ status?: PaymentRequestStatus;
2508
2508
  }): IncomingPaymentRequest[];
2509
2509
  /** Count of incoming payment requests with status `'pending'`. @see PaymentRequests.getPendingPaymentRequestsCount */
2510
2510
  getPendingPaymentRequestsCount(): number;
@@ -2518,7 +2518,7 @@ declare class PaymentsModule {
2518
2518
  payPaymentRequest(requestId: string, memo?: string): Promise<TransferResult>;
2519
2519
  /** Get outgoing payment requests. @see PaymentRequests.getOutgoingPaymentRequests */
2520
2520
  getOutgoingPaymentRequests(filter?: {
2521
- status?: PaymentRequestStatus$1;
2521
+ status?: PaymentRequestStatus;
2522
2522
  }): OutgoingPaymentRequest[];
2523
2523
  /** Subscribe to payment request responses. @see PaymentRequests.onPaymentRequestResponse */
2524
2524
  onPaymentRequestResponse(handler: PaymentRequestResponseHandler): () => void;
@@ -3935,6 +3935,107 @@ interface FailedNoticeInfo {
3935
3935
  readonly error?: string;
3936
3936
  }
3937
3937
 
3938
+ interface SendRequest {
3939
+ recipient: string;
3940
+ amount: string;
3941
+ coinId: string;
3942
+ memo?: string;
3943
+ }
3944
+ interface MintResult {
3945
+ success: boolean;
3946
+ tokenId?: string;
3947
+ error?: string;
3948
+ }
3949
+ interface HistoryEntry {
3950
+ id: string;
3951
+ type: 'SENT' | 'RECEIVED' | 'MINT';
3952
+ coinId: string;
3953
+ amount: string;
3954
+ symbol?: string;
3955
+ timestamp: number;
3956
+ memo?: string;
3957
+ transferId?: string;
3958
+ tokenId?: string;
3959
+ senderPubkey?: string;
3960
+ senderNametag?: string;
3961
+ recipientPubkey?: string;
3962
+ recipientNametag?: string;
3963
+ tokenIds?: {
3964
+ id: string;
3965
+ amount: string;
3966
+ }[];
3967
+ }
3968
+ interface HistoryPage$1 {
3969
+ entries: HistoryEntry[];
3970
+ more: boolean;
3971
+ cursor: string | null;
3972
+ }
3973
+ type PaymentRequestStatus$1 = 'pending' | 'settling' | 'paid' | 'rejected' | 'expired';
3974
+ interface PaymentRequestView {
3975
+ id: string;
3976
+ requestId: string;
3977
+ senderPubkey: string;
3978
+ senderNametag?: string;
3979
+ amount: string;
3980
+ coinId: string;
3981
+ symbol?: string;
3982
+ message?: string;
3983
+ timestamp: number;
3984
+ status: PaymentRequestStatus$1;
3985
+ }
3986
+ interface PaymentsRequestsApi {
3987
+ create(to: string, terms: {
3988
+ coinId: string;
3989
+ amount: string;
3990
+ memo?: string;
3991
+ }): Promise<{
3992
+ success: boolean;
3993
+ requestId?: string;
3994
+ error?: string;
3995
+ }>;
3996
+ list(): PaymentRequestView[];
3997
+ pay(id: string): Promise<TransferResult>;
3998
+ decline(id: string): Promise<void>;
3999
+ dismissProcessed(): void;
4000
+ }
4001
+ /**
4002
+ * A pending-transfers row, derived ON READ from the §6 stores (intent backstop
4003
+ * + delivery journal + shortfalls) — never a cached mirror. kind 'shortfall' =
4004
+ * a completed partial (#690) whose `amount` is the remainder still owed;
4005
+ * legs.certified counts journaled legs (certified, delivery still owed).
4006
+ */
4007
+ interface PendingTransfer {
4008
+ transferId: string;
4009
+ kind: 'open' | 'shortfall';
4010
+ recipient: string;
4011
+ coinId: string;
4012
+ amount: string;
4013
+ legs: {
4014
+ certified: number;
4015
+ total: number;
4016
+ };
4017
+ deliveryPending: boolean;
4018
+ createdAt: number;
4019
+ }
4020
+ interface PaymentsV2 {
4021
+ assets(coinId?: string): Promise<Asset[]>;
4022
+ tokens(filter?: {
4023
+ coinId?: string;
4024
+ }): Token[];
4025
+ history(page?: {
4026
+ before?: string;
4027
+ limit?: number;
4028
+ }): Promise<HistoryPage$1>;
4029
+ send(req: SendRequest): Promise<TransferResult>;
4030
+ mint(coinId: string, amount: bigint): Promise<MintResult>;
4031
+ receive(): Promise<{
4032
+ transfers: IncomingTransfer[];
4033
+ }>;
4034
+ pendingTransfers(): Promise<PendingTransfer[]>;
4035
+ resumeNow(): Promise<void>;
4036
+ readonly requests: PaymentsRequestsApi;
4037
+ }
4038
+
3938
4039
  /**
3939
4040
  * Group Chat Types (NIP-29)
3940
4041
  * Plain interfaces for SDK consumers — no classes, no UI helpers.
@@ -4322,7 +4423,7 @@ interface IncomingTransfer {
4322
4423
  readonly memo?: string;
4323
4424
  readonly receivedAt: number;
4324
4425
  }
4325
- type PaymentRequestStatus$1 = 'pending' | 'rejected' | 'paid' | 'expired' | 'settling';
4426
+ type PaymentRequestStatus = 'pending' | 'rejected' | 'paid' | 'expired' | 'settling';
4326
4427
  /**
4327
4428
  * Outgoing payment request (requesting payment from someone)
4328
4429
  */
@@ -4363,7 +4464,7 @@ interface IncomingPaymentRequest {
4363
4464
  /** Timestamp */
4364
4465
  readonly timestamp: number;
4365
4466
  /** Current status */
4366
- status: PaymentRequestStatus$1;
4467
+ status: PaymentRequestStatus;
4367
4468
  }
4368
4469
  /**
4369
4470
  * Result of sending a payment request
@@ -4403,7 +4504,7 @@ interface OutgoingPaymentRequest {
4403
4504
  /** Created timestamp */
4404
4505
  readonly createdAt: number;
4405
4506
  /** Current status */
4406
- status: PaymentRequestStatus$1;
4507
+ status: PaymentRequestStatus;
4407
4508
  /** Response data (if received) */
4408
4509
  response?: PaymentRequestResponse;
4409
4510
  }
@@ -4700,7 +4801,7 @@ interface SphereEventMap {
4700
4801
  'communications:ready': {
4701
4802
  conversationCount: number;
4702
4803
  };
4703
- 'history:updated': TransactionHistoryEntry;
4804
+ 'history:updated': TransactionHistoryEntry | HistoryEntry;
4704
4805
  /** Replaces transfer:confirmed / :delivery_pending / :failed on the v2 vertical. */
4705
4806
  'transfer:updated': TransferResult;
4706
4807
  /** Replaces split:checkpoint-stuck / delivery:undeliverable / delivery:deferred (by code). */
@@ -7369,86 +7470,6 @@ interface DiscoverAddressesResult {
7369
7470
  aborted: boolean;
7370
7471
  }
7371
7472
 
7372
- interface SendRequest {
7373
- recipient: string;
7374
- amount: string;
7375
- coinId: string;
7376
- memo?: string;
7377
- }
7378
- interface MintResult {
7379
- success: boolean;
7380
- tokenId?: string;
7381
- error?: string;
7382
- }
7383
- interface HistoryEntry {
7384
- id: string;
7385
- type: 'SENT' | 'RECEIVED' | 'MINT';
7386
- coinId: string;
7387
- amount: string;
7388
- symbol?: string;
7389
- timestamp: number;
7390
- memo?: string;
7391
- transferId?: string;
7392
- tokenId?: string;
7393
- senderPubkey?: string;
7394
- senderNametag?: string;
7395
- recipientPubkey?: string;
7396
- recipientNametag?: string;
7397
- tokenIds?: {
7398
- id: string;
7399
- amount: string;
7400
- }[];
7401
- }
7402
- interface HistoryPage$1 {
7403
- entries: HistoryEntry[];
7404
- more: boolean;
7405
- cursor: string | null;
7406
- }
7407
- type PaymentRequestStatus = 'pending' | 'settling' | 'paid' | 'rejected' | 'expired';
7408
- interface PaymentRequestView {
7409
- id: string;
7410
- requestId: string;
7411
- senderPubkey: string;
7412
- senderNametag?: string;
7413
- amount: string;
7414
- coinId: string;
7415
- symbol?: string;
7416
- message?: string;
7417
- timestamp: number;
7418
- status: PaymentRequestStatus;
7419
- }
7420
- interface PaymentsRequestsApi {
7421
- create(to: string, terms: {
7422
- coinId: string;
7423
- amount: string;
7424
- memo?: string;
7425
- }): Promise<{
7426
- success: boolean;
7427
- requestId?: string;
7428
- error?: string;
7429
- }>;
7430
- list(): PaymentRequestView[];
7431
- pay(id: string): Promise<TransferResult>;
7432
- decline(id: string): Promise<void>;
7433
- dismissProcessed(): void;
7434
- }
7435
- interface PaymentsV2 {
7436
- assets(coinId?: string): Promise<Asset[]>;
7437
- tokens(filter?: {
7438
- coinId?: string;
7439
- }): Token[];
7440
- history(page?: {
7441
- before?: string;
7442
- limit?: number;
7443
- }): Promise<HistoryPage$1>;
7444
- send(req: SendRequest): Promise<TransferResult>;
7445
- mint(coinId: string, amount: bigint): Promise<MintResult>;
7446
- receive(): Promise<{
7447
- transfers: IncomingTransfer[];
7448
- }>;
7449
- readonly requests: PaymentsRequestsApi;
7450
- }
7451
-
7452
7473
  /**
7453
7474
  * Text Wallet Backup Serialization Types
7454
7475
  */
@@ -8016,7 +8037,10 @@ declare class Sphere {
8016
8037
  private static resolveSwapConfig;
8017
8038
  /**
8018
8039
  * P9: validate + resolve the paymentsV2 opt-in BEFORE any storage writes —
8019
- * fail-closed at init, never a silently-degraded composition.
8040
+ * fail-closed at init, never a silently-degraded composition. Returns the
8041
+ * resolved composition (null = flag off); #728: resolving here also asserts
8042
+ * the single-network invariant (walletApi.network known + equal to the
8043
+ * Sphere network) before any session/KV/provider exists.
8020
8044
  */
8021
8045
  private static resolvePaymentsV2Flag;
8022
8046
  /**
@@ -10681,4 +10705,4 @@ declare function normalizeAddress(address: string): string;
10681
10705
  */
10682
10706
  declare function addressesMatch(a: string, b: string): boolean;
10683
10707
 
10684
- export { AUTH_CHALLENGE_PREFIX, type AddressInfo, type AddressMode, type AddressType, type AggregatorEvent, type AggregatorEventCallback, type AggregatorEventType, type AggregatorProvider, type ApplyDeltaAdded, type ApplyDeltaOptions, type ApplyDeltaRequest, type Asset, type BaseProvider, type BlobUrlEntry, type BroadcastHandler, type BroadcastMessage, COIN_TYPES, ChallengeTemplateError, type CheckNetworkHealthOptions, type CoinBalance, CoinGeckoPriceProvider, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type ComposingIndicator, type ConversationPage, type CreateGroupOptions, type CreateInvoiceRequest, DEFAULT_AGGREGATOR_TIMEOUT, DEFAULT_AGGREGATOR_URL, DEFAULT_DERIVATION_PATH, DEFAULT_GROUP_RELAYS, DEFAULT_MARKET_API_URL, DEFAULT_NOSTR_RELAYS, DEV_AGGREGATOR_URL, type DecryptionProgressCallback, type DeliverOptions, type DeliveryBlobKeys, type DeliveryCustody, type DeliveryDisposition, type DeliveryProvider, type DeliveryReceipt, type DerivationMode, type DirectMessage, type DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type EncryptedData, type ExtendedValidationResult, FIELD_ENCRYPTION_HKDF_INFO, FIELD_ENVELOPE_MAX_BYTES, FIELD_ENVELOPE_NONCE_BYTES, FIELD_ENVELOPE_PREFIX, type FullIdentity, type GetConversationPageOptions, type GetInvoicesOptions, type GetSwapsFilter, GroupChatModule, type GroupChatModuleConfig, type GroupChatModuleDependencies, type GroupData, type GroupMemberData, type GroupMessageData, GroupRole, GroupVisibility, type HealthCheckFn, type Identity, type IdentityConfig, type IncomingBroadcast, type IncomingDelivery, type IncomingMessage, type IncomingPaymentRequest, type IncomingTokenTransfer, type IncomingTransfer, type InitProgress, type InitProgressCallback, type InitProgressStep, type IntentRecord, type IntentStatus, type IntentType, type InventoryAsset, type InventoryItem, type InventoryPage, type InventoryView, type InvoiceRequestedAsset, type KeyValueStore, LIMITS, type LegacyFileParseResult, type LegacyFileParsedData, type LegacyFileType, type LoadResult, type LogHandler, type LogLevel, type LoggerConfig, type ManifestAuxiliary, type ManifestFields, type ManifestSignatures, type MarketIntent, MarketModule, type MarketModuleConfig, type MarketModuleDependencies, type MessageHandler, NETWORKS, NIP29_KINDS, NOSTR_EVENT_KINDS, type NametagBindingProof, type NametagData, type NetworkHealthResult, type NetworkType, type OracleEvent, type OracleEventCallback, type OracleEventType, type OracleProvider, type OutgoingPaymentRequest, type ParsedAddress, type ParsedStorageData, PartialSendConflictError, type PayInvoiceParams, type PaymentRequest, type PaymentRequestHandler, type PaymentRequestResponse, type PaymentRequestResponseHandler, type PaymentRequestResponseType, type PaymentRequestResult, type PaymentRequestStatus$1 as PaymentRequestStatus, PaymentsModule, type PaymentsModuleConfig, type PaymentsModuleDependencies, type PaymentsWalletApiPort, type PeerInfo, type PostIntentRequest, type PostIntentResult, type PricePlatform, type PriceProvider, type PriceProviderConfig, type ProviderMetadata, type ProviderRole, type ProviderStatus, type ProviderStatusInfo, type ReceiveOptions, type ReceiveResult, type RecoverRemovedResult, type RegistryNetwork, type ReturnPaymentParams, SIGN_MESSAGE_PREFIX, STORAGE_KEYS, STORAGE_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, STORAGE_PREFIX, type SaveResult, type SearchFilters, type SearchIntentResult, type SearchOptions, type SearchResult, type ServiceHealthResult, type SpentTokenInfo, type SpentTokenResult, Sphere, type SphereCreateOptions, SphereError, type SphereErrorCode, type SphereEventHandler, type SphereEventMap, type SphereEventType, type SphereImportOptions, type SphereInitOptions, type SphereInitResult, type SphereLoadOptions, type SphereStatus, type SphereWalletApiSession, type StorageEvent, type StorageEventCallback, type StorageEventType, type StorageProvider, type SwapDeal, type SwapManifest, SwapModule, type SwapModuleConfig, type SwapProgress, type SwapProposalResult, type SwapRef, type SwapRole, type SyncResult, TEST_AGGREGATOR_URL, TEST_NOSTR_RELAYS, TIMEOUTS, type Token, type TokenDefinition, type TokenIcon, type TokenPrice, TokenRegistry, type TokenStatus, type TokenStorageProvider, type TokenTransferDetail, type TokenTransferHandler, type TokenTransferPayload, type ValidationResult as TokenValidationResult, TokenValidator, type TombstoneEntry, type TrackedAddress, type TrackedAddressEntry, type TransactionHistoryEntry, type TransferMode, type TransferRequest, type TransferResult, type TransferStatus, type TransportEvent, type TransportEventCallback, type TransportEventType, type TransportProvider, type TxfAuthenticator, type TxfGenesis, type TxfGenesisData, type TxfInclusionProof, type TxfIntegrity, type TxfMerkleStep, type TxfMerkleTreePath, type TxfMeta$1 as TxfMeta, type TxfState, type TxfStorageData, type TxfStorageDataBase, type TxfToken, type TxfTombstone, type TxfTransaction, type UploadUrlEntry, type UploadUrlRequest, type ValidationAction, type ValidationIssue, type WakeCallback, type WakeEvent, type WakeSocketHandle, WalletApiClient, type WalletApiClientConfig, WalletApiError, type WalletApiErrorCode, type WalletApiIdentity, type WalletInfo, type WalletJSON, type WalletJSONExportOptions, type WalletSource, WholeBlobInventoryAdapter, type WholeBlobStore, addressesMatch, assertFieldEnvelopeShape, base58Decode, base58Encode, buildManifest, buildTxfStorageData, bytesToHex, checkNetworkHealth, coinIdsMatch, composeDeliveryKeys, computeDeliveryId, computeSwapId, createCommunicationsModule, createGroupChatModule, createKeyPair, createMarketModule, createNametagBinding, createPaymentsModule, createPriceProvider, createSphere, createSwapModule, createTokenValidator, decrypt, decryptField, decryptFieldBytes, decryptJson, decryptMnemonic, decryptSimple, decryptTextFormatKey, decryptWithSalt, deriveAddressInfo, deriveChildKey, deriveFieldEncryptionKey, deriveKeyAtPath, doubleSha256, encrypt, encryptField, encryptFieldBytes, encryptMnemonic, encryptSimple, extractFromText, findPattern, formatAmount, generateAddressFromMasterKey, generateMasterKey, generateMnemonic, getAddressId, getAddressStorageKey, getCoinIdByName, getCoinIdBySymbol, getPublicKey, getSphere, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenName, getTokenSymbol, hash160, hashSignMessage, hexToBytes, identityFromMnemonicSync, initSphere, isKnownToken, isPossiblyCommittedSendOutcome, isSphereError, isTextWalletEncrypted, isTokenKey, isValidAddress, isValidDirectAddress, isValidNametag, isValidPrivateKey, isValidTokenId, isWalletTextFormat, keyFromTokenId, loadSphere, logger, mnemonicToSeedSync, normalizeAddress, normalizeCoinId, parseAddress, parseAndDecryptWalletText, parseTokenAmount, parseTxfStorageData, parseWalletText, randomBytes, randomHex, randomUUID, recoverPubkeyFromSignature, ripemd160, safeParseTokenAmount, sha256, signMessage, signSwapManifest, sleep, sphereExists, toHumanReadable, tokenIdFromKey, validateManifest, validateMnemonic, verifyChallengeTemplate, verifyManifestIntegrity, verifyNametagBinding, verifySignedMessage, verifySwapSignature };
10708
+ export { AUTH_CHALLENGE_PREFIX, type AddressInfo, type AddressMode, type AddressType, type AggregatorEvent, type AggregatorEventCallback, type AggregatorEventType, type AggregatorProvider, type ApplyDeltaAdded, type ApplyDeltaOptions, type ApplyDeltaRequest, type Asset, type BaseProvider, type BlobUrlEntry, type BroadcastHandler, type BroadcastMessage, COIN_TYPES, ChallengeTemplateError, type CheckNetworkHealthOptions, type CoinBalance, CoinGeckoPriceProvider, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type ComposingIndicator, type ConversationPage, type CreateGroupOptions, type CreateInvoiceRequest, DEFAULT_AGGREGATOR_TIMEOUT, DEFAULT_AGGREGATOR_URL, DEFAULT_DERIVATION_PATH, DEFAULT_GROUP_RELAYS, DEFAULT_MARKET_API_URL, DEFAULT_NOSTR_RELAYS, DEV_AGGREGATOR_URL, type DecryptionProgressCallback, type DeliverOptions, type DeliveryBlobKeys, type DeliveryCustody, type DeliveryDisposition, type DeliveryProvider, type DeliveryReceipt, type DerivationMode, type DirectMessage, type DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type EncryptedData, type ExtendedValidationResult, FIELD_ENCRYPTION_HKDF_INFO, FIELD_ENVELOPE_MAX_BYTES, FIELD_ENVELOPE_NONCE_BYTES, FIELD_ENVELOPE_PREFIX, type FullIdentity, type GetConversationPageOptions, type GetInvoicesOptions, type GetSwapsFilter, GroupChatModule, type GroupChatModuleConfig, type GroupChatModuleDependencies, type GroupData, type GroupMemberData, type GroupMessageData, GroupRole, GroupVisibility, type HealthCheckFn, type Identity, type IdentityConfig, type IncomingBroadcast, type IncomingDelivery, type IncomingMessage, type IncomingPaymentRequest, type IncomingTokenTransfer, type IncomingTransfer, type InitProgress, type InitProgressCallback, type InitProgressStep, type IntentRecord, type IntentStatus, type IntentType, type InventoryAsset, type InventoryItem, type InventoryPage, type InventoryView, type InvoiceRequestedAsset, type KeyValueStore, LIMITS, type LegacyFileParseResult, type LegacyFileParsedData, type LegacyFileType, type LoadResult, type LogHandler, type LogLevel, type LoggerConfig, type ManifestAuxiliary, type ManifestFields, type ManifestSignatures, type MarketIntent, MarketModule, type MarketModuleConfig, type MarketModuleDependencies, type MessageHandler, NETWORKS, NIP29_KINDS, NOSTR_EVENT_KINDS, type NametagBindingProof, type NametagData, type NetworkHealthResult, type NetworkType, type OracleEvent, type OracleEventCallback, type OracleEventType, type OracleProvider, type OutgoingPaymentRequest, type ParsedAddress, type ParsedStorageData, PartialSendConflictError, type PayInvoiceParams, type PaymentRequest, type PaymentRequestHandler, type PaymentRequestResponse, type PaymentRequestResponseHandler, type PaymentRequestResponseType, type PaymentRequestResult, type PaymentRequestStatus, PaymentsModule, type PaymentsModuleConfig, type PaymentsModuleDependencies, type PaymentsWalletApiPort, type PeerInfo, type PostIntentRequest, type PostIntentResult, type PricePlatform, type PriceProvider, type PriceProviderConfig, type ProviderMetadata, type ProviderRole, type ProviderStatus, type ProviderStatusInfo, type ReceiveOptions, type ReceiveResult, type RecoverRemovedResult, type RegistryNetwork, type ReturnPaymentParams, SIGN_MESSAGE_PREFIX, STORAGE_KEYS, STORAGE_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, STORAGE_PREFIX, type SaveResult, type SearchFilters, type SearchIntentResult, type SearchOptions, type SearchResult, type ServiceHealthResult, type SpentTokenInfo, type SpentTokenResult, Sphere, type SphereCreateOptions, SphereError, type SphereErrorCode, type SphereEventHandler, type SphereEventMap, type SphereEventType, type SphereImportOptions, type SphereInitOptions, type SphereInitResult, type SphereLoadOptions, type SphereStatus, type SphereWalletApiSession, type StorageEvent, type StorageEventCallback, type StorageEventType, type StorageProvider, type SwapDeal, type SwapManifest, SwapModule, type SwapModuleConfig, type SwapProgress, type SwapProposalResult, type SwapRef, type SwapRole, type SyncResult, TEST_AGGREGATOR_URL, TEST_NOSTR_RELAYS, TIMEOUTS, type Token, type TokenDefinition, type TokenIcon, type TokenPrice, TokenRegistry, type TokenStatus, type TokenStorageProvider, type TokenTransferDetail, type TokenTransferHandler, type TokenTransferPayload, type ValidationResult as TokenValidationResult, TokenValidator, type TombstoneEntry, type TrackedAddress, type TrackedAddressEntry, type TransactionHistoryEntry, type TransferMode, type TransferRequest, type TransferResult, type TransferStatus, type TransportEvent, type TransportEventCallback, type TransportEventType, type TransportProvider, type TxfAuthenticator, type TxfGenesis, type TxfGenesisData, type TxfInclusionProof, type TxfIntegrity, type TxfMerkleStep, type TxfMerkleTreePath, type TxfMeta$1 as TxfMeta, type TxfState, type TxfStorageData, type TxfStorageDataBase, type TxfToken, type TxfTombstone, type TxfTransaction, type UploadUrlEntry, type UploadUrlRequest, type ValidationAction, type ValidationIssue, type WakeCallback, type WakeEvent, type WakeSocketHandle, WalletApiClient, type WalletApiClientConfig, WalletApiError, type WalletApiErrorCode, type WalletApiIdentity, type WalletInfo, type WalletJSON, type WalletJSONExportOptions, type WalletSource, WholeBlobInventoryAdapter, type WholeBlobStore, addressesMatch, assertFieldEnvelopeShape, base58Decode, base58Encode, buildManifest, buildTxfStorageData, bytesToHex, checkNetworkHealth, coinIdsMatch, composeDeliveryKeys, computeDeliveryId, computeSwapId, createCommunicationsModule, createGroupChatModule, createKeyPair, createMarketModule, createNametagBinding, createPaymentsModule, createPriceProvider, createSphere, createSwapModule, createTokenValidator, decrypt, decryptField, decryptFieldBytes, decryptJson, decryptMnemonic, decryptSimple, decryptTextFormatKey, decryptWithSalt, deriveAddressInfo, deriveChildKey, deriveFieldEncryptionKey, deriveKeyAtPath, doubleSha256, encrypt, encryptField, encryptFieldBytes, encryptMnemonic, encryptSimple, extractFromText, findPattern, formatAmount, generateAddressFromMasterKey, generateMasterKey, generateMnemonic, getAddressId, getAddressStorageKey, getCoinIdByName, getCoinIdBySymbol, getPublicKey, getSphere, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenName, getTokenSymbol, hash160, hashSignMessage, hexToBytes, identityFromMnemonicSync, initSphere, isKnownToken, isPossiblyCommittedSendOutcome, isSphereError, isTextWalletEncrypted, isTokenKey, isValidAddress, isValidDirectAddress, isValidNametag, isValidPrivateKey, isValidTokenId, isWalletTextFormat, keyFromTokenId, loadSphere, logger, mnemonicToSeedSync, normalizeAddress, normalizeCoinId, parseAddress, parseAndDecryptWalletText, parseTokenAmount, parseTxfStorageData, parseWalletText, randomBytes, randomHex, randomUUID, recoverPubkeyFromSignature, ripemd160, safeParseTokenAmount, sha256, signMessage, signSwapManifest, sleep, sphereExists, toHumanReadable, tokenIdFromKey, validateManifest, validateMnemonic, verifyChallengeTemplate, verifyManifestIntegrity, verifyNametagBinding, verifySignedMessage, verifySwapSignature };
package/dist/index.d.ts CHANGED
@@ -2504,7 +2504,7 @@ declare class PaymentsModule {
2504
2504
  onPaymentRequest(handler: PaymentRequestHandler): () => void;
2505
2505
  /** Get all payment requests. @see PaymentRequests.getPaymentRequests */
2506
2506
  getPaymentRequests(filter?: {
2507
- status?: PaymentRequestStatus$1;
2507
+ status?: PaymentRequestStatus;
2508
2508
  }): IncomingPaymentRequest[];
2509
2509
  /** Count of incoming payment requests with status `'pending'`. @see PaymentRequests.getPendingPaymentRequestsCount */
2510
2510
  getPendingPaymentRequestsCount(): number;
@@ -2518,7 +2518,7 @@ declare class PaymentsModule {
2518
2518
  payPaymentRequest(requestId: string, memo?: string): Promise<TransferResult>;
2519
2519
  /** Get outgoing payment requests. @see PaymentRequests.getOutgoingPaymentRequests */
2520
2520
  getOutgoingPaymentRequests(filter?: {
2521
- status?: PaymentRequestStatus$1;
2521
+ status?: PaymentRequestStatus;
2522
2522
  }): OutgoingPaymentRequest[];
2523
2523
  /** Subscribe to payment request responses. @see PaymentRequests.onPaymentRequestResponse */
2524
2524
  onPaymentRequestResponse(handler: PaymentRequestResponseHandler): () => void;
@@ -3935,6 +3935,107 @@ interface FailedNoticeInfo {
3935
3935
  readonly error?: string;
3936
3936
  }
3937
3937
 
3938
+ interface SendRequest {
3939
+ recipient: string;
3940
+ amount: string;
3941
+ coinId: string;
3942
+ memo?: string;
3943
+ }
3944
+ interface MintResult {
3945
+ success: boolean;
3946
+ tokenId?: string;
3947
+ error?: string;
3948
+ }
3949
+ interface HistoryEntry {
3950
+ id: string;
3951
+ type: 'SENT' | 'RECEIVED' | 'MINT';
3952
+ coinId: string;
3953
+ amount: string;
3954
+ symbol?: string;
3955
+ timestamp: number;
3956
+ memo?: string;
3957
+ transferId?: string;
3958
+ tokenId?: string;
3959
+ senderPubkey?: string;
3960
+ senderNametag?: string;
3961
+ recipientPubkey?: string;
3962
+ recipientNametag?: string;
3963
+ tokenIds?: {
3964
+ id: string;
3965
+ amount: string;
3966
+ }[];
3967
+ }
3968
+ interface HistoryPage$1 {
3969
+ entries: HistoryEntry[];
3970
+ more: boolean;
3971
+ cursor: string | null;
3972
+ }
3973
+ type PaymentRequestStatus$1 = 'pending' | 'settling' | 'paid' | 'rejected' | 'expired';
3974
+ interface PaymentRequestView {
3975
+ id: string;
3976
+ requestId: string;
3977
+ senderPubkey: string;
3978
+ senderNametag?: string;
3979
+ amount: string;
3980
+ coinId: string;
3981
+ symbol?: string;
3982
+ message?: string;
3983
+ timestamp: number;
3984
+ status: PaymentRequestStatus$1;
3985
+ }
3986
+ interface PaymentsRequestsApi {
3987
+ create(to: string, terms: {
3988
+ coinId: string;
3989
+ amount: string;
3990
+ memo?: string;
3991
+ }): Promise<{
3992
+ success: boolean;
3993
+ requestId?: string;
3994
+ error?: string;
3995
+ }>;
3996
+ list(): PaymentRequestView[];
3997
+ pay(id: string): Promise<TransferResult>;
3998
+ decline(id: string): Promise<void>;
3999
+ dismissProcessed(): void;
4000
+ }
4001
+ /**
4002
+ * A pending-transfers row, derived ON READ from the §6 stores (intent backstop
4003
+ * + delivery journal + shortfalls) — never a cached mirror. kind 'shortfall' =
4004
+ * a completed partial (#690) whose `amount` is the remainder still owed;
4005
+ * legs.certified counts journaled legs (certified, delivery still owed).
4006
+ */
4007
+ interface PendingTransfer {
4008
+ transferId: string;
4009
+ kind: 'open' | 'shortfall';
4010
+ recipient: string;
4011
+ coinId: string;
4012
+ amount: string;
4013
+ legs: {
4014
+ certified: number;
4015
+ total: number;
4016
+ };
4017
+ deliveryPending: boolean;
4018
+ createdAt: number;
4019
+ }
4020
+ interface PaymentsV2 {
4021
+ assets(coinId?: string): Promise<Asset[]>;
4022
+ tokens(filter?: {
4023
+ coinId?: string;
4024
+ }): Token[];
4025
+ history(page?: {
4026
+ before?: string;
4027
+ limit?: number;
4028
+ }): Promise<HistoryPage$1>;
4029
+ send(req: SendRequest): Promise<TransferResult>;
4030
+ mint(coinId: string, amount: bigint): Promise<MintResult>;
4031
+ receive(): Promise<{
4032
+ transfers: IncomingTransfer[];
4033
+ }>;
4034
+ pendingTransfers(): Promise<PendingTransfer[]>;
4035
+ resumeNow(): Promise<void>;
4036
+ readonly requests: PaymentsRequestsApi;
4037
+ }
4038
+
3938
4039
  /**
3939
4040
  * Group Chat Types (NIP-29)
3940
4041
  * Plain interfaces for SDK consumers — no classes, no UI helpers.
@@ -4322,7 +4423,7 @@ interface IncomingTransfer {
4322
4423
  readonly memo?: string;
4323
4424
  readonly receivedAt: number;
4324
4425
  }
4325
- type PaymentRequestStatus$1 = 'pending' | 'rejected' | 'paid' | 'expired' | 'settling';
4426
+ type PaymentRequestStatus = 'pending' | 'rejected' | 'paid' | 'expired' | 'settling';
4326
4427
  /**
4327
4428
  * Outgoing payment request (requesting payment from someone)
4328
4429
  */
@@ -4363,7 +4464,7 @@ interface IncomingPaymentRequest {
4363
4464
  /** Timestamp */
4364
4465
  readonly timestamp: number;
4365
4466
  /** Current status */
4366
- status: PaymentRequestStatus$1;
4467
+ status: PaymentRequestStatus;
4367
4468
  }
4368
4469
  /**
4369
4470
  * Result of sending a payment request
@@ -4403,7 +4504,7 @@ interface OutgoingPaymentRequest {
4403
4504
  /** Created timestamp */
4404
4505
  readonly createdAt: number;
4405
4506
  /** Current status */
4406
- status: PaymentRequestStatus$1;
4507
+ status: PaymentRequestStatus;
4407
4508
  /** Response data (if received) */
4408
4509
  response?: PaymentRequestResponse;
4409
4510
  }
@@ -4700,7 +4801,7 @@ interface SphereEventMap {
4700
4801
  'communications:ready': {
4701
4802
  conversationCount: number;
4702
4803
  };
4703
- 'history:updated': TransactionHistoryEntry;
4804
+ 'history:updated': TransactionHistoryEntry | HistoryEntry;
4704
4805
  /** Replaces transfer:confirmed / :delivery_pending / :failed on the v2 vertical. */
4705
4806
  'transfer:updated': TransferResult;
4706
4807
  /** Replaces split:checkpoint-stuck / delivery:undeliverable / delivery:deferred (by code). */
@@ -7369,86 +7470,6 @@ interface DiscoverAddressesResult {
7369
7470
  aborted: boolean;
7370
7471
  }
7371
7472
 
7372
- interface SendRequest {
7373
- recipient: string;
7374
- amount: string;
7375
- coinId: string;
7376
- memo?: string;
7377
- }
7378
- interface MintResult {
7379
- success: boolean;
7380
- tokenId?: string;
7381
- error?: string;
7382
- }
7383
- interface HistoryEntry {
7384
- id: string;
7385
- type: 'SENT' | 'RECEIVED' | 'MINT';
7386
- coinId: string;
7387
- amount: string;
7388
- symbol?: string;
7389
- timestamp: number;
7390
- memo?: string;
7391
- transferId?: string;
7392
- tokenId?: string;
7393
- senderPubkey?: string;
7394
- senderNametag?: string;
7395
- recipientPubkey?: string;
7396
- recipientNametag?: string;
7397
- tokenIds?: {
7398
- id: string;
7399
- amount: string;
7400
- }[];
7401
- }
7402
- interface HistoryPage$1 {
7403
- entries: HistoryEntry[];
7404
- more: boolean;
7405
- cursor: string | null;
7406
- }
7407
- type PaymentRequestStatus = 'pending' | 'settling' | 'paid' | 'rejected' | 'expired';
7408
- interface PaymentRequestView {
7409
- id: string;
7410
- requestId: string;
7411
- senderPubkey: string;
7412
- senderNametag?: string;
7413
- amount: string;
7414
- coinId: string;
7415
- symbol?: string;
7416
- message?: string;
7417
- timestamp: number;
7418
- status: PaymentRequestStatus;
7419
- }
7420
- interface PaymentsRequestsApi {
7421
- create(to: string, terms: {
7422
- coinId: string;
7423
- amount: string;
7424
- memo?: string;
7425
- }): Promise<{
7426
- success: boolean;
7427
- requestId?: string;
7428
- error?: string;
7429
- }>;
7430
- list(): PaymentRequestView[];
7431
- pay(id: string): Promise<TransferResult>;
7432
- decline(id: string): Promise<void>;
7433
- dismissProcessed(): void;
7434
- }
7435
- interface PaymentsV2 {
7436
- assets(coinId?: string): Promise<Asset[]>;
7437
- tokens(filter?: {
7438
- coinId?: string;
7439
- }): Token[];
7440
- history(page?: {
7441
- before?: string;
7442
- limit?: number;
7443
- }): Promise<HistoryPage$1>;
7444
- send(req: SendRequest): Promise<TransferResult>;
7445
- mint(coinId: string, amount: bigint): Promise<MintResult>;
7446
- receive(): Promise<{
7447
- transfers: IncomingTransfer[];
7448
- }>;
7449
- readonly requests: PaymentsRequestsApi;
7450
- }
7451
-
7452
7473
  /**
7453
7474
  * Text Wallet Backup Serialization Types
7454
7475
  */
@@ -8016,7 +8037,10 @@ declare class Sphere {
8016
8037
  private static resolveSwapConfig;
8017
8038
  /**
8018
8039
  * P9: validate + resolve the paymentsV2 opt-in BEFORE any storage writes —
8019
- * fail-closed at init, never a silently-degraded composition.
8040
+ * fail-closed at init, never a silently-degraded composition. Returns the
8041
+ * resolved composition (null = flag off); #728: resolving here also asserts
8042
+ * the single-network invariant (walletApi.network known + equal to the
8043
+ * Sphere network) before any session/KV/provider exists.
8020
8044
  */
8021
8045
  private static resolvePaymentsV2Flag;
8022
8046
  /**
@@ -10681,4 +10705,4 @@ declare function normalizeAddress(address: string): string;
10681
10705
  */
10682
10706
  declare function addressesMatch(a: string, b: string): boolean;
10683
10707
 
10684
- export { AUTH_CHALLENGE_PREFIX, type AddressInfo, type AddressMode, type AddressType, type AggregatorEvent, type AggregatorEventCallback, type AggregatorEventType, type AggregatorProvider, type ApplyDeltaAdded, type ApplyDeltaOptions, type ApplyDeltaRequest, type Asset, type BaseProvider, type BlobUrlEntry, type BroadcastHandler, type BroadcastMessage, COIN_TYPES, ChallengeTemplateError, type CheckNetworkHealthOptions, type CoinBalance, CoinGeckoPriceProvider, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type ComposingIndicator, type ConversationPage, type CreateGroupOptions, type CreateInvoiceRequest, DEFAULT_AGGREGATOR_TIMEOUT, DEFAULT_AGGREGATOR_URL, DEFAULT_DERIVATION_PATH, DEFAULT_GROUP_RELAYS, DEFAULT_MARKET_API_URL, DEFAULT_NOSTR_RELAYS, DEV_AGGREGATOR_URL, type DecryptionProgressCallback, type DeliverOptions, type DeliveryBlobKeys, type DeliveryCustody, type DeliveryDisposition, type DeliveryProvider, type DeliveryReceipt, type DerivationMode, type DirectMessage, type DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type EncryptedData, type ExtendedValidationResult, FIELD_ENCRYPTION_HKDF_INFO, FIELD_ENVELOPE_MAX_BYTES, FIELD_ENVELOPE_NONCE_BYTES, FIELD_ENVELOPE_PREFIX, type FullIdentity, type GetConversationPageOptions, type GetInvoicesOptions, type GetSwapsFilter, GroupChatModule, type GroupChatModuleConfig, type GroupChatModuleDependencies, type GroupData, type GroupMemberData, type GroupMessageData, GroupRole, GroupVisibility, type HealthCheckFn, type Identity, type IdentityConfig, type IncomingBroadcast, type IncomingDelivery, type IncomingMessage, type IncomingPaymentRequest, type IncomingTokenTransfer, type IncomingTransfer, type InitProgress, type InitProgressCallback, type InitProgressStep, type IntentRecord, type IntentStatus, type IntentType, type InventoryAsset, type InventoryItem, type InventoryPage, type InventoryView, type InvoiceRequestedAsset, type KeyValueStore, LIMITS, type LegacyFileParseResult, type LegacyFileParsedData, type LegacyFileType, type LoadResult, type LogHandler, type LogLevel, type LoggerConfig, type ManifestAuxiliary, type ManifestFields, type ManifestSignatures, type MarketIntent, MarketModule, type MarketModuleConfig, type MarketModuleDependencies, type MessageHandler, NETWORKS, NIP29_KINDS, NOSTR_EVENT_KINDS, type NametagBindingProof, type NametagData, type NetworkHealthResult, type NetworkType, type OracleEvent, type OracleEventCallback, type OracleEventType, type OracleProvider, type OutgoingPaymentRequest, type ParsedAddress, type ParsedStorageData, PartialSendConflictError, type PayInvoiceParams, type PaymentRequest, type PaymentRequestHandler, type PaymentRequestResponse, type PaymentRequestResponseHandler, type PaymentRequestResponseType, type PaymentRequestResult, type PaymentRequestStatus$1 as PaymentRequestStatus, PaymentsModule, type PaymentsModuleConfig, type PaymentsModuleDependencies, type PaymentsWalletApiPort, type PeerInfo, type PostIntentRequest, type PostIntentResult, type PricePlatform, type PriceProvider, type PriceProviderConfig, type ProviderMetadata, type ProviderRole, type ProviderStatus, type ProviderStatusInfo, type ReceiveOptions, type ReceiveResult, type RecoverRemovedResult, type RegistryNetwork, type ReturnPaymentParams, SIGN_MESSAGE_PREFIX, STORAGE_KEYS, STORAGE_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, STORAGE_PREFIX, type SaveResult, type SearchFilters, type SearchIntentResult, type SearchOptions, type SearchResult, type ServiceHealthResult, type SpentTokenInfo, type SpentTokenResult, Sphere, type SphereCreateOptions, SphereError, type SphereErrorCode, type SphereEventHandler, type SphereEventMap, type SphereEventType, type SphereImportOptions, type SphereInitOptions, type SphereInitResult, type SphereLoadOptions, type SphereStatus, type SphereWalletApiSession, type StorageEvent, type StorageEventCallback, type StorageEventType, type StorageProvider, type SwapDeal, type SwapManifest, SwapModule, type SwapModuleConfig, type SwapProgress, type SwapProposalResult, type SwapRef, type SwapRole, type SyncResult, TEST_AGGREGATOR_URL, TEST_NOSTR_RELAYS, TIMEOUTS, type Token, type TokenDefinition, type TokenIcon, type TokenPrice, TokenRegistry, type TokenStatus, type TokenStorageProvider, type TokenTransferDetail, type TokenTransferHandler, type TokenTransferPayload, type ValidationResult as TokenValidationResult, TokenValidator, type TombstoneEntry, type TrackedAddress, type TrackedAddressEntry, type TransactionHistoryEntry, type TransferMode, type TransferRequest, type TransferResult, type TransferStatus, type TransportEvent, type TransportEventCallback, type TransportEventType, type TransportProvider, type TxfAuthenticator, type TxfGenesis, type TxfGenesisData, type TxfInclusionProof, type TxfIntegrity, type TxfMerkleStep, type TxfMerkleTreePath, type TxfMeta$1 as TxfMeta, type TxfState, type TxfStorageData, type TxfStorageDataBase, type TxfToken, type TxfTombstone, type TxfTransaction, type UploadUrlEntry, type UploadUrlRequest, type ValidationAction, type ValidationIssue, type WakeCallback, type WakeEvent, type WakeSocketHandle, WalletApiClient, type WalletApiClientConfig, WalletApiError, type WalletApiErrorCode, type WalletApiIdentity, type WalletInfo, type WalletJSON, type WalletJSONExportOptions, type WalletSource, WholeBlobInventoryAdapter, type WholeBlobStore, addressesMatch, assertFieldEnvelopeShape, base58Decode, base58Encode, buildManifest, buildTxfStorageData, bytesToHex, checkNetworkHealth, coinIdsMatch, composeDeliveryKeys, computeDeliveryId, computeSwapId, createCommunicationsModule, createGroupChatModule, createKeyPair, createMarketModule, createNametagBinding, createPaymentsModule, createPriceProvider, createSphere, createSwapModule, createTokenValidator, decrypt, decryptField, decryptFieldBytes, decryptJson, decryptMnemonic, decryptSimple, decryptTextFormatKey, decryptWithSalt, deriveAddressInfo, deriveChildKey, deriveFieldEncryptionKey, deriveKeyAtPath, doubleSha256, encrypt, encryptField, encryptFieldBytes, encryptMnemonic, encryptSimple, extractFromText, findPattern, formatAmount, generateAddressFromMasterKey, generateMasterKey, generateMnemonic, getAddressId, getAddressStorageKey, getCoinIdByName, getCoinIdBySymbol, getPublicKey, getSphere, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenName, getTokenSymbol, hash160, hashSignMessage, hexToBytes, identityFromMnemonicSync, initSphere, isKnownToken, isPossiblyCommittedSendOutcome, isSphereError, isTextWalletEncrypted, isTokenKey, isValidAddress, isValidDirectAddress, isValidNametag, isValidPrivateKey, isValidTokenId, isWalletTextFormat, keyFromTokenId, loadSphere, logger, mnemonicToSeedSync, normalizeAddress, normalizeCoinId, parseAddress, parseAndDecryptWalletText, parseTokenAmount, parseTxfStorageData, parseWalletText, randomBytes, randomHex, randomUUID, recoverPubkeyFromSignature, ripemd160, safeParseTokenAmount, sha256, signMessage, signSwapManifest, sleep, sphereExists, toHumanReadable, tokenIdFromKey, validateManifest, validateMnemonic, verifyChallengeTemplate, verifyManifestIntegrity, verifyNametagBinding, verifySignedMessage, verifySwapSignature };
10708
+ export { AUTH_CHALLENGE_PREFIX, type AddressInfo, type AddressMode, type AddressType, type AggregatorEvent, type AggregatorEventCallback, type AggregatorEventType, type AggregatorProvider, type ApplyDeltaAdded, type ApplyDeltaOptions, type ApplyDeltaRequest, type Asset, type BaseProvider, type BlobUrlEntry, type BroadcastHandler, type BroadcastMessage, COIN_TYPES, ChallengeTemplateError, type CheckNetworkHealthOptions, type CoinBalance, CoinGeckoPriceProvider, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type ComposingIndicator, type ConversationPage, type CreateGroupOptions, type CreateInvoiceRequest, DEFAULT_AGGREGATOR_TIMEOUT, DEFAULT_AGGREGATOR_URL, DEFAULT_DERIVATION_PATH, DEFAULT_GROUP_RELAYS, DEFAULT_MARKET_API_URL, DEFAULT_NOSTR_RELAYS, DEV_AGGREGATOR_URL, type DecryptionProgressCallback, type DeliverOptions, type DeliveryBlobKeys, type DeliveryCustody, type DeliveryDisposition, type DeliveryProvider, type DeliveryReceipt, type DerivationMode, type DirectMessage, type DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type EncryptedData, type ExtendedValidationResult, FIELD_ENCRYPTION_HKDF_INFO, FIELD_ENVELOPE_MAX_BYTES, FIELD_ENVELOPE_NONCE_BYTES, FIELD_ENVELOPE_PREFIX, type FullIdentity, type GetConversationPageOptions, type GetInvoicesOptions, type GetSwapsFilter, GroupChatModule, type GroupChatModuleConfig, type GroupChatModuleDependencies, type GroupData, type GroupMemberData, type GroupMessageData, GroupRole, GroupVisibility, type HealthCheckFn, type Identity, type IdentityConfig, type IncomingBroadcast, type IncomingDelivery, type IncomingMessage, type IncomingPaymentRequest, type IncomingTokenTransfer, type IncomingTransfer, type InitProgress, type InitProgressCallback, type InitProgressStep, type IntentRecord, type IntentStatus, type IntentType, type InventoryAsset, type InventoryItem, type InventoryPage, type InventoryView, type InvoiceRequestedAsset, type KeyValueStore, LIMITS, type LegacyFileParseResult, type LegacyFileParsedData, type LegacyFileType, type LoadResult, type LogHandler, type LogLevel, type LoggerConfig, type ManifestAuxiliary, type ManifestFields, type ManifestSignatures, type MarketIntent, MarketModule, type MarketModuleConfig, type MarketModuleDependencies, type MessageHandler, NETWORKS, NIP29_KINDS, NOSTR_EVENT_KINDS, type NametagBindingProof, type NametagData, type NetworkHealthResult, type NetworkType, type OracleEvent, type OracleEventCallback, type OracleEventType, type OracleProvider, type OutgoingPaymentRequest, type ParsedAddress, type ParsedStorageData, PartialSendConflictError, type PayInvoiceParams, type PaymentRequest, type PaymentRequestHandler, type PaymentRequestResponse, type PaymentRequestResponseHandler, type PaymentRequestResponseType, type PaymentRequestResult, type PaymentRequestStatus, PaymentsModule, type PaymentsModuleConfig, type PaymentsModuleDependencies, type PaymentsWalletApiPort, type PeerInfo, type PostIntentRequest, type PostIntentResult, type PricePlatform, type PriceProvider, type PriceProviderConfig, type ProviderMetadata, type ProviderRole, type ProviderStatus, type ProviderStatusInfo, type ReceiveOptions, type ReceiveResult, type RecoverRemovedResult, type RegistryNetwork, type ReturnPaymentParams, SIGN_MESSAGE_PREFIX, STORAGE_KEYS, STORAGE_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, STORAGE_PREFIX, type SaveResult, type SearchFilters, type SearchIntentResult, type SearchOptions, type SearchResult, type ServiceHealthResult, type SpentTokenInfo, type SpentTokenResult, Sphere, type SphereCreateOptions, SphereError, type SphereErrorCode, type SphereEventHandler, type SphereEventMap, type SphereEventType, type SphereImportOptions, type SphereInitOptions, type SphereInitResult, type SphereLoadOptions, type SphereStatus, type SphereWalletApiSession, type StorageEvent, type StorageEventCallback, type StorageEventType, type StorageProvider, type SwapDeal, type SwapManifest, SwapModule, type SwapModuleConfig, type SwapProgress, type SwapProposalResult, type SwapRef, type SwapRole, type SyncResult, TEST_AGGREGATOR_URL, TEST_NOSTR_RELAYS, TIMEOUTS, type Token, type TokenDefinition, type TokenIcon, type TokenPrice, TokenRegistry, type TokenStatus, type TokenStorageProvider, type TokenTransferDetail, type TokenTransferHandler, type TokenTransferPayload, type ValidationResult as TokenValidationResult, TokenValidator, type TombstoneEntry, type TrackedAddress, type TrackedAddressEntry, type TransactionHistoryEntry, type TransferMode, type TransferRequest, type TransferResult, type TransferStatus, type TransportEvent, type TransportEventCallback, type TransportEventType, type TransportProvider, type TxfAuthenticator, type TxfGenesis, type TxfGenesisData, type TxfInclusionProof, type TxfIntegrity, type TxfMerkleStep, type TxfMerkleTreePath, type TxfMeta$1 as TxfMeta, type TxfState, type TxfStorageData, type TxfStorageDataBase, type TxfToken, type TxfTombstone, type TxfTransaction, type UploadUrlEntry, type UploadUrlRequest, type ValidationAction, type ValidationIssue, type WakeCallback, type WakeEvent, type WakeSocketHandle, WalletApiClient, type WalletApiClientConfig, WalletApiError, type WalletApiErrorCode, type WalletApiIdentity, type WalletInfo, type WalletJSON, type WalletJSONExportOptions, type WalletSource, WholeBlobInventoryAdapter, type WholeBlobStore, addressesMatch, assertFieldEnvelopeShape, base58Decode, base58Encode, buildManifest, buildTxfStorageData, bytesToHex, checkNetworkHealth, coinIdsMatch, composeDeliveryKeys, computeDeliveryId, computeSwapId, createCommunicationsModule, createGroupChatModule, createKeyPair, createMarketModule, createNametagBinding, createPaymentsModule, createPriceProvider, createSphere, createSwapModule, createTokenValidator, decrypt, decryptField, decryptFieldBytes, decryptJson, decryptMnemonic, decryptSimple, decryptTextFormatKey, decryptWithSalt, deriveAddressInfo, deriveChildKey, deriveFieldEncryptionKey, deriveKeyAtPath, doubleSha256, encrypt, encryptField, encryptFieldBytes, encryptMnemonic, encryptSimple, extractFromText, findPattern, formatAmount, generateAddressFromMasterKey, generateMasterKey, generateMnemonic, getAddressId, getAddressStorageKey, getCoinIdByName, getCoinIdBySymbol, getPublicKey, getSphere, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenName, getTokenSymbol, hash160, hashSignMessage, hexToBytes, identityFromMnemonicSync, initSphere, isKnownToken, isPossiblyCommittedSendOutcome, isSphereError, isTextWalletEncrypted, isTokenKey, isValidAddress, isValidDirectAddress, isValidNametag, isValidPrivateKey, isValidTokenId, isWalletTextFormat, keyFromTokenId, loadSphere, logger, mnemonicToSeedSync, normalizeAddress, normalizeCoinId, parseAddress, parseAndDecryptWalletText, parseTokenAmount, parseTxfStorageData, parseWalletText, randomBytes, randomHex, randomUUID, recoverPubkeyFromSignature, ripemd160, safeParseTokenAmount, sha256, signMessage, signSwapManifest, sleep, sphereExists, toHumanReadable, tokenIdFromKey, validateManifest, validateMnemonic, verifyChallengeTemplate, verifyManifestIntegrity, verifyNametagBinding, verifySignedMessage, verifySwapSignature };