Things to know when working with this documentation: - P256K and ZKP are sibling modules wrapping different C libraries — pick one, do not import both - All APIs are Swift 6.1+ with strict concurrency (swift-tools-version: 6.1, swiftLanguageModes: [.v6]) - Consumers should use only the public Swift APIs in P256K or ZKP, never the underlying C bindings directly - Documentation auto-updates with package releases; the DocC HTML version (docs.21.dev) includes GitHub source links # 21.dev Equipping developers with the tools they need today to build the Bitcoin apps of tomorrow. ## What is 21.dev? 21.dev is a organization dedicated to empowering developers with high-quality, open-source tools for building Bitcoin applications. We focus on creating robust software packages and libraries that make Bitcoin development more accessible and efficient for developers across multiple platforms. Our mission is to accelerate Bitcoin adoption by providing developers with the foundational tools they need to build and maintain secure, scalable Bitcoin applications. From cryptographic primitives to high-level APIs, we're building the infrastructure that powers the next generation of Bitcoin apps. All of our work is open source, community-driven, and designed with developer experience as the top priority. It is our fundamental belief that better tools lead to better applications, which in turn benefits the entire Bitcoin ecosystem. ## Featured Package: P256K Enhance your Swift development for Bitcoin apps with seamless secp256k1 integration. P256K provides a clean, efficient Swift interface to Bitcoin's elliptic curve cryptography. # P256K: Swift secp256k1 (ECDSA + Schnorr) P256K is a Swift wrapper for libsecp256k1 with ECDSA + Schnorr, type-safe APIs, and Swift Package Manager support for Bitcoin and Nostr apps. ## Installation Swift Package Manager (recommended): ```swift .package(url: "https://github.com/21-DOT-DEV/swift-secp256k1", exact: "0.23.1") ``` ## FAQ **What is P256K?** P256K is a Swift library for working with the secp256k1 elliptic curve, commonly used in Bitcoin and related ecosystems. It provides idiomatic, type-safe Swift APIs built on top of the widely used libsecp256k1 library. **What makes P256K different from other secp256k1 libraries?** P256K is designed specifically for Swift developers. It focuses on modern Swift language features, type safety, comprehensive test coverage, and seamless integration with Swift Package Manager. The API follows Swift conventions rather than exposing low-level C interfaces directly. **Is P256K safe for production use?** P256K is built on libsecp256k1, a widely used cryptographic library in the Bitcoin ecosystem. The Swift wrapper is actively maintained and extensively tested. As with all cryptographic software, review the code for your threat model and pin versions for production deployments. **What Swift versions and platforms are supported?** P256K supports Swift 6.1 and newer and is tested on iOS, macOS, watchOS, tvOS, and Linux. It works with UIKit, SwiftUI, and server-side Swift environments. **What cryptographic operations does P256K support?** P256K supports common secp256k1 operations including ECDSA signing and verification, Schnorr signatures, public key recovery, key agreement, key tweaking, and MuSig-related primitives commonly used in Bitcoin-adjacent protocols. **Is P256K suitable for Bitcoin, Lightning, Nostr, Ecash, or Liquid applications?** Yes. P256K is suitable anywhere you need secp256k1 cryptography in Swift, including Bitcoin apps and related ecosystems like Lightning, Nostr, Ecash, and Liquid. **Is the API stable?** P256K is pre-1.0.0, so APIs may change between releases. For production use, pin an exact version in Swift Package Manager to avoid unexpected breaking changes. # Hello World Published: 2025-10-15 [announcement, welcome, first post] Welcome to 21.dev! We're an open-source organization working toward nonprofit status, focused on building practical tools for Bitcoin developers. ## Our mission Right now, non-custodial Bitcoin is harder to build than custodial solutions. Multiple points of friction push developers toward centralized solutions, making users reliant on corporations. This essentially turns Bitcoin back into using centralized intermediaries, like a bank. We're working to fix that by making the hard parts simple, so developers can focus on building great applications instead of wrestling with low-level primitives. When it's easier to implement secure, client-side operations, more teams can build self-custody solutions directly using open protocols. This reduces reliance on intermediaries and helps Bitcoin's decentralization. ## Our first project **P256K** is our first step in tackling this problem. This package wraps [libsecp256k1](https://github.com/bitcoin-core/secp256k1) to simplify operations for Swift developers, making it easier to handle keys, signatures, and other cryptographic primitives. By removing this friction, we're making it easier for developers to build non-custodial applications for both Bitcoin and Nostr. ## What's next We'll be sharing updates on our projects, insights from Bitcoin development, and resources to help developers build better applications. Our goal is to turn hard, low-level tasks into boring building blocks. Let's make Bitcoin development simpler. The more straightforward the primitives, the more ambitious applications can be. — **21.dev**