# Ticket <> multi currency payment ## Entry structures ```rust struct Ticket { seller_address: Address, buyer_address: Address, product_address: Address // This is the product info address } ``` Only valid if accompanied by the signature of the `seller_address`. ## Process - UI: ui from the side of the buyer - TicketDHT: DHT of the dna which the Tickets zome is - BuyerTicket: ticket zome in the buyer node - BuyerTransactor: mutual-credit transactor node in the buyer node - SellerTicket: ticket zome in the buyer node - SellerTransactor: mutual-credit transactor node in the buyer node ```mermaid sequenceDiagram participant UI participant TicketDHT participant BuyerTicket participant BuyerTransactor participant SellerTicket participant SellerTransactor UI-->>BuyerTicket: buy_ticket(payment_info_id) BuyerTicket-->>TicketDHT: get_currency_dna(payment_info_id) TicketDHT-->BuyerTicket: currency_dna_hash BuyerTicket-->>SellerTicket: get_agent_id_on_dna(currency_dna_hash) SellerTicket-->>SellerTransactor: bridge(get_my_agent_id) SellerTransactor-->SellerTicket: agent_id SellerTicket-->BuyerTicket: agent_id BuyerTicket-->>BuyerTransactor: create_offer(agent_id, payment_info.amount) BuyerTransactor-->SellerTransactor: create_offer(payment_info.amount) BuyerTransactor-->BuyerTicket: offer_id BuyerTicket-->>SellerTicket: offer_created(offer_id, payment_info_id) SellerTicket-->SellerTransactor: get_offer(offer_id) SellerTransactor-->SellerTicket: offer SellerTicket-->>TicketDHT: get_payment_info(payment_info_id) TicketDHT-->SellerTicket: payment_info SellerTicket-->>SellerTransactor: get_offer(offer.id) SellerTransactor-->SellerTicket: offer SellerTicket-->SellerTicket: check_offer_amount_matches_payment_info(offer, payment_info) SellerTicket-->>SellerTransactor: check_offer_is_executable(offer_id) SellerTransactor-->SellerTicket: executable_status SellerTicket-->>SellerTransactor: accept_offer(offer) SellerTransactor-->>BuyerTransactor: accept_offer BuyerTransactor-->SellerTransactor: signature SellerTransactor-->SellerTicket: okey SellerTicket-->SellerTicket: create_ticket(buyer_address, product_info_address) SellerTicket-->BuyerTicket: ticket ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up