Getting started

This guide will help you start with our API to manage your testnet assets, create users, generate wallets, and perform your first crypto transactions. Whether you’re a developer exploring blockchain integration or testing crypto functionalities, this guide will walk you through essential API endpoints, ensuring a smooth experience with TMINTER's platform.

We’ll cover the following key steps:

  • Authenticating your API requests

  • Accessing testnet assets

  • Creating a user and their signing method

  • Generating wallets

  • Transferring funds between wallets

  • Checking transaction status

Prerequisites

First, create a Quantum business account, if you do not have one, you can register in our Developer Portal or read the guide on how to Getting Started with Quantum.

You are required to have your Client ID and Client Secret available, you can get this from the Portal as seen below;

Access Credentials - Developer Portal

You can use tools like Postman or the API Reference documentation to execute these API calls.

1. Authenticating Your API Requests

Access the TMINTER API, requires one to log in with the Client ID and the Client Secret. Such credentials are needed to establish a bearer token that will then validate all of your subsequent API transactions.

Once authenticated, all API requests will use the base URL: https://sandbox.api-tminter.io

For further details on where to obtain your bearer token, check out our Authentication page.

2. Accessing Your Testnet Assets

After signing up for a trial subscription to TMINTER, a Testnet wallet is automatically generated for you, preloaded with the following test assets:

  • 1 TMINTER Testnet Token (Token type ERC20).

  • 100 Quantum Test Tokens

  • 1 Dummy NFT

These assets are associated with your first test user, enabling you to familiarise yourself with TMINTER’s features at once.

💡 Note: The test wallet comes with a default PIN which is 123456

2.1 Retrieve Your User ID and Signing Method

The first action is to get your ‘user ID’ as well as the ‘signingMethodId’. One user of TMINTER can have several wallets at the same time. In this case, the other testnet wallet which is generated automatically is connected to the first user (Test User #1).

To retrieve the user details, use the following API call:

Endpoint: GET /api/users?includeSigningMethods=true

In the response, you will get information about userid and signingmethodid. These should be kept for later use in API requests to be made in the subsequent section.

2.2 Retrieve Wallet ID and Wallet Address

After that, you’re going to need the wallet details associated with the user you have On top of it, you should get the wallet information belonging to the user. This wallet will include the said initial one token of TMINTER.

Endpoint: GET /api/wallets?userId={userId}

The response to this request will include the wallet and wallet address as well as the balance available (1 TMINTER token). You will require these details for the next processes to be followed.

2.3 Checking Your ERC20 Token Balance

Now that you have your wallet, let's check the balance of your testnet tokens: Now that you have your wallet, let's check the balance of your testnet tokens:

Endpoint: GET /api/wallets/{walletId}/balance/tokens

This call will bring the amount of Quantum Test Tokens available in your wallet (100 ERC20).

2.4 Retrieving NFTs

Other than tokens, your wallet will also be loaded with a test NFT. To retrieve it:

Endpoint: GET /api/wallets/{walletId}/nonfungibles

The responses will show the NFT stored in your wallet such as its metadata and corresponding image URLs.

3. Creating a New User

Now, it is time to create a new user in TMINTER. Each new user is a potential of one of your end-users or an entity that would require its own wallet.

Endpoint: POST /api/users

Request Body:

json

Copy code

{

"reference": "Second Test User"

}

Dial this number and in return, you will be given the user ID for this new user.

4. Setting Up a Signing Method

Following a user creation, they require a signing method. It is possible to use a PIN-based signing method for alerting wallet transactions to ensure that they are legitimate.

Endpoint: POST /api/users/{userId}/signing-methods

Request Body:

json

Copy code

{

"type": "PIN",

"pin": "654321"

}

This initiates a PIN signing mechanism for the user where the user will be using the wallet that is to be created.

5. Creating a Wallet

Now, let’s generate a new wallet for this user. A given user can have more than one wallet and these wallets can contain different kinds of cryptocurrencies.

Endpoint: POST /api/wallets

Request Body:

json

Copy code

{

"userId": "{secondUserId}",

"secretType": "TMINTER"

}

For this new wallet, you’ll receive the wallet and the address.

6. Transferring Funds Between Wallets

After getting another or a second wallet, you can transfer money between them. Let’s move some TMINTER tokens from one wallet to another:

Endpoint: POST /api/wallets/{senderWalletId}/transfers

Request Body:

json

Copy code

{

"recipientWalletAddress": "{recipientWalletAddress}",

"amount": "0.5",

"secretType": "TMINTER",

"signingMethodId": "{signingMethodId}"

}

For that, you will receive a transaction ID which shows the transfer has taken place.

7. Checking Transaction Status

To check the status of your transaction, use the following endpoint:

To check the status of your transaction, use the following endpoint:

Endpoint: GET /api/transactions/{transactionId}

It will show the response whether the transaction is still pending, failed, or successfully executed.

Last updated