MCPcopy Create free account
hub / github.com/Noumena-Network/code / validateNativeBinding

Function validateNativeBinding

src/services/api/openAICompatWsV2Native.ts:64–78  ·  view source on GitHub ↗
(binding: NativeWsV2Binding)

Source from the content-addressed store, hash-verified

62}
63
64function validateNativeBinding(binding: NativeWsV2Binding): NativeWsV2Binding | null {
65 if (binding.wsV2NativeAvailable?.() !== true) {
66 return null
67 }
68 if (
69 typeof binding.wsV2Connect !== 'function' ||
70 typeof binding.wsV2Start !== 'function' ||
71 typeof binding.wsV2Next !== 'function' ||
72 typeof binding.wsV2Cancel !== 'function' ||
73 typeof binding.wsV2Close !== 'function'
74 ) {
75 return null
76 }
77 return binding
78}
79
80function loadNativeBinding(): NativeWsV2Binding | null {
81 for (const moduleId of candidateNativeBindingModuleIds()) {

Callers 1

loadNativeBindingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected