@unicitylabs/sphere-sdk 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connect/index.cjs +5 -1
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +5 -1
- package/dist/connect/index.js.map +1 -1
- package/dist/core/index.cjs +813 -309
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +71 -2
- package/dist/core/index.d.ts +71 -2
- package/dist/core/index.js +813 -309
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/connect/index.cjs +5 -1
- package/dist/impl/browser/connect/index.cjs.map +1 -1
- package/dist/impl/browser/connect/index.js +5 -1
- package/dist/impl/browser/connect/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +7 -2
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +7 -2
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/browser/ipfs.cjs +5 -1
- package/dist/impl/browser/ipfs.cjs.map +1 -1
- package/dist/impl/browser/ipfs.js +5 -1
- package/dist/impl/browser/ipfs.js.map +1 -1
- package/dist/impl/nodejs/connect/index.cjs +5 -1
- package/dist/impl/nodejs/connect/index.cjs.map +1 -1
- package/dist/impl/nodejs/connect/index.js +5 -1
- package/dist/impl/nodejs/connect/index.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +7 -2
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.d.cts +6 -0
- package/dist/impl/nodejs/index.d.ts +6 -0
- package/dist/impl/nodejs/index.js +7 -2
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/index.cjs +815 -309
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +144 -3
- package/dist/index.d.ts +144 -3
- package/dist/index.js +814 -309
- package/dist/index.js.map +1 -1
- package/dist/l1/index.cjs +5 -1
- package/dist/l1/index.cjs.map +1 -1
- package/dist/l1/index.js +5 -1
- package/dist/l1/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -711,6 +711,70 @@ interface UnconfirmedResolutionResult {
|
|
|
711
711
|
status: 'resolved' | 'pending' | 'failed';
|
|
712
712
|
}>;
|
|
713
713
|
}
|
|
714
|
+
/**
|
|
715
|
+
* A single direct (whole-token) transfer entry inside a combined bundle.
|
|
716
|
+
* The receiver processes each entry the same way as a standalone NOSTR-FIRST
|
|
717
|
+
* commitment-only transfer.
|
|
718
|
+
*/
|
|
719
|
+
interface DirectTokenEntry {
|
|
720
|
+
/** JSON-serialized SDK token */
|
|
721
|
+
sourceToken: string;
|
|
722
|
+
/** JSON-serialized TransferCommitment */
|
|
723
|
+
commitmentData: string;
|
|
724
|
+
/** Token value (display metadata) */
|
|
725
|
+
amount: string;
|
|
726
|
+
/** Coin ID hex */
|
|
727
|
+
coinId: string;
|
|
728
|
+
/** Extracted tokenId for receiver-side dedup (optional) */
|
|
729
|
+
tokenId?: string;
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Combined Transfer Bundle V6
|
|
733
|
+
*
|
|
734
|
+
* Packs ALL tokens for a single send() operation into ONE Nostr message:
|
|
735
|
+
* - An optional V5 split bundle (when the sender had to split a token)
|
|
736
|
+
* - Zero or more direct token entries (whole tokens transferred as-is)
|
|
737
|
+
*
|
|
738
|
+
* Benefits over V5 + NOSTR-FIRST multi-message approach:
|
|
739
|
+
* - Single Nostr event = no relay overwrite issues (kind 31113 replaceable events)
|
|
740
|
+
* - Atomic delivery: all tokens arrive together or not at all
|
|
741
|
+
* - One notification, one history entry on receiver side
|
|
742
|
+
*/
|
|
743
|
+
interface CombinedTransferBundleV6 {
|
|
744
|
+
/** Bundle version */
|
|
745
|
+
version: '6.0';
|
|
746
|
+
/** Bundle type identifier */
|
|
747
|
+
type: 'COMBINED_TRANSFER';
|
|
748
|
+
/** Transfer ID (matches sender's TransferResult.id) */
|
|
749
|
+
transferId: string;
|
|
750
|
+
/** V5 split bundle (null if no split was needed) */
|
|
751
|
+
splitBundle: InstantSplitBundleV5 | null;
|
|
752
|
+
/** Direct tokens sent without splitting */
|
|
753
|
+
directTokens: DirectTokenEntry[];
|
|
754
|
+
/** Total transfer amount (display metadata) */
|
|
755
|
+
totalAmount: string;
|
|
756
|
+
/** Coin ID hex */
|
|
757
|
+
coinId: string;
|
|
758
|
+
/** Sender's transport pubkey */
|
|
759
|
+
senderPubkey: string;
|
|
760
|
+
/** Optional memo (one per transfer) */
|
|
761
|
+
memo?: string;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Type guard for CombinedTransferBundleV6
|
|
765
|
+
*/
|
|
766
|
+
declare function isCombinedTransferBundleV6(obj: unknown): obj is CombinedTransferBundleV6;
|
|
767
|
+
/**
|
|
768
|
+
* Result of building a split bundle (without sending it)
|
|
769
|
+
*/
|
|
770
|
+
interface BuildSplitBundleResult {
|
|
771
|
+
/** The constructed V5 bundle */
|
|
772
|
+
bundle: InstantSplitBundleV5;
|
|
773
|
+
/** Split group ID for correlation */
|
|
774
|
+
splitGroupId: string;
|
|
775
|
+
/** Call this after transport delivery to start background mint proof + change token creation */
|
|
776
|
+
startBackground: () => Promise<void>;
|
|
777
|
+
}
|
|
714
778
|
|
|
715
779
|
/**
|
|
716
780
|
* Payment Session Types
|
|
@@ -942,6 +1006,8 @@ interface Asset {
|
|
|
942
1006
|
readonly confirmedTokenCount: number;
|
|
943
1007
|
/** Number of unconfirmed tokens aggregated */
|
|
944
1008
|
readonly unconfirmedTokenCount: number;
|
|
1009
|
+
/** Number of tokens currently being sent */
|
|
1010
|
+
readonly transferringTokenCount: number;
|
|
945
1011
|
/** Price per whole unit in USD (null if PriceProvider not configured) */
|
|
946
1012
|
readonly priceUsd: number | null;
|
|
947
1013
|
/** Price per whole unit in EUR (null if PriceProvider not configured) */
|
|
@@ -1508,6 +1574,12 @@ interface HistoryRecord {
|
|
|
1508
1574
|
recipientNametag?: string;
|
|
1509
1575
|
/** Optional memo/message attached to the transfer */
|
|
1510
1576
|
memo?: string;
|
|
1577
|
+
/** All token IDs in a combined transfer (V6 bundle breakdown) */
|
|
1578
|
+
tokenIds?: Array<{
|
|
1579
|
+
id: string;
|
|
1580
|
+
amount: string;
|
|
1581
|
+
source: 'split' | 'direct';
|
|
1582
|
+
}>;
|
|
1511
1583
|
}
|
|
1512
1584
|
/**
|
|
1513
1585
|
* Storage result types
|
|
@@ -2572,6 +2644,12 @@ declare class PaymentsModule {
|
|
|
2572
2644
|
private proofPollingInterval;
|
|
2573
2645
|
private static readonly PROOF_POLLING_INTERVAL_MS;
|
|
2574
2646
|
private static readonly PROOF_POLLING_MAX_ATTEMPTS;
|
|
2647
|
+
private resolveUnconfirmedTimer;
|
|
2648
|
+
private static readonly RESOLVE_UNCONFIRMED_INTERVAL_MS;
|
|
2649
|
+
private loadedPromise;
|
|
2650
|
+
private loaded;
|
|
2651
|
+
private processedSplitGroupIds;
|
|
2652
|
+
private processedCombinedTransferIds;
|
|
2575
2653
|
private storageEventUnsubscribers;
|
|
2576
2654
|
private syncDebounceTimer;
|
|
2577
2655
|
private static readonly SYNC_DEBOUNCE_MS;
|
|
@@ -2641,6 +2719,43 @@ declare class PaymentsModule {
|
|
|
2641
2719
|
* @returns InstantSplitResult with timing info
|
|
2642
2720
|
*/
|
|
2643
2721
|
sendInstant(request: TransferRequest, options?: InstantSplitOptions): Promise<InstantSplitResult>;
|
|
2722
|
+
/**
|
|
2723
|
+
* Save a V5 split bundle as an unconfirmed token (shared by V5 standalone and V6 combined).
|
|
2724
|
+
* Returns the created UI token, or null if deduped.
|
|
2725
|
+
*
|
|
2726
|
+
* @param deferPersistence - If true, skip addToken/save calls (caller batches them).
|
|
2727
|
+
* The token is still added to the in-memory map for dedup; caller must call save().
|
|
2728
|
+
*/
|
|
2729
|
+
private saveUnconfirmedV5Token;
|
|
2730
|
+
/**
|
|
2731
|
+
* Save a commitment-only (NOSTR-FIRST) token and start proof polling.
|
|
2732
|
+
* Shared by standalone NOSTR-FIRST handler and V6 combined handler.
|
|
2733
|
+
* Returns the created UI token, or null if deduped/tombstoned.
|
|
2734
|
+
*
|
|
2735
|
+
* @param deferPersistence - If true, skip save() and commitment submission
|
|
2736
|
+
* (caller batches them). Token is added to in-memory map + proof polling is queued.
|
|
2737
|
+
* @param skipGenesisDedup - If true, skip genesis-ID-only dedup. V6 handler sets this
|
|
2738
|
+
* because bundle-level dedup protects against replays, and split children share genesis IDs.
|
|
2739
|
+
*/
|
|
2740
|
+
private saveCommitmentOnlyToken;
|
|
2741
|
+
/**
|
|
2742
|
+
* Process a received COMBINED_TRANSFER V6 bundle.
|
|
2743
|
+
*
|
|
2744
|
+
* Unpacks a single Nostr message into its component tokens:
|
|
2745
|
+
* - Optional V5 split bundle (saved as unconfirmed, resolved lazily)
|
|
2746
|
+
* - Zero or more direct tokens (saved as unconfirmed, proof-polled)
|
|
2747
|
+
*
|
|
2748
|
+
* Emits ONE transfer:incoming event and records ONE history entry.
|
|
2749
|
+
*/
|
|
2750
|
+
private processCombinedTransferBundle;
|
|
2751
|
+
/**
|
|
2752
|
+
* Persist processed combined transfer IDs to KV storage.
|
|
2753
|
+
*/
|
|
2754
|
+
private saveProcessedCombinedTransferIds;
|
|
2755
|
+
/**
|
|
2756
|
+
* Load processed combined transfer IDs from KV storage.
|
|
2757
|
+
*/
|
|
2758
|
+
private loadProcessedCombinedTransferIds;
|
|
2644
2759
|
/**
|
|
2645
2760
|
* Process a received INSTANT_SPLIT bundle.
|
|
2646
2761
|
*
|
|
@@ -2831,7 +2946,8 @@ declare class PaymentsModule {
|
|
|
2831
2946
|
getAssets(coinId?: string): Promise<Asset[]>;
|
|
2832
2947
|
/**
|
|
2833
2948
|
* Aggregate tokens by coinId with confirmed/unconfirmed breakdown.
|
|
2834
|
-
* Excludes tokens with status 'spent'
|
|
2949
|
+
* Excludes tokens with status 'spent' or 'invalid'.
|
|
2950
|
+
* Tokens with status 'transferring' are counted as unconfirmed (visible in UI as "Sending").
|
|
2835
2951
|
*/
|
|
2836
2952
|
private aggregateTokens;
|
|
2837
2953
|
/**
|
|
@@ -2869,6 +2985,13 @@ declare class PaymentsModule {
|
|
|
2869
2985
|
* @returns Summary with counts of resolved, still-pending, and failed tokens plus per-token details.
|
|
2870
2986
|
*/
|
|
2871
2987
|
resolveUnconfirmed(): Promise<UnconfirmedResolutionResult>;
|
|
2988
|
+
/**
|
|
2989
|
+
* Start a periodic interval that retries resolveUnconfirmed() until all
|
|
2990
|
+
* tokens are confirmed or failed. Stops automatically when nothing is
|
|
2991
|
+
* pending and is cleaned up by destroy().
|
|
2992
|
+
*/
|
|
2993
|
+
private scheduleResolveUnconfirmed;
|
|
2994
|
+
private stopResolveUnconfirmedPolling;
|
|
2872
2995
|
/**
|
|
2873
2996
|
* Process a single V5 token through its finalization stages with quick-timeout proof checks.
|
|
2874
2997
|
*/
|
|
@@ -2902,6 +3025,16 @@ declare class PaymentsModule {
|
|
|
2902
3025
|
* Called during load() to restore tokens that TXF format can't represent.
|
|
2903
3026
|
*/
|
|
2904
3027
|
private loadPendingV5Tokens;
|
|
3028
|
+
/**
|
|
3029
|
+
* Persist the set of processed splitGroupIds to KV storage.
|
|
3030
|
+
* This ensures Nostr re-deliveries are ignored across page reloads,
|
|
3031
|
+
* even when the confirmed token's in-memory ID differs from v5split_{id}.
|
|
3032
|
+
*/
|
|
3033
|
+
private saveProcessedSplitGroupIds;
|
|
3034
|
+
/**
|
|
3035
|
+
* Load processed splitGroupIds from KV storage.
|
|
3036
|
+
*/
|
|
3037
|
+
private loadProcessedSplitGroupIds;
|
|
2905
3038
|
/**
|
|
2906
3039
|
* Add a token to the wallet.
|
|
2907
3040
|
*
|
|
@@ -3214,7 +3347,7 @@ declare class PaymentsModule {
|
|
|
3214
3347
|
/**
|
|
3215
3348
|
* Handle NOSTR-FIRST commitment-only transfer (recipient side)
|
|
3216
3349
|
* This is called when receiving a transfer with only commitmentData and no proof yet.
|
|
3217
|
-
*
|
|
3350
|
+
* Delegates to saveCommitmentOnlyToken() helper, then emits event + records history.
|
|
3218
3351
|
*/
|
|
3219
3352
|
private handleCommitmentOnlyTransfer;
|
|
3220
3353
|
/**
|
|
@@ -3755,6 +3888,10 @@ declare const STORAGE_KEYS_ADDRESS: {
|
|
|
3755
3888
|
readonly GROUP_CHAT_MEMBERS: "group_chat_members";
|
|
3756
3889
|
/** Group chat: processed event IDs for deduplication */
|
|
3757
3890
|
readonly GROUP_CHAT_PROCESSED_EVENTS: "group_chat_processed_events";
|
|
3891
|
+
/** Processed V5 split group IDs for Nostr re-delivery dedup */
|
|
3892
|
+
readonly PROCESSED_SPLIT_GROUP_IDS: "processed_split_group_ids";
|
|
3893
|
+
/** Processed V6 combined transfer IDs for Nostr re-delivery dedup */
|
|
3894
|
+
readonly PROCESSED_COMBINED_TRANSFER_IDS: "processed_combined_transfer_ids";
|
|
3758
3895
|
};
|
|
3759
3896
|
/** @deprecated Use STORAGE_KEYS_GLOBAL and STORAGE_KEYS_ADDRESS instead */
|
|
3760
3897
|
declare const STORAGE_KEYS: {
|
|
@@ -3778,6 +3915,10 @@ declare const STORAGE_KEYS: {
|
|
|
3778
3915
|
readonly GROUP_CHAT_MEMBERS: "group_chat_members";
|
|
3779
3916
|
/** Group chat: processed event IDs for deduplication */
|
|
3780
3917
|
readonly GROUP_CHAT_PROCESSED_EVENTS: "group_chat_processed_events";
|
|
3918
|
+
/** Processed V5 split group IDs for Nostr re-delivery dedup */
|
|
3919
|
+
readonly PROCESSED_SPLIT_GROUP_IDS: "processed_split_group_ids";
|
|
3920
|
+
/** Processed V6 combined transfer IDs for Nostr re-delivery dedup */
|
|
3921
|
+
readonly PROCESSED_COMBINED_TRANSFER_IDS: "processed_combined_transfer_ids";
|
|
3781
3922
|
/** Encrypted BIP39 mnemonic */
|
|
3782
3923
|
readonly MNEMONIC: "mnemonic";
|
|
3783
3924
|
/** Encrypted master private key */
|
|
@@ -6598,4 +6739,4 @@ declare function getCoinIdBySymbol(symbol: string): string | undefined;
|
|
|
6598
6739
|
*/
|
|
6599
6740
|
declare function getCoinIdByName(name: string): string | undefined;
|
|
6600
6741
|
|
|
6601
|
-
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 ComposingIndicator, type ConversationPage, 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 DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type ExtendedValidationResult, type FullIdentity, type GetConversationPageOptions, 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 InitProgress, type InitProgressCallback, type InitProgressStep, 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_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, 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 SphereImportOptions, 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, getAddressId, getAddressStorageKey, 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 };
|
|
6742
|
+
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 BuildSplitBundleResult, type CMasterKeyData, COIN_TYPES, type CheckNetworkHealthOptions, CoinGeckoPriceProvider, type CombinedTransferBundleV6, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type ComposingIndicator, type ConversationPage, 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 DirectTokenEntry, type DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type ExtendedValidationResult, type FullIdentity, type GetConversationPageOptions, 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 InitProgress, type InitProgressCallback, type InitProgressStep, 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_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, 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 SphereImportOptions, 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, getAddressId, getAddressStorageKey, getCoinIdByName, getCoinIdBySymbol, getCurrentStateHash, getPublicKey, getSphere, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenId, getTokenName, getTokenSymbol, hasMissingNewStateHash, hasUncommittedTransactions, hasValidTxfData, hash160, hexToBytes, identityFromMnemonicSync, initSphere, isArchivedKey, isCombinedTransferBundleV6, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -711,6 +711,70 @@ interface UnconfirmedResolutionResult {
|
|
|
711
711
|
status: 'resolved' | 'pending' | 'failed';
|
|
712
712
|
}>;
|
|
713
713
|
}
|
|
714
|
+
/**
|
|
715
|
+
* A single direct (whole-token) transfer entry inside a combined bundle.
|
|
716
|
+
* The receiver processes each entry the same way as a standalone NOSTR-FIRST
|
|
717
|
+
* commitment-only transfer.
|
|
718
|
+
*/
|
|
719
|
+
interface DirectTokenEntry {
|
|
720
|
+
/** JSON-serialized SDK token */
|
|
721
|
+
sourceToken: string;
|
|
722
|
+
/** JSON-serialized TransferCommitment */
|
|
723
|
+
commitmentData: string;
|
|
724
|
+
/** Token value (display metadata) */
|
|
725
|
+
amount: string;
|
|
726
|
+
/** Coin ID hex */
|
|
727
|
+
coinId: string;
|
|
728
|
+
/** Extracted tokenId for receiver-side dedup (optional) */
|
|
729
|
+
tokenId?: string;
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Combined Transfer Bundle V6
|
|
733
|
+
*
|
|
734
|
+
* Packs ALL tokens for a single send() operation into ONE Nostr message:
|
|
735
|
+
* - An optional V5 split bundle (when the sender had to split a token)
|
|
736
|
+
* - Zero or more direct token entries (whole tokens transferred as-is)
|
|
737
|
+
*
|
|
738
|
+
* Benefits over V5 + NOSTR-FIRST multi-message approach:
|
|
739
|
+
* - Single Nostr event = no relay overwrite issues (kind 31113 replaceable events)
|
|
740
|
+
* - Atomic delivery: all tokens arrive together or not at all
|
|
741
|
+
* - One notification, one history entry on receiver side
|
|
742
|
+
*/
|
|
743
|
+
interface CombinedTransferBundleV6 {
|
|
744
|
+
/** Bundle version */
|
|
745
|
+
version: '6.0';
|
|
746
|
+
/** Bundle type identifier */
|
|
747
|
+
type: 'COMBINED_TRANSFER';
|
|
748
|
+
/** Transfer ID (matches sender's TransferResult.id) */
|
|
749
|
+
transferId: string;
|
|
750
|
+
/** V5 split bundle (null if no split was needed) */
|
|
751
|
+
splitBundle: InstantSplitBundleV5 | null;
|
|
752
|
+
/** Direct tokens sent without splitting */
|
|
753
|
+
directTokens: DirectTokenEntry[];
|
|
754
|
+
/** Total transfer amount (display metadata) */
|
|
755
|
+
totalAmount: string;
|
|
756
|
+
/** Coin ID hex */
|
|
757
|
+
coinId: string;
|
|
758
|
+
/** Sender's transport pubkey */
|
|
759
|
+
senderPubkey: string;
|
|
760
|
+
/** Optional memo (one per transfer) */
|
|
761
|
+
memo?: string;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Type guard for CombinedTransferBundleV6
|
|
765
|
+
*/
|
|
766
|
+
declare function isCombinedTransferBundleV6(obj: unknown): obj is CombinedTransferBundleV6;
|
|
767
|
+
/**
|
|
768
|
+
* Result of building a split bundle (without sending it)
|
|
769
|
+
*/
|
|
770
|
+
interface BuildSplitBundleResult {
|
|
771
|
+
/** The constructed V5 bundle */
|
|
772
|
+
bundle: InstantSplitBundleV5;
|
|
773
|
+
/** Split group ID for correlation */
|
|
774
|
+
splitGroupId: string;
|
|
775
|
+
/** Call this after transport delivery to start background mint proof + change token creation */
|
|
776
|
+
startBackground: () => Promise<void>;
|
|
777
|
+
}
|
|
714
778
|
|
|
715
779
|
/**
|
|
716
780
|
* Payment Session Types
|
|
@@ -942,6 +1006,8 @@ interface Asset {
|
|
|
942
1006
|
readonly confirmedTokenCount: number;
|
|
943
1007
|
/** Number of unconfirmed tokens aggregated */
|
|
944
1008
|
readonly unconfirmedTokenCount: number;
|
|
1009
|
+
/** Number of tokens currently being sent */
|
|
1010
|
+
readonly transferringTokenCount: number;
|
|
945
1011
|
/** Price per whole unit in USD (null if PriceProvider not configured) */
|
|
946
1012
|
readonly priceUsd: number | null;
|
|
947
1013
|
/** Price per whole unit in EUR (null if PriceProvider not configured) */
|
|
@@ -1508,6 +1574,12 @@ interface HistoryRecord {
|
|
|
1508
1574
|
recipientNametag?: string;
|
|
1509
1575
|
/** Optional memo/message attached to the transfer */
|
|
1510
1576
|
memo?: string;
|
|
1577
|
+
/** All token IDs in a combined transfer (V6 bundle breakdown) */
|
|
1578
|
+
tokenIds?: Array<{
|
|
1579
|
+
id: string;
|
|
1580
|
+
amount: string;
|
|
1581
|
+
source: 'split' | 'direct';
|
|
1582
|
+
}>;
|
|
1511
1583
|
}
|
|
1512
1584
|
/**
|
|
1513
1585
|
* Storage result types
|
|
@@ -2572,6 +2644,12 @@ declare class PaymentsModule {
|
|
|
2572
2644
|
private proofPollingInterval;
|
|
2573
2645
|
private static readonly PROOF_POLLING_INTERVAL_MS;
|
|
2574
2646
|
private static readonly PROOF_POLLING_MAX_ATTEMPTS;
|
|
2647
|
+
private resolveUnconfirmedTimer;
|
|
2648
|
+
private static readonly RESOLVE_UNCONFIRMED_INTERVAL_MS;
|
|
2649
|
+
private loadedPromise;
|
|
2650
|
+
private loaded;
|
|
2651
|
+
private processedSplitGroupIds;
|
|
2652
|
+
private processedCombinedTransferIds;
|
|
2575
2653
|
private storageEventUnsubscribers;
|
|
2576
2654
|
private syncDebounceTimer;
|
|
2577
2655
|
private static readonly SYNC_DEBOUNCE_MS;
|
|
@@ -2641,6 +2719,43 @@ declare class PaymentsModule {
|
|
|
2641
2719
|
* @returns InstantSplitResult with timing info
|
|
2642
2720
|
*/
|
|
2643
2721
|
sendInstant(request: TransferRequest, options?: InstantSplitOptions): Promise<InstantSplitResult>;
|
|
2722
|
+
/**
|
|
2723
|
+
* Save a V5 split bundle as an unconfirmed token (shared by V5 standalone and V6 combined).
|
|
2724
|
+
* Returns the created UI token, or null if deduped.
|
|
2725
|
+
*
|
|
2726
|
+
* @param deferPersistence - If true, skip addToken/save calls (caller batches them).
|
|
2727
|
+
* The token is still added to the in-memory map for dedup; caller must call save().
|
|
2728
|
+
*/
|
|
2729
|
+
private saveUnconfirmedV5Token;
|
|
2730
|
+
/**
|
|
2731
|
+
* Save a commitment-only (NOSTR-FIRST) token and start proof polling.
|
|
2732
|
+
* Shared by standalone NOSTR-FIRST handler and V6 combined handler.
|
|
2733
|
+
* Returns the created UI token, or null if deduped/tombstoned.
|
|
2734
|
+
*
|
|
2735
|
+
* @param deferPersistence - If true, skip save() and commitment submission
|
|
2736
|
+
* (caller batches them). Token is added to in-memory map + proof polling is queued.
|
|
2737
|
+
* @param skipGenesisDedup - If true, skip genesis-ID-only dedup. V6 handler sets this
|
|
2738
|
+
* because bundle-level dedup protects against replays, and split children share genesis IDs.
|
|
2739
|
+
*/
|
|
2740
|
+
private saveCommitmentOnlyToken;
|
|
2741
|
+
/**
|
|
2742
|
+
* Process a received COMBINED_TRANSFER V6 bundle.
|
|
2743
|
+
*
|
|
2744
|
+
* Unpacks a single Nostr message into its component tokens:
|
|
2745
|
+
* - Optional V5 split bundle (saved as unconfirmed, resolved lazily)
|
|
2746
|
+
* - Zero or more direct tokens (saved as unconfirmed, proof-polled)
|
|
2747
|
+
*
|
|
2748
|
+
* Emits ONE transfer:incoming event and records ONE history entry.
|
|
2749
|
+
*/
|
|
2750
|
+
private processCombinedTransferBundle;
|
|
2751
|
+
/**
|
|
2752
|
+
* Persist processed combined transfer IDs to KV storage.
|
|
2753
|
+
*/
|
|
2754
|
+
private saveProcessedCombinedTransferIds;
|
|
2755
|
+
/**
|
|
2756
|
+
* Load processed combined transfer IDs from KV storage.
|
|
2757
|
+
*/
|
|
2758
|
+
private loadProcessedCombinedTransferIds;
|
|
2644
2759
|
/**
|
|
2645
2760
|
* Process a received INSTANT_SPLIT bundle.
|
|
2646
2761
|
*
|
|
@@ -2831,7 +2946,8 @@ declare class PaymentsModule {
|
|
|
2831
2946
|
getAssets(coinId?: string): Promise<Asset[]>;
|
|
2832
2947
|
/**
|
|
2833
2948
|
* Aggregate tokens by coinId with confirmed/unconfirmed breakdown.
|
|
2834
|
-
* Excludes tokens with status 'spent'
|
|
2949
|
+
* Excludes tokens with status 'spent' or 'invalid'.
|
|
2950
|
+
* Tokens with status 'transferring' are counted as unconfirmed (visible in UI as "Sending").
|
|
2835
2951
|
*/
|
|
2836
2952
|
private aggregateTokens;
|
|
2837
2953
|
/**
|
|
@@ -2869,6 +2985,13 @@ declare class PaymentsModule {
|
|
|
2869
2985
|
* @returns Summary with counts of resolved, still-pending, and failed tokens plus per-token details.
|
|
2870
2986
|
*/
|
|
2871
2987
|
resolveUnconfirmed(): Promise<UnconfirmedResolutionResult>;
|
|
2988
|
+
/**
|
|
2989
|
+
* Start a periodic interval that retries resolveUnconfirmed() until all
|
|
2990
|
+
* tokens are confirmed or failed. Stops automatically when nothing is
|
|
2991
|
+
* pending and is cleaned up by destroy().
|
|
2992
|
+
*/
|
|
2993
|
+
private scheduleResolveUnconfirmed;
|
|
2994
|
+
private stopResolveUnconfirmedPolling;
|
|
2872
2995
|
/**
|
|
2873
2996
|
* Process a single V5 token through its finalization stages with quick-timeout proof checks.
|
|
2874
2997
|
*/
|
|
@@ -2902,6 +3025,16 @@ declare class PaymentsModule {
|
|
|
2902
3025
|
* Called during load() to restore tokens that TXF format can't represent.
|
|
2903
3026
|
*/
|
|
2904
3027
|
private loadPendingV5Tokens;
|
|
3028
|
+
/**
|
|
3029
|
+
* Persist the set of processed splitGroupIds to KV storage.
|
|
3030
|
+
* This ensures Nostr re-deliveries are ignored across page reloads,
|
|
3031
|
+
* even when the confirmed token's in-memory ID differs from v5split_{id}.
|
|
3032
|
+
*/
|
|
3033
|
+
private saveProcessedSplitGroupIds;
|
|
3034
|
+
/**
|
|
3035
|
+
* Load processed splitGroupIds from KV storage.
|
|
3036
|
+
*/
|
|
3037
|
+
private loadProcessedSplitGroupIds;
|
|
2905
3038
|
/**
|
|
2906
3039
|
* Add a token to the wallet.
|
|
2907
3040
|
*
|
|
@@ -3214,7 +3347,7 @@ declare class PaymentsModule {
|
|
|
3214
3347
|
/**
|
|
3215
3348
|
* Handle NOSTR-FIRST commitment-only transfer (recipient side)
|
|
3216
3349
|
* This is called when receiving a transfer with only commitmentData and no proof yet.
|
|
3217
|
-
*
|
|
3350
|
+
* Delegates to saveCommitmentOnlyToken() helper, then emits event + records history.
|
|
3218
3351
|
*/
|
|
3219
3352
|
private handleCommitmentOnlyTransfer;
|
|
3220
3353
|
/**
|
|
@@ -3755,6 +3888,10 @@ declare const STORAGE_KEYS_ADDRESS: {
|
|
|
3755
3888
|
readonly GROUP_CHAT_MEMBERS: "group_chat_members";
|
|
3756
3889
|
/** Group chat: processed event IDs for deduplication */
|
|
3757
3890
|
readonly GROUP_CHAT_PROCESSED_EVENTS: "group_chat_processed_events";
|
|
3891
|
+
/** Processed V5 split group IDs for Nostr re-delivery dedup */
|
|
3892
|
+
readonly PROCESSED_SPLIT_GROUP_IDS: "processed_split_group_ids";
|
|
3893
|
+
/** Processed V6 combined transfer IDs for Nostr re-delivery dedup */
|
|
3894
|
+
readonly PROCESSED_COMBINED_TRANSFER_IDS: "processed_combined_transfer_ids";
|
|
3758
3895
|
};
|
|
3759
3896
|
/** @deprecated Use STORAGE_KEYS_GLOBAL and STORAGE_KEYS_ADDRESS instead */
|
|
3760
3897
|
declare const STORAGE_KEYS: {
|
|
@@ -3778,6 +3915,10 @@ declare const STORAGE_KEYS: {
|
|
|
3778
3915
|
readonly GROUP_CHAT_MEMBERS: "group_chat_members";
|
|
3779
3916
|
/** Group chat: processed event IDs for deduplication */
|
|
3780
3917
|
readonly GROUP_CHAT_PROCESSED_EVENTS: "group_chat_processed_events";
|
|
3918
|
+
/** Processed V5 split group IDs for Nostr re-delivery dedup */
|
|
3919
|
+
readonly PROCESSED_SPLIT_GROUP_IDS: "processed_split_group_ids";
|
|
3920
|
+
/** Processed V6 combined transfer IDs for Nostr re-delivery dedup */
|
|
3921
|
+
readonly PROCESSED_COMBINED_TRANSFER_IDS: "processed_combined_transfer_ids";
|
|
3781
3922
|
/** Encrypted BIP39 mnemonic */
|
|
3782
3923
|
readonly MNEMONIC: "mnemonic";
|
|
3783
3924
|
/** Encrypted master private key */
|
|
@@ -6598,4 +6739,4 @@ declare function getCoinIdBySymbol(symbol: string): string | undefined;
|
|
|
6598
6739
|
*/
|
|
6599
6740
|
declare function getCoinIdByName(name: string): string | undefined;
|
|
6600
6741
|
|
|
6601
|
-
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 ComposingIndicator, type ConversationPage, 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 DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type ExtendedValidationResult, type FullIdentity, type GetConversationPageOptions, 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 InitProgress, type InitProgressCallback, type InitProgressStep, 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_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, 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 SphereImportOptions, 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, getAddressId, getAddressStorageKey, 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 };
|
|
6742
|
+
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 BuildSplitBundleResult, type CMasterKeyData, COIN_TYPES, type CheckNetworkHealthOptions, CoinGeckoPriceProvider, type CombinedTransferBundleV6, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type ComposingIndicator, type ConversationPage, 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 DirectTokenEntry, type DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type ExtendedValidationResult, type FullIdentity, type GetConversationPageOptions, 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 InitProgress, type InitProgressCallback, type InitProgressStep, 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_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, 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 SphereImportOptions, 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, getAddressId, getAddressStorageKey, getCoinIdByName, getCoinIdBySymbol, getCurrentStateHash, getPublicKey, getSphere, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenId, getTokenName, getTokenSymbol, hasMissingNewStateHash, hasUncommittedTransactions, hasValidTxfData, hash160, hexToBytes, identityFromMnemonicSync, initSphere, isArchivedKey, isCombinedTransferBundleV6, 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 };
|