C# Class BitSharper.Address

A BitCoin address is fundamentally derived from an elliptic curve public key and a set of network parameters.
It has several possible representations:

  1. The raw public key bytes themselves.
  2. RIPEMD160 hash of the public key bytes.
  3. A base58 encoded "human form" that includes a version and check code, to guard against typos.

One may question whether the base58 form is really an improvement over the hash160 form, given they are both very unfriendly for typists. More useful representations might include QR codes and identicons.

Note that an address is specific to a network because the first byte is a discriminator value.

Inheritance: VersionedChecksummedBytes
Show file Open project: TangibleCryptography/BitSharper Class Usage Examples

Public Methods

Method Description
Address ( NetworkParameters @params, byte hash160 ) : System

Construct an address from parameters and the hash160 form.

Example:

new Address(NetworkParameters.prodNet(), Hex.decode("4a22c3c4cbb31e4d03b15550636762bda0baf85a"));
Address ( NetworkParameters @params, string address ) : System

Construct an address from parameters and the standard "human readable" form.

Example:

new Address(NetworkParameters.prodNet(), "17kzeh4N8g49GFvdDzSf8PjaPfyoD1MndL");

Method Details

Address() public method

Construct an address from parameters and the hash160 form.
Example:

new Address(NetworkParameters.prodNet(), Hex.decode("4a22c3c4cbb31e4d03b15550636762bda0baf85a"));
public Address ( NetworkParameters @params, byte hash160 ) : System
@params NetworkParameters
hash160 byte
return System

Address() public method

Construct an address from parameters and the standard "human readable" form.
Example:

new Address(NetworkParameters.prodNet(), "17kzeh4N8g49GFvdDzSf8PjaPfyoD1MndL");
public Address ( NetworkParameters @params, string address ) : System
@params NetworkParameters
address string
return System