public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [bitcoindev] Pure Swift Bitcoin Protocol implementation (largely experimental)
@ 2024-10-07 12:16 'Dr. Craig S. Wrong' via Bitcoin Development Mailing List
  0 siblings, 0 replies; only message in thread
From: 'Dr. Craig S. Wrong' via Bitcoin Development Mailing List @ 2024-10-07 12:16 UTC (permalink / raw)
  To: Bitcoin Development Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 2501 bytes --]

Hello there!

I wanted to share with y'all a project that I've been working on for more 
than two years called Swift Bitcoin 
(https://github.com/swift-bitcoin/swift-bitcoin 
/ https://swift-bitcoin.github.io)

It started as a way for me to test my own knowledge about the way Bitcoin 
works internally and externally. I first took a stab at implementing the 
various BIPs including with their respective test vectors in my favorite 
language Swift. I then started porting over additional unit tests from the 
Bitcoin Core project which helped me understand a lot of what happens under 
the hood.

While far from complete, today the package offers a comprehensive set of 
idiomatic Swift APIs which covers ECC and Bitcoin cryptography (uses 
libsecp256k1), hash functions, codecs, a full SCRIPT interpreter, 
transaction composition, signature verification, wallet functionality 
(addresses, key derivation, mnemonic, transaction input signing), 
blockchain, mining, RPC and P2P transport (WIP).

About some the advantages of using Swift I can mention the use of actors 
for isolation of mutable state and structured concurrency which guarantees 
data race safety. These are particularly noticeable at the wire protocol 
level where I'm leveraging the SwiftNIO library for non-blocking I/O.

The code does not rely on third party dependencies and produces a very fast 
and small binary which could eventually be suitable for embedded systems 
(coming soon). For Apple platform of course this library fits right in but 
everything is developed and tested on Linux. Also with C / C++ 
interoperability it can also be integrated into any CMake-based project.

Anyway if anyone is interested in knowing more or becoming a contributor 
please reach out to me at toximaxi (at) proton.me. I'm not a protocols guy 
so progress in that area has been slow and I could use some help in that 
particular area as well as many others.

Aside from that let me know what you think. Could an 
experimental/educational project like this one evolve into something useful 
for others?

Thanks everyone for taking the time.

Cheers!

-- 
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bitcoindev/c8a0717f-4576-4fb7-ac5c-a2a1ab7a2eden%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2974 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-07 12:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-07 12:16 [bitcoindev] Pure Swift Bitcoin Protocol implementation (largely experimental) 'Dr. Craig S. Wrong' via Bitcoin Development Mailing List

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox