mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
Compare commits
1 Commits
85c964be3d
...
v0.6.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8edcea2ed3 |
1
event.js
1
event.js
@@ -1,3 +1,4 @@
|
|||||||
|
import Buffer from 'buffer'
|
||||||
import * as secp256k1 from '@noble/secp256k1'
|
import * as secp256k1 from '@noble/secp256k1'
|
||||||
|
|
||||||
import {sha256} from './utils'
|
import {sha256} from './utils'
|
||||||
|
|||||||
2
index.js
2
index.js
@@ -21,3 +21,5 @@ export {
|
|||||||
getPublicKey,
|
getPublicKey,
|
||||||
getBlankEvent
|
getBlankEvent
|
||||||
}
|
}
|
||||||
|
export * from './nip04'
|
||||||
|
export * from './nip05'
|
||||||
|
|||||||
1
nip04.js
1
nip04.js
@@ -1,3 +1,4 @@
|
|||||||
|
import Buffer from 'buffer'
|
||||||
import * as secp256k1 from '@noble/secp256k1'
|
import * as secp256k1 from '@noble/secp256k1'
|
||||||
|
|
||||||
export function encrypt(privkey, pubkey, text) {
|
export function encrypt(privkey, pubkey, text) {
|
||||||
|
|||||||
1
nip05.js
1
nip05.js
@@ -1,3 +1,4 @@
|
|||||||
|
import Buffer from 'buffer'
|
||||||
import dnsPacket from 'dns-packet'
|
import dnsPacket from 'dns-packet'
|
||||||
|
|
||||||
const dohProviders = [
|
const dohProviders = [
|
||||||
|
|||||||
17
package.json
17
package.json
@@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "nostr-tools",
|
"name": "nostr-tools",
|
||||||
"version": "0.6.0",
|
"version": "0.6.2",
|
||||||
"description": "Tools for making a Nostr client.",
|
"description": "Tools for making a Nostr client.",
|
||||||
"main": "index.js",
|
"main": "dist/nostr-tools.esm.min.js",
|
||||||
|
"module": "dist/nostr-tools.esm.min.js",
|
||||||
|
"browser": "dist/nostr-tools.umd.min.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/fiatjaf/nostr-tools.git"
|
"url": "https://github.com/fiatjaf/nostr-tools.git"
|
||||||
@@ -24,5 +26,14 @@
|
|||||||
"censorship",
|
"censorship",
|
||||||
"censorship-resistance",
|
"censorship-resistance",
|
||||||
"client"
|
"client"
|
||||||
]
|
],
|
||||||
|
"devDependencies": {
|
||||||
|
"rollup": "^2.61.1"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"prepublish": "rollup -c"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
rollup.config.js
Normal file
16
rollup.config.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import pkg from './package.json'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: 'index.js',
|
||||||
|
output: [
|
||||||
|
{
|
||||||
|
name: 'nostrtools',
|
||||||
|
file: pkg.browser,
|
||||||
|
format: 'umd'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
file: pkg.module,
|
||||||
|
format: 'es'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user