Learn R Programming

rbtc (version 0.1-7)

PrivKey2Wif: Create WIF from a private key

Description

Returns the corresponding WIF key from a private key

Usage

PrivKey2Wif(privkey, mainnet = TRUE)

Value

character, the WIF key

Arguments

privkey

character, a private key.

mainnet

logical, whether the WIF should correspond to the mainnet or testnet.

Author

Bernhard Pfaff

References

https://en.bitcoin.it/wiki/Wallet_import_format,
https://en.bitcoin.it/wiki/Address

See Also

Other BtcAdresses: BTCADR-class, PrivKey2PubKey, PubHash2BtcAdr, PubKey2PubHash, Wif2PrivKey, base58CheckDecode, base58CheckEncode, concatHex, createBtcAdr, createPrivateKey, decodeHex, hash160, hash256, validBtcAdr

Examples

Run this code
suppressWarnings(RNGversion("3.5.0"))
pk <- createPrivateKey()
PrivKey2Wif(pk)

Run the code above in your browser using DataLab