Testing Marketplace Workflow

1

Set Authentication Token

You are acting as Data Consumer. First, set your authentication token to access the FAME TM Public API. You can get this token after login to the FAME marketplace (in the browser session storage). This token will be used to authenticate all subsequent API calls.

2

Create Data Offering

Create a new data offering. You can create different types of offerings:

  • Subscription: Access for a time period
  • PAYG (Pay-As-You-Go): Pay per volume of data
  • PAYU (Pay-As-You-Use): Pay per number of downloads
POST /tm/v1.0/offerings
3

Mint Payment Tokens

Mint payment tokens that will be used to purchase data access tokens. This is typically done by the governance module.

POST /tm/v1.0/payment-tokens/mint
4

Approve Payment Tokens

Approve the PaymentToken contract to spend your tokens in the FameBourse contract. This step is required before purchasing data access tokens.

5

Purchase Data Access Token

Generate unsigned transaction to purchase a data access token and presents it to the user. This will allow you to access the data specified in the offering.

6

Check Data Access

Verify that you have the necessary access tokens to access the data. This will check if your purchase was successful.