1"use strict";(globalThis.webpackChunkxcpdoc=globalThis.webpackChunkxcpdoc||[]).push([[228],{8894(e,s,n){n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>o,frontMatter:()=>d,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"advanced/api-v1/api-v1-spec","title":"API v1 Specification","description":"Read API Function Reference","source":"@site/docs/advanced/api-v1/api-v1-spec.md","sourceDirName":"advanced/api-v1","slug":"/advanced/api-v1/api-v1-spec","permalink":"/docs/advanced/api-v1/api-v1-spec","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/edit/master/website/docs/advanced/api-v1/api-v1-spec.md","tags":[],"version":"current","frontMatter":{"title":"API v1 Specification"},"sidebar":"advanced","previous":{"title":"API v1 Overview","permalink":"/docs/advanced/api-v1/api-v1-overview"},"next":{"title":"API v1 ChangeLog","permalink":"/docs/advanced/api-v1/api-v1-changelog"}}');var r=n(4848),t=n(8453);const d={title:"API v1 Specification"},c=void 0,l={},h=[{value:"Read API Function Reference",id:"read-api-function-reference",level:2},{value:"<code>get_{table}</code>",id:"get_table",level:3},{value:"get_asset_info",id:"get_asset_info",level:3},{value:"get_dispenser_info",id:"get_dispenser_info",level:3},{value:"get_supply",id:"get_supply",level:3},{value:"get_asset_names",id:"get_asset_names",level:3},{value:"get_holder_count",id:"get_holder_count",level:3},{value:"get_holders",id:"get_holders",level:3},{value:"get_messages",id:"get_messages",level:3},{value:"get_messages_by_index",id:"get_messages_by_index",level:3},{value:"get_block_info",id:"get_block_info",level:3},{value:"get_blocks",id:"get_blocks",level:3},{value:"get_running_info",id:"get_running_info",level:3},{value:"get_element_counts",id:"get_element_counts",level:3},{value:"get_unspent_txouts",id:"get_unspent_txouts",level:3},{value:"getrawtransaction",id:"getrawtransaction",level:3},{value:"getrawtransaction_batch",id:"getrawtransaction_batch",level:3},{value:"search_raw_transactions",id:"search_raw_transactions",level:3},{value:"get_tx_info",id:"get_tx_info",level:3},{value:"search_pubkey",id:"search_pubkey",level:3},{value:"unpack",id:"unpack",level:3},{value:"Action/Write API Function Reference",id:"actionwrite-api-function-reference",level:2},{value:"create_bet",id:"create_bet",level:3},{value:"create_broadcast",id:"create_broadcast",level:3},{value:"create_btcpay",id:"create_btcpay",level:3},{value:"create_burn",id:"create_burn",level:3},{value:"create_cancel",id:"create_cancel",level:3},{value:"create_destroy",id:"create_destroy",level:3},{value:"create_dispenser",id:"create_dispenser",level:3},{value:"create_dividend",id:"create_dividend",level:3},{value:"create_issuance",id:"create_issuance",level:3},{value:"create_order",id:"create_order",level:3},{value:"create_send",id:"create_send",level:3},{value:"create_sweep",id:"create_sweep",level:3},{value:"Advanced <code>create_</code> parameters",id:"advanced-create_-parameters",level:3},{value:"Transaction Encodings",id:"transaction-encodings",level:4},{value:"REST API Function Reference",id:"rest-api-function-reference",level:2},{value:"get",id:"get",level:3},{value:"compose",id:"compose",level:3},{value:"Objects",id:"objects",level:2},{value:"Balance Object",id:"balance-object",level:3},{value:"Bet Object",id:"bet-object",level:3},{value:"Bet Match Object",id:"bet-match-object",level:3},{value:"Broadcast Object",id:"broadcast-object",level:3},{value:"BTCPay Object",id:"btcpay-object",level:3},{value:"Burn Object",id:"burn-object",level:3},{value:"Cancel Object",id:"cancel-object",level:3},{value:"Debit/Credit Object",id:"debitcredit-object",level:3},{value:"Dividend Object",id:"dividend-object",level:3},{value:"Issuance Object",id:"issuance-object",level:3},{value:"Order Object",id:"order-object",level:3},{value:"Order Match Object",id:"order-match-object",level:3},{value:"Send Object",id:"send-object",level:3},{value:"Message Object",id:"message-object",level:3},{value:"Bet Expiration Object",id:"bet-expiration-object",level:3},{value:"Order Expiration Object",id:"order-expiration-object",level:3},{value:"Bet Match Expiration Object",id:"bet-match-expiration-object",level:3},{value:"Order Match Expiration Object",id:"order-match-expiration-object",level:3},{value:"Status",id:"status",level:2}];function a(e){const s={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h2,{id:"read-api-function-reference",children:"Read API Function Reference"}),"\n",(0,r.jsx)(s.h3,{id:"get_table",children:(0,r.jsx)(s.code,{children:"get_{table}"})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"get_{table}(filters=[], filterop='AND', order_by=null, order_dir=null, start_block=null, end_block=null, status=null, limit=1000, offset=0, show_expired=true)"})})}),"\n",(0,r.jsxs)(s.p,{children:["Where ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"{table}"})})," must be one of the following values:\n",(0,r.jsx)(s.code,{children:"assets"}),", ",(0,r.jsx)(s.code,{children:"balances"}),", ",(0,r.jsx)(s.code,{children:"bets"}),", ",(0,r.jsx)(s.code,{children:"bet_expirations"}),", ",(0,r.jsx)(s.code,{children:"bet_matches"}),", ",(0,r.jsx)(s.code,{children:"bet_match_expirations"}),", ",(0,r.jsx)(s.code,{children:"bet_match_resolutions"}),", ",(0,r.jsx)(s.code,{children:"broadcasts"}),", ",(0,r.jsx)(s.code,{children:"btcpays"}),", ",(0,r.jsx)(s.code,{children:"burns"}),", ",(0,r.jsx)(s.code,{children:"cancels"}),", ",(0,r.jsx)(s.code,{children:"credits"}),", ",(0,r.jsx)(s.code,{children:"debits"}),", ",(0,r.jsx)(s.code,{children:"destructions"}),", ",(0,r.jsx)(s.code,{children:"dispensers"}),", ",(0,r.jsx)(s.code,{children:"dispenses"}),", ",(0,r.jsx)(s.code,{children:"dividends"}),", ",(0,r.jsx)(s.code,{children:"issuances"}),", ",(0,r.jsx)(s.code,{children:"mempool"}),", ",(0,r.jsx)(s.code,{children:"orders"}),", ",(0,r.jsx)(s.code,{children:"order_expirations"}),", ",(0,r.jsx)(s.code,{children:"order_matches"}),", ",(0,r.jsx)(s.code,{children:"order_match_expirations"}),", ",(0,r.jsx)(s.code,{children:"sends"}),", or ",(0,r.jsx)(s.code,{children:"transactions"})," ."]}),"\n",(0,r.jsxs)(s.p,{children:["For example: ",(0,r.jsx)(s.code,{children:"get_balances"}),", ",(0,r.jsx)(s.code,{children:"get_credits"}),", ",(0,r.jsx)(s.code,{children:"get_debits"})," are all valid API methods. A complete list of tables can be found in the api.py file in the ",(0,r.jsx)(s.code,{children:"counterparty-core"})," repository."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"filters"})," (",(0,r.jsx)(s.em,{children:"list/dict"}),"): An optional filtering object, or list of filtering objects. See ",(0,r.jsx)(s.a,{href:"#filtering-read-api-results",children:"filtering"})," for more information."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"filterop"})," (",(0,r.jsx)(s.em,{children:"string"}),"): Specifies how multiple filter settings are combined. Defaults to ",(0,r.jsx)(s.code,{children:"AND"}),", but ",(0,r.jsx)(s.code,{children:"OR"})," can\nbe specified as well. See ",(0,r.jsx)(s.a,{href:"#filtering-read-api-results",children:"filtering"})," for more information."]}),"\n",(0,r.jsxs)(s.li,{children:["**order_by ** (",(0,r.jsx)(s.em,{children:"string"}),"): If sorted results are desired, specify the name of an attribute of the appropriate table to\norder the results by (e.g. ",(0,r.jsx)(s.code,{children:"quantity"})," for ",(0,r.jsx)(s.a,{href:"#balance-object",children:"balance object"}),", if you called ",(0,r.jsx)(s.code,{children:"get_balances"}),").\nIf left blank, the list of results will be returned unordered."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"order_dir"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The direction of the ordering. Either ",(0,r.jsx)(s.code,{children:"ASC"})," for ascending order, or ",(0,r.jsx)(s.code,{children:"DESC"})," for descending\norder. Must be set if ",(0,r.jsx)(s.code,{children:"order_by"})," is specified. Leave blank if ",(0,r.jsx)(s.code,{children:"order_by"})," is not specified."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"start_block"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): If specified, only results from the specified block index on will be returned"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"end_block"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): If specified, only results up to and including the specified block index on will be returned"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"status"})," (",(0,r.jsx)(s.em,{children:"string/list"}),"): return only results with the specified status or statuses (if a list of status strings is supplied).\nSee the ",(0,r.jsx)(s.a,{href:"#status",children:"status list"}),". Note that if ",(0,r.jsx)(s.code,{children:"null"})," is supplied (the default), then status is not filtered.\nAlso note that status filtering can be done via the ",(0,r.jsx)(s.code,{children:"filters"})," parameter, but doing it through this parameter is more\nflexible, as it essentially allows for situations where ",(0,r.jsx)(s.code,{children:"OR"})," filter logic is desired, as well as status-based filtering."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"limit"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): (maximum) number of elements to return. Can specify a value less than or equal to the instance's max limit (default 1000).\nFor more results, use a combination of ",(0,r.jsx)(s.code,{children:"limit"})," and ",(0,r.jsx)(s.code,{children:"offset"})," parameters to paginate results. If the instance has a limit of 0 you can specify\nany limit for the row results, even 0 to get the full dataset."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"offset"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): return results starting from specified ",(0,r.jsx)(s.code,{children:"offset"})]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Special Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"show_expired"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): used only for ",(0,r.jsx)(s.code,{children:"get_orders"}),". When false, ",(0,r.jsx)(s.code,{children:"get_orders"})," doesn't return orders which expire next block."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"memo_hex"})," (",(0,r.jsx)(s.em,{children:"string"}),"): used only for ",(0,r.jsx)(s.code,{children:"get_sends"}),". When specified, filter the table for a hexadecimal value instead of searching by a text str
1ing."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Special Results:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"memo"})," (",(0,r.jsx)(s.em,{children:"string"}),"): used only for ",(0,r.jsx)(s.code,{children:"get_sends"}),". The utf-8 encoded string of the memo (like ",(0,r.jsx)(s.code,{children:"for pizza"}),"). This value will be an empty string for hexadecimal-encoded memo IDs that are not valud UTF-8 strings."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"memo_hex"})," (",(0,r.jsx)(s.em,{children:"string"}),"): used only for ",(0,r.jsx)(s.code,{children:"get_sends"}),". Returns the memo field expressed as a hexadecimal value (like ",(0,r.jsx)(s.code,{children:"666f722070697a7a61"}),")."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"A list of objects with attributes corresponding to the queried table fields."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Examples:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["To get a listing of bets, call ",(0,r.jsx)(s.code,{children:"get_bets"}),". This method will return a list of one or more ",(0,r.jsx)(s.a,{href:"#bet-object",children:"bet object"})," ."]}),"\n",(0,r.jsxs)(s.li,{children:["To get a listing all open orders for a given address like 1Ayw5aXXTnqYfS3LbguMCf9dxRqzbTVbjf, you could call\n",(0,r.jsx)(s.code,{children:"get_orders"})," with the appropriate parameters. This method will return a list of one or more order ",(0,r.jsx)(s.a,{href:"#order-object",children:"object"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:['To get all open "buy BTC" orders from the DEx, call ',(0,r.jsx)(s.code,{children:"get_orders"})," and use the following filter: ",(0,r.jsx)(s.code,{children:'[{"field": "get_asset", "op": "==", "value": "BTC"}, {"field": "status", "op": "==", "value": "open"}]'}),"."]}),"\n",(0,r.jsxs)(s.li,{children:["To get all BTC pays (for DEx order matches) between the source 1Ayw5aXXTnqYfS3LbguMCf9dxRqzbTVbjf and destination (BTC buyer) 193SB3xgYjmfesdRqXq4g3eG9rD9DmWBSD, use ",(0,r.jsx)(s.code,{children:"get_btcpays"})," method with these parameters: ",(0,r.jsx)(s.code,{children:'{ "filters": [{"field": "source", "op": "==", "value": "1Ayw5aXXTnqYfS3LbguMCf9dxRqzbTVbjf"}, {"field": "destination", "op": "==", "value": "193SB3xgYjmfesdRqXq4g3eG9rD9DmWBSD"}],"filterop": "and"}'})]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Notes:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Please note that the ",(0,r.jsx)(s.code,{children:"get_balances"})," API call will not return balances for BTC itself. It only returns balances\nfor XCP and other Counterparty assets. To get BTC-based balances, use an existing system such as Bitcoin Core, blockchain.info, etc."]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"get_asset_info",children:"get_asset_info"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_asset_info(asset, assets)"})}),"\n",(0,r.jsx)(s.p,{children:"Gets information on an issued asset."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The name of the ",(0,r.jsx)(s.a,{href:"#assets",children:"asset"})," or ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," for which to retrieve the information."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"assets"})," (",(0,r.jsx)(s.em,{children:"array"}),"): An array of names of the ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," or ",(0,r.jsx)(s.a,{href:"#subassets",children:"subassets"})," for which to retrieve the information."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"null"})," if the asset was not found. Otherwise, a list of one or more objects, each one with the following properties:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," of the asset itself"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset_longname"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," longname, if any"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"owner"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that currently owns the asset (i.e. has issuance rights to it)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"divisible"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): Whether the asset is divisible or not"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"locked"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): Whether the asset is locked (future issuances prohibited)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"total_issued"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the asset issued, in total"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"description"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The asset's current description"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"issuer"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The asset's original owner (i.e. issuer)"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"get_dispenser_info",children:"get_dispenser_info"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_dispenser_info()"})}),"\n",(0,r.jsx)(s.p,{children:"Gets information on a dispenser."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash identifier"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"null"})," if the asset was not found. Otherwise, an object with the following properties:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," of the asset itself"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset_longname"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," longname, if any"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that made the bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"give_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantity"})," given per dispense"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"escrow_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantity"})," escrowed in the dispenser"]}
1),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"give_remaining"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantity"})," remaining in the dispenser"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"status"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The state of the dispenser. 0 for open, 10 for closed."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"mainchainrate"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantity"})," of the main chain asset (BTC) per dispensed portion."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fiat_price"})," (",(0,r.jsx)(s.em,{children:"float"}),"): The FIAT price per dispense"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fiat_unit"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The FIAT unit being used"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"satoshi_price"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The sats required for a dispense"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"oracle_price"})," (",(0,r.jsx)(s.em,{children:"float"}),"): The BTC price broadcast by the oracle"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"oracle_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that is being used as the oracle"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"oracle_price_last_updated"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block_index of the last update from the oracle"]}),"\n"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: If an ",(0,r.jsx)(s.strong,{children:"oracle_address"})," is given, ",(0,r.jsx)(s.strong,{children:"mainchainrate"})," format is X.XX (fiat) (ex. 1500 = 15.00)."]})}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"get_supply",children:"get_supply"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_supply(asset)"})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The name of the ",(0,r.jsx)(s.a,{href:"#assets",children:"asset"})," or ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," for which to retrieve the information."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.code,{children:"null"})," if the asset was not found. Otherwise, a list of one or more objects, each one with the following properties:"]}),"\n",(0,r.jsx)(s.h3,{id:"get_asset_names",children:"get_asset_names"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_asset_names()"})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsx)(s.p,{children:"None"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"A list of the names of all existing Counterparty assets, ordered alphabetically."}),"\n",(0,r.jsx)(s.h3,{id:"get_holder_count",children:"get_holder_count"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_holder_count()"})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The name of the ",(0,r.jsx)(s.a,{href:"#assets",children:"asset"})," or ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," for which to retrieve the information."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"An object the asset name as the property name, and the holder count as the value of that property name."}),"\n",(0,r.jsx)(s.h3,{id:"get_holders",children:"get_holders"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_holders()"})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The name of the ",(0,r.jsx)(s.a,{href:"#assets",children:"asset"})," or ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," for which to retrieve the information."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"A list of addresses that hold some quantity of the specified asset."}),"\n",(0,r.jsx)(s.h3,{id:"get_messages",children:"get_messages"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_messages(block_index)"})}),"\n",(0,r.jsx)(s.p,{children:"Return message feed activity for the specified block index. The message feed essentially tracks all\ndatabase actions and allows for lower-level state tracking for applications that hook into it."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index for which to retrieve activity."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["A list of one or more ",(0,r.jsx)(s.a,{href:"#message-object",children:"message object"})," if there was any activity in the block, otherwise ",(0,r.jsx)(s.code,{children:"[]"})," (empty list)."]}),"\n",(0,r.jsx)(s.h3,{id:"get_messages_by_index",children:"get_messages_by_index"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_messages_by_index(message_indexes)"})}),"\n",(0,r.jsxs)(s.p,{children:["Return the message feed messages whose ",(0,r.jsx)(s.code,{children:"message_index"})," values are contained in the specified list of message indexes."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"message_indexes"})," (",(0,r.jsx)(s.em,{children:"list"}),"): An array of one or more ",(0,r.jsx)(s.code,{children:"message_index"})," values for which the cooresponding message feed entries are desired."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["A list containing a ",(0,r.jsx)(s.code,{children:"message <#message-object>"}),"_ for each message found in the specified ",(0,r.jsx)(s.code,{children:"message_indexes"})," list. If none were found, ",(0,r.jsx)(s.code,{children:"[]"})," (empty list) is returned."]}),"\n",(0,r.jsx)(s.h3,{id:"get_block_info",children:"get_block_info"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_block_info(block_index)"})}),"\n",(0,r.jsx)(s.p,{children:"Gets basic information for a specific block."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index for which to retrieve information."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"If the block was found, an object with the following properties:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (i.e. block height). Should match what was specified for the ",(0,r.jsx)(s.em,{children:"block_index"})," input parameter)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The block hash identifier"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_time"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): A UNIX timestamp of when the block was processed by the network"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"get_blocks",children:"get_blocks"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_blocks(block_indexes, min_message_index=null)"})}),"\n",(0,r.jsxs)(s.p,{children:["Gets block and message data (for each block) in a bulk fashon. If fetching info and messages for multiple blocks, this\nis much quicker than using multiple ",(0,r.jsx)(s.code,{children:"get_block_info()"})," and ",(0,r.jsx)(s.code,{children:"get_messages()"})," calls."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_indexes"})," (",(0,r.jsx)(s.em,{children:"list"}),"): A list of 1 or more block indexes for which to retrieve the data."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"min_message_index"})," (",(0,r.jsx)(s.em,{children:"string"}),"): Retrieve blocks from the message feed on or after this specific message index (useful since blocks may appear in the message feed more than once, if a reorg occurred). Note that if this parameter is not specified, the messages for the first block will be returned. If unsure, leave this blank."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"A list of objects, one object for each valid block
1index specified, in order from first block index to last.\nEach object has the following properties:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (i.e. block height). Should match what was specified for the ",(0,r.jsx)(s.em,{children:"block_index"})," input parameter)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The block hash identifier"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_time"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): A UNIX timestamp of when the block was processed by the network"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"_messages"})," (",(0,r.jsx)(s.em,{children:"list"}),"): A list of one or more ",(0,r.jsx)(s.a,{href:"#message-object",children:"message object"})," if there was any activity in the block, otherwise ",(0,r.jsx)(s.code,{children:"[]"})," (empty list)."]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"get_running_info",children:"get_running_info"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_running_info()"})}),"\n",(0,r.jsx)(s.p,{children:"Gets some operational parameters for the server."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsx)(s.p,{children:"None"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"An object with the following properties:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"db_caught_up"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): ",(0,r.jsx)(s.code,{children:"true"})," if block processing is caught up with the Bitcoin blockchain, ",(0,r.jsx)(s.code,{children:"false"})," otherwise."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"bitcoin_block_count"})," (",(0,r.jsx)(s.strong,{children:"integer"}),"): The block height on the Bitcoin network (may not necessarily be the same as ",(0,r.jsx)(s.code,{children:"last_block"}),", if the server is catching up)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"last_block"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The index (height) of the last block processed by the server"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"last_message_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The index (ID) of the last message in the message feed"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"running_testnet"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): ",(0,r.jsx)(s.code,{children:"true"})," if the server is configured for testnet, ",(0,r.jsx)(s.code,{children:"false"})," if configured on mainnet."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"running_testcoin"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): ",(0,r.jsx)(s.code,{children:"true"})," if the server is configured for testcoin use, ",(0,r.jsx)(s.code,{children:"false"})," if not (default)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"version_major"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The major version of counterparty-server running"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"version_minor"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The minor version of counterparty-server running"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"version_revision"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The revision version of counterparty-server running"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"api_limit_rows"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The max amount of rows any call will return. If ",(0,r.jsx)(s.code,{children:"0"})," there's no limit to calls. Defaults to ",(0,r.jsx)(s.code,{children:"1000"}),"."]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"get_element_counts",children:"get_element_counts"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_element_c
1ounts()"})}),"\n",(0,r.jsx)(s.p,{children:"Gets the number of records for each entity type"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsx)(s.p,{children:"None"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["An object with a property for each element type (e.g. ",(0,r.jsx)(s.code,{children:"transactions"}),", ",(0,r.jsx)(s.code,{children:"blocks"}),", ",(0,r.jsx)(s.code,{children:"bets"}),", ",(0,r.jsx)(s.code,{children:"order_matches"}),", etc.) with the value of each property being the record count of that respective entity in the database."]}),"\n",(0,r.jsx)(s.h3,{id:"get_unspent_txouts",children:"get_unspent_txouts"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_unspent_txouts(address, unconfirmed=false, unspent_tx_hash=null)"})}),"\n",(0,r.jsx)(s.p,{children:"Get a listing of UTXOs for the specified address."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address for which to receive the UTXO listing"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"unconfirmed"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): Set to ",(0,r.jsx)(s.code,{children:"true"})," to include unconfirmed UTXOs (e.g. those in the mempool)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"unspent_tx_hash"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): Specify a specific transaction hash to only include UTXOs from that transaction"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"order_by"})," (",(0,r.jsx)(s.em,{children:"string"}),"): Sort results by specified field (e.g. height, -height)"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"A list of objects, with each entry in the dict having the following properties:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"amount"}),": The amount of the UTXO (e.g. 0.12345678)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"value"}),": The value of the UTXO in satoshis (e.g. 12345678)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"height"}),": The block height of the UTXO"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"confirmations"}),": Number of confirmations since the UTXO was created"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"txid"}),": The txid (hash) that the UTXO was included in"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"vout"}),": The vout number in the specified txid for the UTXO"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"getrawtransaction",children:"getrawtransaction"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"getrawtransaction(tx_hash, verbose=false, skip_missing=false)"})}),"\n",(0,r.jsx)(s.p,{children:"Gets raw data for a single transaction."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash identifier"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"verbose"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): Include some additional information in the result data"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"skip_missing"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): If set to ",(0,r.jsx)(s.code,{children:"false"}),", and the transaction hash cannot be found, return ",(0,r.jsx)(s.code,{children:"null"}),", otherwise if ",(0,r.jsx)(s.code,{children:"true"}),", throw an exception."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["If found, a raw transaction objects having the same format as the ",(0,r.jsx)(s.a,{href:"https://chainquery.com/bitcoin-api/getrawtransaction",children:"bitcoind getrawtransaction API call"}),". If not found, ",(0,r.jsx)(s.code,{children:"null"}),"."]}),"\n",(0,r.jsx)(s.h3,{id:"getrawtransaction_batch",children:"getrawtransaction_batch"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"getrawtransaction_batch(txhash_list, verbose=false, skip_missing=false)"})}),"\n",(0,r.jsx)(s.p,{children:"Gets raw data for a list of transactions."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"txhash_list"})," (",(0,r.jsx)(s.em,{children:"string"}),"): A list of transaction hash identifiers"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"verbose"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): Include some additional information in the result data for each transaction"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"skip_missing"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): If set to ",(0,r.jsx)(s.code,{children:"false"}),", and one or more transaction hash cannot be found, the missing txhash data will not be included in the result set, otherwise if ",(0,r.jsx)(s.code,{children:"true"}),", throw an exception."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["A list of raw transaction objects having the same format as the ",(0,r.jsx)(s.a,{href:"https://chainquery.com/bitcoin-api/getrawtransaction",children:"bitcoind getrawtransaction API call"}),"."]}),"\n",(0,r.jsx)(s.h3,{id:"search_raw_transactions",children:"search_raw_transactions"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"search_raw_transactions(address, unconfirmed=true)"})}),"\n",(0,r.jsx)(s.p,{children:"Gets raw transaction objects for the specified address."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address for which to receive the raw transactions"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"unconfirmed"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): Set to ",(0,r.jsx)(s.code,{children:"true"})," to include unconfirmed transactions (e.g. those in the mempool)"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["A list of raw transaction objects, with each object having the same format as the ",(0,r.jsx)(s.a,{href:"https://chainquery.com/bitcoin-api/getrawtransaction",children:"bitcoind getrawtransaction API call"}),"."]}),"\n",(0,r.jsx)(s.h3,{id:"get_tx_info",children:"get_tx_info"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get_tx_info(tx_hex, block_index=null)"})}),"\n",(0,r.jsxs)(s.p,{children:["Get transaction info, as parsed by ",(0,r.jsx)(s.code,{children:"counterparty-server"}),"."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hex"})," (",(0,r.jsx)(s.em,{children:"string"}
1),"): The canonical hexadecimal serialization of the transaction (not its hash)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),")"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"A list with the following items (in order as listed below):"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"source"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"destination"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"btc_amount"})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsx)(s.code,{children:"fee"})}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"data"}),": The embedded raw protocol data, in hexadecimal-serialized format"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"search_pubkey",children:"search_pubkey"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"search_pubkey(pubkeyhash, provided_pubkeys=null)"})}),"\n",(0,r.jsx)(s.p,{children:"For the specified pubkeyhash (i.e. address), return the public key. Note that this requires that the specified address has made at least one outgoing transaction."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"pubkeyhash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The pubkeyhash/address"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"provided_pubkeys"})," (",(0,r.jsx)(s.em,{children:"list"}),"): A list of supplied pubkeys. If one of these pubkeys matches the pubkeyhash, used if one of the supplied pubkey hashes to the pubkeyhash. (Can be useful if the pubkeyhash has not sent out at least one transaction and you have a list of pubkeys that may match it.)"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"A string with the specified pubkey. If the pubkey cannot be found, an exception will be generated and returned."}),"\n",(0,r.jsx)(s.h3,{id:"unpack",children:"unpack"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"unpack(data_hex)"})}),"\n",(0,r.jsxs)(s.p,{children:["Parse the data_hex of a message into its parameters. Currently only works with ",(0,r.jsx)(s.code,{children:"send"})," messages."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"data_hex"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The canonical hexadecimal serialization of the transaction (not its hash), e.g. from the ",(0,r.jsx)(s.code,{children:"data_hex"})," return value from ",(0,r.jsx)(s.code,{children:"get_tx_info"})]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"message_type_id"})," (",(0,r.jsx)(s.em,{children:"int"}),"): the ID of the message type. Legacy sends are ",(0,r.jsx)(s.code,{children:"0"})," and enhanced sends are ",(0,r.jsx)(s.code,{children:"2"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"unpacked"})," (",(0,r.jsx)(s.em,{children:"object"}),"): A map of message parameters. For legacy sends this object includes ",(0,r.jsx)(s.code,{children:"asset"})," and ",(0,r.jsx)(s.code,{children:"quantity"}),". For enhanced sends, this object includes ",(0,r.jsx)(s.code,{children:"address"}),", ",(0,r.jsx)(s.code,{children:"asset"}),", ",(0,r.jsx)(s.code,{children:"quantity"})," and ",(0,r.jsx)(s.code,{children:"memo"}),". For legacy sends, the source and destination are found using ",(0,r.jsx)(s.code,{children:"get_tx_info"}),". For enhanced sends, the destination address is in the message parameters and the source may be found using ",(0,r.jsx)(s.code,{children:"get_tx_info"}),"."]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"actionwrite-api-function-reference",children:"Action/Write API Function Reference"}),"\n",(0,r.jsx)(s.h3,{id:"create_bet",children:"create_bet"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_bet(source, feed_address, bet_type, deadline, wager_quantity, counterwager_quantity, expiration, target_value=0.0, leverage=5040)"})}),"\n",(0,r.jsx)(s.p,{children:"Issue a bet against a feed."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that will make the bet."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"feed_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that hosts the feed to be bet on."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"bet_type"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): 0 for Bullish CFD (deprecated), 1 for Bearish CFD (deprecated), 2 for Equal, 3 for NotEqual."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"deadline"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The time at which the bet should be decided/settled, in Unix time (seconds since epoch)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"wager_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of XCP to wager (",(0,r.jsx)(s.em,{children:"in satoshis"}),", hence integer)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"counterwager_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The minimum ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of XCP to be wagered against, for the bets to match."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"expiration"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The number of blocks after which the bet expires if it remains unmatched."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"target_value"})," (",(0,r.jsx)(s.em,{children:"float, default=null"}),"): Target value for Equal/NotEqual bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"leverage"})," (",(0,r.jsx)(s.em,{children:"integer, default=5040"}),"): Leverage, as a fraction of 5040"]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsx)(s.h3,{id:"create_broadcast",children:"create_broadcast"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_broadcast(source, fee_fraction, text, timestamp, value)"})}),"\n",(0,r.jsx)(s.p,{children:"Broadcast textual and numerical information to the network."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that will be sending (must have the necessary quantity of the specified asset)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fee_fraction"})," (",(0,r.jsx)(s.em,{children:"float"}),"): How much of every bet on this feed should go to its operator; a fraction of 1, (i.e. 0.05 is five percent)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"text"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The textual part of the broadcast."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"timestamp"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The timestamp of the broadcast, in Unix time."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"value"})," (",(0,r.jsx)(s.em,{children:"float"}),"): Numerical value of the broadcast."]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsx)(s.h3,{id:"create_btcpay",children:"create_btcpay"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_btcpay(order_match_id)"})}),"\n",(0,r.jsx)(s.p,{children:"Create and (optionally) broadcast a BTCpay message, to settle an Order Match for which you owe BTC."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The source address of the btcpay transaction."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"order_match_id"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The concatenation of the hashes of the two transactions which compose the order match."]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsx)(s.h3,{id:"create_burn",children:"create_burn"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_burn(source, quantity)"})}),"\n",(0,r.jsxs)(s.p,{children:["Burn a given quantity of BTC for XCP (",(0,r.jsx)(s.strong,{children:"on mainnet, possible between blocks 278310 and 283810"}),"; on testnet it is still available)."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address with the BTC to burn."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of BTC to burn (1 BTC maximum burn per address)."]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsx)(s.h3,{id:"create_cancel",children:"create_cancel"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_cancel(offer_hash, source)"})}),"\n",(0,r.jsx)(s.p,{children:"Cancel an open order or bet you created."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"offer_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash of the order or bet."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The source address of the order or bet."]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsx)(s.h3,{id:"create_destroy",children:"create_destroy"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_destroy(source, asset, quantity, tag)"})}),"\n",(0,r.jsx)(s.p,{children:"Destroy XCP or a user defined asset."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that will be sending (must have the necessary quantity of the specified asset)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"asset"})," or ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," to destroy."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the asset to destroy."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tag"})," (",(0,r.jsx)(s.em,{children:"string, optional"}),"): The tag (which works like a ",(0,r.jsx)(s.a,{href:"../../../../docs/advanced/protocol#memos",children:"Memo"})," ) associated with this transaction."]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsx)(s.h3,{id:"create_dispenser",children:"create_dispenser"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_dispenser(source, asset, give_quantity, escrow_quantity, mainchainrate, status, open_address, oracle_address)"})}),"\n",(0,r.jsxs)(s.p,{children:["Opens or closes a dispenser for a given asset at a given rate of main chain asset (BTC). Escrowed\nquantity on open must be equal or greater than ",(0,r.jsx)(s.em,{children:"give_quantity"}),". It is suggested that you escrow multiples\nof give_quantity to ease dispenser operation."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that will be dispensing (must have the necessary escrow_quantity of the specified asset)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"asset"})," or ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," to dispense."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"give_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantity"})," of the asset to dispense."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"escrow_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantity"})," of the asset to reserve for this dispenser."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"mainchainrate"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantity"})," of the main chain a
1sset (BTC) per dispensed portion."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"open_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that you would like to open the dispenser on."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"oracle_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that you would like to use as a price oracle for this dispenser."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"status"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The state of the dispenser. 0 for open, 1 for open using open_address, 10 for closed."]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Notes:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["When specifying an ",(0,r.jsx)(s.strong,{children:"oracle_address"}),", ",(0,r.jsx)(s.strong,{children:"mainchainrate"})," format becomes X.XX (fiat) (ex. 1500 = 15.00)."]}),"\n",(0,r.jsxs)(s.li,{children:["Dispensers can be opened on ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"EMPTY"})})," addresses (address with no BTC or XCP history)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"origin"})})," address is the ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"source"})})," address that opens a dispenser on an ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"EMPTY"})})," address"]}),"\n",(0,r.jsxs)(s.li,{children:["Dispensers can be opened, closed, and refilled via ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"source"})})," or ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"origin"})})," addresses"]}),"\n",(0,r.jsxs)(s.li,{children:["When closing a dispenser from ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"origin"})}),", escrowed dispenser funds are credited to ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"origin"})})," address"]}),"\n",(0,r.jsxs)(s.li,{children:["Use ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"open_address"})})," param to operate on a dispenser from ",(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.code,{children:"origin"})})," address"]}),"\n",(0,r.jsxs)(s.li,{children:["Dispensers have a ",(0,r.jsx)(s.code,{children:"MAX_DISPENSE"})," limit of 1,000"]}),"\n",(0,r.jsxs)(s.li,{children:["Dispensers ",(0,r.jsx)(s.code,{children:"MAX_DISPENSE"})," can be reset via a dispenser refill"]}),"\n",(0,r.jsxs)(s.li,{children:["Dispensers have a ",(0,r.jsx)(s.code,{children:"MAX_REFILL"})," limit of 5"]}),"\n",(0,r.jsxs)(s.li,{children:["Dispensers have a ",(0,r.jsx)(s.code,{children:"CLOSE"})," delay of 5 blocks"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"create_dividend",children:"create_dividend"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_dividend(source, quantity_per_unit, asset, dividend_asset)"})}),"\n",(0,r.jsx)(s.p,{children:"Issue a dividend on a specific user defined asset."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that will be issuing the dividend (must have the ownership of the asset which the dividend is being issued on)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"quantity_per_unit"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The amount of ",(0,r.jsx)(s.strong,{children:"dividend_asset"})," rewarded."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"asset"})," or ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," that the dividends are being rewarded on."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"dividend_asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"asset"})," or ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," that the dividends are paid in."]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsx)(s.h3,{id:"create_issuance",children:"create_issuance"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_issuance(source, asset, quantity, divisible, description, transfer_destination=null, lock, reset)"})}),"\n",(0,r.jsx)(s.p,{children:"Issue a new asset, issue more of an existing asset, lock an asset, reset existing supply, or transfer the ownership of an asset."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that will be issuing or transfering the asset."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," to issue or transfer. This can also be a ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset longname"})," for new subasset issuances."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantity"})," of the asset to issue (set to 0 if ",(0,r.jsx)(s.em,{children:"transferring"})," an asset)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"divisible"})," (",(0,r.jsx)(s.em,{children:"boolean, default=true"}),"): Whether this asset is divisible or not (if a transfer, this value must match the value specified when the asset was originally issued)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"description"})," (",(0,r.jsx)(s.em,{children:"string, default=''"}),"): A textual description for the asset."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"transfer_destination"})," (",(0,r.jsx)(s.em,{children:"string, default=null"}),"): The address to receive the asset."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"lock"})," (",(0,r.jsx)(s.em,{children:"boolean, default=false"}),"): Whether this issuance should lock supply of this asset forever."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"reset"})," (",(0,r.jsx)(s.em,{children:"boolean, default=false"}),"): Wether this issuance should reset any existing supply."]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: ",(0,r.jsx)(s.strong,{children:"reset"})," is only possible when no supply is issued, or when the asset owner has control of 100% of the supply."]})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: When resetting an assets supply, ",(0,r.jsx)(s.strong,{children:"transfer_destination"})," will not work in the same issuance as ",(0,r.jsx)(s.strong,{children:"reset"})," ."]})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."]})}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: When resetting an assets supply, ",(0,r.jsx)(s.strong,{children:"lock"})," and ",(0,r.jsx)(s.strong,{children:"transfer_destination"})," will not work in the same issuance as ",(0,r.jsx)(s.strong,{children:"reset"})," ."]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Notes:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"A named asset has an issuance cost of 0.5 XCP."}),"\n",(0,r.jsx)(s.li,{children:"A subasset has an issuance cost of 0.25 XCP."}),"\n",(0,r.jsx)(s.li,{children:"In order to issue an asset, BTC and XCP (for first time, non-free Counterparty assets) are required at the source address to pay fees."}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"create_order",children:"create_order"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_order(source, give_asset, give_quantity, get_asset, get_quantity, expiration)"})}),"\n",(0,r.jsx)(s.p,{children:"Issue an order request."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that will be issuing the order request (must have the necessary quantity of the specified asset to give)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"give_asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," to give."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"give_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the asset to give."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"get_asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," requested in return."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"get_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the asset requested in return."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"expiration"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The number of blocks for which the order should be valid."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fee_required"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The miners\u2019 fee required to be paid by orders for them to match this one; in BTC; required only if buying BTC (may be zero, though)"]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsx)(s.h3,{id:"create_send",children:"create_send"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_send(source, destination, asset, quantity)"})}),"\n",(0,r.jsx)(s.p,{children:"Send XCP or a user defined asset."}),"\n",(0,r.jsx)(s.p,{children:"To send multiple assets/destinations simultaneously you can pass an array of parameters to the destination, asset and quantity parameters. If one of these parameters is an array then the other must be an array of equal length. Each entry corresponds to the same entry index on the other arrays."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that will be sending (must have the necessary quantity of the specified asset)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"destination"})," (",(0,r.jsx)(s.em,{children:"string, array[string]"}),"): The address to receive the asset."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string, array[string]"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"asset"})," or ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," to send."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"quantity"})," (",(0,r.jsx)(s.em,{children:"integer, array[integer]"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the asset to send."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"memo"})," (",(0,r.jsx)(s.em,{children:"string, optional"}),"): The ",(0,r.jsx)(s.a,{href:"../../../../docs/advanced/protocol#memos",children:"Memo"})," associated with this transaction."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"memo_is_hex"})," (",(0,r.jsx)(s.em,{children:"boolean, optional"}),"): If this is true, interpret the ",(0,r.jsx)(s.a,{href:"../../../../docs/advanced/protocol#memos",children:"memo"})," as a hexadecimal value. Defaults to false."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"use_enhanced_send"})," (",(0,r.jsx)(s.em,{children:"boolean, optional"}),"): If this is false, the construct a legacy transaction sending bitcoin dust. Defaults to true."]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsx)(s.h3,{id:"create_sweep",children:"create_sweep"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"create_sweep(source, destination, flags, memo)"})}),"\n",(0,r.jsx)(s.p,{children:"Sends all assets and/or transfer ownerships to a destination address."}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that will be sending."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"destination"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address to receive the assets and/or ownerships."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"flags"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): An OR mask of flags indicating how the sweep should be processed. Possible flags are:","\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["FLAG_BALANCES: (",(0,r.jsx)(s.em,{children:"integer"}),") 1, specifies that all balances should be transferred."]}),"\n",(0,r.jsxs)(s.li,{children:["FLAG_OWNERSHIP: (",(0,r.jsx)(s.em,{children:"integer"}),") 2, specifies that all ownerships should be transferred."]}),"\n",(0,r.jsxs)(s.li,{children:["FLAG_BINARY_MEMO: (",(0,r.jsx)(s.em,{children:"integer"}),") 4, specifies that the memo is in binary/hex form."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"memo"})," (",(0,r.jsx)(s.em,{children:"string, optional"}),"): The ",(0,r.jsx)(s.a,{href:"../../../../docs/advanced/protocol#memos",children:"Memo"})," associated with this transaction."]}),"\n",(0,r.jsx)(s.li,{children:(0,r.jsxs)(s.em,{children:["NOTE: Additional (advanced) parameters for this call are documented ",(0,r.jsx)(s.a,{href:"#advanced-create_-parameters",children:"here"}),"."
1]})}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsxs)(s.p,{children:["The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see ",(0,r.jsx)(s.a,{href:"#signing-transactions-before-broadcasting",children:"here"})," for more information."]}),"\n",(0,r.jsxs)(s.h3,{id:"advanced-create_-parameters",children:["Advanced ",(0,r.jsx)(s.code,{children:"create_"})," parameters"]}),"\n",(0,r.jsxs)(s.p,{children:["Each ",(0,r.jsx)(s.code,{children:"create_"})," call detailed below can take the following common keyword parameters:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"encoding"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The encoding method to use, see ",(0,r.jsx)(s.a,{href:"#transaction-encodings",children:"transaction encodings"})," for more info."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"pubkey"})," (",(0,r.jsx)(s.em,{children:"string/list"}),"): The hexadecimal public key of the source address (or a list of the keys, if multi\u2010sig). Required when using ",(0,r.jsx)(s.code,{children:"encoding"})," parameter values of ",(0,r.jsx)(s.code,{children:"multisig"})," or ",(0,r.jsx)(s.code,{children:"pubkeyhash"}),". See ",(0,r.jsx)(s.a,{href:"#transaction-encodings",children:"transactions encoding"})," for more info"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"allow_unconfirmed_inputs"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): Set to ",(0,r.jsx)(s.code,{children:"true"})," to allow this transaction to utilize unconfirmed UTXOs as inputs. Defaults to ",(0,r.jsx)(s.code,{children:"false"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fee"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): If you'd like to specify a custom miners' fee, specify it here (in satoshi). Leave as default for the server to automatically choose."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fee_per_kb"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The fee per kilobyte of transaction data constant that the server uses when deciding on the dynamic fee to use (in satoshi)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fee_provided"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): If you would like to specify a maximum fee (up to and including which may be used as the transaction fee), specify it here (in satoshi). This differs from ",(0,r.jsx)(s.code,{children:"fee"})," in that this is an upper bound value, which ",(0,r.jsx)(s.code,{children:"fee"})," is an exact value."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"custom_inputs"})," (",(0,r.jsx)(s.em,{children:"list"}),"): Use only these specific UTXOs as inputs for the transaction being created. If specified, this parameter is a list of (JSON-encoded) UTXO objects, whose properties match those as retrieved by ",(0,r.jsx)(s.code,{children:"listunspent"})," function from bitcoind (e.g. see ",(0,r.jsx)(s.a,{href:"https://chainquery.com/bitcoin-api/listunspent",children:"here"}),"). Note that the actual UTXOs used may be a subset of this list."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"unspent_tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): When compiling the UTXOs to use as inputs for the transaction being created, only consider unspent outputs from this specific transaction hash. Defaults to ",(0,r.jsx)(s.code,{children:"null"})," to consider all UTXOs for the address. Do not use this parameter if you are specifying ",(0,r.jsx)(s.code,{children:"custom_inputs"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"regular_dust_size"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): Specify (in satoshi) to override the (dust) amount of BTC used for each non-(bare) multisig output. Defaults to ",(0,r.jsx)(s.code,{children:"5430"})," satoshi."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"multisig_dust_size"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): Specify (in satoshi) to override the (dust) amount of BTC used for each (bare) multisig output. Defaults to ",(0,r.jsx)(s.code,{children:"7800"})," satoshi."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"dust_return_pubkey"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The dust return pubkey is used in multi-sig data outputs (as the only real pubkey) to make those the outputs spendable. By default, this pubkey is taken from the pubkey used in the first transaction input. However, it can be overridden here (and is ",(0,r.jsx)(s.em,{children:"required"})," to be specified if a P2SH input is used and multisig is used as the data output encoding.) If specified, specify the public key (in hex format) where dust will be returned to so that it can be reclaimed. Only valid/useful when used with transactions that utilize multisig data encoding. Note that if this value is set to ",(0,r.jsx)(s.code,{children:"false"}),", this instructs ",(0,r.jsx)(s.code,{children:"counterparty-server"})," to use the default dust return pubkey configured at the node level. If this default is not set at the node level, the call will generate an exception."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"disable_utxo_locks"})," (",(0,r.jsx)(s.em,{children:"boolean"}),'): By default, UTXO\'s utilized when creating a transaction are "locked" for a few seconds, to prevent a case where rapidly generating ',(0,r.jsx)(s.code,{children:"create_"})," calls reuse UTXOs due to their spent status not being updated in bitcoind yet. Specify ",(0,r.jsx)(s.code,{children:"true"})," for this parameter to disable this behavior, and not temporarily lock UTXOs."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"op_return_value"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The value (in satoshis) to use with any ",(0,r.jsx)(s.code,{children:"OP_RETURN"})," outputs in the generated transaction. Defaults to ",(0,r.jsx)(s.code,{children:"0"}),". Don't use this, unless you like ",(0,r.jsx)(s.a,{href:"https://m.reddit.com/r/Bitcoin/comments/2plfsv/what_happens_to_the_value_of_a_coin_locked_with/cmxrnhu",children:"throwing your money away"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"extended_tx_info"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): When this is not specified or false, the ",(0,r.jsx)(s.code,{children:"create_"})," calls return only a hex-encoded string. If this is true, the ",(0,r.jsx)(s.code,{children:"create_"})," calls return a data object with the following keys: ",(0,r.jsx)(s.code,{children:"tx_hex"}),", ",(0,r.jsx)(s.code,{children:"btc_in"}),", ",(0,r.jsx)(s.code,{children:"btc_out"}),", ",(0,r.jsx)(s.code,{children:"btc_change"}),", and ",(0,r.jsx)(s.code,{children:"btc_fee"}),"."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"p2sh_pretx_txid"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The previous transaction ",(0,r.jsx)(s.code,{children:"txid"})," for a two part ",(0,r.jsx)(s.code,{children:"P2SH"})," message. This ",(0,r.jsx)(s.code,{children:"txid"})," must be taken from the signed transaction."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsxs)(s.strong,{children:["With the exception of ",(0,r.jsx)(s.code,{children:"pubkey"})," and ",(0,r.jsx)(s.code,{children:"allow_unconfirmed_inputs"}),", these values should be left at their defaults, unless you know
1what you are doing."]})}),"\n",(0,r.jsx)(s.h4,{id:"transaction-encodings",children:"Transaction Encodings"}),"\n",(0,r.jsxs)(s.p,{children:["By default the default value of the ",(0,r.jsx)(s.code,{children:"encoding"})," parameter detailed above is ",(0,r.jsx)(s.code,{children:"auto"}),", which means that ",(0,r.jsx)(s.code,{children:"counterparty-server"})," automatically determines the best way to encode the Counterparty protocol data into a new transaction. If you know what you are doing and would like to explicitly specify an encoding:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["To return the transaction as an ",(0,r.jsx)(s.strong,{children:"OP_RETURN"})," transaction, specify ",(0,r.jsx)(s.code,{children:"opreturn"})," for the ",(0,r.jsx)(s.code,{children:"encoding"})," parameter.","\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"OP_RETURN"})," transactions cannot have more than 80 bytes of data. If you force OP_RETURN encoding and your transaction would have more than this amount, an exception will be generated."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["To return the transaction as a ",(0,r.jsx)(s.strong,{children:"multisig"})," transaction, specify ",(0,r.jsx)(s.code,{children:"multisig"})," for the ",(0,r.jsx)(s.code,{children:"encoding"})," parameter.","\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"pubkey"})," should be set to the hex-encoded public key of the source address."]}),"\n",(0,r.jsxs)(s.li,{children:["Note that with the newest versions of Bitcoin (0.12.1 onward), bare multisig encoding does not reliably propagate. More information on this is documented ",(0,r.jsx)(s.a,{href:"https://github.com/rubensayshi/counterparty-core/pull/9",children:"here"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["To return the transaction as a ",(0,r.jsx)(s.strong,{children:"pubkeyhash"})," transaction, specify ",(0,r.jsx)(s.code,{children:"pubkeyhash"})," for the ",(0,r.jsx)(s.code,{children:"encoding"})," parameter.","\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"pubkey"})," should be set to the hex-encoded public key of the source address."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.li,{children:["To return the transaction as a 2 part ",(0,r.jsx)(s.strong,{children:"P2SH"})," transaction, specify ",(0,r.jsx)(s.code,{children:"P2SH"})," for the encoding parameter.","\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["First call the ",(0,r.jsx)(s.code,{children:"create_"})," method with the ",(0,r.jsx)(s.code,{children:"encoding"})," set to ",(0,r.jsx)(s.code,{children:"P2SH"}),"."]}),"\n",(0,r.jsx)(s.li,{children:"Sign the transaction as usual and broadcast it. It's recommended but not required to wait the transaction to confirm as malleability is an issue here (P2SH isn't yet supported on segwit addresses)."}),"\n",(0,r.jsxs)(s.li,{children:["The resulting ",(0,r.jsx)(s.code,{children:"txid"})," must be passed again on an identic call to the ",(0,r.jsx)(s.code,{children:"create_"})," method, but now passing an additional parameter ",(0,r.jsx)(s.code,{children:"p2sh_pretx_txid"})," with the value of the previous transaction's id."]}),"\n",(0,r.jsxs)(s.li,{children:["The resulting transaction is a ",(0,r.jsx)(s.code,{children:"P2SH"})," encoded message, using the redeem script on the transaction inputs as data carrying mechanism."]}),"\n",(0,r.jsxs)(s.li,{children:["Sign the transaction following the ",(0,r.jsx)(s.code,{children:"Bitcoinjs-lib on javascript, signing a P2SH redeeming transaction"})," section"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"NOTE"}),": Don't leave pretxs hanging without transmitting the second transaction as this pollutes the UTXO set and risks making bitcoin harder to run on low spec nodes."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"rest-api-function-reference",children:"REST API Function Reference"}),"\n",(0,r.jsx)(s.h3,{id:"get",children:"get"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"get(table_name, filters, filterop)"})}),"\n",(0,r.jsx)(s.p,{children:"Query table_name in the database using filters concatenated using filterop."}),"\n",(0,r.jsx)(s.p,{children:"URL format:"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.code,{children:"/rest/<table_name>/get?<table_filters>&op=<filter_op>"})}),"\n",(0,r.jsx)(s.p,{children:"Example query:"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.code,{children:"/rest/sends/get?source=mn6q3dS2EnDUx3bmyWc6D4szJNVGtaR7zc&destination=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns&op=AND"})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"table_name"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The name of the desired table. List of all available tables:\n",(0,r.jsx)(s.code,{children:"assets"}),", ",(0,r.jsx)(s.code,{children:"balances"}),", ",(0,r.jsx)(s.code,{children:"credits"}),", ",(0,r.jsx)(s.code,{children:"debits"}),", ",(0,r.jsx)(s.code,{children:"bets"}),", ",(0,r.jsx)(s.code,{children:"bet_matches"}),",\n",(0,r.jsx)(s.code,{children:"broadcasts"}),", ",(0,r.jsx)(s.code,{children:"btcpays"}),", ",(0,r.jsx)(s.code,{children:"burns"}),", ",(0,r.jsx)(s.code,{children:"cancels"}),", ",(0,r.jsx)(s.code,{children:"dividends"}),", ",(0,r.jsx)(s.code,{children:"issuances"}),",\n",(0,r.jsx)(s.code,{children:"orders"}),", ",(0,r.jsx)(s.code,{children:"order_matches"}),", ",(0,r.jsx)(s.code,{children:"sends"}),", ",(0,r.jsx)(s.code,{children:"bet_expirations"}),", ",(0,r.jsx)(s.code,{children:"order_expirations"}),",\n",(0,r.jsx)(s.code,{children:"bet_match_expirations"}),", ",(0,r.jsx)(s.code,{children:"order_match_expirations"}),", ",(0,r.jsx)(s.code,{children:"bet_match_resolutions"}),", ",(0,r.jsx)(s.code,{children:"mempool"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"filters"})," (",(0,r.jsx)(s.em,{children:"dict, optional"}),"): Data filters as a dictionary. The filter format is same as for get_"," JSON API queries. See ",(0,r.jsx)(s.a,{href:"#filtering-read-api-results",children:"Filtering Read API Results"})," for more information on filters and ",(0,r.jsx)(s.a,{href:"#objects",children:"Object Definitions"})," for fields available for specific objects."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"filterop"})," (",(0,r.jsx)(s.em,{children:"string, optional"}),"): The logical operator concatenating the filters. Defaults to ",(0,r.jsx)(s.code,{children:"AND"}),"."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Headers:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Accept"})," (",(0,r.jsx)(s.em,{children:"string, optional"}),"): The format of return data. Can be either ",(0,r.jsx)(s.code,{children:"application/json"})," or ",(0,r.jsx)(s.code,{children:"application/xml"}),". Defaults to JSON."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"Desired database rows from table_name sieved using filters."}),"\n",(0,r.jsx)(s.h3,{id:"compose",children:"compose"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"compose(message_type, transaction_params)"})}),"\n",(0,r.jsxs)(s.p,{children:["Compose a ",(0,r.jsx)(s.code,{children:"message_type"})," transaction with ",(0,r.jsx)(s.code,{children:"transaction_params"})," as data."]}),"\n",(0,r.jsx)(s.p,{children:"URL format:"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.code,{children:"/rest/<tx_type>/compose?<tx_data>"})}),"\n",(0,r.jsx)(s.p,{children:"Example query:"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.code,{children:"/rest/send/compose?source=mn6q3dS2EnDUx3bmyWc6D4szJNVGtaR7zc&destination=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns&asset=BTC&quantity=1"})}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Parameters:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"message_type"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The type of desired transaction message. List of all available transactions:\n",(0,r.jsx)(s.code,{children:"bet"}),", ",(0,r.jsx)(s.code,{children:"broadcast"}),", ",(0,r.jsx)(s.code,{children:"btcpay"}),", ",(0,r.jsx)(s.code,{children:"burn"}),", ",(0,r.jsx)(s.code,{children:"cancel"}),", ",(0,r.jsx)(s.code,{children:"dividend"}),", ",(0,r.jsx)(s.code,{children:"issuance"}),",\n",(0,r.jsx)(s.code,{children:"order"}),", ",(0,r.jsx)(s.code,{children:"send"}),", ",(0,r.jsx)(s.code,{children:"publish"}),", ",(0,r.jsx)(s.code,{children:"execute"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"transaction_params"})," (",(0,r.jsx)(s.em,{children:"dict"}),"): The parameters to be passed to the compose_transaction function. See ",(0,r.jsx)(s.a,{href:"#actionwrite-api-function-reference",children:"Write API Function Reference"})," for list of transactions and their parameters."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Headers:"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Accept"})," (",(0,r.jsx)(s.em,{children:"string, optional"}),"): The format of return data. Can be either ",(0,r.jsx)(s.code,{children:"application/json"})," or ",(0,r.jsx)(s.code,{children:"application/xml"}),". Defaults to JSON."]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"Return:"})}),"\n",(0,r.jsx)(s.p,{children:"The hex data of composed transaction."}),"\n",(0,r.jsx)(s.h2,{id:"objects",children:"Objects"}),"\n",(0,r.jsx)(s.p,{children:"The API calls documented can return any one of these objects."}),"\n",(0,r.jsx)(s.h3,{id:"balance-object",children:"Balance Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes a balance that is associated to a specific address:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): A PubkeyHash Bitcoin address, or the pubkey associated with it (in case the address hasn\u2019t sent anything before)."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ID of the ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," in which the balance is specified"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the specified asset at this address"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"bet-object",children:"Bet Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes a specific bet:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that made the bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"feed_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address with the feed that the bet is to be made on"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"bet_type"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): 0 for Bullish CFD (deprecated), 1 for Bearish CFD (deprecated), 2 for Equal, 3 for Not Equal"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"deadline"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The timestamp at which the bet should be decided/settled, in Unix time."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"wager_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of XCP to wager"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"counterwager_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The minimum ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of XCP to be wagered by the user to bet against the bet issuer, if the other party were to accept the whole thing"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"wager_remaining"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The quantity of XCP wagered that is remaining to bet on"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"odds"})," (",(0,r.jsx)(s.em,{children:"float"}),"):"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"target_value"})," (",(0,r.jsx)(s.em,{children:"float"}),"): Target value for Equal/NotEqual bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"leverage"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): Leverage, as a fraction of 5040"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"expiration"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The number of blocks for which the bet should be valid"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fee_multiplier"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): How much of every bet on this feed should go to its operator; a fraction of 1, (i.e. 0.05 is five percent)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"val
1idity"})," (",(0,r.jsx)(s.em,{children:"string"}),'): Set to "valid" if a valid bet. Any other setting signifies an invalid/improper bet']}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"bet-match-object",children:"Bet Match Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes a specific occurance of two bets being matched (either partially, or fully):"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The Bitcoin transaction index of the initial bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The Bitcoin transaction hash of the initial bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The Bitcoin block index of the initial bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_expiration"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The number of blocks over which the initial bet was valid"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that issued the initial bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_bet_type"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The type of the initial bet (0 for Bullish CFD (deprecated), 1 for Bearish CFD (deprecated), 2 for Equal, 3 for Not Equal)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index of the matching (counter) bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash of the matching bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index of the matching bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that issued the matching bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_expiration"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The number of blocks over which the matching bet was valid"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_bet_type"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The type of the counter bet (0 for Bullish CFD (deprecated), 1 for Bearish CFD (deprecated), 2 for Equal, 3 for Not Equal)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"feed_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address of the feed that the bets refer to"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"initial_value"})," (",(0,r.jsx)(s.em,{children:"integer"}),"):"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"deadline"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The timestamp at which the bet match was made, in Unix time."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"target_value"})," (",(0,r.jsx)(s.em,{children:"float"}),"): Target value for Equal/NotEqual bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"leverage"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): Leverage, as a fraction of 5040"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"forward_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of XCP bet in the initial bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"backward_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of XCP bet in the matching bet"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fee_multiplier"})," (",(0,r.jsx)(s.em,{children:"integer"}),"):"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"val
1idity"})," (",(0,r.jsx)(s.em,{children:"string"}),'): Set to "valid" if a valid order match. Any other setting signifies an invalid/improper order match']}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"broadcast-object",children:"Broadcast Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes a specific occurance of a broadcast event (i.e. creating/extending a feed):"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that made the broadcast"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"timestamp"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The time the broadcast was made, in Unix time."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"value"})," (",(0,r.jsx)(s.em,{children:"float"}),"): The numerical value of the broadcast"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fee_multiplier"})," (",(0,r.jsx)(s.em,{children:"float"}),"): How much of every bet on this feed should go to its operator; a fraction of 1, (i.e. 0.05 is five percent)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"text"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The textual component of the broadcast"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"validity"})," (",(0,r.jsx)(s.em,{children:"string"}),'): Set to "valid" if a valid broadcast. Any other setting signifies an invalid/improper broadcast']}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"btcpay-object",children:"BTCPay Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that matches a request to settle an Order Match for which BTC is owed:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"):"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"order_match_id"})," (",(0,r.jsx)(s.em,{children:"string"}),"):"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"validity"})," (",(0,r.jsx)(s.em,{children:"string"}),'): Set to "valid" if valid']}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"burn-object",children:"Burn Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes an instance of a specific burn:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address the burn was performed from"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"burned"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of BTC burned"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"earned"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of XPC actually earned from the burn (takes into account any bonus quantitys, 1 BTC limitation, etc)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"val
1idity"})," (",(0,r.jsx)(s.em,{children:"string"}),'): Set to "valid" if a valid burn. Any other setting signifies an invalid/improper burn']}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"cancel-object",children:"Cancel Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes a cancellation of a (previously) open order or bet:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address with the open order or bet that was cancelled"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"offer_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash of the order or bet cancelled"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"validity"})," (",(0,r.jsx)(s.em,{children:"string"}),'): Set to "valid" if a valid burn. Any other setting signifies an invalid/improper burn']}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"debitcredit-object",children:"Debit/Credit Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes a account debit or credit:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address debited or credited"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," debited or credited"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the specified asset debited or credited"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"dividend-object",children:"Dividend Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes an issuance of dividends on a specific user defined asset:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that issued the dividend"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," that the dividends are being rewarded on"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"quantity_per_unit"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of XCP rewarded per whole unit of the asset"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"validity"})," (",(0,r.jsx)(s.em,{children:"string"}),'): Set to "valid" if a valid burn. Any other setting signifies an invali
1d/improper burn']}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"issuance-object",children:"Issuance Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes a specific occurance of a user defined asset being issued, or re-issued:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," being issued, or re-issued"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset_longname"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#subassets",children:"subasset"})," longname, if any"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the specified asset being issued"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"divisible"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): Whether or not the asset is divisible (must agree with previous issuances of the asset, if there are any)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"issuer"})," (",(0,r.jsx)(s.em,{children:"string"}),"):"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"transfer"})," (",(0,r.jsx)(s.em,{children:"boolean"}),"): Whether or not this objects marks the transfer of ownership rights for the specified quantity of this asset"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"validity"})," (",(0,r.jsx)(s.em,{children:"string"}),'): Set to "valid" if a valid issuance. Any other setting signifies an invalid/improper issuance']}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"order-object",children:"Order Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes a specific order:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that made the order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"give_asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," being offered"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"give_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the specified asset being offered"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"give_remaining"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the specified give asset remaining for the order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"get_asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," desired in exchange"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"get_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the specified asset desired in exchange"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"get_remaining"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the specified get asset remaining for the order"]}
1),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"price"})," (",(0,r.jsx)(s.em,{children:"float"}),"): The given exchange rate (as an exchange ratio desired from the asset offered to the asset desired)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"expiration"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The number of blocks over which the order should be valid"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fee_provided"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The miners' fee provided; in BTC; required only if selling BTC (should not be lower than is required for acceptance in a block)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"fee_required"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The miners' fee required to be paid by orders for them to match this one; in BTC; required only if buying BTC (may be zero, though)"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"order-match-object",children:"Order Match Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes a specific occurance of two orders being matched (either partially, or fully):"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The Bitcoin transaction index of the first (earlier) order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The Bitcoin transaction hash of the first order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The Bitcoin block index of the first order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_expiration"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The number of blocks over which the first order was valid"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that issued the first (earlier) order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index of the second (matching) order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash of the second order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index of the second order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The address that issued the second order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_expiration"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The number of blocks over which the second order was valid"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"forward_asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," exchanged FROM the first order to the second order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"forward_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the specified forward asset"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"backward_asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," exchanged FROM the second order to the first order"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"backward_quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the specified backward asset"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"validity"})," (",(0,r.jsx)(s.em,{children:"string"}),'): Set to "valid" if a valid order match. Any other setting signifies an invalid/improper order match']}
1),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"send-object",children:"Send Object"}),"\n",(0,r.jsx)(s.p,{children:'An object that describes a specific send (e.g. "simple send", of XCP, or a user defined asset):'}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The source address of the send"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"destination"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The destination address of the send"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"asset"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"#assets",children:"assets"})," being sent"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"quantity"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The ",(0,r.jsx)(s.a,{href:"#quantities-and-balances",children:"quantities"})," of the specified asset sent"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"validity"})," (",(0,r.jsx)(s.em,{children:"string"}),'): Set to "valid" if a valid send. Any other setting signifies an invalid/improper send']}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"memo"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The ",(0,r.jsx)(s.a,{href:"../../../../docs/advanced/protocol#memos",children:"memo"})," associated with this transaction"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"message-object",children:"Message Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes a specific event in the counterpartyd message feed (which can be used by 3rd party applications\nto track state changes to the counterpartyd database on a block-by-block basis)."}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"message_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The message index (i.e. transaction index)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain) this event occurred on"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"category"})," (",(0,r.jsx)(s.em,{children:"string"}),'): A string denoting the entity that the message relates to, e.g. "credits", "burns", "debits".\nThe category matches the relevant table name in counterpartyd (see blocks.py for more info).']}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"command"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The operation done to the table noted in ",(0,r.jsx)(s.strong,{children:"category"}),'. This is either "insert", or "update".']}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"bindings"})," (",(0,r.jsx)(s.em,{children:"string"}),"): A JSON-encoded object containing the message data. The properties in this object match the\ncolumns in the table referred to by ",(0,r.jsx)(s.strong,{children:"category"}),"."]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"bet-expiration-object",children:"Bet Expiration Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes the expiration of a bet created by the source address."}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"bet_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index of the bet expiring"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"bet_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash of the bet expiriing"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain) when this expiration occurred"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The source address that created the bet"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"order-expiration-object",children:"Order Expiration Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes the expiration of an order created by the source address."}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"order_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index of the order expiring"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"order_hash"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The transaction hash of the order expiriing"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain) when this expiration occurred"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"source"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The source address that created the order"]}
1),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"bet-match-expiration-object",children:"Bet Match Expiration Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes the expiration of a bet match."}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"bet_match_id"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index of the bet match ID (e.g. the concatenation of the tx0 and tx1 hashes)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The tx0 (first) address for the bet match"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The tx1 (second) address for the bet match"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain) when this expiration occurred"]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"order-match-expiration-object",children:"Order Match Expiration Object"}),"\n",(0,r.jsx)(s.p,{children:"An object that describes the expiration of an order match."}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"order_match_id"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The transaction index of the order match ID (e.g. the concatenation of the tx0 and tx1 hashes)"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx0_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The tx0 (first) address for the order match"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"tx1_address"})," (",(0,r.jsx)(s.em,{children:"string"}),"): The tx1 (second) address for the order match"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"block_index"})," (",(0,r.jsx)(s.em,{children:"integer"}),"): The block index (block number in the block chain) when this expiration occurred"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"status",children:"Status"}),"\n",(0,r.jsx)(s.p,{children:"Here the list of all possible status for each table:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"balances"}),": No status field"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"bet_expirations"}),": No status field"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"bet_match_expirations"}),": No status field"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"bet_matches"}),": pending, settled: liquidated for bear (deprecated), settled, settled: liquidated for bull (deprecated), settled: for equal, settled: for notequal, dropped, expired"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"bets"}),": open, filled, cancelled, expired, dropped, invalid: ",(0,r.jsx)(s.code,{children:"{problem(s)}"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"broadcasts"}),": valid, invalid: ",(0,r.jsx)(s.code,{children:"{problem(s)}"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"btcpays"}),": valid, invalid: ",(0,r.jsx)(s.code,{children:"{problem(s)}"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"burns"}),": valid, invalid: ",(0,r.jsx)(s.code,{children:"{problem(s)}"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"cancels"}),": valid, invalid: ",(0,r.jsx)(s.code,{children:"{problem(s)}"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"credits"}),": No status field"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"debits"}),": No status field"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"dividends"}),": valid, invalid: ",(0,r.jsx)(s.code,{children:"{problem(s)}"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"issuances"}),": valid, invalid: ",(0,r.jsx)(s.code,{children:"{problem(s)}"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"order_expirations"}),": No status field"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"order_match_expirations"}),": No status field"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"order_matches"}),": pending, completed, expired"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"orders"}),": open, filled, canceled, expired, invalid: ",(0,r.jsx)(s.code,{children:"{problem(s)}"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"sends"}),": valid, invalid: ",(0,r.jsx)(s.code,{children:"{problem(s)}"})]}),"\n"]})]})}function o(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453(e,s,n){n.d(s,{R:()=>d,x:()=>c});var i=n(6540);const r={},t=i.createContext(r);function d(e){const s=i.useContext(t);return i.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.