@unicitylabs/sphere-sdk 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/connect/index.cjs +11 -5
  2. package/dist/connect/index.cjs.map +1 -1
  3. package/dist/connect/index.d.cts +4 -1
  4. package/dist/connect/index.d.ts +4 -1
  5. package/dist/connect/index.js +11 -5
  6. package/dist/connect/index.js.map +1 -1
  7. package/dist/core/index.cjs +566 -171
  8. package/dist/core/index.cjs.map +1 -1
  9. package/dist/core/index.d.cts +67 -0
  10. package/dist/core/index.d.ts +67 -0
  11. package/dist/core/index.js +566 -171
  12. package/dist/core/index.js.map +1 -1
  13. package/dist/impl/browser/connect/index.cjs +11 -5
  14. package/dist/impl/browser/connect/index.cjs.map +1 -1
  15. package/dist/impl/browser/connect/index.d.cts +3 -1
  16. package/dist/impl/browser/connect/index.d.ts +3 -1
  17. package/dist/impl/browser/connect/index.js +11 -5
  18. package/dist/impl/browser/connect/index.js.map +1 -1
  19. package/dist/impl/nodejs/connect/index.cjs +10 -4
  20. package/dist/impl/nodejs/connect/index.cjs.map +1 -1
  21. package/dist/impl/nodejs/connect/index.d.cts +1 -1
  22. package/dist/impl/nodejs/connect/index.d.ts +1 -1
  23. package/dist/impl/nodejs/connect/index.js +10 -4
  24. package/dist/impl/nodejs/connect/index.js.map +1 -1
  25. package/dist/impl/nodejs/index.d.cts +11 -0
  26. package/dist/impl/nodejs/index.d.ts +11 -0
  27. package/dist/impl/shared/wallet-api/index.d.cts +11 -0
  28. package/dist/impl/shared/wallet-api/index.d.ts +11 -0
  29. package/dist/impl/wallet-api-v2/index.cjs +2 -0
  30. package/dist/impl/wallet-api-v2/index.cjs.map +1 -1
  31. package/dist/impl/wallet-api-v2/index.d.cts +13 -0
  32. package/dist/impl/wallet-api-v2/index.d.ts +13 -0
  33. package/dist/impl/wallet-api-v2/index.js +2 -0
  34. package/dist/impl/wallet-api-v2/index.js.map +1 -1
  35. package/dist/index.cjs +566 -171
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts +61 -1
  38. package/dist/index.d.ts +61 -1
  39. package/dist/index.js +566 -171
  40. package/dist/index.js.map +1 -1
  41. package/dist/modules/payments-v2/index.cjs +609 -269
  42. package/dist/modules/payments-v2/index.cjs.map +1 -1
  43. package/dist/modules/payments-v2/index.d.cts +88 -13
  44. package/dist/modules/payments-v2/index.d.ts +88 -13
  45. package/dist/modules/payments-v2/index.js +609 -269
  46. package/dist/modules/payments-v2/index.js.map +1 -1
  47. package/dist/token-engine/index.cjs +132 -34
  48. package/dist/token-engine/index.cjs.map +1 -1
  49. package/dist/token-engine/index.d.cts +19 -0
  50. package/dist/token-engine/index.d.ts +19 -0
  51. package/dist/token-engine/index.js +132 -34
  52. package/dist/token-engine/index.js.map +1 -1
  53. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -88,6 +88,11 @@ interface SendRequest {
88
88
  coinId: string;
89
89
  memo?: string;
90
90
  }
91
+ interface SendCoinlessRequest {
92
+ recipient: string;
93
+ tokenId: string;
94
+ memo?: string;
95
+ }
91
96
  interface MintResult {
92
97
  success: boolean;
93
98
  tokenId?: string;
@@ -157,6 +162,8 @@ interface PendingTransfer {
157
162
  recipient: string;
158
163
  coinId: string;
159
164
  amount: string;
165
+ /** Set instead of coinId/amount when the intent is a token-addressed spend. */
166
+ tokenId?: string;
160
167
  legs: {
161
168
  certified: number;
162
169
  total: number;
@@ -172,11 +179,14 @@ interface PaymentsV2 {
172
179
  tokens(filter?: {
173
180
  coinId?: string;
174
181
  }): Token[];
182
+ coinless(): CoinlessToken[];
183
+ tokenData(tokenId: string): Promise<Uint8Array | null>;
175
184
  history(page?: {
176
185
  before?: string;
177
186
  limit?: number;
178
187
  }): Promise<HistoryPage>;
179
188
  send(req: SendRequest): Promise<TransferResult>;
189
+ sendCoinless(req: SendCoinlessRequest): Promise<TransferResult>;
180
190
  mint(coinId: string, amount: bigint): Promise<MintResult>;
181
191
  receive(): Promise<{
182
192
  transfers: IncomingTransfer[];
@@ -499,6 +509,31 @@ interface Token {
499
509
  */
500
510
  suspectedSpent?: boolean;
501
511
  }
512
+ /**
513
+ * A holding that names no coin (wallet-api#140) — an NFT. Deliberately NOT a
514
+ * `Token`: no amount, decimals or symbol, and never returned by `tokens()` or
515
+ * counted in `assets()`. `tokenType` names the token's CLASS and `tokenId` the
516
+ * instance (wallet-api#147). The payload is read with `payments.tokenData()`.
517
+ */
518
+ interface CoinlessToken {
519
+ readonly tokenId: string;
520
+ readonly tokenType?: string;
521
+ /**
522
+ * Class metadata resolved from the registry THIS wallet owns, when the type is
523
+ * recognised. Resolved here so callers never reach for a registry themselves:
524
+ * the process-global singleton is repointable by another Sphere's init, so a
525
+ * second wallet on another network would retarget it (#767).
526
+ */
527
+ readonly name?: string;
528
+ readonly iconUrl?: string;
529
+ readonly stateHash: string;
530
+ /** #737: reserved by a converging transfer — not spendable right now. */
531
+ readonly transferring: boolean;
532
+ /** #625: proven spent on-chain; excluded from spend selection. */
533
+ readonly suspectedSpent?: boolean;
534
+ readonly createdAt: number;
535
+ readonly updatedAt: number;
536
+ }
502
537
  interface Asset {
503
538
  readonly coinId: string;
504
539
  readonly symbol: string;
@@ -575,6 +610,8 @@ interface IncomingTransfer {
575
610
  readonly senderPubkey: string;
576
611
  readonly senderNametag?: string;
577
612
  readonly tokens: Token[];
613
+ /** Arrivals that name no coin (#777). Disjoint from `tokens`, never a zero Token. */
614
+ readonly coinless?: CoinlessToken[];
578
615
  readonly memo?: string;
579
616
  readonly receivedAt: number;
580
617
  }
@@ -2438,7 +2475,18 @@ interface InventoryItemWire {
2438
2475
  status: 'active' | 'removed';
2439
2476
  seq: number;
2440
2477
  stateHash: string;
2478
+ /**
2479
+ * Omitted for a tombstone AND for an ACTIVE COINLESS token (wallet-api#140),
2480
+ * so absence is never "removed" or "not loaded" — discriminate on `status`.
2481
+ */
2441
2482
  assets?: AssetWire[];
2483
+ /**
2484
+ * Genesis `TokenType`, lowercase hex (1-64 bytes ⇒ 2-128 chars). Names the
2485
+ * token's CLASS, not the instance (wallet-api#147). Absent on rows written
2486
+ * before wallet-api migration 0015. An unrecognised type is legitimate: never
2487
+ * reject or hide a token for it.
2488
+ */
2489
+ tokenType?: string;
2442
2490
  }
2443
2491
  interface InventoryPageWire {
2444
2492
  cursor: number;
@@ -4447,6 +4495,8 @@ interface TokenRegistryConfig {
4447
4495
  declare class TokenRegistry {
4448
4496
  private static instance;
4449
4497
  private readonly definitionsById;
4498
+ /** Non-fungible definitions keyed by TOKEN TYPE — a separate namespace (#147). */
4499
+ private readonly definitionsByType;
4450
4500
  private readonly definitionsBySymbol;
4451
4501
  private readonly definitionsByName;
4452
4502
  private remoteUrl;
@@ -4634,6 +4684,16 @@ declare class TokenRegistry {
4634
4684
  * @returns Array of all token definitions
4635
4685
  */
4636
4686
  getAllDefinitions(): TokenDefinition[];
4687
+ /**
4688
+ * Definition for a coinless token's genesis TOKEN TYPE (#777). Never falls back
4689
+ * to `getDefinition`: a type and a coin id live in different namespaces, so a
4690
+ * type that collided with a coin id would otherwise render as that coin.
4691
+ */
4692
+ getTypeMeta(tokenType: string): {
4693
+ name: string;
4694
+ iconUrl: string | null;
4695
+ } | null;
4696
+ getTypeDefinition(tokenType: string): TokenDefinition | undefined;
4637
4697
  /**
4638
4698
  * Get all fungible token definitions
4639
4699
  * @returns Array of fungible token definitions
@@ -4737,4 +4797,4 @@ declare function normalizeAddress(address: string): string;
4737
4797
  */
4738
4798
  declare function addressesMatch(a: string, b: string): boolean;
4739
4799
 
4740
- export { AUTH_CHALLENGE_PREFIX, type AddressInfo, type AddressType, type AggregatorEvent, type AggregatorEventCallback, type AggregatorEventType, type AggregatorProvider, type Asset, type BaseProvider, type BroadcastHandler, type BroadcastMessage, COIN_TYPES, ChallengeTemplateError, type CheckNetworkHealthOptions, CoinGeckoPriceProvider, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type ComposingIndicator, type ConversationPage, type CreateGroupOptions, DEFAULT_AGGREGATOR_TIMEOUT, DEFAULT_DERIVATION_PATH, DEFAULT_GROUP_RELAYS, DEFAULT_MARKET_API_URL, DEFAULT_NOSTR_RELAYS, type DecryptionProgressCallback, type DerivationMode, type DirectMessage, type DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type EncryptedData, FIELD_ENCRYPTION_HKDF_INFO, FIELD_ENVELOPE_MAX_BYTES, FIELD_ENVELOPE_NONCE_BYTES, FIELD_ENVELOPE_PREFIX, type FullIdentity, type GetConversationPageOptions, GroupChatModule, type GroupChatModuleConfig, type GroupChatModuleDependencies, type GroupData, type GroupMemberData, type GroupMessageData, GroupRole, GroupVisibility, type HealthCheckFn, type HistoryRecord, type Identity, type IdentityConfig, type IncomingBroadcast, type IncomingMessage, type IncomingTransfer, type InitProgress, type InitProgressCallback, type InitProgressStep, type IntentStatus, type IntentType, LIMITS, type LegacyFileParseResult, type LegacyFileParsedData, type LegacyFileType, type LogHandler, type LogLevel, type LoggerConfig, type MarketIntent, MarketModule, type MarketModuleConfig, type MarketModuleDependencies, type MessageHandler, NETWORKS, NIP29_KINDS, NOSTR_EVENT_KINDS, type NetworkHealthResult, type NetworkType, type OracleEvent, type OracleEventCallback, type OracleEventType, type OracleProvider, type ParsedAddress, PartialSendConflictError, type PeerInfo, type PostIntentRequest, type PostIntentResult, type PricePlatform, type PriceProvider, type PriceProviderConfig, type ProviderMetadata, type ProviderRole, type ProviderStatus, type ProviderStatusInfo, type RegistryNetwork, SIGN_MESSAGE_PREFIX, STORAGE_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, STORAGE_PREFIX, type SearchFilters, type SearchIntentResult, type SearchOptions, type SearchResult, type ServiceHealthResult, Sphere, type SphereCreateOptions, SphereError, type SphereErrorCode, type SphereEventHandler, type SphereEventMap, type SphereEventType, type SphereImportOptions, type SphereInitOptions, type SphereInitResult, type SphereLoadOptions, type SphereStatus, type StorageProvider, TEST_NOSTR_RELAYS, TIMEOUTS, type Token, type TokenDefinition, type TokenIcon, type TokenPrice, TokenRegistry, type TokenStatus, type TokenTransferDetail, type TrackedAddress, type TrackedAddressEntry, type HistoryRecord as TransactionHistoryEntry, type TransferRequest, type TransferResult, type TransferStatus, type TransportEvent, type TransportEventCallback, type TransportEventType, type TransportProvider, type WalletApiTransportConfig, type WalletInfo, type WalletJSON, type WalletJSONExportOptions, type WalletSource, addressesMatch, assertFieldEnvelopeShape, base58Decode, base58Encode, bytesToHex, checkNetworkHealth, coinIdsMatch, createCommunicationsModule, createGroupChatModule, createKeyPair, createMarketModule, createPriceProvider, createSphere, 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, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenName, getTokenSymbol, hash160, hashSignMessage, hexToBytes, identityFromMnemonicSync, initSphere, isKnownToken, isPossiblyCommittedSendOutcome, isSphereError, isTextWalletEncrypted, isValidAddress, isValidDirectAddress, isValidNametag, isValidPrivateKey, isWalletTextFormat, loadSphere, logger, mnemonicToSeedSync, normalizeAddress, normalizeCoinId, parseAddress, parseAndDecryptWalletText, parseTokenAmount, parseWalletText, randomBytes, randomHex, randomUUID, recoverPubkeyFromSignature, ripemd160, safeParseTokenAmount, sha256, signMessage, sleep, sphereExists, toHumanReadable, validateMnemonic, verifyChallengeTemplate, verifySignedMessage };
4800
+ export { AUTH_CHALLENGE_PREFIX, type AddressInfo, type AddressType, type AggregatorEvent, type AggregatorEventCallback, type AggregatorEventType, type AggregatorProvider, type Asset, type BaseProvider, type BroadcastHandler, type BroadcastMessage, COIN_TYPES, ChallengeTemplateError, type CheckNetworkHealthOptions, CoinGeckoPriceProvider, type CoinlessToken, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type ComposingIndicator, type ConversationPage, type CreateGroupOptions, DEFAULT_AGGREGATOR_TIMEOUT, DEFAULT_DERIVATION_PATH, DEFAULT_GROUP_RELAYS, DEFAULT_MARKET_API_URL, DEFAULT_NOSTR_RELAYS, type DecryptionProgressCallback, type DerivationMode, type DirectMessage, type DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type EncryptedData, FIELD_ENCRYPTION_HKDF_INFO, FIELD_ENVELOPE_MAX_BYTES, FIELD_ENVELOPE_NONCE_BYTES, FIELD_ENVELOPE_PREFIX, type FullIdentity, type GetConversationPageOptions, GroupChatModule, type GroupChatModuleConfig, type GroupChatModuleDependencies, type GroupData, type GroupMemberData, type GroupMessageData, GroupRole, GroupVisibility, type HealthCheckFn, type HistoryRecord, type Identity, type IdentityConfig, type IncomingBroadcast, type IncomingMessage, type IncomingTransfer, type InitProgress, type InitProgressCallback, type InitProgressStep, type IntentStatus, type IntentType, LIMITS, type LegacyFileParseResult, type LegacyFileParsedData, type LegacyFileType, type LogHandler, type LogLevel, type LoggerConfig, type MarketIntent, MarketModule, type MarketModuleConfig, type MarketModuleDependencies, type MessageHandler, NETWORKS, NIP29_KINDS, NOSTR_EVENT_KINDS, type NetworkHealthResult, type NetworkType, type OracleEvent, type OracleEventCallback, type OracleEventType, type OracleProvider, type ParsedAddress, PartialSendConflictError, type PeerInfo, type PostIntentRequest, type PostIntentResult, type PricePlatform, type PriceProvider, type PriceProviderConfig, type ProviderMetadata, type ProviderRole, type ProviderStatus, type ProviderStatusInfo, type RegistryNetwork, SIGN_MESSAGE_PREFIX, STORAGE_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, STORAGE_PREFIX, type SearchFilters, type SearchIntentResult, type SearchOptions, type SearchResult, type ServiceHealthResult, Sphere, type SphereCreateOptions, SphereError, type SphereErrorCode, type SphereEventHandler, type SphereEventMap, type SphereEventType, type SphereImportOptions, type SphereInitOptions, type SphereInitResult, type SphereLoadOptions, type SphereStatus, type StorageProvider, TEST_NOSTR_RELAYS, TIMEOUTS, type Token, type TokenDefinition, type TokenIcon, type TokenPrice, TokenRegistry, type TokenStatus, type TokenTransferDetail, type TrackedAddress, type TrackedAddressEntry, type HistoryRecord as TransactionHistoryEntry, type TransferRequest, type TransferResult, type TransferStatus, type TransportEvent, type TransportEventCallback, type TransportEventType, type TransportProvider, type WalletApiTransportConfig, type WalletInfo, type WalletJSON, type WalletJSONExportOptions, type WalletSource, addressesMatch, assertFieldEnvelopeShape, base58Decode, base58Encode, bytesToHex, checkNetworkHealth, coinIdsMatch, createCommunicationsModule, createGroupChatModule, createKeyPair, createMarketModule, createPriceProvider, createSphere, 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, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenName, getTokenSymbol, hash160, hashSignMessage, hexToBytes, identityFromMnemonicSync, initSphere, isKnownToken, isPossiblyCommittedSendOutcome, isSphereError, isTextWalletEncrypted, isValidAddress, isValidDirectAddress, isValidNametag, isValidPrivateKey, isWalletTextFormat, loadSphere, logger, mnemonicToSeedSync, normalizeAddress, normalizeCoinId, parseAddress, parseAndDecryptWalletText, parseTokenAmount, parseWalletText, randomBytes, randomHex, randomUUID, recoverPubkeyFromSignature, ripemd160, safeParseTokenAmount, sha256, signMessage, sleep, sphereExists, toHumanReadable, validateMnemonic, verifyChallengeTemplate, verifySignedMessage };
package/dist/index.d.ts CHANGED
@@ -88,6 +88,11 @@ interface SendRequest {
88
88
  coinId: string;
89
89
  memo?: string;
90
90
  }
91
+ interface SendCoinlessRequest {
92
+ recipient: string;
93
+ tokenId: string;
94
+ memo?: string;
95
+ }
91
96
  interface MintResult {
92
97
  success: boolean;
93
98
  tokenId?: string;
@@ -157,6 +162,8 @@ interface PendingTransfer {
157
162
  recipient: string;
158
163
  coinId: string;
159
164
  amount: string;
165
+ /** Set instead of coinId/amount when the intent is a token-addressed spend. */
166
+ tokenId?: string;
160
167
  legs: {
161
168
  certified: number;
162
169
  total: number;
@@ -172,11 +179,14 @@ interface PaymentsV2 {
172
179
  tokens(filter?: {
173
180
  coinId?: string;
174
181
  }): Token[];
182
+ coinless(): CoinlessToken[];
183
+ tokenData(tokenId: string): Promise<Uint8Array | null>;
175
184
  history(page?: {
176
185
  before?: string;
177
186
  limit?: number;
178
187
  }): Promise<HistoryPage>;
179
188
  send(req: SendRequest): Promise<TransferResult>;
189
+ sendCoinless(req: SendCoinlessRequest): Promise<TransferResult>;
180
190
  mint(coinId: string, amount: bigint): Promise<MintResult>;
181
191
  receive(): Promise<{
182
192
  transfers: IncomingTransfer[];
@@ -499,6 +509,31 @@ interface Token {
499
509
  */
500
510
  suspectedSpent?: boolean;
501
511
  }
512
+ /**
513
+ * A holding that names no coin (wallet-api#140) — an NFT. Deliberately NOT a
514
+ * `Token`: no amount, decimals or symbol, and never returned by `tokens()` or
515
+ * counted in `assets()`. `tokenType` names the token's CLASS and `tokenId` the
516
+ * instance (wallet-api#147). The payload is read with `payments.tokenData()`.
517
+ */
518
+ interface CoinlessToken {
519
+ readonly tokenId: string;
520
+ readonly tokenType?: string;
521
+ /**
522
+ * Class metadata resolved from the registry THIS wallet owns, when the type is
523
+ * recognised. Resolved here so callers never reach for a registry themselves:
524
+ * the process-global singleton is repointable by another Sphere's init, so a
525
+ * second wallet on another network would retarget it (#767).
526
+ */
527
+ readonly name?: string;
528
+ readonly iconUrl?: string;
529
+ readonly stateHash: string;
530
+ /** #737: reserved by a converging transfer — not spendable right now. */
531
+ readonly transferring: boolean;
532
+ /** #625: proven spent on-chain; excluded from spend selection. */
533
+ readonly suspectedSpent?: boolean;
534
+ readonly createdAt: number;
535
+ readonly updatedAt: number;
536
+ }
502
537
  interface Asset {
503
538
  readonly coinId: string;
504
539
  readonly symbol: string;
@@ -575,6 +610,8 @@ interface IncomingTransfer {
575
610
  readonly senderPubkey: string;
576
611
  readonly senderNametag?: string;
577
612
  readonly tokens: Token[];
613
+ /** Arrivals that name no coin (#777). Disjoint from `tokens`, never a zero Token. */
614
+ readonly coinless?: CoinlessToken[];
578
615
  readonly memo?: string;
579
616
  readonly receivedAt: number;
580
617
  }
@@ -2438,7 +2475,18 @@ interface InventoryItemWire {
2438
2475
  status: 'active' | 'removed';
2439
2476
  seq: number;
2440
2477
  stateHash: string;
2478
+ /**
2479
+ * Omitted for a tombstone AND for an ACTIVE COINLESS token (wallet-api#140),
2480
+ * so absence is never "removed" or "not loaded" — discriminate on `status`.
2481
+ */
2441
2482
  assets?: AssetWire[];
2483
+ /**
2484
+ * Genesis `TokenType`, lowercase hex (1-64 bytes ⇒ 2-128 chars). Names the
2485
+ * token's CLASS, not the instance (wallet-api#147). Absent on rows written
2486
+ * before wallet-api migration 0015. An unrecognised type is legitimate: never
2487
+ * reject or hide a token for it.
2488
+ */
2489
+ tokenType?: string;
2442
2490
  }
2443
2491
  interface InventoryPageWire {
2444
2492
  cursor: number;
@@ -4447,6 +4495,8 @@ interface TokenRegistryConfig {
4447
4495
  declare class TokenRegistry {
4448
4496
  private static instance;
4449
4497
  private readonly definitionsById;
4498
+ /** Non-fungible definitions keyed by TOKEN TYPE — a separate namespace (#147). */
4499
+ private readonly definitionsByType;
4450
4500
  private readonly definitionsBySymbol;
4451
4501
  private readonly definitionsByName;
4452
4502
  private remoteUrl;
@@ -4634,6 +4684,16 @@ declare class TokenRegistry {
4634
4684
  * @returns Array of all token definitions
4635
4685
  */
4636
4686
  getAllDefinitions(): TokenDefinition[];
4687
+ /**
4688
+ * Definition for a coinless token's genesis TOKEN TYPE (#777). Never falls back
4689
+ * to `getDefinition`: a type and a coin id live in different namespaces, so a
4690
+ * type that collided with a coin id would otherwise render as that coin.
4691
+ */
4692
+ getTypeMeta(tokenType: string): {
4693
+ name: string;
4694
+ iconUrl: string | null;
4695
+ } | null;
4696
+ getTypeDefinition(tokenType: string): TokenDefinition | undefined;
4637
4697
  /**
4638
4698
  * Get all fungible token definitions
4639
4699
  * @returns Array of fungible token definitions
@@ -4737,4 +4797,4 @@ declare function normalizeAddress(address: string): string;
4737
4797
  */
4738
4798
  declare function addressesMatch(a: string, b: string): boolean;
4739
4799
 
4740
- export { AUTH_CHALLENGE_PREFIX, type AddressInfo, type AddressType, type AggregatorEvent, type AggregatorEventCallback, type AggregatorEventType, type AggregatorProvider, type Asset, type BaseProvider, type BroadcastHandler, type BroadcastMessage, COIN_TYPES, ChallengeTemplateError, type CheckNetworkHealthOptions, CoinGeckoPriceProvider, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type ComposingIndicator, type ConversationPage, type CreateGroupOptions, DEFAULT_AGGREGATOR_TIMEOUT, DEFAULT_DERIVATION_PATH, DEFAULT_GROUP_RELAYS, DEFAULT_MARKET_API_URL, DEFAULT_NOSTR_RELAYS, type DecryptionProgressCallback, type DerivationMode, type DirectMessage, type DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type EncryptedData, FIELD_ENCRYPTION_HKDF_INFO, FIELD_ENVELOPE_MAX_BYTES, FIELD_ENVELOPE_NONCE_BYTES, FIELD_ENVELOPE_PREFIX, type FullIdentity, type GetConversationPageOptions, GroupChatModule, type GroupChatModuleConfig, type GroupChatModuleDependencies, type GroupData, type GroupMemberData, type GroupMessageData, GroupRole, GroupVisibility, type HealthCheckFn, type HistoryRecord, type Identity, type IdentityConfig, type IncomingBroadcast, type IncomingMessage, type IncomingTransfer, type InitProgress, type InitProgressCallback, type InitProgressStep, type IntentStatus, type IntentType, LIMITS, type LegacyFileParseResult, type LegacyFileParsedData, type LegacyFileType, type LogHandler, type LogLevel, type LoggerConfig, type MarketIntent, MarketModule, type MarketModuleConfig, type MarketModuleDependencies, type MessageHandler, NETWORKS, NIP29_KINDS, NOSTR_EVENT_KINDS, type NetworkHealthResult, type NetworkType, type OracleEvent, type OracleEventCallback, type OracleEventType, type OracleProvider, type ParsedAddress, PartialSendConflictError, type PeerInfo, type PostIntentRequest, type PostIntentResult, type PricePlatform, type PriceProvider, type PriceProviderConfig, type ProviderMetadata, type ProviderRole, type ProviderStatus, type ProviderStatusInfo, type RegistryNetwork, SIGN_MESSAGE_PREFIX, STORAGE_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, STORAGE_PREFIX, type SearchFilters, type SearchIntentResult, type SearchOptions, type SearchResult, type ServiceHealthResult, Sphere, type SphereCreateOptions, SphereError, type SphereErrorCode, type SphereEventHandler, type SphereEventMap, type SphereEventType, type SphereImportOptions, type SphereInitOptions, type SphereInitResult, type SphereLoadOptions, type SphereStatus, type StorageProvider, TEST_NOSTR_RELAYS, TIMEOUTS, type Token, type TokenDefinition, type TokenIcon, type TokenPrice, TokenRegistry, type TokenStatus, type TokenTransferDetail, type TrackedAddress, type TrackedAddressEntry, type HistoryRecord as TransactionHistoryEntry, type TransferRequest, type TransferResult, type TransferStatus, type TransportEvent, type TransportEventCallback, type TransportEventType, type TransportProvider, type WalletApiTransportConfig, type WalletInfo, type WalletJSON, type WalletJSONExportOptions, type WalletSource, addressesMatch, assertFieldEnvelopeShape, base58Decode, base58Encode, bytesToHex, checkNetworkHealth, coinIdsMatch, createCommunicationsModule, createGroupChatModule, createKeyPair, createMarketModule, createPriceProvider, createSphere, 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, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenName, getTokenSymbol, hash160, hashSignMessage, hexToBytes, identityFromMnemonicSync, initSphere, isKnownToken, isPossiblyCommittedSendOutcome, isSphereError, isTextWalletEncrypted, isValidAddress, isValidDirectAddress, isValidNametag, isValidPrivateKey, isWalletTextFormat, loadSphere, logger, mnemonicToSeedSync, normalizeAddress, normalizeCoinId, parseAddress, parseAndDecryptWalletText, parseTokenAmount, parseWalletText, randomBytes, randomHex, randomUUID, recoverPubkeyFromSignature, ripemd160, safeParseTokenAmount, sha256, signMessage, sleep, sphereExists, toHumanReadable, validateMnemonic, verifyChallengeTemplate, verifySignedMessage };
4800
+ export { AUTH_CHALLENGE_PREFIX, type AddressInfo, type AddressType, type AggregatorEvent, type AggregatorEventCallback, type AggregatorEventType, type AggregatorProvider, type Asset, type BaseProvider, type BroadcastHandler, type BroadcastMessage, COIN_TYPES, ChallengeTemplateError, type CheckNetworkHealthOptions, CoinGeckoPriceProvider, type CoinlessToken, CommunicationsModule, type CommunicationsModuleConfig, type CommunicationsModuleDependencies, type ComposingIndicator, type ConversationPage, type CreateGroupOptions, DEFAULT_AGGREGATOR_TIMEOUT, DEFAULT_DERIVATION_PATH, DEFAULT_GROUP_RELAYS, DEFAULT_MARKET_API_URL, DEFAULT_NOSTR_RELAYS, type DecryptionProgressCallback, type DerivationMode, type DirectMessage, type DiscoverAddressProgress, type DiscoverAddressesOptions, type DiscoverAddressesResult, type DiscoveredAddress, type EncryptedData, FIELD_ENCRYPTION_HKDF_INFO, FIELD_ENVELOPE_MAX_BYTES, FIELD_ENVELOPE_NONCE_BYTES, FIELD_ENVELOPE_PREFIX, type FullIdentity, type GetConversationPageOptions, GroupChatModule, type GroupChatModuleConfig, type GroupChatModuleDependencies, type GroupData, type GroupMemberData, type GroupMessageData, GroupRole, GroupVisibility, type HealthCheckFn, type HistoryRecord, type Identity, type IdentityConfig, type IncomingBroadcast, type IncomingMessage, type IncomingTransfer, type InitProgress, type InitProgressCallback, type InitProgressStep, type IntentStatus, type IntentType, LIMITS, type LegacyFileParseResult, type LegacyFileParsedData, type LegacyFileType, type LogHandler, type LogLevel, type LoggerConfig, type MarketIntent, MarketModule, type MarketModuleConfig, type MarketModuleDependencies, type MessageHandler, NETWORKS, NIP29_KINDS, NOSTR_EVENT_KINDS, type NetworkHealthResult, type NetworkType, type OracleEvent, type OracleEventCallback, type OracleEventType, type OracleProvider, type ParsedAddress, PartialSendConflictError, type PeerInfo, type PostIntentRequest, type PostIntentResult, type PricePlatform, type PriceProvider, type PriceProviderConfig, type ProviderMetadata, type ProviderRole, type ProviderStatus, type ProviderStatusInfo, type RegistryNetwork, SIGN_MESSAGE_PREFIX, STORAGE_KEYS_ADDRESS, STORAGE_KEYS_GLOBAL, STORAGE_PREFIX, type SearchFilters, type SearchIntentResult, type SearchOptions, type SearchResult, type ServiceHealthResult, Sphere, type SphereCreateOptions, SphereError, type SphereErrorCode, type SphereEventHandler, type SphereEventMap, type SphereEventType, type SphereImportOptions, type SphereInitOptions, type SphereInitResult, type SphereLoadOptions, type SphereStatus, type StorageProvider, TEST_NOSTR_RELAYS, TIMEOUTS, type Token, type TokenDefinition, type TokenIcon, type TokenPrice, TokenRegistry, type TokenStatus, type TokenTransferDetail, type TrackedAddress, type TrackedAddressEntry, type HistoryRecord as TransactionHistoryEntry, type TransferRequest, type TransferResult, type TransferStatus, type TransportEvent, type TransportEventCallback, type TransportEventType, type TransportProvider, type WalletApiTransportConfig, type WalletInfo, type WalletJSON, type WalletJSONExportOptions, type WalletSource, addressesMatch, assertFieldEnvelopeShape, base58Decode, base58Encode, bytesToHex, checkNetworkHealth, coinIdsMatch, createCommunicationsModule, createGroupChatModule, createKeyPair, createMarketModule, createPriceProvider, createSphere, 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, getTokenDecimals, getTokenDefinition, getTokenIconUrl, getTokenName, getTokenSymbol, hash160, hashSignMessage, hexToBytes, identityFromMnemonicSync, initSphere, isKnownToken, isPossiblyCommittedSendOutcome, isSphereError, isTextWalletEncrypted, isValidAddress, isValidDirectAddress, isValidNametag, isValidPrivateKey, isWalletTextFormat, loadSphere, logger, mnemonicToSeedSync, normalizeAddress, normalizeCoinId, parseAddress, parseAndDecryptWalletText, parseTokenAmount, parseWalletText, randomBytes, randomHex, randomUUID, recoverPubkeyFromSignature, ripemd160, safeParseTokenAmount, sha256, signMessage, sleep, sphereExists, toHumanReadable, validateMnemonic, verifyChallengeTemplate, verifySignedMessage };