Swiftpack.co - Package - ashchan/ckb-vanity-address

CKB Vanity Address Generator

Generate a CKB address with specified suffix.


Xcode 11, Swift 5, Swift Package Manager, and fun.


brew install pkg-config
brew install libsodium

Linux (Ubuntu)

~It should be easy to support Linux, but I have to see if I'm not that lazy to do so anytime soon.~

Update: supported, but it's a stupid implementation calling /usr/bin/openssl to generate private keys (expect it to be slower). Please figure out how to set up Swift first.

apt install libsodium-dev


swift build
// Replace `.build/x86_64-apple-macosx/debug/` with the actual build path on your machine.
// 666 is the suffix to look for.
.build/x86_64-apple-macosx/debug/cva 66


Generating::  .
🎉 Congrats! You've got an awesome address!
    "private_key": "0xc567a1e32f48f6700506358fdc420295e3e4f3ffb2048e911588910205700ced",
    "public_key": "0x02570d5d216ed44b14c1e3ceeaacc58c6d4acf71071c4bdd601ebb95023f033ee3",
    "address": "ckt1qyqt4yp7r2z2gf3f5cq66u3fpu6kz0n82xtsxjmc66"

macOS App

A macOS app is also available if GUI is preferred. To build, open macOS.xcodeproj with Xcode 11 or above and build/run.

Mac App


CKB address format wraps lock script with Bech32 encoding. All addresses always have the same first 7 characters, thus generating addresses with a prefix you wish to own doesn't make much sense.

This tool generates address with a suffix you specify. Practically it should be very easy and fast to generate addresses with a 1-3 character suffix. For longer suffix it might take quite long long long time to finish, due to the fact this is a silly single thread brute force program.

Bech32 doesn't allow a few alphanumeric characters. Trying to specify "1", "b", "i", or "o" will not work.


This is released under the MIT License.


Stars: 4


Used By

Total: 0


1.5 - 2019-11-06 12:03:29

  • Update CKB SDK to v0.24.0
  • Switch to mainnet address format

1.4 - 2019-09-07 08:44:54

For CKB v0.20.0 rylai-v9

1.3 - 2019-07-27 06:06:16

For CKB v0.17.0 rylai-v6

For CKB v0.15.0 rylai-v4 - 2019-06-29 10:12:54

Support CKB Testnet rylai-v4 and v0.15.0.

For CKB v0.14.0 rylai-v3 - 2019-06-15 05:41:41

Support CKB Testnet rylai-v3 and v0.14.0.

1.0 - 2019-06-02 09:20:20

  • CLI tool (macOS/Linux) to generate CKB testnet address choosing a suffix.
  • macOS GUI to generate address and view the miner block assembler.