Skip to main content

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

NameDescription
input
CancelRequest!

The deal kind and Id

cancel_nonce
String!

The nonce you previously received from calling cancelNonce

cancel_signature
String!

The hex personal_sign (keccak256) signature on the cancel_nonce string

user_address
Address!

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

NameDescription
user_address
Address!
request
CancelRequest!

createDeal

Type: ID!

Create either a sale or an offer depending on kind

Arguments

NameDescription
input
DealRequest!

placeBid

Type: Boolean!

Place a bid on an auction deal kind

Arguments

NameDescription
auction_id
ID!
bid
OfferInput!

saleNonce

Type: Int!

A random nonce for sale or offer signature (10 minutes validity)