diff --git a/Basics/FAQ-XDP.md b/Basics/FAQ-XDP.md index b7446edc..e57267a5 100644 --- a/Basics/FAQ-XDP.md +++ b/Basics/FAQ-XDP.md @@ -1,11 +1,16 @@ -What is XDP? -===================== +# What is XDP? + +- [How was XDP launched in 2014?](#how-was-xdp-launched-in-2014) +- [How was XDP re-launched in 2021?](#how-was-xdp-re-launched-in-2021) +- [Is XDP an alt-coin or competitor to Dogecoin?](#is-xdp-an-alt-coin-or-competitor-to-dogecoin) +- [Can more XDP be created?](#can-more-xdp-be-created) +- [What is XDP used for?](#what-is-xdp-used-for) XDP is the native token of Dogeparty. It is a technical necessity for adding advanced features to Dogeparty, which by nature require a protocol aware currency. Dogecoin can only be aware of DOGE, while Dogeparty can be aware of both DOGE and XDP itself. This makes it possible to escrow funds, trade in a decentralized manner, and harness the full potential of programmable money. _Note: It is a common misconception that XDP is a competitor to Dogecoin, when in fact it cannot exist without it. And even though XDP is not a traditional currency, it serves a steady and critical purpose within the Dogeparty ecosystem._ -### How was XDP launched in 2014? +#### How was XDP launched in 2014? The supply of XDP was created in a process called 'proof-of-burn' that lasted from August 13th to September 17th 2014 (43,200 Dogecoin blocks). During this period, anyone was able to exchange Dogecoins for XDP automatically on a protocol level under the following conditions: @@ -27,27 +32,24 @@ Since the DOGE on the burn address will never be spendable again, they are consi * Full transparency * Zero pre-mine -### How was XDP re-launched in 2021? +#### How was XDP re-launched in 2021? The supply of XDP was re-launched in a process called 'proof-of-bern' that lasted from September 1st to November 1st 2021 (86,400 Dogecoin blocks). During this period, anyone was able to exchange Dogecoins for XDP automatically on a protocol level under the following conditions: * Users sent their DOGE to the community fund Dogecoin address via the "bern" process in a dogeparty compatible wallet. ([DParty4kWgih7MpTUivMn1icgC5x7fxALP](https://dogeparty.xchain.io/burns)) - * Each 10 DOGE was automatically exchanged for a number of XDP between 1 and 1.5, with more being rewarded the earlier the burn took place. - * The reward bonus decreased linearily with the block index. - * Each address was limited to 1 Million DOGE. -### Is XDP an alt-coin or competitor to Dogecoin? +#### Is XDP an alt-coin or competitor to Dogecoin? No. XDP cannot exist without Dogecoin, as Dogeparty extends the basic features of Dogecoin with proof-of-publication, oracle betting, decentralized exchange, automatic escrow, and order matching. -### Can more XDP be created? +#### Can more XDP be created? No. The supply of XDP is fixed after the re-launch in 2021, and decreasing because of fees being burned. -### What is XDP used for? +#### What is XDP used for? XDP is the fuel for certain functions within the Dogeparty protocol such as issuing assets and subassets, sweeps, dividends, etc. Appropriately enough, this fuel is **burned** (destroyed). This means that the supply of XDP is continously decreasing. However, the cost of fuel adjusts proportionally as the supply of XDP goes down, so that it cannot reach 0. diff --git a/Basics/FAQ.md b/Basics/FAQ.md index 17ba2483..a09a42bd 100644 --- a/Basics/FAQ.md +++ b/Basics/FAQ.md @@ -1,59 +1,74 @@ -Frequently Asked Questions -======== - -[TOC] - -### How does Dogeparty work? +# Frequently Asked Questions + +- [How does Dogeparty work?](#how-does-dogeparty-work) +- [So Dogeparty is not its own Blockchain, but "rides on top of" Dogecoin?](#so-dogeparty-is-not-its-own-blockchain-but-rides-on-top-of-dogecoin) +- [Is Dogeparty "polluting" the Dogecoin blockchain, then?](#is-dogeparty-polluting-the-dogecoin-blockchain-then) +- [Are Dogeparty transactions less secure than Dogecoin transactions?](#are-dogeparty-transactions-less-secure-than-dogecoin-transactions) +- [How do the Dogeparty nodes stay in sync? What's to stop one node from disagreeing with another?](#how-do-the-dogeparty-nodes-stay-in-sync-whats-to-stop-one-node-from-disagreeing-with-another) +- [What about Sidechains?](#what-about-sidechains) +- [What kind of addresses does Dogeparty use?](#what-kind-of-addresses-does-dogeparty-use) +- [What is XDP?](#what-is-xdp) +- [Can I secure my XDP and tokens in cold storage?](#can-i-secure-my-xdp-and-tokens-in-cold-storage) +- [Is a 51% attack against Dogeparty possible?](#is-a-51-attack-against-dogeparty-possible) +- [Besides a 51% attack, what are the other risks to consensus?](#besides-a-51-attack-what-are-the-other-risks-to-consensus) +- [So can the Dogeparty Team rewrite the Dogeparty ledger’s history, in an emergency or by decree? How does that compare to the same risks with Dogecoin Core devs?](#so-can-the-dogeparty-team-rewrite-the-dogeparty-ledgers-history-in-an-emergency-or-by-decree-how-does-that-compare-to-the-same-risks-with-dogecoin-core-devs) +- [What about support for other blockchains instead of Dogecoin?](#what-about-support-for-other-blockchains-instead-of-dogecoin) +- [What is Dogecoin fails or becomes co-opted?](#what-is-dogecoin-fails-or-becomes-co-opted) +- [What happens if and when OP_RETURN data is auto-pruned?](#what-happens-if-and-when-op_return-data-is-auto-pruned) +- [How are blockchain reorganizations ("reorgs") handled by Dogeparty?](#how-are-blockchain-reorganizations-reorgs-handled-by-dogeparty) +- [How can a thin client trustlessly lookup the Dogecoin public address associated with the OSTOCK asset name?](#how-can-a-thin-client-trustlessly-lookup-the-dogecoin-public-address-associated-with-the-ostock-asset-name) + +#### How does Dogeparty work? Dogeparty embeds data into regular Dogecoin transactions. To a regular Dogecoin client, these transactions look like normal Dogecoin transactions. A Dogeparty node (which runs the Dogecoin client along with [the Dogeparty client software](https://github.com/DogepartyXDP/dogeparty-lib)) will recognize and interpret the data in these Dogecoin transactions based on specific rules. From this, it constructs its own ledger of Dogeparty transactions that it has seen on the Dogecoin network. To better help understand this, [here](https://dogeparty.xchain.io/tx/3515b1da00d86731c5e38a30176ca464bbcba785bc11155afa6c748a155bd218) is a record of a Dogeparty transaction where one address is sending 1 JDOG token to another address. [Here](https://chain.so/tx/DOGE/3515b1da00d86731c5e38a30176ca464bbcba785bc11155afa6c748a155bd218) is what this transaction looks like to chain.so, a popular Dogecoin block explorer. You can see that while it is indeed a Dogecoin transaction, the amount of Dogecoin moved is small. In reality, the DOGE spent is just enough to compensate the Dogecoin miners to include the transaction in a block. Essentially, the user that sent the transaction is paying the Dogecoin network to record and secure this embedded Dogeparty data. -### So Dogeparty is not its own Blockchain, but "rides on top of" Dogecoin? +#### So Dogeparty is not its own Blockchain, but "rides on top of" Dogecoin? Yes. Another way to think of it is similar to a [Russian nesting doll](https://en.wikipedia.org/wiki/Matryoshka_doll), where the bigger doll would be the Dogecoin transaction, and the next doll (inside of it) would be a Dogeparty transaction. This embedding method is technically known as **embedded consensus**. -### Is Dogeparty "polluting" the Dogecoin blockchain, then? +#### Is Dogeparty "polluting" the Dogecoin blockchain, then? No. 99%+ of Dogeparty transactions utilize a data encoding method called `OP_RETURN`, which is fully "prunable", meaning that the data may be safely discarded by Dogecoin nodes which wish to do so. For the remaining 1% of transactions, an different encoding method is utilized that produces fully "spendable" outputs. These outputs do not stick around in the critical list of unspent outputs (the "UTXO set"). On top of this, every Dogeparty transaction pays a fair fee to the network for inclusion. -### Are Dogeparty transactions less secure than Dogecoin transactions? +#### Are Dogeparty transactions less secure than Dogecoin transactions? As Dogeparty transactions _are_ Dogecoin transactions, their data is proably just as secure as any other Dogecoin transaction. -### How do the Dogeparty nodes stay in sync? What's to stop one node from disagreeing with another? +#### How do the Dogeparty nodes stay in sync? What's to stop one node from disagreeing with another? As all Dogeparty nodes run the same code, and all receive the same Dogecoin transaction data, the ledgers across each node match exactly. Dogeparty nodes are not like Dogecoin nodes in that they don't communicate with each other: they simply connect to the Dogecoin software and download transactions from it, decoding each one as they go along. In this way, the immense security and computing power behind Dogecoin is leveraged as the "transport network" for Dogeparty data. Given the above, there is no "Dogeparty peer to peer network" like there is a "Dogecoin peer-to-peer network": Dogeparty-aware nodes comprise a subset of the Dogecoin full nodes in existance. -### What about Sidechains? +#### What about Sidechains? Dogeparty is optimal for mainly lower value transactions and greatly benefits from the speed and cost of the main chain. However, if sidechains are ever released for dogecoin, there is no reason that they couldn't be made to work with Dogeparty. This is the beauty of Dogeparty's embedded consensus technology -- it can work with just about any blockchain out there, including sidechain designs. -### What kind of addresses does Dogeparty use? +#### What kind of addresses does Dogeparty use? _Exactly_ the same Dogecoin addresses we all know and love. As such, Dogeparty tokens (such as XDP, JDOG, BACON, and more) may be sent to _any_ Dogecoin address. -### What is XDP? +#### What is XDP? XDP is the native token of Dogeparty. It is a technical necessity for adding advanced features to Dogeparty, which by nature require a protocol aware currency. Dogecoin can only be aware of DOGE, while Dogeparty can be aware of both DOGE and XDP itself. This makes it possible to escrow funds, trade in a decentralized manner, and harness the full potential of programmable money. *To learn more about XDP, see [about XDP](FAQ-XDP.md).* -### Can I secure my XDP and tokens in cold storage? +#### Can I secure my XDP and tokens in cold storage? Yes. You can make a regular Dogecoin paper wallet and store them there. Later, you can sweep the funds into a [Dogeparty wallet](https://dogeparty.net/wallets/), like Dogewallet. -### Is a 51% attack against Dogeparty possible? +#### Is a 51% attack against Dogeparty possible? As every Dogeparty transaction is a Dogecoin transaction, to do a "51% attack" on Dogeparty you would have to do a 51% attack on Dogecoin. -### Besides a 51% attack, what are the other risks to consensus? +#### Besides a 51% attack, what are the other risks to consensus? The Dogeparty network could be effectively "forked" by a sizable number of people running different versions of the Dogeparty client that had different "consensus sensitive code" (i.e. protocol code). In this case, if a transaction was read in from the Dogecoin client software, the differing code may cause two different interpretations of the data, and thus, two different ledger states. @@ -61,28 +76,28 @@ As long as all participants run software that has the same protocol rules (even That being said, [the Dogeparty client](https://github.com/DogepartyXDP/dogeparty-lib) is completely open-source. Anyone is able to copy the code and make their own modifications. They can then run their modified version of the software, which technically may generate a different ledger than everyone else. This is similar to Dogecoin itself. However, to have any impact, that person would have to get others to run it, who would have to trust this individual more than they trust the Dogeparty development team. This new ledger would not be "Dogeparty". It would be a separate ledger with its own protocol rules. Services built on this ledger (such as a block explorer) would not agree with similar services built on the Dogeparty ledger. -### So can the Dogeparty Team rewrite the Dogeparty ledger’s history, in an emergency or by decree? How does that compare to the same risks with Dogecoin Core devs? +#### So can the Dogeparty Team rewrite the Dogeparty ledger’s history, in an emergency or by decree? How does that compare to the same risks with Dogecoin Core devs? It’s identical to the case with Dogecoin. The Dogecoin core devs could publish a copy of Dogecoin Core that does anything, but no one would download it. Dogeparty is 100% open source, with [a list of code changes](https://github.com/DogepartyXDP/dogeparty-lib/releases) from one release to the next visible for all to see and inspect. -### What about support for other blockchains instead of Dogecoin? +#### What about support for other blockchains instead of Dogecoin? Dogeparty is built on Dogecoin. That has always been the case and we do not see it changing, ever. For other blockchains, there are "forks" of the Dogeparty software. Examples would be Counterparty for Bitcoin, Monaparty for Monacoin, and Dogeparty for Dogecoin. We generally encourage forks on other blockchains, especially if they help contribute back bug fixes and enhancements to the main Dogeparty codebase. -### What is Dogecoin fails or becomes co-opted? +#### What is Dogecoin fails or becomes co-opted? In the event of a catastrophic failure of the Dogecoin network, Dogeparty _does_ have the technical capability of "freezing" balances and migrating to another blockchain, like Litecoin for instance, with relative ease. -### What happens if and when OP_RETURN data is auto-pruned? +#### What happens if and when OP_RETURN data is auto-pruned? Dogeparty only needs some Dogecoin full nodes somewhere to have an unpruned copy of the blockchain. As every Dogeparty full node is also a Dogecoin full node, this is easily done. -### How are blockchain reorganizations ("reorgs") handled by Dogeparty? +#### How are blockchain reorganizations ("reorgs") handled by Dogeparty? Blockchain reorganizations are essentially handled by Dogeparty the same way they are handled by Dogecoin. If the Dogeparty software detects that a reorganization has occurred, it will utilize an internal "undolog" to quickly undo (roll back) transactions up to the point of the chain branching, and then process new transactions on the now-longest chain. -### How can a thin client trustlessly lookup the Dogecoin public address associated with the OSTOCK asset name? +#### How can a thin client trustlessly lookup the Dogecoin public address associated with the OSTOCK asset name? You can use a local copy of the blockchain just fine. The only difference between Dogeparty and Dogecoin here is that Dogeparty doesn’t support SPV. diff --git a/Basics/README.md b/Basics/README.md new file mode 100644 index 00000000..4bf77ecb --- /dev/null +++ b/Basics/README.md @@ -0,0 +1,53 @@ +# Dogeparty Documentation: Basics + +## Frequently Asked Questions + +- [How does Dogeparty work?](FAQ.md#how-does-dogeparty-work) +- [So Dogeparty is not its own Blockchain, but "rides on top of" Dogecoin?](FAQ.md#so-dogeparty-is-not-its-own-blockchain-but-rides-on-top-of-dogecoin) +- [Is Dogeparty "polluting" the Dogecoin blockchain, then?](FAQ.md#is-dogeparty-polluting-the-dogecoin-blockchain-then) +- [Are Dogeparty transactions less secure than Dogecoin transactions?](FAQ.md#are-dogeparty-transactions-less-secure-than-dogecoin-transactions) +- [How do the Dogeparty nodes stay in sync? What's to stop one node from disagreeing with another?](FAQ.md#how-do-the-dogeparty-nodes-stay-in-sync-whats-to-stop-one-node-from-disagreeing-with-another) +- [What about Sidechains?](FAQ.md#what-about-sidechains) +- [What kind of addresses does Dogeparty use?](FAQ.md#what-kind-of-addresses-does-dogeparty-use) +- [What is XDP?](FAQ.md#what-is-xdp) +- [Can I secure my XDP and tokens in cold storage?](FAQ.md#can-i-secure-my-xdp-and-tokens-in-cold-storage) +- [Is a 51% attack against Dogeparty possible?](FAQ.md#is-a-51-attack-against-dogeparty-possible) +- [Besides a 51% attack, what are the other risks to consensus?](FAQ.md#besides-a-51-attack-what-are-the-other-risks-to-consensus) +- [So can the Dogeparty Team rewrite the Dogeparty ledger’s history, in an emergency or by decree? How does that compare to the same risks with Dogecoin Core devs?](FAQ.md#so-can-the-dogeparty-team-rewrite-the-dogeparty-ledgers-history-in-an-emergency-or-by-decree-how-does-that-compare-to-the-same-risks-with-dogecoin-core-devs) +- [What about support for other blockchains instead of Dogecoin?](FAQ.md#what-about-support-for-other-blockchains-instead-of-dogecoin) +- [What is Dogecoin fails or becomes co-opted?](FAQ.md#what-is-dogecoin-fails-or-becomes-co-opted) +- [What happens if and when OP_RETURN data is auto-pruned?](FAQ.md#what-happens-if-and-when-op_return-data-is-auto-pruned) +- [How are blockchain reorganizations ("reorgs") handled by Dogeparty?](FAQ.md#how-are-blockchain-reorganizations-reorgs-handled-by-dogeparty) +- [How can a thin client trustlessly lookup the Dogecoin public address associated with the OSTOCK asset name?](FAQ.md#how-can-a-thin-client-trustlessly-lookup-the-dogecoin-public-address-associated-with-the-ostock-asset-name) + +## What is XDP? + +- [How was XDP launched in 2014?](FAQ-XDP.md#how-was-xdp-launched-in-2014) +- [How was XDP re-launched in 2021?](FAQ-XDP.md#how-was-xdp-re-launched-in-2021) +- [Is XDP an alt-coin or competitor to Dogecoin?](FAQ-XDP.md#is-xdp-an-alt-coin-or-competitor-to-dogecoin) +- [Can more XDP be created?](FAQ-XDP.md#can-more-xdp-be-created) +- [What is XDP used for?](FAQ-XDP.md#what-is-xdp-used-for) + +## Assets + +- [Creating assets](assets.md#creating-assets) + - [The different kinds of assets](assets.md#the-different-kinds-of-assets) + - [Sending assets (`send`)](assets.md#sending-assets-send) + - [Paying dividends on assets](assets.md#paying-dividends-on-assets) +- [Trading on the decentralized exchange](assets.md#trading-on-the-decentralized-exchange) + - [Creating an order](assets.md#creating-an-order) + - [Protocol-based trustless escrow](assets.md#protocol-based-trustless-escrow) + - [Automatic order matching on the Dogecoin blockchain](assets.md#automatic-order-matching-on-the-dogecoin-blockchain) +- [A straightforward case](assets.md#a-straightforward-case) + - [Matching an order: partially fulfilling an order](assets.md#matching-an-order-partially-fulfilling-an-order) + - [Trading DOGE on the decentralized exchange](assets.md#trading-doge-on-the-decentralized-exchange) +- [Use-cases](assets.md#use-cases) + - [Betting](assets.md#betting) + - [Tickets & Coupons](assets.md#tickets--coupons) + - [Token Controlled Access (TCA)](assets.md#token-controlled-access-tca) + - [Proof of Publication](assets.md#proof-of-publication) + - [Crowdfunding](assets.md#crowdfunding) + - [Derivatives](assets.md#derivatives) + - [In-game Currency](assets.md#in-game-currency) + - [Altcoin Migration](assets.md#altcoin-migration) + - [Verifiable Voting](assets.md#verifiable-voting) diff --git a/Basics/assets.md b/Basics/assets.md index 3b258b5a..0e460d16 100644 --- a/Basics/assets.md +++ b/Basics/assets.md @@ -1,6 +1,25 @@ -Assets -======== -[TOC] +# Assets +- [Creating assets](#creating-assets) + - [The different kinds of assets](#the-different-kinds-of-assets) + - [Sending assets (`send`)](#sending-assets-send) + - [Paying dividends on assets](#paying-dividends-on-assets) +- [Trading on the decentralized exchange](#trading-on-the-decentralized-exchange) + - [Creating an order](#creating-an-order) + - [Protocol-based trustless escrow](#protocol-based-trustless-escrow) + - [Automatic order matching on the Dogecoin blockchain](#automatic-order-matching-on-the-dogecoin-blockchain) +- [A straightforward case](#a-straightforward-case) + - [Matching an order: partially fulfilling an order](#matching-an-order-partially-fulfilling-an-order) + - [Trading DOGE on the decentralized exchange](#trading-doge-on-the-decentralized-exchange) +- [Use-cases](#use-cases) + - [Betting](#betting) + - [Tickets & Coupons](#tickets--coupons) + - [Token Controlled Access (TCA)](#token-controlled-access-tca) + - [Proof of Publication](#proof-of-publication) + - [Crowdfunding](#crowdfunding) + - [Derivatives](#derivatives) + - [In-game Currency](#in-game-currency) + - [Altcoin Migration](#altcoin-migration) + - [Verifiable Voting](#verifiable-voting) With Dogeparty, users can create their own assets (also known as "tokens", "coins" or "currencies") _inside_ the Dogecoin blockchain. These are seperate from Dogecoin the currency itself, but exist entirely inside ordinary Dogecoin transactions. Tokens can be received, stored, and sent from any Dogecoin address to any other. They can also be placed in cold storage. Unlike Colored Coins, Dogeparty tokens are _not_ tied to the DOGE balance of any given address. This means that sending/receiving Dogecoins has no effect on the balance of tokens. @@ -9,7 +28,7 @@ Among other features, Dogeparty adds the ability *create*, *send*, *trade*, and Many of the features described below can be accessed using the [Dogeparty wallets](https://dogeparty.net/wallets/). Especially casual users and those without a `dogeparty-cli` setup can benefit from the convenience of a dogeparty compatible wallet. -# Creating assets +## Creating assets Dogeparty allows users to *issue assets*. An asset that is created within the Dogeparty protocol is often called a *user-created token*. @@ -25,7 +44,7 @@ the Dogecoin and Dogeparty ecosystem. 3. **Numeric (Free)**: An integer between `26^12 + 1` and `256^8` (inclusive), prefixed with `A`. Numeric assets only require a Dogecoin transaction fee to be created. -## The different kinds of assets +### The different kinds of assets The most basic kind of asset must specify: @@ -38,7 +57,7 @@ It is possible to issue more of `asset`, but, at any one time, there can only be Beyond creating the most basic asset, it is also possible to make assets either *divisible* or *callable*. If an asset is made divisible upon its initial issuance, it must always be divisible with every issuance thereafter. A divisible user-created asset is, like, Dogecoin and XDP, divisible up to 8 decimal places. -# Sending assets (`send`) +### Sending assets (`send`) To send an asset in Dogeparty, one must specify: @@ -47,7 +66,7 @@ To send an asset in Dogeparty, one must specify: - how much of `asset` `source` is sending (`quantity`) - to whom `source` is sending `quantity` of asset (`destination`) -# Paying dividends on assets +### Paying dividends on assets It is possible to distribute funds proportionally among asset holders using the `dividend` function. This feature is also also known as `dividend payments`, depending on their desired purpose. Dividends are paid in any `dividend_asset` to everyone who holds the `asset` in proportion to how many units he holds; specifically: @@ -55,7 +74,7 @@ Let `total` equal the total distribution paid out, and `quantity` be the total a Dividends can be paid out to any assets that you ownership and control over. You can freely select the currency in which dividends are to be paid out: DOGE, XDP, or any other user-created asset. -# Trading on the decentralized exchange +## Trading on the decentralized exchange Dogeparty supports *peer-to-peer asset exchange*: users can trade assets with no middleman and no Dogeparty risk. The platform upon which trading is done is Dogeparty’s *decentralized exchange* and the Dogecoin blockchain. In what follows trading on the decentralized exchange will be detailed and explained by means of examples. For the purposes of the following use-cases: @@ -63,7 +82,7 @@ Dogeparty supports *peer-to-peer asset exchange*: users can trade assets with no - Sally’s creates order1 and Alice creates order2 - `give_asset2 = get_asset1` -## Creating an order +### Creating an order At its most basic level, a trade on Dogeparty’s decentralized exchange consists of two *orders*, which are *matched* by the protocol. When Sally is constructing her order, she must specify: @@ -74,7 +93,7 @@ At its most basic level, a trade on Dogeparty’s decentralized exchange consist - the quantity of `get_asset1` she will get (`get_quantity`) - how long before her order expires (`expiration1`) -## Protocol-based trustless escrow +### Protocol-based trustless escrow **The Dogeparty protocol acts as an escrow service, and thereby eliminates Dogeparty risk from the exchange of assets.** Once Sally publishes her order `give_quantity1` of `give_asset1` is debited from her address; her address is debited *before* her order is matched with Alice’s, and so she cannot spend those funds before `expiration1` passes, i.e. until her order expires. In the meantime, Sally’s funds are not lost or borrowed, they are held by the protocol itself. If another order is placed which satisfies Sally’s order, the protocol matches them, and sends each Dogeparty its respective funds. @@ -83,7 +102,7 @@ Once Sally publishes her order `give_quantity1` of `give_asset1` is debited from `give_quantity1 / get_quantity1` is the "ratio" in which Sally will exchange `give_asset1` for `get_asset1`, and is denoted by `ratio1`. In order for two orders to be matched, `ratio1` must always be ’‘greater than or equal’’ to the inverse of `ratio2`, Thus, if, for example `ratio2 (give_quantity1 + 1) / get_quantity1` would be high enough ratio to match Sally’s bet, but if `ratio2 =(quantity2 - 1) / quantity2` it would not. Having been matched, the exchange is always made at `ratio1`. Further, when when an order is matched, the exchange is always settled as much as it can be. -### A straightforward case +## A straightforward case Suppose that Alice places order2 before `expiration`1 which matches order1 perfectly: `give_quantity2 == get_quantity1` `get_quantity2 == give_quantity1`. Once Alice has made her order, the protocol debits `quantity2` of `asset2` from her address, and, since her order satisfies Sally’s, Alice’s order funds are sent to Alice, and Sally’s order funds are sent to Alice. This completes the trade between Alice and Sally. @@ -97,43 +116,43 @@ Since the `ratio1 == 10/20 == 1/2`, Alice must `ratio2 >= 2/1`, to match Sally Suppose Sally makes an order to trade `asset` in exchange for DOGE, and Alice makes an order to trade DOGE in exchange for `asset`. Upon placing order1, Sally’s account is immediately debited, as usual, and, once Alice has placed `order2`, it is matched with `order1`. However, her DOGE is not debited from her account, and the protocol will not send her Sally’s XDP until Alice sends her DOGE using Dogeparty’s `DOGEpay` function. If Alice sends the DOGE using `DOGEpay` in ‘’fewer than 10 blocks’’, the protocol will send her the XDP and thereby complete the transaction, otherwise, the trade expires, and the protocol will re-credit Sally’s address with `give_asset`. This feature is enabled on the CLI, and disabled on `Dogewallet`, due to incompatibility with the browser-based security model. -# Use-cases +## Use-cases Below are just a few of the many uses of assets, feel free to propose new uses if you find them. -## Betting +#### Betting Dogeparty turns the Dogecoin blockchain into a betting platform and prediction market. Oracles can create broadcasts of information, and users can then place bets on these broadcasts. Funds are escrowed automatically by the protocol, and benefit from being stored securely inside the Dogecoin blockchain. Funds placed on bets are be provably inaccessible until the bet is resolved or expires. Oracles can set a fee fraction to receive for their betting feeds, providing incentive to run their broadcasts. -## Tickets & Coupons +#### Tickets & Coupons Assets can be used as tickets to a music event, parking tickets, coupons, etc. -## Token Controlled Access (TCA) +#### Token Controlled Access (TCA) Token Controlled Access is the idea of granting access to private forums, chatrooms, games, projects or other social media based on the ownership of tokens. Different types of tokens represent different types of membership, and holders of that token can register and/or view the restricted content. To invite new users, smaller fractions of these tokens can be transfered. If the token is indivisible and scarce, it will limit the amount of users others are able to invite. These tokens are also publicly tradable on the DEX and therefore can have a monetary value, and/or one proportional to other types of these tokens. -## Proof of Publication +#### Proof of Publication Using broadcasts, users can publish timestamped information onto the Dogecoin blockchain. This makes it possible to verifiy that something has been posted at a certain time, and it cannot be deleted. -## Crowdfunding +#### Crowdfunding Dogeparty assets can be used for crowdfunding. You can issue a certain amount of assets and sell these to start your project. Due to the high amount of trust involved, it is better to use a Dogeparty-based crowdfunding platform which can perform due-diligence on your project. This will provide your users trust, and demonstrate the legitimacy of your project. There is nothing stopping you from doing this on your own, but users may rightfully be suspicious about your project. -## Derivatives +#### Derivatives You can back Dogeparty assets with tangible goods, such as gold. -## In-game Currency +#### In-game Currency To integrate your multiplayer game into the global economy, Dogeparty assets can also be used as in-game currency. -## Altcoin Migration +#### Altcoin Migration If you have an altcoin that seeks to fulfill a specific purpose, but do not wish to continue mining, you can migrate it to Dogeparty with proof-of-burn. -## Verifiable Voting +#### Verifiable Voting Dogeparty supports voting through the use of user-created tokens. This means that you can post the terms and options of your vote as a broadcast, and let users vote on its outcome with full transparency by using tokens. diff --git a/Bylaws/README.md b/Bylaws/README.md index 97649d03..308dd786 100644 --- a/Bylaws/README.md +++ b/Bylaws/README.md @@ -1,16 +1,15 @@ -README -====================== +# README These are the official Bylaws of The Dogeparty Foundation (http://dogeparty.net/foundation.) -##License +## License These bylaws are distributed under the MIT License and may be forked for use in creating any new member-driven nonprofit corporation or for any other use. -##Modifications to the Bylaws of The Dogeparty Foundation +## Modifications to the Bylaws of The Dogeparty Foundation If you would like to see a modification or change made to The Dogeparty Foundation's bylaws please submit a pull request to this repo. The pull requests will be collected and presented to the Dogeparty Foundation at the next meeting of the Board. Upon an affirmative vote of the Board of Directors a pull request will be incorporated into the official bylaws. -##Disclaimer +## Disclaimer No documents or materials presented here should be considered or construed as legal advice or creating any sort of attorney-client relationship. You should consult with an attorney before using any documents or materials posted here. diff --git a/Developers/API.md b/Developers/API.md index 72291513..0485c710 100644 --- a/Developers/API.md +++ b/Developers/API.md @@ -1,9 +1,96 @@ # dogeparty-server API -[TOC] - - -##Overview +- [Overview](#overview) +- [Getting Started](#getting-started) + - [General Format](#general-format) + - [JSON-RPC](#json-rpc) + - [REST](#rest) + - [Authentication](#authentication) +- [Example Implementations for JSON RPC API](#example-implementations-for-json-rpc-api) + - [Python](#python) + - [PHP](#php) + - [curl](#curl) + - [Linux](#linux) + - [Windows](#windows) + - [c# (RestSharp)](#c-restsharp) + - [Go](#go) + - [Ruby (Net::HTTP)](#ruby-nethttp) +- [Example Implementations for REST API](#example-implementations-for-rest-api) + - [Python](#python-1) + - [curl](#curl-1) + - [Linux](#linux-1) + - [Windows](#windows-1) +- [Example Parameters](#example-parameters) +- [Signing Transactions Before Broadcasting](#signing-transactions-before-broadcasting) +- [Terms & Conventions](#terms--conventions) + - [assets](#assets) + - [subassets](#subassets) + - [Quantities and balances](#quantities-and-balances) + - [floats](#floats) + - [Memos](#memos) +- [Miscellaneous](#miscellaneous) + - [Filtering Read API results](#filtering-read-api-results) +- [Read API Function Reference](#read-api-function-reference) + - [get_{table}](#get_table) + - [get_asset_info](#get_asset_info) + - [get_supply](#get_supply) + - [get_asset_names](#get_asset_names) + - [get_holder_count](#get_holder_count) + - [get_holders](#get_holders) + - [get_messages](#get_messages) + - [get_messages_by_index](#get_messages_by_index) + - [get_block_info](#get_block_info) + - [get_blocks](#get_blocks) + - [get_running_info](#get_running_info) + - [get_element_counts](#get_element_counts) + - [get_unspent_txouts](#get_unspent_txouts) + - [getrawtransaction](#getrawtransaction) + - [getrawtransaction_batch](#getrawtransaction_batch) + - [search_raw_transactions](#search_raw_transactions) + - [get_tx_info](#get_tx_info) + - [search_pubkey](#search_pubkey) + - [unpack](#unpack) +- [Action/Write API Function Reference](#actionwrite-api-function-reference) + - [create_bet](#create_bet) + - [create_broadcast](#create_broadcast) + - [create_dogepay](#create_dogepay) + - [create_burn](#create_burn) + - [create_cancel](#create_cancel) + - [create_destroy](#create_destroy) + - [create_dispenser](#create_dispenser) + - [create_dividend](#create_dividend) + - [create_issuance](#create_issuance) + - [create_order](#create_order) + - [create_send](#create_send) + - [create_sweep](#create_sweep) + - [Advanced `create_` parameters](#advanced-create_-parameters) + - [Transaction Encodings](#transaction-encodings) +- [REST API Function Reference](#rest-api-function-reference) + - [get](#get) + - [compose](#compose) +- [Objects](#objects) + - [Balance Object](#balance-object) + - [Bet Object](#bet-object) + - [Bet Match Object](#bet-match-object) + - [Broadcast Object](#broadcast-object) + - [DOGEPay Object](#dogepay-object) + - [Burn Object](#burn-object) + - [Cancel Object](#cancel-object) + - [Debit/Credit Object](#debitcredit-object) + - [Dividend Object](#dividend-object) + - [Issuance Object](#issuance-object) + - [Order Object](#order-object) + - [Order Match Object](#order-match-object) + - [Send Object](#send-object) + - [Message Object](#message-object) + - [Bet Expiration Object](#bet-expiration-object) + - [Order Expiration Object](#order-expiration-object) + - [Bet Match Expiration Object](#bet-match-expiration-object) + - [Order Match Expiration Object](#order-match-expiration-object) +- [Status](#status) +- [9.58.3](#9583) + +## Overview ``dogeparty-lib`` provides a JSON RPC 2.0-based API based off of that of Dogecoin Core. It is the primary means by which other applications @@ -27,7 +114,7 @@ of Dogecoin Core's design. This REST API is still under development and will inc in the future, and listens on the same port as JSON RPC one. -##Getting Started +## Getting Started By default, the server will listen on port ``4005`` (if on mainnet) or port ``14005`` (on testnet) for API requests. @@ -38,9 +125,9 @@ are made via a HTTP POST request to ``/api/`` (note the trailing slash), with JS The requests to the secondary REST API are made via HTTP GET to ``/rest/``, with request action and parameters encoded in the URL. -###General Format +### General Format -####JSON-RPC +#### JSON-RPC All requests must have POST data that is JSON encoded. Here's an example of the POST data for a valid API request: @@ -62,19 +149,19 @@ You should note that the data in ``params`` is a JSON object (e.g. mapping), not For more information on JSON RPC, please see the [JSON RPC 2.0 specification](http://www.jsonrpc.org/specification). -####REST +#### REST For REST API all requests are made via GET where query-specific arguments are encoded as URL parameters. Moreover, the same requests can be passed via HTTP POST in order to encrypt the transaction parameters. There are only two methods supported: ``get`` and ``compose``. The URL formats are as follows, respectively: `/rest//get?&op=` `/rest//compose?` -###Authentication +### Authentication The API support HTTP basic authentication to use, which is enabled if and only if a password is set. **The default user is ``'rpc'``.** -##Example Implementations for JSON RPC API +## Example Implementations for JSON RPC API The following examples have authentication enabled and the `user` set to its default value of `'rpc'`. The password is not set (default: `'rpc'`). Ensure @@ -83,7 +170,7 @@ file `'server.conf'`. Submissions of examples in additional languages are welcome! -###Python +### Python import json import requests @@ -103,7 +190,7 @@ Submissions of examples in additional languages are welcome! print("Response: ", response.text) -###PHP +### PHP With PHP, you use the [JsonRPC](https://github.com/fguillot/JsonRPC) library. @@ -123,21 +210,21 @@ library. var_dump($result2); ?> -###curl +### curl Remember to surround non-numeric parameter values with the double quotes, as per [JSON-RPC 2.0 examples](http://www.jsonrpc.org/specification#examples). For example, `"order_by": "tx_hash"` is correct and will work, `"order_by": 'tx_hash'` won't. -####Linux +#### Linux curl -X POST http://127.0.0.1:4005/api/ --user rpc:$PASSWORD -H 'Content-Type: application/json; charset=UTF-8' -H 'Accept: application/json, text/javascript' --data-binary '{ "jsonrpc": "2.0", "id": 0, "method": "get_running_info" }' -####Windows +#### Windows On Windows, depending on implementation the above curl command may need to be formatted differently due to problems that Windows has with escapes. For example this particular format was found to work with curl 7.50.1 (x86_64-w64-mingw32) on Windows 10 (x64). curl -X POST http://127.0.0.1:4005/api/ --user rpc:$PASSWORD -H "Content-Type: application/json; charset=UTF-8" -H "Accept: application/json, text/javascript" --data-binary "{ \"jsonrpc\": \"2.0\", \"id\": 0, \"method\": \"get_running_info\" }" -###c# (RestSharp) +### c# (RestSharp) Authorization string in the example below is based on the default username/password. @@ -149,7 +236,7 @@ Authorization string in the example below is based on the default username/passw request.AddParameter("application/json", "{\r\n \"method\": \"get_running_info\",\r\n \"params\": {},\r\n \"jsonrpc\": \"2.0\",\r\n \"id\": 1\r\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); -###Go +### Go Authorization string in the example below is based on the default username/password. @@ -184,7 +271,7 @@ Authorization string in the example below is based on the default username/passw } -###Ruby (Net::HTTP) +### Ruby (Net::HTTP) Authorization string in the example below is based on the default username/password. @@ -205,11 +292,11 @@ Authorization string in the example below is based on the default username/passw puts response.read_body -##Example Implementations for REST API +## Example Implementations for REST API The following examples don't use authentication as with default settings. -###Python +### Python import requests @@ -222,21 +309,21 @@ The following examples don't use authentication as with default settings. print("Response: ", response.text) -###curl +### curl These examples use the default username/password combination in URL. -####Linux +#### Linux curl "http://rpc:rpc@127.0.0.1:4005/rest/sends/get?source=1B6ahDHnKtZ5GXqytHSxfcXgNoxm1q1RsP&destination=14fAoS9FPD9jx36hjCNoAqFVLNHD1NQVN5&op=AND" -H "Content-Type: application/json; charset=UTF-8" -H "Accept: application/json" -####Windows +#### Windows This example was created with curl 7.50.1 (x86_64-w64-mingw32) on Windows 10. For POST encryption add `'-X POST'`. curl "http://rpc:rpc@127.0.0.1:4005/rest/sends/get?source=1B6ahDHnKtZ5GXqytHSxfcXgNoxm1q1RsP&destination=14fAoS9FPD9jx36hjCNoAqFVLNHD1NQVN5&op=AND" -H "Content-Type: application/json; charset=UTF-8" -H "Accept: application/json" -##Example Parameters +## Example Parameters * Fetch all balances for all assets for both of two addresses, using keyword-based arguments @@ -341,7 +428,7 @@ This example was created with curl 7.50.1 (x86_64-w64-mingw32) on Windows 10. Fo } -##Signing Transactions Before Broadcasting +## Signing Transactions Before Broadcasting **Note:** Before v9.49.4, the dogeparty server API provided an interface to Dogecoin Core's signing functionality through the `do_*`, `sign_tx` and `broadcast_tx` methods, which have all since been removed. @@ -440,9 +527,9 @@ async function signP2SHDataTX(wif, txHex) { } ``` -##Terms & Conventions +## Terms & Conventions -###assets +### assets Everywhere in the API an asset is referenced by its name, not its ID. See the [Dogeparty protocol specification](https://github.com/DogepartyXDP/Documentation/blob/master/Developers/protocol_specification.md) for what constitutes a valid asset name. Examples: @@ -452,7 +539,7 @@ Examples: - "FOOBAR" - "A7736697071037023001" -###subassets +### subassets See the [Dogeparty protocol specification](https://github.com/DogepartyXDP/Documentation/blob/master/Developers/protocol_specification.md#subassets) for what constitutes a valid subasset name. Examples: @@ -460,7 +547,7 @@ Examples: - "PIZZA.X" - "PIZZA.REALLY-long-VALID-Subasset-NAME" -###Quantities and balances +### Quantities and balances Anywhere where an quantity is specified, it is specified in **satoshis** (if a divisible asset), or as whole numbers (if an indivisible asset). To convert satoshis to floating-point, simply cast to float and divide by 100,000,000. @@ -472,11 +559,11 @@ Examples: **NOTE:** XDP and DOGE themselves are divisible assets. -###floats +### floats Floats are ratios or floating point values with six decimal places of precision, used in bets and dividends. -###Memos +### Memos See the [Dogeparty protocol specification](../protocol_specification/#memos) for what constitutes a valid memo. Examples: @@ -485,9 +572,9 @@ Examples: - "1ca6" -##Miscellaneous +## Miscellaneous -###Filtering Read API results +### Filtering Read API results The Dogeparty API aims to be as simple and flexible as possible. To this end, it includes a straightforward way to filter the results of most [Read API](#read-api-function-reference) to get the data you want, and only that. @@ -519,10 +606,10 @@ the specific comparison logic used, please see [this page](http://www.sqlite.org #Technical Specification -##Read API Function Reference +## Read API Function Reference -###get_{table} +### get_{table} **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)** @@ -580,7 +667,7 @@ For example: ``get_balances``, ``get_credits``, ``get_debits`` are all valid API for XDP and other Dogeparty assets. To get DOGE-based balances, use an existing system such as Dogecoin Core, blockchain.info, etc. -###get_asset_info +### get_asset_info **get_asset_info(asset)** @@ -595,17 +682,17 @@ Gets information on an issued asset. ``null`` if the asset was not found. Otherwise, a list of one or more objects, each one with the following properties: - - **asset** (*string*): The [assets](#assets) of the asset itself - - **asset_longname** (*string*): The [subasset](#subassets) longname, if any - - **owner** (*string*): The address that currently owns the asset (i.e. has issuance rights to it) - - **divisible** (*boolean*): Whether the asset is divisible or not - - **locked** (*boolean*): Whether the asset is locked (future issuances prohibited) - - **total_issued** (*integer*): The [quantities](#quantities-and-balances) of the asset issued, in total - - **description** (*string*): The asset's current description - - **issuer** (*string*): The asset's original owner (i.e. issuer) +- **asset** (*string*): The [assets](#assets) of the asset itself +- **asset_longname** (*string*): The [subasset](#subassets) longname, if any +- **owner** (*string*): The address that currently owns the asset (i.e. has issuance rights to it) +- **divisible** (*boolean*): Whether the asset is divisible or not +- **locked** (*boolean*): Whether the asset is locked (future issuances prohibited) +- **total_issued** (*integer*): The [quantities](#quantities-and-balances) of the asset issued, in total +- **description** (*string*): The asset's current description +- **issuer** (*string*): The asset's original owner (i.e. issuer) -###get_supply +### get_supply **get_supply(asset)** @@ -618,7 +705,7 @@ Gets information on an issued asset. ``null`` if the asset was not found. Otherwise, a list of one or more objects, each one with the following properties: -###get_asset_names +### get_asset_names **get_asset_names()** @@ -631,7 +718,7 @@ Gets information on an issued asset. A list of the names of all existing Dogeparty assets, ordered alphabetically. -###get_holder_count +### get_holder_count **get_holder_count()** @@ -644,7 +731,7 @@ Gets information on an issued asset. An object the asset name as the property name, and the holder count as the value of that property name. -###get_holders +### get_holders **get_holders()** @@ -657,7 +744,7 @@ Gets information on an issued asset. A list of addresses that hold some quantity of the specified asset. -###get_messages +### get_messages **get_messages(block_index)** @@ -673,7 +760,7 @@ database actions and allows for lower-level state tracking for applications that A list of one or more [message object](#message-object) if there was any activity in the block, otherwise ``[]`` (empty list). -###get_messages_by_index +### get_messages_by_index **get_messages_by_index(message_indexes)** @@ -688,7 +775,7 @@ Return the message feed messages whose ``message_index`` values are contained in A list containing a `message <#message-object>`_ for each message found in the specified ``message_indexes`` list. If none were found, ``[]`` (empty list) is returned. -###get_block_info +### get_block_info **get_block_info(block_index)** @@ -702,12 +789,12 @@ Gets basic information for a specific block. If the block was found, an object with the following properties: - - **block_index** (*integer*): The block index (i.e. block height). Should match what was specified for the *block_index* input parameter). - - **block_hash** (*string*): The block hash identifier - - **block_time** (*integer*): A UNIX timestamp of when the block was processed by the network +- **block_index** (*integer*): The block index (i.e. block height). Should match what was specified for the *block_index* input parameter). +- **block_hash** (*string*): The block hash identifier +- **block_time** (*integer*): A UNIX timestamp of when the block was processed by the network -###get_blocks +### get_blocks **get_blocks(block_indexes, min_message_index=null)** @@ -724,13 +811,13 @@ is much quicker than using multiple ``get_block_info()`` and ``get_messages()`` A list of objects, one object for each valid block index specified, in order from first block index to last. Each object has the following properties: - - **block_index** (*integer*): The block index (i.e. block height). Should match what was specified for the *block_index* input parameter). - - **block_hash** (*string*): The block hash identifier - - **block_time** (*integer*): A UNIX timestamp of when the block was processed by the network - - **_messages** (*list*): A list of one or more [message object](#message-object) if there was any activity in the block, otherwise ``[]`` (empty list). +- **block_index** (*integer*): The block index (i.e. block height). Should match what was specified for the *block_index* input parameter). +- **block_hash** (*string*): The block hash identifier +- **block_time** (*integer*): A UNIX timestamp of when the block was processed by the network +- **_messages** (*list*): A list of one or more [message object](#message-object) if there was any activity in the block, otherwise ``[]`` (empty list). -###get_running_info +### get_running_info **get_running_info()** @@ -744,19 +831,19 @@ Gets some operational parameters for the server. An object with the following properties: - - **db_caught_up** (*boolean*): ``true`` if block processing is caught up with the Dogecoin blockchain, ``false`` otherwise. - - **dogecoin_block_count** (**integer**): The block height on the Dogecoin network (may not necessarily be the same as ``last_block``, if the server is catching up) - - **last_block** (*integer*): The index (height) of the last block processed by the server - - **last_message_index** (*integer*): The index (ID) of the last message in the message feed - - **running_testnet** (*boolean*): ``true`` if the server is configured for testnet, ``false`` if configured on mainnet. - - **running_testcoin** (*boolean*): ``true`` if the server is configured for testcoin use, ``false`` if not (default). - - **version_major** (*integer*): The major version of dogeparty-server running - - **version_minor** (*integer*): The minor version of dogeparty-server running - - **version_revision** (*integer*): The revision version of dogeparty-server running - - **api_limit_rows** (*integer*): The max amount of rows any call will return. If ``0`` there's no limit to calls. Defaults to ``1000``. +- **db_caught_up** (*boolean*): ``true`` if block processing is caught up with the Dogecoin blockchain, ``false`` otherwise. +- **dogecoin_block_count** (**integer**): The block height on the Dogecoin network (may not necessarily be the same as ``last_block``, if the server is catching up) +- **last_block** (*integer*): The index (height) of the last block processed by the server +- **last_message_index** (*integer*): The index (ID) of the last message in the message feed +- **running_testnet** (*boolean*): ``true`` if the server is configured for testnet, ``false`` if configured on mainnet. +- **running_testcoin** (*boolean*): ``true`` if the server is configured for testcoin use, ``false`` if not (default). +- **version_major** (*integer*): The major version of dogeparty-server running +- **version_minor** (*integer*): The minor version of dogeparty-server running +- **version_revision** (*integer*): The revision version of dogeparty-server running +- **api_limit_rows** (*integer*): The max amount of rows any call will return. If ``0`` there's no limit to calls. Defaults to ``1000``. -###get_element_counts +### get_element_counts **get_element_counts()** @@ -771,7 +858,7 @@ Gets the number of records for each entity type An object with a property for each element type (e.g. `transactions`, `blocks`, `bets`, `order_matches`, etc.) with the value of each property being the record count of that respective entity in the database. -###get_unspent_txouts +### get_unspent_txouts **get_unspent_txouts(address, unconfirmed=false, unspent_tx_hash=null)** @@ -788,14 +875,14 @@ Get a listing of UTXOs for the specified address. A list of objects, with each entry in the dict having the following properties: - - **amount**: The amount of the UTXO (e.g. 0.12345678) - - **value**: The value of the UTXO in satoshis (e.g. 12345678) - - **height**: The block height of the UTXO - - **confirmations**: Number of confirmations since the UTXO was created - - **txid**: The txid (hash) that the UTXO was included in - - **vout**: The vout number in the specified txid for the UTXO + - **amount**: The amount of the UTXO (e.g. 0.12345678) + - **value**: The value of the UTXO in satoshis (e.g. 12345678) + - **height**: The block height of the UTXO + - **confirmations**: Number of confirmations since the UTXO was created + - **txid**: The txid (hash) that the UTXO was included in + - **vout**: The vout number in the specified txid for the UTXO -###getrawtransaction +### getrawtransaction **getrawtransaction(tx_hash, verbose=false, skip_missing=false)** @@ -812,7 +899,7 @@ Gets raw data for a single transaction. If found, a raw transaction objects having the same format as the [dogecoind getrawtransaction API call](https://chainquery.com/dogecoin-api/getrawtransaction). If not found, `null`. -###getrawtransaction_batch +### getrawtransaction_batch **getrawtransaction_batch(txhash_list, verbose=false, skip_missing=false)** @@ -829,7 +916,7 @@ Gets raw data for a list of transactions. A list of raw transaction objects having the same format as the [dogecoind getrawtransaction API call](https://chainquery.com/dogecoin-api/getrawtransaction). -###search_raw_transactions +### search_raw_transactions **search_raw_transactions(address, unconfirmed=true)** @@ -845,7 +932,7 @@ Gets raw transaction objects for the specified address. A list of raw transaction objects, with each object having the same format as the [dogecoind getrawtransaction API call](https://chainquery.com/dogecoin-api/getrawtransaction). -###get_tx_info +### get_tx_info **get_tx_info(tx_hex, block_index=null)** @@ -860,14 +947,14 @@ Get transaction info, as parsed by `dogeparty-server`. A list with the following items (in order as listed below): - - `source` - - `destination` - - `doge_amount` - - `fee` - - `data`: The embedded raw protocol data, in hexadecimal-serialized format + - `source` + - `destination` + - `doge_amount` + - `fee` + - `data`: The embedded raw protocol data, in hexadecimal-serialized format -###search_pubkey +### search_pubkey **search_pubkey(pubkeyhash, provided_pubkeys=null)** @@ -883,7 +970,7 @@ For the specified pubkeyhash (i.e. address), return the public key. Note that th A string with the specified pubkey. If the pubkey cannot be found, an exception will be generated and returned. -###unpack +### unpack **unpack(data_hex)** @@ -895,13 +982,13 @@ Parse the data_hex of a message into its parameters. Currently only works with ` **Return:** - - **message_type_id** (*int*): the ID of the message type. Legacy sends are `0` and enhanced sends are `2`. - - **unpacked** (*object*): A map of message parameters. For legacy sends this object includes `asset` and `quantity`. For enhanced sends, this object includes `address`, `asset`, `quantity` and `memo`. For legacy sends, the source and destination are found using `get_tx_info`. For enhanced sends, the destination address is in the message parameters and the source may be found using `get_tx_info`. +- **message_type_id** (*int*): the ID of the message type. Legacy sends are `0` and enhanced sends are `2`. +- **unpacked** (*object*): A map of message parameters. For legacy sends this object includes `asset` and `quantity`. For enhanced sends, this object includes `address`, `asset`, `quantity` and `memo`. For legacy sends, the source and destination are found using `get_tx_info`. For enhanced sends, the destination address is in the message parameters and the source may be found using `get_tx_info`. -##Action/Write API Function Reference +## Action/Write API Function Reference -###create_bet +### create_bet **create_bet(source, feed_address, bet_type, deadline, wager_quantity, counterwager_quantity, expiration, target_value=0.0, leverage=5040)** @@ -925,7 +1012,7 @@ Issue a bet against a feed. The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see [here](#signing-transactions-before-broadcasting) for more information. -###create_broadcast +### create_broadcast **create_broadcast(source, fee_fraction, text, timestamp, value)** @@ -945,7 +1032,7 @@ Broadcast textual and numerical information to the network. The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see [here](#signing-transactions-before-broadcasting) for more information. -###create_dogepay +### create_dogepay **create_dogepay(order_match_id)** @@ -961,7 +1048,7 @@ Create and (optionally) broadcast a DOGEpay message, to settle an Order Match fo The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see [here](#signing-transactions-before-broadcasting) for more information. -###create_burn +### create_burn **create_burn(source, quantity)** @@ -978,7 +1065,7 @@ Burn a given quantity of DOGE for XDP (**on mainnet, possible between blocks 278 The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see [here](#signing-transactions-before-broadcasting) for more information. -###create_cancel +### create_cancel **create_cancel(offer_hash, source)** @@ -994,7 +1081,7 @@ Cancel an open order or bet you created. The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see [here](#signing-transactions-before-broadcasting) for more information. -###create_destroy +### create_destroy **create_destroy(source, asset, quantity, tag)** @@ -1012,7 +1099,7 @@ Destroy XDP or a user defined asset. The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see [here](#signing-transactions-before-broadcasting) for more information. -###create_dispenser +### create_dispenser **create_dispenser(source, asset, give_quantity, escrow_quantity, mainchainrate, status, open_address)** @@ -1035,7 +1122,7 @@ of give_quantity to ease dispenser operation. The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see [here](#signing-transactions-before-broadcasting) for more information. -###create_dividend +### create_dividend **create_dividend(source, quantity_per_unit, asset, dividend_asset)** @@ -1054,7 +1141,7 @@ Issue a dividend on a specific user defined asset. The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see [here](#signing-transactions-before-broadcasting) for more information. -###create_issuance +### create_issuance **create_issuance(source, asset, quantity, divisible, description, transfer_destination=null)** @@ -1083,7 +1170,7 @@ Issue a new asset, issue more of an existing asset, lock an asset, or transfer t -###create_order +### create_order **create_order(source, give_asset, give_quantity, get_asset, get_quantity, expiration)** @@ -1104,7 +1191,7 @@ Issue an order request. The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see [here](#signing-transactions-before-broadcasting) for more information. -###create_send +### create_send **create_send(source, destination, asset, quantity)** @@ -1130,7 +1217,7 @@ To send multiple assets/destinations simultaneously you can pass an array of par The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see [here](#signing-transactions-before-broadcasting) for more information. -###create_sweep +### create_sweep **create_sweep(source, destination, flags, memo)** @@ -1152,7 +1239,7 @@ Sends all assets and/or transfer ownerships to a destination address. The unsigned transaction, as an hex-encoded string. Must be signed before being broadcast: see [here](#signing-transactions-before-broadcasting) for more information. -###Advanced `create_` parameters +### Advanced `create_` parameters Each `create_` call detailed below can take the following common keyword parameters: @@ -1174,32 +1261,32 @@ Each `create_` call detailed below can take the following common keyword paramet **With the exception of `pubkey` and `allow_unconfirmed_inputs`, these values should be left at their defaults, unless you know what you are doing.** -####Transaction Encodings +#### Transaction Encodings By default the default value of the ``encoding`` parameter detailed above is ``auto``, which means that `dogeparty-server` automatically determines the best way to encode the Dogeparty protocol data into a new transaction. If you know what you are doing and would like to explicitly specify an encoding: - To return the transaction as an **OP_RETURN** transaction, specify ``opreturn`` for the ``encoding`` parameter. - - **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. + - **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. - To return the transaction as a **multisig** transaction, specify ``multisig`` for the ``encoding`` parameter. - - ``pubkey`` should be set to the hex-encoded public key of the source address. - - Note that with the newest versions of Dogecoin (0.12.1 onward), bare multisig encoding does not reliably propagate. More information on this is documented [here](https://github.com/rubensayshi/dogeparty-lib/pull/9). + - ``pubkey`` should be set to the hex-encoded public key of the source address. + - Note that with the newest versions of Dogecoin (0.12.1 onward), bare multisig encoding does not reliably propagate. More information on this is documented [here](https://github.com/rubensayshi/dogeparty-lib/pull/9). - To return the transaction as a **pubkeyhash** transaction, specify ``pubkeyhash`` for the ``encoding`` parameter. - - ``pubkey`` should be set to the hex-encoded public key of the source address. + - ``pubkey`` should be set to the hex-encoded public key of the source address. - To return the transaction as a 2 part **P2SH** transaction, specify ``P2SH`` for the encoding parameter. - - First call the ``create_`` method with the ``encoding`` set to ``P2SH``. - - 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). - - The resulting ``txid`` must be passed again on an identic call to the ``create_`` method, but now passing an additional parameter ``p2sh_pretx_txid`` with the value of the previous transaction's id. - - The resulting transaction is a ``P2SH`` encoded message, using the redeem script on the transaction inputs as data carrying mechanism. - - Sign the transaction following the ``Dogecoinjs-lib on javascript, signing a P2SH redeeming transaction`` section - - **NOTE**: Don't leave pretxs hanging without transmitting the second transaction as this pollutes the UTXO set and risks making dogecoin harder to run on low spec nodes. + - First call the ``create_`` method with the ``encoding`` set to ``P2SH``. + - 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). + - The resulting ``txid`` must be passed again on an identic call to the ``create_`` method, but now passing an additional parameter ``p2sh_pretx_txid`` with the value of the previous transaction's id. + - The resulting transaction is a ``P2SH`` encoded message, using the redeem script on the transaction inputs as data carrying mechanism. + - Sign the transaction following the ``Dogecoinjs-lib on javascript, signing a P2SH redeeming transaction`` section + - **NOTE**: Don't leave pretxs hanging without transmitting the second transaction as this pollutes the UTXO set and risks making dogecoin harder to run on low spec nodes. -##REST API Function Reference +## REST API Function Reference The REST API documentation is hosted both on our webiste and on a new API documentation platform called apiary.io. This experimental documentation, complementary to the one in this document, is located [here](http://docs.dogepartylib.apiary.io/#). -###get +### get **get(table_name, filters, filterop)** @@ -1230,7 +1317,7 @@ Example query: Desired database rows from table_name sieved using filters. -###compose +### compose **compose(message_type, transaction_params)** @@ -1258,12 +1345,12 @@ Example query: The hex data of composed transaction. -##Objects +## Objects The API calls documented can return any one of these objects. -###Balance Object +### Balance Object An object that describes a balance that is associated to a specific address: @@ -1272,7 +1359,7 @@ An object that describes a balance that is associated to a specific address: * **quantity** (*integer*): The [quantities](#quantities-and-balances) of the specified asset at this address -###Bet Object +### Bet Object An object that describes a specific bet: @@ -1294,7 +1381,7 @@ An object that describes a specific bet: * **validity** (*string*): Set to "valid" if a valid bet. Any other setting signifies an invalid/improper bet -###Bet Match Object +### Bet Match Object An object that describes a specific occurance of two bets being matched (either partially, or fully): @@ -1321,7 +1408,7 @@ An object that describes a specific occurance of two bets being matched (either * **validity** (*string*): Set to "valid" if a valid order match. Any other setting signifies an invalid/improper order match -###Broadcast Object +### Broadcast Object An object that describes a specific occurance of a broadcast event (i.e. creating/extending a feed): @@ -1336,7 +1423,7 @@ An object that describes a specific occurance of a broadcast event (i.e. creatin * **validity** (*string*): Set to "valid" if a valid broadcast. Any other setting signifies an invalid/improper broadcast -###DOGEPay Object +### DOGEPay Object An object that matches a request to settle an Order Match for which DOGE is owed: @@ -1348,7 +1435,7 @@ An object that matches a request to settle an Order Match for which DOGE is owed * **validity** (*string*): Set to "valid" if valid -###Burn Object +### Burn Object An object that describes an instance of a specific burn: @@ -1361,7 +1448,7 @@ An object that describes an instance of a specific burn: * **validity** (*string*): Set to "valid" if a valid burn. Any other setting signifies an invalid/improper burn -###Cancel Object +### Cancel Object An object that describes a cancellation of a (previously) open order or bet: @@ -1373,7 +1460,7 @@ An object that describes a cancellation of a (previously) open order or bet: * **validity** (*string*): Set to "valid" if a valid burn. Any other setting signifies an invalid/improper burn -###Debit/Credit Object +### Debit/Credit Object An object that describes a account debit or credit: @@ -1385,7 +1472,7 @@ An object that describes a account debit or credit: * **quantity** (*integer*): The [quantities](#quantities-and-balances) of the specified asset debited or credited -###Dividend Object +### Dividend Object An object that describes an issuance of dividends on a specific user defined asset: @@ -1398,7 +1485,7 @@ An object that describes an issuance of dividends on a specific user defined ass * **validity** (*string*): Set to "valid" if a valid burn. Any other setting signifies an invalid/improper burn -###Issuance Object +### Issuance Object An object that describes a specific occurance of a user defined asset being issued, or re-issued: @@ -1414,7 +1501,7 @@ An object that describes a specific occurance of a user defined asset being issu * **validity** (*string*): Set to "valid" if a valid issuance. Any other setting signifies an invalid/improper issuance -###Order Object +### Order Object An object that describes a specific order: @@ -1434,7 +1521,7 @@ An object that describes a specific order: * **fee_required** (*integer*): The miners' fee required to be paid by orders for them to match this one; in DOGE; required only if buying DOGE (may be zero, though) -###Order Match Object +### Order Match Object An object that describes a specific occurance of two orders being matched (either partially, or fully): @@ -1455,7 +1542,7 @@ An object that describes a specific occurance of two orders being matched (eithe * **validity** (*string*): Set to "valid" if a valid order match. Any other setting signifies an invalid/improper order match -###Send Object +### Send Object An object that describes a specific send (e.g. "simple send", of XDP, or a user defined asset): @@ -1470,7 +1557,7 @@ An object that describes a specific send (e.g. "simple send", of XDP, or a user * **memo** (*string*): The [memo](../protocol_specification#memos) associated with this transaction -###Message Object +### Message Object An object that describes a specific event in the dogepartyd message feed (which can be used by 3rd party applications to track state changes to the dogepartyd database on a block-by-block basis). @@ -1484,7 +1571,7 @@ to track state changes to the dogepartyd database on a block-by-block basis). columns in the table referred to by **category**. -###Bet Expiration Object +### Bet Expiration Object An object that describes the expiration of a bet created by the source address. @@ -1494,7 +1581,7 @@ An object that describes the expiration of a bet created by the source address. * **source** (*string*): The source address that created the bet -###Order Expiration Object +### Order Expiration Object An object that describes the expiration of an order created by the source address. @@ -1504,7 +1591,7 @@ An object that describes the expiration of an order created by the source addres * **source** (*string*): The source address that created the order -###Bet Match Expiration Object +### Bet Match Expiration Object An object that describes the expiration of a bet match. @@ -1514,7 +1601,7 @@ An object that describes the expiration of a bet match. * **block_index** (*integer*): The block index (block number in the block chain) when this expiration occurred -###Order Match Expiration Object +### Order Match Expiration Object An object that describes the expiration of an order match. @@ -1524,7 +1611,7 @@ An object that describes the expiration of an order match. * **block_index** (*integer*): The block index (block number in the block chain) when this expiration occurred -##Status +## Status Here the list of all possible status for each table: @@ -1558,5 +1645,5 @@ There will be no incompatible API pushes that do not either have: * A well known set cut over date in the future * Or, a deprecation process where the old API is supported for an amount of time -##9.58.3 +## 9.58.3 * Initial dogeparty release diff --git a/Developers/Notes_and_Tutorials/tutorials.md b/Developers/Notes_and_Tutorials/README.md similarity index 86% rename from Developers/Notes_and_Tutorials/tutorials.md rename to Developers/Notes_and_Tutorials/README.md index 9d014b2c..79503f98 100644 --- a/Developers/Notes_and_Tutorials/tutorials.md +++ b/Developers/Notes_and_Tutorials/README.md @@ -1,5 +1,4 @@ -Advanced User and Developer Tutorials -====================================== +# Advanced User and Developer Tutorials This page contains links to some useful tutorials intended for advanced users and developers. As new documentation is created it will be added here. diff --git a/Developers/Notes_and_Tutorials/dogewallet_notes.md b/Developers/Notes_and_Tutorials/dogewallet_notes.md index 7c84f355..f680dc9e 100644 --- a/Developers/Notes_and_Tutorials/dogewallet_notes.md +++ b/Developers/Notes_and_Tutorials/dogewallet_notes.md @@ -1,15 +1,23 @@ -# More on multiple Dogewallet servers +# Dogewallet Notes + +- [More on multiple Dogewallet servers](#more-on-multiple-dogewallet-servers) +- [Dogewallet MultiAPI specifics](#dogewallet-multiapi-specifics) + - [multiAPIFailover for Read API (``get_``) Operations](#multiapifailover-for-read-api-get_-operations) + - [multiAPIConsensus for Action/Write (``create_``) Operations](#multiapiconsensus-for-actionwrite-create_-operations) + - [multiAPINewest for Redundant storage](#multiapinewest-for-redundant-storage) + +## More on multiple Dogewallet servers For the time being, the Dogeparty team itself operates the primary Dogewallet platform at `wallet.dogeparty.net`. However, as Dogewallet is open source software, it is possible to host your own site with Dogewallet site (for your personal use, or as an offering to others), or to even host your own Dogewallet servers to use with your own Dogeparty wallet implementation. The Dogeparty team supports and encourages this kind of activity (as long as the servers are secure), as it aids with increasing decentralization. Also note that due to the nature of Dogewallet being a deterministic wallet, users using one Dogewallet platform (i.e. the official one, for instance) have the flexibility to start using a different Dogewallet platform instead at any time, and as funds (i.e. private keys) are not stored on the server in any fashion, they will be able to see their funds on either. (Note that the only thing that will not migrate are saved preferences, such as address aliases, the theme setting, etc.) -# Dogewallet MultiAPI specifics +## Dogewallet MultiAPI specifics Dogewallet utilizes a sort of a "poor man's load balancing/failover" implementation called multiAPI (and implemented [here](https://github.com/DogepartyXDP/dogewallet/blob/master/src/js/util.api.js)). multiAPI can operate in a number of fashions. -**multiAPIFailover for Read API (``get_``) Operations** +### multiAPIFailover for Read API (``get_``) Operations *multiAPIFailover* functionality is currently used for all read API operations. In this model, the first Federated Node on the shuffled list is called for the data, and if it returns an error or the request times out, the second one on the @@ -20,7 +28,7 @@ shuffled list, some clients may end up consulting it. However, as this functiona the worse case result is that a Dogewallet client is shown incorrect/modified data which leads to misinformed actions on the user's behalf. Moreover, the option always exists to move all read-queries to use multiAPIConsensus in the future should the need arise. -**multiAPIConsensus for Action/Write (``create_``) Operations** +### multiAPIConsensus for Action/Write (``create_``) Operations Based on this multiAPI capability, the wallet itself consults more than one of these Federated Nodes via consensus especially for all ``create_``-type operations. For example, if you send XDP, `dogeparty-server` on each server is still composing and sending @@ -41,7 +49,7 @@ protection against potential attacks. multiAPIConsensus actually helps discover any potential "hacked" servers as well, since a returned consensus set with a divergent result will be rejected by the client, and thus trigger an examination of the root cause by the team. -**multiAPINewest for Redundant storage** +### multiAPINewest for Redundant storage In the same way, these multiple servers are used to provide redundant storage of client-side preferences, to ensure we have no single point of failure. In the case of the stored preferences for instance, when retrieved on login, the data from all servers diff --git a/Developers/Notes_and_Tutorials/enhanced_asset_info.md b/Developers/Notes_and_Tutorials/enhanced_asset_info.md index c6253e08..fbe5a565 100644 --- a/Developers/Notes_and_Tutorials/enhanced_asset_info.md +++ b/Developers/Notes_and_Tutorials/enhanced_asset_info.md @@ -1,9 +1,18 @@ -#Enhanced Asset Info +# Enhanced Asset Info + +- [Token Info](#token-info) + - [URL format](#url-format) + - [JSON format](#json-format) + - [Examples](#examples) +- [Other Topics](#other-topics) + - [Validity and refreshing](#validity-and-refreshing) + - [Validating your JSON data](#validating-your-json-data) When initially setting or changing your asset's (token's) description, you can enable enhanced functionality (such as an token image and a longer description) by providing a URL to a specially formatted .json file (e.g. http://www.mydomain.com/foo.json) as the description. This allows the token owner to provide enhanced information to the token's holders, and enhances the user experience for these holders for wallet implementations that support this spec. -Token Info URL format ---------------------------- +## Token Info + +### URL format The URL itself in the broadcast text field must conform to the following: * Must fully fit within the text field space allowed @@ -12,7 +21,7 @@ The URL itself in the broadcast text field must conform to the following: * It is recommended that the server return the JSON data with the correct MIME type set (e.g. "application/json") * A HTTP 200 response code must be returned (redirects, e.g. 301, 302, etc. are not allowed) -## Token Info JSON format +### JSON format The JSON object/mapping the URL points to must contain the following data: @@ -24,8 +33,7 @@ The JSON object/mapping the URL points to must contain the following data: pgpsigOptionalA link to a pgp signature text/file that will or can be used to sign messages by the issuer of this token. 100 characters max. Must be a valid URL that starts with "http://" or "https://" -Examples --------- +### Examples Here's an example for a token called MYTOKEN: @@ -34,23 +42,19 @@ Here's an example for a token called MYTOKEN: "http://www.mysite.com", "pgpsig": "http://www.mysite.com/MYTOKEN.pgp" } -Other Topics ------------- +## Other Topics -###Validity and refreshing +### Validity and refreshing Every 30-60 minutes, the Dogewallet system will query this URL provided to validate and fetch the necessary information. If the information you provided is reachable and valid (within a 1 second response time), your token's information will be enhanced based on this data. In order for this data file to be deemed as valid for a specific token/asset, there must have been either an initial issuance, or a description change transaction for that asset, and the text field of that description must have been set to the URL of this JSON file. If the information you provided is reachable and valid (within a 5 second response time), your token's information will be enhanced based on this data. If it is not, counterblockd will retry up to 2 additional times, over the next 30 or so minutes, and then give up until another transaction is made that changes the description field (it may be to the same URL, but another description change transaction is necessary to reinitialize the validity check by counterblockd). ### Validating your JSON data -Your JSON data must respect and validate against [this][] JSON schema. +Your JSON data must respect and validate against [this](https://raw.githubusercontent.com/DogepartyXDP/dogeblock/master/dogeblock/schemas/asset.schema.json) JSON schema. If the validation fails on any level, counterblockd will not accept the data. -To check your data against this schema, go [here][]. Paste the schema +To check your data against this schema, go [here](http://json-schema-validator.herokuapp.com/). Paste the schema from the link above into the **Schema** field, and place your example output into the **Data** field. Then click the **Validate** button - - [this]: https://raw.githubusercontent.com/DogepartyXDP/dogeblock/master/dogeblock/schemas/asset.schema.json - [here]: http://json-schema-validator.herokuapp.com/ diff --git a/Developers/Notes_and_Tutorials/enhanced_feed_info.md b/Developers/Notes_and_Tutorials/enhanced_feed_info.md index c4cc2cd4..730cc2dd 100644 --- a/Developers/Notes_and_Tutorials/enhanced_feed_info.md +++ b/Developers/Notes_and_Tutorials/enhanced_feed_info.md @@ -1,9 +1,17 @@ -#Enhanced Feed Info +# Enhanced Feed Info -Feed providers can initialize a feed via a broadcast where the broadcast text field contains a URL to a specially formatted .json file (e.g. http://www.mydomain.com/foo.json). This allows the feed operator to provide enhanced information to their users. +- [Feed URL format](#feed-url-format) +- [Feed JSON format](#feed-json-format) + - ['targets' Object format:](#targets-object-format) + - ['operator' fields:](#operator-fields) +- [Examples](#examples) +- [Other Topics](#other-topics) + - [Validity and refreshing](#validity-and-refreshing) + - [Validating your JSON data](#validating-your-json-data) +Feed providers can initialize a feed via a broadcast where the broadcast text field contains a URL to a specially formatted .json file (e.g. http://www.mydomain.com/foo.json). This allows the feed operator to provide enhanced information to their users. -##Feed URL format +## Feed URL format The URL itself in the broadcast text field must conform to the following: * Must fully fit within the text field space allowed @@ -12,7 +20,7 @@ The URL itself in the broadcast text field must conform to the following: * It is recommended that the server return the JSON data with the correct MIME type set (e.g. "application/json") * A HTTP 200 response code must be returned (redirects, e.g. 301, 302, etc. are not allowed) -##Feed JSON format +## Feed JSON format The JSON object/mapping data the URL points to must contain the following data: @@ -38,8 +46,9 @@ The JSON object/mapping data the URL points to must contain the following data: odds.suggestedRequired (or odds.initial)Default odds used when there is open bets. -
-'targets' Object format: + +### 'targets' Object format: + @@ -53,8 +62,9 @@ The JSON object/mapping data the URL points to must contain the following data:
textRequiredTopic of the target_value. 64 characters max.
valueRequiredThe value used for this target_value.
odds.suggestedRequired (or odds.initial)Default odds used when there is open bets.
-
-'operator' fields: + +### 'operator' fields: + @@ -128,12 +138,12 @@ Here's an example for a binary feed called Superbowl 2014: ## Other Topics -###Validity and refreshing +### Validity and refreshing In order for this data file to be deemed as valid against the specified address, there must have been a broadcast at that address, and the text field of that broadcast must have been set to the URL of this JSON file and the value field set to -1 (negative 1). From this feed broadcast, Counterwallet system will pull the fee-fraction, to use as the fee for the given feed, and will query this URL provided to validate and fetch the necessary information. If the information you provided is reachable and valid (within a 5 second response time), the feed's information will be enhanced based on this data. If it is not, counterblockd will retry up to 2 additional times, over the next 30 or so minutes, and then give up until rebroadcast is made with a JSON URL and value=-1 (the URL may be the same). -###Validating your JSON data +### Validating your JSON data Your JSON data must respect and validate against [this](https://github.com/DogepartyXDP/dogeblock/blob/master/dogeblock/schemas/feed.schema.json) JSON schema. If the validation fails on any level, counterblockd will not accept the data. diff --git a/Developers/Notes_and_Tutorials/exchange_integration.md b/Developers/Notes_and_Tutorials/exchange_integration.md index 34b62d38..81aac358 100644 --- a/Developers/Notes_and_Tutorials/exchange_integration.md +++ b/Developers/Notes_and_Tutorials/exchange_integration.md @@ -1,5 +1,12 @@ # Dogeparty Exchange Integration +- [Basic Setup](#basic-setup) +- [Handling Deposits using Separate Addresses](#handling-deposits-using-separate-addresses) +- [Handling Deposits using Memo Transactions](#handling-deposits-using-memo-transactions) +- [Handling Withdrawals (Single Send)](#handling-withdrawals-single-send) +- [Batching Withdrawals (Multi-Peer-Multi-Asset Send)](#batching-withdrawals-multi-peer-multi-asset-send) +- [Best practices](#best-practices) + By adding support for Dogeparty, your exchange not only gets [XDP market](http://coinmarketcap.com/currencies/dogeparty/) support, but support for any other Dogeparty assets listed [here](http://dogeparty.xchain.io/assets)). Technically, the process is rather straightforward. However, as Dogeparty is not a fork of Dogecoin Core, adding Dogeparty support to your exchange is slightly different from adding support for a cryptocurrency that is, like Litecoin or Dogecoin. We outline the general process below (for XDP, but the process is identical for all Dogeparty assets): diff --git a/Developers/Notes_and_Tutorials/send_assets_in_bulk.md b/Developers/Notes_and_Tutorials/send_assets_in_bulk.md index a4ea058b..0757fc73 100644 --- a/Developers/Notes_and_Tutorials/send_assets_in_bulk.md +++ b/Developers/Notes_and_Tutorials/send_assets_in_bulk.md @@ -1,3 +1,3 @@ -#How to send Dogeparty assets in bulk +# How to send Dogeparty assets in bulk Multi-Peer-Multi-Asset sends are currently disabled until dogecoin core supports segregated witness \ No newline at end of file diff --git a/Developers/README.md b/Developers/README.md new file mode 100644 index 00000000..8c06b98c --- /dev/null +++ b/Developers/README.md @@ -0,0 +1,14 @@ +# Dogeparty Documentation: Developers + +- [Platform Architecture](platform_architecture.md) +- [Protocol Specification](protocol_specification.md) +- [Dogeparty API](API.md) +- [Dogeblock API](dogeblock_API.md) +- [Contributing](contributing.md) +- [Bug Bounties](bounties.md) +- [Notes and Tutorials](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/tree/master/Developers/Notes_and_Tutorials/) + - [Integrating XDP and assets into an exchange](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/exchange_integration.md) + - [Dogewallet Enhanced Asset Info](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/enhanced_asset_info.md) + - [Dogewallet Enhanced Feed Info](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/enhanced_feed_info.md) + - [Dogewallet failover mechanics and misc notes](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/dogewallet_notes.md) + - Additional tutorials are available at the [Dogeparty Community Forum](https://forum.dogeparty.net) diff --git a/Developers/bounties.md b/Developers/bounties.md index 9f411311..b001473a 100644 --- a/Developers/bounties.md +++ b/Developers/bounties.md @@ -1,5 +1,14 @@ # Dogeparty Bug Bounty Program +- [Things that do not qualify under the bug bounty](#things-that-do-not-qualify-under-the-bug-bounty) +- [Bounties for dogeparty-lib](#bounties-for-dogeparty-lib) +- [Bounties for the Dogeparty forums (forum.dogeparty.net)](#bounties-for-the-dogeparty-forums-forumdogepartynet) +- [How to report a bug](#how-to-report-a-bug) + - [For security-related issues](#for-security-related-issues) + - [For code issues](#for-code-issues) +- [The fine print](#the-fine-print) +- [CREDITS](#credits) + According to [Linus’ Law](http://en.wikipedia.org/wiki/Linus), “given enough eyeballs, all bugs are shallow”. That’s one of the reasons why Dogeparty’s source code is publicly available; but merely making the source code available doesn't accomplish anything if people don’t read it! For this reason, Dogeparty has a series of bug bounties. Similar to the bounties offered by [Mozilla](http://www.mozilla.org/security/bug-bounty.html) and [Google](http://blog.chromium.org/2010/01/encouraging-more-chromium-security.html), Dogeparty bug bounties provide an opportunity for people who find bugs to be compensated. Unlike those programs, however, Dogeparty’s bug bounties are not limited to security vulnerabilities. @@ -8,22 +17,22 @@ Depending on the type of bug and when it is reported, different bounties will be ## Things that do not qualify under the bug bounty -- **forum.dogeparty.net website** (unless the issue is a serious misconfiguration where user security details are being leaked in a way that they can be proven to be exploited) -- **dogewallet or dogeblock** (unless the issue allows for theft of funds, in that case the $1,500 bounty defined below would apply) -- Vulnerabilities which are too broad or not documented properly (i.e. do not include a specific example relevant to a Dogeparty-controlled site) -- Bugs or issues with a third-party site, software, or service that we use, such as support.dogeparty.net (freshdesk.com), which is not due to an improper configuration issue specific to us. Please submit any potential issues **to the maintainers of that site or providers of that service** -- Usability issues -- Anything requiring social engineering -- DOS/DDOS attacks -- Missing HSTS (HttpOnly flags), Secure flag, Browser Cache vulnerabilities -- CSRF that doesn’t affect the victim -- Referrer leakage to pages an attacker cannot control -- Lack of explicit rate-limiting for wallet.dogeparty.net passphrase entry -- The presence of unnecessary files, e.g. for backups, when these files do not expose any sensitive information -- Anything that is the result of an automated Nessus/PCI scans (too general) -- DNS issues (e.g. lack of an SPF record) -- SSL certificate issues (such as lack of Perfect Forward Secrecy on our SSL certificates) -- Bugs that have received mainstream tech media attention before the date of your disclosure (e.g. Heartbleed, Poodlebleed, etc) +- **forum.dogeparty.net website** (unless the issue is a serious misconfiguration where user security details are being leaked in a way that they can be proven to be exploited) +- **dogewallet or dogeblock** (unless the issue allows for theft of funds, in that case the $1,500 bounty defined below would apply) +- Vulnerabilities which are too broad or not documented properly (i.e. do not include a specific example relevant to a Dogeparty-controlled site) +- Bugs or issues with a third-party site, software, or service that we use, such as support.dogeparty.net (freshdesk.com), which is not due to an improper configuration issue specific to us. Please submit any potential issues **to the maintainers of that site or providers of that service** +- Usability issues +- Anything requiring social engineering +- DOS/DDOS attacks +- Missing HSTS (HttpOnly flags), Secure flag, Browser Cache vulnerabilities +- CSRF that doesn’t affect the victim +- Referrer leakage to pages an attacker cannot control +- Lack of explicit rate-limiting for wallet.dogeparty.net passphrase entry +- The presence of unnecessary files, e.g. for backups, when these files do not expose any sensitive information +- Anything that is the result of an automated Nessus/PCI scans (too general) +- DNS issues (e.g. lack of an SPF record) +- SSL certificate issues (such as lack of Perfect Forward Secrecy on our SSL certificates) +- Bugs that have received mainstream tech media attention before the date of your disclosure (e.g. Heartbleed, Poodlebleed, etc) ## Bounties for dogeparty-lib @@ -59,16 +68,16 @@ We would strongly prefer if you create a pull-request on Github in the proper re ## The fine print -- A bounty will only be awarded to the first person who reports a bug, unless two or more people report the same bug at approximately the same time, in which case the bounty may be split between them. -- If the same bug appears in multiple locations it will normally only receive a single bounty. -- Reports of security-related bugs are not eligible for bounties if the bugs are publicly disclosed prior to being fixed. -- The issue must be described in necessary detail to address it. -- Only the discoverer of a bug is eligible for the associated bounty. -- Bounties will be confirmed and awarded within 10 days of their +- A bounty will only be awarded to the first person who reports a bug, unless two or more people report the same bug at approximately the same time, in which case the bounty may be split between them. +- If the same bug appears in multiple locations it will normally only receive a single bounty. +- Reports of security-related bugs are not eligible for bounties if the bugs are publicly disclosed prior to being fixed. +- The issue must be described in necessary detail to address it. +- Only the discoverer of a bug is eligible for the associated bounty. +- Bounties will be confirmed and awarded within 10 days of their reporting. Inquiries on bounty status may be sent to [bounties@dogeparty.net]("mailto:bounties@dogeparty.net) -- Bounties will not be awarded if it is illegal to do so. -- The classification of bugs, values of bounties, and conditions under which bounties are paid are subject to change without notice. -- The core Dogeparty team has sole discretion to determine whether a bug report qualifies for a bounty and for which bounty it qualifies. +- Bounties will not be awarded if it is illegal to do so. +- The classification of bugs, values of bounties, and conditions under which bounties are paid are subject to change without notice. +- The core Dogeparty team has sole discretion to determine whether a bug report qualifies for a bounty and for which bounty it qualifies. ## CREDITS diff --git a/Developers/contributing.md b/Developers/contributing.md index f3a53c55..c28dd2de 100644 --- a/Developers/contributing.md +++ b/Developers/contributing.md @@ -1,13 +1,22 @@ -How to Submit a Bug Report -========================== +# Contributing -End Users ---------- +- [How to Submit a Bug Report](#how-to-submit-a-bug-report) + - [End Users](#end-users) + - [Dogewallet-related Support Pointers](#dogewallet-related-support-pointers) + - [Developers](#developers) + - [Dogewallet](#dogewallet) +- [Bounties](#bounties) + - [The Dogeparty Project Bounties](#the-dogeparty-project-bounties) + - [Community Bounties](#community-bounties) + +## How to Submit a Bug Report + +### End Users You can seek community help on the chat (fastest), forums or submit a bug report (instructions can be found below). -### Dogewallet-related Support Pointers +#### Dogewallet-related Support Pointers - Before you open a new issue, do a search or two to check whether a similar problem is described somewhere on the Web. You can also @@ -22,38 +31,37 @@ bug report (instructions can be found below). your address in text (not image!) format -Developers ------------------- +### Developers - All Dogeparty projects are hosted on Github and can be found at [https://github.com/DogepartyXDP](https://github.com/DogepartyXDP). - - Dogewallet issues should go to the `Dogewallet` repo - - `dogepartyd` issues should be submitted to the + - Dogewallet issues should go to the `Dogewallet` repo + - `dogepartyd` issues should be submitted to the `dogepartyd` repo - If you think you’ve identified a **security issue**, check out the [bounties page](https://github.com/DogepartyXDP/Documentation/blob/master/Developers/bounties.md) and contact the Dogeparty developers directly. -###Dogewallet +#### Dogewallet - Please see the pointers for end users (above). - Since it’s easy to check JavaScript Debug Console, it’s usually a good idea to check that out first - Describe the issue and submit the logs - - Dogewallet-related problems: what happened, how to duplicate + - Dogewallet-related problems: what happened, how to duplicate the issue, especially whether it was observed in another Web browser. -#Bounties +## Bounties -##The Dogeparty Project Bounties +### The Dogeparty Project Bounties The Dogeparty Projects offers bounties for various things, but especially for security issues related to Dogeparty software. You can find more about those bounties here: [http://dogeparty.net/bounties/](https://github.com/DogepartyXDP/Documentation/blob/master/Developers/bounties.md). -##Community Bounties +### Community Bounties From time to time community members create development bounties, too. @@ -65,5 +73,5 @@ you: - Create a bounty directly under particular issue, or create a bounty on [http://bountysource.com/teams/dogeparty/issues](http://bountysource.com/teams/dogeparty/issues). Dogeparty repos are integrated with Bountysource. - You can also use other sites and announce your bounties in the chat or on the forums -[https://github.com/DogepartyXDP]: https://github.com/DogepartyXDP -[Dogewallet issues]: https://github.com/DogepartyXDP/dogewallet/issues +[https://github.com/DogepartyXDP](https://github.com/DogepartyXDP)\ +[Dogewallet issues](https://github.com/DogepartyXDP/dogewallet/issues) diff --git a/Developers/dogeblock_API.md b/Developers/dogeblock_API.md index 3a5d3bfa..03753c6d 100644 --- a/Developers/dogeblock_API.md +++ b/Developers/dogeblock_API.md @@ -1,4 +1,4 @@ -#dogeblock API +# dogeblock API For an overview of `dogeblock`, see [here](http://dogeparty.io/docs/platform_architecture/). @@ -6,17 +6,79 @@ For an overview of `dogeblock`, see [here](http://dogeparty.io/docs/platform_arc **Warning:** *This API documentation is INCOMPLETE. It contains errors, omissions, etc., and could change drastically at any time.* -##Table of Contents -[TOC] - -###Connecting to the API +- [Connecting to the API](#connecting-to-the-api) +- [Terms & Conventions](#terms--conventions) +- [core API](#core-api) + - [get_messagefeed_messages_by_index](#get_messagefeed_messages_by_index) + - [get_chain_block_height](#get_chain_block_height) + - [get_insight_block_info](#get_insight_block_info) + - [get_chain_address_info](#get_chain_address_info) + - [get_chain_txns_status](#get_chain_txns_status) + - [get_last_n_messages](#get_last_n_messages) + - [get_pubkey_for_address](#get_pubkey_for_address) + - [get_script_pub_key](#get_script_pub_key) + - [get_raw_transactions](#get_raw_transactions) + - [proxy_to_dogeparty-lib](#proxy_to_dogeparty-lib) +- [assets Module API](#assets-module-api) + - [get_normalized_balances](#get_normalized_balances) + - [get_escrowed_balances](#get_escrowed_balances) + - [get_assets_info](#get_assets_info) + - [get_base_quote_asset](#get_base_quote_asset) + - [get_owned_assets](#get_owned_assets) + - [get_asset_pair_market_info](#get_asset_pair_market_info) + - [get_asset_extended_info](#get_asset_extended_info) + - [get_asset_history](#get_asset_history) + - [get_balance_history](#get_balance_history) +- [dex Module](#dex-module) + - [get_market_price_summary](#get_market_price_summary) + - [get_market_cap_history](#get_market_cap_history) + - [get_market_info](#get_market_info) + - [get_market_info_leaderboard](#get_market_info_leaderboard) + - [get_market_price_history](#get_market_price_history) + - [get_trade_history](#get_trade_history) + - [get_order_book_simple](#get_order_book_simple) + - [get_order_book_buysell](#get_order_book_buysell) + - [get_users_pairs](#get_users_pairs) + - [get_market_orders](#get_market_orders) + - [get_market_trades](#get_market_trades) + - [get_markets_list](#get_markets_list) + - [get_market_details](#get_market_details) +- [betting Module](#betting-module) + - [get_bets](#get_bets) + - [get_user_bets](#get_user_bets) + - [get_feed](#get_feed) + - [get_feeds_by_source](#get_feeds_by_source) + - [parse_base64_feed](#parse_base64_feed) +- [dogewallet Module](#dogewallet-module) + - [is_ready](#is_ready) + - [get_reflected_host_info](#get_reflected_host_info) + - [get_wallet_stats](#get_wallet_stats) + - [get_preferences](#get_preferences) + - [store_preferences](#store_preferences) + - [create_armory_utx](#create_armory_utx) + - [convert_armory_signedtx_to_raw_hex](#convert_armory_signedtx_to_raw_hex) + - [create_support_case](#create_support_case) +- [dogewallet_iofeeds Module](#dogewallet_iofeeds-module) + - [get_num_users_online](#get_num_users_online) + - [is_chat_handle_in_use](#is_chat_handle_in_use) + - [get_chat_handle](#get_chat_handle) + - [store_chat_handle](#store_chat_handle) + - [get_chat_history](#get_chat_history) + - [is_wallet_online](#is_wallet_online) +- [transaction_stats Module](#transaction_stats-module) + - [get_transaction_stats](#get_transaction_stats) +- [API Changes](#api-changes) + - [1.2.0](#120) + - [1.1.0](#110) + +### Connecting to the API By default, ``dogeblock`` will listen on port ``4100`` for API requests. API requests are made via a HTTP POST request to ``/api/``, with JSON-encoded data passed as the POST body. For more information on JSON RPC, please see the [JSON RPC specification](http://json-rpc.org/wiki/specification). -###Terms & Conventions +### Terms & Conventions The API calls documented are categorized based on the `dogeblock` module/plug-in they appear in. For a list of the various modules with a description of each one, see [the dogeblock modules document](http://dogeparty.io/docs/dogeblock_modules/). @@ -37,11 +99,11 @@ and retrieving their wallet preferences data, and more. For this purpose, we define the concept of a wallet ID, which is simply the user's Dogewallet 12-word password, double-hashed with SHA256 and converted to base 64. -###core API +### core API These API methods are part of the core `dogeblock` code, and not part of a plugin module. -####get_messagefeed_messages_by_index +#### get_messagefeed_messages_by_index **get_messagefeed_messages_by_index(message_indexes)** @@ -51,7 +113,7 @@ Alias for dogeparty get_messages_by_index - **return:** A list of messages -####get_chain_block_height +#### get_chain_block_height **get_chain_block_height()** @@ -60,13 +122,13 @@ Use `get_chain_address_info` - **return:** The height of the block chain -####get_insight_block_info +#### get_insight_block_info **get_insight_block_info(block_hash)** Get block info for a specific block hash from the backend (insight, bitcoind, etc). -####get_chain_address_info +#### get_chain_address_info **get_chain_address_info(addresses, with_uxtos=True, with_last_txn_hashes=4)** @@ -78,7 +140,7 @@ Get info for one or more addresses - **return:** Address info - **rtype:** [{'addr', 'info',('uxto'),('last_txns'),('block_height')}] -####get_chain_txns_status +#### get_chain_txns_status **get_chain_txns_status** @@ -86,7 +148,7 @@ Get info for one or more addresses - **return:** Transaction information - **rtype:** [{'tx_hash', 'blockhash', 'confirmations', 'blocktime'}] -####get_last_n_messages +#### get_last_n_messages **get_last_n_messages(count=100)** @@ -96,7 +158,7 @@ Return latest messaages - **return:** A list of messages - **rtype:** [{'raw_tx_type', ... other fields vary per tx type}] -####get_pubkey_for_address +#### get_pubkey_for_address **get_pubkey_for_address(address)** @@ -104,14 +166,14 @@ Returns None if the address has made 0 transactions (as we wouldn't be able to g - **returns:** String or None -####get_script_pub_key +#### get_script_pub_key **get_script_pub_key(tx_hash, vout_index)** **broadcast_tx(signed_tx_hex)** -####get_raw_transactions +#### get_raw_transactions **get_raw_transactions(address, start_ts=None, end_ts=None, limit=500):** @@ -124,7 +186,7 @@ Gets raw transactions for a particular address - **return:** Returns the data, ordered from newest txn to oldest. If any limit is applied, it will cut back from the oldest results - **rtype:** {id: {status, tx_hash, _divisible, _tx_index, block_index, _category, destination, tx_index, _block_time, source, asset, _command, quantity}} -####proxy_to_dogeparty-lib +#### proxy_to_dogeparty-lib **proxy_to_dogeparty(method='', params={})** @@ -137,9 +199,9 @@ Relays a request to the dogeparty server, with the given method and params, and **NOTE:** This method may be depreciated/removed in the future. -###assets Module API +### assets Module API -####get_normalized_balances +#### get_normalized_balances **get_normalized_balances(addresses)** @@ -153,7 +215,7 @@ This call augments dogeparty's get_balances with a normalized_quantity field. It - quantity: The quantity in satoshi - normalized_quantity: The quantity, as a human readable number -####get_escrowed_balances +#### get_escrowed_balances **get_escrowed_balances(addresses)** @@ -163,7 +225,7 @@ Gets a list of address balances that are escrowed away by the protocol (either d - **return:** An array of assets held in escrow - **rtype:** `{
:{:}}` -####get_assets_info +#### get_assets_info **get_assets_info(assetsList)** @@ -179,7 +241,7 @@ Returns information on the specified assets. - description: The asset's current description - issuer: The issuing address of the asset -####get_base_quote_asset +#### get_base_quote_asset **get_base_quote_asset(asset1, asset2)** @@ -193,7 +255,7 @@ Use `get_market_info/get_market_details` - **return:** Array - **rtype:** `{'base_asset', 'quote_asset', 'pair_name'}` -####get_owned_assets +#### get_owned_assets **get_owned_assets(addresses)** @@ -203,7 +265,7 @@ Returns the assets owned by the addresses - **return:** Information on owned assets - **rtype:** [{'_change_type', 'locked', 'description', '_at_block', 'divisible', 'total_issued_normalized', '_at_block_time', 'asset', 'total_issued', 'owner', history:[]] -####get_asset_pair_market_info +#### get_asset_pair_market_info **get_asset_pair_market_info(asset1=None, asset2=None, limit=50):** @@ -218,7 +280,7 @@ Given two arbitrary assets, returns the base asset and the quote asset. - **return:** Market info for the given pair - **rtype:** {'24h_vol_in_doge', 'open_orders_count', 'lowest_ask', 'base_asset', 'completed_trades_count', '24h_pct_change', 'vol_quote', 'highest_bid', '24h_vol_in_xcp', 'vol_base', 'last_updated', 'quote_asset'} -####get_asset_extended_info +#### get_asset_extended_info **get_asset_extended_info(asset)** Returns extended asset data (i.e. that published via an external .json file, as documented [here](http://dogeparty.io/docs/enhanced_asset_info/)), if available, for a specific asset. @@ -227,7 +289,7 @@ Returns extended asset data (i.e. that published via an external .json file, as - **return:** Information on the asset or False if no extended info exists. Contains the data as documented in the extended asset info JSON format, among other fields. - **rtype:** {} -####get_asset_history +#### get_asset_history **get_asset_history(asset, reverse=False** Returns a list of changes for the specified asset, from its inception to the current time. @@ -235,27 +297,27 @@ Returns a list of changes for the specified asset, from its inception to the cur - **param asset:** The asset to retrieve a history on - **param reverse:** By default, the history is returned in the order of oldest to newest. Set this parameter to True to return items in the order of newest to oldest. - **return:** Changes are returned as a list of dicts, with each dict having the following format: - - type: One of 'created', 'issued_more', 'changed_description', 'locked', 'transferred', 'called_back' - - 'at_block': The block number this change took effect - - 'at_block_time': The block time this change took effect - - IF type = 'created': Has the following fields, as specified when the asset was initially created: - - owner, description, divisible, locked, total_issued, total_issued_normalized - - IF type = 'issued_more': - - 'additional': The additional quantity issued (raw) - - 'additional_normalized': The additional quantity issued (normalized) - - 'total_issued': The total issuance after this change (raw) - - 'total_issued_normalized': The total issuance after this change (normalized) - - IF type = 'changed_description': - - 'prev_description': The old description - - 'new_description': The new description - - IF type = 'locked': NO EXTRA FIELDS - - IF type = 'transferred': - - 'prev_owner': The address the asset was transferred from - - 'new_owner': The address the asset was transferred to - - IF type = 'called_back': - - 'percentage': The percentage of the asset called back (between 0 and 100) - -####get_balance_history +- type: One of 'created', 'issued_more', 'changed_description', 'locked', 'transferred', 'called_back' +- 'at_block': The block number this change took effect +- 'at_block_time': The block time this change took effect +- IF type = 'created': Has the following fields, as specified when the asset was initially created: + - owner, description, divisible, locked, total_issued, total_issued_normalized +- IF type = 'issued_more': + - 'additional': The additional quantity issued (raw) + - 'additional_normalized': The additional quantity issued (normalized) + - 'total_issued': The total issuance after this change (raw) + - 'total_issued_normalized': The total issuance after this change (normalized) +- IF type = 'changed_description': + - 'prev_description': The old description + - 'new_description': The new description +- IF type = 'locked': NO EXTRA FIELDS +- IF type = 'transferred': + - 'prev_owner': The address the asset was transferred from + - 'new_owner': The address the asset was transferred to +- IF type = 'called_back': + - 'percentage': The percentage of the asset called back (between 0 and 100) + +#### get_balance_history **get_balance_history(asset, addresses, normalize=True, start_ts=None, end_ts=None)** Retrieves the ordered balance history for a given address (or list of addresses) and asset pair, within the specified date range @@ -265,9 +327,9 @@ Retrieves the ordered balance history for a given address (or list of addresses) - **rtype:** `[, ]` -###dex Module +### dex Module -####get_market_price_summary +#### get_market_price_summary **get_market_price_summary(asset1, asset2, with_last_trades=0)** *deprecated: 1.5* @@ -279,7 +341,7 @@ Use `get_market_price_history` - **return:** Array - **rtype:** {'quote_asset', 'base_asset', 'market_price',('last_trades')} -####get_market_cap_history +#### get_market_cap_history **get_market_cap_history(start_ts=None, end_ts=None)** - **param start_ts:** Unix timestamp (defaults to 30 days before the end timestamp) @@ -287,14 +349,14 @@ Use `get_market_price_history` - **return:** Array - **rtype:** `{'base_currency':[{'data':[ts,market_cap], 'name'}]}` -####get_market_info +#### get_market_info **get_market_info(assets)** - **param list assets:** Assets to check - **return:** Array - **rtype:** {'24h_hlc_in_doge', 'extended_description', 'extended_pgpsig', 'aggregated_price_as_doge', 'price_in_doge', '24h_summary':{'vol', 'count'}, 'market_cap_in_doge', 'asset', 'price_as_xcp', '7d_history_in_doge':[[ts, price]], '24h_vol_price_change_in_xcp', 'price_in_xcp', 'extended_website', '24h_vol_price_change_in_doge', 'aggregated_price_as_xcp', 'market_cap_in_xcp', '7d_history_in_xcp':[[ts, price]], 'aggregated_price_in_doge', 'aggregated_price_in_xcp', 'price_as_doge', 'total_supply', '24h_ohlc_xcp', 'extended_image'} -####get_market_info_leaderboard +#### get_market_info_leaderboard **get_market_info_leaderboard(limit=100)** - **param limit:** Number of results to return @@ -321,7 +383,7 @@ Use `get_market_price_history` 'aggregated_price_as_doge'}]} -####get_market_price_history +#### get_market_price_history **get_market_price_history(asset1, asset2, start_ts=None, end_ts=None, as_dict=False)** Return block-by-block aggregated market history data for the specified asset pair, within the specified date range. @@ -335,7 +397,7 @@ Return block-by-block aggregated market history data for the specified asset pai - **rtype:** [{'block_time', 'block_index', 'open', 'high', 'low', 'close', 'vol', 'count'}] -####get_trade_history +#### get_trade_history **get_trade_history(asset1=None, asset2=None, start_ts=None, end_ts=None, limit=50)** Gets last N of trades within a specific date range (normally, for a specified asset pair, but this can be left blank to get any/all trades). @@ -364,7 +426,7 @@ Gets last N of trades within a specific date range (normally, for a specified as 'quote_asset'}] -####get_order_book_simple +#### get_order_book_simple **get_order_book_simple(asset1, asset2, min_pct_fee_provided=None, max_pct_fee_required=None)** *deprecated: 1.5* @@ -408,7 +470,7 @@ Easier to call version when you want all orders involving the two assets. 'id'} -####get_order_book_buysell +#### get_order_book_buysell **get_order_book_buysell(buy_asset, sell_asset, pct_fee_provided=None, pct_fee_required=None)** *deprecated: 1.5* @@ -451,14 +513,14 @@ Easier to call version when you want all orders involving the two assets. 'id'} -####get_users_pairs +#### get_users_pairs **get_users_pairs(addresses=[], max_pairs=12)** Return asset pairs held by the addresses. - **rtype:** [{'base_asset', 'progression', 'trend', 'price_24h', 'price', 'quote_asset'}] -####get_market_orders +#### get_market_orders **get_market_orders(asset1, asset2, addresses=[], min_fee_provided=0.95, max_fee_required=0.95)** Returns orders for the search parameters @@ -466,7 +528,7 @@ Returns orders for the search parameters - **rtype:** [{'completion', 'tx_hash', 'fee_provided', 'block_index', 'price', 'tx_index', 'source', 'amount', 'block_time', 'total', 'type'}] -####get_market_trades +#### get_market_trades **get_market_trades(asset1, asset2, addresses=[], limit=100)** Returns completed trades for the search parameters @@ -474,7 +536,7 @@ Returns completed trades for the search parameters - **rtype:** [{'status', 'match_id', 'countersource', 'block_index', 'price', 'source', 'amount', 'block_time', 'total', 'type'}] -####get_markets_list +#### get_markets_list **get_markets_list()** Returns available markets @@ -482,7 +544,7 @@ Returns available markets - **rtype:** [{'market_cap', 'base_asset', 'progression', 'supply', 'trend', 'price_24h', 'price', ' quote_divisibility', 'pos', 'volume', 'with_image', 'base_divisibility', 'quote_asset'}] -####get_market_details +#### get_market_details **get_market_details(asset1, asset2, min_fee_provided=0.95, max_fee_required=0.95)** Return detailed information on a market. @@ -490,9 +552,9 @@ Return detailed information on a market. - **rtype:** {'base_asset','progression','supply', 'trend','price_24h', 'price','sell_orders': [{'fee_required', 'amount', 'total', 'type', 'price'}],'quote_asset_divisible','buy_orders': [{'amount', 'total', 'type', 'price', 'fee_provided'}], 'last_trades': [{'status', 'match_id', 'countersource', 'source', 'price', 'block_index', 'amount', 'block_time', 'total', 'type'}],'base_asset_infos','base_asset_divisible','quote_asset'} -###betting Module +### betting Module -####get_bets +#### get_bets **get_bets(bet_type, feed_address, deadline, target_value=None, leverage=5040)** Returns bets with non-zero remaining counterwager for the specified search terms. @@ -519,7 +581,7 @@ Returns bets with non-zero remaining counterwager for the specified search terms 'target_value' }] -####get_user_bets +#### get_user_bets **get_user_bets(addresses=[], status="open")** - **param addresses:** List of addresses @@ -543,19 +605,19 @@ Returns bets with non-zero remaining counterwager for the specified search terms 'target_value' }] -####get_feed +#### get_feed **get_feed(address_or_url='')** - **param address_or_url:** Feed URL or Bitcoin Address - **rtype:** {'broadcasts':[{'status', 'tx_hash', 'locked', 'timestamp', 'source', 'text', 'tx_index', 'value', 'block_index', 'fee_fraction_int'}], 'counters':{'bets':[]} -####get_feeds_by_source +#### get_feeds_by_source **get_feeds_by_source(addresses=[])** - **param addresses:** Address list - **rtype:** ```{
:{'errors':[], 'locked', 'info_url', 'info_data':{}, 'fetch_info_retry', 'source', 'info_status', 'fee_fraction_int', 'last_broadcast':{}}}``` -####parse_base64_feed +#### parse_base64_feed **parse_base64_feed(base64_feed):** Takes a base64-encoded feed and decodes it. @@ -580,9 +642,9 @@ Takes a base64-encoded feed and decodes it. }] -###dogewallet Module +### dogewallet Module -####is_ready +#### is_ready **is_ready()** Used by the client to check if the server is alive, caught up, and ready to accept requests. @@ -591,7 +653,7 @@ if we actually return data from this function, it should always be true. (may ch - **rtype:** Boolean -####get_reflected_host_info +#### get_reflected_host_info **get_reflected_host_info()** Allows the requesting host to get some info about itself, such as its IP. Used for troubleshooting. @@ -599,7 +661,7 @@ Allows the requesting host to get some info about itself, such as its IP. Used f - **return:** Client host info - **rtype:** {'ip', 'cookie', 'country'} -####get_wallet_stats +#### get_wallet_stats **get_wallet_stats(start_ts=None, end_ts=None):** If timestamps omitted, queries the last 360 days. @@ -609,7 +671,7 @@ If timestamps omitted, queries the last 360 days. - **return:** Wallet information - **rtype:** {'wallet_stats':[id: {'data': [{}], 'name'}], 'num_wallets_testnet', 'num_wallets_mainnet', 'num_wallets_unknown'} -####get_preferences +#### get_preferences **get_preferences(wallet_id, for_login=False, network=None)** Gets stored wallet preferences @@ -623,7 +685,7 @@ Gets stored wallet preferences for this address. Using aliases helps make the wallet more user-friendly. - **rtype:** Boolean -####store_preferences +#### store_preferences **store_preferences(wallet_id, preferences)** Stores the preferences for a given wallet ID. @@ -632,7 +694,7 @@ Stores the preferences for a given wallet ID. - **param object preferences:** A wallet preferences object (see above) - **return:** ``true`` if the storage was successful, ``false`` otherwise. -####create_armory_utx +#### create_armory_utx **create_armory_utx(unsigned_tx_hex, public_key_hex)** Used to create an offline Armory transaction for signing in Armory. @@ -640,7 +702,7 @@ Used to create an offline Armory transaction for signing in Armory. - **returns:** The signed tx hash - **rtype:** String -####convert_armory_signedtx_to_raw_hex +#### convert_armory_signedtx_to_raw_hex **convert_armory_signedtx_to_raw_hex(signed_tx_ascii)** Used to convert a signed armory transaction to a hex-encoded raw transaction suitable for broadcasting on the Bitcoin network. @@ -648,7 +710,7 @@ Used to convert a signed armory transaction to a hex-encoded raw transaction sui - **returns:** The raw hash as hex - **rtype:** String -####create_support_case +#### create_support_case **create_support_case(name, from_email, problem, screenshot=None, addtl_info='')** create an email with the information received @@ -657,9 +719,9 @@ create an email with the information received - **param addtl_info:** A JSON-encoded string of a dict with additional information to include in the support request -###dogewallet_iofeeds Module +### dogewallet_iofeeds Module -####get_num_users_online +#### get_num_users_online **get_num_users_online()** - **return:** The current number of users attached to the server's chat feed @@ -667,38 +729,38 @@ create an email with the information received *deprecated: 1.6.3* -####is_chat_handle_in_use +#### is_chat_handle_in_use **is_chat_handle_in_use(handle)** *deprecated: 1.6.3* - **rtype:** Boolean -####get_chat_handle +#### get_chat_handle **get_chat_handle(wallet_id)** - **rtype:** {'handle', 'is_op', 'last_updated', 'banned_until'} *deprecated: 1.6.3* -####store_chat_handle +#### store_chat_handle **store_chat_handle(wallet_id, handle)** *deprecated: 1.6.3* -####get_chat_history +#### get_chat_history **get_chat_history(start_ts=None, end_ts=None, handle=None, limit=1000)** *deprecated: 1.6.3* -####is_wallet_online +#### is_wallet_online **is_wallet_online(wallet_id)** - **rtype:** Boolean -###transaction_stats Module +### transaction_stats Module -####get_transaction_stats +#### get_transaction_stats **get_transaction_stats(start_ts=None, end_ts=None)** This function returns the number of transactions in each 24 hour clock within the given time range, or the last 360 days if no time range is given. @@ -710,11 +772,11 @@ This function returns the number of transactions in each 24 hour clock within th -###API Changes +### API Changes This section documents any changes to the ``dogeblock`` API, for version numbers where there were API-level modifications. -####1.2.0 +#### 1.2.0 Removed the following API calls: @@ -723,7 +785,7 @@ Removed the following API calls: Since DOGE trading was removed from Dogewallet months ago, these calls are not necessary. -####1.1.0 +#### 1.1.0 Deprecated several redundant/unused functions for removal in a future version. Any code calling these functions should be re-written. Refer to the documentation of the individual functions for replacements. diff --git a/Developers/platform_architecture.md b/Developers/platform_architecture.md index f1b8165c..7266606d 100644 --- a/Developers/platform_architecture.md +++ b/Developers/platform_architecture.md @@ -1,9 +1,16 @@ -#Counterparty Platform Architecture +# Counterparty Platform Architecture In the figure below you can see how all Counterparty platform components interact with each other. -![](/_images/platform_architecture.png) - +![](../_images/platform_architecture.png) + +## TOC + +- [Counterparty Platform Architecture](#counterparty-platform-architecture) +- [counterparty-server](#counterparty-server) +- [counterblock](#counterblock) +- [Counterwallet](#counterwallet) +- [armory_utxsvr](#armory_utxsvr) ## counterparty-server diff --git a/Developers/protocol_specification.md b/Developers/protocol_specification.md index dc5fe7ce..1a1b5ca8 100644 --- a/Developers/protocol_specification.md +++ b/Developers/protocol_specification.md @@ -1,21 +1,34 @@ -Protocol Specification -========================= - -Summary -------- - -Dogeparty is a suite of financial tools in a protocol built on top of -the Dogecoin blockchain and using the blockchain as a service for the -reliable publication and timestamping of its messages. +# Protocol Specification + +- [Summary](#summary) +- [Transactions](#transactions) + - [Non‐Dogeparty transactions](#nondogeparty-transactions) + - [mempool transactions](#mempool-transactions) +- [Assets](#assets) + - [Subassets](#subassets) +- [Memos](#memos) +- [Transaction Statuses](#transaction-statuses) +- [Message Types](#message-types) + - [Send](#send) + - [Order](#order) + - [Issue](#issue) + - [Broadcast](#broadcast) + - [Bet](#bet) + - [Dividend](#dividend) + - [Burn](#burn) + - [Cancel](#cancel) + - [Destroy](#destroy) + - [Dispenser](#dispenser) + +## Summary + +Dogeparty is a suite of financial tools in a protocol built on top of the Dogecoin blockchain and using the blockchain as a service for the reliable publication and timestamping of its messages. The reference implementation is ``dogeparty-lib``, which is hosted at [GitHub](https://github.com/DogepartyXDP/dogeparty-lib). -This document describes exclusively the latest version of the -Dogeparty protocol. For historical protocol changes, see the -dogeparty-lib [ChangeLog](https://github.com/DogepartyXDP/dogeparty-lib/blob/master/ChangeLog.md). +This document describes exclusively the latest version of the Dogeparty protocol. For historical protocol changes, see the dogeparty-lib [ChangeLog](https://github.com/DogepartyXDP/dogeparty-lib/blob/master/ChangeLog.md). -Transactions ------------- +## Transactions Dogeparty messages have the following components: @@ -25,72 +38,47 @@ Dogeparty messages have the following components: - A fee, in dogecoins, paid to the Dogecoin miners who include the transaction in a block. - Some ‘data’, imbedded in specially constructed transaction outputs. -Every Dogecoin transaction carrying a Dogeparty transaction has the -following possible outputs: +Every Dogecoin transaction carrying a Dogeparty transaction has the following possible outputs: - zero or more destination outputs, - zero or more data outputs, and optional change outputs. -All data outputs follow all destination outputs. Change outputs (outputs after the last data -output) have no significance. +All data outputs follow all destination outputs. Change outputs (outputs after the last data output) have no significance. For identification purposes, every Dogeparty transaction’s ‘data’ -field is prefixed by the string ``DOGEPRTY``, encoded in UTF‐8. This -string is long enough that transactions with outputs containing -pseudo‐random data cannot be mistaken for valid Dogeparty -transactions. In testing (i.e. using the TESTCOIN Dogeparty network -on any blockchain), this string is ‘XX’. - -Dogeparty data may be stored in three different types of outputs, or -in some combinations of those formats. All of the data is obfuscated by -ARC4 encryption using the transaction identifier (TXID) of the first -unspent transaction output (UTXO) as the encryption key. - -Multi‐signature data outputs are one‐of‐three outputs where the first -public key is that of the sender, so that the value of the output is -redeemable, and the second two public keys encode the data, zero‐padded -and prefixed with a length byte. - -The data may also be stored in ``OP_RETURN`` outputs or as fake -pubkeyhashes. - -The existence of the destination outputs, and the significance of the -size of the Dogecoin fee and the Dogecoins transacted, depend on the -Dogeparty message type, which is determined by the four bytes in the -data field that immediately follow the identification prefix. The rest -of the data have a formatting specific to the message type, described in -the source code. - -The sources and destinations of a Dogeparty transaction are Dogecoin -addresses, and may be either ``OP_CHECKSIG`` and ``OP_CHECKMULTISIG`` +field is prefixed by the string ``DOGEPRTY``, encoded in UTF‐8. This string is long enough that transactions with outputs containing pseudo‐random data cannot be mistaken for valid Dogeparty transactions. In testing (i.e. using the TESTCOIN Dogeparty network on any blockchain), this string is ‘XX’. + +Dogeparty data may be stored in three different types of outputs, or in some combinations of those formats. All of the data is obfuscated by ARC4 encryption using the transaction identifier (TXID) of the first unspent transaction output (UTXO) as the encryption key. + +Multi‐signature data outputs are one‐of‐three outputs where the first public key is that of the sender, so that the value of the output is redeemable, and the second two public keys encode the data, zero‐padded and prefixed with a length byte. + +The data may also be stored in ``OP_RETURN`` outputs or as fake pubkeyhashes. + +The existence of the destination outputs, and the significance of the size of the Dogecoin fee and the Dogecoins transacted, depend on the Dogeparty message type, which is determined by the four bytes in the data field that immediately follow the identification prefix. The rest of the data have a formatting specific to the message type, described in the source code. + +The sources and destinations of a Dogeparty transaction are Dogecoin addresses, and may be either ``OP_CHECKSIG`` and ``OP_CHECKMULTISIG`` Dogecoin ScriptPubkeys. -All messages are parsed in order, one at a time, ignoring block -boundaries. +All messages are parsed in order, one at a time, ignoring block boundaries. -Orders, bets, order matches, bet matches and rock‐paper‐scissor matches -are expired at the end of blocks. +Orders, bets, order matches, bet matches and rock‐paper‐scissor matches are expired at the end of blocks. -Non‐Dogeparty transactions ------------------------------ +### Non‐Dogeparty transactions -dogeparty-lib supports the construction of two kinds of transactions -that are not themselves considered Dogeparty transactions: +dogeparty-lib supports the construction of two kinds of transactions that are not themselves considered Dogeparty transactions: - DOGE sends - DOGE dividends to Dogeparty assets Neither of these two transactions is constructed with a data field. -mempool transactions --------------------- +### mempool transactions Always have block index = 9999999 (``config.MEMPOOL_BLOCK_INDEX``). DB changes never persist across sessions. -Assets ------- +## Assets All assets except DOGE and XDP have the following properties: @@ -100,24 +88,19 @@ All assets except DOGE and XDP have the following properties: - Divisiblity - Callability - Call date (if callable) - - may be delayed with later issuances + - may be delayed with later issuances - Call price (if callable) (non‐negative) - - may be increased with later issuances + - may be increased with later issuances -Newly registered asset names will be either (unique) strings of 4 to 12 -uppercase Latin characters (inclusive) not beginning with ‘A’, or -integers between 26^12 + 1 and 256^8 (inclusive), prefixed with ‘A’. -Alphabetic asset names will carry a one‐time issuance fee (by burn) of -0.5 XDP and numeric asset names will be freely available. ‘DOGE’ and +Newly registered asset names will be either (unique) strings of 4 to 12 uppercase Latin characters (inclusive) not beginning with ‘A’, or integers between 26^12 + 1 and 256^8 (inclusive), prefixed with ‘A’. +Alphabetic asset names will carry a one‐time issuance fee (by burn) of 0.5 XDP and numeric asset names will be freely available. ‘DOGE’ and ‘XDP’ are the only three‐character asset names. Example asset names: BBBB, A100000000000000000. -Assets may be either divisible or indivisible, and divisible assets are -divisible to eight decimal places. Assets also come with descriptions, +Assets may be either divisible or indivisible, and divisible assets are divisible to eight decimal places. Assets also come with descriptions, which may be up to 52 single-byte characters long and updated at any time. -Subassets ------- +### Subassets 1. Subasset names must meet following requirements : * Begin with the parent asset name followed by a period (.) @@ -127,16 +110,14 @@ Subassets * Cannot end with a period (.) * Cannot contain multiple consecutive periods (..) -2. A subasset may only be issued from the same address that owns the parent asset at the time of the issuance -3. A subasset may be transferred to a new owner address after initial issuance -4. A subasset has an anti-spam issuance cost of 0.25 XDP +2. A subasset may only be issued from the same address that owns the parent asset at the time of the issuance 3. A subasset may be transferred to a new owner address after initial issuance 4. A subasset has an anti-spam issuance cost of 0.25 XDP -Memos ------- +## Memos A Memo can be attached to a send transactions. When a shared public address is used for incoming transactions, a memo may be used to link an incoming payments with a specific user account identifier or invoice. Memos do not need to be unique. Multiple sends may have the same memo. The Memo is a numeric value expressed in hexadecimal or a UTF-8 encoded text string. Valid memos are no more than 34 bytes long. - -Transaction Statuses --------------------- +## Transaction Statuses *Offers* (i.e. orders and bets) are given a status ``filled`` when their ``give_remaining``, ``get_remaining``, ``wager_remaining``, ``counterwager_remaining``, ``fee_provided_remaining`` or ``fee_required_remaining`` are no longer positive quantities. -Because order matches pending DOGE payment may be expired, orders -involving Dogecoin cannot be filled, but remain always with a status +Because order matches pending DOGE payment may be expired, orders involving Dogecoin cannot be filled, but remain always with a status ``open``. -Message Types -------------- +## Message Types - Send - Order @@ -179,166 +155,92 @@ Message Types - Destroy - Dispenser -###Send +### Send -A **send** message sends a quantity of any Dogeparty asset from the -source address to the destination address. If the sender does not hold a -sufficient quantity of that asset at the time that the send message is -parsed (in the sequence of transactions), then the send is considered an -oversend. +A **send** message sends a quantity of any Dogeparty asset from the source address to the destination address. If the sender does not hold a sufficient quantity of that asset at the time that the send message is parsed (in the sequence of transactions), then the send is considered an oversend. Oversends are handled as follows: -1) Oversends using the legacy send transaction type are valid and filled -as much as they can be -2) Oversends using the new default enhanced send transaction type after -block 489956 are invalid and none of the asset is sent - -dogeparty-lib supports sending dogecoins, for which no data output is -used. - -###Order - -An ‘order’ is an offer to *give* a particular quantity of a particular -asset and *get* some quantity of some other asset in return. No -distinction is drawn between a ‘buy order’ and a ‘sell order’. The -assets being given are escrowed away immediately upon the order being -parsed. That is, if someone wants to give 1 XDP for 2 DOGE, then as soon -as he publishes that order, his balance of XDP is reduced by one. - -When an order is seen in the blockchain, the protocol attempts to match -it, deterministically, with another open order previously seen. Two -matched orders are called a ‘order match’. If either of a order match’s -constituent orders involve Dogecoin, then the order match is assigned the -status ‘pending’ until the necessary DOGEPay transaction is published. -Otherwise, the trade is completed immediately, with the protocol itself -assigning the participating addresses their new balances. - -All orders are *limit orders*: an asking price is specified in the ratio -of how much of one would like to get and give; an order is matched to -the open order with the best price below the limit, and the order match -is made at *that* price. That is, if there is one open order to sell at -.11 XDP/ASST, another at .12 XDP/ASST, and another at .145 XDP/DOGE, then -a new order to buy at .14 XDP/ASST will be matched to the first sell -order first, and the XDP and DOGE will be traded at a price of .11 -XDP/ASST, and then if any are left, they’ll be sold at .12 XDP/ASST. If -two existing orders have the same price, then the one made earlier will -match first. +1) Oversends using the legacy send transaction type are valid and filled as much as they can be 2) Oversends using the new default enhanced send transaction type after block 489956 are invalid and none of the asset is sent + +dogeparty-lib supports sending dogecoins, for which no data output is used. + +### Order + +An ‘order’ is an offer to *give* a particular quantity of a particular asset and *get* some quantity of some other asset in return. No distinction is drawn between a ‘buy order’ and a ‘sell order’. The assets being given are escrowed away immediately upon the order being parsed. That is, if someone wants to give 1 XDP for 2 DOGE, then as soon as he publishes that order, his balance of XDP is reduced by one. + +When an order is seen in the blockchain, the protocol attempts to match it, deterministically, with another open order previously seen. Two matched orders are called a ‘order match’. If either of a order match’s constituent orders involve Dogecoin, then the order match is assigned the status ‘pending’ until the necessary DOGEPay transaction is published. +Otherwise, the trade is completed immediately, with the protocol itself assigning the participating addresses their new balances. + +All orders are *limit orders*: an asking price is specified in the ratio of how much of one would like to get and give; an order is matched to the open order with the best price below the limit, and the order match is made at *that* price. That is, if there is one open order to sell at +.11 XDP/ASST, another at .12 XDP/ASST, and another at .145 XDP/DOGE, then a new order to buy at .14 XDP/ASST will be matched to the first sell order first, and the XDP and DOGE will be traded at a price of .11 XDP/ASST, and then if any are left, they’ll be sold at .12 XDP/ASST. If two existing orders have the same price, then the one made earlier will match first. All orders allow for partial execution; there are no all‐or‐none orders. -If, in the previous example, the party buying the dogecoins wanted to buy -more than the first sell offer had available, then the rest of the buy -order would be filled by the latter existing order. After all possible -order matches are made, the current (buy) order is listed as an open -order itself. If there exist multiple open orders at the same price, +If, in the previous example, the party buying the dogecoins wanted to buy more than the first sell offer had available, then the rest of the buy order would be filled by the latter existing order. After all possible order matches are made, the current (buy) order is listed as an open order itself. If there exist multiple open orders at the same price, then order that was placed earlier is matched first. -Open orders expire after they have been open for a user‐specified number -of blocks. When an order expires, all escrowed funds are returned to the -parties that originally had them. +Open orders expire after they have been open for a user‐specified number of blocks. When an order expires, all escrowed funds are returned to the parties that originally had them. -Order Matches waiting for Dogecoin payments expire after twenty blocks; the -constituent orders are replenished. +Order Matches waiting for Dogecoin payments expire after twenty blocks; the constituent orders are replenished. -In general, there can be no such thing as a fake order, because the -assets that each party is offering are stored in escrow. However, it is -impossible to escrow dogecoins, so those attempting to buy dogecoins may -ask that only orders which pay a fee in dogecoins to Dogecoin miners be -matched to their own. On the other hand, when creating an order to sell -dogecoins, a user may pay whatever fee he likes. Partial orders pay -partial fees. These fees are designated in the code as ``fee_required`` +In general, there can be no such thing as a fake order, because the assets that each party is offering are stored in escrow. However, it is impossible to escrow dogecoins, so those attempting to buy dogecoins may ask that only orders which pay a fee in dogecoins to Dogecoin miners be matched to their own. On the other hand, when creating an order to sell dogecoins, a user may pay whatever fee he likes. Partial orders pay partial fees. These fees are designated in the code as ``fee_required`` and ``fee_provided``, and as orders involving DOGE are matched (expired), these fees (required and provided) are debited (sometimes replenished), -in proportion to the fraction of the order that is matched. That is, if -an order to sell 1 DOGE has a ``fee_provided`` of 0.01 DOGE (a 1%), and -that order matches for 0.5 DOGE initially, then the +in proportion to the fraction of the order that is matched. That is, if an order to sell 1 DOGE has a ``fee_provided`` of 0.01 DOGE (a 1%), and that order matches for 0.5 DOGE initially, then the ``fee_provided_remaining`` for that order will thenceforth be 0.005 DOGE. -*Provided* fees, however, are not replenished upon failure to make DOGE -payments, or their anti‐trolling effect would be voided. +*Provided* fees, however, are not replenished upon failure to make DOGE payments, or their anti‐trolling effect would be voided. -Payments of dogecoins to close order matches waiting for dogecoins are -done with a **DOGEpay** message, which stores in its data field only -the string concatenation of the transaction hashes which compose the -Order Match which it fulfils. +Payments of dogecoins to close order matches waiting for dogecoins are done with a **DOGEpay** message, which stores in its data field only the string concatenation of the transaction hashes which compose the Order Match which it fulfils. -###Issue +### Issue -Assets are issued with the **issuance** message type: the user picks a -name and a quantity, and the protocol credits his address accordingly. -The asset name must either be unique or be one previously issued by the -same address. When re‐issuing an asset, that is, issuing more of an -already‐issued asset, the divisibilities and the issuing address must -match. +Assets are issued with the **issuance** message type: the user picks a name and a quantity, and the protocol credits his address accordingly. +The asset name must either be unique or be one previously issued by the same address. When re‐issuing an asset, that is, issuing more of an already‐issued asset, the divisibilities and the issuing address must match. -The rights to issue assets under a given name may be transferred to any -other address. +The rights to issue assets under a given name may be transferred to any other address. -Assets may be locked irreversibly against the issuance of further -quantities and guaranteeing its holders against its inflation. To lock -an asset, set the description to ‘LOCK’ (case‐insensitive). +Assets may be locked irreversibly against the issuance of further quantities and guaranteeing its holders against its inflation. To lock an asset, set the description to ‘LOCK’ (case‐insensitive). -Issuances of any non‐zero quantity, that is, issuances which do not -merely change, e.g., the description of the asset, involve a debit (and -destruction) of now 0.5 XDP. +Issuances of any non‐zero quantity, that is, issuances which do not merely change, e.g., the description of the asset, involve a debit (and destruction) of now 0.5 XDP. -Asset descriptions in enhanced asset information schema may be of -arbitrary length. +Asset descriptions in enhanced asset information schema may be of arbitrary length. -###Broadcast +### Broadcast A **broadcast** message publishes textual and numerical information, along with a timestamp, as part of a series of broadcasts called a -‘feed’. One feed is associated with one address: any broadcast from a -given address is part of that address’s feed. The timestamps of a feed -must increase monotonically. - -Bets are made on the numerical values in a feed, which values may be the -prices of a currency, or parts of a code for describing discrete -possible outcomes of a future event, for example. One might describe -such a code with a text like, ‘US QE on 2014-01-01: dec=1, const=2, +‘feed’. One feed is associated with one address: any broadcast from a given address is part of that address’s feed. The timestamps of a feed must increase monotonically. + +Bets are made on the numerical values in a feed, which values may be the prices of a currency, or parts of a code for describing discrete possible outcomes of a future event, for example. One might describe such a code with a text like, ‘US QE on 2014-01-01: dec=1, const=2, inc=3’ and announce the results with ‘US QE on 2014-01-01: decrease!’ and a value of 1. The publishing of a single broadcast with a textual message equal to -‘LOCK’ (case‐insensitive) locks the feed, and prevents it both from -being the source of any further broadcasts and from being the subject of -any new bets. (If a feed is locked while there are open bets or -unsettled bet matches that refer to it, then those bets and bet matches -will expire harmlessly.) +‘LOCK’ (case‐insensitive) locks the feed, and prevents it both from being the source of any further broadcasts and from being the subject of any new bets. (If a feed is locked while there are open bets or unsettled bet matches that refer to it, then those bets and bet matches will expire harmlessly.) The text field may be of arbitrary length. A feed is identified by the address which publishes it. Broadcasts with a value of -2 cancel all open bets on the feed. -Broadcasts with a value of -3 cancel all pending bet matches on the -feed. (This is equivalent to waiting for two weeks after the deadline.) -Broadcasts with any other negative value are ignored for the purpose of -bet settlement, but they still update the last broadcast time. +Broadcasts with a value of -3 cancel all pending bet matches on the feed. (This is equivalent to waiting for two weeks after the deadline.) +Broadcasts with any other negative value are ignored for the purpose of bet settlement, but they still update the last broadcast time. -###Bet +### Bet -A bet is a wager that the value of a particular feed will be equal (or not -equal) to a certain value — the *target value* — at the *deadline*. Bets have -their wagers put in escrow upon being matched, and they are settled when the -feed that they rely on passes the deadline. +A bet is a wager that the value of a particular feed will be equal (or not equal) to a certain value — the *target value* — at the *deadline*. Bets have their wagers put in escrow upon being matched, and they are settled when the feed that they rely on passes the deadline. Equal/NotEqual Bets cannot be leveraged. However, for two Bets to be matched, their leverage levels, deadlines and target values must be identical. Otherwise, they are matched the same way that orders are, except a Bet’s *odds* are the multiplicative inverse of an order’s price (odds = wager/counterwager): -each Bet is matched, if possible, to the open Bet with the highest odds, as -much as possible. +each Bet is matched, if possible, to the open Bet with the highest odds, as much as possible. -Target values must be non‐negative, and Bet Matches (contracts) are not -affected by broadcasts with a value of -1. +Target values must be non‐negative, and Bet Matches (contracts) are not affected by broadcasts with a value of -1. -Bets cannot have a deadline later than the timestamp of the last -broadcast of the feed that they refer to. +Bets cannot have a deadline later than the timestamp of the last broadcast of the feed that they refer to. -Bets expire the same way that orders do, i.e. after a particular number -of blocks. Bet Matches expire 2016 blocks after a block is seen with a -block timestamp after its deadline. +Bets expire the same way that orders do, i.e. after a particular number of blocks. Bet Matches expire 2016 blocks after a block is seen with a block timestamp after its deadline. Betting fees are proportional to the initial wagers, not the earnings. They are taken from, not added to, the quantities wagered. @@ -352,26 +254,18 @@ They are taken from, not added to, the quantities wagered. Feed fees are deducted from the final settlement amount. -###Dividend +### Dividend -A dividend payment is a payment of some quantity of any Dogeparty -asset (including DOGE) to every holder of a an asset (except DOGE or XDP) -in proportion to the size of their holdings. Dividend‐yielding assets -may be either divisible or indivisible. A dividend payment to any asset -may originate from any address. The asset for dividend payments and the -assets whose holders receive the payments may be the same. Dogecoin -dividend payments do not employ the Dogeparty protocol and so are -larger and more expensive (in fees) than all other dividend payments. +A dividend payment is a payment of some quantity of any Dogeparty asset (including DOGE) to every holder of a an asset (except DOGE or XDP) +in proportion to the size of their holdings. Dividend‐yielding assets may be either divisible or indivisible. A dividend payment to any asset may originate from any address. The asset for dividend payments and the assets whose holders receive the payments may be the same. Dogecoin dividend payments do not employ the Dogeparty protocol and so are larger and more expensive (in fees) than all other dividend payments. - TODO: dividends on escrowed funds There is a small anti-spam fee of 0.0002 XDP per recipient with dividends. -###Burn +### Burn -Balances in Dogeparty’s native currency, ‘XDP’, will be initialised -by ‘burning’ dogecoins in miners’ fees during a particular period of time -using the a **burn** message type. +Balances in Dogeparty’s native currency, ‘XDP’, will be initialised by ‘burning’ dogecoins in miners’ fees during a particular period of time using the a **burn** message type. Burn messages have precisely the string ‘ProofOfBurn’ stored in the ``OP_RETURN`` output. @@ -380,30 +274,18 @@ Burn messages have precisely the string ‘ProofOfBurn’ stored in the - new data‐less burn - burn period is over -###Cancel +### Cancel Open offers may be cancelled, which cancellation is irrevocable. -A *cancel* message contains only the hash of the Dogecoin transaction -that contains the order or bet to be cancelled. Only the address which -made an offer may cancel it. +A *cancel* message contains only the hash of the Dogecoin transaction that contains the order or bet to be cancelled. Only the address which made an offer may cancel it. -###Destroy +### Destroy -A **destroy** message destorys a quantity of any Dogeparty asset from the -source address and updates the total supply. If the sender does not hold a -sufficient quantity of that asset at the time that the destroy message is -parsed (in the sequence of transactions), then the destroy is considered -invalid. +A **destroy** message destorys a quantity of any Dogeparty asset from the source address and updates the total supply. If the sender does not hold a sufficient quantity of that asset at the time that the destroy message is parsed (in the sequence of transactions), then the destroy is considered invalid. -###Dispenser +### Dispenser -A dispenser message creates a special type of artifact on the dogeparty db -that watches an address for incoming main chain asset (DOGE). When any DOGE reaches -a dispenser enabled address, the amount received gets divided by the dispenser -mainchainrate (or satoshirate in the db). The quantity rounded down is the -multiplier to *give_quantity* that is sent to the first address on the sending -transaction. All dispensers that can match on an address are triggered by each -DOGE send that has a dispense multiplier of at least 1. +A dispenser message creates a special type of artifact on the dogeparty db that watches an address for incoming main chain asset (DOGE). When any DOGE reaches a dispenser enabled address, the amount received gets divided by the dispenser mainchainrate (or satoshirate in the db). The quantity rounded down is the multiplier to *give_quantity* that is sent to the first address on the sending transaction. All dispensers that can match on an address are triggered by each DOGE send that has a dispense multiplier of at least 1. A dispenser can be in either of two status: 0 (open) or 10 (closed). diff --git a/Dogeparty_Content_Policy.md b/Dogeparty_Content_Policy.md index 09a7e59a..26d761c9 100644 --- a/Dogeparty_Content_Policy.md +++ b/Dogeparty_Content_Policy.md @@ -1,49 +1,70 @@ -Content Policy for Dogeparty forums and Dogeparty related chats -======================== -_(collectively referred to as the **Dogeparty properties**)_ - -### 1. Stay on Topic +# Content Policy + +#### for Dogeparty forums and Dogeparty related chats _(collectively referred to as the **Dogeparty properties**)_ + +- [Policy](#policy) + - [1. Stay on Topic](#1-stay-on-topic) + - [2. No Self-Promotion](#2-no-self-promotion) + - [3. Choose Your Curse Words Wisely](#3-choose-your-curse-words-wisely) + - [4. Don't Be a Jerk](#4-dont-be-a-jerk) + - [5. No Scams](#5-no-scams) + - [6. No Copying and Pasting](#6-no-copying-and-pasting) + - [7. No Spam](#7-no-spam) + - [8. English Only, Unless Stated Otherwise](#8-english-only-unless-stated-otherwise) + - [9. No Sexual Content](#9-no-sexual-content) +- [SANCTIONS AND CONFLICT RESOLUTION](#sanctions-and-conflict-resolution) + - [1. Contact A Mod](#1-contact-a-mod) + - [2. Warnings](#2-warnings) + - [3. Deletions](#3-deletions) + - [4. Bannings](#4-bannings) + - [5. Appeals](#5-appeals) +- [CURRENT MODERATION TEAM](#current-moderation-team) +- [How to become a moderator](#how-to-become-a-moderator) + +## Policy + +#### 1. Stay on Topic The Dogeparty properties are a place to discuss matters related to the [Dogeparty platform](https://dogeparty.net/). Discussions that are off-topic to this will be closed and potentially deleted. Comments within a discussion may naturally veer in different directions, and this is generally not a problem. However, if the moderators feel that the comment chain has reached its limit, we will give a polite notice about being off topic before moderation is used. -### 2. No Self-Promotion +#### 2. No Self-Promotion "Self-promotion" is an attempt to redirect traffic from the Dogeparty properties to your personal blog, chat, YouTube channel, etc. Pure self-promotion will not be allowed, however, if you are trying to get feedback and reviews from the community for your Dogeparty-based project, or an outlet of your original content that relates to Dogeparty in some direct manner, then reasonable and limited promotion is permitted. If you are unsure, please ask a mod before doing so. -### 3. Choose Your Curse Words Wisely +#### 3. Choose Your Curse Words Wisely Comments that contain profanity may be held for moderator review before being posted. Depending on the context of the comment, it may be removed. Profanity used to insult, antagonize, or inflame will always be removed. -### 4. Don't Be a Jerk +#### 4. Don't Be a Jerk Personal attacks, insults with hostile intent, stalking, harassment, slander, and using offensive speech will not be tolerated. Discussions and comments with the sole purpose of antagonizing or provoking (i.e. trolling) will be removed, and your account may be banned. Sexist, racist, misogynist, homophobic, and broad, offensive generalizations about groups of people are simply not allowed. -### 5. No Scams +#### 5. No Scams Promoting manipulative schemes that directly seek to enrich one group (normally the founders) at the expense of another group (normally those that come later and are not “insiders”) are not tolerated. If your posting is deemed by the moderators (at their sole opinion) to be a scam, it will be deleted and your account may be banned. -### 6. No Copying and Pasting +#### 6. No Copying and Pasting Do not copy and paste someone else's writing without due credit or notice. Please provide a link to your sources. -### 7. No Spam +#### 7. No Spam Spam is the posting of unsolicited messages, generally advertising a product or service. Spam can also be the repeated posting of the same message multiple times. Either form of "spamming" is strictly prohibited. Please note that accounts that post advertising spam will be banned without warning. -### 8. English Only, Unless Stated Otherwise +#### 8. English Only, Unless Stated Otherwise Discussions and comments posted in languages other than English will be removed. This does not apply to “Local” forums or local channels that feature a specific language, such as Chinese. This also does not apply if you are using another language to make a point or using it colloquially rather than as primary communication. -### 9. No Sexual Content +#### 9. No Sexual Content As the old saying goes, “we know it when we see it.” ## SANCTIONS AND CONFLICT RESOLUTION -### 1. Contact A Mod +#### 1. Contact A Mod If you are uncertain about a moderation action, or if you you have questions, comments, or concerns regarding the Dogeparty properties, you can feel free to contact moderators on the slack chat, via direct message, or email moderators@dogeparty.net. -### 2. Warnings +#### 2. Warnings Generally, a polite warning will be given before any further moderation takes place. You will not receive a warning in cases of spam, scams or in cases where it is blatantly obvious that you are posting on the Dogeparty properties for the sole purpose of trolling and causing problems. -### 3. Deletions +#### 3. Deletions Discussions that are off topic or violate any of the other channel rules will be closed with a brief explanation as to why it was closed. Closed discussions may be deleted shortly after they are closed. Comments that violate the stated rules will also be deleted. If you have a question as to why a comment or discussion was deleted, please politely ask a mod for an explanation. -### 4. Bannings +#### 4. Bannings Accounts that post spam or clear scams will receive an automatic blacklist/ban without warning. Persistent violation of the channel rules may result in a blacklist/ban. You may expect at least one warning from a mod before a blacklist/ban is issued for violation of channel rules. Please note that a blacklist/ban is not necessarily permanent. Sometimes a "cooling off" period is needed. If you would like to have your blacklist/ban removed, and the mod you banned you has not already given you a way to remove your ban, please contact moderators@dogeparty.net. Blacklists/bans may be overturned if the mods feel that the action that previously resulted in the blacklist/ban has been corrected. -### 5. Appeals +#### 5. Appeals If you have an issue with a moderation practice on this channel, please do not persist in arguing with the mods. Politely ask for an explanation and one will be provided. If you are not satisfied with the explanation, and you insist on continuing the argument with the mod, you run the risk of further moderation action. If you would like to appeal a mod's decision or moderation practice, you may email the moderators group collectively at moderators@dogeparty.net The purpose of this rule is to keep the Dogeparty properties clear from moderation arguments and to avoid unnecessary escalation of moderation (i.e., deletion and blacklist). ## CURRENT MODERATION TEAM @@ -54,6 +75,6 @@ If you have an issue with a moderation practice on this channel, please do not p Moderators can collectively be reached via emailing moderators@dogeparty.net -### How to become a moderator +## How to become a moderator Community members may apply for moderator status. We generally look for intelligent, well-behaved, and reliable members of the community. If you are interested and think you have what it takes, please reach out to us at moderators@dogeparty.net, or on [Telegram](https://t.me/DogepartyXDP). diff --git a/Installation/README.md b/Installation/README.md new file mode 100644 index 00000000..a0a75833 --- /dev/null +++ b/Installation/README.md @@ -0,0 +1,26 @@ +# Installation + +## Setting up a Dogeparty Node + +- [Introduction](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#introduction) + - [Node Services](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#node-services) + - [Hardware / OS requirements](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#hardware--os-requirements) +- [Pre-installation](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#pre-installation) + - [Windows](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#windows) + - [OS X](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#os-x) + - [Linux](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#linux) +- [Installation](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#installation) +- [Post-installation tasks](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#post-installation-tasks) +- [Administration](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#administration) +- [Updating, rebuilding, uninstalling](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#updating-rebuilding-uninstalling) +- [Component development](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#component-development) +- [Counterwallet-Specific](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#counterwallet-specific) + - [Getting a SSL Certificate](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#getting-a-ssl-certificate) + - [Monitoring the Server](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#monitoring-the-server) + - [Creating a configuration file](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md#creating-a-configuration-file) + +## Windows + +- [Dogeparty Dependencies on Windows](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/windows.md#dogeparty-dependencies-on-windows) +- [Usage and notes for Windows](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/windows.md#usage-and-notes-for-windows) +- [Dogeparty "Doge Node" on Windows](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/windows.md#dogeparty-doge-node-on-windows) diff --git a/Installation/dogeparty_node.md b/Installation/dogeparty_node.md index 8cb43337..3fd8c6e6 100644 --- a/Installation/dogeparty_node.md +++ b/Installation/dogeparty_node.md @@ -1,5 +1,22 @@ # Setting up a Dogeparty Node +- [Introduction](#introduction) + - [Node Services](#node-services) + - [Hardware / OS requirements](#hardware--os-requirements) +- [Pre-installation](#pre-installation) + - [Windows](#windows) + - [OS X](#os-x) + - [Linux](#linux) +- [Installation](#installation) +- [Post-installation tasks](#post-installation-tasks) +- [Administration](#administration) +- [Updating, rebuilding, uninstalling](#updating-rebuilding-uninstalling) +- [Component development](#component-development) +- [Counterwallet-Specific](#counterwallet-specific) + - [Getting a SSL Certificate](#getting-a-ssl-certificate) + - [Monitoring the Server](#monitoring-the-server) + - [Creating a configuration file](#creating-a-configuration-file) + ## Introduction This document describes how one can set up their own Dogeparty "Doge Node" system, on Linux, Windows or OS X. @@ -9,7 +26,7 @@ A Doge Node is a self-contained system that runs the some or all of the Dogepart The document is primarily intended for power users and developers. ### Node Services - + Services run on a Federated Node include some or all of the following: * **dogeparty-server**: `dogeparty-lib` + `dogeparty-cli`. Implements support for the core Dogeparty protocol, via a provided REST API and command line interface. @@ -23,17 +40,16 @@ Services run on a Federated Node include some or all of the following: Please note that Federated Node should not be installed on a system which already has one or more of conflicting services running on the ports used by Federated Node. The Federated Node install script checks that required ports are unused and exits to avoid conflict. If you have a non-essential Web, mongodb or other service running on the target system you can disable them or bind them to a different port to be able to pass the built-in check and avoid application conflicts. ### Hardware / OS requirements - - **Memory**: 4GB RAM (`dogecoind`, `dogeparty-server` only), 8GB+ RAM (full stack) - **Disk space:** The exact disk space required will be dependent on what services are run on the node: - - For ``dogecoin`` databases: **~361GB** (mainnet), **~32GB** (testnet) - - For ``addrindexrs`` database: **~63GB** (mainnet), **~6GB** (testnet) - - For ``dogeparty`` databases: **~5GB** (mainnet), **~1GB** (testnet) + - For ``dogecoin`` databases: **~361GB** (mainnet), **~32GB** (testnet) + - For ``addrindexrs`` database: **~63GB** (mainnet), **~6GB** (testnet) + - For ``dogeparty`` databases: **~5GB** (mainnet), **~1GB** (testnet) - **OS:** *Please note that Ubuntu Linux is the recommended OS at this time, as most of our testing is performed on it. Windows and OS X support is considered in BETA.* - - **Linux**: We recommend Ubuntu 20.10 64-bit, but other, modern versions of Linux should work, as long as they support the newest released version of Docker - - **Windows**: Windows 7 or higher, or Server 2008 or higher. 64-bit required - - **OS X**: 10.8 "Mountain Lion" or higher + - **Linux**: We recommend Ubuntu 20.10 64-bit, but other, modern versions of Linux should work, as long as they support the newest released version of Docker + - **Windows**: Windows 7 or higher, or Server 2008 or higher. 64-bit required + - **OS X**: 10.8 "Mountain Lion" or higher ## Pre-installation @@ -51,7 +67,6 @@ Please note that Federated Node should not be installed on a system which alread * Next, you will need to enable access to your host hard drive so that some of the shared volumes work properly. To do this, right click on the Docker Whale icon in your system tray. Then go to "Docker Settings" and then "Shared Drives". Turn on access to the drive on which the `dogenode` folder will reside (most likely your "C" drive). * Finally, launch [a command prompt as Administrator](https://technet.microsoft.com/en-us/library/cc947813(v=ws.10).aspx) - **If using Docker Toolbox**: * After installation completes, launch the "Docker Quickstart Terminal" and let it configure itself. * Once this finishes, you will need to resize the Virtual Machine that Docker Toolbox uses to run the Docker containers. Note that it currently limits this VM to 1GB of memory and 20GB hard disk space total by default (shared across _all_ containers). You will need to update this to _at least_ 2 or 4GB memory and 50-100GB space. To do this, execute commands like the following (replacing the numbers in the second command as appropriate, based on the [system requirements](#requirements)): @@ -173,7 +188,6 @@ dogenode tail dogecoin dogenode tail dogeparty ``` -**Access the system** Once running, the system listens on the following ports: @@ -259,7 +273,6 @@ Or, to view the entire log, run: dogenode logs ``` -Where `` may be one the following, or blank to tail all services: * `dogeparty` (`dogeparty-server` mainnet) * `dogeblock` (`dogeblock` mainnet) @@ -315,7 +328,6 @@ To pull the newest software from the git repositories and restart the appropriat dogenode update ``` -Where `` is one of the following, or blank for all applicable services: * `dogeparty` * `dogeparty-testnet` diff --git a/Installation/windows.md b/Installation/windows.md index dc298bcc..a9947eb3 100644 --- a/Installation/windows.md +++ b/Installation/windows.md @@ -1,4 +1,10 @@ -# Dogeparty Dependencies on Windows +# Windoze + +- [Dogeparty Dependencies on Windows](#dogeparty-dependencies-on-windows) +- [Usage and notes for Windows](#usage-and-notes-for-windows) +- [Dogeparty "Doge Node" on Windows](#dogeparty-doge-node-on-windows) + +## Dogeparty Dependencies on Windows **Note:** These instructions are for a 32-bit installation. This will work with both 32-bit and 64-bit versions of Windows, and is the recommended approach. @@ -34,7 +40,7 @@ Both Python and Dogeparty code can be installed by non-admin users: * Python 3.5 will be installed to C:\Users\USER\AppData\Roaming\Python\Python35\ * Dogeparty executables will be installed to the Scripts subdirectory (example: `pip3 install --user dogeparty-lib`). -# Dogeparty Doge Node” on Windows +## Dogeparty "Doge Node" on Windows The experimental Dogeparty "Doge Node” for Windows based on Docker can be installed by following the official "Federated Node" [install guide](https://github.com/DogepartyXDP/Documentation/blob/master/Installation/dogeparty_node.md). dogeparty-server and dogeparty-client is sufficient for users who do not require local Counterwallet or Counterblock access. diff --git a/README.md b/README.md index 1f1b5507..7ce0d5cb 100644 --- a/README.md +++ b/README.md @@ -1 +1,37 @@ # Official Documentation of the Dogeparty Project + +- [Basics](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/tree/master/Basics/) + - [Frequently Asked Questions](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Basics/FAQ-XDP.md) + - [What is XDP?](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Basics/FAQ.md) + - [Assets](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Basics/assets.md) +- [Content Policy](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Dogeparty_Content_Policy.md) +- [User Interface](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/) +- [Counterwallet FAQ](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/FAQ-Counterwallet.md) +- [Counterwallet Tutorials](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials) + - [Getting Started](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/getting_started_cw.md) + - Addresses + - [Create Addresses](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/create_addresses.md) + - [Show QR Code](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/show_qr_code.md) + - [Create Token](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/create_token.md) + - [Change Token Settings](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/change_token_settings.md) + - [Pay Distribution](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/pay_distribution.md) + - [Get Token Info](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/get_token_info.md) + - [Buy and Sell Assets on the DEX](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/buy_and_sell_assets_on_the_dex.md) + - [Trading on the DEX](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/trade.md) + - [Broadcast](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/broadcast.md) + - [Multisig](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/multisig_counterwallet.md) +- [Command-line Usage](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/CLI.md) +- [Advanced User and Developer Tutorials](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/) + - [Integrating XDP and assets into an exchange](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/exchange_integration.md) + - [Dogewallet Enhanced Asset Info](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/enhanced_asset_info.md) + - [Dogewallet Enhanced Feed Info](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/enhanced_feed_info.md) + - [Dogewallet failover mechanics and misc notes](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/dogewallet_notes.md) +- [Setting up a Dogeparty Node](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/dogeparty_node.md) + - [Windows](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Installation/windows.md) +- [Developers](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/tree/master/Developers/) + - [Notes and Tutorials](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/tree/master/Developers/Notes_and_Tutorials) + - [Integrating XDP and assets into an exchange](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/exchange_integration.md) + - [Dogewallet Enhanced Asset Info](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/enhanced_asset_info.md) + - [Dogewallet Enhanced Feed Info](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/enhanced_feed_info.md) + - [Dogewallet failover mechanics and misc notes](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/Developers/Notes_and_Tutorials/dogewallet_notes.md) + - Additional tutorials are available at the [Dogeparty Community Forum](https://forum.dogeparty.net) diff --git a/UI/CLI.md b/UI/CLI.md index 014e0864..ede4d27c 100644 --- a/UI/CLI.md +++ b/UI/CLI.md @@ -1,5 +1,25 @@ -Command-line Usage -================= +# Command-line Usage + +- [Burn](#burn) +- [Send](#send) +- [Dispenser](#dispenser) +- [Order](#order) +- [BTCPay](#btcpay) +- [Issuance](#issuance) +- [Destroy](#destroy) +- [Broadcast](#broadcast) +- [Bet (Equal/Not Equal)](#bet-equalnot-equal) +- [Cancel](#cancel) +- [Dividend](#dividend) +- [Asset](#asset) +- [Balances](#balances) +- [Wallet](#wallet) +- [Pending](#pending) +- [Getrows](#getrows) +- [GetInfo](#getinfo) +- [Get_TX_Info](#get_tx_info) +- [Input and Output](#input-and-output) +- [Optional arguments](#optional-arguments) The following examples are abridged for parsimony (meaning: actions are normally preceded by `counterparty-client`, i.e. the `burn` command would be @@ -10,8 +30,8 @@ another console). All other commands will fail if the index of the last block in the database is less than that of the last block seen by Bitcoin Core. -Burn ----- +## Burn + *Destroy BTC to earn XCP, during an initial period of time* The `burn` command is currently usable only on testnet because on mainnet @@ -26,8 +46,8 @@ the burn period finished in early 2014. burn --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns --quantity=0.5 -Send ----------------------------------------- +## Send + *Create and broadcast a `send` message* * --source = the source address @@ -36,14 +56,12 @@ Send * --asset = the ASSET of which you would like to send QUANTITY * --fee = the exact BTC fee to be paid to miners - - send --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns --quantity=3 \ - --asset=BBBC --destination=n3BrDB6zDiEPWEE6wLxywFb4Yp9ZY5fHM7 + --asset=BBBC --destination=n3BrDB6zDiEPWEE6wLxywFb4Yp9ZY5fHM7 + +## Dispenser -Dispenser ----------------------------------------- *Create and broadcast a `dispenser` message* * --source = the source address @@ -53,13 +71,11 @@ Dispenser * --asset = the ASSET of which you would like to dispense * --status = the status of the dispenser (0 open, 10 close) - - dispenser --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns --give_quantity=3 \ - --escrow_quantity=3000 --asset=BBBC --mainchainrate=0.01 --status=10 + --escrow_quantity=3000 --asset=BBBC --mainchainrate=0.01 --status=10 + +## Order -Order ----------------------------------------- *Create and broadcast an `order` message* * --source = the source address @@ -77,15 +93,15 @@ extra parameter, and a second step (`btcpay`) is needed. If [address_1] is tradi order --source=[address_1] --give-asset=BTC --give-quantity=[give_quantity_1] \ - --get-asset=[asset] --get-quantity=[get_quantity_1] --fee-provided=[fee_provided] \ - --expiration=[expiration_1] + --get-asset=[asset] --get-quantity=[get_quantity_1] --fee-provided=[fee_provided] \ + --expiration=[expiration_1] If [address_2] is trading [give_quantity_2] of [asset] for [get_quantity_2] of BTC: order --source=[address_2] --give-asset=[asset] --give-quantity=[give_quantity_2] \ - --get-asset=BTC --get-quantity=[get_quantity_2] --fee-required=[fee_required] \ - --expiration=[expiration_2] + --get-asset=BTC --get-quantity=[get_quantity_2] --fee-required=[fee_required] \ + --expiration=[expiration_2] [asset] is debited immediately from [address_2] and is held in the Counterparty @@ -102,13 +118,13 @@ The command for a `btcpay` is: order --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns --get-quantity=10 \ - --get-asset=BTC --give-quantity=20 --give-asset=XCP --expiration=10 \ - --fee_required=0.0002 + --get-asset=BTC --give-quantity=20 --give-asset=XCP --expiration=10 \ + --fee_required=0.0002 order --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns --get-quantity=10 \ - --get-asset=BBBC --give-quantity=20 --give-asset=BTC --expiration=10 \ - --fee_provided=0.0002 + --get-asset=BBBC --give-quantity=20 --give-asset=BTC --expiration=10 \ + --fee_provided=0.0002 For orders that do not involve BTC buy or sell, `BTCpay` is not required. For Sally to receive [get_quantity_1] of [get_asset_1] in exchange for @@ -116,28 +132,28 @@ For Sally to receive [get_quantity_1] of [get_asset_1] in exchange for order --source=[sallys_address] --give-asset=[give_asset_1] \ - --give-quantity=[give_quantity_1] --get-asset=[get_asset_1] \ - --get-quantity=[get_quantity_1] --expiration=expiration_1 + --give-quantity=[give_quantity_1] --get-asset=[get_asset_1] \ + --get-quantity=[get_quantity_1] --expiration=expiration_1 In order for Alice to receive [get_quantity_2] of Sally's [give_asset_1] in exchange for [give_quantity_2] of [get_asset_2], the command is: order --source=[alices_address] --give-asset=[give_asset_2] \ - --give-quantity=[give_quantity_2] --get-asset=[get_asset_2] \ - --get-quantity=[get_quantity_2] --expiration=expiration_2 + --give-quantity=[give_quantity_2] --get-asset=[get_asset_2] \ + --get-quantity=[get_quantity_2] --expiration=expiration_2 For example, Alice wants to sell 20 BBBC for 10 XCP within (expiration) 144 bitcoin blocks (approximately 144 * 10 min = 24 hours): order --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns --get-quantity=10 \ - --get-asset=XCP --give-quantity=20 --give-asset=BBBC --expiration=144 + --get-asset=XCP --give-quantity=20 --give-asset=BBBC --expiration=144 Note that orders can be partially matched. -BTCPay ----------------------------------------- +## BTCPay + *Create and broadcast a `BTCpay` message, to settle an Order Match for which you owe* BTC Pay has been disabled in Counterwallet, but remains available in the @@ -147,10 +163,8 @@ CLI (and API). * --order-match-id = the underscore-separated concatenation of the hashes of the two transactions which compose the order match * --fee = the exact BTC fee to be paid to miners - - btcpay --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns \ - --order-match-id=092f15d36786136c4d868c3335_6ec3c9b5a0c77de54ed0e96a8dbdd8af160c23 + --order-match-id=092f15d36786136c4d868c3335_6ec3c9b5a0c77de54ed0e96a8dbdd8af160c23 Order Match ID can be obtained with the `pending` command. The source address of BTC sell has 20 blocks (or approximately 200 minutes) after his offer has been matched) to send @@ -160,8 +174,8 @@ receive several confirmations because BTC cannot be escrowed by the Counterparty Use the `pending` command to display own DEx order matches that require BTCpay and make sure you use the correct `source` address to fund each pending BTCpay. -Issuance ------------------------- +## Issuance + *Issue a new asset, issue more of an existing asset or transfer the ownership of an asset.* * --source = the source address @@ -180,11 +194,11 @@ cannot happen in the same transaction. issuance --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns --quantity=100 \ - --asset='BBBQ' --divisible + --asset='BBBQ' --divisible + +## Destroy -Destroy ------------- *Destroy a quantity of a Counterparty asset* * --source = the source address @@ -196,8 +210,7 @@ Destroy This command is not yet implemented (enabled). -Broadcast ----------------------------------------- +## Broadcast *Broadcast textual and numerical information to the network.* @@ -210,7 +223,7 @@ Broadcast broadcast --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns --text="Bitcoin price feed" \ - --value=825.22 + --value=825.22 **Note:** for some users counterparty-cli has trouble parsing spaces in the @@ -221,8 +234,8 @@ situation where double quotes may be required on Windows is filtering (e.g. `--filter "source" "=" "mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns"`). -Bet (Equal/Not Equal) ----------------------------------------- +## Bet (Equal/Not Equal) + *Offer to make a bet on the value of a feed* * --source = the source address @@ -245,13 +258,12 @@ the bet is based on the first feed update after the deadline timestamp of February 3, 2014 1:39 PM US Eastern Standard Time (UTC-0500). bet --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns \ - --feed-address=n3BrDB6zDiEPWEE6wLxywFb4Yp9ZY5fH --bet-type=Equal \ - --deadline=2014-02-03T13:39:00-0500 --wager=1 --counterwager=2 \ - --target-value=1 --expiration=100 + --feed-address=n3BrDB6zDiEPWEE6wLxywFb4Yp9ZY5fH --bet-type=Equal \ + --deadline=2014-02-03T13:39:00-0500 --wager=1 --counterwager=2 \ + --target-value=1 --expiration=100 +## Cancel -Cancel ----------------------------------------- *Cancel an open order or bet you created* * --source = the source address @@ -261,11 +273,10 @@ Cancel cancel --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns \ - --offer-hash=092f15d36786136c4d868c33356ec3c9b5a0c77de54ed0e96a8dbdd8af160c23 + --offer-hash=092f15d36786136c4d868c33356ec3c9b5a0c77de54ed0e96a8dbdd8af160c23 +## Dividend -Dividend ----------------------------------------- *Pay dividends to the holders of an asset (in proportion to their stake in it)* * --source = the source address @@ -280,11 +291,11 @@ will list all of the shareholders (and their holdings) of ASSET. dividend --source=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns --quantity-per-share=1 \ - --asset=MULTIPOOLSTOCK + --asset=MULTIPOOLSTOCK + +## Asset -Asset ----------------------------------------- *The `asset` action displays the basic properties of a given asset.* asset=[asset] @@ -295,26 +306,25 @@ To lock an asset, the command is: issuance --source=[source] --asset=[asset] --description="LOCK" -Balances ----------------- +## Balances + *The `balances` action displays the balances of an address.* balances --address=mtQheFaSfWELRB2MyMBaiWjdDm6ux9Ezns -Wallet ------------ +## Wallet + *The `wallet` action lists the addresses in your backend wallet along with their balances in all assets.* -Pending ------------ +## Pending + *The `pending` action lists pending order matches awaiting payment from you.* -Getrows ---------- +## Getrows *The `getrows` action gets rows from a Counterparty table.* @@ -334,7 +344,7 @@ Getrows getrows --table balances --filter 'address' '=' 'muQjaj46wghHprjSjpgU7D55JxKyK5dJtZ' getrows --table balances --filter 'address' '=' 'muQjaj46wghHprjSjpgU7D55JxKyK5dJtZ' \ - --filter 'asset' '=' 'BBBQ' --filter-op OR + --filter 'asset' '=' 'BBBQ' --filter-op OR Windows users may need to make changes to handle console quirks. On Windows 10, the double quotes work fine: ` --filter "address" "=" "muQjaj46wghHprjSjpgU7D55JxKyK5dJtZ"`. @@ -343,14 +353,13 @@ Note that balances (quantities) for divisible assets such as XCP are stored and Hence, an address with 4 XCP and 4 INDIVISIBLE may show their respective balances as 400,000,000 and 4 (which would be the case if INDIVISIBLE wasn't a divisible asset). +## GetInfo -GetInfo ---------- *The `getinfo` action gets the current state of the server.* -Get_TX_Info ---------- +## Get_TX_Info + *Display information about an unsigned raw transaction* The `get_tx_info` command displays information about an unsigned raw transaction. Some destinations (e.g. P2SH addresses) are not supported by this command. @@ -360,8 +369,7 @@ The `get_tx_info` command displays information about an unsigned raw transaction get_tx_info=[tx_hex] -Input and Output ----------------------------------------- +## Input and Output - Quantities of divisible assets are written to eight decimal places. - Quantities of indivisible assets are written as integers. @@ -372,8 +380,8 @@ Input and Output "raw" values (amounts) using internal representation -Optional arguments ----------------------------------------- +## Optional arguments + This list contains some optional arguments for counterparty-client. A complete list for client and server is available in online help. * -h, --help = show help message and exit diff --git a/UI/Counterwallet_Tutorials/README.md b/UI/Counterwallet_Tutorials/README.md new file mode 100644 index 00000000..b9b5a546 --- /dev/null +++ b/UI/Counterwallet_Tutorials/README.md @@ -0,0 +1,79 @@ +# Counterwallet Tutorials + +## TOC + +- [Getting Started](#getting-started) +- [Addresses](#addresses) + - [Create Addresses](#create-addresses) + - [Show QR Code](#show-qr-code) +- [Create Token](#create-token) + - [Change Token Settings](#change-token-settings) + - [Pay Distribution](#pay-distribution) +- [Get Token Info](#get-token-info) +- [Buy and Sell Assets on the DEX](#buy-and-sell-assets-on-the-dex) + - [Trading on the DEX](#trading-on-the-dex) +- [Broadcast](#broadcast) +- [Multisig](#multisig) + +## Getting Started + +- [Creating a Wallet](getting_started_cw.md#creating-a-wallet) +- [Sending and receiving BTC, XCP, and user-created tokens](getting_started_cw.md#sending-and-receiving-btc-xcp-and-user-created-tokens) +- [Logging in without a keyboard (to avoid malware)](getting_started_cw.md#logging-in-without-a-keyboard-to-avoid-malware) + +## Addresses + +### Create Addresses + +- [Address Types](create_addresses.md#address-types) + - [Creating a regular address](create_addresses.md#creating-a-regular-address) + - [Creating a watch-only address](create_addresses.md#creating-a-watch-only-address) +- [Displaying the private key of your address](create_addresses.md#displaying-the-private-key-of-your-address) +- [Customizing the appearance of your addresses](create_addresses.md#customizing-the-appearance-of-your-addresses) + +### Show QR Code + +- [Show QR Code](show_qr_code.md) + +## Create Token + +- [Create Tokens](create_token.md) + +### Change Token Settings + +- [Issue additional tokens](change_token_settings.md#issue-additional-tokens) +- [Lock your token](change_token_settings.md#lock-your-token) +- [Change description](change_token_settings.md#change-description) +- [Transfer ownership](change_token_settings.md#transfer-ownership) + +### Pay Distribution + +- [Example](pay_distribution.md#for-example) +- [BTC Distributions](pay_distribution.md#btc-distributions) +- [How to make a Distribution Payment in Counterwallet](pay_distribution.md#how-to-make-a-distribution-payment-in-counterwallet) + +## Get Token Info + +- [Information on tokens you already have](get_token_info.md#tokens-you-already-have) +- [Information about any token](get_token_info.md#information-about-any-token) + +## Buy and Sell Assets on the DEX +- [Summary](buy_and_sell_assets_on_the_dex.md#summary) +- [Walk-throughts](buy_and_sell_assets_on_the_dex.md#walk-throughts) + - [Buy](buy_and_sell_assets_on_the_dex.md#buy) + - [Sell](buy_and_sell_assets_on_the_dex.md#sell) + +### Trading on the DEX + +- [Trading on the Decentralized Exchange](trade.md) + +## Broadcast + +- [How to broadcast info to Dogecoin Blockchain](broadcast.md#how-to-publish-a-broadcast-in-counterwallet) + +## Multisig + +- [Creating a 2-of-3 multisig address:](multisig_counterwallet.md#creating-a-2-of-3-multisig-address) +- [To Receive BTC or a Counterparty asset to the multisig address:](multisig_counterwallet.md#to-receive-btc-or-a-counterparty-asset-to-the-multisig-address) +- [To Send BTC or a Counterparty asset from the multisig address:](multisig_counterwallet.md#to-send-btc-or-a-counterparty-asset-from-the-multisig-address) + diff --git a/UI/Counterwallet_Tutorials/broadcast.md b/UI/Counterwallet_Tutorials/broadcast.md index 4eb943f0..920fbf02 100644 --- a/UI/Counterwallet_Tutorials/broadcast.md +++ b/UI/Counterwallet_Tutorials/broadcast.md @@ -1,22 +1,21 @@ -Broadcast information on the Bitcoin blockchain ---------------------------- +# Broadcast information on the Dogecoin blockchain -Counterparty lets you publish text and data on the Bitcoin blockchain, this is called a 'broadcast'. This is useful for proof-of-publication, notary purposes, and creating betting feeds and oracles. This information is timestamped (as blocks), freely browseable and permanently stored on the Bitcoin blockchain. You can view and search broadcasts on a block explorer such as [XChain](https://xchain.io/broadcasts): +Counterparty lets you publish text and data on the Dogecoin blockchain, this is called a 'broadcast'. This is useful for proof-of-publication, notary purposes, and creating betting feeds and oracles. This information is timestamped (as blocks), freely browseable and permanently stored on the Dogecoin blockchain. You can view and search broadcasts on a block explorer such as [XChain](https://xchain.io/broadcasts): -![](/_images/broadcast1.png) +![](../../_images/broadcast1.png) -### How to publish a broadcast in Counterwallet +## How to publish a broadcast in Counterwallet **Click address actions and Feed Broadcast.** -![](/_images/broadcast2.png) +![](../../_images/broadcast2.png) **Enter the text or data you want to publish on the BTC blockchain. Note: The fields for fee and value are only used when creating a betting feed, you can leave the default values if you only wish to publish information.** -**Note: The fields for fee and value are only used when creating a betting feed, you can leave the default values if you only wish to publish information. "Broadcast Date" (date picker) has no effect here (because timestamping is done by bitcoin miners) and may be removed in a future version.** +**Note: The fields for fee and value are only used when creating a betting feed, you can leave the default values if you only wish to publish information. "Broadcast Date" (date picker) has no effect here (because timestamping is done by Dogecoin miners) and may be removed in a future version.** -![](/_images/broadcast3.png) +![](../../_images/broadcast3.png) -**Wait for the Bitcoin network to confirm your broadcast, and it will be visible online.** +**Wait for the Dogecoin network to confirm your broadcast, and it will be visible online.** -![](/_images/broadcast4.png) +![](../../_images/broadcast4.png) diff --git a/UI/Counterwallet_Tutorials/buy_and_sell_assets_on_the_dex.md b/UI/Counterwallet_Tutorials/buy_and_sell_assets_on_the_dex.md index 13ce44c3..9aba94a6 100644 --- a/UI/Counterwallet_Tutorials/buy_and_sell_assets_on_the_dex.md +++ b/UI/Counterwallet_Tutorials/buy_and_sell_assets_on_the_dex.md @@ -1,7 +1,16 @@ -#Buy and sell assets (tokens) on the DEx using XCP +# Buy and sell assets (tokens) on the DEx using XCP This tutorial takes you through the process of buying and consequently selling a Counterparty-issued asset (or token/coin) from Counterwallet. By "Counterparty-issued" we mean "issued on the Counterparty platform by its users" as the Counterparty Project does not issue assets (XCP is the only asset that was issued by the Project). +## TOC + +- [Summary](#summary) +- [Walk-throughts](#walk-throughts) + - [Buy](#buy) + - [Sell](#sell) + +## Summary + First, let's summarize how things work: 1. All Counterparty assets can be traded on the Counterparty Decentralized Exchange and most Counterwallet sellers denominate their asset in XCP.  It is possible, but rare, to sell your asset A for another asset B, although that may be interesting in some cases. Some main advantages of decentralized crypto-exchanges are obviously decentralization (no counterparty risk) and a lower cost of filled orders. @@ -18,6 +27,8 @@ c) Understand the fees (see [What is the difference between Total and Real Esti d) Place a buy order on the DEx. If your offer gets matched within the duration of your order, your it will be settled. Otherwise it'll fail.  In case you change your mind or prices change, you can **cancel **your order before it expires (see [When is an order considered "active" and how can I cancel it?](https://counterpartytalk.org/t/when-is-a-dex-order-considered-active-and-how-can-i-cancel-it/1180)) +## Walk-throughts + Now that we covered the basics, let's walk through buy and sell scenarios. Before we move on let's remind ourselves that the default order validity (which can be changed in Counterwallet **Settings** and which does not persist between logons) is 1000 blocks of the Bitcoin blockchain, so if you trade in unstable assets you may want to change that to a lower value or even switch to a centralized crypto-exchange where it normally doesn't cost anything to place (and cancel) an order. See KB articles under 3d (above) for additional details. @@ -30,18 +41,18 @@ If not, move to the right and under **Select Another Pair **start typing the a Here we keep it simple and look for TESTASSETONE/XCP. -![](/_images/counterparty-dex-find-asset-to-buy1.jpg) +![](../../_images/counterparty-dex-find-asset-to-buy1.jpg) Once you click on TESTASSETONE, you will see the market. If it's any liquid, you'll see some buy and sell orders. We're buying so we're looking for Sell orders. At the very bottom of the screen we can see one sell offer: somebody is selling 22 TESTASSETONE in exchange for 2.2 XCP.   -![](/_images/counterparty-dex-select-sell-offer.jpg) +![](../../_images/counterparty-dex-select-sell-offer.jpg) If you're happy with that price, simply click on it and Counterwallet will populate your Buy Order form. Make sure the price is acceptable because matched orders cannot be cancelled! (It is not rare to hear that someone paid 0.001 for an asset that normally costs 0.0001.) A populated buy form can be modified (**Price, Amount**). Visually inspect all fields (especially if **Total** is a large number) to make sure one last time and then press the Buy button. -![](/_images/counterparty-dex-populate-buy-order.jpg) +![](../../_images/counterparty-dex-populate-buy-order.jpg) Now your order will remain valid until it's matched, cancelled or expired (whichever comes faster - see related KB mentioned under 3d, above).  diff --git a/UI/Counterwallet_Tutorials/change_token_settings.md b/UI/Counterwallet_Tutorials/change_token_settings.md index b1973751..3a2ae9e2 100644 --- a/UI/Counterwallet_Tutorials/change_token_settings.md +++ b/UI/Counterwallet_Tutorials/change_token_settings.md @@ -1,33 +1,32 @@ -Change Token Settings ---------------------------- +# Change Token Settings Once you have created a token, the address you have used will automatically be the owner of this token. This means that you will have access to certain token settings that can be changed. You can access these settings in Counterwallet by pressing the down arrow on the token's box. -![](/_images/change_token_settings1.png) +![](../../_images/change_token_settings1.png) -**With ownership of a token you can:** -* change the token description -* issue additional units of your token -* lock the token in order to permanently prevent more unit from being issued -* transfer ownership of the token +## Ownership Capabilities -### Issue additional tokens +- [Issue additional tokens](#issue-additional-tokens) +- [Lock your token](#lock-your-token) +- [Change description](#change-description) +- [Transfer ownership](#transfer-ownership) + +## Issue additional tokens If your token is not locked, you will be able to issue additional units of your token to increase supply. Click "Issue Additional" to do so. This action is irreversible, but tokens can be sent to an unspendable address to effectively 'destroy' them if needed. -![](/_images/change_token_settings2.png) +![](../../_images/change_token_settings2.png) -### Lock your token +## Lock your token If you would like to create a verifiably finite token, you will have to lock your token to prevent more units from being issued. Click "Lock Token Issuance" to do so. This action is irreversible. -![](/_images/change_token_settings3.png) +![](../../_images/change_token_settings3.png) -### Change description +## Change description You can change the description of your token as often as you like. This will be publicly viewble in the blockchain. If you would like to add images, and additional information in your description, click [here](../../Counterwallet/enhanced_asset_info.md) -![](/_images/change_token_settings4.png) - +![](../../_images/change_token_settings4.png) -### Transfer ownership +## Transfer ownership You can transfer ownership, and therefore control over issuance and description, of your token. Please keep in mind this action takes some time, and is irreversible. -![](/_images/change_token_settings5.png) +![](../../_images/change_token_settings5.png) diff --git a/UI/Counterwallet_Tutorials/create_addresses.md b/UI/Counterwallet_Tutorials/create_addresses.md index f28a2951..d9cf61b4 100644 --- a/UI/Counterwallet_Tutorials/create_addresses.md +++ b/UI/Counterwallet_Tutorials/create_addresses.md @@ -1,8 +1,15 @@ -Creating a new address ---------------------------- +# Creating a new address Counterwallet uses regular Bitcoin addresses, and you can create up to 20 in each wallet. If you need more, it is recommended and more secure if you create a new passphrase. +- [Address Types](#address-types) + - [Creating a regular address](#creating-a-regular-address) + - [Creating a watch-only address](#creating-a-watch-only-address) +- [Displaying the private key of your address](#displaying-the-private-key-of-your-address) +- [Customizing the appearance of your addresses](#customizing-the-appearance-of-your-addresses) + +## Address Types + **Counterwallet supports the creation of several different kinds of addresses:** - Regular Address @@ -14,36 +21,36 @@ Counterwallet uses regular Bitcoin addresses, and you can create up to 20 in eac It is very simple to create addresses, just click "Create New Address". -![](/_images/create_addresses1.png) +![](../../_images/create_addresses1.png) You can create descriptions for your addresses. However, keep in mind that this information is not stored on the blockchain. Only you will be able to see the descriptions on your addresses. -![](/_images/create_addresses2.png) +![](../../_images/create_addresses2.png) ### Creating a watch-only address If you would like to monitor the BTC, XCP and asset balance of any address, you can create a watch-only address. This means that you will be able to see the balance, and create raw transactions. However, there is no private key associated with such addresses. This means that you will have to sign any transactions manually. This feature is useful for keeping track of your cold-storage coins. -![](/_images/create_addresses3.png) +![](../../_images/create_addresses3.png) -### Displaying the private key of your address +## Displaying the private key of your address If you would like to show the private key of an address, click address actions and show private key. If you cannot access Counterwallet for whatever reason, you can also generate your addresses and keys from your passphrase. For example, by using [this tool](https://blockscan.com/tool_generatekey). It's entirely client-side javascript. The source code is publicly visible, and you can even run it offline. -![](/_images/create_addresses4.png) +![](../../_images/create_addresses4.png) Then you will be asked to confirm, to make sure nobody can see your screen. -![](/_images/create_addresses5.png) +![](../../_images/create_addresses5.png) -### Customizing the appearance of your addresses +## Customizing the appearance of your addresses Click the square next to address actions in order to set a color for your address. -![](/_images/create_addresses6.png) +![](../../_images/create_addresses6.png) Click the - or + respectively next to the square in order to minimize or maximize the display of your address, for more space on your screen. -![](/_images/create_addresses7.png) +![](../../_images/create_addresses7.png) diff --git a/UI/Counterwallet_Tutorials/create_token.md b/UI/Counterwallet_Tutorials/create_token.md index 172c9072..0539702b 100644 --- a/UI/Counterwallet_Tutorials/create_token.md +++ b/UI/Counterwallet_Tutorials/create_token.md @@ -1,5 +1,4 @@ -Create a Token/Asset ---------------------------- +# Create a Token/Asset Counterwallet makes it possible for anyone to create tokens (also known as assets, coins, derivatives) that are then owned by the address they were issued from. Ownership enables you to issue more units of your token, lock the supply, change the description, and customize other settings. To learn more about token settings, click [here](change_token_settings.md). @@ -7,17 +6,24 @@ Once the issuance is confirmed by the Bitcoin network, your tokens can be freely Tokens can be divisible or indivisible. Tokens that are not divisible will only exist in whole units (1,2,3,etc.) Divisible tokens support up to 8 decimal places. You can create as many tokens as you need. -### There are two types of tokens: +## TOC -**Alphabetical** +- [Token Types](#token-types) + - [Alphabetical](#alphabetical) + - [Numeric](#numeric) +- [Creating a token](#creating-a-token) + +## Token Types + +### Alphabetical Alphabetical tokens (for example BACON) can be named, but must be between 4 and 12 uppercase letters and cannot start with A. To create an alphabetical token, you will need enough BTC for a transaction fee and 0.5 XCP on the address you are using. This is an anti-spam fee, which aims to reduce the amount of names a single individual can register without significant costs. The anti-spam fee is burned (destroyed). -**Numeric** +### Numeric Numeric (or more precisely alphanumeric) tokens (for example A12149713090358620000) are free to register and only require a Bitcoin transaction fee (like all other Counterwallet actions) on the issuing address. If you only want to create and trade numeric tokens, you will not require any XCP. Numeric tokens must start with an "A". -### Creating a token is fairly simple: +## Creating a token * Log in to or create a wallet in Counterwallet * Make sure your addresss has enough BTC for a transaction fee (currently 0.0002 BTC) @@ -25,10 +31,10 @@ Numeric (or more precisely alphanumeric) tokens (for example A121497130903586200 * Click *"Address Actions"* on your address * Click *"Create a Token/Asset"* -![](/_images/create_token1.png) +![](../../_images/create_token1.png) * Choose a type, description, quantity and divisiblity for your token. You can create a description for your token, which can either be plain text, a URL to your token’s official page, or a URL to a JSON file containing extended info. To learn more about extended info, look for information for Counterparty Enhanced Asset Info. It is also possible to register a token with an issuance of 0 units, as a placeholder. -![](/_images/create_token2.png) +![](../../_images/create_token2.png) diff --git a/UI/Counterwallet_Tutorials/get_token_info.md b/UI/Counterwallet_Tutorials/get_token_info.md index f0dd1de2..ec628123 100644 --- a/UI/Counterwallet_Tutorials/get_token_info.md +++ b/UI/Counterwallet_Tutorials/get_token_info.md @@ -1,25 +1,30 @@ -Get Token Information ---------------------------- +# Get Token Information + **Disclaimer:** All token information is provided by the creator and/or owner of the individual token and may not be accurate or up to date. Changing this information is an exclusive privilege of the address which owns the token on the blockchain. _All_ counterparty tokens are stored entirely in the Bitcoin blockchain and cannot be limited, restricted, or altered by anyone except their owner in any shape or form. -### Showing information about a token you already have +## TOC + +- [Tokens you already have](#tokens-you-already-have) +- [Information about any token](#information-about-any-token) + +## Tokens you already have If you would like to learn more about a token you have, click on the down arrow in the token's box and then "Show Info". -![](/_images/get_token_info1.png) +![](../../_images/get_token_info1.png) You will then be able to see basic information about the token such as the description, total issuance, whether it is locked or divisible, and a brief history of the token. -![](/_images/get_token_info2.png) +![](../../_images/get_token_info2.png) -### Showing information about any token +## Information about any token If you want to see the information of any token at all even if you are logged out, then you can use a [block explorer](https://xchain.io) to search for the token. -![](/_images/get_token_info3.png) +![](../../_images/get_token_info3.png) Here you will find a full overview of the token, as well as its holders, dividends, updates and dex orders. -![](/_images/get_token_info4.png) +![](../../_images/get_token_info4.png) In order to find out whether a token is legitimate, it is a good idea to check the comments section in the block explorer, the token's official website, and social media such as [Bitcointalk](http://bitcointalk.org). diff --git a/UI/Counterwallet_Tutorials/getting_started_cw.md b/UI/Counterwallet_Tutorials/getting_started_cw.md index 86bba6bf..4b81cee2 100644 --- a/UI/Counterwallet_Tutorials/getting_started_cw.md +++ b/UI/Counterwallet_Tutorials/getting_started_cw.md @@ -1,65 +1,67 @@ -Getting started with Counterwallet ---------------------------- +# Getting started with Counterwallet +- [Creating a Wallet](#creating-a-wallet) +- [Sending and receiving BTC, XCP, and user-created tokens](#sending-and-receiving-btc-xcp-and-user-created-tokens) +- [Logging in without a keyboard (to avoid malware)](#logging-in-without-a-keyboard-to-avoid-malware) Counterwallet is an open-source web wallet for Bitcoin and Counterparty. It uses regular Bitcoin addresses, and lets you store Bitcoin, XCP, and user-created tokens without having to trust a server. What makes it different from many other web wallets, is that the _only_ possible way to access a wallet is by having access to the passphrase. In Counterwallet, none of your private information ever leaves your PC. For extra security, Counterwallet also supports watch-only addresses, offline transaction signing, and [Armory](https://bitcoinarmory.com/). -### Creating a Wallet +## Creating a Wallet You can create as many wallets as you like. -![](/_images/getting_started_cw1.png) +![](../../_images/getting_started_cw1.png) Your account in Counterwallet is secured by a 12 word passphrase. In fact, this passphrase _is_ your wallet itself. Every word in this phrase represents a number. Your browser places this passphrase into a math equation and gets a list of Bitcoin addresses and private keys as the result. If the passphrase is the same, you can always calculate the same addresses and keys. You can do this even if Counterwallet is offline. This means that your passphrase, your addresses and your private keys are never sent anywhere. This also makes it extremely important to keep your passphrase safe, as it cannot be restored by anyone. Please ensure that you have written it down correctly. Remember that once you close your browser, the only place this passphrase exists is the paper in your hand. -![](/_images/getting_started_cw2.png) +![](../../_images/getting_started_cw2.png) After you have written down your passphrase, the next dialog will give you an option to create a custom quick access URL. This will make it possible to access your wallet with a password of your choosing, by encrypting your passphrase as a link. This feature is best used for wallets with a low amount of funds that need to be accessed very frequently. When logging in with a quick URL, you will only need to enter your password (and can avoid writing the 12 word passphrase every time). -![](/_images/getting_started_cw3.png) +![](../../_images/getting_started_cw3.png) When you type a password, the URL will automatically adapt to be accessible for that password. Write the URL for your desired password down, and verify that it is correct by entering the same password again. -![](/_images/getting_started_cw4.png) +![](../../_images/getting_started_cw4.png) You can log in to your wallet by writing your passphrase, and pressing open wallet. The open wallet button will only become active once you have entered a valid passphrase. -![](/_images/getting_started_cw5.png) +![](../../_images/getting_started_cw5.png) If this is your first time logging in, you will have to agree to the terms and conditions of service. Some features may not be permitted in your country or jurisdiction. U.S. users cannot use dividend or betting functionality by default, for example. This is not a technical limitation, and can be disabled if you run your own Counterwallet, but bare in mind that legal difficulties may arise. We hope that U.S. regulation will become more clear on this matter. -![](/_images/getting_started_cw6.png) +![](../../_images/getting_started_cw6.png) One important thing to know before getting started is that when you perform an action in Counterwallet (i.e. place an order, create a token, etc), it doesn't take effect immediately as it must first be confirmed on the Bitcoin blockchain. Counterwallet lets you know this by displaying your actions under the Pending Actions panel (the Clock icon on the top bar), and then moving them to the Notifications panel (the Checkbox icon) automatically once the network has successfully confirmed them. You'll also see the future expected value in parenthesis next to the current balance to better alert you that the change is pending. Note that depending on the speed at which blocks are solved, it could take anywhere from 2 to 40 minutes for your actions to be confirmed. -### Sending and receiving BTC, XCP, and user-created tokens +## Sending and receiving BTC, XCP, and user-created tokens -![](/_images/getting_started_cw7.png) +![](../../_images/getting_started_cw7.png) **One Bitcoin address will be automatically visible once you have created your wallet.** You can learn how to create more [here](create_addresses.md) and if you would like create an Armory address, you can read more about that [here](create_armory_address.md). -![](/_images/getting_started_cw8.png) +![](../../_images/getting_started_cw8.png) You can send and receive both bitcoin and Counterparty tokens with it. To start using the wallet, simply send some BTC or XCP to the address (just single click on the address string itself to select it, then copy that text, which you can then give to others or use to send funds to). To send, click the down arrow button on BTC, XCP, or any user created token to show the drop-down menu. Then click send. -![](/_images/getting_started_cw9.png) +![](../../_images/getting_started_cw9.png) Enter the address you wish to send to, and your desired amount. The "MAX" button will send the entire balance of your sending address, minus the fees necessary for the transfer. Press send to sign and broadcast the transaction. The transfer will be complete once it is verified by the Bitcoin network. -![](/_images/getting_started_cw10.png) +![](../../_images/getting_started_cw10.png) -### Logging in without a keyboard (to avoid malware) +## Logging in without a keyboard (to avoid malware) If you are worried about some form of malware reading your keyboard strokes, or cannot use a keyboard, it is possible to to use the on-screen keyboard to login. Simply click the blue keyboard icon to the right of the open wallet button. -![](/_images/getting_started_cw11.png) +![](../../_images/getting_started_cw11.png) Then click on the text field of Word 1 to start typing. Note that this process is rather time consuming. Use it if you are worried or have reason to believe your computer has been compromised, and you need to move your coins. -![](/_images/getting_started_cw12.png) +![](../../_images/getting_started_cw12.png) diff --git a/UI/Counterwallet_Tutorials/multisig_counterwallet.md b/UI/Counterwallet_Tutorials/multisig_counterwallet.md index ce37e899..c8664615 100644 --- a/UI/Counterwallet_Tutorials/multisig_counterwallet.md +++ b/UI/Counterwallet_Tutorials/multisig_counterwallet.md @@ -4,6 +4,12 @@ Counterparty and Counterwallet support a basic form of multisig. Here’s an exa In this example, we’ll use a **2-of-3** multisig. With our multisig support, you may send and receive Bitcoin or any Counterparty asset (including XCP) in Counterwallet. +## TOC + +- [Creating a 2-of-3 multisig address:](#creating-a-2-of-3-multisig-address) +- [To Receive BTC or a Counterparty asset to the multisig address:](#to-receive-btc-or-a-counterparty-asset-to-the-multisig-address) +- [To Send BTC or a Counterparty asset from the multisig address:](#to-send-btc-or-a-counterparty-asset-from-the-multisig-address) + ## Creating a 2-of-3 multisig address: * Create 3 separate Counterwallet accounts. (Each one will normally be owned by a separate person, although this is not a requirement.) * Each new wallet will have 1 Bitcoin/Counterparty address by default. That will be utilized for the multisig diff --git a/UI/Counterwallet_Tutorials/pay_distribution.md b/UI/Counterwallet_Tutorials/pay_distribution.md index 630da802..510b6765 100644 --- a/UI/Counterwallet_Tutorials/pay_distribution.md +++ b/UI/Counterwallet_Tutorials/pay_distribution.md @@ -1,9 +1,12 @@ -How to Proportionally Distribute Funds to Token Holders ---------------------------- +# How to Proportionally Distribute Funds to Token Holders Counterparty natively supports payment distributions. This feature lets you distribute XCP, BTC or any other token to the holders of your own token. You can specify an amount per unit, and everyone who holds units of your own token will receive a proportional amount of the secondary token being distributed. Depending on the way it is used, this can also be referred to as 'dividend payments'. This feature has many clever uses, such as [transparent voting](voting_with_tokens.md). -**For example:** +- [Example](#for-example) +- [BTC Distributions](#btc-distributions) +- [How to make a Distribution Payment in Counterwallet](#how-to-make-a-distribution-payment-in-counterwallet) + +### For example: 1. You create a token TRADEME with 100 total units. 2. You sell 25 TRADEME to user A. @@ -24,18 +27,18 @@ Choose the address which owns the token you want to make a distribution payment **Click address actions, and "Pay Distribution".** -![](/_images/distribution1.png) +![](../../_images/distribution1.png) **Write the name of your token in the first field. You can only distribute funds to a token you have issued or control.** -![](/_images/distribution2.png) +![](../../_images/distribution2.png) **Specify the token to be distributed.** -![](/_images/distribution3.png) +![](../../_images/distribution3.png) **Specify the amount of the token to be distributed per unit ("_share_") and the costs will be displayed. Click "Pay Distribution" and after a while it will be confirmed by the Bitcoin network.** -![](/_images/distribution4.png) +![](../../_images/distribution4.png) **Once the distribution has been confirmed, you will be able to see it on a [block explorer](https://xchain.io). Note that you can only see XCP and asset distributions, while BTC distributions will be visible as BTC transactions.** diff --git a/UI/Counterwallet_Tutorials/show_qr_code.md b/UI/Counterwallet_Tutorials/show_qr_code.md index 19b72733..e5ed6b33 100644 --- a/UI/Counterwallet_Tutorials/show_qr_code.md +++ b/UI/Counterwallet_Tutorials/show_qr_code.md @@ -1,5 +1,4 @@ -Show QR Code for Address ---------------------------- +# Show QR Code for Address A Quick Response code, commonly known as a QR code, is an image containing scannable information. In the context of Bitcoin and Counterparty, QR codes usually represent Bitcoin addresses. (Although private keys can also be displayed as QR codes for paper wallets as well.) QR codes make it easier for users on mobile devices to send BTC, XCP, or user-created assets to your address by using the built-in camera of their device. @@ -9,10 +8,10 @@ In Counterwallet, the QR codes always represent your public address. You can mak **To display the QR code for your address, simply click address actions.** -![](/_images/show_qr_code1.png) +![](../../_images/show_qr_code1.png) **Then click Show QR Code.** -![](/_images/show_qr_code2.png) +![](../../_images/show_qr_code2.png) You can then right-click and save the QR code image for printing, or later use. It is also possible to scale the QR code to a larger size, as long as you preserve the ratio between width and height so that it stays a perfect square. Always leave a white border around the QR code so that it can be scanned correctly. Also make sure that you preserve the contrast of colors: black QR on a white background. diff --git a/UI/Counterwallet_Tutorials/trade.md b/UI/Counterwallet_Tutorials/trade.md index 47c1cf03..996d49b9 100644 --- a/UI/Counterwallet_Tutorials/trade.md +++ b/UI/Counterwallet_Tutorials/trade.md @@ -1,5 +1,4 @@ -Trading on the Decentralized Exchange ---------------------------- +# Trading on the Decentralized Exchange It is possible to trade on the Counterparty decentralized exchange directly inside Counterwallet. You can trade any token against any other token, including XCP. (Trading against BTC is planned for the near future.) @@ -7,7 +6,7 @@ It is possible to trade on the Counterparty decentralized exchange directly insi * **All buy and sell orders are automatically escrowed _in the Bitcoin blockchain_ itself until they are completed.** The Counterparty exchange is decentralized and peer-to-peer. This means that there is never a third party or middleman (such as a server administrator, traditional exchange, clearing house, or bank). This kind of trading is called 'trustless', because you do not have to trust anyone to handle your funds and complete your trade correctly. -![](/_images/trade1.png) +![](../../_images/trade1.png) * Placing and cancelling orders requires the Bitcoin network to confirm these transactions, which may take some time. @@ -24,57 +23,57 @@ Counterparty (the open-source Bitcoin toolkit for financial instruments and mark Click **Exchange** `->` **Markets on the sidebar menu.** -![](/_images/trade2.png) +![](../../_images/trade2.png) You will see the pairs with the most current activity. Clicking on these will forward you to their orderbook. -![](/_images/trade3.png) +![](../../_images/trade3.png) You can also specify a custom token to trade, if it does not appear in the top pairs list. -![](/_images/trade4.png) +![](../../_images/trade4.png) Simply write your token in the field (autocomplete will try to help) and click XCP or other. Most tokens are primarily traded against XCP, but you can trade absolutely any token. If you want to trade a token you have just created, you need have to wait until it has been verified by the Bitcoin blockchain first.) -![](/_images/trade5.png) +![](../../_images/trade5.png) Then you will be able to see a graph showing the price and volume of that token (if there is enough data to display.) -![](/_images/trade6.png) +![](../../_images/trade6.png) Using this interface you can choose which of your addresses you are using to trade, and place orders directly. -![](/_images/trade7.png) +![](../../_images/trade7.png) Below this interface, you can look at the current orderbook for that pair. -![](/_images/trade8.png) +![](../../_images/trade8.png) And below that is a listing of previously completed trades, if there are any. -![](/_images/trade9.png) +![](../../_images/trade9.png) Let's try to buy 10 [LTBCOIN](http://ltbcoin.com/) just as an example. Set your desired price and amount, and press Buy. -![](/_images/trade10.png) +![](../../_images/trade10.png) Counterwallet will ask you to confirm your order to make sure everything is correct. -![](/_images/trade11.png) +![](../../_images/trade11.png) The order will now take some time to become valid and visible, while it is processed by the Bitcoin network. -![](/_images/trade12.png) +![](../../_images/trade12.png) You will be able to see the pending order by clicking the clock in the top left of the screen. -![](/_images/trade13.png) +![](../../_images/trade13.png) If you click the check to the left of the clock, you can see orders that have already been confirmed. -![](/_images/trade14.png) +![](../../_images/trade14.png) After a while, you will be able to see that the order confirmed. And if there is someone selling for the price that you are buying at, the order will be matched and completed automatically. -![](/_images/trade15.png) +![](../../_images/trade15.png) diff --git a/UI/Counterwallet_Tutorials/voting_with_tokens.md b/UI/Counterwallet_Tutorials/voting_with_tokens.md index af97443e..de734f0f 100644 --- a/UI/Counterwallet_Tutorials/voting_with_tokens.md +++ b/UI/Counterwallet_Tutorials/voting_with_tokens.md @@ -24,4 +24,4 @@ If you want to get info about your votes, or other polls, you can use the voting **For [example](http://blockscan.com/vote/FLDCVOTEI):** -![](/_images/voting_with_tokens1.png) +![](../../_images/voting_with_tokens1.png) diff --git a/UI/FAQ-Counterwallet.md b/UI/FAQ-Counterwallet.md index 8b9dc06d..b0a134c3 100644 --- a/UI/FAQ-Counterwallet.md +++ b/UI/FAQ-Counterwallet.md @@ -1,7 +1,23 @@ -Counterwallet FAQ -================== +# Counterwallet FAQ + +- [What is Counterwallet?](#what-is-counterwallet) +- [What are some of Counterwallet's features?](#what-are-some-of-counterwallets-features) +- [Where can I access it?](#where-can-i-access-it) +- [What is an Asset/Token/Coin? How can I store them?](#what-is-an-assettokencoin-how-can-i-store-them) +- [I want to trade a certain asset, is it legitimate?](#i-want-to-trade-a-certain-asset-is-it-legitimate) +- [Is Counterwallet down?](#is-counterwallet-down) +- [Counterwallet is offline. Can I still access my funds?](#counterwallet-is-offline-can-i-still-access-my-funds) +- [How does Counterwallet make profit?](#how-does-counterwallet-make-profit) +- [Can I try Counterwallet on testnet?](#can-i-try-counterwallet-on-testnet) +- [Can I use Counterwallet with Armory?](#can-i-use-counterwallet-with-armory) +- [I logged in and my address is different, and I have no balance! Help!](#i-logged-in-and-my-address-is-different-and-i-have-no-balance-help) +- [I sent BTC to Counterwallet, why doesn't it show up?](#i-sent-btc-to-counterwallet-why-doesnt-it-show-up) +- [Why do I need small amounts of Bitcoin to do things in Counterwallet?](#why-do-i-need-small-amounts-of-bitcoin-to-do-things-in-counterwallet) +- [Does Counterwallet support two-factor authentication?](#does-counterwallet-support-two-factor-authentication) +- [What else do I need to know?](#what-else-do-i-need-to-know) +- [Can I run my own Counterwallet server?](#can-i-run-my-own-counterwallet-server) +- [I want to translate Counterwallet to my language](#i-want-to-translate-counterwallet-to-my-language) -[TOC] ## What is Counterwallet? diff --git a/UI/README.md b/UI/README.md new file mode 100644 index 00000000..daa493f7 --- /dev/null +++ b/UI/README.md @@ -0,0 +1,55 @@ +# Counterparty Documentation: UI + +- [Counterwallet FAQ](FAQ-Counterwallet.md) + - What is Counterwallet? + - What are some of Counterwallet's features? + - Where can I access it? + - What is an Asset/Token/Coin? How can I store them? + - I want to trade a certain asset, is it legitimate? + - Is Counterwallet down? + - Counterwallet is offline. Can I still access my funds? + - How does Counterwallet make profit? + - Can I try Counterwallet on testnet? + - Can I use Counterwallet with Armory? + - I logged in and my address is different, and I have no balance! Help! + - I sent BTC to Counterwallet, why doesn't it show up? + - Why do I need small amounts of Bitcoin to do things in Counterwallet? + - Does Counterwallet support two-factor authentication? + - What else do I need to know? + - Can I run my own Counterwallet server? + - I want to translate Counterwallet to my language +- [Counterwallet Tutorials](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/tree/master/UI/Counterwallet_Tutorials) + - [Getting Started](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials/getting_started_cw.md) + - Addresses + - [Create Addresses](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials/create_addresses.md) + - [Show QR Code](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials/show_qr_code.md) + - [Create Token](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials/create_token.md) + - [Change Token Settings](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials/change_token_settings.md) + - [Pay Distribution](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials/pay_distribution.md) + - [Get Token Info](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials/get_token_info.md) + - [Buy and Sell Assets on the DEX](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials/buy_and_sell_assets_on_the_dex.md) + - [Trading on the DEX](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials/trade.md) + - [Broadcast](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials/broadcast.md) + - [Multisig](https://github.com/ShibeFaceSkrill/Dogeparty-XDP_Documentation/blob/master/UI/Counterwallet_Tutorials/multisig_counterwallet.md) +- [Command-line Usage](CLI.md) + - Burn + - Send + - Dispenser + - Order + - BTCPay + - Issuance + - Destroy + - Broadcast + - Bet (Equal/Not Equal) + - Cancel + - Dividend + - Asset + - Balances + - Wallet + - Pending + - Getrows + - GetInfo + - Get_TX_Info + - Input and Output + - Optional arguments + \ No newline at end of file
nameRequiredThe operator name.
descriptionOptionalA longish description about the operator. 2048 characters max.