Welshman Docs / @welshman/router / Router
Class: Router ​
Defined in: router/src/index.ts:127
Constructors ​
Constructor ​
new Router(
options
):Router
Defined in: router/src/index.ts:138
Parameters ​
options ​
Returns ​
Router
Properties ​
options ​
readonly
options:RouterOptions
Defined in: router/src/index.ts:128
Methods ​
Default() ​
Default():
RouterScenario
Defined in: router/src/index.ts:171
Returns ​
Event() ​
Event(
event
):RouterScenario
Defined in: router/src/index.ts:192
Parameters ​
event ​
Returns ​
EventParents() ​
EventParents(
event
):RouterScenario
Defined in: router/src/index.ts:217
Parameters ​
event ​
Returns ​
EventRoots() ​
EventRoots(
event
):RouterScenario
Defined in: router/src/index.ts:231
Parameters ​
event ​
Returns ​
ForPubkey() ​
ForPubkey(
pubkey
):RouterScenario
Defined in: router/src/index.ts:179
Parameters ​
pubkey ​
string
Returns ​
ForPubkeys() ​
ForPubkeys(
pubkeys
):RouterScenario
Defined in: router/src/index.ts:186
Parameters ​
pubkeys ​
string
[]
Returns ​
ForUser() ​
ForUser():
RouterScenario
Defined in: router/src/index.ts:173
Returns ​
FromPubkey() ​
FromPubkey(
pubkey
):RouterScenario
Defined in: router/src/index.ts:181
Parameters ​
pubkey ​
string
Returns ​
FromPubkeys() ​
FromPubkeys(
pubkeys
):RouterScenario
Defined in: router/src/index.ts:188
Parameters ​
pubkeys ​
string
[]
Returns ​
FromRelays() ​
FromRelays(
relays
):RouterScenario
Defined in: router/src/index.ts:165
Parameters ​
relays ​
string
[]
Returns ​
FromUser() ​
FromUser():
RouterScenario
Defined in: router/src/index.ts:175
Returns ​
getRelaysForPubkey() ​
getRelaysForPubkey(
pubkey
,mode
?):string
[]
Defined in: router/src/index.ts:144
Parameters ​
pubkey ​
string
mode? ​
Returns ​
string
[]
getRelaysForPubkeys() ​
getRelaysForPubkeys(
pubkeys
,mode
?):string
[][]
Defined in: router/src/index.ts:147
Parameters ​
pubkeys ​
string
[]
mode? ​
Returns ​
string
[][]
getRelaysForUser() ​
getRelaysForUser(
mode
?):string
[]
Defined in: router/src/index.ts:150
Parameters ​
mode? ​
Returns ​
string
[]
Index() ​
Index():
RouterScenario
Defined in: router/src/index.ts:169
Returns ​
merge() ​
merge(
scenarios
):RouterScenario
Defined in: router/src/index.ts:160
Parameters ​
scenarios ​
Returns ​
PubkeyInbox() ​
PubkeyInbox(
pubkey
):RouterScenario
Defined in: router/src/index.ts:183
Parameters ​
pubkey ​
string
Returns ​
PubkeyInboxes() ​
PubkeyInboxes(
pubkeys
):RouterScenario
Defined in: router/src/index.ts:190
Parameters ​
pubkeys ​
string
[]
Returns ​
PublishEvent() ​
PublishEvent(
event
):RouterScenario
Defined in: router/src/index.ts:245
Parameters ​
event ​
Returns ​
Quote() ​
Quote(
event
,value
,relays
):RouterScenario
Defined in: router/src/index.ts:198
Parameters ​
event ​
value ​
string
relays ​
string
[] = []
Returns ​
Replies() ​
Replies(
event
):RouterScenario
Defined in: router/src/index.ts:195
Parameters ​
event ​
Returns ​
scenario() ​
scenario(
selections
):RouterScenario
Defined in: router/src/index.ts:158
Parameters ​
selections ​
Returns ​
Search() ​
Search():
RouterScenario
Defined in: router/src/index.ts:167
Returns ​
UserInbox() ​
UserInbox():
RouterScenario
Defined in: router/src/index.ts:177
Returns ​
configure() ​
static
configure(options
):void
Defined in: router/src/index.ts:130
Parameters ​
options ​
Returns ​
void
get() ​
static
get():Router
Defined in: router/src/index.ts:134
Returns ​
Router