v1.1.0-beta1
Pre-release
Pre-release
Wallet class become super convenient class!
You can create wallet application with only 10 lines.
- Binary build is available now!
- Wallet class is super convenience
- Generating QRCode is super easy now. PrivateKey, PublicKey, Address has
.qrImage()
Easiest way of receiving and sending Bitcoin ever.
// 1. Create Private Key, Publick Key, Address
let privkey: PrivateKey = PrivateKey(network: .mainnet)
let pubkey: PublicKey = privkey.publicKey()
let address: Cashaddr = pubkey.toCashaddr()
let qrImage: UIImage? = address.qrImage(size: CGSize(width: 240, height: 240))
// 2. Create Wallet, Get balance, Refresh balance
let wallet: Wallet = Wallet(privateKey: privkey,
walletDataStore: UserDefaults.standard)
let balance = wallet.balance
wallet.reloadBalance()
// 3. Send Bitcoin
let toAddress = try! AddressFactory.create("bitcoincash:qz936smm809wq0eqthqyh2sgdzhs7v08nvnuq0dmps")
wallet.send(to: toAddress, amount: 10000)