EnglishDeutsch日本語中文EspañolFrançaisՀայերենNederlandsРусскийItalianoPortuguêsTürkçe포트폴리오 추적기스왑암호화폐가격통합뉴스획득블로그NFT위젯DeFi 포트폴리오 추적기오픈 API24시간 보고서홍보 자료API 문서

Algorand Atomic Transfers

6년 전
상승세:

1

하락세:

0

Figure 1 A conceptual overview of Algorand Atomic Transfers for developers.

Introduction

Atomic Transfers are irreducible batch transactions that allow groups of transactions to be submitted at one time. See Figure 1 above for a conceptual overview. If any of the transactions fail, then all the transactions will fail. That is, an Atomic Transfer guarantees the simultaneous execution of multiple transfers of all kinds of assets. Detailed documentation about this feature is available on Algorand’s developer website here. If you are a database developer this is analogous to database transaction (it all works or none of it works).

In this post we will draw out some of the most important concepts for developers who plan to work with Atomic Transfers. We will list some of the many examples of real-world assets that users can represent with this feature on the Algorand blockchain. Then we will share an example scenario paired with an interactive task to get you started with this new feature on TestNet.

Steps to create Atomic Transfers

  1. Create unsigned transactions and save them to a file
  2. Combine these transactions in to one file
  3. Sign the grouped transactions with all the appropriate keys and submit them

Note that goal and the SDKs include wrappers for these steps.

Figure 2 Diagram shows the steps to create an Atomic Transfer.

Figure 2 above shows the flow of an Atomic Transfer. See implementations in using the Go, Java, JavaScript and python SDKs here. You will find examples for creating group transactions and sending them to the network in each of the available SDKs. For information on installing Go, Java, JavaScript and Python SDKs see Using the SDKs and REST APIs.

The example code at the above link is separated into snippets categorized by these core functions…

Create the Transactions — This is like creating any kind of transaction in Algorand.

Group the Transactions — This involves computing a groupID and assigning that id to each transaction.

Sign the grouped transactions — Sign the grouped transactions with their respective private keys.

Send the transactions to the network — Combine the transactions and send it to the net.

Atomic Transfers Use Cases

Atomic Transfers enables applications such as:

  1. Circular Trades — e.g. Alice pays Bob if and only if Bob pays Clare if and only if Clare pays Alice.
  2. Group Payments — e.g. Either everyone pays or no one does.
  3. Decentralized exchanges — e.g. Atomic multi-party transfers enable trades without trusted intermediaries .
  4. Internal units of accounting — e.g. Several companies can settle their accounts with each other with a single transaction.
  5. Payments — e.g. Payments can be made to multiple recipients.

Interactive Task

Get started with Atomic Transfers click here. See the full task on our forums here

Resources

Atomic Transfers

Atomic Transfers Usage

Algorand Atomic Transfers was originally published in Algorand on Medium, where people are continuing the conversation by highlighting and responding to this story.

6년 전
상승세:

1

하락세:

0

한 곳에서 모든 암호화폐, NFT 및 DeFi 를 관리하세요

시작하는 데 사용하는 포트폴리오를 안전하게 연결하세요.