{yQ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP  Safe-Inferred+ HAn account on the wallet is just a label to easily specify private keys.'The default account is an empty string.*An address for sending or receiving money.AThe type of bitcoin money, represented with a fixed-point number.NA satoshi is the smallest subdivision of bitcoins. For the resolution, use Q from   . BA hexadecimal string representation of a 256-bit unsigned integer.0This integer is a unique transaction identifier. @A string returned by the bitcoind API, representing data as hex.ZWhat that data represents depends on the API call, but should be dcumented accordingly. A  Z is thrown when 'callApi encounters an error. The API error code is represented as an Int, the message as a String.\It may also be thrown when the value returned by the bitcoin API wasn't what we expected.WARNING: Any of the functions in this module's public API may throw this exception. You should plan on handling it. JThe raw JSON returned, if we can't figure out what actually went wrong. A  T has an error code error message, as returned by bitcoind's JSON-RPC response.c describes authentication credentials and host info for making API requests to the Bitcoin daemon.  RS       RSNone A wrapper for a vector of address:amount pairs. The RPC expects that as an object of "address":"amount" pairs, instead of a vector. So that's what we give them with AddrAddress's ToJSON.*Used to allow "null" to decode to a tuple.A response from bitcoind will contain the result of the JSON-RPC call, and an error. The error should be null if a valid response was received.TcRPC calls return an error object. It can either be empty; or have an error message + error code.UError code + error message.V All good. takes a url, rpc username, and rpc password and returns a Client that can be used to make API calls. Each Client encloses a Manager (from http-client) that re-uses connections for requests, so long as the same Client is is used for each call. is a low-level interface for making authenticated API calls to a Bitcoin daemon. The first argument specifies rpc client details (URL, username, password)eThe second argument is the command name. The third argument provides parameters for the API call.  genHash = doclient <- getClient " http://127.0.0.1:8332"> "user" "password" callApi client "getblockhash" [tj 0]On error, throws a  ..A handy shortcut for toJSON, because I'm lazy.TUVRPC client for bitcoind command namecommand argumentsWXYZ  TVUWXYZNone2A textual representation of a bitcoin private key.?Adds a private key (as returned by dumpprivkey) to your wallet.;Reveals the private key corresponding to the given address.An optional label for the key.None"[iUnfortunately, the submitblock API call returns null on success, and the string "rejected" on failure.We use [ to parse this ridiculous API. /A template for constructing a block to work on.See  #https://en.bitcoin.it/wiki/BIP_0022 for the full specification.#Hash of current highest block.$SContents of non-coinbase transactions that should be included in the next block.%)Data that should be included in coinbase.&hMaximum allowable input to coinbase transaction, including the generation award and transaction fees.' Hash target.(-Minimum timestamp appropriate for next block.)Range of valid nonces.*Limit of sigops in blocks.+Limit of block size.,Current timestamp.-$Compressed target of the next block..Height of the next block.2/A transaction to be included in the next block.9The hash data returned from O.<=Little-endian hash target, formatted as a hexadecimal string.?=Information related to the current bitcoind mining operation.If a field is undocumented here, it's because I don't know what it means. If you DO know what it means, I'd love it if you would submit a patch to help complete this documentation.A(The number of blocks in our block-chain.B+The size of the current block we're mining.D"How difficult mining currently is.E(Any mining errors that may have come up.F%Are we currently generating bitcoins?G6How many processors have we limited bitcoin mining to?HHow fast is the mining going?JEAre we on the bitcoin test network (as opposed to the real thing)?K7Returns whether or not bitcoind is generating bitcoins.L8Controls whether or not bitcoind is generating bitcoins.MOReturns a recent hashes per second performance measurement while generating.N8Returns an object containing mining-related information.O'Returns formatted hash data to work on.PFTries to solve the given block, and returns true if it was successful.Q4Returns data needed to construct a block to work on.R.Attempts to submit a new block to the network.=[\] !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKbitcoind RPC clientLbitcoind RPC clientTurn it on, or turn it off?Generation is limited to this number of processors. Set it to Nothing to keep the value at what it was before, Just -1 to use all available cores, and any other value to limit it.MNOPQRThe block to submit.&Was the block accepted by the network?^_`abcd5 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR5KLM?@ABCDEFGHIJN9:;<=>OP2345678/01 !"#$%&'()*+,-.QR[\] !"#$%&'()*+,-./0123456789:;<=>? @ABCDEFGHIJKLMNOPQR^_`abcdNone S5Information about a peer node of the Bitcoin network.The documentation for this data structure is incomplete, as I honestly don't know what some of these fields are for. Patches are welcome!U&The IP:port of this peer, as a string.WwRelative to the first time we conected with this peer (and in milliseconds), the last time we sent this peer any data.X}Relative to the first time we connected with this peer (and in milliseconds), the last time we sent this peer any data.[BHow long have we been connected to this peer (in milliseconds).\6The version of the Bitcion client the peer is running.]:The sub-version of the Bitcoin client the peer is running.`+How many times has this peer behaved badly?a1Returns the number of connections to other nodes.b,Returns data about all connected peer nodes.STUVWXYZ[\]^_`abeSTUVWXYZ[\]^_`abaSTUVWXYZ[\]^_`bS TUVWXYZ[\]^_`abeNone.cA raw signed transaction contains the raw, signed hexstring and whether or not this transaction has a complete signature set.g$Who can pay for a given transaction.fUsed internally to give a new g instance for u.n\A successfully decoded raw transaction, from a given serialized, hex-encoded transaction.pThe raw transaction.qThe transaction version number.sThe vector of transactions in.tThe vector of transactions out.~4The raw transaction info for a given transaction ID.The raw transaction.The transaction version number.The vector of transactions in.The vector of transactions out.<The hash of the block that was used for this transaction.The transaction's block's info.Information on a single block.2An unconfirmed block is boring, but a possibility.EThe number of confirmations a block has. This will always be >= 1.The JSON "blocktime" field.A script signature.)A public key of someone we sent money to.The JSON "asm" field.The JSON "hex" field."The number of required signatures.The type of the transaction.'The addresses associated with this key.The JSON "asm" field.The JSON "hex" field. A transaction out of an account.&The amount of bitcoin transferred out.3The public key of the account we sent the money to.The type of a transaction out.TMore documentation is needed here. Submit a patch if you know what this is about!JSON of "multisig" received.JSON of "scripthash" received.JSON of "pubkeyhash" received.JSON of "pubkey" received.|A transaction into an account. This can either be a coinbase transaction, or a standard transaction with another account.This transaction's ID.A transaction sequence number.gJust like most binary data retrieved from bitcoind, a raw transaction is represented by a hexstring..This is a serialized, hex-encoded transaction.)Get a raw transaction from its unique ID.Get raw transaction info for a given transaction ID. The data structure returned is quite sprawling and undocumented, so any patches to help simplify things would be greatly appreciated.Returns an array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations. If addresses are given, the result will be filtered to include only those addresses.GCreate a transaction spending given inputs, sending to given addresses.wNote that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.Also, there is no checking to see if it's possible to send that much to the targets specified. In the future, such a scenario might throw an exception.@Decodes a raw transaction into a more accessible data structure."Sign inputs for a raw transaction.`cdefghijklmfhnopqrstuvwxyz{|}~minconf. Defaults to 1 if i. maxconf. Defaults to 9999999 if i.Use   for no filtering.6The unspent transactions we'll be using as our output.OThe addresses we're sending money to, along with how much each of them gets.j/The raw transaction whose inputs we're signing.~An optional list of previous transaction outputs that this transaction depends on but may not yet be in the block chain.nAn array of base58-encoded private keys that, if given, will be the only keys used to sign the transaction."Who can pay for this transaction? m by default.Returns iR if the transaction has a complete set of signatures, and the raw signed transaklmnopqrstuvScdefghijklmnopqrstuvwxyz{|}~S~uvwxyz{|}nopqrstgmlkjihcdef!cdefgmlkjihfhnopqrstuvwxyz{|}~ jklmnopqrstuvNone,Details about an unspent transaction output.8The number of times this transaction has been confirmed.The amount transferred.The public key of the sender. The version of this transaction.*Is this transaction part of the coin base?9Information on the unspent transaction in the output set.-The number of transactions in the output set.+The number of outputs for the transactions.&The serialized size of the output set.3Information about a given block in the block chain.*The number of confirmations the block has.The size of the block..The "height" of the block. TODO: Clarify this.The version of the block.TThe hash of the block at the root of the merkle tree which this block belongs to.0Should this be a transaction, or transaction id?The time it was mined.The block's nonce. How hard was this block to mine?)A pointer to the next block in the chain.-A pointer to the previous block in the chain.The hash of a given block.8Returns the number of blocks in the longest block chain.PReturns the proof-of-work difficulty as a multiple of the minimum difficulty.SSets the transaction fee will will pay to the network. Values of 0 are rejected.7Returns all transaction identifiers in the memory pool.EReturns the hash of the block in best-block-chain at the given index.1Returns details of a block with given block-hash.<Returns statistics about the unspent transaction output set.4Returns details about an unspent transaction output.) Block index.The index we're looking at.wxy) ) wxyNone`zJust a handy wrapper to help us get only the "isvalid" field of the JSON. The structure is much too complicated for what it needs to do.^The account name associated with the transaction. The empty string is the default account.'The bitcoin address of the transaction.The category of the transaction#The amount of bitcoins transferred.5Data type for detailed transactions. Rules involving  trCategory_ are indications of the most probable value only when the transaction is obtained from F or D! are their associated methods.#The amount of bitcoins transferred.-The fees paid to process the transaction. Is i unless  trCategory is  or .3The number of confirmations of the transaction. Is i unless  trCategory is  or .The transaction id. Is i unless  trCategory is  or .qThe list of transaction ids containing the same data as the original transaction (See ID-malleation bug). Is i unless  trCategory is  or .7The block time in seconds since epoch (1 Jan 1970 GMT).Is i5 unless a comment is associated with the transaction.Is i2 unless a "to" is associated with the transaction.The details of the transaction.Raw data for the transaction.3Data type for simple transactions. Rules involving {_ are indications of the most probable value only when the transaction is obtained from F or DG are their associated methods. They are never enforced on this side.^The account name associated with the transaction. The empty string is the default account.+The bitcoin address of the transaction. Is i unless  trCategory is  or .The category of the transaction-The fees paid to process the transaction. Is i unless  trCategory is  or .#The amount of bitcoins transferred.3The number of confirmations of the transaction. Is i unless  trCategory is  or .5The hash of the block containing the transaction. Is i unless  trCategory is  or .:The index of the the block containing the transaction. Is i unless  trCategory is  or .?The block time in seconds since epoch (1 Jan 1970 GMT). Is i unless  trCategory is  or .The transaction id. Is i unless  trCategory is  or .qThe list of transaction ids containing the same data as the original transaction (See ID-malleation bug). Is i unless  trCategory is  or .7The block time in seconds since epoch (1 Jan 1970 GMT).Is i5 unless a comment is associated with the transaction.Is i2 unless a "to" is associated with the transaction.The account the funds came from (for receiving funds, positive amounts), or went to (for sending funds, negative amounts). Is i unless  trCategory is . The account we received into.^The mount received. ^ The number of confirmations of the most recent included transaction.8Information on how much was received by a given address.-The address which the money was deposited to.*The account which this address belongs to.The amount received.GThe number of confirmations of the most recent included transaction.(A signature is a base-64 encoded string.Information on a given address.The address in question.The address' balance.The address' linked account.4A plethora of information about a bitcoind instance.(What version of bitcoind are we running?+What is bitcoind's current protocol number? What version is the wallet?!*How much money is currently in the wallet?""The number of blocks in our chain.##How many peers are we connected to?$*A blank string if we're not using a proxy.%8The difficulty multiplier for bitcoin mining operations.&JAre we on the test network (as opposed to the primary bitcoin network)?'0The timestamp of the oldest key in the key pool.(The size of the key pool.)2How much do we currently pay as a transaction fee?*NIf the wallet is unlocked, the number of seconds until a re-lock is needed.+IAny alerts will show up here. This should normally be an empty string.,0Returns an object containing various state info.-5Returns a new bitcoin address for receiving payments.If an account is specified (recommended), the new address is added to the address book so payments received with the address will be credited to the given account.If no account is specified, the address will be credited to the account whose name is the empty string. i.e. the default account..SReturns the current Bitcoin address for receiving payments to the given account./3Sets the account associated with the given address.06Returns the account associated with the given address.14Returns the list of addresses for the given address.2"Sends some bitcoins to an address.3Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions.42Sign a message with the private key of an address.5Verifies a signed message.6YReturns the total amount received by the given address with at least one confirmation.7jReturns the total amount received by the given address, with at least the give number of confirmations.8DReturns the total amount received by address with the given account.9Returns the total amount received by addresses with the given account, counting only transactions with the given minimum number of confirmations.:-Returns the server's total available balance.;gReturns the balance in the given account, counting only transactions with at least one confirmation.<xReturns the balance in the given account, counting only transactions with at least the given number of confirmations.=9Move bitcoins from one account in your wallet to another.FIf you want to send bitcoins to an address not in your wallet, use >.>ESends bitcoins from a given account in our wallet to a given address.<A transaction and sender comment may be optionally provided.?)Send to a whole bunch of address at once.@Lists the amount received by each address which has received money at some point, counting only transactions with at least one confirmation.AList the amount received by each of our addresses, counting only transactions with the given minimum number of confirmations.BLists the amount received by each account which has received money at some point, counting only transactions with at leaset one confirmation.CList the amount received by each of our accounts, counting only transactions with the given minimum number of confirmations.D6Gets all transactions in blocks since the given block.EZGets all transactions in blocks since the given block, or all transactions if ommited.F)Returns transactions from the blockchain.G)Returns transactions from the blockchain.H(List accounts and their current balance.JoSafely copies wallet.dat to the given destination, which can be either a directory, or a path with filename.KFills the keypool.LHStores the wallet decryption key in memory for the given amount of time.MChanges the wallet passphrase.NBRemoves the wallet encryption key from memory, locking the wallet.3After calling this function, you will need to call LT again before being able to call methods which require the wallet to be unlocked.qNote: In future releases, we might introduce an "unlocked" monad, so locking and unlocking is automatic.O.Encrypts the wallet with the given passphrase.dWARNING: bitcoind will shut down after calling this method. Don't say I didn't warn you.P)Checks if a given address is a valid one.|What a silly API.z}~      !"#$%&'()*+,-./012Who we're sending to.The amount to send.(An optional comment for the transaction.IAn optional comment-to (who did we sent this to?) for the transaction.34(The address whose private key we'll use.The message to sign.5#The address of the original signer.The message's signature. The message.Was the signature valid?67aThe minimum number of confirmations needed for a transaction to to count towards the total.89The account in question.[The minimum number of confirmations needed for a transaction to count towards the total.:;<[The minimum number of confirmations needed for a transaction to count towards the total.=From.To.The amount to transfer.(A comment to record for the transaction.>The account to send from.The address to send to.The amount to send. An optional transaction comment.1An optional comment on who the money is going to.?The account to send from..The address, and how much to send to each one. An optional transaction comment.@AgThe minimum number of confirmations before a transaction counts toward the total amount received.6Should we include addresses with no money received?BC]The minimum number of confirmations before a transaction counts toward the total received.9Should we include the accounts with no money received?D$The hash of the first block to list.OThe minimum number of confirmations before a transaction can be returned as  N. This does not in any way affect which transactions are returned (see Ahttps://github.com/bitcoin/bitcoin/pull/199#issuecomment-1514952)E$The hash of the first block to list.OThe minimum number of confirmations before a transaction can be returned as  N. This does not in any way affect which transactions are returned (see Ahttps://github.com/bitcoin/bitcoin/pull/199#issuecomment-1514952)F Limits the BlockTransaction, returned to those from or to the given .Limits the number of BlockTransaction returned.,Number of most recent transactions to skip. G Limits the BlockTransaction, returned to those from or to the given . If i, all accounts are included in the query.Limits the number of BlockTransaction returned. If i all transactions are returned.,Number of most recent transactions to skip. HYMinimum number of confirmations required before payments are included in the balance.IJKLThe decryption key.1How long to store the key in memory (in seconds).MThe old password.The new password.NOP|y      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPy !"#$%&'()*+,-.0/123456789:;<=>?@A   BCFGH  DEIJKLNMOP:z}~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP| None<  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP< KLM?@ABCDEFGHIJN9:;<=>OP2345678/01 !"#$%&'()*+,-.QRaSTUVWXYZ[\]^_`b~uvwxyz{|}nopqrstgmlkjihcdef !"#$%&'()*+,-.0/123456789:;<=>?@A   BCFGH  DEIJKLNMOP  !"##$%%&'()*+,-./00123456789:;<=>>?@@ABCDEFFGHIJKKLMNOPQRSTUVWXYZ[\]^^_`abcdefghijklmmnopqrstuvwwxyz{|}}~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNNOPQRSTUVWXYZ[\]^_`aIbcdefghijklmnopqrstIbuvtwxyz{|}~network-bitcoin-1.7.2Network.Bitcoin.InternalNetwork.Bitcoin.TypesNetwork.Bitcoin.DumpNetwork.Bitcoin.MiningNetwork.Bitcoin.NetNetwork.Bitcoin.RawTransactionNetwork.Bitcoin.BlockChainNetwork.Bitcoin.WalletDataFixed Data.VectoremptyNetwork.Bitcoin text-1.2.0.4Data.Text.InternalText aeson-0.8.0.2Data.Aeson.Types.Class parseJSONFromJSONvector-0.10.12.3VectorAccountAddressBTCSatoshi TransactionID HexStringBitcoinExceptionBitcoinResultTypeErrorBitcoinApiErrorClient AddrAddressAANilunNilBitcoinRpcResponse btcResultbtcError getClientcallApitjtjmtja PrivateKeyimportPrivateKeydumpPrivateKey BlockTemplate blockVersionpreviousBlockHashtransactionsToInclude coinBaseAux coinBaseValuebtTargetminTime nonceRange sigopLimit sizeLimitcurTimebtBitsbtHeight CoinBaseAuxcbFlags TransactiontxnDatatxnHashdependstxnFeesigOpsHashData blockDatahdTargethash1midstate MiningInfonBlockscurrentBlockSizecurrentBlockTransaction difficulty miningErrors isGeneratinggenerationProcessorLimithashesPerSecondpooledTransactionsminingOnTestNetwork getGenerate setGenerategetHashesPerSec getMiningInfogetWork solveBlockgetBlockTemplate submitBlockPeerInfo addressNameserviceslastSendlastRecv bytesSent bytesRecvconnectionTime peerVersionpeerSubversioninboundstartingHeightbanScoregetConnectionCount getPeerInfoRawSignedTransaction rawSignedhasCompleteSigSet WhoCanPaySingleOrAnyoneCanPaySingleNoneOrAnyoneCanPayNoneAllOrAnyoneCanPayAllDecodedRawTransactiondecRaw decTxnVersiondecTxnLockTimedecVindecVoutUnspentTransactionunspentTransactionIdoutIdxunspentAddressunspentScriptPubKey redeemScript unspentAmountusConfirmationsRawTransactionInforaw txnVersion txnLockTimevinvoutrawTxBlockHash rawBlockInfo BlockInfoUnconfirmedBlockConfirmedBlock confirmationscbTime blockTime ScriptSigsigAsmsigHex ScriptPubKeyStandardScriptPubKeysspkAsmsspkHex requiredSigssspkType sspkAddressesNonStandardScriptPubKeynspkAsmnspkHexTxOuttxoutVal scriptPubKey TxnOutputType TxnMultisig TxnScriptHash TxnPubKeyHash TxnPubKeyTxIntxInIdnumOut scriptSig txSequence TxCoinbase txCoinbaseRawTransactiongetRawTransactiongetRawTransactionInfo listUnspentcreateRawTransactiondecodeRawTransactionsignRawTransactionsendRawTransaction OutputInfo oiBestBlockoiConfirmationsoiAmountoiScriptPubKey oiVersion oiCoinBase OutputSetInfo osiBestBlocknumTransactionstransactionOutputsserializedSizeBlock blockHashblkConfirmationsblkSize blkHeight blkVersion merkleRootsubTransactionsblkTimeblkNonceblkBits blkDifficulty nextBlock prevBlock BlockHash getBlockCount getDifficultysetTransactionFeegetRawMemoryPool getBlockHashgetBlockgetOutputSetInfo getOutputInfoDetailedTransactionDetailsdtdReceivingAccount dtdAddress dtdCategory dtdAmountDetailedTransactiondtAmountdtFeedtConfirmationsdtTransactionIddtWalletConflictsdtTimedtTimeReceived dtCommentdtTo dtDetailsdtHexTransactionCategoryTCErrorUnexpectedTCMove TCReceive TCGenerate TCImmatureTCOrphanTCSendSimpleTransactionstReceivingAccount stAddress stCategorystFeestAmountstConfirmations stBlockHash stBlockIndex stBlockTimestTransactionIdstWalletConflictsstTimestTimeReceived stCommentstTostOtherAccount SinceBlockstrransactionssbLastBlockHashReceivedByAccount raccAccount raccAmountraccNumConfirmationsReceivedByAddress recvAddress recvAccount recvAmountrecvNumConfirmations Signature AddressInfo aiAddressaiAmount aiAccount BitcoindInfobitcoinVersionprotocolVersion walletVersionbalance numBlocksnumConnectionsproxygenerationDifficulty onTestNetwork keyPoolOldest keyPoolSizetransactionFeePaid unlockedUntilbitcoindErrorsgetBitcoindInfo getNewAddressgetAccountAddress setAccount getAccountgetAddressesByAccount sendToAddresslistAddressGroupings signMessage verifyMessagegetReceivedByAddressgetReceivedByAddress'getReceivedByAccountgetReceivedByAccount' getBalance getBalance' getBalance'' moveBitcoinssendFromAccountsendManylistReceivedByAddresslistReceivedByAddress'listReceivedByAccountlistReceivedByAccount'listSinceBlocklistSinceBlock'listTransactionslistTransactions' listAccountsgetTransaction backupWallet keyPoolRefill unlockWalletchangePassword lockWallet encryptWalletisAddressValidbase Data.Fixed resolution$fHasResolutionSatoshi$fExceptionBitcoinExceptionBitcoinRpcErrorNoError$fToJSONAddrAddress $fFromJSONNil$fFromJSONBitcoinRpcResponse$fFromJSONBitcoinRpcErrorStupidReturnValueSRVunStupid$fFromJSONStupidReturnValue$fFromJSONBlockTemplate$fFromJSONCoinBaseAux$fFromJSONTransaction$fToJSONHashData$fFromJSONHashData$fFromJSONMiningInfo$fFromJSONPeerInfoUnspentForSigningToJSONUFS Data.MaybeNothingtoString$fFromJSONRawSignedTransaction$fToJSONUnspentForSigning$fFromJSONDecodedRawTransaction$fToJSONUnspentTransaction$fFromJSONUnspentTransaction$fFromJSONRawTransactionInfo$fFromJSONBlockInfo$fFromJSONScriptSig$fFromJSONScriptPubKey$fFromJSONTxOut$fFromJSONTxnOutputType$fFromJSONTxIn$fFromJSONOutputInfo$fFromJSONOutputSetInfo$fFromJSONBlockIsValidMaybe$fFromJSONAddressInfogetValid$fFromJSONIsValid$$fFromJSONDetailedTransactionDetails$fFromJSONDetailedTransaction$fFromJSONTransactionCategory$fFromJSONSimpleTransaction$fFromJSONSinceBlock$fFromJSONReceivedByAccount$fFromJSONReceivedByAddress$fFromJSONBitcoindInfo