These docs are for v1.0. Click to read the latest docs for v3.0.
Added

Password Signing Method + Native Token USD Price & More!

Wallet API users can now create a password signing method to lock/unlock their wallets and retrieve the native token's USD price. We have also expanded response bodies for Wallet and NFT API endpoints.

New PASSWORD signing method for your users

In addition to the PIN, EMERGENCY_CODE, and BIOMETRIC signing methods, you can now create a PASSWORD signing method as well. The password signing method can be used like others to unlock a wallet, execute transactions/signatures, update/recover another signing method, etc.

📘

  • The password can contain a combination of alphanumeric characters (letters and numbers) as well as special characters. * Alphanumeric characters can be either uppercase or lowercase letters (A-Z, a-z) and digits (0-9), and special characters.* This allows for stronger and more complex passwords, enhancing security.

The following endpoint is used to create a password singing method for your users:

Request Endpoint: reference

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

Parameter

Param Type

Value

Description

Example Value

Signing-Method

Header

id:value

id: This is the ID of the signing method
value: This is the value of the signing method

756ae7a7-3713-43ee-9936-0dff50306488:123456

Request Params & Request Body:

ParameterParam TypeDescriptionData TypeMandatory
{userId}PathThe ID of the user for whom to create the signing method forString
typeBodyThe type of signing method to create for this user. In this case: PASSWORDString
valueBodyThe password to create.String
{
    "type": "PASSWORD",
    "value": "QWERty123%^&*"
} 

Response Body:

{
    "success": true,
    "result": {
        "id": "4583c952-bd7d-4e3f-8426-be1b3ffb68d7",
        "type": "PASSWORD",
        "incorrectAttempts": 0,
        "remainingAttempts": 3,
        "hasMasterSecret": true
    }
}

Fetch the native token's USD price

The following endpoints now return an exchange object in the response that includes the USD price of your native tokens:

  1. Get all wallets: GET /api/wallets where includeBalance=true
  2. Get native Balance by wallet Id: GET /api/wallets/{walletId}/balance
  3. Get native Balance by Chain and Wallet Address: GET /api/wallets/{secretType}/{walletAddress}/balance

Example Response Body:

Following is an example response when querying the Get native Balance by wallet Id endpoint, where we get back an exchange object in the response.

ParamDescription
exchange.usdPriceThe USD price of one native token
exchange.usdValueThe cumulative USD value of your native token holdings
{
    "success": true,
    "result": {
        "available": true,
        "secretType": "ETHEREUM",
        "balance": 0.001,
        "gasBalance": 0.001,
        "symbol": "ETH",
        "gasSymbol": "ETH",
        "rawBalance": "1000000000000000",
        "rawGasBalance": "1000000000000000",
        "decimals": 18,
        "exchange": {
            "usdPrice": 3060.7453652388544,
            "usdBalanceValue": 3.060745365238854
        }
    }
}

Retrieve the tokenId when you fetch the wallets that own NFTs from a specific contract

The following endpoints now return the tokenId param in the response that indicates the id of the token present in the wallet.

  1. GET /api/contracts/{secretType}/{address}/wallets
  2. GET/api/nonfungibles/{secretType}/{contractAddress}/{tokenId}/wallets

Example response body:

Following is an example response when querying the Get Wallets that contain NFT from a specific Contract endpoint where we get back the tokenId param.

{
    "success": true,
    "pagination": {
        "pageNumber": 1,
        "pageSize": 0,
        "numberOfPages": 0,
        "numberOfElements": 2,
        "hasNextPage": false,
        "hasPreviousPage": false
    },
    "result": [
        {
            "walletAddress": "0x9A9F6A560bBdCFbbb014303fc817D1e5EeaA3AE2",
            "contractAddress": "0xf0b30ec3720e9be1452b64d2ee476f57c2f535d3",
            "tokenBalance": 1,
            "tokenId": 2
        },
        {
            "walletAddress": "0xa1f04C769155195D83c7f16bC6B9540139C80b2A",
            "contractAddress": "0xf0b30ec3720e9be1452b64d2ee476f57c2f535d3",
            "tokenBalance": 1,
            "tokenId": 3
        }
    ]
}

Detailed token info using the Get all token mints endpoint

The response body of the get all token mints endpoint is expanded with some extra fields:

  • contractAddress
  • tokenTypeId
  • tokenId
📘

This change is applicable on both the v2 endpoint and v3 endpoint to get all token mints.

Example V2 Request: reference

GET /api/v2/tokens/mints?page=1&size=10&sortOrder=DESC&sortOn=createdOn&mintIds=05fdd388-bdd0-4d01-a079-806331cc384d

Response Body

{
    "success": true,
    "pagination": {
        "pageNumber": 1,
        "pageSize": 10,
        "numberOfPages": 1,
        "numberOfElements": 1,
        "hasNextPage": false,
        "hasPreviousPage": false
    },
    "sort": {
        "orders": [
            {
                "property": "createdOn",
                "direction": "DESC"
            }
        ]
    },
    "result": [
        {
            "id": "05fdd388-bdd0-4d01-a079-806331cc384d",
            "contractAddress": "0x561fddbaf960f16feead0ec49cfe5e48fbee1f39",
            "tokenTypeId": 1,
            "tokenId": 2,
            "createdOn": "2024-12-19T11:02:24.183445",
            "status": "SUCCEEDED",
            "transactionHash": "0x693927d391d979b4d79a31cb2a7b7f9d508b64b2259077863d6cee2ebea73a10",
            "destination": {
                "address": "0x1221CaAF3b4556Dd3e27ECc72DEBA5d279e97C3F",
                "amount": 1
            }
        }
    ]
}

Example V3 Request: reference

GET /api/v3/erc1155/tokens/mints?page=1&size=10&sortOrder=DESC&sortOn=createdOn&mintIds=1e9e7934-609c-432e-a34c-0488a4daa772

Response Body

{
    "success": true,
    "pagination": {
        "pageNumber": 1,
        "pageSize": 10,
        "numberOfPages": 1,
        "numberOfElements": 1,
        "hasNextPage": false,
        "hasPreviousPage": false
    },
    "sort": {
        "orders": [
            {
                "property": "createdOn",
                "direction": "DESC"
            }
        ]
    },
    "result": [
        {
            "id": "1e9e7934-609c-432e-a34c-0488a4daa772",
            "contractAddress": "0x47c35704343a63a02183988d0c6129812e3e6cab",
            "tokenTypeId": 1,
            "tokenId": 2,
            "createdOn": "2024-12-19T13:38:59.36085",
            "status": "SUCCEEDED",
            "transactionHash": "0x548b05ea6cc6be5cae24c37519e0b8253e0fa3d5ee684d151fa63ef31abc0ec3",
            "destination": {
                "address": "0x893cBC78C1506eFcae82C631499540aEDB6C83BA",
                "amount": 1
            }
        }
    ]
}