Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 535 Bytes

File metadata and controls

21 lines (13 loc) · 535 Bytes

getRelays

Method

async function getRelays(): { [url: string]: {read: boolean, write: boolean} } 

Response

returns a basic map of relay urls to relay policies

Example

const provider = (window.$onekey && window.$onekey.nostr) || window.nostr;

const event = async provider.getRelays()

Demo

{% embed url="https://codepen.io/OneKeyHQ/pen/vYbzmoJ" %}