Skip to content

Commit 611ba6f

Browse files
committed
chore: bump version to 0.4.0
- Add comprehensive documentation and examples - Add Code of Conduct - Enhance development setup instructions - Add security considerations section - Update version history with v0.3.0 changes
1 parent f4e6b51 commit 611ba6f

File tree

4 files changed

+354
-28
lines changed

4 files changed

+354
-28
lines changed

CODE_OF_CONDUCT.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all community spaces, and also applies when
49+
an individual is officially representing the community in public spaces.
50+
51+
## Enforcement
52+
53+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
54+
reported to the community leaders responsible for enforcement at
55+
[conduct@humanjavaenterprises.org](mailto:conduct@humanjavaenterprises.org).
56+
All complaints will be reviewed and investigated promptly and fairly.
57+
58+
## Enforcement Guidelines
59+
60+
Community leaders will follow these Community Impact Guidelines in determining
61+
the consequences for any action they deem in violation of this Code of Conduct:
62+
63+
### 1. Correction
64+
65+
**Community Impact**: Use of inappropriate language or other behavior deemed
66+
unprofessional or unwelcome in the community.
67+
68+
**Consequence**: A private, written warning from community leaders, providing
69+
clarity around the nature of the violation and an explanation of why the
70+
behavior was inappropriate. A public apology may be requested.
71+
72+
### 2. Warning
73+
74+
**Community Impact**: A violation through a single incident or series
75+
of actions.
76+
77+
**Consequence**: A warning with consequences for continued behavior. No
78+
interaction with the people involved, including unsolicited interaction with
79+
those enforcing the Code of Conduct, for a specified period of time. This
80+
includes avoiding interactions in community spaces as well as external channels
81+
like social media. Violating these terms may lead to a temporary or
82+
permanent ban.
83+
84+
### 3. Temporary Ban
85+
86+
**Community Impact**: A serious violation of community standards, including
87+
sustained inappropriate behavior.
88+
89+
**Consequence**: A temporary ban from any sort of interaction or public
90+
communication with the community for a specified period of time. No public or
91+
private interaction with the people involved, including unsolicited interaction
92+
with those enforcing the Code of Conduct, is allowed during this period.
93+
Violating these terms may lead to a permanent ban.
94+
95+
### 4. Permanent Ban
96+
97+
**Community Impact**: Demonstrating a pattern of violation of community
98+
standards, including sustained inappropriate behavior, harassment of an
99+
individual, or aggression toward or disparagement of classes of individuals.
100+
101+
**Consequence**: A permanent ban from any sort of public interaction within
102+
the community.
103+
104+
## Attribution
105+
106+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
107+
version 2.0, available at
108+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
109+
110+
[homepage]: https://www.contributor-covenant.org

README.md

Lines changed: 87 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,18 @@ A comprehensive TypeScript library for managing Nostr keys with seed phrases, in
3030
npm install nostr-nsec-seedphrase
3131
```
3232

33-
## Usage
33+
## Getting Started
3434

35-
### Key Generation and Management
35+
This library provides a comprehensive set of tools for managing Nostr keys with seed phrases. Here's how to get started:
36+
37+
### Prerequisites
38+
39+
- Node.js 16.0.0 or later
40+
- npm or yarn package manager
41+
42+
### Basic Usage
43+
44+
#### Key Generation and Management
3645

3746
```typescript
3847
import { generateKeyPairWithSeed, seedPhraseToKeyPair } from 'nostr-nsec-seedphrase';
@@ -81,14 +90,6 @@ const event = await createEvent(
8190
const isValidEvent = await verifyEvent(event);
8291
```
8392

84-
## Recent Updates
85-
86-
### v0.2.0
87-
- 🔧 Fixed HMAC configuration for secp256k1
88-
- ✅ Added comprehensive test coverage
89-
- 🎯 Improved TypeScript types
90-
- 📚 Enhanced documentation
91-
9293
## API Reference
9394

9495
### Key Management
@@ -109,9 +110,84 @@ const isValidEvent = await verifyEvent(event);
109110
- `createEvent(content: string, kind: number, privateKey: string, tags?: string[][])`: Create a Nostr event
110111
- `verifyEvent(event: NostrEvent)`: Verify a Nostr event
111112

113+
## Development
114+
115+
### Setting Up Development Environment
116+
117+
1. Clone the repository
118+
```bash
119+
git clone https://github.com/vergelevans/nostr-nsec-seedphrase.git
120+
cd nostr-nsec-seedphrase
121+
```
122+
123+
2. Install dependencies
124+
```bash
125+
npm install
126+
```
127+
128+
3. Build the project
129+
```bash
130+
npm run build
131+
```
132+
133+
### Running Tests
134+
135+
```bash
136+
# Run all tests
137+
npm test
138+
139+
# Run tests with coverage
140+
npm run test:coverage
141+
```
142+
143+
### Code Style
144+
145+
This project uses Prettier for code formatting. Format your code before committing:
146+
147+
```bash
148+
npm run format
149+
```
150+
151+
## Security Considerations
152+
153+
- Always keep your seed phrases and private keys secure
154+
- Never share your private keys or seed phrases
155+
- Be cautious when using this library in a browser environment
156+
- Consider using a hardware wallet for additional security
157+
- Validate all inputs and handle errors appropriately
158+
159+
## Recent Updates
160+
161+
### v0.4.0
162+
- 📚 Added comprehensive documentation and examples
163+
- 📝 Added Code of Conduct
164+
- 🔍 Enhanced development setup instructions
165+
- 🛡️ Added security considerations section
166+
167+
### v0.3.0
168+
- 🔧 Enhanced module resolution for better compatibility
169+
- ✨ Improved testing infrastructure and mocks
170+
- 📝 Enhanced TypeScript support and configurations
171+
- 🔒 Enhanced cryptographic functionality
172+
- 🎯 Updated ESLint and TypeScript configurations
173+
174+
### v0.2.0
175+
- 🔧 Fixed HMAC configuration for secp256k1
176+
- ✅ Added comprehensive test coverage
177+
- 🎯 Improved TypeScript types
178+
- 📚 Enhanced documentation
179+
112180
## Contributing
113181

114-
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
182+
We welcome contributions! Please follow these steps:
183+
184+
1. Fork the repository
185+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
186+
3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
187+
4. Push to the branch (`git push origin feature/amazing-feature`)
188+
5. Open a Pull Request
189+
190+
Please read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing.
115191

116192
## License
117193

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nostr-nsec-seedphrase",
3-
"version": "0.3.1",
3+
"version": "0.4.0",
44
"description": "A TypeScript library for managing Nostr keys with seed phrases, including event signing, verification, and WebSocket utilities",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)