Mutations
authorizeBasket
Type: AuthorizedBasket!
The backend signs the sale(s)/offer(s) for the user to send to kalaoExchange contract for buying/selling the requested saleID(s)
Workflow of a sale/offer execution:
┌─────┐ ┌───────┐ ┌───────────────────────┐
│Front│ │Backend│ │Exchange Smart Contract│
└──┬──┘ └───┬───┘ └───────────┬───────────┘
│ │ │
│authorizeBasket()│ │
│────────────────>│ │
│ │ │
│ Tickets │ │
│<────────────────│ │
│ │ │
│BulkBuy(Tickets) or bulkOffersAccept(Tickets)│
│─────────────────────────────────────────────>│
┌──┴──┐ ┌───┴───┐ ┌───────────┴───────────┐
│Front│ │Backend│ │Exchange Smart Contract│
└─────┘ └───────┘ └───────────────────────┘
<p style={{ marginBottom: "0.4em" }}><strong>Arguments</strong></p>
<table>
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tbody>
<tr>
<td>
input<br />
<a href="/docs/api-details/inputObjects#basketrequest"><code>BasketRequest!</code></a>
</td>
<td>
</td>
</tr>
</tbody>
</table>
## cancelDeal
**Type:** [CancelStatus!](/docs/api-details/objects#cancelstatus)
Cancel a sale/offer, the user needs to be authentified (cancel Nonce)
Workflow of a sale/offer cancel: The sale/offer can be cancelled by a simple backend call when no tickets are used, otherwise a call to the smart contract is required.
┌─────┐ ┌───────┐┌───────────────────────┐
│Front│ │Backend││Exchange Smart Contract│
└──┬──┘ └───┬───┘└───────────┬───────────┘
│ │ │
│ cancel() │ │
│────────────────────────────────────────────>│ │
│ │ │
│cancelled? yes = OK, no = smart contract call│ │
│<────────────────────────────────────────────│ │
│ │ │
│ if not cancelled => bulkCancel() or bulkOfferCancel() │
│─────────────────────────────────────────────────────────────>│
┌──┴──┐ ┌───┴───┐┌───────────┴───────────┐
│Front│ │Backend││Exchange Smart Contract│
└─────┘ └───────┘└───────────────────────┘
Arguments
Name | Description |
---|---|
inputCancelRequest! | The deal kind and Id |
cancel_nonceString! | The nonce you previously received from calling cancelNonce |
cancel_signatureString! | The hex personal_sign (keccak256) signature on the cancel_nonce string |
user_addressAddress! | The deal creator |
cancelNonce
Type: String!
Get a cancel ownership proof nonce for a non logged in user message with confirm cancel sale xxx with address xxx
Arguments
Name | Description |
---|---|
user_addressAddress! | |
requestCancelRequest! |
createDeal
Type: ID!
Create either a sale or an offer depending on kind
Arguments
Name | Description |
---|---|
inputDealRequest! |
placeBid
Type: Boolean!
Place a bid on an auction deal kind
Arguments
Name | Description |
---|---|
auction_idID! | |
bidOfferInput! |
saleNonce
Type: Int!
A random nonce for sale or offer signature (10 minutes validity)