• Design
  • API Reference
  • Changelog
  • Contribute
Show / Hide Table of Contents
  • Libplanet
    • Address
    • AddressExtension
    • ByteUtil
    • Hashcash
    • Hashcash.Stamp
    • HashDigest<T>
    • HashDigestExtension
    • Nonce
  • Libplanet.Action
    • AccountStateGetter
    • ActionEvaluation<T>
    • ActionTypeAttribute
    • AddressStateMap
    • IAccountStateDelta
    • IAction
    • IActionContext
    • IRandom
    • MissingActionTypeException
    • PolymorphicAction<T>
  • Libplanet.Blockchain
    • BlockChain<T>
  • Libplanet.Blockchain.Policies
    • BlockPolicy<T>
    • BlockPolicyExtension
    • IBlockPolicy<T>
  • Libplanet.Blocks
    • Block<T>
    • InvalidBlockDifficultyException
    • InvalidBlockException
    • InvalidBlockHashException
    • InvalidBlockIndexException
    • InvalidBlockNonceException
    • InvalidBlockPreviousHashException
    • InvalidBlockTimestampException
  • Libplanet.Crypto
    • InvalidCiphertextException
    • PrivateKey
    • PublicKey
    • SymmetricKey
  • Libplanet.Net
    • BlockDownloadState
    • DifferentAppProtocolVersionException
    • DifferentProtocolVersionEventArgs
    • IceServer
    • IceServerException
    • InvalidMessageException
    • NoSwarmContextException
    • Peer
    • PeerNotFoundException
    • PeerSetDelta
    • Swarm
    • SwarmException
  • Libplanet.Serialization
    • BencodexFormatter<T>
    • SerializationInfoExtension
  • Libplanet.Store
    • BaseIndex<TKey, TVal>
    • BaseStore
    • BlockSet<T>
    • FileStore
    • IStore
    • NamespaceNotFoundException
    • TransactionSet<T>
  • Libplanet.Tx
    • InvalidTxException
    • InvalidTxIdException
    • InvalidTxNonceException
    • InvalidTxPublicKeyException
    • InvalidTxSignatureException
    • InvalidTxUpdatedAddressesException
    • Transaction<T>
    • TxId
    • UnexpectedlyTerminatedTxRehearsalException

Namespace Libplanet

Classes

AddressExtension

This extension class enables some convenient methods (sugar for the most part) to deal with Address.

ByteUtil

Utility methods to deal with Byte arrays.

Hashcash

This contains a set of functions that implements Hashcash, a proof-of-work system.

HashDigestExtension

Augments types to have some shortcut methods dealing with HashDigest<T> values.

Structs

Address

An identifier of 20 bytes (or 40 letters in hexadecimal, commonly with a prefix 0x) that refers to a unique account.

It is derived from the corresponding PublicKey of an account, but as a derivation loses information, it is always unidirectional.

The address derivation from a public key is as follows:

  1. Calculates the Keccak-256, which is a previous form of SHA-3 before NIST standardized it and does not follow FIPS-202, of the corresponding PublicKey.
  2. Takes only the last 20 bytes of the calculated Keccak-256 hash.
  3. When the address needs to be shown to end users, displays these 20 bytes in hexadecimal, with a prefix 0x.

Since the scheme of the address derivation and the PrivateKey/PublicKey is the same to Ethereum, Ethereum addresses can be used by Libplanet-backed games/apps too.

HashDigest<T>

A value type to represent digest bytes determined by a HashAlgorithm. For more type safety, it takes a type parameter T of HashAlgorithm.

Nonce

An arbitrary Bytes that determines a Hashcash.Stamp.

Delegates

Hashcash.Stamp

A delegate to determine a consistent Bytes representation derived from a given nonce.

Since it is called multiple times with different nonces for proof-of-work system, the total time an implementation elapses should not vary for different nonces.

Back to top Copyright © 2019 Planetarium
Generated by DocFX