zcash-swift-wallet-sdk icon indicating copy to clipboard operation
zcash-swift-wallet-sdk copied to clipboard

ZIP-321 Request Generation API

Open pacu opened this issue 3 years ago • 0 comments

https://zips.z.cash/zip-0321

typealias URI = URL
protocol ZECPaymentRequest: LosslessStringConvertible {
     func request(amount: Double, paymentRecipient: String, message: String, memo: String) throws -> URI
}

class ZIP321 {
/// definitions
}

extension ZIP321: ZECPaymentRequest
    func request(amount: Double, paymentRecipient: String, message: String, memo: String) throws -> URI { ... }
}

Refs:

  • https://developer.apple.com/documentation/swift/customstringconvertible
  • https://developer.apple.com/documentation/swift/losslessstringconvertible
  • https://zips.z.cash/zip-0321

pacu avatar Oct 27 '21 23:10 pacu