The flow is divided in four operation:
The exchange in method must be called by a Data Marketplace, which issues and transfers the right amount of token (of its token type) to the user who pays in fiat money
The payment method should transfer the right amount of token from the token types available in the Data Consumer balance, to the Data Provider in exchange of some data
The exchange out method should transfer the right amount of token, from the token available in the Data Provider balance to a data Marketplace in the network in exchange of fiat money
A Data Marketplace can clear the tokens distributed by the other Data Marketplace from its balance
An I3Market user can interact with these operation calling the tokenizer. However, the tokenizer cannot directly sign the transactions, so it needs the I3Market wallet to let users sign and then send a transactions that change the status of the blockchain.
Each call to a treasury smart contract method that writes something on the blockchain (POST endpoint) needs two api:
an API to create the raw transaction for the method that the user want to call (ex. PAyment, Exchange_IN ..)
an API to send the raw transaction, previously signed by the I3Market wallet, to the blockchain.