Wallets
Create a Wallet

Knit API Documentation

Overview

Knit API allows users to create digital currency wallets, supporting a variety of blockchain networks. This powerful feature enables seamless integration of cryptocurrency functionalities into your application, ensuring users can safely manage their digital assets.

Create a Wallet

Endpoint

POST

{{baseUrl}}/api/wallets

This endpoint creates a new wallet for a specified blockchain network. It supports multiple networks, allowing for flexibility in managing different cryptocurrencies.

Supported Networks
  • BITCOIN_MAINNET: For operations on the Bitcoin main network.
  • ETHEREUM_MAINNET: For activities on the Ethereum main network.
  • MATIC_MAINNET: For activities on the Polygon main network
  • TRON_MAINNET: For activities on the Tron main network
Headers
  • X-API-KEY: Your API key for authentication.
  • Accept: Set to application/json to receive responses in JSON format.
Request Body

The request body must be in JSON format specifying the network for which the wallet is being created:

{
    "network": "ETHEREUM_MAINNET"
}
Sample Request

Here's a curl example to create a wallet on the Ethereum main network:

curl --location -g '{{baseUrl}}/api/wallets' \
--header 'X-API-KEY: {{apiKey}}' \
--header 'Accept: application/json' \
--data-raw '{
    "network": "ETHEREUM_MAINNET"
}'
Sample Response

A successful request returns the newly created wallet's details, including its unique ID, network information, and addresses:

Sample Response
{
    "success": true,
    "message": "Wallet created successfully",
    "status": 201,
    "data": {
        "userId": "a2667393-2c6c-43c9-a288-6167e2b2b591",
        "network": "ETHEREUM_MAINNET",
        "networkId": "ETHEREUM_MAINNET",
        "address": "0x1adb0a39bde00fa0957e519584cb5c51fefcb37f",
        "id": "d95143d2-c076-49da-b121-b3beed054bf3",
        "updatedAt": "2024-02-26T13:59:19.000000Z",
        "createdAt": "2024-02-26T13:59:19.000000Z"
    }
}

Description

This API is designed for developers looking to integrate wallet functionalities into their applications or services. It provides an easy-to-use interface for creating wallets on various blockchain networks, thus facilitating the secure management of digital assets. By leveraging this API, developers can offer their users a robust tool for cryptocurrency transactions and asset management.