Created
November 25, 2020 07:32
-
-
Save saltyskip/7655007cbe7a4228eff546502f8a327e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BcomBlockchainTransaction { | |
var wallet: BcomWallet | |
var chainAssetProtocol: ChainAssetProtocol | |
var amount: Decimal | |
var assetId: String | |
//bitcoin specific | |
var utxo: [UTXO]? | |
var satsPerByteFee: Int | |
//slp specific | |
var slp: [SLPUTXO]? | |
//eth specific | |
var gasLimit: Int | |
var gwei: Int | |
init(signingWallet: BcomWallet, chainAssetProtocol: ChainAssetProtocol, amount: Decimal, assetId: String) { | |
self.wallet = signingWallet | |
self.chainAssetProtocol = chainAssetProtocol | |
self.amount = amount | |
self.assetId = assetId | |
} | |
//bitcoinSpecific shit | |
func buildBitcoin(utxos: [UTXO], satsPerByteFee: Int) { | |
} | |
//slp shit | |
func buildSLP(slpUtxos: [SLPUTXO]) { | |
} | |
//eth shit | |
func buildEth(gasLimit: Int) { | |
} | |
func buildERC20() { | |
} | |
} | |
BcomBlockchainTransaction(signingWallet: BcomWallet(strength: 128, passphrase: "", chain: .bitcoinCash), chainAssetProtocol: .bch, amount: 0, assetId: "BCH") | |
.buildBitcoin(utxos: [], satsPerByteFee: [10]) | |
.buildSlp(slpUtxos: []) | |
.build() | |
public func createTransaction(_ tx: BlockchainTransaction) -> Data { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment