NBitcoin Base class for all Base58 check representation of data Provides a view of an array of bits as a stream of bits. Implements a Golomb-coded set to be use in the creation of client-side filter for a new kind Bitcoin light clients. This code is based on the BIP: https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki a value which is computed as 1/fp where fp is the desired false positive rate. a value which is computed as N * fp (or false positive rate = 1/M). this value allows filter to uniquely tune the range that items are hashed onto before compressing Number of elements in the filter Raw filter data Creates a new Golomb-Rice filter from the data byte array which contains a serialized filter. Uses the DefaultP value (20). A serialized Golomb-Rice filter. Creates a new Golomb-Rice filter from the data byte array which contains a serialized filter. Uses the DefaultP value (20). A serialized Golomb-Rice filter. Creates a new Golomb-Rice filter from the data byte array which contains a serialized filter. A serialized Golomb-Rice filter. The P value to use. The M value to use. Creates a new Golomb-Rice filter from the data byte array. A serialized Golomb-Rice filter. The number of elements in the filter. The P value to use. The M value to use. Computes the sorted-and-uncompressed list of values to be included in the filter. /// P value used. Key used for hashing the datalements. Data elements to be computed in the list. Calculates the filter's header. Previous filter header. The filter header. Checks if the value passed is in the filter. Data element to check in the filter. Key used for hashing the data elements. true if the element is in the filter, otherwise false. Checks if any of the provided elements is in the filter. Data elements to check in the filter. Key used for hashing the data elements. true if at least one of the elements is in the filter, otherwise false. Checks if any of the provided elements is in the filter. Data elements to check in the filter. Key used for hashing the data elements. true if at least one of the elements is in the filter, otherwise false. Checks if any of the provided elements is in the filter. Data elements to check in the filter. Key used for hashing the data elements. true if at least one of the elements is in the filter, otherwise false. Serialize the filter as a array of bytes using [varint(N) | data]. A array of bytes with the serialized filter data. Serialize the filter as hexadecimal string. A string with the serialized filter data Class for creating Golomb-Rice filters for a given block. It provides methods for building two kind of filters out-of-the-box: Basic Filters and Extenden Filters. Helper class for making sure not two identical data elements are included in a filter. Builds the basic filter for a given block. The basic filter is designed to contain everything that a light client needs to sync a regular Bitcoin wallet. A basic filter MUST contain exactly the following items for each transaction in a block: * The outpoint of each input, except for the coinbase transaction * The scriptPubKey of each output * The txid of the transaction itself The block used for building the filter. The basic filter for the block. Creates a new Golob-Rice filter builder. Sets the key used for hashing the filter data elements. The first half of the block hash is used as described in the BIP. The block hash which the hashing key is derived from. The updated filter builder instance Sets the P value to use. P value The updated filter builder instance. Sets the M value to use. M value The updated filter builder instance. Adds a transacion id to the list of elements that will be used for building the filter. The transaction id. The updated filter builder instance. Adds a scriptPubKey to the list of elements that will be used for building the filter. The scriptPubkey. The updated filter builder instance. Adds a scriptSig to the list of elements that will be used for building the filter. The scriptSig. The updated filter builder instance. Adds a witness stack to the list of elements that will be used for building the filter. The witScript. The updated filter builder instance. Adds an outpoint to the list of elements that will be used for building the filter. The outpoint. The updated filter builder instance. Adds a list of elements to the list of elements that will be used for building the filter. The entries. The updated filter builder instance. Builds the Golomb-Rice filters from the parameters and data elements included. The built filter. Use custom builder extensions to customize finalization Try to do anything that is possible to deduce PSBT information from input information Add transactions to non segwit outputs Parent transactions This PSBT If an other PSBT has a specific field and this does not have it, then inject that field to this. otherwise leave it as it is. If you need to call this on transactions with different global transaction, use instead. Another PSBT to takes information from Can not Combine PSBT with different global tx. This instance If an other PSBT has a specific field and this does not have it, then inject that field to this. otherwise leave it as it is. Contrary to , it can be called on PSBT with a different global transaction. Another PSBT to takes information from This instance Join two PSBT into one CoinJoin PSBT. This is an immutable method. TODO: May need assertion for sighash type? Sign all inputs which derive of type . The way to derive addresses from the accountKey The account key with which to sign The account key path (eg. [masterFP]/49'/0'/0') The SigHash This PSBT Sign all inputs which derive of type . The way to derive addresses from the accountKey The account key with which to sign The SigHash This PSBT Sign all inputs which derive addresses from and that need to be signed by . The address generator The account key with which to sign The SigHash This PSBT Sign all inputs which derive addresses from and that need to be signed by . The address generator The account key with which to sign The account key path (eg. [masterFP]/49'/0'/0') This PSBT Returns the fee of the transaction being signed Returns the fee of the transaction being signed The fees Not enough information to know about the fee Returns the fee rate of the transaction. If the PSBT is finalized, then the exact rate is returned, else an estimation is made. True if could get the estimated fee rate Returns the virtual transaction size of the transaction. If the PSBT is finalized, then the exact virtual size. The calculated virtual size True if could get the virtual size could get estimated Returns the fee rate of the transaction. If the PSBT is finalized, then the exact rate is returned, else an estimation is made. The estimated fee Not enough information to know about the fee rate Returns a data structure precomputing some hash values that are needed for all inputs to be signed in the transaction. The PrecomputedTransactionData Throw if the PSBT is missing some previous outputs. Extract the fully signed transaction from the PSBT The fully signed transaction PSBTInputs are not all finalized Get the expected hash once the transaction is fully signed The hash once fully signed True if we can know the expected hash. False if we can't (unsigned non-segwit). Clone this PSBT A cloned PSBT Clone this PSBT Whether the original scriptSig and witScript or inputs is saved A cloned PSBT Get the balance change if you were signing this transaction. The hdScriptPubKey used to generate addresses The account key that will be used to sign (ie. 49'/0'/0') The account key path The balance change Get the balance change if you were signing this transaction. The hdScriptPubKey used to generate addresses The account key that will be used to sign (ie. 49'/0'/0') The account key path The balance change Filter the coins which contains the and in the HDKeys and derive the same scriptPubKeys as . The hdScriptPubKey used to generate addresses The account key that will be used to sign (ie. 49'/0'/0') The account key path Inputs with HD keys matching masterFingerprint and account key Filter the keys which contains the and in the HDKeys and whose input/output the same scriptPubKeys as . The hdScriptPubKey used to generate addresses The account key that will be used to sign (ie. 49'/0'/0') The account key path HD Keys matching master root key Filter the keys which contains the and . The account key that will be used to sign (ie. 49'/0'/0') The account key path HD Keys matching master root key Add keypath information to this PSBT for each input or output involving it The master key of the keypaths The path of the public keys This PSBT Add keypath information to this PSBT for each input or output involving it The master key of the keypaths The path of the public keys with their expected scriptPubKey This PSBT Add keypath information to this PSBT for each input or output involving it The public key which need to sign The keypath to this public key This PSBT Add keypath information to this PSBT, if the PSBT all finalized this operation is a no-op The public key which need to sign The keypath to this public key A specific scriptPubKey this pubkey is involved with This PSBT Rebase the keypaths. If a PSBT updater only know the child HD public key but not the root one, another updater knowing the parent master key it is based on can rebase the paths. If the PSBT is all finalized this operation is a no-op The current account key The KeyPath with the fingerprint of the new root key This PSBT Filter the keys which contains the and in the HDKeys and whose input/output the same scriptPubKeys as . The accountHDScriptPubKey used to generate addresses The account key that will be used to sign (ie. 49'/0'/0') The account key path HD Keys matching master root key KeyPath relative to the accountKey to PubKey Filter the coins which contains the and in the HDKeys and derive the same scriptPubKeys as . The hdScriptPubKey used to generate addresses The account key that will be used to sign (ie. 49'/0'/0') The account key path Inputs with HD keys matching masterFingerprint and account key Filter the keys which contains the and in the HDKeys and whose input/output the same scriptPubKeys as . The hdScriptPubKey used to generate addresses The account key that will be used to sign (ie. 49'/0'/0') The account key path HD Keys matching master root key Filter the keys which contains the and . The account key that will be used to sign (ie. 49'/0'/0') The account key path HD Keys matching master root key Changes the nSequence field of the corresponding TxIn. You should not call this method if any PSBTInput in the same PSBT has a signature. Because the siagnature usually commits to the old nSequence value. When at least one signature exists in any other inputs in the PSBT Import informations contained by into this instance. conovert partial sigs to suitable form for ScriptSig (or Witness). This will preserve the ordering of redeem script even if it did not follow bip67. Delete superflous information from a finalized input. This will not clear utxos since tx extractor might want to check the validity The input need to be finalized Represent this input as a coin that can be used for signing operations. Returns null if , are not set or if or are missing but needed. The input as a signable coin Represent this input as a coin that can be used for signing operations. Returns null if , are not set or if or are missing but needed. If it is not possible to retrieve the signable coin, a human readable reason. The input as a signable coin Check if this satisfies criteria for witness. if it does, delete non_witness_utxo This is useful for following reasons. 1. It will make a data smaller which is an obviously good thing. 2. Future HW Wallet may not support non segwit tx and thus won't recognize non_witness_utxo 3. To pass test in BIP174 Represent this input as a coin. Returns null if or is not set. The input as a coin Import informations contained by into this instance. Base58 representation of an ExtKey, within a particular network. Constructor. Creates an extended key from the Base58 representation, checking the expected network. Constructor. Creates a representation of an extended key, within the specified network. Gets whether the data is the correct expected length. Gets the extended key, converting from the Base58 representation. Gets the type of item represented by this Base58 data. Gets the script of the hash of the public key corresponing to the private key of the extended key of this Base58 item. Gets the Base58 representation, in the same network, of the neutered extended key. Gets the private key of the extended key of this Base58 item. Implicit cast from BitcoinExtKey to ExtKey. Base58 representation of an ExtPubKey, within a particular network. Constructor. Creates an extended public key from the Base58 representation, checking the expected network. Constructor. Creates a representation of an extended public key, within the specified network. Gets the extended public key, converting from the Base58 representation. Gets the type of item represented by this Base58 data. Gets the script of the hash of the public key of the extended key of this Base58 item. Implicit cast from BitcoinExtPubKey to ExtPubKey. A private Hierarchical Deterministic key Parses the Base58 data (checking the network if specified), checks it represents the correct type of item, and then returns the corresponding ExtKey. Gets the depth of this extended key from the root key. Gets the child number of this key (in reference to the parent). Constructor. Reconstructs an extended key from the Base58 representations of the public key and corresponding private key. Constructor. Creates an extended key from the public key and corresponding private key. The ExtPubKey has the relevant values for child number, depth, chain code, and fingerprint. Constructor. Creates an extended key from the private key, and specified values for chain code, depth, fingerprint, and child number. Constructor. Creates an extended key from the private key, with the specified value for chain code. Depth, fingerprint, and child number, will have their default values. Constructor. Creates a new extended key with a random 64 byte seed. Constructor. Creates a new extended key from the specified seed bytes, from the given hex string. Constructor. Creates a new extended key from the specified seed bytes. Get the private key of this extended key. Create the public key from this key. Derives a new extended key in the hierarchy as the given child number. Derives a new extended key in the hierarchy as the given child number, setting the high bit if hardened is specified. Derives a new extended key in the hierarchy at the given path below the current key, by deriving the specified child at each step. Converts the extended key to the base58 representation, within the specified network. Converts the extended key to the base58 representation, as a string, within the specified network. Gets the script of the hash of the public key corresponding to the private key. Gets whether or not this extended key is a hardened child. Recreates the private key of the parent from the private key of the child combinated with the public key of the parent (hardened children cannot be used to recreate the parent). A public HD key Constructor. Creates a new extended public key from the specified extended public key bytes. Creates a new extended public key from the specified extended public key bytes. Creates a new extended public key from the specified extended public key bytes. Constructor. Creates a new extended public key from the specified extended public key bytes, from the given hex string. The P2PKH payment script Represent a path in the hierarchy of HD keys (BIP32) Parse a KeyPath The KeyPath formated like 10/0/2'/3 Try Parse a KeyPath The KeyPath formated like 10/0/2'/3 The successfully parsed Key path True if the string is parsed successfully; otherwise false True if the last index in the path is hardened Returns the longest non-hardened keypath to the leaf. For example, if the keypath is "49'/0'/0'/1/23", then the address key path is "1/23" Return the address key path Returns the longest hardened keypath from the root. For example, if the keypath is "49'/0'/0'/1/23", then the account key path is "49'/0'/0'" Return the account key path True if at least one index in the path is hardened KeyPath with the fingerprint of the root it should derive from Returns the longest hardened keypath from the root. For example, if the keypath is "49'/0'/0'/1/23", then the account key path is "49'/0'/0'" Return the account key path Mostly works same with `ToString()`, but if the `KeyPath` is empty, it just returns master finger print without `/` in the suffix Take the first four bytes of SHA256(SHA256(generatedaddress)) and call it addresshash. Get the decrypted private key The password The decrypted key Invalid password Get the decrypted private key The password The decrypted key if successfull True if successfull A .NET implementation of the Bitcoin Improvement Proposal - 39 (BIP39) BIP39 specification used as reference located here: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki Made by thashiznets@yahoo.com.au v1.0.1.1 I ♥ Bitcoin :) Bitcoin:1ETQjMkR1NNh4jwLuN5LxY7bMsHC9PUPSV Generate a mnemonic Constructor used by inheritence only The words to be used in the wordlist Method to determine if word exists in word list, great for auto language detection The word to check for existence Exists (true/false) Returns a string containing the word at the specified index of the wordlist Index of word to return Word The number of all the words in the wordlist Special flag for timeout to indicate always active. Base58 representation of a script hash Base58 representation of a bitcoin address Detect whether the input base58 is a pubkey hash or a script hash The string to parse The expected network to which it belongs A BitcoinAddress or BitcoinScriptAddress Invalid format Base58 representation of a pubkey hash and base class for the representation of a script hash Set the format to use when serializing and deserializing consensus related types. Nodes collect new transactions into a block, hash them into a hash tree, and scan through nonce values to make the block's hash satisfy proof-of-work requirements. When they solve the proof-of-work, they broadcast the block to everyone and the block is added to the block chain. The first transaction in the block is a special one that creates a new coin owned by the creator of the block. Precompute the block header hash so that later calls to GetHash() will returns the precomputed hash If true, the previous precomputed hash is thrown away, else it is reused If true, the hash will be calculated and cached at the first call to GetHash(), else it will be immediately Set time to consensus acceptable value Network previous block Set time to consensus acceptable value Consensus previous block Set time to consensus acceptable value The expected date Consensus previous block Set time to consensus acceptable value The expected date Network previous block Get the coinbase height as specified by the first tx input of this block (BIP 34) Null if block has been created before BIP34 got enforced, else, the height Create a block with the specified option only. (useful for stripping data from a block) Options to keep A new block with only the options wanted Check proof of work and merkle root Compact representation of one's chain position which can be used to find forks with another chain Used by SPV client, represent the set of interesting addresses tracked by SPV client with plausible deniability Base extension class to derive from for extending the TransactionBuilder Returns the first common block between two chains The other chain First common block or null Returns the first found block Hash to search for First found block or null Force a new tip for the chain forking point A BlockHeader chained with all its ancestors Free up some memory (cached HashBlock and ChainWork) at the price of efficiency Strip the Header to free up memory Returns true if this ChainedBlock has the underlying header Get the BlockHeader The block header True if this ChainedBlock has block header Get the underlying block header, throws if the Header is not present. Get the value of the chain work If true, called GetChainWork on this block and future block will be faster, but this trade for space The chain work value Check PoW and that the blocks connect correctly The network being used True if PoW is correct Check PoW and that the blocks connect correctly The consensus being used True if PoW is correct Find first common block between two chains The tip of the other chain First common block or null Returns the script actually signed and executed Additional information needed to get the ScriptCode The executed script Represent a coin which need a redeem script to be spent (P2SH or P2WSH) Get the P2SH redeem script The P2SH redeem script or null if this coin is not P2SH. Returns the hash contained in the scriptPubKey (P2SH or P2WSH) The scriptPubKey The hash of the scriptPubkey The signature of 64 bytes Thread safe class representing a chain of headers from genesis Force a new tip for the chain forking point Implements the PBKDF2 key derivation function. using System.Security.Cryptography; using CryptSharp.Utility; // Compute a 128-byte derived key using HMAC-SHA256, 1000 iterations, and a given key and salt. byte[] derivedKey = Pbkdf2.ComputeDerivedKey(new HMACSHA256(key), salt, 1000, 128); using System.IO; using System.Security.Cryptography; using CryptSharp.Utility; // Create a stream using HMAC-SHA512, 1000 iterations, and a given key and salt. Stream derivedKeyStream = new Pbkdf2(new HMACSHA512(key), salt, 1000); Creates a new PBKDF2 stream. The salt. A unique salt means a unique PBKDF2 stream, even if the original key is identical. The number of iterations to apply. Reads from the derived key stream. The number of bytes to read. Bytes from the derived key stream. Computes a derived key. The salt. A unique salt means a unique derived key, even if the original key is identical. The number of iterations to apply. The desired length of the derived key. The derived key. Closes the stream, clearing memory and disposing of the HMAC algorithm. The maximum number of bytes that can be derived is 2^32-1 times the HMAC size. The position within the derived key stream. Implements the Salsa20 hash function. Applies the Salsa20 hash function. It maps a 16 element input to an output of the same size. The number of rounds. SCrypt uses 8. The input buffer. The offset into the input buffer. The output buffer. The offset into the output buffer. Implements the SCrypt key derivation function. Computes a derived key. The key to derive from. The salt. A unique salt means a unique SCrypt stream, even if the original key is identical. The cost parameter, typically a fairly large number such as 262144. Memory usage and CPU time scale approximately linearly with this parameter. The mixing block size, typically 8. Memory usage and CPU time scale approximately linearly with this parameter. The level of parallelism, typically 1. CPU time scales approximately linearly with this parameter. The maximum number of threads to spawn to derive the key. This is limited by the value. null will use as many threads as possible. The desired length of the derived key. The derived key. The SCrypt algorithm creates a salt which it then uses as a one-iteration PBKDF2 key stream with SHA256 HMAC. This method lets you retrieve this intermediate salt. The key to derive from. The salt. A unique salt means a unique SCrypt stream, even if the original key is identical. The cost parameter, typically a fairly large number such as 262144. Memory usage and CPU time scale approximately linearly with this parameter. The mixing block size, typically 8. Memory usage and CPU time scale approximately linearly with this parameter. The level of parallelism, typically 1. CPU time scales approximately linearly with this parameter. The maximum number of threads to spawn to derive the key. This is limited by the value. null will use as many threads as possible. The effective salt. Creates a derived key stream from which a derived key can be read. The key to derive from. The salt. A unique salt means a unique scrypt stream, even if the original key is identical. The cost parameter, typically a fairly large number such as 262144. Memory usage and CPU time scale approximately linearly with this parameter. The mixing block size, typically 8. Memory usage and CPU time scale approximately linearly with this parameter. The level of parallelism, typically 1. CPU time scales approximately linearly with this parameter. The maximum number of threads to spawn to derive the key. This is limited by the value. null will use as many threads as possible. The derived key stream. What we get back from the signer are the two components of a signature, r and s. To get a flat byte stream of the type used by Bitcoin we have to encode them using DER encoding, which is just a way to pack the two components into a structure. Enforce LowS on the signature Double SHA256 hash stream Unoptimized hash stream, bufferize all the data Fast check if the string to know if base58 str Fast check if the string to know if base58 str Fee per KB Satoshi per Byte Get fee for the size Size in bytes Represent any type which represent an underlying ScriptPubKey Represent any type which represent an underlying ScriptPubKey which can be represented as an address A IHDScriptPubKey represent an object which represent a tree of scriptPubKeys Return {host}:{port} of this endpoint. {host}:{port} representation of this endpoint Convert an onion cat IPEndpoint to an onion DnsEndpoint If endpoint is already an onion DnsEndpoint, return it. Else returns null. An onion DNS endpoint or null Convert an onion cat IPEndpoint to an onion DnsEndpoint If endpoint is already an onion DnsEndpoint, return it. If the endpoint is not an onion endpoint v2, return false. The tor endpoint The onion dns enpoint True if the onioncat address has been successfully parsed as a dns onion address Convert an onion DNS endpoint to an onioncat IpEndpoint If endpoint is already an onioncat IPEndpoint, return it. Else returns null. Will properly convert to IPEndpoint If is a DNSEndpoint is an onion host (Tor v2), it will be converted into onioncat address else, a DNS resolution will be made and all resolved addresses will be returned If is a IPEndpoint, it will be returned as-is. You can pass any endpoint parsed by The endpoint to convert to IPEndpoint The endpoint is null An error is encountered when resolving the dns name. The endpoint passed can't be converted into an Ip (eg. An onion host which is not TorV2) Will properly convert to IPEndpoint If is a DNSEndpoint is an onion host (Tor v2), it will be converted into onioncat address else, a DNS resolution will be made and all resolved addresses will be returned If is a IPEndpoint, it will be returned as-is. You can pass any endpoint parsed by The endpoint to convert to IPEndpoint The DNS Resolver The cancellation token The endpoint is null An error is encountered when resolving the dns name. The endpoint passed can't be converted into an Ip (eg. An onion host which is not TorV2) Represent a transaction map Same as GetBitcoinSecret When we store internal ScriptId -> Script lookup, having another WitScriptId -> WitScript KVMap will complicate implementation. And require More space because WitScriptId is bigger than ScriptId. But if we use Hash160 as ID, It will cause a problem in case of p2sh-p2wsh because we must hold two scripts (witness program and witness script) with one ScriptId. So instead we use single-RIPEMD160 This is the same way with how bitcoin core handles scripts internally. Minimalistic logger that does nothing. An empty scope without any logic Get the Money corresponding to the input assetId The asset id, if null, will assume bitcoin amount Never returns null, either the AssetMoney or Money if assetId is null Split the MoneyBag in several one, without loss The number of parts (must be more than 0) The splitted money Parse a bitcoin amount (Culture Invariant) Parse a bitcoin amount (Culture Invariant) Get absolute value of the instance Split the Money in parts without loss The number of parts (must be more than 0) The splitted money Convert Money to decimal (same as ToDecimal) Convert Money to decimal (same as ToUnit) Returns a culture invariant string representation of Bitcoin amount Returns a culture invariant string representation of Bitcoin amount True if show + for a positive amount True if trim excess zeros Tell if amount is almost equal to this instance more or less amount true if equals, else false Tell if amount is almost equal to this instance error margin (between 0 and 1) true if equals, else false Returns the default data directory of bitcoin correctly accross OS The name of the folder The full path to the data directory of Bitcoin Create a bitcoin address from base58 data, return a BitcoinAddress or BitcoinScriptAddress base58 address Invalid base58 address BitcoinScriptAddress, BitcoinAddress Get network from name main,mainnet,testnet,test,testnet3,reg,regtest,sig,signet The network or null of the name does not match any network Height in coinbase Height in OP_CLTV Strict DER signature Specify the BIP44 coin type for this network Specify using litecoin calculation for difficulty Create an immutable Network instance, and register it globally so it is queriable through Network.GetNetwork(string name) and Network.GetNetworks(). This class provide a hook for additional string format in altcoin network Try to parse a string The string to parse The result True if it was possible to parse the string A unique Id for an asset AssetId of the current amount Get absolute value of the instance Split the Money in parts without loss The number of parts (must be more than 0) The splitted money Base58 representation of an asset id A colored transaction repository which does not save ColoredTransaction Remove superfluous branches https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki Check if the given transaction violate the policy The transaction The previous coins Policy errors Error when not enough funds are present for verifying or building a transaction Amount of Money missing Safety check, if the FeeRate exceed this value, a policy error is raised Check the standardness of scriptPubKey A data structure precomputing some hash values that are needed for all inputs to be signed in the transaction. The AddressManager, keep a set of peers discovered on the network in cache can update their actual states. Replicate AddressManager of Bitcoin Core, the Buckets and BucketPosition are not guaranteed to be coherent with Bitcoin Core Will properly convert a endpoint to IPEndpoint If endpoint is a DNSEndpoint, a DNS resolution will be made and all addresses added If endpoint is a DNSEndpoint for onion, it will be converted into onioncat address If endpoint is an IPEndpoint it is added to AddressManager The endpoint to add to the address manager The source which advertized this endpoint (default: IPAddress.Loopback) Will properly convert a endpoint to IPEndpoint If endpoint is a DNSEndpoint, a DNS resolution will be made and all addresses added If endpoint is a DNSEndpoint for onion, it will be converted into onioncat address If endpoint is an IPEndpoint it is added to AddressManager The endpoint to add to the address manager The source which advertized this endpoint (default: IPAddress.Loopback) The cancellationToken Choose an address to connect to. The network address of a peer, or null if none are found Return a bunch of addresses, selected at random. Do not advertise or discover new peers Only advertise known peers Only discover peers Advertise known peer and discover peer The AddressManagerBehavior class will respond to getaddr and register advertised nodes from addr messages to the AddressManager. The AddressManagerBehavior will also receive feedback about connection attempt and success of discovered peers to the AddressManager, so it can be used later to find valid peer faster. The minimum number of peers to discover before trying to connect to a node using the AddressManager (Default: 1000) Broadcast a transaction on the hub The transaction to broadcast The cause of the rejection or null If true, the user need to call BroadcastTransactions to ask to the nodes to broadcast it Ask the nodes in the hub to broadcast transactions in the Hub manually The Chain Behavior is responsible for keeping a ConcurrentChain up to date with the peer, it also responds to getheaders messages. If true, the Chain maintained by the behavior with have its ChainedBlock with no Header (default: false) If true, skip PoW checks (default: false) Keep the chain in Sync (Default : true) Respond to getheaders messages (Default : true) Using for test, this might not be reliable Check if any past blocks announced by this peer is in the invalid blocks list, and set InvalidHeaderReceived flag accordingly True if no invalid block is received Sync the chain as headers come from the network (Default : true) Asynchronously try to sync the chain ChainBehaviors sharing this state will not broadcast headers which are above HighestValidatedPoW Maintain connection to a given set of nodes The PingPongBehavior is responsible for firing ping message every PingInterval and responding with pong message, and close the connection if the Ping has not been completed after TimeoutInterval. Whether the behavior send Ping and respond with Pong (Default : Both) Interval after which an unresponded Ping will result in a disconnection. (Default : 20 minutes) Interval after which a Ping message is fired after the last received Pong (Default : 2 minutes) Send a ping asynchronously Behavior to keep a SlimChain in sync with the remote node If the socks endpoint to connect to If the socks proxy is only used for Tor traffic (default: true) Credentials to connect to the SOCKS proxy (Use StreamIsolation instead if you want Tor isolation) Randomize the NetworkCredentials to the Socks proxy Connect to only hidden service nodes over Tor. Prevents connecting to clearnet nodes over Tor. Credentials to connect to the SOCKS proxy (Use StreamIsolation instead if you want Tor isolation) Randomize the NetworkCredentials to the Socks proxy A NodeFilter can intercept messages received and sent. Intercept a message before it can be processed by listeners The message The rest of the pipeline Intercept a message before it is sent to the peer The rest of the pipeline When parsing, maybe Magic is already parsed Addresses from these networks are not publicly routable on the global Internet. TOR (v2 or v3) I2P CJDNS see: https://github.com/bitcoin/bips/blob/master/bip-0155.mediawiki Addresses from these networks are not publicly routable on the global Internet. TOR (v2 or v3) I2P CJDNS Size of IPv4 address (in bytes). Size of IPv6 address (in bytes). Size of TORv2 address (in bytes). Size of TORv3 address (in bytes). This is the length of just the address as used in BIP155, without the checksum and the version byte. Size of I2P address (in bytes). Size of CJDNS address (in bytes). Size of the TORv3 address checksum (in bytes) Size of the TORv3 address version number (in bytes) Prefix of an IPv6 address when it contains an embedded IPv4 address. Used when (un)serializing addresses in ADDRv1 format (pre-BIP155). Prefix of an IPv6 address when it contains an embedded TORv2 address. Used when (un)serializing addresses in ADDRv1 format (pre-BIP155). Such dummy IPv6 addresses are guaranteed to not be publicly routable as they fall under RFC4193's fc00::/7 subnet allocated to unique-local addresses. Prefix of an IPv6 address when it contains an embedded "internal" address. Used when (un)serializing addresses in ADDRv1 format (pre-BIP155). The prefix comes from 0xFD + SHA256("bitcoin")[0:5]. Such dummy IPv6 addresses are guaranteed to not be publicly routable as they fall under RFC4193's fc00::/7 subnet allocated to unique-local addresses. Location until which synchronization should be stopped (default: null) Skip PoW check Strip headers from the retrieved chain Connect to a random node on the network The network to connect to The addrman used for finding peers The parameters used by the found node The already connected endpoints, the new endpoint will be select outside of existing groups Connect to a random node on the network The network to connect to The parameters used by the found node, use AddressManagerBehavior.GetAddrman for finding peers The already connected endpoints, the new endpoint will be select outside of existing groups Group selector, by default NBicoin.IpExtensions.GetGroup Connect to the node of this machine Send a message to the peer asynchronously The payload to send The node has been disconnected Send a message to the peer synchronously The payload to send Payload is null The node has been disconnected, or the cancellation token has been set to canceled The negociated protocol version (minimum of supported version between MyVersion and the PeerVersion) Send addr unsolicited message of the AddressFrom peer when passing to Handshaked state Transaction options we would like Transaction options supported by the peer Transaction options supported by the peer Transaction options we prefer and which is also supported by peer Get the chain of headers from the peer (thread safe) The synchronization chain options The chain of headers Get the chain of block hashes from the peer (thread safe) Location until which synchronization should be stopped (default: null) The chain of headers Get the chain of headers from the peer (thread safe) The highest block wanted The chain of headers Synchronize a given Chain to the tip of this node if its height is higher. (Thread safe) The chain to synchronize The synchronisation options The chain of block retrieved Synchronize a given Chain to the tip of this node if its height is higher. (Thread safe) The chain to synchronize The location until which it synchronize The chain of block retrieved Synchronize a given SlimChain to the tip of this node if its height is higher. The chain to synchronize The location until which it synchronize Task which finish when complete Create a listener that will queue messages until disposed The listener Thrown if used on the listener's thread, as it would result in a deadlock Retrieve transactions from the mempool Cancellation token Transactions in the mempool Retrieve transactions from the mempool by ids Transaction ids to retrieve Cancellation token The transactions, if a transaction is not found, then it is not returned in the array. Add supported option to the input inventory type Inventory type (like MSG_TX) Inventory type with options (MSG_TX | MSG_WITNESS_FLAG) Emit a ping and wait the pong Latency Send addr unsolicited message of the AddressFrom peer when passing to Handshaked state If true, the node will receive all incoming transactions if no bloomfilter are set The parameters that will be cloned and applied for each node connecting to the NodeServer Start connecting asynchronously to remote peers Drop connection to all connected nodes Asynchronously create a new set of nodes The number of node that this behavior will try to maintain online (Default : 8) If false, the search process will do its best to connect to Node in different network group to prevent sybil attacks. (Default : false) If CustomGroupSelector is set, AllowSameGroup is ignored. How to calculate a group of an ip, by default using NBitcoin.IpExtensions.GetGroup. Overrides AllowSameGroup. Same as Disconnect An available peer address in the bitcoin network is announced (unsolicited or after a getaddr) An available peer address in the bitcoin network is announced (unsolicited or after a getaddrv2) A block received after being asked with a getdata message Represents the p2p message payload used for sharing a block's compact filter. Gets the Filter type for which headers are requested. Gets the serialized compact filter for this block. Gets block hash of the Bitcoin block for which the filter is being returned. Load a bloomfilter in the peer, used by SPV clients Ask for known peer addresses in the network Ask for the block hashes (inv) that happened since BlockLocators Represents the p2p message payload used for requesting a range of compact filter/headers. Gets the Filter type for which headers are requested. Gets the height of the first block in the requested range. Gets the hash of the last block in the requested range. Represents the p2p message payload used for requesting a range of compact filter. Represents the p2p message payload used for requesting a range of compact filter headers. Gets the Filter type for which headers are requested. Gets the hash of the last block in the requested range. Ask for transaction, block or merkle block Ask block headers that happened since BlockLocators Block headers received after a getheaders messages Announce the hash of a transaction or block Ask for the mempool, followed by inv messages A merkle block received after being asked with a getdata message A getdata message for an asked hash is not found by the remote peer Ask for known peer addresses in the network Represents a transaction being sent on the network, is sent after being requested by a getdata (of Transaction or MerkleBlock) message. NODE_NETWORK means that the node is capable of serving the block chain. It is currently set by all Bitcoin Core nodes, and is unset by SPV clients or other peers that just want network services but don't provide them. NODE_GETUTXO means the node is capable of responding to the getutxo protocol request. Bitcoin Core does not support this but a patch set called Bitcoin XT does. See BIP 64 for details on how this is implemented. NODE_BLOOM means the node is capable and willing to handle bloom-filtered connections. Bitcoin Core nodes used to support this by default, without advertising this bit, but no longer do as of protocol version 70011 (= NO_BLOOM_VERSION) Indicates that a node can be asked for blocks and transactions including witness data. NODE_NETWORK_LIMITED means the same as NODE_NETWORK with the limitation of only serving the last 288 (2 day) blocks See BIP159 for details on how this is implemented. Set value before connecting Set value before connecting Set value before connecting Set value before connecting Disconnect from peers older than this protocol version nTime field added to CAddress, starting with this version; if possible, avoid requesting addresses nodes older than this BIP 0031, pong message, is enabled for all versions AFTER this one "mempool" command, enhanced "getdata" behavior starts with this version ! "filter*" commands are disabled without NODE_BLOOM after and including this version ! "sendheaders" command and announcing blocks with headers starts with this version ! Version after which witness support potentially exists short-id-based block download starts with this version Support checksum at p2p message level Derive P2PKH addresses (P2PKH) Only use this for legacy code or coins not supporting segwit Derive Segwit (Bech32) addresses (P2WPKH) This will result in the cheapest fees. This is the recommended choice. Derive P2SH address of a Segwit address (P2WPKH-P2SH) Use this when you worry that your users do not support Bech address format. Derive the taproot address of this pubkey following BIP86. This public key is used as the internal key, the output key is computed without script path. (The tweak is SHA256(internal_key)) Create a new Public key from string Create a new Public key from byte array byte array Create a new Public key from byte array byte array Quick sanity check on public key format. (size + first byte) bytes array Exchange shared secret through ECDH Private key Shared pubkey Verbosity option you can pass to `GetBlock` rpc call. If you want a raw block without metadata, (i.e. `0` verbosity for the rpc call) you should just call the method without this option. Verbosity `1` for the rpc call. Block itself will not be included in response if you specify this. However, txids in the block will be included in `TxIds` field in the response anyway. Verbosity `2` for the rpc call. Use this if you want *both* full block and its metadata. This field exists only when the block is not on the tip. This field exists only when you specified `WithFullTx` verbosity the block hash The number of confirmations Coinbase or not The type, eg pubkeyhash Returns true if Address property is populated AND ScriptPubKey is not. If Address and ScriptPubKey are populated, ScriptPubKey takes precedence. Creation time of the key, keep null if this address has just been generated Custom JsonConverter to deal with loose type of scriptPubKey property in the ImportMulti method Minimum value of each UTXO Maximum value of each UTXO Maximum number of UTXOs Minimum sum value of all UTXOs Client class for the unauthenticated REST Interface Gets the instance for the client. Initializes a new instance of the class. The rest API endpoint Null rest API endpoint Invalid value for RestResponseFormat Initializes a new instance of the class. The rest API endpoint The network to operate with Null rest API endpoint Invalid value for RestResponseFormat Gets the block. The block identifier. Given a block hash (id) returns the requested block object. blockId cannot be null. Gets the block. The block identifier. Given a block hash (id) returns the requested block object. blockId cannot be null. Gets a transaction. The transaction identifier. Given a transaction hash (id) returns the requested transaction object. txId cannot be null Gets a transaction. The transaction identifier. Given a transaction hash (id) returns the requested transaction object. txId cannot be null Gets blocks headers. The initial block identifier. how many headers to get. Given a block hash (blockId) returns as much block headers as specified. blockId cannot be null count must be greater or equal to one. Gets blocks headers. The initial block identifier. how many headers to get. Given a block hash (blockId) returns as much block headers as specified. blockId cannot be null count must be greater or equal to one. Gets the chain information. Gets unspect outputs. The out points identifiers (TxIn-N). if set to true [check mempool]. The unspent transaction outputs (UTXO) for the given outPoints. outPoints cannot be null. Use default bitcoin parameters to configure a RPCClient. The network used by the node. Must not be null. The RPC Capabilities of this RPCClient instance, this property will be set by a call to ScanRPCCapabilitiesAsync Run several RPC function to scan the RPC capabilities, then set RPCClient.Capabilities The RPCCapabilities Run several RPC function to scan the RPC capabilities, then set RPCClient.RPCCapabilities The RPCCapabilities Create a new RPCClient instance username:password, the content of the .cookie file, or cookiefile=pathToCookieFile Create a new RPCClient instance username:password or the content of the .cookie file or null to auto configure Send all commands in one batch Cancel all commands Returns the total uptime of the server. Returns the total uptime of the server. Get the progress report (in %) of the current scan The progress in % Get the progress report (in %) of the current scan The progress in % Aborting the current scan Returns true when abort was successful Aborting the current scan Returns true when abort was successful Send all commands in one batch Since bitcoin core 0.20, if a RPC batch request is made, and one of the request fails due to permission issue (whitelisting feature), the whole RPC Batch would fail, throwing a HttpRequestException. If we set AllowBatchFallback to true, we will fallback by sending all requests in the batch one by one. However, only use this for idempotent operations. When a batch operation fails because of permission issue, some of the requests in the batch may nevertheless have succeed without Bitcoin Core giving a clue about which one. Get the a whole block Get the a whole block Retrieve a BIP 157 content filter for a particular block. The hash of the block. Retrieve a BIP 157 content filter for a particular block. The hash of the block. Returns details about an unspent transaction output. The transaction id vout number Whether to include the mempool. Note that an unspent output that is spent in the mempool won't appear. null if spent or never existed Returns details about an unspent transaction output. The transaction id vout number Whether to include the mempool. Note that an unspent output that is spent in the mempool won't appear. null if spent or never existed Returns statistics about the unspent transaction output (UTXO) set Parsed object containing all info GetTransactions only returns on txn which are not entirely spent unless you run bitcoinq with txindex=1. getrawtransaction only returns on txn which are not entirely spent unless you run bitcoinq with txindex=1. (>= Bitcoin Core v0.14) Get the estimated fee per kb for being confirmed in nblock If Capabilities is set and estimatesmartfee is not supported, will fallback on estimatefee Confirmation target in blocks (1 - 1008) Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. The estimated fee rate, block number where estimate was found The Fee rate couldn't be estimated because of insufficient data from Bitcoin Core (>= Bitcoin Core v0.14) Tries to get the estimated fee per kb for being confirmed in nblock If Capabilities is set and estimatesmartfee is not supported, will fallback on estimatefee Confirmation target in blocks (1 - 1008) Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. The estimated fee rate, block number where estimate was found or null (>= Bitcoin Core v0.14) Tries to get the estimated fee per kb for being confirmed in nblock If Capabilities is set and estimatesmartfee is not supported, will fallback on estimatefee Confirmation target in blocks (1 - 1008) Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. The estimated fee rate, block number where estimate was found or null (>= Bitcoin Core v0.14) Get the estimated fee per kb for being confirmed in nblock If Capabilities is set and estimatesmartfee is not supported, will fallback on estimatefee Confirmation target in blocks (1 - 1008) Whether to return a more conservative estimate which also satisfies a longer history. A conservative estimate potentially returns a higher feerate and is more likely to be sufficient for the desired target, but is not as responsive to short term drops in the prevailing fee market. The estimated fee rate, block number where estimate was found when fee couldn't be estimated (>= Bitcoin Core v0.14) Requires wallet support. Requires an unlocked wallet or an unencrypted wallet. A P2PKH or P2SH address to which the bitcoins should be sent The amount to spend The TXID of the sent transaction Requires wallet support. Requires an unlocked wallet or an unencrypted wallet. A P2PKH or P2SH address to which the bitcoins should be sent The amount to spend The TXID of the sent transaction Requires wallet support. Requires an unlocked wallet or an unencrypted wallet. A P2PKH or P2SH address to which the bitcoins should be sent The amount to spend The TXID of the sent transaction Requires wallet support. Requires an unlocked wallet or an unencrypted wallet. A P2PKH or P2SH address to which the bitcoins should be sent The amount to spend The TXID of the sent transaction Requires wallet support. Requires an unlocked wallet or an unencrypted wallet. The scriptPubKey where the bitcoins should be sent The amount to spend The TXID of the sent transaction Requires wallet support. Requires an unlocked wallet or an unencrypted wallet. The scriptPubKey where the bitcoins should be sent The amount to spend The TXID of the sent transaction Requires wallet support. Requires an unlocked wallet or an unencrypted wallet. A P2PKH or P2SH address to which the bitcoins should be sent The amount to spend The TXID of the sent transaction Requires wallet support. Requires an unlocked wallet or an unencrypted wallet. A P2PKH or P2SH address to which the bitcoins should be sent The amount to spend The TXID of the sent transaction Permanently marks a block as invalid, as if it violated a consensus rule. the hash of the block to mark as invalid Permanently marks a block as invalid, as if it violated a consensus rule. the hash of the block to mark as invalid Add the address of a potential peer to the address manager. This RPC is for testing only. Add the address of a potential peer to the address manager. This RPC is for testing only. throws an error if an address is not from the wallet. Returns the total amount received by the specified address in transactions with at least one (default) confirmations. It does not count coinbase transactions. The address whose transactions should be tallied. The number of bitcoins received by the address, excluding coinbase transactions. May be 0. Returns the total amount received by the specified address in transactions with at least one (default) confirmations. It does not count coinbase transactions. The address whose transactions should be tallied. The number of bitcoins received by the address, excluding coinbase transactions. May be 0. Returns the total amount received by the specified address in transactions with the specified number of confirmations. It does not count coinbase transactions. The minimum number of confirmations an externally-generated transaction must have before it is counted towards the balance. Transactions generated by this node are counted immediately. Typically, externally-generated transactions are payments to this wallet and transactions generated by this node are payments to other wallets. Use 0 to count unconfirmed transactions. Default is 1. The number of bitcoins received by the address, excluding coinbase transactions. May be 0. Returns the total amount received by the specified address in transactions with the specified number of confirmations. It does not count coinbase transactions. The minimum number of confirmations an externally-generated transaction must have before it is counted towards the balance. Transactions generated by this node are counted immediately. Typically, externally-generated transactions are payments to this wallet and transactions generated by this node are payments to other wallets. Use 0 to count unconfirmed transactions. Default is 1. The number of bitcoins received by the address, excluding coinbase transactions. May be 0. If you specify this, This method tries to serialize OutputDescriptor with the private key (If there is any entry in the repository). Returns an array of unspent transaction outputs belonging to this wallet. Note: as of Bitcoin Core 0.10.0, outputs affecting watch-only addresses will be returned; see the spendable field in the results. Returns an array of unspent transaction outputs belonging to this wallet, specifying the minimum and maximum number of confirmations to include, and the list of addresses to include. Returns an array of unspent transaction outputs belonging to this wallet. Returns an array of unspent transaction outputs belonging to this wallet, specifying the minimum and maximum number of confirmations to include, and the list of addresses to include. Returns an array of unspent transaction outputs belonging to this wallet, with query_options and the list of addresses to include. MinimumAmount - Minimum value of each UTXO MaximumAmount - Maximum value of each UTXO MaximumCount - Maximum number of UTXOs MinimumSumAmount - Minimum sum value of all UTXOs Marks a transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. the transaction id to be marked as abandoned. Marks a transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. the transaction id to be marked as abandoned. The walletpassphrase RPC stores the wallet decryption key in memory for the indicated number of seconds.Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock time that overrides the old one. The passphrase Timeout in seconds The walletpassphrase RPC stores the wallet decryption key in memory for the indicated number of seconds.Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock time that overrides the old one. The passphrase Timeout in seconds Sign a transaction, if RPCClient.Capabilities is set, will call SignRawTransactionWithWallet if available The transaction to be signed The signed transaction Sign a transaction, if RPCClient.Capabilities is set, will call SignRawTransactionWithWallet if available The transaction to be signed The signed transaction Sign a transaction The transaction to be signed The signed transaction Sign a transaction The transaction to be signed The signed transaction Sign a transaction with wallet keys The transaction to be signed The signed transaction Sign a transaction with wallet keys The transaction to be signed The signed transaction The transaction id (must be in mempool.) Virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. Local time transaction entered pool in seconds since 1 Jan 1970 GMT. Block height when transaction entered pool. Number of in-mempool descendant transactions (including this one.) Virtual transaction size of in-mempool descendants (including this one.) Number of in-mempool ancestor transactions (including this one.) Virtual transaction size of in-mempool ancestors (including this one.) Hash of serialized transaction, including witness data. Transaction fee. Transaction fee with fee deltas used for mining priority. Modified fees (see above) of in-mempool ancestors (including this one.) Modified fees (see above) of in-mempool descendants (including this one.) Unconfirmed transactions used as inputs for this transaction. Unconfirmed transactions spending outputs from this transaction. A locally-stored (not broadcast) comment assigned to this transaction. Default is no comment. A locally-stored (not broadcast) comment assigned to this transaction. Meant to be used for describing who the payment was sent to. Default is no comment. The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. Default is false. Allow this transaction to be replaced by a transaction with higher fees. Confirmation target in blocks The fee estimate mode Specify a fee rate in sat/vB. Use default connection settings of the chain Name of the wallet in multi wallet mode Path to cookie file Username and password RPC error code thrown by the RPC_INVALID_REQUEST is internally mapped to HTTP_BAD_REQUEST (400). It should not be used for application-layer errors. RPC_METHOD_NOT_FOUND is internally mapped to HTTP_NOT_FOUND (404). It should not be used for application-layer errors. RPC_INTERNAL_ERROR should only be used for genuine errors in bitcoind (for example datadir corruption). std::exception thrown in command handling Server is in safe mode, and command is not allowed in safe mode Unexpected type was passed as parameter Invalid address or key Ran out of memory during operation Invalid, missing or duplicate parameter Database error Error parsing or validating structure in raw format General error during transaction or block submission Transaction or block was rejected by network rules Transaction already in chain Client still warming up RPC method is deprecated Bitcoin is not connected Still downloading initial blocks Node is already added Node has not been added before Node to disconnect not found in connected nodes Invalid IP/Subnet No valid connection manager instance found Unspecified problem with wallet (key not found etc.) Not enough funds in wallet or account Invalid account name Keypool ran out, call keypoolrefill first Enter the wallet passphrase with walletpassphrase first The wallet passphrase entered was incorrect Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.) Failed to encrypt the wallet Wallet is already unlocked Invalid wallet specified No wallet specified (error when there are multiple wallets loaded) The range of HD chain indexes to explore The range of HD chain indexes to explore Redeem script (required for P2SH or P2WSH) An json array of previous dependent transaction outputs The transaction to sign The signature hash type A json array of base58-encoded private keys for signing The outpoint referenced The raw transaction with signature If the transaction has a complete set of signatures Script verification errors (if there are any) Script verification flags Evaluate P2SH subscripts (softfork safe, BIP16). Passing a non-strict-DER signature or one with undefined hashtype to a checksig operation causes script failure. Passing a pubkey that is not (0x04 + 64 bytes) or (0x02 or 0x03 + 32 bytes) to checksig causes that pubkey to be + skipped (not softfork safe: this flag can widen the validity of OP_CHECKSIG OP_NOT). Passing a non-strict-DER signature to a checksig operation causes script failure (softfork safe, BIP62 rule 1) Passing a non-strict-DER signature or one with S > order/2 to a checksig operation causes script failure (softfork safe, BIP62 rule 5). verify dummy stack item consumed by CHECKMULTISIG is of zero-length (softfork safe, BIP62 rule 7). Using a non-push operator in the scriptSig causes script failure (softfork safe, BIP62 rule 2). Require minimal encodings for all push operations (OP_0... OP_16, OP_1NEGATE where possible, direct pushes up to 75 bytes, OP_PUSHDATA up to 255 bytes, OP_PUSHDATA2 for anything larger). Evaluating any other push causes the script to fail (BIP62 rule 3). In addition, whenever a stack element is interpreted as a number, it must be of minimal length (BIP62 rule 4). (softfork safe) Discourage use of NOPs reserved for upgrades (NOP1-10) Provided so that nodes can avoid accepting or mining transactions containing executed NOP's whose meaning may change after a soft-fork, thus rendering the script invalid; with this flag set executing discouraged NOPs fails the script. This verification flag will never be a mandatory flag applied to scripts in a block. NOPs that are not executed, e.g. within an unexecuted IF ENDIF block, are *not* rejected. Require that only a single stack element remains after evaluation. This changes the success criterion from "At least one stack element must remain, and when interpreted as a boolean, it must be true" to "Exactly one stack element must remain, and when interpreted as a boolean, it must be true". (softfork safe, BIP62 rule 6) Note: CLEANSTACK should never be used without P2SH. Verify CHECKLOCKTIMEVERIFY See BIP65 for details. See BIP68 for details. Support segregated witness Making v2-v16 witness program non-standard Segwit script only: Require the argument of OP_IF/NOTIF to be exactly 0x01 or empty vector Signature(s) must be empty vector if an CHECK(MULTI)SIG operation failed Public keys in segregated witness scripts must be compressed Some altcoins like BCash and BGold requires ForkId inside the sigHash Making unknown Taproot leaf versions non-standard Mandatory script verification flags that all new blocks must comply with for them to be valid. (but old blocks may not comply with) Currently just P2SH, but in the future other flags may be added, such as a soft-fork to enforce strict DER encoding. Failing one of these tests may trigger a DoS ban - see CheckInputs() for details. Standard script verification flags that standard transactions will comply with. However scripts violating these flags may still be present in valid blocks and we must accept those blocks. Strict consensus script verification flags that are checked by the Bitcoin Core consensus library before validating the transaction. Signature hash types/flags All outputs are signed No outputs as signed Only the output with the same index as this input is signed If set, no inputs, except this, are part of the signature Signature hash types/flags for taproot transactions All outputs are signed No outputs as signed Only the output with the same index as this input is signed If set, no inputs, except this, are part of the signature Script opcodes Key spend Script spend Extract the ScriptCode delimited by the codeSeparatorIndex th OP_CODESEPARATOR. Index of the OP_CODESEPARATOR, or -1 for fetching the whole script Get the P2SH scriptPubKey of this script Extract P2SH or P2PKH address from scriptSig The network Extract P2SH or P2PKH id from scriptSig The network Extract P2SH/P2PKH/P2WSH/P2WPKH/P2TR address from scriptPubKey Extract P2SH/P2PKH/P2WSH/P2WPKH/P2TR id from scriptPubKey Extract public keys if this script is a multi sig or pay to pub key scriptPubKey Get script byte array Get script byte array if false, returns a copy of the internal byte array Returns 1 if the input nIn of the serialized transaction pointed to by txTo correctly spends the scriptPubKey pointed to by scriptPubKey under the additional constraints specified by flags. If not NULL, err will contain an error/success code for the operation Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers. The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1], but results may overflow (and are valid as long as they are not used in a subsequent numeric operation). CScriptNum enforces those semantics by storing results as an int64 and allowing out-of-range values to be returned as a vector of bytes but throwing an exception if arithmetic is done or the result is interpreted as an integer. ContextStack is used internally by the bitcoin script evaluator. This class contains operations not typically available in a "pure" Stack class, as example: Insert, Swap, Erase and Top (Peek w/index) Initializes a new instance of the class. Initializes a new instance of the base on another stack. This is for copy/clone. The stack. Gets the number of items in the stack. Pushes the specified item on the stack. The item to by pushed. Pops this element in top of the stack. The element in top of the stack Pops as many items as specified. The number of items to be poped Cannot remove more elements Returns the i-th element from the top of the stack. The i-th index. the i-th element from the top of the stack topIndex Swaps the specified i and j elements in the stack. The i-th index. The j-th index. i or j Inserts an item in the specified position. The position. The value. Removes the i-th item. The item position Removes items from the i-th position to the j-th position. The item position The item position Returns a copy of the internal array. A copy of the internal array Implements a reverse enumerator for the ContextStack Expand descriptor into actual scriptPubKeys. position index to expand provider to inject private keys in case of hardened derivation repository to which to put resulted information. resulted scriptPubKey Expand descriptor into actual scriptPubKeys. TODO: cache position index to expand provider to inject private keys in case of hardened derivation repository to which to put resulted information. resulted scriptPubKey Infer the address type for that descriptor. When it is impossible, just return null. e.g. In case of descriptors those are agnostic to the actual scriptpubkey format (e.g. "multi"), it just returns null. The character set for the checksum itself (same as bech32). Parse a string of characters. Convert a stream of characters to a string. Parse a number. Parse a decimal number with separator '.'. Parse a stream of elements, failing if any element is only partially parsed. The type of element to parse. A parser that matches a single element. A that matches the sequence. Using may be preferable to where the first character of each match identified by is sufficient to determine whether the entire match should succeed. The X* methods typically give more helpful errors and are easier to debug than their unqualified counterparts. TryParse a stream of elements with at least one item. TryParse a stream of elements with at least one item. Except the first item, all other items will be matched with the XMany operator. Lift to a parser monad world Take the result of parsing, and project it onto a different domain. Refer to another parser indirectly. This allows circular compile-time dependency between parsers. Parse first, if it succeeds, return first, otherwise try second. Assumes that the first parsed character will determine the parser chosen (see Try). Concatenate two streams of elements. Version of Return with simpler inline syntax. Attempt parsing only if the parser fails. Parse a sequence of items until a terminator is reached. Returns the sequence, discarding the terminator. Succeed if the parsed value matches predicate. Monadic combinator Then, adapted for Linq comprehension syntax. Chain a left-associative operator. Chain a left-associative operator. Chain a right-associative operator. Chain a right-associative operator. Tries to parse the input without throwing an exception. The type of the result. The parser. The input. The result of the parser Parses the specified input string. The type of the result. The parser. The input. The result of the parser. It contains the details of the parsing error. Represents an error that occurs during parsing. Initializes a new instance of the class. Initializes a new instance of the class with a specified error message. The message that describes the error. Initializes a new instance of the class with a specified error message and the position where the error occured. The message that describes the error. The position where the error occured. Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. Gets the position of the parsing failure if one is available; otherwise, null. Public key objects in descriptors. Wrapper for other pubkey provider which contains (parent key finger print + relative derivation path to inner Pubkey provider) In case of the hardend derivation. You must give private key by this to derive child Double multiply: R = na*A + ng*G (secp256k1_ecmult) R = inp_g_sc * G + SUM(scalars[i] * points[i]) The scalar for point G The scalars The points Advanced options R R = inp_g_sc * G + SUM(scalars[i] * points[i]) The scalar for point G The scalars The points The implementation R = inp_g_sc * G + SUM(scalars[i] * points[i]) The scalar for point G The scalars The points R = SUM(scalars[i] * points[i]) The scalars The points Fill a table 'pre' with precomputed odd multiples of a. There are two versions of this function: - secp256k1_ecmult_odd_multiples_table_globalz_windowa which brings its resulting point set to a single constant Z denominator, stores the X and Y coordinates as ge_storage points in pre, and stores the global Z in rz. It only operates on tables sized for WINDOW_A wnaf multiples. - secp256k1_ecmult_odd_multiples_table_storage_var, which converts its resulting point set to actually affine points, and stores those in pre. It operates on tables of any size, but uses heap-allocated temporaries. To compute a*P + b*G, we compute a table for P using the first function, and for G using the second (which requires an inverse, but it only needs to happen once). Returns optimal bucket_window (number of bits of a scalar represented by a set of buckets) for a given number of points. Fill a table 'prej' with precomputed odd multiples of a. Prej will contain the values [1*a,3*a,...,(2*n-1)*a], so it space for n values. zr[0] will contain prej[0].z / a.z. The other zr[i] values = prej[i].z / prej[i-1].z. Prej's Z values are undefined, except for the last value. Multiply with the generator: R = a*G (secp256k1_ecmult_gen) A scalar to multiply to G The result of a*G A pointer to a function to deterministically generate a nonce. Returns: 1 if a nonce was successfully generated. 0 will cause signing to fail. Out: nonce32: pointer to a 32-byte array to be filled by the function. In: msg32: the 32-byte message hash being verified (will not be NULL) key32: pointer to a 32-byte secret key (will not be NULL) algo16: pointer to a 16-byte array describing the signature algorithm (will be NULL for ECDSA for compatibility). data: Arbitrary data pointer that is passed through. attempt: how many iterations we have tried to find a nonce. This will almost always be 0, but different attempt values are required to result in a different nonce. Except for test cases, this function should compute some cryptographic hash of the message, the algorithm, the key and the attempt. Compute the public key for a secret key. This instance has been disposed A public key Tweak a private key by adding tweak to it. secp256k1_ec_privkey_tweak_add 32 bytes tweak If the tweak is not 32 bytes or if the tweak was out of range (chance of around 1 in 2^128 for uniformly random 32-byte arrays, or if the resulting private key would be invalid(only when the tweak is the complement of the private key) This instance has been disposed A tweaked private key Tweak a private key by adding tweak to it. secp256k1_ec_privkey_tweak_add 32 bytes tweak False If the tweak is not 32 bytes or if the tweak was out of range (chance of around 1 in 2^128 for uniformly random 32-byte arrays, or if the resulting private key would be invalid(only when the tweak is the complement of the private key) This instance has been disposed A tweaked private key Tweak a private key by multiplying it by a tweak value. secp256k1_ec_privkey_tweak_mul 32 bytes tweak False If the tweak is not 32 bytes or if the tweak was out of range (chance of around 1 in 2^128 for uniformly random 32-byte arrays, or if the resulting private key would be invalid(only when the tweak is the complement of the private key) This instance has been disposed A tweaked private key Tweak a private key by multiplying it by a tweak value. secp256k1_ec_privkey_tweak_mul 32 bytes tweak False If the tweak is not 32 bytes or if the tweak was out of range (chance of around 1 in 2^128 for uniformly random 32-byte arrays, or if the resulting private key would be invalid(only when the tweak is the complement of the private key) This instance has been disposed A tweaked private key Create a non deterministic BIP340 schnorr signature. With Auxiliary random data taken from secure RNG. 32 bytes message to sign A schnorr signature Create a deterministic BIP340 schnorr signature. With auxiliary random data passed in parameter. 32 bytes message to sign Auxiliary random data A schnorr signature Group order for secp256k1 defined as 'n' in "Standards for Efficient Cryptography" (SEC2) 2.7.1 sage: for t in xrange(1023, -1, -1): .. p = 2**256 - 2**32 - t .. if p.is_prime(): .. print '%x'%p .. break 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f' sage: a = 0 sage: b = 7 sage: F = FiniteField (p) sage: '%x' % (EllipticCurve ([F (a), F (b)]).order()) 'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141' Difference between field and order, values 'p' and 'n' values defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. sage: p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F sage: a = 0 sage: b = 7 sage: F = FiniteField (p) sage: '%x' % (p - EllipticCurve ([F (a), F (b)]).order()) '14551231950b75fc4402da1722fc9baee' The original function name is `secp256k1_ec_pubkey_combine` Write the 32 bytes of the X value of the public key to output32 Checks that a tweaked pubkey is the result of calling AddTweak on internalPubKey and tweak32 The internal PubKey The tweak to add to internalPubKey The expected parity Create a field element from uint, most significative uint first. (big endian) A field element Prefix byte used to tag various encoded curvepoints for specific purposes Generator for secp256k1, value 'g' defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. Keeps a group element as is if it has an even Y and otherwise negates it. parity is set to 0 in the former case and to 1 in the latter case. Requires that the coordinates of r are normalized. Keeps a group element as is if it has an even Y and otherwise negates it. Requires that the coordinates of r are normalized. Multiply this group element by q in constant time (secp256k1_ecmult_const) The scalar to multiply to Here `bits` should be set to the maximum bitlength of the _absolute value_ of `q` plus one because we internally sometimes add 2 to the number during the WNAF conversion. Pick the optimum algorithm depending on the size of the batch The number of scalars until the Auto implementation pick pippenger algorithm over strauss (Default: 88) The implementation to pick This function derives a random secret nonce that will be required for signing and creates a private nonce whose public part intended to be sent to other signers. A private nonce whose public part intended to be sent to other signers This function derives a secret nonce that will be required for signing and creates a private nonce whose public part intended to be sent to other signers. A unique session_id32. It is a "number used once". If empty, it will be randomly generated. A private nonce whose public part intended to be sent to other signers This function derives a secret nonce that will be required for signing and creates a private nonce whose public part intended to be sent to other signers. A unique counter. Never reuse the same value twice for the same msg32/pubkeys. Provide the message to be signed to increase misuse-resistance. If you do provide a signingKey, sessionId32 can instead be a counter (that must never repeat!). However, it is recommended to always choose session_id32 uniformly at random. Can be null. A private nonce whose public part intended to be sent to other signers This function derives a secret nonce that will be required for signing and creates a private nonce whose public part intended to be sent to other signers. A unique session_id32. It is a "number used once". If empty, it will be randomly generated. Provide the message to be signed to increase misuse-resistance. If you do provide a signingKey, sessionId32 can instead be a counter (that must never repeat!). However, it is recommended to always choose session_id32 uniformly at random. Can be null. A private nonce whose public part intended to be sent to other signers This function derives a secret nonce that will be required for signing and creates a private nonce whose public part intended to be sent to other signers. A unique session_id32. It is a "number used once". If empty, it will be randomly generated. Provide the message to be signed to increase misuse-resistance. If you do provide a signingKey, sessionId32 can instead be a counter (that must never repeat!). However, it is recommended to always choose session_id32 uniformly at random. Can be null. Provide the message to be signed to increase misuse-resistance. The extra_input32 argument can be used to provide additional data that does not repeat in normal scenarios, such as the current time. Can be empty. A private nonce whose public part intended to be sent to other signers This function derives a secret nonce that will be required for signing and creates a private nonce whose public part intended to be sent to other signers. The context A unique session_id32. It is a "number used once". If empty, it will be randomly generated. Provide the message to be signed to increase misuse-resistance. If you do provide a signingKey, sessionId32 can instead be a counter (that must never repeat!). However, it is recommended to always choose session_id32 uniformly at random. Can be null. Provide the message to be signed to increase misuse-resistance. Can be empty. Provide the message to be signed to increase misuse-resistance. Can be null. Provide the message to be signed to increase misuse-resistance. The extra_input32 argument can be used to provide additional data that does not repeat in normal scenarios, such as the current time. Can be empty. A private nonce whose public part intended to be sent to other signers Extract the lowest 32 bits of (c0,c1,c2) into n, and left shift the number 32 bits. The Secp256k1 curve has an endomorphism, where lambda * (x, y) = (beta * x, y), where lambda is {0x53,0x63,0xad,0x4c,0xc0,0x5c,0x30,0xe0,0xa5,0x26,0x1c,0x02,0x88,0x12,0x64,0x5a, 0x12,0x2e,0x22,0xea,0x20,0x81,0x66,0x78,0xdf,0x02,0x96,0x7c,0x1b,0x23,0xbd,0x72} "Guide to Elliptic Curve Cryptography" (Hankerson, Menezes, Vanstone) gives an algorithm (algorithm 3.74) to find k1 and k2 given k, such that k1 + k2 * lambda == k mod n, and k1 and k2 have a small size. It relies on constants a1, b1, a2, b2. These constants for the value of lambda above are: - a1 = {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15} - b1 = -{0xe4,0x43,0x7e,0xd6,0x01,0x0e,0x88,0x28,0x6f,0x54,0x7f,0xa9,0x0a,0xbf,0xe4,0xc3} - a2 = {0x01,0x14,0xca,0x50,0xf7,0xa8,0xe2,0xf3,0xf6,0x57,0xc1,0x10,0x8d,0x9d,0x44,0xcf,0xd8} - b2 = {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15} The algorithm then computes c1 = round(b1 * k / n) and c2 = round(b2 * k / n), and gives k1 = k - (c1*a1 + c2*a2) and k2 = -(c1*b1 + c2*b2). Instead, we use modular arithmetic, and compute k1 as k - k2 * lambda, avoiding the need for constants a1 and a2. g1, g2 are precomputed constants used to replace division with a rounded multiplication when decomposing the scalar for an endomorphism-based point multiplication. The possibility of using precomputed estimates is mentioned in "Guide to Elliptic Curve Cryptography" (Hankerson, Menezes, Vanstone) in section 3.5. The derivation is described in the paper "Efficient Software Implementation of Public-Key Cryptography on Sensor Networks Using the MSP430X Microcontroller" (Gouvea, Oliveira, Lopez), Section 4.3 (here we use a somewhat higher-precision estimate): d = a1*b2 - b1*a2 g1 = round((2^272)*b2/d) g2 = round((2^272)*b1/d) (Note that 'd' is also equal to the curve order here because [a1,b1] and [a2,b2] are found as outputs of the Extended Euclidean Algorithm on inputs 'order' and 'lambda'). The function below splits a in r1 and r2, such that r1 + lambda * r2 == a (mod order). This nonce function is described in BIP-schnorr (https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki) Create a signature from r and s If true, will check that r and s are not zero or overflow. If false, we assume the caller made the checks Thrown if enforceCheck is true and r or s is not valid Initializes a sha256 struct and writes the 64 byte string SHA256(tag)||SHA256(tag) into it. Initializes a sha256 struct and writes the 64 byte string SHA256(tag)||SHA256(tag) into it. If this flag set, CTxIn::nSequence is NOT interpreted as a relative lock-time. If CTxIn::nSequence encodes a relative lock-time and this flag is set, the relative lock-time has units of 512 seconds, otherwise it specifies blocks with a granularity of 1. If CTxIn::nSequence encodes a relative lock-time, this mask is applied to extract that lock-time from the sequence field. Setting nSequence to this value for every input in a transaction disables nLockTime. */ If this flag set, CTxIn::nSequence is NOT interpreted as a relative lock-time. Setting the most significant bit of a sequence number disabled relative lock-time. Setting nSequence to this value on any input in a transaction to signal the transaction is replaceable. */ In order to use the same number of bits to encode roughly the same wall-clock duration, and because blocks are naturally limited to occur every 600s on average, the minimum granularity for time-based relative lock-time is fixed at 512 seconds. Converting from CTxIn::nSequence to seconds is performed by multiplying by 512 = 2^9, or equivalently shifting up by 9 bits. Interface for injecting security sensitive stuffs to other objects. This is equivalent to `SigningProvider` class in bitcoin core. Currently used in OutputDescriptor to safely inject private key information In case of Witness Script, use HashForLookup Property as a key. In case of Witness Script, use HashForLookup property as a key. Consume the argument and take everything it holds. This method should at least support consuming `FlatSigningRepository`. A thread safe, memory optimized chain of hashes representing the current chain Set a new tip in the chain The new tip The block hash before the new tip If true and the new tip is already included somewhere in the chain, do nothing True if newTip is the new tip Returns the first found block Hash to search for First found block or null Extract the public key or null from the script, perform quick check on pubkey The public key Extract the public key or null from the script Whether deep checks are done on public key The public key Extract witness redeem from WitScript Witscript to extract information from Expected redeem hash The witness redeem Check if this program represent P2WSH True if P2WSH Represent the challenge that miners must solve for finding a new block Parse an outpoint with either the format: [txid]:[outputindex] [txid]-[outputindex] [txid][outputindex] where outputindex is in hexadecimal, 4 bytes in little endian (serialization format) The string to parse The outpoint True if parsing succeed Parse an outpoint with either the format: [txid]:[outputindex] [txid]-[outputindex] [txid][outputindex] where txid is little endian and outputindex is in hexadecimal, 4 bytes in little endian (serialization format) The string to parse The outpoint Try to get the expected scriptPubKey of this TxIn based on its scriptSig and witScript. Null if could not infer the scriptPubKey, else, the expected scriptPubKey The witness script (Witness script is not serialized and deserialized at the TxIn level, but at the Transaction level) The index of this TxIn in its transaction Returns the IndexedTxIn whose PrevOut is equal to or null. The outpoint being searched for The IndexedTxIn which PrevOut is equal to or null if not found Returns the IndexedTxIn at index. the index A IndexedTxIn Create a new WitnessScript Scripts If false, make a copy of the input script array Create a new WitnessScript Scripts Precompute the transaction hash and witness hash so that later calls to GetHash() and GetWitHash() will returns the precomputed hash If true, the previous precomputed hash is thrown away, else it is reused If true, the hash will be calculated and cached at the first call to GetHash(), else it will be immediately Size of the transaction discounting the witness (Used for fee calculation) Transaction size Sign a specific coin with the given secret Private key Coin to sign Sign a specific coin with the given secret Private key Coins to sign Sign a specific coin with the given secret Private keys Coins to sign Calculate the fee of the transaction Coins being spent Fee or null if some spent coins are missing or if spentCoins is null Calculate the fee of the transaction Outputs being spent Fee or null if some spent coins are missing or if spentCoins is null Calculate the fee rate of the transaction Coins being spent Fee or null if some spent coins are missing or if spentCoins is null Interpret sequence numbers as relative lock-time constraints. Use GetMedianTimePast() instead of nTime for end point timestamp. Calculates the block height and time which the transaction must be later than in order to be considered final in the context of BIP 68. It also removes from the vector of input heights any entries which did not correspond to sequence locked inputs as they do not affect the calculation. Previous Height The block being evaluated If VerifySequence is not set, returns always true SequenceLock Sequence lock of minimum SequenceLock to satisfy Calculates the block height and time which the transaction must be later than in order to be considered final in the context of BIP 68. It also removes from the vector of input heights any entries which did not correspond to sequence locked inputs as they do not affect the calculation. Previous Height The block being evaluated If VerifySequence is not set, returns always true SequenceLock Sequence lock of minimum SequenceLock to satisfy Create a transaction with the specified option only. (useful for stripping data from a transaction) Options to keep A new transaction with only the options wanted Context free transaction check The error or success of the check What are we signing (default: SigHash.All) What are we signing for taproot (default: SigHash.Default) Do we try to get shorter signatures? (default: true) Providing the PrecomputedTransactionData speed up signing time, by pre computing one several hashes need for the calculation of the signatures of every input. For taproot transaction signing, the precomputed transaction data is required if some of the inputs does not belong to the signer. Algorithm implemented by bitcoin core https://github.com/bitcoin/bitcoin/blob/3015e0bca6bc2cb8beb747873fdf7b80e74d679f/src/wallet.cpp#L1276 Minimize the change Select all coins belonging to same scriptPubKey together to protect privacy. (Default: true) Number of iterations in the knapsack algorithm (Default: 100) Exception thrown when not enough funds are present for verifying or building a transaction The group name who is missing the funds Amount of Money missing A class for building and signing all sort of transactions easily (http://www.codeproject.com/Articles/835098/NBitcoin-Build-Them-All) Additional change that should be swept to change later Total of output value that was removed via dust prevention mechanism What is curently sent The fee txout (change or substracted output) Whether fee are already paid Fixed fee of SendFee Dogecoin has weird requirement. Size fee is initially sent to 0 for the first pass. Then we can do a second pass with the right Size fee. The minimum UTXO value to select The random number generator used for shuffling transaction outputs or selected coins If true, it will remove any TxOut below Dust, so the transaction get correctly relayed by the network. (Default: true) If true, it will signal the transaction replaceability in every input. (Default: false) If true, the transaction builder tries to shuffle inputs If true, the transaction builder tries to shuffles outputs If true and the transaction has two outputs sending to the same scriptPubKey, those will be merged into a single output. (Default: true) If true, the TransactionBuilder will not select coins whose fee to spend is higher than its value. (Default: true) The cost of spending a coin is based on the . If is true, this rate is used to know if an output is economical. This property is set automatically when calling or . A callback used by the TransactionBuilder when it does not find the coin for an input A callback used by the TransactionBuilder when it does not find the key for a scriptPubKey Set the name of this group (group are separated by call to Then()) Name of the group Send bitcoins to a destination The destination The amount Send all coins added so far with no change (sweep), substracting fees from the total amount Send all coins added so far with no change (sweep), substracting fees from the total amount Send all the remaining available coins to this destination Send all the remaining available coins to this destination Send all the remaining available coins to the change Send bitcoins to a destination The destination The amount Will subtract fees from the previous TxOut added by the last TransactionBuilder.Send() call Send a money amount to the destination The destination The amount (supported : Money, AssetMoney, MoneyBag) The coin type is not supported Send a money amount to the destination The destination The amount (supported : Money, AssetMoney, MoneyBag) The coin type is not supported Send assets (Open Asset) to a destination The destination The asset and amount Send assets (Open Asset) to a destination The destination The asset and amount Set transaction policy fluently The policy this Split the estimated fees across the several groups (separated by Then()) Estimate the fee needed for the transaction, and split among groups according to their fee weight Send the fee splitted among groups according to their fee weight If using SendFeesSplit or SendEstimatedFeesSplit, determine the weight this group participate in paying the fees The weight of fee participation Build a PSBT (Partially signed bitcoin transaction) True if signs all inputs with the available keys The sighash for signing (ignored if sign is false) A PSBT Not enough funds are available Create a PSBT from a transaction The transaction If true, the transaction builder will sign this transaction Try to extract the signatures from into the . The PSBT to extract signatures to. The transaction from which signatures will get extracted. Update information in the PSBT with informations that the transaction builder is holding A PSBT Build the transaction True if signs all inputs with the available keys The transaction Not enough funds are available Sign the transaction passed as parameter The transaction The transaction object as the one passed as parameter Estimate the fee rate of the transaction once it is fully signed. The transaction to be signed The fee rate, or null if the transaction builder is missing previous coins If the transaction builder is missing some coins Verify that a transaction is fully signed and have enough fees The transaction to check True if no error Verify that a transaction is fully signed and have enough fees The transaction validator True if no error Verify that a transaction is fully signed and have enough fees The transaction to check The expected fees (more or less 10%) True if no error Verify that a transaction is fully signed and have enough fees The transaction validator The expected fees (more or less 10%) True if no error Verify that a transaction is fully signed and have enough fees The transaction to check The expected fee rate True if no error Verify that a transaction is fully signed and have enough fees The transaction validator The expected fee rate True if no error Verify that a transaction is fully signed and have enough fees The transaction to check Detected errors True if no error Verify that a transaction is fully signed and have enough fees The transaction validator Detected errors True if no error Verify that a transaction is fully signed, have enough fees, and follow the Standard and Miner Transaction Policy rules The transaction to check The expected fees (more or less 10%) Detected errors True if no error Verify that a transaction is fully signed, have enough fees, and follow the Standard and Miner Transaction Policy rules The transaction validator The expected fees (more or less 10%) Detected errors True if no error Verify that a transaction is fully signed and have enough fees The transaction to check The expected fee rate Detected errors True if no error Verify that a transaction is fully signed and have enough fees The transaction validator The expected fee rate Detected errors True if no error Verify that a transaction is fully signed and have enough fees he transaction to check The expected fee rate Detected errors Verify that a transaction is fully signed and have enough fees he transaction to check The expected fee Detected errors Verify that a transaction is fully signed and have enough fees he transaction to check Detected errors Find spent coins of a transaction The transaction Array of size tx.Input.Count, if a coin is not fund, a null coin is returned. Estimate the physical size of the transaction The transaction to be estimated Estimate the size of the transaction The transaction to be estimated If true, returns the size on which fee calculation are based, else returns the physical byte size Estimate the witness size and the base size of a transaction The transaction The witness size The base size If the transaction builder is missing some coins Estimate fees of the built transaction Fee rate Estimate fees of an unsigned transaction Fee rate Create a new participant in the transaction with its own set of coins and keys Switch to another participant in the transaction, or create a new one if it is not found. Check if valid transaction signature Signature in bytes Verification rules True if valid Check if valid transaction signature The signature Verification rules Error True if valid Enforce LowS on the signature Create a uint256 from a string in big endian Write this instance to the output in little endian Write this instance to the output Deriving an HDKey is normally time consuming, this wrap the IHDKey in a new HD object which can cache derivations The hdKey to wrap An hdkey which cache derivations, of the parameter if it is already itself a cache Deriving an IHDScriptPubKey is normally time consuming, this wrap the IHDScriptPubKey in a new IHDScriptPubKey object which can cache derivations The hdScriptPubKey to wrap An hdkey which cache derivations, of the parameter if it is already itself a cache Derive keyPaths as fast as possible using caching and parallelism The hdKey to derive keyPaths to derive An array of keyPaths.Length size with the derived keys Converts a given DateTime into a Unix timestamp Any DateTime The given DateTime in Unix timestamp format Gets a Unix timestamp representing the current moment Parameter ignored Now expressed as a Unix timestamp Add an item to the collection When disposed, the item is removed Add an item to the collection When disposed, the item is removed General array utilities. Are two arrays equal. Left side. Right side. True if equal. implementation of RipeMD see, http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html Standard constructor Copy constructor. This will copy the state of the provided message digest. reset the chaining variables to the IV values. Draft FIPS 180-2 implementation of SHA-256. Note: As this is based on a draft this implementation is subject to change.
                     block  word  digest
             SHA-1   512    32    160
             SHA-256 512    32    256
             SHA-384 1024   64    384
             SHA-512 1024   64    512
             
Copy constructor. This will copy the state of the provided message digest. reset the chaining variables Implementation of Keccak based on following KeccakNISTInterface.c from http://keccak.noekeon.org/ Following the naming conventions used in the C source code to enable easy review of the implementation. Return the size of block that the compression function is applied to in bytes. @return internal byte length of a block. Implementation of SHA-3 based on following KeccakNISTInterface.c from http://keccak.noekeon.org/ Following the naming conventions used in the C source code to enable easy review of the implementation. base implementation of MD4 family style digest as outlined in "Handbook of Applied Cryptography", pages 344 - 347.