================== Protocol Methods ================== blockchain.tag.qualifier.list ======================================== Returns a dictionary with information regarding all of the tags associated with a qualifier. **Signature** .. function:: blockchain.tag.qualifier.list(asset) .. versionadded:: 1.11 *asset* The name of the asset as an ascii compliant string. **Result** A dictionary of tags and chain location information. **Example Results** { "3baebe536ebb14776b456c68425fea8ce06e9732": { "flag": true, "height": 361894, "tx_hash": "57c6ff965de70d51c5f4235f7adcee96e872ab3b5ca64497f655260e49a62b15", "tx_pos": 2 }, "4dfab22bfc28d7f9849512161c020e834897fbda": { "flag": false, "height": 361944, "tx_hash": "cd8c9477688e4215edaf0560e06adf07bc794d4c18d83a23dc0e7581d95e59bb", "tx_pos": 1 } } blockchain.tag.qualifier.subscribe =============================== Subscribe a qualifier asset's tags **Signature** .. function:: blockchain.tag.qualifier.subscribe(asset) .. versionadded:: 1.11 *asset* The name of the asset as an ascii compliant string. **Result** The :ref:`status ` of the qualifier asset. **Notifications** The client will receive a notification when the :ref:`status ` of the asset changes. Its signature is .. function:: blockchain.asset.broadcasts.subscribe(asset, status) :noindex: blockchain.tag.h160.subscribe =============================== Subscribe an `h160`'s qualifications **Signature** .. function:: blockchain.tag.h160.subscribe(h160) .. versionadded:: 1.11 *h160* The h160 of a public key as a hex string **Result** The :ref:`status ` of the `h160`. **Notifications** The client will receive a notification when the :ref:`status ` of the `h160` changes. Its signature is .. function:: blockchain.tag.h160.subscribe(h160, status) :noindex: blockchain.asset.broadcasts.subscribe =============================== Subscribe an asset's broadcasts **Signature** .. function:: blockchain.asset.broadcasts.subscribe(asset) .. versionadded:: 1.11 *asset* The name of the asset as an ascii compliant string. **Result** The :ref:`status ` of the qualifier asset. **Notifications** The client will receive a notification when the :ref:`status ` of the asset changes. Its signature is .. function:: blockchain.asset.broadcasts.subscribe(asset, status) :noindex: blockchain.asset.is_frozen.subscribe =============================== Subscribe to a restricted asset's frozen status **Signature** .. function:: blockchain.asset.is_frozen.subscribe(asset) .. versionadded:: 1.11 *asset* The name of the restricted asset as an ascii compliant string. **Result** The same as `blockchain.asset.is_frozen` **Notifications** The client will receive a notification when the result of `blockchain.asset.is_frozen` changes. Its signature is .. function:: blockchain.asset.is_frozen.subscribe(asset, result) :noindex: blockchain.asset.verifier_string.subscribe =============================== Subscribe to a restricted asset's verifier string **Signature** .. function:: blockchain.asset.verifier_string.subscribe(asset) .. versionadded:: 1.11 *asset* The name of the restricted asset as an ascii compliant string. **Result** The same as `blockchain.asset.verifier_string` **Notifications** The client will receive a notification when the result of `blockchain.asset.verifier_string` changes. Its signature is .. function:: blockchain.asset.verifier_string.subscribe(asset, result) :noindex: blockchain.asset.restricted_associations.subscribe =============================== Subscribe to restricted assets that have this qualifier in their verifier string. **Signature** .. function:: blockchain.asset.restricted_associations.subscribe(asset) .. versionadded:: 1.11 *asset* The name of the qualifier asset as an ascii compliant string. **Result** The :ref:`status ` of the qualifier asset. **Notifications** The client will receive a notification when the :ref:`status ` of the qualifier changes. Its signature is .. function:: blockchain.asset.restricted_associations.subscribe(asset, status) :noindex: blockchain.tag.qualifier.unsubscribe ================================= Unsubscribe from a qualifier asset, preventing future notifications if its :ref:`status ` changes. **Signature** .. function:: blockchain.tag.qualifier.unsubscribe(asset) .. versionadded:: 1.11 *asset* The name of the asset as an ascii compliant string. **Result** Returns :const:`True` if the asset was subscribed to, otherwise :const:`False`. Note that :const:`False` might be returned even for something subscribed to earlier, because the server can drop subscriptions in rare circumstances. blockchain.tag.h160.unsubscribe ================================= Unsubscribe from an `h160`, preventing future notifications if its :ref:`status ` changes. **Signature** .. function:: blockchain.tag.h160.unsubscribe(h160) .. versionadded:: 1.11 *h160* The h160 of a public key as a hex string **Result** Returns :const:`True` if the `h160` was subscribed to, otherwise :const:`False`. Note that :const:`False` might be returned even for something subscribed to earlier, because the server can drop subscriptions in rare circumstances. blockchain.asset.broadcasts.unsubscribe ================================= Unsubscribe from an asset, preventing future notifications if its :ref:`status ` changes. **Signature** .. function:: blockchain.asset.broadcasts.unsubscribe(asset) .. versionadded:: 1.11 *asset* The name of the asset as an ascii compliant string. **Result** Returns :const:`True` if the asset was subscribed to, otherwise :const:`False`. Note that :const:`False` might be returned even for something subscribed to earlier, because the server can drop subscriptions in rare circumstances. blockchain.asset.is_frozen.unsubscribe ================================= Unsubscribe from a restricted asset, preventing future notifications if its frozen status changes. **Signature** .. function:: blockchain.asset.is_frozen.unsubscribe(asset) .. versionadded:: 1.11 *asset* The name of the restricted asset as an ascii compliant string. **Result** Returns :const:`True` if the asset was subscribed to, otherwise :const:`False`. Note that :const:`False` might be returned even for something subscribed to earlier, because the server can drop subscriptions in rare circumstances. blockchain.asset.verifier_string.unsubscribe ================================= Unsubscribe from a restricted asset, preventing future notifications if its verifier string changes. **Signature** .. function:: blockchain.asset.verifier_string.unsubscribe(asset) .. versionadded:: 1.11 *asset* The name of the restricted asset as an ascii compliant string. **Result** Returns :const:`True` if the asset was subscribed to, otherwise :const:`False`. Note that :const:`False` might be returned even for something subscribed to earlier, because the server can drop subscriptions in rare circumstances. blockchain.asset.restricted_associations.unsubscribe ================================= Unsubscribe from a qualifier asset, preventing future notifications if its :ref:`status ` changes. **Signature** .. function:: blockchain.asset.restricted_associations.unsubscribe(asset) .. versionadded:: 1.11 *asset* The name of the qualifier asset as an ascii compliant string. **Result** Returns :const:`True` if the asset was subscribed to, otherwise :const:`False`. Note that :const:`False` might be returned even for something subscribed to earlier, because the server can drop subscriptions in rare circumstances. blockchain.tag.check ======================================== Returns a dictionary with information regarding a tagged address's h160. **Signature** .. function:: blockchain.tag.check(h160, asset) .. versionchanged:: 1.11 renamed function .. versionadded:: 1.10 *h160* The h160 of a public key as a hex string *asset* A restricted or qualifing asset as an ascii-compliant string **Result** A dictionary containing a flag. If there is no on-chain data, this defaults to :const:`false`. Otherwise chain location information is included. If *asset* is a qualifing asset, a :const:`true` flag denotes that this public key is tagged by qualifier. If *asset* is a restricted asset, a :const:`true` flag denotes that this public key is frozen from spending the restricted asset. **Example Results** { "flag": true, "height": 1047144, "tx_hash": "7e176ed933db1d57b81d939b5ee328bbd483d62f896c2bf0f0c709c44d7790b1", "tx_pos": 1 } blockchain.tag.h160.list ======================================== Returns a dictionary with information regarding all of the tags associated with a h160. **Signature** .. function:: blockchain.tag.h160.list(h160) .. versionchanged:: 1.11 renamed function .. versionadded:: 1.10 *h160* The h160 of a public key as a hex string **Result** A dictionary of tags and chain location information. **Example Results** { "#QUALTEST": { "flag": true, "height": 1047144, "tx_hash": "7e176ed933db1d57b81d939b5ee328bbd483d62f896c2bf0f0c709c44d7790b1", "tx_pos": 1 }, "$TESTASSET1": { "flag": true, "height": 1047145, "tx_hash": "a93d7bd4cbc83ba334b48658a9b94a4718c497c0d7c39cba8281a07249fc1431", "tx_pos": 1 } } blockchain.asset.is_frozen ======================================== Returns a dictionary with information regarding whether a restricted asset is globally frozen. **Signature** .. function:: blockchain.asset.is_frozen(asset) .. versionadded:: 1.10 *asset* A restricted asset as an ascii-compliant string **Result** A dictionary containing a *frozen* booelean. If there is no on-chain data, this defaults to :const:`false`. Otherwise chain location information is included. **Example Results** { "frozen": false, "height": 1047127, "tx_hash": "41ac251f352ba497c8b3af9e28aa0db889da287423a01e611c6169cc43b8596b", "tx_pos": 1 } blockchain.asset.verifier_string ======================================== Returns a dictionary with information about a restricted asset's qualifications **Signature** .. function:: blockchain.asset.verifier_string(asset) .. versionchanged:: 1.11 renamed function .. versionadded:: 1.10 *asset* A restricted asset as an ascii-compliant string **Result** A dictionary containing a qualifier boolean logic string to show what qualifier tags an address needs to recieve this asset. **Example Results** { "height": 1047149, "qualifying_tx_pos": 1, "restricted_tx_pos": 4, "string": "QUALTEST|QUALTEST", "tx_hash": "db27e9b9471f5695685fb018889ac4601720655f68194bfbbc5a835fb35b4369" } blockchain.asset.restricted_associations ======================================== Returns a list of restricted assets of who's qualifing string contains the qualifier asset in some form **Signature** .. function:: blockchain.asset.restricted_associations(asset) .. versionadded:: 1.10 *asset* A qualifying asset as an ascii-compliant string **Result** A dictionary containing restricted assets and on-chain location data **Example Results** { "$SWAP": { "associated": true, "height": 756895, "qualifying_tx_pos": 0, "restricted_tx_pos": 4, "tx_hash": "a2b634e160974348647484302501a64bc80a841d4a9ea833498a47e72e987628" } } blockchain.asset.list_addresses_by_asset ======================================== An **optional** method. Requires --assetindex=1 in ravend. Returns an error if unavaliable. Returns a dictionary with information about what address(es) hold an asset. **Signature** .. function:: blockchain.asset.list_addresses_by_asset(asset, onlytotal=false, count=1000, start=0) .. versionadded:: 1.9 *asset* An ascii-compliant asset name *onlytotal* If :const:`True`, only the number of addresses holding this asset is returned. Otherwise, addresses with values are returned. *count* Only matters if :const:`onlytotal` is :const:`True`. Truncates the results to this number. Maximum of 1000 and must be at least 1. *start* Only matters if :const:`onlytotal` is :const:`True`. Result skips over this many addresses and returns the next :const:`count`. Must be 0 or greater. **Result** If *onlytotal* is :const:`false`: A dictionary mapping addresses to their asset count If *onlytotal* is :const:`true`: A dictionary denoting how many addresses total hold this asset **Example Results** When *onlytotal* is :const:`false`:: { "R9HC7XkCwnQA5dQZ18BntXgUe9ESuALU3J": 2, "R9HCY7PtFZb6RkvdnpDjDhguRTWMTEYW6q": 1, "R9HCbhPSLkPtnESx2FSSUEdAxK6CfVQKJ3": 1, "R9HCeygiyUGSuB2njMEy3P5NDNdL2zuCDv": 1, "R9HCgctF8nRUfR7Liy2WJw6nN6naeihYDa": 1, "R9HCmJtzYdCJ4Zw2ziaSgwWzwQPqsopRWA": 1, "R9HCsMj7kCMatpR6sWo9dwNUA3caLf4G6F": 1, "R9HD36FUXbF1Eq6ZU4ukQAHKXrUcB5zz6n": 1, "R9HD7HTST7SshLdbHdGpFXNpXWab1iRQEF": 1, "R9HDH3ZDuLRVF8ivzUwnojZa7thtRXQooM": 1 } When *onlytotal* is :const:`true`:: { "unique_addresses": 91570 } blockchain.asset.get_assets_with_prefix ======================================= Returns a list of assets that begin with the prefix. Comparable to the regex \^{{prefix}}.*\. **Signature** .. function:: blockchain.asset.get_assets_with_prefix(prefix) .. versionadded:: 1.9 *prefix* What the asset should begin with. **Result** A list of assets that begin with the prefix. **Result Example** :: [AN_ASSET, ANT, AN_ASSET/SUB_ASSET, ANT#UNIQUE] blockchain.asset.broadcasts ======================================= Return the messages broadcast from a (message channel) asset broadcast. **Signature** .. function:: blockchain.asset.broadcasts(message_channel) .. versionadded:: 1.9 *message_channel* The message channel asset. **Result** A dictionary containing a history of all broadcasts made from this message channel. The keys in this dictionary are txids. The values are the broadcast data, the transaction height, and position in the transactions of the broadcast. **Result Example** :: { "d5948b8df75c2590bcf4cc2c73abccdfd13ad5afbe37f4445abcc0a048392782": { "data": "Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu", "height": 1830170, "tx_pos": 1 } } blockchain.scripthash.get_asset_balance ======================================= Return the confirmed and unconfirmed asset balances of a :ref:`script hash