nostr-sdk-ios
nostr-sdk-ios copied to clipboard
Nostr SDK for Apple Platforms is a native Swift library that enables developers to quickly and easily build Nostr-based apps for Apple platforms.
Nostr SDK for Apple Platforms
Nostr SDK for Apple Platforms is a native Swift library that enables developers to quickly and easily build Nostr-based apps for Apple platforms.
Minimum Requirements
- Swift 5.8
- iOS 15
- macOS 12
Spec Compliance
The following NIPs are implemented:
- [x] NIP-01: Basic protocol flow description
- [x] NIP-02: Follow List
- [ ] NIP-03: OpenTimestamps Attestations for Events
- [x] NIP-04: Encrypted Direct Message --- unrecommended: deprecated in favor of NIP-17
- [x] NIP-05: Mapping Nostr keys to DNS-based internet identifiers
- [ ] NIP-06: Basic key derivation from mnemonic seed phrase
- [ ] NIP-07:
window.nostrcapability for web browsers - [ ] NIP-08: Handling Mentions --- unrecommended: deprecated in favor of NIP-27
- [x] NIP-09: Event Deletion
- [x] NIP-10: Conventions for clients' use of
eandptags in text events - [x] NIP-11: Relay Information Document
- [ ] NIP-13: Proof of Work
- [ ] NIP-14: Subject tag in text events
- [ ] NIP-15: Nostr Marketplace (for resilient marketplaces)
- [ ] NIP-17: Private Direct Messages
- [x] NIP-18: Reposts
- [x] NIP-19: bech32-encoded entities
- [ ] NIP-21:
nostr:URI scheme - [x] NIP-23: Long-form Content
- [x] NIP-24: Extra metadata fields and tags
- [x] NIP-25: Reactions
- [ ] NIP-26: Delegated Event Signing
- [ ] NIP-27: Text Note References
- [ ] NIP-28: Public Chat
- [ ] NIP-29: Relay-based Groups
- [x] NIP-30: Custom Emoji
- [ ] NIP-31: Dealing with Unknown Events
- [ ] NIP-32: Labeling
- [ ] NIP-34:
gitstuff - [ ] NIP-36: Sensitive Content
- [ ] NIP-38: User Statuses
- [ ] NIP-39: External Identities in Profiles
- [ ] NIP-40: Expiration Timestamp
- [ ] NIP-42: Authentication of clients to relays
- [x] NIP-44: Versioned Encryption
- [ ] NIP-45: Counting results
- [ ] NIP-46: Nostr Connect
- [ ] NIP-47: Wallet Connect
- [ ] NIP-48: Proxy Tags
- [ ] NIP-49: Private Key Encryption
- [ ] NIP-50: Search Capability
- [ ] NIP-51: Lists
- [x] NIP-52: Calendar Events
- [ ] NIP-53: Live Activities
- [ ] NIP-54: Wiki
- [x] NIP-56: Reporting
- [ ] NIP-57: Lightning Zaps
- [ ] NIP-58: Badges
- [x] NIP-59: Gift Wrap
- [x] NIP-65: Relay List Metadata
- [ ] NIP-72: Moderated Communities
- [ ] NIP-75: Zap Goals
- [ ] NIP-78: Application-specific data
- [ ] NIP-84: Highlights
- [ ] NIP-89: Recommended Application Handlers
- [ ] NIP-90: Data Vending Machines
- [ ] NIP-92: Media Attachments
- [ ] NIP-94: File Metadata
- [ ] NIP-96: HTTP File Storage Integration
- [ ] NIP-98: HTTP Auth
- [ ] NIP-99: Classified Listings
Installation
Nostr SDK can be integrated as an Xcode project target or a Swift package target.
Releases follow semantic versioning.
Xcode Project Target
- Go to
File->Add Package Dependencies. - Type https://github.com/nostr-sdk/nostr-sdk-ios.git into the search field.
- Select
nostr-sdk-iosfrom the search results. - Select
Up to Next Major Versionstarting from the latest release as the dependency rule. - Ensure your project is selected next to
Add to Project. - Click
Add Package. - On the package product dialog, add
NostrSDKto your target and clickAdd Package.
Swift Package Target
In your Package.swift file:
- Add the NostrSDK package dependency to https://github.com/nostr-sdk/nostr-sdk-ios.git
- Add
NostrSDKas a dependency on the targets that need to use the SDK.
let package = Package(
// ...
dependencies: [
// ...
.package(url: "https://github.com/nostr-sdk/nostr-sdk-ios.git", .upToNextMajor(from: "0.1.0"))
],
targets: [
.target(
// ...
dependencies: ["NostrSDK"]
),
.testTarget(
// ...
dependencies: ["NostrSDK"]
)
]
)
Contributing
If you would like to contribute to this library, please see CONTRIBUTING.md.
Contact
These are the core maintainers of this library and their Nostr public keys.
- Bryan Montz (npub1qlk0nqupxmlyxravg0aqscxmcc4q4tq898z6x003rykwwh3npj0syvyayc)
- Joel Klabo (npub19a86gzxctwtz68l8zld2u9y2fjvyyj4juyx8m5geylssrmfj27eqs22ckt)
- Terry Yiu (npub1yaul8k059377u9lsu67de7y637w4jtgeuwcmh5n7788l6xnlnrgs3tvjmf)
Acknowledgements
- OpenSats - Nostr Grant in July 2023
- Swift-DocC Plugin - Apache License 2.0, Apple Inc.
- SymbolKit - Apache License 2.0, Apple Inc.
- secp256k1.swift - MIT License, Copyright (c) 2020 GigaBitcoin LLC
- CryptoSwift - Copyright (C) 2014-3099 Marcin Krzyżanowski
- Bech32 - MIT License, Copyright 2018 Evolution Group Limited
- Nos Data+Encoding.swift - MIT License, Copyright 2024 © Verse Communications