[DRAFT] What's the Typical Workflow to Use CKB Open Transaction #3671
doitian
started this conversation in
RFC Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Synopsis
First how to start constructing the open transaction?
In my opinion, one party will create an open transaction template. For example, the merchant creates a template that the first input is any cell owned by the merchant locked by Take-All-And-Then, and the first output is a cell with specific address. The template will act the role of address in the simple transfer transaction.
The payer uses an open transaction client to initiate the transaction by taking the template as the input, for example, by scanning the QR code of the template. The client constructs the open transaction from the template by adding payer's cells and signatures and broadcast it to the p2p network.
A service running for the merchant will collect matching open transactions and complete the missing parts. If the transaction need to collect multi-party signatures, the service broadcast the transaction again.
Singers will watch signature requests from the network and sign the transaction after the user approvement.
Roles
User Stories
Maker Story
As a Maker, I can create a transaction template in the open transaction dApp. I will send the template to my clients, for example, via QR code.
Taker Story
As a Taker, I scan the QR code provided by the Maker via the dApp client. The client will collect my live cells, create corresponding outputs, partially sign the transaction, and broadcast it to the open transaction p2p network.
Builder Story
As a Builder, I will watch the p2p network to collect matched open transactions. I'll incrementally build the transaction or join transactions, and then broadcast the outputs to the p2p network.
Signer Story
As a Signer, I will watch the p2p network and create the signing requests queue. If the user approves, I will add the signature and broadcast the outputs to the p2p network.
Committer Story
As a Committer, I will watch the p2p network for open transactions ready to commit. I will generate the final CKB transaction and send it to the CKB node. If the CKB chain accepts the transaction, I will remove the corresponding open transactions, otherwise, I will try to re-create the transaction, or re-broadcast the underlying open transactions.
Beta Was this translation helpful? Give feedback.
All reactions