@bsv/sdk 1.3.33 → 1.3.34

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 (30) hide show
  1. package/dist/cjs/package.json +1 -1
  2. package/dist/cjs/src/overlay-tools/LookupResolver.js +22 -23
  3. package/dist/cjs/src/overlay-tools/LookupResolver.js.map +1 -1
  4. package/dist/cjs/src/overlay-tools/SHIPBroadcaster.js +17 -15
  5. package/dist/cjs/src/overlay-tools/SHIPBroadcaster.js.map +1 -1
  6. package/dist/cjs/src/overlay-tools/index.js +8 -2
  7. package/dist/cjs/src/overlay-tools/index.js.map +1 -1
  8. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  9. package/dist/esm/src/overlay-tools/LookupResolver.js +22 -22
  10. package/dist/esm/src/overlay-tools/LookupResolver.js.map +1 -1
  11. package/dist/esm/src/overlay-tools/SHIPBroadcaster.js +17 -14
  12. package/dist/esm/src/overlay-tools/SHIPBroadcaster.js.map +1 -1
  13. package/dist/esm/src/overlay-tools/index.js +4 -0
  14. package/dist/esm/src/overlay-tools/index.js.map +1 -1
  15. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  16. package/dist/types/src/overlay-tools/LookupResolver.d.ts +12 -1
  17. package/dist/types/src/overlay-tools/LookupResolver.d.ts.map +1 -1
  18. package/dist/types/src/overlay-tools/SHIPBroadcaster.d.ts +13 -4
  19. package/dist/types/src/overlay-tools/SHIPBroadcaster.d.ts.map +1 -1
  20. package/dist/types/src/overlay-tools/index.d.ts +2 -0
  21. package/dist/types/src/overlay-tools/index.d.ts.map +1 -1
  22. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  23. package/dist/umd/bundle.js +1 -1
  24. package/docs/overlay-tools.md +58 -14
  25. package/package.json +1 -1
  26. package/src/overlay-tools/LookupResolver.ts +30 -30
  27. package/src/overlay-tools/SHIPBroadcaster.ts +25 -21
  28. package/src/overlay-tools/__tests/LookupResolver.test.ts +3 -3
  29. package/src/overlay-tools/__tests/SHIPBroadcaster.test.ts +3 -3
  30. package/src/overlay-tools/index.ts +5 -0
@@ -95,6 +95,7 @@ Configuration options for the Lookup resolver.
95
95
 
96
96
  ```ts
97
97
  export interface LookupResolverConfig {
98
+ networkPreset?: "mainnet" | "testnet" | "local";
98
99
  facilitator?: OverlayLookupFacilitator;
99
100
  slapTrackers?: string[];
100
101
  hostOverrides?: Record<string, string[]>;
@@ -129,6 +130,17 @@ Map of lookup service names to arrays of hosts to use in place of resolving via
129
130
  hostOverrides?: Record<string, string[]>
130
131
  ```
131
132
 
133
+ #### Property networkPreset
134
+
135
+ The network preset to use, unless other options override it.
136
+ - mainnet: use mainnet SLAP trackers and HTTPS facilitator
137
+ - testnet: use testnet SLAP trackers and HTTPS facilitator
138
+ - local: directly query from localhost:8080 and a facilitator that permits plain HTTP
139
+
140
+ ```ts
141
+ networkPreset?: "mainnet" | "testnet" | "local"
142
+ ```
143
+
132
144
  #### Property slapTrackers
133
145
 
134
146
  The list of SLAP trackers queried to resolve Overlay Services hosts for a given lookup service.
@@ -185,8 +197,9 @@ Configuration options for the SHIP broadcaster.
185
197
 
186
198
  ```ts
187
199
  export interface SHIPBroadcasterConfig {
200
+ networkPreset?: "mainnet" | "testnet" | "local";
188
201
  facilitator?: OverlayBroadcastFacilitator;
189
- resolver: LookupResolver;
202
+ resolver?: LookupResolver;
190
203
  requireAcknowledgmentFromAllHostsForTopics?: "all" | "any" | string[];
191
204
  requireAcknowledgmentFromAnyHostForTopics?: "all" | "any" | string[];
192
205
  requireAcknowledgmentFromSpecificHostsForTopics?: Record<string, "all" | "any" | string[]>;
@@ -204,6 +217,17 @@ facilitator?: OverlayBroadcastFacilitator
204
217
  ```
205
218
  See also: [OverlayBroadcastFacilitator](./overlay-tools.md#interface-overlaybroadcastfacilitator)
206
219
 
220
+ #### Property networkPreset
221
+
222
+ The network preset to use, unless other options override it.
223
+ - mainnet: use mainnet resolver and HTTPS facilitator
224
+ - testnet: use testnet resolver and HTTPS facilitator
225
+ - local: directly send to localhost:8080 and a facilitator that permits plain HTTP
226
+
227
+ ```ts
228
+ networkPreset?: "mainnet" | "testnet" | "local"
229
+ ```
230
+
207
231
  #### Property requireAcknowledgmentFromAllHostsForTopics
208
232
 
209
233
  Determines which topics (all, any, or a specific list) must be present within all STEAKs received from every host for the broadcast to be considered a success. By default, all hosts must acknowledge all topics.
@@ -233,7 +257,7 @@ requireAcknowledgmentFromSpecificHostsForTopics?: Record<string, "all" | "any" |
233
257
  The resolver used to locate suitable hosts with SHIP
234
258
 
235
259
  ```ts
236
- resolver: LookupResolver
260
+ resolver?: LookupResolver
237
261
  ```
238
262
  See also: [LookupResolver](./overlay-tools.md#class-lookupresolver)
239
263
 
@@ -262,7 +286,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
262
286
  | [HTTPSOverlayLookupFacilitator](#class-httpsoverlaylookupfacilitator) |
263
287
  | [LookupResolver](#class-lookupresolver) |
264
288
  | [OverlayAdminTokenTemplate](#class-overlayadmintokentemplate) |
265
- | [SHIPBroadcaster](#class-shipbroadcaster) |
289
+ | [TopicBroadcaster](#class-topicbroadcaster) |
266
290
 
267
291
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
268
292
 
@@ -273,7 +297,8 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
273
297
  ```ts
274
298
  export class HTTPSOverlayBroadcastFacilitator implements OverlayBroadcastFacilitator {
275
299
  httpClient: typeof fetch;
276
- constructor(httpClient = fetch)
300
+ allowHTTP: boolean;
301
+ constructor(httpClient = fetch, allowHTTP: boolean = false)
277
302
  async send(url: string, taggedBEEF: TaggedBEEF): Promise<STEAK>
278
303
  }
279
304
  ```
@@ -288,7 +313,8 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
288
313
  ```ts
289
314
  export class HTTPSOverlayLookupFacilitator implements OverlayLookupFacilitator {
290
315
  fetchClient: typeof fetch;
291
- constructor(httpClient = fetch)
316
+ allowHTTP: boolean;
317
+ constructor(httpClient = fetch, allowHTTP: boolean = false)
292
318
  async lookup(url: string, question: LookupQuestion, timeout: number = 5000): Promise<LookupAnswer>
293
319
  }
294
320
  ```
@@ -304,7 +330,7 @@ Represents an SHIP transaction broadcaster.
304
330
 
305
331
  ```ts
306
332
  export default class LookupResolver {
307
- constructor(config?: LookupResolverConfig)
333
+ constructor(config: LookupResolverConfig = {})
308
334
  async query(question: LookupQuestion, timeout?: number): Promise<LookupAnswer>
309
335
  }
310
336
  ```
@@ -430,13 +456,13 @@ Argument Details
430
456
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
431
457
 
432
458
  ---
433
- ### Class: SHIPBroadcaster
459
+ ### Class: TopicBroadcaster
434
460
 
435
- Represents a SHIP transaction broadcaster.
461
+ Broadcasts transactions to one or more overlay topics.
436
462
 
437
463
  ```ts
438
- export default class SHIPBroadcaster implements Broadcaster {
439
- constructor(topics: string[], config?: SHIPBroadcasterConfig)
464
+ export default class TopicBroadcaster implements Broadcaster {
465
+ constructor(topics: string[], config: SHIPBroadcasterConfig = {})
440
466
  async broadcast(tx: Transaction): Promise<BroadcastResponse | BroadcastFailure>
441
467
  }
442
468
  ```
@@ -448,7 +474,7 @@ See also: [BroadcastFailure](./transaction.md#interface-broadcastfailure), [Broa
448
474
  Constructs an instance of the SHIP broadcaster.
449
475
 
450
476
  ```ts
451
- constructor(topics: string[], config?: SHIPBroadcasterConfig)
477
+ constructor(topics: string[], config: SHIPBroadcasterConfig = {})
452
478
  ```
453
479
  See also: [SHIPBroadcasterConfig](./overlay-tools.md#interface-shipbroadcasterconfig)
454
480
 
@@ -531,13 +557,31 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
531
557
 
532
558
  ## Variables
533
559
 
560
+ | |
561
+ | --- |
562
+ | [DEFAULT_SLAP_TRACKERS](#variable-default_slap_trackers) |
563
+ | [DEFAULT_TESTNET_SLAP_TRACKERS](#variable-default_testnet_slap_trackers) |
564
+
565
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
566
+
567
+ ---
568
+
534
569
  ### Variable: DEFAULT_SLAP_TRACKERS
535
570
 
536
571
  ```ts
537
572
  DEFAULT_SLAP_TRACKERS: string[] = [
538
- "https://overlay.babbage.systems",
539
- "https://overlay-example.babbage.systems",
540
- "https://office.babbage.systems"
573
+ "https://users.bapp.dev"
574
+ ]
575
+ ```
576
+
577
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
578
+
579
+ ---
580
+ ### Variable: DEFAULT_TESTNET_SLAP_TRACKERS
581
+
582
+ ```ts
583
+ DEFAULT_TESTNET_SLAP_TRACKERS: string[] = [
584
+ "https://testnet-users.bapp.dev"
541
585
  ]
542
586
  ```
543
587
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsv/sdk",
3
- "version": "1.3.33",
3
+ "version": "1.3.34",
4
4
  "type": "module",
5
5
  "description": "BSV Blockchain Software Development Kit",
6
6
  "main": "dist/cjs/mod.js",
@@ -37,11 +37,7 @@ export type LookupAnswer =
37
37
  /** Default SLAP trackers */
38
38
  export const DEFAULT_SLAP_TRACKERS: string[] = [
39
39
  // Babbage primary overlay service
40
- 'https://overlay.babbage.systems',
41
- // Babbage example overlay
42
- 'https://overlay-example.babbage.systems',
43
- // The Babbage office building
44
- 'https://office.babbage.systems'
40
+ 'https://users.bapp.dev'
45
41
 
46
42
  // NOTE: Other entities may submit pull requests to the library if they maintain SLAP overlay services.
47
43
  // Additional trackers run by different entities contribute to greater network resiliency.
@@ -51,10 +47,23 @@ export const DEFAULT_SLAP_TRACKERS: string[] = [
51
47
  // Trackers known to host invalid or illegal records will be removed at the discretion of the BSV Association.
52
48
  ]
53
49
 
50
+ /** Default testnet SLAP trackers */
51
+ export const DEFAULT_TESTNET_SLAP_TRACKERS: string[] = [
52
+ // Babbage primary testnet overlay service
53
+ 'https://testnet-users.bapp.dev'
54
+ ]
55
+
54
56
  const MAX_TRACKER_WAIT_TIME = 1000
55
57
 
56
58
  /** Configuration options for the Lookup resolver. */
57
59
  export interface LookupResolverConfig {
60
+ /**
61
+ * The network preset to use, unless other options override it.
62
+ * - mainnet: use mainnet SLAP trackers and HTTPS facilitator
63
+ * - testnet: use testnet SLAP trackers and HTTPS facilitator
64
+ * - local: directly query from localhost:8080 and a facilitator that permits plain HTTP
65
+ */
66
+ networkPreset?: 'mainnet' | 'testnet' | 'local'
58
67
  /** The facilitator used to make requests to Overlay Services hosts. */
59
68
  facilitator?: OverlayLookupFacilitator
60
69
  /** The list of SLAP trackers queried to resolve Overlay Services hosts for a given lookup service. */
@@ -83,9 +92,11 @@ export interface OverlayLookupFacilitator {
83
92
 
84
93
  export class HTTPSOverlayLookupFacilitator implements OverlayLookupFacilitator {
85
94
  fetchClient: typeof fetch
95
+ allowHTTP: boolean
86
96
 
87
- constructor (httpClient = fetch) {
97
+ constructor (httpClient = fetch, allowHTTP: boolean = false) {
88
98
  this.fetchClient = httpClient
99
+ this.allowHTTP = allowHTTP
89
100
  }
90
101
 
91
102
  async lookup (
@@ -93,7 +104,7 @@ export class HTTPSOverlayLookupFacilitator implements OverlayLookupFacilitator {
93
104
  question: LookupQuestion,
94
105
  timeout: number = 5000
95
106
  ): Promise<LookupAnswer> {
96
- if (!url.startsWith('https:')) {
107
+ if (!url.startsWith('https:') && !this.allowHTTP) {
97
108
  throw new Error(
98
109
  'HTTPS facilitator can only use URLs that start with "https:"'
99
110
  )
@@ -134,26 +145,14 @@ export default class LookupResolver {
134
145
  private readonly slapTrackers: string[]
135
146
  private readonly hostOverrides: Record<string, string[]>
136
147
  private readonly additionalHosts: Record<string, string[]>
137
-
138
- constructor (config?: LookupResolverConfig) {
139
- const defaultConfig: LookupResolverConfig = {
140
- facilitator: new HTTPSOverlayLookupFacilitator(),
141
- slapTrackers: DEFAULT_SLAP_TRACKERS,
142
- hostOverrides: {},
143
- additionalHosts: {}
144
- }
145
-
146
- const {
147
- facilitator = defaultConfig.facilitator,
148
- slapTrackers = defaultConfig.slapTrackers,
149
- hostOverrides = defaultConfig.hostOverrides,
150
- additionalHosts = defaultConfig.additionalHosts
151
- } = config ?? defaultConfig // ✅ Use a default object directly
152
-
153
- this.facilitator = facilitator ?? new HTTPSOverlayLookupFacilitator()
154
- this.slapTrackers = slapTrackers ?? []
155
- this.hostOverrides = hostOverrides ?? {}
156
- this.additionalHosts = additionalHosts ?? {}
148
+ private readonly networkPreset: 'mainnet' | 'testnet' | 'local'
149
+
150
+ constructor (config: LookupResolverConfig = {}) {
151
+ this.networkPreset = config.networkPreset ?? 'mainnet'
152
+ this.facilitator = config.facilitator ?? new HTTPSOverlayLookupFacilitator(undefined, this.networkPreset === 'local')
153
+ this.slapTrackers = config.slapTrackers ?? (this.networkPreset === 'mainnet' ? DEFAULT_SLAP_TRACKERS : DEFAULT_TESTNET_SLAP_TRACKERS)
154
+ this.hostOverrides = config.hostOverrides ?? {}
155
+ this.additionalHosts = config.additionalHosts ?? {}
157
156
  }
158
157
 
159
158
  /**
@@ -165,9 +164,11 @@ export default class LookupResolver {
165
164
  ): Promise<LookupAnswer> {
166
165
  let competentHosts: string[] = []
167
166
  if (question.service === 'ls_slap') {
168
- competentHosts = this.slapTrackers
167
+ competentHosts = this.networkPreset === 'local' ? ['http://localhost:8080'] : this.slapTrackers
169
168
  } else if (this.hostOverrides[question.service] != null) {
170
169
  competentHosts = this.hostOverrides[question.service]
170
+ } else if (this.networkPreset === 'local') {
171
+ competentHosts = ['http://localhost:8080']
171
172
  } else {
172
173
  competentHosts = await this.findCompetentHosts(question.service)
173
174
  }
@@ -179,7 +180,7 @@ export default class LookupResolver {
179
180
  }
180
181
  if (competentHosts.length < 1) {
181
182
  throw new Error(
182
- `No competent hosts found by the SLAP trackers for lookup service: ${question.service}`
183
+ `No competent ${this.networkPreset} hosts found by the SLAP trackers for lookup service: ${question.service}`
183
184
  )
184
185
  }
185
186
 
@@ -230,7 +231,6 @@ export default class LookupResolver {
230
231
  console.error('Error processing response outputs:', error)
231
232
  }
232
233
  }
233
- // ✅ Ensure function always returns a value
234
234
  return {
235
235
  type: 'output-list',
236
236
  outputs: Array.from(outputs.values())
@@ -50,10 +50,17 @@ export type STEAK = Record<string, AdmittanceInstructions>
50
50
 
51
51
  /** Configuration options for the SHIP broadcaster. */
52
52
  export interface SHIPBroadcasterConfig {
53
+ /**
54
+ * The network preset to use, unless other options override it.
55
+ * - mainnet: use mainnet resolver and HTTPS facilitator
56
+ * - testnet: use testnet resolver and HTTPS facilitator
57
+ * - local: directly send to localhost:8080 and a facilitator that permits plain HTTP
58
+ */
59
+ networkPreset?: 'mainnet' | 'testnet' | 'local'
53
60
  /** The facilitator used to make requests to Overlay Services hosts. */
54
61
  facilitator?: OverlayBroadcastFacilitator
55
62
  /** The resolver used to locate suitable hosts with SHIP */
56
- resolver: LookupResolver
63
+ resolver?: LookupResolver
57
64
  /** Determines which topics (all, any, or a specific list) must be present within all STEAKs received from every host for the broadcast to be considered a success. By default, all hosts must acknowledge all topics. */
58
65
  requireAcknowledgmentFromAllHostsForTopics?: 'all' | 'any' | string[]
59
66
  /** Determines which topics (all, any, or a specific list) must be present within STEAK received from at least one host for the broadcast to be considered a success. */
@@ -71,13 +78,15 @@ const MAX_SHIP_QUERY_TIMEOUT = 1000
71
78
 
72
79
  export class HTTPSOverlayBroadcastFacilitator implements OverlayBroadcastFacilitator {
73
80
  httpClient: typeof fetch
81
+ allowHTTP: boolean
74
82
 
75
- constructor (httpClient = fetch) {
83
+ constructor (httpClient = fetch, allowHTTP: boolean = false) {
76
84
  this.httpClient = httpClient
85
+ this.allowHTTP = false
77
86
  }
78
87
 
79
88
  async send (url: string, taggedBEEF: TaggedBEEF): Promise<STEAK> {
80
- if (!url.startsWith('https:')) {
89
+ if (!url.startsWith('https:') && !this.allowHTTP) {
81
90
  throw new Error(
82
91
  'HTTPS facilitator can only use URLs that start with "https:"'
83
92
  )
@@ -99,15 +108,16 @@ export class HTTPSOverlayBroadcastFacilitator implements OverlayBroadcastFacilit
99
108
  }
100
109
 
101
110
  /**
102
- * Represents a SHIP transaction broadcaster.
111
+ * Broadcasts transactions to one or more overlay topics.
103
112
  */
104
- export default class SHIPBroadcaster implements Broadcaster {
113
+ export default class TopicBroadcaster implements Broadcaster {
105
114
  private readonly topics: string[]
106
115
  private readonly facilitator: OverlayBroadcastFacilitator
107
116
  private readonly resolver: LookupResolver
108
117
  private readonly requireAcknowledgmentFromAllHostsForTopics: | 'all' | 'any' | string[]
109
118
  private readonly requireAcknowledgmentFromAnyHostForTopics: | 'all' | 'any' | string[]
110
119
  private readonly requireAcknowledgmentFromSpecificHostsForTopics: Record<string, 'all' | 'any' | string[]>
120
+ private readonly networkPreset: 'mainnet' | 'testnet' | 'local'
111
121
 
112
122
  /**
113
123
  * Constructs an instance of the SHIP broadcaster.
@@ -115,7 +125,7 @@ export default class SHIPBroadcaster implements Broadcaster {
115
125
  * @param {string[]} topics - The list of SHIP topic names where transactions are to be sent.
116
126
  * @param {SHIPBroadcasterConfig} config - Configuration options for the SHIP broadcaster.
117
127
  */
118
- constructor (topics: string[], config?: SHIPBroadcasterConfig) {
128
+ constructor (topics: string[], config: SHIPBroadcasterConfig = {}) {
119
129
  if (topics.length === 0) {
120
130
  throw new Error('At least one topic is required for broadcast.')
121
131
  }
@@ -123,21 +133,15 @@ export default class SHIPBroadcaster implements Broadcaster {
123
133
  throw new Error('Every topic must start with "tm_".')
124
134
  }
125
135
  this.topics = topics
126
- const {
127
- facilitator,
128
- resolver,
129
- requireAcknowledgmentFromAllHostsForTopics,
130
- requireAcknowledgmentFromAnyHostForTopics,
131
- requireAcknowledgmentFromSpecificHostsForTopics
132
- } = config ?? {}
133
- this.facilitator = facilitator ?? new HTTPSOverlayBroadcastFacilitator()
134
- this.resolver = resolver ?? new LookupResolver()
136
+ this.networkPreset = config.networkPreset ?? 'mainnet'
137
+ this.facilitator = config.facilitator ?? new HTTPSOverlayBroadcastFacilitator(undefined, this.networkPreset === 'local')
138
+ this.resolver = config.resolver ?? new LookupResolver({ networkPreset: this.networkPreset })
135
139
  this.requireAcknowledgmentFromAllHostsForTopics =
136
- requireAcknowledgmentFromAllHostsForTopics ?? []
140
+ config.requireAcknowledgmentFromAllHostsForTopics ?? []
137
141
  this.requireAcknowledgmentFromAnyHostForTopics =
138
- requireAcknowledgmentFromAnyHostForTopics ?? 'all'
142
+ config.requireAcknowledgmentFromAnyHostForTopics ?? 'all'
139
143
  this.requireAcknowledgmentFromSpecificHostsForTopics =
140
- requireAcknowledgmentFromSpecificHostsForTopics ?? {}
144
+ config.requireAcknowledgmentFromSpecificHostsForTopics ?? {}
141
145
  }
142
146
 
143
147
  /**
@@ -157,12 +161,12 @@ export default class SHIPBroadcaster implements Broadcaster {
157
161
  'Transactions sent via SHIP to Overlay Services must be serializable to BEEF format.'
158
162
  )
159
163
  }
160
- const interestedHosts = await this.findInterestedHosts()
164
+ const interestedHosts = this.networkPreset === 'local' ? ['http://localhost:8080'] : await this.findInterestedHosts()
161
165
  if (Object.keys(interestedHosts).length === 0) {
162
166
  return {
163
167
  status: 'error',
164
168
  code: 'ERR_NO_HOSTS_INTERESTED',
165
- description: 'No hosts are interested in receiving this transaction.'
169
+ description: `No ${this.networkPreset} hosts are interested in receiving this transaction.`
166
170
  }
167
171
  }
168
172
  const hostPromises = Object.entries(interestedHosts).map(
@@ -190,7 +194,7 @@ export default class SHIPBroadcaster implements Broadcaster {
190
194
  return {
191
195
  status: 'error',
192
196
  code: 'ERR_ALL_HOSTS_REJECTED',
193
- description: 'All SHIP hosts have rejected the transaction.'
197
+ description: `All ${this.networkPreset} topical hosts have rejected the transaction.`
194
198
  }
195
199
  }
196
200
 
@@ -861,7 +861,7 @@ describe('LookupResolver', () => {
861
861
  query: { test: 1 }
862
862
  })
863
863
  ).rejects.toThrow(
864
- 'No competent hosts found by the SLAP trackers for lookup service: ls_foo'
864
+ 'No competent mainnet hosts found by the SLAP trackers for lookup service: ls_foo'
865
865
  )
866
866
 
867
867
  expect(mockFacilitator.lookup.mock.calls).toEqual([
@@ -1054,7 +1054,7 @@ describe('LookupResolver', () => {
1054
1054
  query: { test: 1 }
1055
1055
  })
1056
1056
  ).rejects.toThrow(
1057
- 'No competent hosts found by the SLAP trackers for lookup service: ls_foo'
1057
+ 'No competent mainnet hosts found by the SLAP trackers for lookup service: ls_foo'
1058
1058
  )
1059
1059
 
1060
1060
  expect(mockFacilitator.lookup.mock.calls).toEqual([
@@ -1628,7 +1628,7 @@ describe('LookupResolver', () => {
1628
1628
  query: { test: 1 }
1629
1629
  })
1630
1630
  ).rejects.toThrow(
1631
- 'No competent hosts found by the SLAP trackers for lookup service: ls_foo'
1631
+ 'No competent mainnet hosts found by the SLAP trackers for lookup service: ls_foo'
1632
1632
  )
1633
1633
 
1634
1634
  expect(mockFacilitator.lookup.mock.calls.length).toBe(2)
@@ -279,7 +279,7 @@ describe('SHIPCast', () => {
279
279
  expect(result).toEqual({
280
280
  status: 'error',
281
281
  code: 'ERR_NO_HOSTS_INTERESTED',
282
- description: 'No hosts are interested in receiving this transaction.'
282
+ description: 'No mainnet hosts are interested in receiving this transaction.'
283
283
  })
284
284
 
285
285
  expect(mockResolver.query).toHaveBeenCalledWith(
@@ -343,7 +343,7 @@ describe('SHIPCast', () => {
343
343
  expect(result).toEqual({
344
344
  status: 'error',
345
345
  code: 'ERR_ALL_HOSTS_REJECTED',
346
- description: 'All SHIP hosts have rejected the transaction.'
346
+ description: 'All mainnet topical hosts have rejected the transaction.'
347
347
  })
348
348
 
349
349
  expect(mockFacilitator.send).toHaveBeenCalled()
@@ -1081,7 +1081,7 @@ describe('SHIPCast', () => {
1081
1081
  expect(response).toEqual({
1082
1082
  status: 'error',
1083
1083
  code: 'ERR_ALL_HOSTS_REJECTED',
1084
- description: 'All SHIP hosts have rejected the transaction.'
1084
+ description: 'All mainnet topical hosts have rejected the transaction.'
1085
1085
  })
1086
1086
  })
1087
1087
  describe('SHIPCast private methods', () => {
@@ -2,4 +2,9 @@ export * from './LookupResolver.js'
2
2
  export * from './SHIPBroadcaster.js'
3
3
  export { default as OverlayAdminTokenTemplate } from './OverlayAdminTokenTemplate.js'
4
4
  export { default as LookupResolver } from './LookupResolver.js'
5
+
6
+ // For intuitive clarity, we name this the Topic Broadcaster.
7
+ export { default as TopicBroadcaster } from './SHIPBroadcaster.js'
8
+ // Historically, it was also known by two other names:
5
9
  export { default as SHIPBroadcaster } from './SHIPBroadcaster.js'
10
+ export { default as SHIPCast } from './SHIPBroadcaster.js'