---
# System prepended metadata

title: Untitled

---

Marketplace Engine architecture



```sequence
title: Kahlo user story sequence (B2B & B2C)
participant RSK
participant IPFS
participant EngineSC
participant IMintSC
participant EngineSDK
participant Owner
Note over Owner: Kahlo
participant Producer
participant Buyer
participant Curator

# B2B
## Create NFT: https://rsklabs.atlassian.net/browse/RMV2-2
Note over Owner: US Create NFT:
Owner->EngineSDK: getAvailableMintContracts
EngineSDK-->Owner: IMintSC[]
Owner->EngineSDK: use mintContracts[]
EngineSDK->>RSK: new CustomMintSC():[]
EngineSDK->EngineSDK: usedMints <- mintContracts
EngineSDK-->Owner: address[]
## List an NFT for sale: https://rsklabs.atlassian.net/browse/RMV2-7
Note over Owner: US List an NFT:
Owner->EngineSDK: getAvailableExchanges
EngineSDK-->Owner: IExchange[]
Owner->EngineSDK: use exchangeContracts[]
EngineSDK->>RSK: new CustomMintSC():[]
EngineSDK->EngineSDK: usedExchanges <- exchangeContracts
EngineSDK-->Owner: address[]
Note over Owner: Deploy Marketplace:
Owner->>RSK: new EngineSC(options)
RSK->>EngineSC: deploy
RSK-->>Owner:


# B2C
## Create NFT: https://rsklabs.atlassian.net/browse/RMV2-2
Note over Producer: US Create NFT:
Producer->Owner: upload product
Owner->EngineSDK: create NFT from product
EngineSDK->IPFS: upload product (opt.)
IPFS-->EngineSDK: hash
Owner->EngineSDK: get usedMints
EngineSDK-->Owner: usedMints[]
Owner->EngineSDK: usedMints[#].call(hash)
EngineSDK->IMintSC: create NFT
IMintSC-->EngineSDK: NFT
EngineSDK-->Owner: NFT
Owner-->>Producer: 
Note over Owner: Opt. manual asset registration
Owner->EngineSDK: Register NFT
EngineSDK->EngineSC: Register NFT
EngineSC-->EngineSDK: assets
EngineSDK-->Owner: assets
Owner-->Producer:
## List an NFT for sale: https://rsklabs.atlassian.net/browse/RMV2-7
Note over Producer: US List an NFT:
Producer->Owner: showAssets
Note left of Owner: if(!producerAccount.assets)
Owner->EngineSDK: getAssets(userAddress)
EngineSDK->EngineSC: getAssets(userAddress)
EngineSC-->EngineSDK: assets[]
EngineSDK-->Owner: assets[]
Owner-->Producer:
Producer->Owner: getAvailableExchanges
Owner->EngineSDK: getUsedExchanges
EngineSDK->EngineSC: verifyExchanges[]
EngineSC-->EngineSDK:
EngineSDK-->Owner: usedExchanges[]
Owner-->Producer: 
Producer->Owner: List Asset with sale method
Owner->EngineSDK: usedExchanges[#].list(assets)
EngineSDK->EngineSC: List Asset
EngineSC-->EngineSDK: cost
EngineSDK-->Owner: cost
Owner-->Producer: cost
Producer->>Owner: confirm listing
Owner->>EngineSDK: confirm
EngineSDK->>EngineSC: confirm
EngineSC-->>EngineSDK:
EngineSDK-->>Owner:
Owner-->>Producer:
```
