var searchIndex = {}; searchIndex["bitcoin"] = {"doc":"# Rust Bitcoin Library","items":[[0,"macros","bitcoin","# Macros",null,null],[0,"network","","# Network Support",null,null],[0,"constants","bitcoin::network","# Network constants",null,null],[4,"Network","bitcoin::network::constants","The cryptocurrency to act on",null,null],[13,"Bitcoin","","Classic Bitcoin",0,null],[13,"Testnet","","Bitcoin's testnet",0,null],[5,"magic","","Return the network magic bytes, which should be encoded little-endian\nat the start of every message",null,{"inputs":[{"name":"network"}],"output":{"name":"u32"}}],[17,"PROTOCOL_VERSION","","Version of the protocol as appearing in network message headers",null,null],[17,"SERVICES","","Bitfield of services provided by this node",null,null],[17,"USER_AGENT","","User agent as it appears in the version message",null,null],[11,"hash","","",0,null],[11,"clone","","",0,null],[11,"eq","","",0,null],[11,"fmt","","",0,null],[11,"fmt","","",0,null],[11,"deserialize","","",0,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"serialize","","",0,null],[11,"consensus_encode","","",0,null],[11,"consensus_decode","","",0,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[0,"encodable","bitcoin::network","# Consensus-encodable types",null,null],[3,"VarInt","bitcoin::network::encodable","A variable-length unsigned integer",null,null],[12,"0","","",1,null],[3,"CheckedData","","Data which must be preceded by a 4-byte checksum",null,null],[12,"0","","",2,null],[8,"ConsensusEncodable","","Data which can be encoded in a consensus-consistent way",null,null],[10,"consensus_encode","","Encode an object with a well-defined format",3,null],[8,"ConsensusDecodable","","Data which can be encoded in a consensus-consistent way",null,null],[10,"consensus_decode","","Decode an object with a well-defined format",4,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"fmt","","",1,null],[11,"clone","","",1,null],[11,"cmp","","",1,null],[11,"partial_cmp","","",1,null],[11,"lt","","",1,null],[11,"le","","",1,null],[11,"gt","","",1,null],[11,"ge","","",1,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"fmt","","",2,null],[11,"clone","","",2,null],[11,"eq","","",2,null],[11,"ne","","",2,null],[11,"consensus_encode","","",1,null],[11,"consensus_decode","","",1,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",2,null],[11,"consensus_decode","","",2,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[0,"socket","bitcoin::network","# Sockets",null,null],[3,"Socket","bitcoin::network::socket","A network socket along with information about the peer",null,null],[12,"services","","Services supported by us",5,null],[12,"user_agent","","Our user agent",5,null],[12,"version_nonce","","Nonce to identify our `version` messages",5,null],[12,"magic","","Network magic",5,null],[11,"clone","","",5,null],[11,"new","","Construct a new socket",5,{"inputs":[{"name":"network"}],"output":{"name":"socket"}}],[11,"connect","","(Re)connect to the peer",5,null],[11,"receiver_address","","Peer address",5,null],[11,"sender_address","","Our own address",5,null],[11,"version_message","","Produce a version message appropriate for this socket",5,null],[11,"send_message","","Send a general message across the line",5,null],[11,"receive_message","","Receive the next message from the peer, decoding the network header\nand verifying its correctness. Returns the undecoded payload.",5,null],[0,"serialize","bitcoin::network","# Network Serialization",null,null],[3,"RawEncoder","bitcoin::network::serialize","An encoder for raw binary data",null,null],[3,"RawDecoder","","An decoder for raw binary data",null,null],[5,"serialize","","Encode an object into a vector",null,{"inputs":[{"name":"t"}],"output":{"name":"result"}}],[5,"serialize_hex","","Encode an object into a hex-encoded string",null,{"inputs":[{"name":"t"}],"output":{"name":"result"}}],[5,"deserialize","","Deserialize an object from a vector",null,null],[8,"BitcoinHash","","Objects which are referred to by hash",null,null],[10,"bitcoin_hash","","Produces a Sha256dHash which can be used to refer to the object",6,null],[8,"SimpleEncoder","","A simple Encoder trait",null,null],[16,"Error","","An encoding error",7,null],[10,"emit_u64","","Output a 64-bit uint",7,null],[10,"emit_u32","","Output a 32-bit uint",7,null],[10,"emit_u16","","Output a 16-bit uint",7,null],[10,"emit_u8","","Output a 8-bit uint",7,null],[10,"emit_i64","","Output a 64-bit int",7,null],[10,"emit_i32","","Output a 32-bit int",7,null],[10,"emit_i16","","Output a 16-bit int",7,null],[10,"emit_i8","","Output a 8-bit int",7,null],[10,"emit_bool","","Output a boolean",7,null],[8,"SimpleDecoder","","A simple Decoder trait",null,null],[16,"Error","","A decoding error",8,null],[10,"read_u64","","Read a 64-bit uint",8,null],[10,"read_u32","","Read a 32-bit uint",8,null],[10,"read_u16","","Read a 16-bit uint",8,null],[10,"read_u8","","Read a 8-bit uint",8,null],[10,"read_i64","","Read a 64-bit int",8,null],[10,"read_i32","","Read a 32-bit int",8,null],[10,"read_i16","","Read a 16-bit int",8,null],[10,"read_i8","","Read a 8-bit int",8,null],[10,"read_bool","","Read a boolean",8,null],[10,"error","","Signal a decoding error",8,null],[11,"new","","Constructor",9,{"inputs":[{"name":"w"}],"output":{"name":"rawencoder"}}],[11,"into_inner","","Returns the underlying Writer",9,null],[11,"new","","Constructor",10,{"inputs":[{"name":"r"}],"output":{"name":"rawdecoder"}}],[11,"into_inner","","Returns the underlying Reader",10,null],[11,"emit_u64","","",9,null],[11,"emit_u32","","",9,null],[11,"emit_u16","","",9,null],[11,"emit_i64","","",9,null],[11,"emit_i32","","",9,null],[11,"emit_i16","","",9,null],[11,"emit_i8","","",9,null],[11,"emit_u8","","",9,null],[11,"emit_bool","","",9,null],[11,"read_u64","","",10,null],[11,"read_u32","","",10,null],[11,"read_u16","","",10,null],[11,"read_i64","","",10,null],[11,"read_i32","","",10,null],[11,"read_i16","","",10,null],[11,"read_u8","","",10,null],[11,"read_i8","","",10,null],[11,"read_bool","","",10,null],[11,"error","","",10,null],[0,"address","bitcoin::network","# Bitcoin network addresses",null,null],[3,"Address","bitcoin::network::address","A message which can be sent on the Bitcoin network",null,null],[12,"services","","Services provided by the peer whose address this is",11,null],[12,"address","","Network byte-order ipv6 address, or ipv4-mapped ipv6 address",11,null],[12,"port","","Network port",11,null],[11,"consensus_encode","","",11,null],[11,"consensus_decode","","",11,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"fmt","","",11,null],[11,"clone","","",11,null],[11,"eq","","",11,null],[0,"listener","bitcoin::network","# Abstract Bitcoin listener",null,null],[8,"Listener","bitcoin::network::listener","A message which can be sent on the Bitcoin network",null,null],[10,"peer","","Return a string encoding of the peer's network address",12,null],[10,"port","","Return the port we have connected to the peer on",12,null],[10,"network","","Return the network this `Listener` is operating on",12,null],[11,"start","","Main listen loop",12,null],[0,"message","bitcoin::network","# Network message",null,null],[3,"CommandString","bitcoin::network::message","Serializer for command string",null,null],[12,"0","","",13,null],[3,"RawNetworkMessage","","A Network message",null,null],[12,"magic","","Magic bytes to identify the network these messages are meant for",14,null],[12,"payload","","The actual message data",14,null],[4,"SocketResponse","","A response from the peer-connected socket",null,null],[13,"MessageReceived","","A message was received",15,null],[13,"ConnectionFailed","","An error occured and the socket needs to close",15,null],[4,"NetworkMessage","","A Network message payload. Proper documentation is available on the Bitcoin\nwiki https://en.bitcoin.it/wiki/Protocol_specification",null,null],[13,"Version","","`version`",16,null],[13,"Verack","","`verack`",16,null],[13,"Addr","","`addr`",16,null],[13,"Inv","","`inv`",16,null],[13,"GetData","","`getdata`",16,null],[13,"NotFound","","`notfound`",16,null],[13,"GetBlocks","","`getblocks`",16,null],[13,"GetHeaders","","`getheaders`",16,null],[13,"MemPool","","`mempool`",16,null],[13,"Tx","","tx",16,null],[13,"Block","","`block`",16,null],[13,"Headers","","`headers`",16,null],[13,"Ping","","`ping`",16,null],[13,"Pong","","`pong`",16,null],[11,"fmt","","",13,null],[11,"clone","","",13,null],[11,"eq","","",13,null],[11,"ne","","",13,null],[11,"consensus_encode","","",13,null],[11,"consensus_decode","","",13,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"fmt","","",16,null],[11,"eq","","",16,null],[11,"ne","","",16,null],[11,"clone","","",16,null],[11,"consensus_encode","","",14,null],[11,"consensus_decode","","",14,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[0,"message_blockdata","bitcoin::network","# Blockdata network messages",null,null],[3,"GetBlocksMessage","bitcoin::network::message_blockdata","The `getblocks` message",null,null],[12,"version","","The protocol version",17,null],[12,"locator_hashes","","Locator hashes --- ordered newest to oldest. The remote peer will\nreply with its longest known chain, starting from a locator hash\nif possible and block 1 otherwise.",17,null],[12,"stop_hash","","References the block to stop at, or zero to just fetch the maximum 500 blocks",17,null],[3,"GetHeadersMessage","","The `getheaders` message",null,null],[12,"version","","The protocol version",18,null],[12,"locator_hashes","","Locator hashes --- ordered newest to oldest. The remote peer will\nreply with its longest known chain, starting from a locator hash\nif possible and block 1 otherwise.",18,null],[12,"stop_hash","","References the header to stop at, or zero to just fetch the maximum 2000 headers",18,null],[3,"Inventory","","An inventory object --- a reference to a Bitcoin object",null,null],[12,"inv_type","","The type of object that is referenced",19,null],[12,"hash","","The object's hash",19,null],[4,"InvType","","The type of an inventory object",null,null],[13,"Error","","Error --- these inventories can be ignored",20,null],[13,"Transaction","","Transaction",20,null],[13,"Block","","Block",20,null],[11,"fmt","","",20,null],[11,"clone","","",20,null],[11,"eq","","",20,null],[11,"fmt","","",17,null],[11,"clone","","",17,null],[11,"eq","","",17,null],[11,"ne","","",17,null],[11,"fmt","","",18,null],[11,"clone","","",18,null],[11,"eq","","",18,null],[11,"ne","","",18,null],[11,"fmt","","",19,null],[11,"clone","","",19,null],[11,"eq","","",19,null],[11,"ne","","",19,null],[11,"new","","Construct a new `getblocks` message",17,{"inputs":[{"name":"vec"},{"name":"sha256dhash"}],"output":{"name":"getblocksmessage"}}],[11,"consensus_encode","","",17,null],[11,"consensus_decode","","",17,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"new","","Construct a new `getheaders` message",18,{"inputs":[{"name":"vec"},{"name":"sha256dhash"}],"output":{"name":"getheadersmessage"}}],[11,"consensus_encode","","",18,null],[11,"consensus_decode","","",18,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",19,null],[11,"consensus_decode","","",19,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[0,"message_network","bitcoin::network","# Network-related network messages",null,null],[3,"VersionMessage","bitcoin::network::message_network","Some simple messages\nThe `version` message",null,null],[12,"version","","The P2P network protocol version",21,null],[12,"services","","A bitmask describing the services supported by this node",21,null],[12,"timestamp","","The time at which the `version` message was sent",21,null],[12,"receiver","","The network address of the peer receiving the message",21,null],[12,"sender","","The network address of the peer sending the message",21,null],[12,"nonce","","A random nonce used to detect loops in the network",21,null],[12,"user_agent","","A string describing the peer's software",21,null],[12,"start_height","","The height of the maxmimum-work blockchain that the peer is aware of",21,null],[12,"relay","","Whether the receiving peer should relay messages to the sender; used\nif the sender is bandwidth-limited and would like to support bloom\nfiltering. Defaults to true.",21,null],[11,"fmt","","",21,null],[11,"clone","","",21,null],[11,"eq","","",21,null],[11,"ne","","",21,null],[11,"new","","Constructs a new `version` message",21,{"inputs":[{"name":"i64"},{"name":"socket"},{"name":"u64"},{"name":"i32"}],"output":{"name":"result"}}],[11,"consensus_encode","","",21,null],[11,"consensus_decode","","",21,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[0,"blockdata","bitcoin","# Blockdata",null,null],[0,"constants","bitcoin::blockdata","# Blockdata constants",null,null],[5,"max_target","bitcoin::blockdata::constants","In Bitcoind this is insanely described as ~((u256)0 >> 32)",null,{"inputs":[{"name":"network"}],"output":{"name":"uint256"}}],[5,"max_money","","The maximum value allowed in an output (useful for sanity checking,\nsince keeping everything below this value should prevent overflows\nif you are doing anything remotely sane with monetary values).",null,{"inputs":[{"name":"network"}],"output":{"name":"u64"}}],[5,"genesis_block","","Constructs and returns the genesis block",null,{"inputs":[{"name":"network"}],"output":{"name":"block"}}],[7,"MAX_SEQUENCE","","The maximum allowable sequence number",null,null],[7,"COIN_VALUE","","How many satoshis are in "one bitcoin"",null,null],[7,"TARGET_BLOCK_SPACING","","How many seconds between blocks we expect on average",null,null],[7,"DIFFCHANGE_INTERVAL","","How many blocks between diffchanges",null,null],[7,"DIFFCHANGE_TIMESPAN","","How much time on average should occur between diffchanges",null,null],[0,"opcodes","bitcoin::blockdata","# Opcodes",null,null],[4,"All","bitcoin::blockdata::opcodes","A script Opcode",null,null],[13,"OP_PUSHBYTES_0","","Push an empty array onto the stack",22,null],[13,"OP_PUSHBYTES_1","","Push the next byte as an array onto the stack",22,null],[13,"OP_PUSHBYTES_2","","Push the next 2 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_3","","Push the next 2 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_4","","Push the next 4 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_5","","Push the next 5 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_6","","Push the next 6 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_7","","Push the next 7 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_8","","Push the next 8 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_9","","Push the next 9 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_10","","Push the next 10 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_11","","Push the next 11 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_12","","Push the next 12 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_13","","Push the next 13 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_14","","Push the next 14 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_15","","Push the next 15 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_16","","Push the next 16 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_17","","Push the next 17 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_18","","Push the next 18 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_19","","Push the next 19 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_20","","Push the next 20 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_21","","Push the next 21 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_22","","Push the next 22 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_23","","Push the next 23 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_24","","Push the next 24 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_25","","Push the next 25 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_26","","Push the next 26 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_27","","Push the next 27 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_28","","Push the next 28 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_29","","Push the next 29 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_30","","Push the next 30 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_31","","Push the next 31 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_32","","Push the next 32 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_33","","Push the next 33 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_34","","Push the next 34 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_35","","Push the next 35 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_36","","Push the next 36 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_37","","Push the next 37 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_38","","Push the next 38 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_39","","Push the next 39 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_40","","Push the next 40 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_41","","Push the next 41 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_42","","Push the next 42 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_43","","Push the next 43 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_44","","Push the next 44 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_45","","Push the next 45 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_46","","Push the next 46 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_47","","Push the next 47 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_48","","Push the next 48 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_49","","Push the next 49 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_50","","Push the next 50 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_51","","Push the next 51 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_52","","Push the next 52 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_53","","Push the next 53 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_54","","Push the next 54 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_55","","Push the next 55 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_56","","Push the next 56 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_57","","Push the next 57 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_58","","Push the next 58 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_59","","Push the next 59 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_60","","Push the next 60 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_61","","Push the next 61 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_62","","Push the next 62 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_63","","Push the next 63 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_64","","Push the next 64 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_65","","Push the next 65 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_66","","Push the next 66 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_67","","Push the next 67 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_68","","Push the next 68 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_69","","Push the next 69 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_70","","Push the next 70 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_71","","Push the next 71 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_72","","Push the next 72 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_73","","Push the next 73 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_74","","Push the next 74 bytes as an array onto the stack",22,null],[13,"OP_PUSHBYTES_75","","Push the next 75 bytes as an array onto the stack",22,null],[13,"OP_PUSHDATA1","","Read the next byte as N; push the next N bytes as an array onto the stack",22,null],[13,"OP_PUSHDATA2","","Read the next 2 bytes as N; push the next N bytes as an array onto the stack",22,null],[13,"OP_PUSHDATA4","","Read the next 4 bytes as N; push the next N bytes as an array onto the stack",22,null],[13,"OP_PUSHNUM_NEG1","","Push the array [0x80] onto the stack",22,null],[13,"OP_RESERVED","","Synonym for OP_RETURN",22,null],[13,"OP_PUSHNUM_1","","Push the array [0x01] onto the stack",22,null],[13,"OP_PUSHNUM_2","","Push the array [0x02] onto the stack",22,null],[13,"OP_PUSHNUM_3","","Push the array [0x03] onto the stack",22,null],[13,"OP_PUSHNUM_4","","Push the array [0x04] onto the stack",22,null],[13,"OP_PUSHNUM_5","","Push the array [0x05] onto the stack",22,null],[13,"OP_PUSHNUM_6","","Push the array [0x06] onto the stack",22,null],[13,"OP_PUSHNUM_7","","Push the array [0x07] onto the stack",22,null],[13,"OP_PUSHNUM_8","","Push the array [0x08] onto the stack",22,null],[13,"OP_PUSHNUM_9","","Push the array [0x09] onto the stack",22,null],[13,"OP_PUSHNUM_10","","Push the array [0x0a] onto the stack",22,null],[13,"OP_PUSHNUM_11","","Push the array [0x0b] onto the stack",22,null],[13,"OP_PUSHNUM_12","","Push the array [0x0c] onto the stack",22,null],[13,"OP_PUSHNUM_13","","Push the array [0x0d] onto the stack",22,null],[13,"OP_PUSHNUM_14","","Push the array [0x0e] onto the stack",22,null],[13,"OP_PUSHNUM_15","","Push the array [0x0f] onto the stack",22,null],[13,"OP_PUSHNUM_16","","Push the array [0x10] onto the stack",22,null],[13,"OP_NOP","","Does nothing",22,null],[13,"OP_VER","","Synonym for OP_RETURN",22,null],[13,"OP_IF","","Pop and execute the next statements if a nonzero element was popped",22,null],[13,"OP_NOTIF","","Pop and execute the next statements if a zero element was popped",22,null],[13,"OP_VERIF","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_VERNOTIF","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_ELSE","","Execute statements if those after the previous OP_IF were not, and vice-versa.\nIf there is no previous OP_IF, this acts as a RETURN.",22,null],[13,"OP_ENDIF","","Pop and execute the next statements if a zero element was popped",22,null],[13,"OP_VERIFY","","If the top value is zero or the stack is empty, fail; otherwise, pop the stack",22,null],[13,"OP_RETURN","","Fail the script immediately. (Must be executed.)",22,null],[13,"OP_TOALTSTACK","","Pop one element from the main stack onto the alt stack",22,null],[13,"OP_FROMALTSTACK","","Pop one element from the alt stack onto the main stack",22,null],[13,"OP_2DROP","","Drops the top two stack items",22,null],[13,"OP_2DUP","","Duplicates the top two stack items as AB -> ABAB",22,null],[13,"OP_3DUP","","Duplicates the two three stack items as ABC -> ABCABC",22,null],[13,"OP_2OVER","","Copies the two stack items of items two spaces back to\nthe front, as xxAB -> ABxxAB",22,null],[13,"OP_2ROT","","Moves the two stack items four spaces back to the front,\nas xxxxAB -> ABxxxx",22,null],[13,"OP_2SWAP","","Swaps the top two pairs, as ABCD -> CDAB",22,null],[13,"OP_IFDUP","","Duplicate the top stack element unless it is zero",22,null],[13,"OP_DEPTH","","Push the current number of stack items onto te stack",22,null],[13,"OP_DROP","","Drops the top stack item",22,null],[13,"OP_DUP","","Duplicates the top stack item",22,null],[13,"OP_NIP","","Drops the second-to-top stack item",22,null],[13,"OP_OVER","","Copies the second-to-top stack item, as xA -> AxA",22,null],[13,"OP_PICK","","Pop the top stack element as N. Copy the Nth stack element to the top",22,null],[13,"OP_ROLL","","Pop the top stack element as N. Move the Nth stack element to the top",22,null],[13,"OP_ROT","","Rotate the top three stack items, as [top next1 next2] -> [next2 top next1]",22,null],[13,"OP_SWAP","","Swap the top two stack items",22,null],[13,"OP_TUCK","","Copy the top stack item to before the second item, as [top next] -> [top next top]",22,null],[13,"OP_CAT","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_SUBSTR","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_LEFT","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_RIGHT","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_SIZE","","Pushes the length of the top stack item onto the stack",22,null],[13,"OP_INVERT","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_AND","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_OR","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_XOR","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_EQUAL","","Pushes 1 if the inputs are exactly equal, 0 otherwise",22,null],[13,"OP_EQUALVERIFY","","Returns success if the inputs are exactly equal, failure otherwise",22,null],[13,"OP_RESERVED1","","Synonym for OP_RETURN",22,null],[13,"OP_RESERVED2","","Synonym for OP_RETURN",22,null],[13,"OP_1ADD","","Increment the top stack element in place",22,null],[13,"OP_1SUB","","Decrement the top stack element in place",22,null],[13,"OP_2MUL","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_2DIV","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_NEGATE","","Multiply the top stack item by -1 in place",22,null],[13,"OP_ABS","","Absolute value the top stack item in place",22,null],[13,"OP_NOT","","Map 0 to 1 and everything else to 0, in place",22,null],[13,"OP_0NOTEQUAL","","Map 0 to 0 and everything else to 1, in place",22,null],[13,"OP_ADD","","Pop two stack items and push their sum",22,null],[13,"OP_SUB","","Pop two stack items and push the second minus the top",22,null],[13,"OP_MUL","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_DIV","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_MOD","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_LSHIFT","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_RSHIFT","","Fail the script unconditionally, does not even need to be executed",22,null],[13,"OP_BOOLAND","","Pop the top two stack items and push 1 if both are nonzero, else push 0",22,null],[13,"OP_BOOLOR","","Pop the top two stack items and push 1 if either is nonzero, else push 0",22,null],[13,"OP_NUMEQUAL","","Pop the top two stack items and push 1 if both are numerically equal, else push 0",22,null],[13,"OP_NUMEQUALVERIFY","","Pop the top two stack items and return success if both are numerically equal, else return failure",22,null],[13,"OP_NUMNOTEQUAL","","Pop the top two stack items and push 0 if both are numerically equal, else push 1",22,null],[13,"OP_LESSTHAN","","Pop the top two items; push 1 if the second is less than the top, 0 otherwise",22,null],[13,"OP_GREATERTHAN","","Pop the top two items; push 1 if the second is greater than the top, 0 otherwise",22,null],[13,"OP_LESSTHANOREQUAL","","Pop the top two items; push 1 if the second is <= the top, 0 otherwise",22,null],[13,"OP_GREATERTHANOREQUAL","","Pop the top two items; push 1 if the second is >= the top, 0 otherwise",22,null],[13,"OP_MIN","","Pop the top two items; push the smaller",22,null],[13,"OP_MAX","","Pop the top two items; push the larger",22,null],[13,"OP_WITHIN","","Pop the top three items; if the top is >= the second and < the third, push 1, otherwise push 0",22,null],[13,"OP_RIPEMD160","","Pop the top stack item and push its RIPEMD160 hash",22,null],[13,"OP_SHA1","","Pop the top stack item and push its SHA1 hash",22,null],[13,"OP_SHA256","","Pop the top stack item and push its SHA256 hash",22,null],[13,"OP_HASH160","","Pop the top stack item and push its RIPEMD(SHA256) hash",22,null],[13,"OP_HASH256","","Pop the top stack item and push its SHA256(SHA256) hash",22,null],[13,"OP_CODESEPARATOR","","Ignore this and everything preceding when deciding what to sign when signature-checking",22,null],[13,"OP_CHECKSIG","","https://en.bitcoin.it/wiki/OP_CHECKSIG pushing 1/0 for success/failure",22,null],[13,"OP_CHECKSIGVERIFY","","https://en.bitcoin.it/wiki/OP_CHECKSIG returning success/failure",22,null],[13,"OP_CHECKMULTISIG","","Pop N, N pubkeys, M, M signatures, a dummy (due to bug in reference code), and verify that all M signatures are valid.\nPush 1 for "all valid", 0 otherwise",22,null],[13,"OP_CHECKMULTISIGVERIFY","","Like the above but return success/failure",22,null],[13,"OP_NOP1","","Does nothing",22,null],[13,"OP_NOP2","","Does nothing",22,null],[13,"OP_NOP3","","Does nothing",22,null],[13,"OP_NOP4","","Does nothing",22,null],[13,"OP_NOP5","","Does nothing",22,null],[13,"OP_NOP6","","Does nothing",22,null],[13,"OP_NOP7","","Does nothing",22,null],[13,"OP_NOP8","","Does nothing",22,null],[13,"OP_NOP9","","Does nothing",22,null],[13,"OP_NOP10","","Does nothing",22,null],[13,"OP_RETURN_186","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_187","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_188","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_189","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_190","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_191","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_192","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_193","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_194","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_195","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_196","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_197","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_198","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_199","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_200","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_201","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_202","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_203","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_204","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_205","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_206","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_207","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_208","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_209","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_210","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_211","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_212","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_213","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_214","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_215","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_216","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_217","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_218","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_219","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_220","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_221","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_222","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_223","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_224","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_225","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_226","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_227","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_228","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_229","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_230","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_231","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_232","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_233","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_234","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_235","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_236","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_237","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_238","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_239","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_240","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_241","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_242","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_243","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_244","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_245","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_246","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_247","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_248","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_249","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_250","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_251","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_252","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_253","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_254","","Synonym for OP_RETURN",22,null],[13,"OP_RETURN_255","","Synonym for OP_RETURN",22,null],[4,"Class","","Broad categories of opcodes with similar behavior",null,null],[13,"PushNum","","Pushes the given number onto the stack",23,null],[13,"PushBytes","","Pushes the given number of bytes onto the stack",23,null],[13,"ReturnOp","","Fails the script if executed",23,null],[13,"IllegalOp","","Fails the script even if not executed",23,null],[13,"NoOp","","Does nothing",23,null],[13,"Ordinary","","Any opcode not covered above",23,null],[7,"OP_FALSE","","Empty stack is also FALSE",null,null],[7,"OP_TRUE","","Number 1 is also TRUE",null,null],[11,"fmt","","",22,null],[11,"eq","","",22,null],[11,"clone","","",22,null],[11,"classify","","Classifies an Opcode into a broad class",22,null],[11,"from","","",22,{"inputs":[{"name":"u8"}],"output":{"name":"all"}}],[11,"fmt","","",22,null],[11,"consensus_decode","","",22,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",22,null],[11,"serialize","","",22,null],[11,"fmt","","",23,null],[11,"eq","","",23,null],[11,"ne","","",23,null],[11,"clone","","",23,null],[11,"fmt","","",23,null],[11,"serialize","","",23,null],[0,"script","bitcoin::blockdata","# Script",null,null],[3,"Script","bitcoin::blockdata::script","A Bitcoin script",null,null],[3,"Builder","","An object which can be used to construct a script piece by piece",null,null],[3,"Validator","","A rule for validating an abstract stack element",null,null],[3,"AbstractStackElem","","An abstract element on the stack, used to describe a satisfying\nscript input",null,null],[3,"AbstractStack","","The stack used by the script satisfier",null,null],[3,"TraceIteration","","A single iteration of a script execution",null,null],[3,"ScriptTrace","","A full trace of a script execution",null,null],[12,"script","","A copy of the script",24,null],[12,"initial_stack","","A copy of the script's initial stack, hex-encoded",24,null],[12,"iterations","","A list of iterations",24,null],[12,"error","","An error if one was returned, or None",24,null],[3,"Instructions","","Iterator over a script returning parsed opcodes",null,null],[4,"Error","","Ways that a script might fail. Not everything is split up as\nmuch as it could be; patches welcome if more detailed errors\nwould help you.",null,null],[13,"AnalyzeNeitherBoolWorks","","Tried to set a boolean to both values, but neither worked",25,null],[13,"AnalyzeSetBoolMismatch","","Tried to set a boolean to the given value, but it already\nhad the other value",25,null],[13,"AnalyzeValidateFailed","","Validation of an element failed",25,null],[13,"BadPublicKey","","OP_CHECKSIG was called with a bad public key",25,null],[13,"BadSignature","","OP_CHECKSIG was called with a bad signature",25,null],[13,"Ecdsa","","An ECDSA error",25,null],[13,"ElseWithoutIf","","An OP_ELSE happened while not in an OP_IF tree",25,null],[13,"EndifWithoutIf","","An OP_ENDIF happened while not in an OP_IF tree",25,null],[13,"EqualVerifyFailed","","An OP_EQUALVERIFY failed (expected, gotten)",25,null],[13,"IfEmptyStack","","An OP_IF happened with an empty stack",25,null],[13,"IllegalOpcode","","An illegal opcode appeared in the script (does not need to be executed)",25,null],[13,"InterpreterStackOverflow","","The interpreter overflowed its stack. This never happens for\nscript evaluation, only non-consensus analysis passes.",25,null],[13,"EarlyEndOfScript","","Some opcode expected a parameter, but it was missing or truncated",25,null],[13,"ExecutedReturn","","An OP_RETURN or synonym was executed",25,null],[13,"MultisigBadKeyCount","","A multisig tx with negative or too many keys",25,null],[13,"MultisigBadSigCount","","A multisig tx with negative or too many signatures",25,null],[13,"NegativePick","","Used OP_PICK with a negative index",25,null],[13,"NegativeRoll","","Used OP_ROLL with a negative index",25,null],[13,"NoTransaction","","Tried to execute a signature operation but no transaction context was provided",25,null],[13,"NumEqualVerifyFailed","","An OP_NUMEQUALVERIFY failed (expected, gotten)",25,null],[13,"NumericOverflow","","Tried to read an array off the stack as a number when it was more than 4 bytes",25,null],[13,"PopEmptyStack","","Some stack operation was done with an empty stack",25,null],[13,"Unanalyzable","","Analysis was unable to determine script input",25,null],[13,"Unsatisfiable","","Analysis showed script cannot be satisfied",25,null],[13,"VerifyEmptyStack","","An OP_VERIFY happened with an empty stack",25,null],[13,"VerifyFailed","","An OP_VERIFY happened with zero on the stack",25,null],[4,"SigHashType","","Hashtype of a transaction, encoded in the last byte of a signature,\nspecifically in the last 5 bits `byte & 31`",null,null],[13,"All","","0x1: Sign all outputs",26,null],[13,"None","","0x2: Sign no outputs --- anyone can choose the destination",26,null],[13,"Single","","0x3: Sign the output whose index matches this input's index. If none exists,\nsign the hash `0000000000000000000000000000000000000000000000000000000000000001`.\n(This rule is probably an unintentional C++ism, but it's consensus so we have\nto follow it.)",26,null],[13,"Unknown","","???: Anything else is a non-canonical synonym for SigHashAll, for example\nzero appears a few times in the chain",26,null],[4,"MaybeOwned","","A structure that can hold either a slice or vector, as necessary",null,null],[13,"Owned","","Freshly llocated memory",27,null],[13,"Borrowed","","Pointer into the original script",27,null],[4,"Instruction","","A "parsed opcode" which allows iterating over a Script in a more sensible way",null,null],[13,"PushBytes","","Push a bunch of data",28,null],[13,"Op","","Some non-push opcode",28,null],[13,"Error","","An opcode we were unable to parse",28,null],[5,"read_scriptint","","Helper to decode an integer in script format\nNotice that this fails on overflow: the result is the same as in\nbitcoind, that only 4-byte signed-magnitude values may be read as\nnumbers. They can be added or subtracted (and a long time ago,\nmultiplied and divided), and this may result in numbers which\ncan't be written out in 4 bytes or less. This is ok! The number\njust can't be read as a number again.\nThis is a bit crazy and subtle, but it makes sense: you can load\n32-bit numbers and do anything with them, which back when mult/div\nwas allowed, could result in up to a 64-bit number. We don't want\noverflow since that's suprising --- and we don't want numbers that\ndon't fit in 64 bits (for efficiency on modern processors) so we\nsimply say, anything in excess of 32 bits is no longer a number.\nThis is basically a ranged type implementation.",null,null],[5,"read_scriptbool","","This is like "read_scriptint then map 0 to false and everything\nelse as true", except that the overflow rules don't apply.",null,null],[5,"read_uint","","Read a script-encoded unsigned integer",null,null],[11,"hash","","",29,null],[11,"eq","","",29,null],[11,"ne","","",29,null],[11,"clone","","",29,null],[11,"fmt","","",29,null],[11,"fmt","","",29,null],[11,"fmt","","",29,null],[11,"fmt","","",29,null],[11,"clone","","",30,null],[11,"fmt","","",30,null],[11,"eq","","",30,null],[11,"ne","","",30,null],[11,"fmt","","",30,null],[11,"clone","","",25,null],[11,"fmt","","",25,null],[11,"eq","","",25,null],[11,"ne","","",25,null],[11,"fmt","","",25,null],[11,"cause","","",25,null],[11,"description","","",25,null],[11,"clone","","",31,null],[11,"clone","","",32,null],[11,"new_num","","Create a new exact integer",32,{"inputs":[{"name":"i64"}],"output":{"name":"abstractstackelem"}}],[11,"new_bool","","Create a new exact boolean",32,{"inputs":[{"name":"bool"}],"output":{"name":"abstractstackelem"}}],[11,"new_raw","","Create a new exact data",32,null],[11,"new_unknown","","Create a new unknown element",32,{"inputs":[],"output":{"name":"abstractstackelem"}}],[11,"bool_value","","Retrieve the boolean value of the stack element, if it can be determined",32,null],[11,"raw_value","","Retrieves the raw value of the stack element, if it can be determined",32,null],[11,"num_hi","","Retrieve the upper bound for this element's numeric value.\nThis can always be determined since there is a fixed upper\nbound for all numbers.",32,null],[11,"num_lo","","Retrieve the lower bound for this element's numeric value.\nThis can always be determined since there is a fixed lower\nbound for all numbers.",32,null],[11,"len_hi","","Retrieve the upper bound for this element's length. This always\nexists as a finite value, though the default upper limit is some\nimpractically large number",32,null],[11,"len_lo","","Retrieve the lower bound for this element's length. This always\nexists since it is at least zero :)",32,null],[11,"num_value","","Retries the element's numeric value, if it can be determined",32,null],[11,"set_bool_value","","Sets the boolean value",32,null],[11,"set_num_value","","Sets the numeric value",32,null],[11,"set_value","","Sets the entire value of the",32,null],[11,"set_numeric","","Sets a number to be numerically parseable",32,null],[11,"may_be_numeric","","Whether an element could possibly be a number",32,null],[11,"may_be_signature","","Whether an element could possibly be a signature",32,null],[11,"may_be_pubkey","","Whether an element could possibly be a pubkey",32,null],[11,"may_be_lt","","Whether an element could possibly be less than another",32,null],[11,"may_be_gt","","Whether an element could possibly be greater than another",32,null],[11,"may_be_lteq","","Whether an element could possibly be less than or equal to another",32,null],[11,"may_be_gteq","","Whether an element could possibly be greater than or equal to another",32,null],[11,"may_be_hash160","","Whether an element could possibly be a 20-byte hash",32,null],[11,"may_be_hash256","","Whether an element could possibly be a 32-byte hash",32,null],[11,"set_boolean","","Sets a number to be an opcode-pushed boolean",32,null],[11,"set_num_lo","","Sets a numeric lower bound on a value",32,null],[11,"set_num_hi","","Sets a numeric upper bound on a value",32,null],[11,"set_len_lo","","Sets a lower length bound on a value",32,null],[11,"set_len_hi","","Sets a upper length bound on a value",32,null],[11,"add_validator","","Adds some condition on the element",32,null],[11,"clone","","",33,null],[11,"new","","Construct a new empty abstract stack",33,{"inputs":[],"output":{"name":"abstractstack"}}],[11,"build_initial_stack","","Construct the initial stack in the end",33,null],[11,"require_n_elems","","Increase the stack size to `n`, adding elements to the initial\nstack as necessary",33,null],[11,"push","","Push a copy of an existing element by index",33,null],[11,"push_alloc","","Push a new element",33,null],[11,"peek_mut","","Obtain a mutable element to the top stack element",33,null],[11,"peek_index","","Obtain a stackref to the current top element",33,null],[11,"top_to_altstack","","Move the top stack item to the altstack",33,null],[11,"top_from_altstack","","Move the top altstack item to the stack, failing if the\naltstack is empty. (Note that input scripts pass their\nstack to the output script but /not/ the altstack, so\nthere is no input that can make an empty altstack nonempty.)",33,null],[11,"index","","",33,null],[11,"index","","",33,null],[11,"index","","",33,null],[11,"index","","",33,null],[11,"index","","",33,null],[11,"index_mut","","",33,null],[11,"index_mut","","",33,null],[11,"index_mut","","",33,null],[11,"index_mut","","",33,null],[11,"index_mut","","",33,null],[11,"serialize","","",25,null],[11,"clone","","",34,null],[11,"fmt","","",34,null],[11,"eq","","",34,null],[11,"ne","","",34,null],[11,"clone","","",24,null],[11,"fmt","","",24,null],[11,"eq","","",24,null],[11,"ne","","",24,null],[11,"clone","","",26,null],[11,"fmt","","",26,null],[11,"eq","","",26,null],[11,"fmt","","",27,null],[11,"clone","","",27,null],[11,"eq","","",27,null],[11,"index","","",27,null],[11,"index","","",27,null],[11,"index","","",27,null],[11,"index","","",27,null],[11,"index","","",27,null],[11,"new","","Creates a new empty script",29,{"inputs":[],"output":{"name":"script"}}],[11,"len","","The length in bytes of the script",29,null],[11,"is_empty","","Whether the script is the empty script",29,null],[11,"into_vec","","Convert the script into a byte vector",29,null],[11,"trace","","Trace a script",29,null],[11,"evaluate","","Evaluate the script, modifying the stack in place",29,null],[11,"is_p2sh","","Checks whether a script pubkey is a p2sh output",29,null],[11,"is_provably_unspendable","","Whether a script can be proven to have no satisfying input",29,null],[11,"satisfy","","Evaluate the script to determine whether any possible input will cause it\nto accept. Returns true if it is guaranteed to fail; false otherwise.",29,null],[11,"default","","",29,{"inputs":[],"output":{"name":"script"}}],[11,"from","","",29,{"inputs":[{"name":"vec"}],"output":{"name":"script"}}],[11,"index","","",29,null],[11,"index","","",29,null],[11,"index","","",29,null],[11,"index","","",29,null],[11,"clone","","",28,null],[11,"eq","","",28,null],[11,"ne","","",28,null],[11,"fmt","","",28,null],[11,"next","","",35,null],[11,"new","","Creates a new empty script",30,{"inputs":[],"output":{"name":"builder"}}],[11,"len","","The length in bytes of the script",30,null],[11,"is_empty","","Whether the script is the empty script",30,null],[11,"push_int","","Adds instructions to push an integer onto the stack. Integers are\nencoded as little-endian signed-magnitude numbers, but there are\ndedicated opcodes to push some small integers.",30,null],[11,"push_scriptint","","Adds instructions to push an integer onto the stack, using the explicit\nencoding regardless of the availability of dedicated opcodes.",30,null],[11,"push_slice","","Adds instructions to push some arbitrary data onto the stack",30,null],[11,"push_opcode","","Adds a single opcode to the script",30,null],[11,"into_script","","Converts the `Builder` into an unmodifiable `Script`",30,null],[11,"default","","",30,{"inputs":[],"output":{"name":"builder"}}],[11,"from","","",30,{"inputs":[{"name":"vec"}],"output":{"name":"builder"}}],[11,"index","","",30,null],[11,"index","","",30,null],[11,"index","","",30,null],[11,"index","","",30,null],[11,"serialize","","",29,null],[11,"deserialize","","",29,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",29,null],[11,"consensus_decode","","",29,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[0,"transaction","bitcoin::blockdata","# Bitcoin Transaction",null,null],[3,"TxOutRef","bitcoin::blockdata::transaction","A reference to a transaction output",null,null],[12,"txid","","The referenced transaction's txid",36,null],[12,"index","","The index of the referenced output in its transaction's vout",36,null],[3,"TxIn","","A transaction input, which defines old coins to be consumed",null,null],[12,"prev_hash","","The hash of the transaction whose output is being used an an input",37,null],[12,"prev_index","","The index of the output in the previous transaction, which may have several",37,null],[12,"script_sig","","The script which pushes values on the stack which will cause\nthe referenced output's script to accept",37,null],[12,"sequence","","The sequence number, which suggests to miners which of two\nconflicting transactions should be preferred, or 0xFFFFFFFF\nto ignore this feature. This is generally never used since\nthe miner behaviour cannot be enforced.",37,null],[3,"TxOut","","A transaction output, which defines new coins to be created from old ones.",null,null],[12,"value","","The value of the output, in satoshis",38,null],[12,"script_pubkey","","The script which must satisfy for the output to be spent",38,null],[3,"Transaction","","A Bitcoin transaction, which describes an authenticated movement of coins",null,null],[12,"version","","The protocol version, should always be 1.",39,null],[12,"lock_time","","Block number before which this transaction is valid, or 0 for\nvalid immediately.",39,null],[12,"input","","List of inputs",39,null],[12,"output","","List of outputs",39,null],[3,"InputTrace","","A trace of a transaction input's script execution",null,null],[3,"TransactionTrace","","A trace of a transaction's execution",null,null],[4,"Error","","A transaction error",null,null],[13,"InputScriptFailure","","Concatenated script failed in the input half (script error)",40,null],[13,"OutputScriptFailure","","Concatenated script failed in the output half (script error)",40,null],[13,"P2shScriptFailure","","P2SH serialized script failed (script error)",40,null],[13,"P2shScriptReturnedFalse","","P2SH serialized script ended with false at the top of the stack",40,null],[13,"P2shScriptReturnedEmptyStack","","P2SH serialized script ended with nothing in the stack",40,null],[13,"ScriptReturnedFalse","","Script ended with false at the top of the stack",40,null],[13,"ScriptReturnedEmptyStack","","Script ended with nothing in the stack",40,null],[13,"InputNotFound","","Script ended with nothing in the stack (input txid, input vout)",40,null],[11,"hash","","",36,null],[11,"fmt","","",36,null],[11,"cmp","","",36,null],[11,"partial_cmp","","",36,null],[11,"lt","","",36,null],[11,"le","","",36,null],[11,"gt","","",36,null],[11,"ge","","",36,null],[11,"eq","","",36,null],[11,"ne","","",36,null],[11,"clone","","",36,null],[11,"deserialize","","",36,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"serialize","","",36,null],[11,"fmt","","",36,null],[11,"hash","","",37,null],[11,"fmt","","",37,null],[11,"eq","","",37,null],[11,"ne","","",37,null],[11,"clone","","",37,null],[11,"deserialize","","",37,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"serialize","","",37,null],[11,"hash","","",38,null],[11,"fmt","","",38,null],[11,"eq","","",38,null],[11,"ne","","",38,null],[11,"clone","","",38,null],[11,"deserialize","","",38,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"serialize","","",38,null],[11,"default","","",38,{"inputs":[],"output":{"name":"txout"}}],[11,"hash","","",39,null],[11,"fmt","","",39,null],[11,"eq","","",39,null],[11,"ne","","",39,null],[11,"clone","","",39,null],[11,"deserialize","","",39,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"serialize","","",39,null],[11,"ntxid","","Computes a "normalized TXID" which does not include any signatures.\nThis gives a way to identify a transaction that is ``the same'' as\nanother in the sense of having same inputs and outputs.",39,null],[11,"fmt","","",40,null],[11,"clone","","",40,null],[11,"eq","","",40,null],[11,"ne","","",40,null],[11,"fmt","","",40,null],[11,"serialize","","",40,null],[11,"fmt","","",41,null],[11,"clone","","",41,null],[11,"eq","","",41,null],[11,"ne","","",41,null],[11,"fmt","","",42,null],[11,"clone","","",42,null],[11,"eq","","",42,null],[11,"ne","","",42,null],[11,"bitcoin_hash","","",39,null],[11,"consensus_encode","","",37,null],[11,"consensus_decode","","",37,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",38,null],[11,"consensus_decode","","",38,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",39,null],[11,"consensus_decode","","",39,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[0,"block","bitcoin::blockdata","# Bitcoin Block",null,null],[3,"BlockHeader","bitcoin::blockdata::block","A block header, which contains all the block's information except\nthe actual transactions",null,null],[12,"version","","The protocol version. Should always be 1.",43,null],[12,"prev_blockhash","","Reference to the previous block in the chain",43,null],[12,"merkle_root","","The root hash of the merkle tree of transactions in the block",43,null],[12,"time","","The timestamp of the block, as claimed by the mainer",43,null],[12,"bits","","The target value below which the blockhash must lie, encoded as a\na float (with well-defined rounding, of course)",43,null],[12,"nonce","","The nonce, selected to obtain a low enough blockhash",43,null],[3,"Block","","A Bitcoin block, which is a collection of transactions with an attached\nproof of work.",null,null],[12,"header","","The block header",44,null],[12,"txdata","","List of transactions contained in the block",44,null],[3,"LoneBlockHeader","","A block header with txcount attached, which is given in the `headers`\nnetwork message.",null,null],[12,"header","","The actual block header",45,null],[12,"tx_count","","The number of transactions in the block. This will always be zero\nwhen the LoneBlockHeader is returned as part ef a `headers` message.",45,null],[11,"fmt","","",43,null],[11,"clone","","",43,null],[11,"eq","","",43,null],[11,"ne","","",43,null],[11,"fmt","","",44,null],[11,"clone","","",44,null],[11,"eq","","",44,null],[11,"ne","","",44,null],[11,"fmt","","",45,null],[11,"clone","","",45,null],[11,"eq","","",45,null],[11,"ne","","",45,null],[11,"target","","Computes the target [0, T] that a blockhash must land in to be valid",43,null],[11,"spv_validate","","Performs an SPV validation of a block, which confirms that the proof-of-work\nis correct, but does not verify that the transactions are valid or encoded\ncorrectly.",43,null],[11,"work","","Returns the total work of the block",43,null],[11,"bitcoin_hash","","",43,null],[11,"bitcoin_hash","","",44,null],[11,"consensus_encode","","",43,null],[11,"consensus_decode","","",43,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",44,null],[11,"consensus_decode","","",44,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",45,null],[11,"consensus_decode","","",45,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[0,"blockchain","bitcoin::blockdata","# Bitcoin Blockchain",null,null],[3,"BlockchainNode","bitcoin::blockdata::blockchain","A link in the blockchain",null,null],[12,"block","","The actual block",46,null],[12,"total_work","","Total work from genesis to this point",46,null],[12,"required_difficulty","","Expected value of `block.header.bits` for this block; only changes every\n`blockdata::constants::DIFFCHANGE_INTERVAL;` blocks",46,null],[12,"height","","Height above genesis",46,null],[12,"has_txdata","","Whether the transaction data is stored",46,null],[3,"Blockchain","","The blockchain",null,null],[3,"BlockIter","","An iterator over blocks in blockheight order",null,null],[3,"RevBlockIter","","An iterator over blocks in reverse blockheight order. Note that this\nis essentially the same as if we'd implemented `DoubleEndedIterator`\non `BlockIter` --- but we can't do that since if `BlockIter` is started\noff the main chain, it will not reach the best tip, so the iterator\nand its `.rev()` would be iterators over different chains! To avoid\nthis suprising behaviour we simply use separate iterators.",null,null],[3,"RevStaleBlockIter","","An iterator over blocks in reverse blockheight order, which yielding only\nstale blocks (ending at the point where it would've returned a block on\nthe main chain). It does this by checking if the `next` pointer of the\nnext-to-by-yielded block matches the currently-yielded block. If not, scan\nforward from next-to-be-yielded block. If we hit the best tip, set the\nnext-to-by-yielded block to None instead.",null,null],[11,"consensus_encode","","",46,null],[11,"consensus_decode","","",46,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"bitcoin_hash","","",46,null],[11,"consensus_encode","","",47,null],[11,"consensus_decode","","",47,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"next","","",48,null],[11,"next","","",49,null],[11,"next","","",50,null],[11,"new","","Constructs a new blockchain",47,{"inputs":[{"name":"network"}],"output":{"name":"blockchain"}}],[11,"get_block","","Looks up a block in the chain and returns the BlockchainNode containing it",47,null],[11,"add_txdata","","Locates a block in the chain and overwrites its txdata",47,null],[11,"remove_txdata","","Locates a block in the chain and removes its txdata",47,null],[11,"add_header","","Adds a block header to the chain",47,null],[11,"add_block","","Adds a block to the chain",47,null],[11,"genesis_hash","","Returns the genesis block's blockhash",47,null],[11,"best_tip","","Returns the best tip",47,null],[11,"best_tip_hash","","Returns the best tip's blockhash",47,null],[11,"locator_hashes","","Returns an array of locator hashes used in `getheaders` messages",47,null],[11,"iter","","An iterator over all blocks in the chain starting from `start_hash`",47,null],[11,"rev_iter","","An iterator over all blocks in reverse order to the genesis, starting with `start_hash`",47,null],[11,"rev_stale_iter","","An iterator over all blocks -not- in the best chain, in reverse order, starting from `start_hash`",47,null],[0,"util","bitcoin","# Utility functions",null,null],[4,"Error","bitcoin::util","A general error code",null,null],[13,"Io","","An I/O error",51,null],[13,"ByteOrder","","Order from the `byteorder` crate",51,null],[13,"BadNetworkMagic","","Network magic was not what we expected",51,null],[13,"BadNetworkMessage","","Network message was unrecognized",51,null],[13,"DuplicateHash","","An object was attempted to be added twice",51,null],[13,"BlockNotFound","","Some operation was attempted on a block (or blockheader) that doesn't exist",51,null],[13,"ParseFailed","","Parsing error",51,null],[13,"PrevHashNotFound","","An object was added but it does not link into existing history",51,null],[13,"SpvBadTarget","","The `target` field of a block header did not match the expected difficulty",51,null],[13,"SpvBadProofOfWork","","The header hash is not below the target",51,null],[13,"Detail","","Error propagated from subsystem",51,null],[5,"propagate_err","","Prepend the detail of an IoResult's error with some text to get poor man's backtracing",null,{"inputs":[{"name":"string"},{"name":"result"}],"output":{"name":"result"}}],[0,"address","","# Addresses\nSupport for ordinary base58 Bitcoin addresses and private keys",null,null],[3,"Address","bitcoin::util::address","A Bitcoin address",null,null],[12,"ty","","The type of the address",52,null],[12,"network","","The network on which this address is usable",52,null],[12,"hash","","The pubkeyhash that this address encodes",52,null],[3,"Privkey","","A Bitcoin ECDSA private key",null,null],[12,"compressed","","Whether this private key represents a compressed address",53,null],[12,"network","","The network on which this key should be used",53,null],[12,"key","","The actual ECDSA key",53,null],[4,"Type","","The method used to produce an address",null,null],[13,"PubkeyHash","","Standard pay-to-pkhash address",54,null],[13,"ScriptHash","","New-fangled P2SH address",54,null],[4,"Error","","An address-related error",null,null],[13,"Secp","","Private key did not represent a valid ECDSA secret key",55,null],[11,"fmt","","",54,null],[11,"eq","","",54,null],[11,"clone","","",54,null],[11,"fmt","","",55,null],[11,"eq","","",55,null],[11,"ne","","",55,null],[11,"clone","","",55,null],[11,"eq","","",52,null],[11,"ne","","",52,null],[11,"clone","","",52,null],[11,"from_key","","Creates an address from a public key",52,{"inputs":[{"name":"network"},{"name":"publickey"},{"name":"bool"}],"output":{"name":"address"}}],[11,"from_script","","Creates a P2SH address from a script",52,{"inputs":[{"name":"network"},{"name":"script"}],"output":{"name":"address"}}],[11,"script_pubkey","","Generates a script pubkey spending to this address",52,null],[11,"base58_layout","","",52,null],[11,"from_base58_layout","","",52,{"inputs":[{"name":"vec"}],"output":{"name":"result"}}],[11,"fmt","","",52,null],[11,"eq","","",53,null],[11,"ne","","",53,null],[11,"clone","","",53,null],[11,"from_key","","Creates an address from a public key",53,{"inputs":[{"name":"network"},{"name":"secretkey"},{"name":"bool"}],"output":{"name":"privkey"}}],[11,"to_address","","Converts a private key to an address",53,null],[11,"secret_key","","Accessor for the underlying secp key",53,null],[11,"into_secret_key","","Accessor for the underlying secp key that consumes the privkey",53,null],[11,"network","","Accessor for the network type",53,null],[11,"is_compressed","","Accessor for the compressed flag",53,null],[11,"base58_layout","","",53,null],[11,"from_base58_layout","","",53,{"inputs":[{"name":"vec"}],"output":{"name":"result"}}],[0,"base58","bitcoin::util","# Base58 encoder and decoder",null,null],[4,"Error","bitcoin::util::base58","An error that might occur during base58 decoding",null,null],[13,"BadByte","","Invalid character encountered",56,null],[13,"BadChecksum","","Checksum was not correct (expected, actual)",56,null],[13,"InvalidLength","","The length (in bytes) of the object was not correct",56,null],[13,"InvalidVersion","","Version byte(s) were not recognized",56,null],[13,"TooShort","","Checked data was less than 4 bytes",56,null],[13,"Other","","Any other error",56,null],[5,"base58_encode_slice","","Directly encode a slice as base58",null,null],[8,"FromBase58","","Trait for objects which can be read as base58",null,null],[10,"from_base58_layout","","Constructs an object from the byte-encoding (base 256)\nrepresentation of its base58 format",57,{"inputs":[{"name":"vec"}],"output":{"name":"result"}}],[11,"from_base58","","Obtain an object from its base58 encoding",57,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"from_base58check","","Obtain an object from its base58check encoding",57,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[8,"ToBase58","","Trait for objects which can be written as base58",null,null],[10,"base58_layout","","The serialization to be converted into base58",58,null],[11,"to_base58","","Obtain a string with the base58 encoding of the object",58,null],[11,"to_base58check","","Obtain a string with the base58check encoding of the object\n(Tack the first 4 256-digits of the object's Bitcoin hash onto the end.)",58,null],[11,"clone","","",56,null],[11,"eq","","",56,null],[11,"ne","","",56,null],[11,"fmt","","",56,null],[11,"fmt","","",56,null],[11,"cause","","",56,null],[11,"description","","",56,null],[0,"contracthash","bitcoin::util","# Pay-to-contract-hash supporte\nSee Appendix A of the Blockstream sidechains whitepaper\nat http://blockstream.com/sidechains.pdf for details of\nwhat this does.",null,null],[3,"Template","bitcoin::util::contracthash","A script template",null,null],[4,"Error","","A contract-hash error",null,null],[13,"BadTweak","","Contract hashed to an out-of-range value (this is basically impossible\nand much more likely suggests memory corruption or hardware failure)",59,null],[13,"Secp","","Other secp256k1 related error",59,null],[13,"Script","","Script parsing error",59,null],[13,"UncompressedKey","","Encountered an uncompressed key in a script we were deserializing. The\nreserialization will compress it which might be surprising so we call\nthis an error.",59,null],[13,"ExpectedKey","","Expected a public key when deserializing a script, but we got something else.",59,null],[13,"ExpectedChecksig","","Expected some sort of CHECKSIG operator when deserializing a script, but\nwe got something else.",59,null],[13,"TooFewKeys","","Did not have enough keys to instantiate a script template",59,null],[13,"TooManyKeys","","Had too many keys; template does not match key list",59,null],[5,"tweak_keys","","Tweak keys using some arbitrary data",null,null],[5,"tweak_secret_key","","Tweak a secret key using some arbitrary data",null,null],[5,"create_address","","Takes a contract, template and key set and runs through all the steps",null,null],[5,"untemplate","","Extract the keys and template from a completed script",null,{"inputs":[{"name":"script"}],"output":{"name":"result"}}],[11,"clone","","",59,null],[11,"eq","","",59,null],[11,"ne","","",59,null],[11,"fmt","","",59,null],[11,"fmt","","",59,null],[11,"cause","","",59,null],[11,"description","","",59,null],[11,"fmt","","",60,null],[11,"eq","","",60,null],[11,"ne","","",60,null],[11,"clone","","",60,null],[11,"to_script","","Instantiate a template",60,null],[11,"required_keys","","Returns the number of keys this template requires to instantiate",60,null],[11,"first_push_as_number","","If the first push in the template is a number, return this number. For the\ncommon case of standard multisig templates, such a number will exist and\nwill represent the number of signatures that are required for the script\nto pass.",60,null],[11,"from","","",60,null],[0,"decimal","bitcoin::util","# Floating-point decimal type",null,null],[3,"Decimal","bitcoin::util::decimal","A fixed-point decimal type",null,null],[3,"UDecimal","","Unsigned fixed-point decimal type",null,null],[11,"cmp","","",61,null],[11,"fmt","","",61,null],[11,"clone","","",61,null],[11,"cmp","","",62,null],[11,"fmt","","",62,null],[11,"clone","","",62,null],[11,"eq","","",61,null],[11,"partial_cmp","","",61,null],[11,"fmt","","",61,null],[11,"add","","",61,null],[11,"neg","","",61,null],[11,"sub","","",61,null],[11,"new","","Creates a new Decimal",61,{"inputs":[{"name":"i64"},{"name":"usize"}],"output":{"name":"decimal"}}],[11,"mantissa","","Returns the mantissa",61,null],[11,"exponent","","Returns the exponent",61,null],[11,"integer_value","","Get the decimal's value in an integer type, by multiplying\nby some power of ten to ensure the returned value is 10 **\n`exponent` types the actual value.",61,null],[11,"nonnegative","","Returns whether or not the number is nonnegative",61,null],[11,"serialize","","",61,null],[11,"deserialize","","",61,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"eq","","",62,null],[11,"partial_cmp","","",62,null],[11,"fmt","","",62,null],[11,"add","","",62,null],[11,"new","","Creates a new Decimal",62,{"inputs":[{"name":"u64"},{"name":"usize"}],"output":{"name":"udecimal"}}],[11,"mantissa","","Returns the mantissa",62,null],[11,"exponent","","Returns the exponent",62,null],[11,"integer_value","","Get the decimal's value in an integer type, by multiplying\nby some power of ten to ensure the returned value is 10 **\n`exponent` types the actual value.",62,null],[11,"serialize","","",62,null],[11,"deserialize","","",62,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[0,"hash","bitcoin::util","# Hash functions",null,null],[3,"Sha256dHash","bitcoin::util::hash","A Bitcoin hash, 32-bytes, computed from x as SHA256(SHA256(x))",null,null],[3,"Ripemd160Hash","","A RIPEMD-160 hash",null,null],[3,"Hash160","","A Bitcoin hash160, 20-bytes, computed from x as RIPEMD160(SHA256(x))",null,null],[3,"Hash32","","A 32-bit hash obtained by truncating a real hash",null,null],[3,"Hash48","","A 48-bit hash obtained by truncating a real hash",null,null],[3,"Hash64","","A 64-bit hash obtained by truncating a real hash",null,null],[4,"HexError","","Hex deserialization error",null,null],[13,"BadLength","","Length was not 64 characters",63,null],[13,"BadCharacter","","Non-hex character in string",63,null],[8,"MerkleRoot","","Any collection of objects for which a merkle root makes sense to calculate",null,null],[10,"merkle_root","","Construct a merkle tree from a collection, with elements ordered as\nthey were in the original collection, and return the merkle root.",64,null],[11,"fmt","","",63,null],[11,"eq","","",63,null],[11,"ne","","",63,null],[11,"clone","","",63,null],[11,"fmt","","",63,null],[11,"cause","","",63,null],[11,"description","","",63,null],[11,"as_ptr","","Converts the object to a raw pointer",65,null],[11,"as_mut_ptr","","Converts the object to a mutable raw pointer",65,null],[11,"len","","Returns the length of the object as an array",65,null],[11,"is_empty","","Returns whether the object, as an array, is empty. Always false.",65,null],[11,"from","","",65,null],[11,"index","","",65,null],[11,"index","","",65,null],[11,"index","","",65,null],[11,"index","","",65,null],[11,"index","","",65,null],[11,"eq","","",65,null],[11,"partial_cmp","","",65,null],[11,"cmp","","",65,null],[11,"clone","","",65,null],[11,"hash","","",65,null],[11,"hash_slice","","",65,null],[11,"rand","","",65,{"inputs":[{"name":"r"}],"output":{"name":"sha256dhash"}}],[11,"as_ptr","","Converts the object to a raw pointer",66,null],[11,"as_mut_ptr","","Converts the object to a mutable raw pointer",66,null],[11,"len","","Returns the length of the object as an array",66,null],[11,"is_empty","","Returns whether the object, as an array, is empty. Always false.",66,null],[11,"from","","",66,null],[11,"index","","",66,null],[11,"index","","",66,null],[11,"index","","",66,null],[11,"index","","",66,null],[11,"index","","",66,null],[11,"eq","","",66,null],[11,"partial_cmp","","",66,null],[11,"cmp","","",66,null],[11,"clone","","",66,null],[11,"hash","","",66,null],[11,"hash_slice","","",66,null],[11,"rand","","",66,{"inputs":[{"name":"r"}],"output":{"name":"ripemd160hash"}}],[11,"as_ptr","","Converts the object to a raw pointer",67,null],[11,"as_mut_ptr","","Converts the object to a mutable raw pointer",67,null],[11,"len","","Returns the length of the object as an array",67,null],[11,"is_empty","","Returns whether the object, as an array, is empty. Always false.",67,null],[11,"from","","",67,null],[11,"index","","",67,null],[11,"index","","",67,null],[11,"index","","",67,null],[11,"index","","",67,null],[11,"index","","",67,null],[11,"eq","","",67,null],[11,"partial_cmp","","",67,null],[11,"cmp","","",67,null],[11,"clone","","",67,null],[11,"hash","","",67,null],[11,"hash_slice","","",67,null],[11,"rand","","",67,{"inputs":[{"name":"r"}],"output":{"name":"hash160"}}],[11,"fmt","","",68,null],[11,"eq","","",68,null],[11,"ne","","",68,null],[11,"clone","","",68,null],[11,"fmt","","",69,null],[11,"eq","","",69,null],[11,"ne","","",69,null],[11,"clone","","",69,null],[11,"fmt","","",70,null],[11,"eq","","",70,null],[11,"ne","","",70,null],[11,"clone","","",70,null],[11,"from_data","","Create a hash by hashing some data",66,null],[11,"from_data","","Create a hash by hashing some data",67,null],[11,"default","","",65,{"inputs":[],"output":{"name":"sha256dhash"}}],[11,"from_data","","Create a hash by hashing some data",65,null],[11,"into_le","","Converts a hash to a little-endian Uint256",65,null],[11,"into_be","","Converts a hash to a big-endian Uint256",65,null],[11,"into_hash32","","Converts a hash to a Hash32 by truncation",65,null],[11,"into_hash48","","Converts a hash to a Hash48 by truncation",65,null],[11,"from_hex","","Decodes a big-endian (i.e. reversed vs sha256sum output) hex string as a Sha256dHash",65,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"into_hash64","","Converts a hash to a Hash64 by truncation",65,null],[11,"le_hex_string","","Human-readable hex output",65,null],[11,"be_hex_string","","Human-readable hex output",65,null],[11,"serialize","","",65,null],[11,"deserialize","","",65,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",68,null],[11,"consensus_decode","","",68,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",69,null],[11,"consensus_decode","","",69,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",70,null],[11,"consensus_decode","","",70,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"consensus_encode","","",65,null],[11,"consensus_decode","","",65,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"fmt","","",65,null],[11,"fmt","","",65,null],[11,"fmt","","",65,null],[11,"fmt","","",65,null],[0,"iter","bitcoin::util","# Iterator adaptors",null,null],[3,"Pair","bitcoin::util::iter","An iterator that returns pairs of elements",null,null],[8,"Pairable","","Returns an iterator that returns elements of the original iterator 2 at a time",null,null],[10,"pair","","Returns an iterator that returns elements of the original iterator 2 at a time",71,null],[11,"next","","",72,null],[11,"size_hint","","",72,null],[11,"remainder","","Returns the last element of the iterator if there were an odd\nnumber of elements remaining before it was Pair-ified.",72,null],[0,"misc","bitcoin::util","# Miscellaneous functions",null,null],[5,"hex_bytes","bitcoin::util::misc","Convert a hexadecimal-encoded string to its corresponding bytes",null,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[5,"consume_err","","Dump an error message to the screen\nTODO all uses of this should be replaced with some sort of logging infrastructure",null,{"inputs":[{"name":"str"},{"name":"result"}],"output":null}],[5,"script_find_and_remove","","Search for `needle` in the vector `haystack` and remove every\ninstance of it, returning the number of instances removed.\nLoops through the vector opcode by opcode, skipping pushed data.",null,null],[0,"patricia_tree","bitcoin::util","# Patricia/Radix Trie",null,null],[3,"PatriciaTree","bitcoin::util::patricia_tree","Patricia troo",null,null],[3,"Items","","Iterator",null,null],[3,"MutItems","","Mutable iterator",null,null],[11,"new","","Constructs a new Patricia tree",73,{"inputs":[],"output":{"name":"patriciatree"}}],[11,"lookup_mut","","Lookup a value by exactly matching `key` and return a referenc",73,null],[11,"lookup","","Lookup a value by exactly matching `key` and return a mutable reference",73,null],[11,"insert","","Inserts a value with key `key`, returning true on success. If a value is already\nstored against `key`, do nothing and return false.",73,null],[11,"insert_or_update","","Inserts a value with key `key`, returning true on success. If a value is already\nstored against `key`, overwrite it and return false.",73,null],[11,"delete","","Deletes a value with key `key`, returning it on success. If no value with\nthe given key is found, return None",73,null],[11,"node_count","","Count all the nodes",73,null],[11,"iter","","Returns an iterator over all elements in the tree",73,null],[11,"mut_iter","","Returns a mutable iterator over all elements in the tree",73,null],[11,"fmt","","Print the entire tree",73,null],[11,"consensus_encode","","",73,null],[11,"consensus_decode","","",73,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"next","","",74,null],[11,"next","","",75,null],[0,"uint","bitcoin::util","# Big unsigned integer types",null,null],[3,"Uint256","bitcoin::util::uint","Little-endian large integer type",null,null],[12,"0","","",76,null],[3,"Uint128","","Little-endian large integer type",null,null],[12,"0","","",77,null],[11,"as_ptr","","Converts the object to a raw pointer",76,null],[11,"as_mut_ptr","","Converts the object to a mutable raw pointer",76,null],[11,"len","","Returns the length of the object as an array",76,null],[11,"is_empty","","Returns whether the object, as an array, is empty. Always false.",76,null],[11,"from","","",76,null],[11,"index","","",76,null],[11,"index","","",76,null],[11,"index","","",76,null],[11,"index","","",76,null],[11,"index","","",76,null],[11,"eq","","",76,null],[11,"partial_cmp","","",76,null],[11,"cmp","","",76,null],[11,"clone","","",76,null],[11,"hash","","",76,null],[11,"hash_slice","","",76,null],[11,"rand","","",76,{"inputs":[{"name":"r"}],"output":{"name":"uint256"}}],[11,"low_u32","","Conversion to u32",76,null],[11,"bits","","Return the least number of bits needed to represent the number",76,null],[11,"mul_u32","","Multiplication by u32",76,null],[11,"from_u64","","",76,{"inputs":[{"name":"u64"}],"output":{"name":"option"}}],[11,"from_i64","","",76,{"inputs":[{"name":"i64"}],"output":{"name":"option"}}],[11,"zero","","",76,{"inputs":[],"output":{"name":"uint256"}}],[11,"is_zero","","",76,null],[11,"one","","",76,{"inputs":[],"output":{"name":"uint256"}}],[11,"add","","",76,null],[11,"sub","","",76,null],[11,"mul","","",76,null],[11,"div","","",76,null],[11,"bit","","",76,null],[11,"bit_slice","","",76,null],[11,"mask","","",76,null],[11,"trailing_zeros","","",76,null],[11,"bitand","","",76,null],[11,"bitxor","","",76,null],[11,"bitor","","",76,null],[11,"not","","",76,null],[11,"shl","","",76,null],[11,"shr","","",76,null],[11,"fmt","","",76,null],[11,"consensus_encode","","",76,null],[11,"consensus_decode","","",76,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"as_ptr","","Converts the object to a raw pointer",77,null],[11,"as_mut_ptr","","Converts the object to a mutable raw pointer",77,null],[11,"len","","Returns the length of the object as an array",77,null],[11,"is_empty","","Returns whether the object, as an array, is empty. Always false.",77,null],[11,"from","","",77,null],[11,"index","","",77,null],[11,"index","","",77,null],[11,"index","","",77,null],[11,"index","","",77,null],[11,"index","","",77,null],[11,"eq","","",77,null],[11,"partial_cmp","","",77,null],[11,"cmp","","",77,null],[11,"clone","","",77,null],[11,"hash","","",77,null],[11,"hash_slice","","",77,null],[11,"rand","","",77,{"inputs":[{"name":"r"}],"output":{"name":"uint128"}}],[11,"low_u32","","Conversion to u32",77,null],[11,"bits","","Return the least number of bits needed to represent the number",77,null],[11,"mul_u32","","Multiplication by u32",77,null],[11,"from_u64","","",77,{"inputs":[{"name":"u64"}],"output":{"name":"option"}}],[11,"from_i64","","",77,{"inputs":[{"name":"i64"}],"output":{"name":"option"}}],[11,"zero","","",77,{"inputs":[],"output":{"name":"uint128"}}],[11,"is_zero","","",77,null],[11,"one","","",77,{"inputs":[],"output":{"name":"uint128"}}],[11,"add","","",77,null],[11,"sub","","",77,null],[11,"mul","","",77,null],[11,"div","","",77,null],[11,"bit","","",77,null],[11,"bit_slice","","",77,null],[11,"mask","","",77,null],[11,"trailing_zeros","","",77,null],[11,"bitand","","",77,null],[11,"bitxor","","",77,null],[11,"bitor","","",77,null],[11,"not","","",77,null],[11,"shl","","",77,null],[11,"shr","","",77,null],[11,"fmt","","",77,null],[11,"consensus_encode","","",77,null],[11,"consensus_decode","","",77,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"increment","","Increment by 1",76,null],[11,"low_128","","Decay to a uint128",76,null],[8,"BitArray","bitcoin::util","A trait which allows numbers to act as fixed-size bit arrays",null,null],[10,"bit","","Is bit set?",78,null],[10,"bit_slice","","Returns an array which is just the bits from start to end",78,null],[10,"mask","","Bitwise and with `n` ones",78,null],[10,"trailing_zeros","","Trailing zeros",78,null],[11,"fmt","","",51,null],[11,"fmt","","",51,null],[14,"nu_select!","bitcoin","",null,null],[14,"user_enum!","","",null,null]],"paths":[[4,"Network"],[3,"VarInt"],[3,"CheckedData"],[8,"ConsensusEncodable"],[8,"ConsensusDecodable"],[3,"Socket"],[8,"BitcoinHash"],[8,"SimpleEncoder"],[8,"SimpleDecoder"],[3,"RawEncoder"],[3,"RawDecoder"],[3,"Address"],[8,"Listener"],[3,"CommandString"],[3,"RawNetworkMessage"],[4,"SocketResponse"],[4,"NetworkMessage"],[3,"GetBlocksMessage"],[3,"GetHeadersMessage"],[3,"Inventory"],[4,"InvType"],[3,"VersionMessage"],[4,"All"],[4,"Class"],[3,"ScriptTrace"],[4,"Error"],[4,"SigHashType"],[4,"MaybeOwned"],[4,"Instruction"],[3,"Script"],[3,"Builder"],[3,"Validator"],[3,"AbstractStackElem"],[3,"AbstractStack"],[3,"TraceIteration"],[3,"Instructions"],[3,"TxOutRef"],[3,"TxIn"],[3,"TxOut"],[3,"Transaction"],[4,"Error"],[3,"InputTrace"],[3,"TransactionTrace"],[3,"BlockHeader"],[3,"Block"],[3,"LoneBlockHeader"],[3,"BlockchainNode"],[3,"Blockchain"],[3,"BlockIter"],[3,"RevBlockIter"],[3,"RevStaleBlockIter"],[4,"Error"],[3,"Address"],[3,"Privkey"],[4,"Type"],[4,"Error"],[4,"Error"],[8,"FromBase58"],[8,"ToBase58"],[4,"Error"],[3,"Template"],[3,"Decimal"],[3,"UDecimal"],[4,"HexError"],[8,"MerkleRoot"],[3,"Sha256dHash"],[3,"Ripemd160Hash"],[3,"Hash160"],[3,"Hash32"],[3,"Hash48"],[3,"Hash64"],[8,"Pairable"],[3,"Pair"],[3,"PatriciaTree"],[3,"Items"],[3,"MutItems"],[3,"Uint256"],[3,"Uint128"],[8,"BitArray"]]}; initSearch(searchIndex);