text stringlengths 0 1.08k |
|---|
**2)** Then, Bob has the task of acquiring the **necessary information about the contracts.** These data, in the RGB ecosystem, can be sourced through various channels, such as specific websites, e-mails, or Telegram messages, etc, following the [contract issuer](https://docs.rgb.info/glossary#contract-participant)'s c... |
Each of these parts, usually, consists of as little as 200 bytes of data, meaning **a consignment is typically of the order of a few KiBs**. The contract consignment can also be encoded in Base58 format and sent in a format similar to that of a PGP key or as a QR code. This kind of format In the future will also be eas... |
In this regards, it's useful to point out that the RGB ecosystem fosters innovation and competition among various wallets by allowing the freedom to propose new methods of contract interaction and transfer. This openness to experimentation and the adoption of new technologies, such as decentralized, censorship-resistan... |
<figure><img src="https://160813645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaUAGORrT1fl6qzaZSTKt%2Fuploads%2Fgit-blob-0b64c76786aa25feef18112b947435513b26471f%2Ftransfers_0.png?alt=media" alt="Several channels to acquire an RGB contract in the wallet."><figcaption><p><strong>All the various ... |
**3)** Once a contract is obtained in consignment format, Bob is able to import it into his RGB wallet and validate the data contained herein. The next thing he can do is to find someone possessing the contract / asset he is interested in receiving in his wallet. In our example, Alice possesses the asset in her wallet.... |
**4) In order to initiate a transition**, Bob must act first. It does so by **issuing an** [invoice](https://docs.rgb.info/glossary#invoice) that calls the specific **transfer method** encoded in the [Schema](https://docs.rgb.info/glossary#schema) of the contract and which he will hand over to Alice. **This invoice gen... |
```sh |
bob$ rgb invoice <ContractId> --amount 100 |
``` |
**5)** [Invoices](https://docs.rgb.info/glossary#invoice), which are described in more detail in this [chapter](https://docs.rgb.info/invoices#use-of-urls-for-invoices), are generated as simple URL strings and can be transmitted by any means in a manner similar to what we said for consignment. |
<figure><img src="https://160813645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaUAGORrT1fl6qzaZSTKt%2Fuploads%2Fgit-blob-e6e07611dcab0d312249257587a47727d5f13157%2Ftxf1.png?alt=media" alt=""><figcaption><p><strong>The transfer process begins with an invoice prepared by Bob which contains all th... |
**6)** Alice, who has both a Bitcoin wallet and an RGB wallet with a [stash](https://docs.rgb.info/glossary#stash) of client-side validated data, receive the invoice from Bob, which appears to be a string like this: |
* `rgb:2whK8s5O-b1LG4rR-OhXpDq1-SjyHvKx-OhTEFjQ-aba0V_o/RWhwUfTMpuP2Zfx1~j4nswCANGeJrYOqDcKelaMV4zU/BF/bc:utxob:x8H6O_~H-7RyndJZ-CAUUAcF-RJfWg7H-9hew6Zo-pacK97w-gaGhQ` , where Bob's UTXO has been blinded automatically in the generation process (for invoice encoding see the [related chapter](https://docs.rgb.info/annexe... |
**7)** First, Alice prepares a [PSBT](https://docs.rgb.info/glossary#partially-signed-bitcoin-transaction-psbt) transaction which spends the UTXO containing the [seal definition](https://docs.rgb.info/glossary#seal-definition) which assigns the [ownership](https://docs.rgb.info/glossary#ownership) of the RGB asset to h... |
``` |
alice$ wallet construct tx.psbt |
``` |
**8)** Then Alice, through a shell command, is now able to generate [terminal consignment](https://docs.rgb.info/glossary#terminal-consignment-consignment-endpoint) `consignment.rgb` that contains, according to the instruction of Bob's `<invoice>` : |
* The final RGB [state transition](https://docs.rgb.info/glossary#state-transition) client-side data. |
* The history of state transitions since contract [genesis](https://docs.rgb.info/glossary#genesis) and contained in validated form in Alice's stash. |
* The unsigned version of the [witness transaction](https://docs.rgb.info/glossary#witness-transaction), elaborated from the `tx.psbt` file, which: |
* Spend Alice's single-use seal related to the asset being transferred. |
* Contains in some first Opret / Tapret output the [DBC](https://docs.rgb.info/glossary#deterministic-bitcoin-commitment-dbc) commitment related to the state transition to Bob, in addition to necessary "blank" state transitions if some additional assets where defined on the same single-use seal being spent by Alice. |
```sh |
alice$ rgb transfer tx.psbt <invoice> consignment.rgb |
``` |
**9)** This **terminal consignment**, obviously larger than a contract consignment because of the inclusion of the entire history of the asset, **is then forwarded to Bob**, even though the related witness transition has not yet been broadcasted into the Bitcoin P2P Network. |
<figure><img src="https://160813645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaUAGORrT1fl6qzaZSTKt%2Fuploads%2Fgit-blob-67f5128a87f34e7a81a0c5934d8ddcc118f75622%2Ftxf2.png?alt=media" alt=""><figcaption><p><strong>Alice prepares a witness transaction including the information provided both by B... |
**10)** Bob, at this point, using the `rgb accept` command proceeds at validating the transfer consignment. If the validation is successful: |
* Adds all the data to his stash. |
* Produce a signature of the validation process. |
```sh |
bob$ rgb accept consignment.rgb |
sig:DbwzvSu4BZU81jEpE9FVZ3xjcyuTKWWy2gmdnaxtACrS # <— signature over consignment |
``` |
11\) After verifying the data contained in the transfer consignment handed over by Alice, Bob may optionally send to Alice the produced signature `sig:` to Alice, in a so-called *payslip,* which confirms her that Bob: |
* Agrees on the validity of the client-side validated data included in the consignment. |
* Agrees that the witness transaction shall be published. |
12\) Alice, by receiving the payslip: |
* May validate Bob's signature. |
* Publishes the witness transaction contained in the modified `tx.psbt` file using her wallet tool. |
``` |
alice$ rgb check <sig> |
alice$ wallet sign —publish tx.psbt |
``` |
Once published, the witness transaction represents the conclusion of the transfer between Alice and Bob. |
<figure><img src="https://160813645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaUAGORrT1fl6qzaZSTKt%2Fuploads%2Fgit-blob-d81723b89665bba8c1ac2f253211ba68f2817d60%2Ftxf3.png?alt=media" alt=""><figcaption><p><strong>Optionally Bob can sign a payslip which authorizes Alice to broadcast the witness... |
The following diagram represents a summary of all the operations just described: |
<figure><img src="https://160813645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaUAGORrT1fl6qzaZSTKt%2Fuploads%2Fgit-blob-644c6e347ca2524af17c316f062d7ace909fdaf7%2Ftxf_diagram.png?alt=media" alt=""><figcaption><p><strong>Transfer workflow diagram. The signature over consignment id can be option... |
Finally, the following diagram shows an example of transfer interaction between the various elements of the RGB technology stack composed of RGB wallets, RGB nodes, and Electrum Server. |
<figure><img src="https://160813645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaUAGORrT1fl6qzaZSTKt%2Fuploads%2Fgit-blob-c3d76f1207103d3feed7523782b68c0e48205714%2Ftxf_flow.png?alt=media" alt=""><figcaption><p><strong>The transfer process behind the scenes. It requires several round of interact... |
## Features of RGB Transfers |
**The approach adopted by RGB** in transferring consignments between parties, as illustrated in the Alice and Bob example, **underscores the significance of privacy and security**. |
In the ideal case, no one other than Bob and Alice is in possession of the consignment and witness transaction. Nonetheless, Bob has all the elements to verify the validity of the consignment by comparing it with the various anchors on the Bitcoin Blockchain. Bob's stash status is consequently updated through this cons... |
In this regard, it's useful to point out that the **RGB system offers a significant advantage over other digital exchange methods, especially when it comes to complex operations such as atomic swaps.** Atomic swaps, commonly used in various cryptocurrency networks, such as the Lightning network, can present complicatio... |
**RGB simplifies this issue considerably.** Instead of requiring two separate transactions, **RGB allows the direct exchange of one asset against another (e.g., Bitcoin against an RGB asset or an RGB asset against another RGB asset) within a single transaction**. This eliminates the need for a hash code, as both assets... |
In addition, RGB introduces a **mechanism that allows both parties to have complete control over the execution of the transaction**. If the transaction is not published, both parties have the option to do so, ensuring that neither can take advantage at the expense of the other. If both parties fail to publish, the orig... |
*** |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.