Bitcoin
getBitcoinSignedTransaction
The D'CENT Android SDK provides functions for signing transaction of coins.
This function for :
.BITCOIN
- bitcoin (BTC).BITCOIN_SV
- bitcoin sv (BSV).BTC_SEGWIT
- bitcoin segwit (BTC).MONACOIN
- monacoin (MONA).LITECOIN
- litecoin (LTC).LTC_SEGWIT
- litecoin segwit (LTC).ZCASH
- zcash (ZEC).HORIZEN
- horizen (ZEN).BITCOINCASH
- bitcoin cash (BCH).DOGECOIN
- dogecoin (DOGE).BCH_ABC
- bitcoin cash abc (BCHA).ECASH
- ecash (XEC).DASH
- dash (DASH).BITCOIN_GOLD
- bitcoin gold (BTG).DIGIBYTE
- digibyte (DGB).DGB_SEGWIT
- digibyte segwit (DGB).RAVENCOIN
- ravencoin (RVN).BTC_TESTNET
- bitcoin testnet (BTCt).BTC_SEGWIT_TESTNET
- bitcoin segwit testnet (BTCt).MONA_TESTNET
- monacoin testnet (MONAt).LITE_TESTNET
- litecoin testnet (tLTC).LTC_SEGWIT_TESTNET
- litecoin segwit testnet (tLTC).ZCASH_TESTNET
- zcash testnet (TAZ).BCH_TESTNET
- bitcoin cash testnet (tBCH).DASH_TESTNET
- dash testnet (tDASH).BTG_TESTNET
- bitcoin gold testnet (tBTG).DIGIBYTE_TESTNET
- digibyte testnet (tDGB).DGB_SEGWIT_TESTNET
- digibyte segwit testnet (tDGB).RVN_TESTNET
- ravencoin testnet (tRVN)
Parameters
coinType: bitcoin networks coin type
bitcoinTransaction: (BitcoinTransation)bitcoin transaction parameter
class BitCoinTransaction
This class to be used for bitcoin transaction.
Name | Type | Description |
---|---|---|
version |
| version of bitcoin transaction. Currently 1
- |
input | previous transaction output information to be used | |
output | coin spending information | |
locktime |
| locktime for this transaction |
optionParam |
| (optional)option parameter for this transaction in case |
class UnspentTransactionOutput
The class for previous transaction output information to be used for bitcoin network transaction.
Name | Type | Description |
---|---|---|
prev_tx |
| full of previous transaction data |
utxo_idx |
| index of previous transaction output to be sent |
type | bitcoin transaction type for this UTXO | |
key |
| BIP44 key path for unlocking UTX |
class TransactionOutput
The class for coin spending information of Bitcoin network Transaction
Name | Type | Description |
---|---|---|
value |
| amount of coin to spend. Satoshi unit. |
to |
| if |
type | bitcoin network transaction type or this field can indicate output as a |
enum BtcTxtype
p2Pkh
: pay to public key hashp2Pk
: pay to public keyp2Sh
: pay to script hashchange
: indicate output as a change
Returns
result: (Bool)
true
if successful,false
if error occurredtxData: signed transaction
Example
Last updated