Safe Haskell | None |
---|
An interface to bitcoind's available block-chain-related RPC calls. The implementation of these functions can be found at https://github.com/bitcoin/bitcoin/blob/master/src/rpcblockchain.cpp.
If any APIs are missing, patches are always welcome. If you look at the source of this module, you'll see that the interface code is trivial.
- data Auth = Auth {}
- type TransactionID = HexString
- type BTC = Fixed Satoshi
- data ScriptSig = ScriptSig {}
- getBlockCount :: Auth -> IO Integer
- getDifficulty :: Auth -> IO Integer
- setTransactionFee :: Auth -> BTC -> IO ()
- getRawMemoryPool :: Auth -> IO (Vector TransactionID)
- type BlockHash = HexString
- getBlockHash :: Auth -> Integer -> IO BlockHash
- data Block = Block {
- blockHash :: BlockHash
- blkConfirmations :: Integer
- blkSize :: Integer
- blkHeight :: Integer
- blkVersion :: Integer
- merkleRoot :: BlockHash
- subTransactions :: Vector TransactionID
- blkTime :: Integer
- blkNonce :: Integer
- blkBits :: HexString
- blkDifficulty :: Integer
- nextBlock :: Maybe BlockHash
- prevBlock :: Maybe BlockHash
- getBlock :: Auth -> BlockHash -> IO Block
- data OutputSetInfo = OutputSetInfo {}
- getOutputSetInfo :: Auth -> IO OutputSetInfo
- data OutputInfo = OutputInfo {}
- getOutputInfo :: Auth -> TransactionID -> Integer -> IO OutputInfo
Documentation
type TransactionID = HexStringSource
A hexadecimal string representation of a 256-bit unsigned integer.
This integer is a unique transaction identifier.
I don't know what this is. A signature of some sort? If you know, please submit a patch documenting this properly!
getBlockCount :: Auth -> IO IntegerSource
Returns the number of blocks in the longest block chain.
getDifficulty :: Auth -> IO IntegerSource
Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
setTransactionFee :: Auth -> BTC -> IO ()Source
Sets the transaction fee will will pay to the network. Values of 0 are rejected.
getRawMemoryPool :: Auth -> IO (Vector TransactionID)Source
Returns all transaction identifiers in the memory pool.
Returns the hash of the block in best-block-chain at the given index.
Information about a given block in the block chain.
Block | |
|
data OutputSetInfo Source
Information on the unspent transaction in the output set.
OutputSetInfo | |
|
getOutputSetInfo :: Auth -> IO OutputSetInfoSource
Returns statistics about the unspent transaction output set.
data OutputInfo Source
Details about an unspent transaction output.
OutputInfo | |
|
:: Auth | |
-> TransactionID | |
-> Integer | The index we're looking at. |
-> IO OutputInfo |
Returns details about an unspent transaction output.