mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 08:38:50 +00:00
commonjs import for ramda.
This commit is contained in:
4
pool.js
4
pool.js
@@ -1,8 +1,8 @@
|
||||
import R from 'ramda'
|
||||
|
||||
import {getEventHash, signEvent} from './event'
|
||||
import {relayConnect, normalizeRelayURL} from './relay'
|
||||
|
||||
const R = require('ramda')
|
||||
|
||||
export function relayPool(globalPrivateKey) {
|
||||
const relays = {}
|
||||
const globalSub = []
|
||||
|
||||
3
relay.js
3
relay.js
@@ -1,9 +1,10 @@
|
||||
import 'websocket-polyfill'
|
||||
import R from 'ramda'
|
||||
|
||||
import {verifySignature} from './event'
|
||||
import {sha256} from './utils'
|
||||
|
||||
const R = require('ramda')
|
||||
|
||||
export function normalizeRelayURL(url) {
|
||||
let [host, ...qs] = url.split('?')
|
||||
if (host.slice(0, 4) === 'http') host = 'ws' + host.slice(4)
|
||||
|
||||
Reference in New Issue
Block a user