Welshman Docs / @welshman/net / getDefaultNetContext
Function: getDefaultNetContext() ​
getDefaultNetContext(
overrides
):object
Defined in: packages/net/src/Context.ts:57
Parameters ​
overrides ​
Partial
<NetContext
> = {}
Returns ​
object
authMode ​
authMode:
AuthMode
=AuthMode.Implicit
getExecutor() ​
getExecutor: (
relays
) =>Executor
Parameters ​
relays ​
string
[]
Returns ​
isDeleted() ​
isDeleted: (
url
,event
) =>boolean
Parameters ​
url ​
string
event ​
Returns ​
boolean
isValid() ​
isValid: (
url
,event
) =>boolean
=isEventValid
Parameters ​
url ​
string
event ​
Returns ​
boolean
matchFilters() ​
matchFilters: (
url
,filters
,event
) =>boolean
Parameters ​
url ​
string
filters ​
Filter
[]
event ​
Returns ​
boolean
onEvent ​
onEvent: (...
args
) =>undefined
| (url
,event
) =>void
=noop
Type declaration ​
(...args
) => undefined
Function that does nothing and returns undefined
Parameters ​
args ​
...unknown
[]
Returns ​
undefined
(url
, event
) => void
Parameters ​
url ​
string
event ​
Returns ​
void
optimizeSubscriptions() ​
optimizeSubscriptions: (
subs
) =>RelaysAndFilters
[] =defaultOptimizeSubscriptions
Parameters ​
subs ​
Returns ​
pool ​
pool:
Pool
signEvent ​
signEvent: (...
args
) =>undefined
| (event
) =>Promise
<undefined
|SignedEvent
> =noop
Type declaration ​
(...args
) => undefined
Function that does nothing and returns undefined
Parameters ​
args ​
...unknown
[]
Returns ​
undefined
(event
) => Promise
<undefined
| SignedEvent
>
Parameters ​
event ​
Returns ​
Promise
<undefined
| SignedEvent
>