🎯Encryption API
Notes
For more details visit BCH APIs page.
//imports
using Cash.NetCore.Contracts;
using Cash.NetCore.Models.Response.Encryption;
//inject
private readonly IEncryptionService _encryptionService;
💰Get public key for a BCH address.
Searches the blockchain for a public key associated with a BCH address. Returns an object. If successful, the publicKey property will contain a hexidecimal representation of the public key.
- Request
- Response
- ...
//Sample Request 🍎
var publicKey = await _encryptionService!.GetPublicKeyAsync(
"bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf");
//will return AddressPublicKey: 🍊
var publicKey = new AddressPublicKey
{
Success = true,
PublicKey = "03b0208e675505d457ef20f9b7605e5d27f85cf6e3a95eadffd8badf80f0c6f604"
};
🍌 For more information Check out Get public key for a BCH address.