blockchainethereumblockchain-walleterc20erc721walletxdaidappdecentralizederc1155erc875iosswifttokens
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
720 B
27 lines
720 B
// Copyright SIX DAY LLC. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
class ShapeShiftBuyWidget {
|
|
|
|
private let amount: Int
|
|
private let address: String
|
|
private let publicKey: String
|
|
private let cryptoCurrency: String
|
|
|
|
var url: URL {
|
|
return URL(string: "https://shapeshift.io/shifty.html?destination=\(address)&output=\(cryptoCurrency)&amount=\(amount)&apiKey=\(publicKey)")!
|
|
}
|
|
|
|
init(
|
|
amount: Int = 0,
|
|
address: String,
|
|
publicKey: String = Constants.shapeShiftPublicKey,
|
|
cryptoCurrency: String = "ETH"
|
|
) {
|
|
self.amount = amount
|
|
self.address = address
|
|
self.publicKey = publicKey
|
|
self.cryptoCurrency = cryptoCurrency
|
|
}
|
|
}
|
|
|