Skip to content

Rest API

The URL endpoint to CoKeeps Hot Wallet will be shared with you during the integration phase. Throughout this document, <ck_hotwallet_url> will be used as a placeholder to refer to the provided URL.

Please refer to the Data Encryption section for instructions on how to encrypt the request payload and decrypt the response payload.

Utilities

Get Available Chains

This REST API serves to retrieve all available chains and tokens for use across a majority of our operations.

Endpoint: <ck_hotwallet_url>/service/utility/chains

Request payload:

JSON
{} // Empty object

Response payload example:

JSON
{
  "success": true,
  "message": "Available chains",
  "ciphertext": {
    "chains": [
	    // -- Snip --
	    {
	        "id": "bitcoin",
	        "name": "Bitcoin Mainnet",
	        "base": "bitcoin",
	        "currency": "Bitcoin",
	        "symbol": "BTC",
	        "decimals": 8,
	        "token": null
	      }
              // -- Snip --
    ]
  }
}

Validate Address

You can utilize this REST API to validate the address of a chain network.

Endpoint: <ck_hotwallet_url>/service/utility/validate

Request payload:

JSON
{
	"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
	"chain_id": "bitcoin"
}

Response payload example:

JSON
{
  "success": true,
  "message": "OK"
}

Monitor Address

Utilize this REST API to monitor address activity. You'll receive notifications via webhook whenever there's new incoming or outgoing activity.

IMPORTANT

Only addresses generated within the CoKeeps platform can be monitored.

Endpoint: <ck_hotwallet_url>/service/utility/monitor

Request payload:

JSON
{
	"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
	"chain_id": "bitcoin",
	"webhookUrl": "https://ck-webhook.example.com",
    "options": {
        "confirmations": 3,
        "alert": {
            "lowerThan": "0.001",
            "higherThan": "0.1"
        }
    }
}

The alert options operate independently of the confirmation count.

Response payload example:

JSON
{
  "success": true,
  "message": "OK"
}

Here's an example of a notification payload:

JSON
{
    "chain": {
        "address": "0x51B2057D2216e7f741728C058635E3524A5E6A5C",
        "name": "Optimism Sepolia",
        "id": "optimismsepolia",
        "symbol": "OPETH"
    },
    "balances": {
        "hex": "0x497407837458612564",
        "int": "497407837458612564",
        "opeth": "0.497407837458612564"
    },
    "balance": "0.497407837458612564",
    "options": {
        "confirmations": 3,
        "alert": {
            "higherThan": "0"
        }
    }
}

Check API Usage

This REST API allows you to check the consumption of your API usage balance.

Endpoint: <ck_hotwallet_url>/service/utility/usage

Request payload:

JSON
{} // Empty object

Response payload example:

JSON
{
  "success": true,
  "message": "OK",
  "ciphertext": {
	  "quota": 10000,
	  "balance": 9990
  }
}

Lookup Address

This REST API enables you to check the balance of an on-chain address along with its transaction count.

NOTE

This endpoint consumes API usage.

IMPORTANT

Only addresses generated within the CoKeeps platform can be queried.

Endpoint: <ck_hotwallet_url>/service/utility/lookup/address

Request payload:

JSON
{
	"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
	"chain_id": "bitcoin"
}

Response payload example:

JSON
{
  "success": true,
  "message": "Address lookup",
  "ciphertext": {
    "address": "0x56F17393Ad0Ebf06A10c5B13c4bc9b3E86E4a3",
    "chain_id": "optimismsepolia",
    "data": {
      "balances": {
        "hex": "0x313032333930363234303139353438383036",
        "int": "102390624019548806",
        "opeth": "0.102390624019548806"
      },
      "txs": 5,
      "balance": "0.102390624019548806",
      "transactions": [
        // -- Snip --
        {
          "txid": "0x7f1cf619fb6de2b8784b0ba0b36c9cd310377c866ec41ba2e07224d039872aad",
          "ts": 1725216058000,
          "ago": "10 hours ago",
          "confirmations": 17367,
          "from": "0x1450ac98fbd4EA6C4DFF1257eD8958210b07a8a1",
          "to": "0x56F17393Ad0Ebf06A10c5B13c4bc9b3E86E4a3Cb",
          "incoming": true,
          "outgoing": false,
          "value": "0.0",
          "fee": "0.000126490612667234",
          "block": 16706759,
          "values": {
            "int": "0",
            "hex": "30",
            "opeth": "0.0"
          },
          "fees": {
            "int": "126490612667234",
            "hex": "313236343930363132363637323334",
            "opeth": "0.000126490612667234"
          }
        },
        // -- Snip --
    }
  }
}

Lookup Transaction

This REST API enables you to retrieve an on-chain transaction information.

NOTE

This endpoint consumes API usage.

Endpoint: <ck_hotwallet_url>/service/utility/lookup/tx

Request payload:

JSON
{
	"hash": "0x31c13576a11ba5bb8c068e48c35bcbeffc2306aafbfe8700cf4804909f75acaf",
	"chain_id": "optimismsepolia"
}

Response payload example:

JSON
{
  "success": true,
  "message": "Transaction lookup",
  "ciphertext": {
      "hash": "0x31c13576a11ba5bb8c068e48c35bcbeffc2306aafbfe8700cf4804909f75acaf",
      "chain_id": "optimismsepolia",
      "data": {
        "hash": "0x7f1cf619fb6de2b8784b0ba0b36c9cd310377c866ec41ba2e07224d039872aad",
        "chain_id": "optimismsepolia",
        "data": {
          "_type": "TransactionResponse",
          "accessList": [],
          "blockNumber": 16706759,
          "blockHash": "0x482987bff5a8bc08b96d8f674a617f8cc3c724fa183ea7823c430c29df60e832",
          "blobVersionedHashes": null,
          "chainId": "11155420",
          "data": "0xa0ab96530000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000eebc79003a9f623a63d77a43276781fbf464bd0c0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c3500000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000291d0444645be4e6ccf2d6f2b9b7f6453a5db792053fbde4fde8d51cf551c5c6ac1f9e71bcb2e6d88a25045b32a367a289021e773805f264221ee684224ba403900000000000000000000000000000000000000000000000000000000000000027c75eca3d527450039acff2ca099b18a38b5d7915f403e792a361dc65f40ad1505f76160bdc927bd780548dfc0aefc8ee0e259331bb8d8966bc90bc5536c14a40000000000000000000000000000000000000000000000000000000000000000",
          "from": "0x1450ac98fbd4EA6C4DFF1257eD8958210b07a8a1",
          "gasLimit": "108964",
          "gasPrice": "1000000272",
          "hash": "0x7f1cf619fb6de2b8784b0ba0b36c9cd310377c866ec41ba2e07224d039872aad",
          "maxFeePerGas": "1000000542",
          "maxPriorityFeePerGas": "1000000000",
          "maxFeePerBlobGas": null,
          "nonce": 9,
          "signature": {
            "_type": "signature",
            "networkV": null,
            "r": "0xb897078e943011fefba85687bf0e33ad3182058cec0012ebfb28025f279310ee",
            "s": "0x29f99dd074c070904200657dbccc371068057aca9e97a8a5966eaf7d7b5c2127",
            "v": 28
          },
          "to": "0x56F17393Ad0Ebf06A10c5B13c4bc9b3E86E4a3Cb",
          "index": 1,
          "type": 2,
          "value": "0"
        }
      }
  }
}

Smart Contract Information Lookup

Utilize this REST API to fetch all readily available information about a smart contract without requiring any inputs.

IMPORTANT

Only smart contract deployed or imported within the CoKeeps platform can be queried.

Endpoint: <ck_hotwallet_url>/service/utility/lookup/smart-contract/info

Request payload:

JSON
{
  "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
  "chain_id": "eth"
}

address refers to the smart contract's address.

Response payload example:

JSON
{
  "success": true,
  "message": "Smart Contract Info",
  "ciphertext": {
    "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
    "chain_id": "eth",
    "data": {
      "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
      "chain_id": "662131dc4d81090013d9fdd4",
      "result": [
        // -- Snip --
        {
          "name": "decimals",
          "value": "18",
          "text": "Decimals"
        },
        {
          "name": "name",
          "value": "Uniswap",
          "text": "Name"
        },
        {
          "name": "symbol",
          "value": "UNI",
          "text": "Symbol"
        },
        {
          "name": "totalSupply",
          "value": "1000000000000000000000000000",
          "text": "Total Supply"
        }
        // -- Snip --
      ]
    }
  }
}

Smart Contract Read Method

Utilize this REST API to retrieve a value from a smart contract by providing the necessary inputs.

IMPORTANT

Only smart contract deployed or imported within the CoKeeps platform can be queried.

Endpoint: <ck_hotwallet_url>/service/utility/lookup/smart-contract/read

Request payload:

JSON
{
  "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
  "chain_id": "eth",
  "functionName": "balanceOf",
  "inputs": [ "0x1426f9c9CD9532D4Fdb66D4EE88d6Df94CDa436a" ]
}

address refers to the smart contract's address.

NOTE

functionName can be obtain from the Smart Contract Lookup Interface endpoint.

Response payload example:

JSON
{
  "success": true,
  "message": "Smart Contract Read",
  "ciphertext": {
    "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
    "chain_id": "eth",
    "data": {
      "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
      "chain_id": "662131dc4d81090013d9fdd4",
      "result": {
        "name": "balanceOf",
        "value": "5490000000000000000",
        "text": "Balance Of"
      }
    }
  }
}

Smart Contract Lookup Interface

Utilize this REST API to fetch the available methods of a Smart Contract.

IMPORTANT

Only smart contract deployed or imported within the CoKeeps platform can be queried.

Endpoint: <ck_hotwallet_url>/service/utility/lookup/smart-contract/interface/<method>

Where <method> is read or write string.

Request payload:

JSON
{
  "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
  "chain_id": "eth"
}

Response payload example:

JSON
{
  "success": true,
  "message": "Smart Contract Interface",
  "ciphertext": {
    "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
    "chain_id": "eth",
    "data": [
      // -- Snip --
      {
        "inputs": [
          {
            "internalType": "address",
            "name": "account",
            "type": "address"
          }
        ],
        "name": "balanceOf",
        "outputs": [
          {
            "internalType": "uint256",
            "name": "",
            "type": "uint256"
          }
        ],
        "type": "function",
        "text": "Balance Of"
      }
      // -- Snip --
    ]
  }
}

Information

List Hot Wallet Users

This REST API will display a list of all users registered in the CoKeeps Hot Wallet system.

NOTE

Response results are paginated

Endpoint: <ck_hotwallet_url>/service/information/users

Request payload:

JSON
{
  "params": {
    // Obtain from SDK
  },
  "currentPage": 1,
  "perPage": 5 // Between 1 to 100
}

NOTE

The available options for params can be retrieved from the Pagination filters section.

Response payload example:

JSON
{
  "success": true,
  "message": "Users",
  "ciphertext": {
    "data": [
      // -- Snip --
      {
        "_id": "65d9e68190c3fe00139e2dff",
        "uid": "c80df78a-95ef-4717-8c0d-081fcb352994",
        "created": "2024-02-24T12:52:17.068Z",
        "lastModified": "2024-03-10T08:53:52.041Z",
        "resetCount": 0
      },
      // -- Snip --
    ],
    "found": 3,
    "total": 3
  }
}

List Destinations

This REST API will display a list of all destination addresses that have been set by users.

NOTE

Response results are paginated

Endpoint: <ck_hotwallet_url>/service/information/destinations

Request payload:

JSON
{
  "params": {
    // Obtain from SDK
  },
  "currentPage": 1,
  "perPage": 5 // Between 1 to 100
}

NOTE

The available options for params can be retrieved from the Pagination filters section.

Response payload example:

JSON
{
  "success": true,
  "message": "Users",
  "ciphertext": {
    "data": [
      // -- Snip --
      {
        "_id": "65f29d1aa3db1a0013e9653f",
        "uid": "c80df78a-95ef-4717-8c0d-081fcb352994",
        "data": {
          "chain_id": "bitcoin",
          "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
          "approval": {
            "uid": "65abefd6f6539a0018798e74",
            "signature": "637b9be6f950135997306976c6dea4d1bc956c17b985194ee7398697949e8b07798eba71eb37becca027ceacd55c1ebc67131a98bf0f30fa8b6ae9c7df42ae0762326431356331376431663263646530343564373331336461616666396437663437613962386364343336373133313661663430633734663330613931643539",
            "remark": "Compliance ID: 123-ABC",
            "destination_id": "65f29d1aa3db1a0013e9653f",
            "ts": "2024-03-15T19:43:21.514Z",
            "sbdv": true
          },
          "rejection": null,
          "travelRuleId": "65f29d1aa3db1a0013e9653e",
          "travelRule": {
            "type": "self-hosted",
            "typeName": "Ledger",
            "name": "Satoshi Nakamoto",
            "country": "Unknown",
            "caddress": false,
            "contact": false,
            "email": false,
            "reference": false
          }
        },
        "created": "2024-03-14T06:45:46.178Z",
        "lastModified": "2024-03-15T19:43:21.518Z",
        "sbdv": true
      },
      // -- Snip --
    ],
    "found": 3,
    "total": 3
  }
}

List Travel Rules

This REST API will provide a list of all Travel Rule entries that have been set by users.

NOTE

Response results are paginated

Endpoint: <ck_hotwallet_url>/service/information/travel-rule

Request payload:

JSON
{
  "params": {
    // Obtain from SDK
  },
  "currentPage": 1,
  "perPage": 5 // Between 1 to 100
}

NOTE

The available options for params can be retrieved from the Pagination filters section.

Response payload example:

JSON
{
  "success": true,
  "message": "Users",
  "ciphertext": {
    "data": [
      // -- Snip --
      {
        "_id": "65f29d1aa3db1a0013e9653e",
        "uid": "c80df78a-95ef-4717-8c0d-081fcb352994",
        "created": "2024-03-14T06:45:46.175Z",
        "data": {
          "chain_id": "bitcoin",
          "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
          "signature": "810d8c8a98780ae17281c96af89e5f02d44bdd29326b4ecdbcaeb51c672466cdeb1af990a9c2269f08d4576fcca2dda6709ed46871c3570ab1ca31e252daed0137306165393035366337656363326238656332643834306562626633306430353639383137616132663463316664343563343732356236636665353139313433",
          "type": "self-hosted",
          "typeName": "Ledger",
          "addressSignature": "KMB9hTRwUt0vc+Nkal/zgPTQxVT/OmcUPq3YylCMq2leU/qV36UxSItLlzXPuH27VWkKwfNgI3DQ6kGdws0SiZE=",
          "addressSignatureInput": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
          "name": "Satoshi Nakamoto",
          "country": "Unknown",
          "caddress": false,
          "contact": false,
          "email": false,
          "reference": false,
          "approval": {
            "uid": "5d9aa207-d44f-4913-8d68-ec27be30e841",
            "signature": "637b9be6f950135997306976c6dea4d1bc956c17b985194ee7398697949e8b07798eba71eb37becca027ceacd55c1ebc67131a98bf0f30fa8b6ae9c7df42ae0762326431356331376431663263646530343564373331336461616666396437663437613962386364343336373133313661663430633734663330613931643539",
            "remark": "Compliance ID: 123-ABC",
            "destination_id": "65f29d1aa3db1a0013e9653f",
            "ts": "2024-03-15T19:43:21.514Z",
            "sbdv": true
          },
          "rejection": null
        },
        "hash": "332bd95e63dee5b7e85aa4bcb776579555f31d3c8eb0930e758fa6ba3005284a",
        "lastModified": "2024-03-15T19:43:21.516Z",
        "sbdv": true
      },
      // -- Snip --
    ],
    "found": 3,
    "total": 3
  }
}

Retrieve User Info

Utilize this REST API to fetch information about a user registered in the CoKeeps Hot Wallet system.

Endpoint: <ck_hotwallet_url>/service/information/user

Request payload:

JSON
{
  "uid": "c80df78a-95ef-4717-8c0d-081fcb352994",
  "chain_ids": [ "bitcoin" ] // Optional
}

Response payload example:

JSON
{
  "success": true,
  "message": "User info",
  "ciphertext": {
    "_id": "65d9e68190c3fe00139e2dff",
    "uid": "c80df78a-95ef-4717-8c0d-081fcb352994",
    "role": "signer",
    "limits": {
		"bitcoin": "0.1",
		"solana": "20.113",
		"2d3b8da918b7ef3d9bf14260c13b2e5d3038d238b31b7931cc16c45d5f20027e": "0"
	},
	"destinations": {
		"bitcoin": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
		"solana": "2wmVCSfPxGPjrnMMn7rchp4uaeoTqN39mXFC2zhPdri9",
	},
	"reset_count": 0,
    "created": "2024-01-12T15:36:29.516Z",
    "wallet": {
      "bitcoin": [
	// -- Snip --
	{
	  "label": "First Bitcoin",
	  "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
          "balances": {
            "hex": "0x128833d48",
            "int": "4974656840",
            "btc": "49.74656840"
          },
          "pending": {
            "hex": "0x26bf",
            "int": "9919",
            "btc": "0.00009919"
          },
          "txs": 11431,
          "balance": "49.74656840"
	},
	// -- Snip --
      ]
    },
    "deposit": {
      "bitcoin": {
        "address": "bc1qmq9yj7gs69p7d0v67df7cfxlgpu8vm68s9m8m4",
        "balances": {
          "hex": "0x0",
          "int": "0",
          "btc": "0"
        },
        "pending": {
          "hex": "0x0",
          "int": "0",
          "btc": "0"
        },
        "txs": 0,
        "balance": "0"
      }
    }
  }
}

List Accounts

This REST API will fetch all relevant accounts based on their type.

NOTE

Response results are paginated

Endpoint: <ck_hotwallet_url>/service/information/accounts/<type>

Where <type> can be one of the following:

  • wallet for Signer Wallet
  • deposit

Request payload:

JSON
{
  "params": {
    // Obtain from SDK
  },
  "currentPage": 1,
  "perPage": 5 // Between 1 to 100
}

NOTE

The available options for params can be retrieved from the Pagination filters section.

Response payload example:

JSON
{
  "success": true,
  "message": "Deposit accounts",
  "ciphertext": {
    "data": [
      // -- Snip -- 
      {
        "_id": "65d9e68190c3fe00139e2dff",
        "uid": "c80df78a-95ef-4717-8c0d-081fcb352994",
        "role": "signer",
        "deposit": {
          "bitcoin": {
            "address": "bc1qmq9yj7gs69p7d0v67df7cfxlgpu8vm68s9m8m4",
            "balances": {
              "hex": "0x0",
              "int": "0",
              "btc": "0"
            },
            "pending": {
              "hex": "0x0",
              "int": "0",
              "btc": "0"
            },
            "txs": 0,
            "balance": "0"
          }
        }
      }
      // -- Snip -- 
    ],
    "found": 3,
    "total": 3
  }
}

List Transactions

This REST API will fetch all off-chain service transactions.

NOTE

Response results are paginated

Endpoint: <ck_hotwallet_url>/service/information/transactions/<type>

Where <type> can be one of the following:

  • transfer
  • interact
  • sweep-deposit
  • sweep-withdrawal
  • sweep-gas-station
  • sweep-signer-wallet-base
  • gas-station
  • rebalance

Request payload:

JSON
{
  "params": {
    // Obtain from SDK
  },
  "currentPage": 1,
  "perPage": 5 // Between 1 to 100
}

NOTE

The available options for params can be retrieved from the Pagination filters section.

Response payload example:

JSON
{
  "success": true,
  "message": "Sweep deposits",
  "ciphertext": {
    "data": [
      // -- Snip -- 
    {
        "tid": "665860b206e4170013a10f85",
        "from": "0xcDD721f711D952A0DA6e7C53AeD034152e0dE772",
        "to": "0x27F34B3e1A43b3147820abaA3e9C843eD6aAB9E5",
        "chain_id": "78ef6ee84c3764df81a7a6325a7aa1a9d0588f5038ed1bfbfb717ddf45a2b249",
        "status": "completed",
        "txid": "0xeb0becab6a49cfeb6e9ec9adef878acdaf1e70fce13dd5cb3bca2c32fbcc32b0",
        "created": "2024-05-30T11:19:14.122Z",
        "lastModified": "2024-05-30T11:38:00.194Z"
    }
      // -- Snip -- 
    ],
    "found": 3,
    "total": 3
  }
}

IMPORTANT

There are four status values: completed, pending, error, and exit. The completed status indicates that the transaction has been added to a block, and the paginated result will provide a txid value. The pending status means the transaction is in the queue. The error status indicates an issue with the transaction, and your backend will be alerted via the Update endpoint. The hot wallet machine will retry error transactions every 5 minutes, up to 5 times. If all attempts fail, the status will change to exit. It is crucial to consider these statuses when displaying or returning balances that affect the user's withdrawal limit.

Dynamic Transaction Pool

Retrieve Integrated Accounts

This endpoint allows you to access the CoKeeps system to identify relevant accounts associated with the transaction pool ID.

Endpoint: <ck_hotwallet_url>/service/pool/integrated-accounts

Request payload:

JSON
{
  "pool_id": "string"
}

Response payload example:

JSON
{
  "success": true,
  "message": "Pool integrated accounts",
  "ciphertext": [
    {
      "address": "AS1yfbX6dx9dJd8fiey3uc22anb6KGZz6USSB8zmGW92",
      "chain_id": "solanadevnet",
      "withdrawal": true,
      "sweepDestination": false,
      "writeAction": true,
      "writeActionInstruction": [
        {
          "address": "7WqErRX6pF6nUxZaaYHLWkWdM5Xeiu977Rjonpa4BeH6",
          "chain_id": "solanadevnet",
          "instructions": [
            {
              "method": "transferChecked",
              "withdrawalAlias": true
            }
          ]
        }
      ],
      "shared": {
        "_id": "6607f0d438df6e00132defdd",
        "label": "Solana MS",
        "chain_id": "solanadevnet",
        "address": "AS1yfbX6dx9dJd8fiey3uc22anb6KGZz6USSB8zmGW92",
        "total": "3",
        "needed": "2",
        "members": [
          {
            "address": "ECsDGeXFjxXDFSDJZbEF67DK28CFSWmB8xKksusAZck",
            "input": "ECsDGeXFjxXDFSDJZbEF67DK28CFSWmB8xKksusAZck",
            "linked": false
          },
          {
            "address": "CAMmmhXUgqmFqERQkPVsTc77ECf1uUdGWUzboarnrxb7",
            "input": "CAMmmhXUgqmFqERQkPVsTc77ECf1uUdGWUzboarnrxb7",
            "linked": false
          },
          {
            "address": "J6pZKwXQhbA7WEKKBc2cY7gFSLyAyJNUkpetsZDFTpjp",
            "input": "J6pZKwXQhbA7WEKKBc2cY7gFSLyAyJNUkpetsZDFTpjp",
            "linked": "655f29b5a9d8900019c65a6a"
          }
        ],
        "meta": {
          "multisigPublicKey": "5ywqMepwADm72e55zcfXG13NtTSrtZAEjxBF4urLLegQ",
          "multisigSignerPublicKey": "AS1yfbX6dx9dJd8fiey3uc22anb6KGZz6USSB8zmGW92",
          "version": "v1",
          "programId": "6dL7oBn5EmyZVYh55Kh6xkJ8fJ5vd7LAt28EyKZXg3ZD"
        },
        "spl": {
          "address": "A9rkBicskJBTZwRkbTMQUFRA9PU19nLi26vT3dhZHT35",
          "multisigPublicKey": "A9rkBicskJBTZwRkbTMQUFRA9PU19nLi26vT3dhZHT35"
        }
      },
      "data": {
        "txs": 19,
        "balances": {
          "hex": "10c32fa15",
          "int": 4499634709,
          "sol": "4.499634709"
        },
        "balance": "4.499634709"
      }
    }
  ]
}

List Transactions

Utilize this REST API to display all transactions in the pool.

NOTE

Response results are paginated

Endpoint: <ck_hotwallet_url>/service/pool/tx

Request payload:

JSON
{
  "params": {
    // Obtain from SDK
  },
  "currentPage": 1,
  "perPage": 5 // Between 1 to 100
}

NOTE

The available options for params can be retrieved from the Pagination filters section.

Response payload example:

JSON
{
  "success": true,
  "message": "Pool transaction",
  "ciphertext": {
    "data": [
      // -- Snip --
      {
        "_id": "66228d8e4f07ea0013fb9eb6",
        "uid": "c80df78a-95ef-4717-8c0d-081fcb352994",
        "chain_id": "solanadevnet",
        "amount": "0.003",
        "type": "withdrawal",
        "reference_id": "2024-03-21_ABC-123",
        "to": "J6pZKwXQhbA7WEKKBc2cY7gFSLyAyJNUkpetsZDFTpjp",
        "hash": "a5367428a4a63f848013359c7868736778fe6579bbb02af381975873fb7f2059",
        "signature": "ef2734831d69768e9c73f40c06f8a3657bde6474b8a02d86001d5392cb89e5da5104732ee7a81e581dd3273af8eda95f9d83a9e837ad1516f0aa9f7a2771340c61353336373432386134613633663834383031333335396337383638373336373738666536353739626262303261663338313937353837336662376632303539",
        "status": "pending",
        "memo": "test",
        "amountDecimal": "0.003",
        "decimals": 9,
        "created": "2024-04-19T15:28:14.335Z",
        "sbdv": true,
        "int": "3000000"
      },
      // -- Snip --
    ],
    "found": 24,
    "total": 24
  }
}

Dynamic Ledger

NOTE

This section pertains specifically to Omnibus account configuration, specifically when Dynamic Ledger usage is enabled.

Initiating User Deposit

This REST API is designed to notify the Dynamic Ledger when a new deposit has been made to a user's account.

Endpoint: <ck_hotwallet_url>/service/ledger/deposit

Request payload:

JSON
{
  "uid": "c80df78a-95ef-4717-8c0d-081fcb352994",
  "type": "deposit",
  "chain_id": "solana",
  "amount": "10.5", // Decimal string
  "txid": "PAYNET_ABC-123"
}

The txid field represents your system-generated transaction ID.

Response payload example:

JSON
{
  "success": true,
  "message": "Deposited",
  "ciphertext": {
    "id": "6622954f4f07ea0013fb9eb7"
  }
}

Executing Withdrawal

This REST API is engineered to inform the Dynamic Ledger when a withdrawal is initiated for a user's account. This typically occurs when the withdrawal process is not initiated by the user directly, but rather by your system acting on their behalf. For instance, this could involve transactions conducted Over the Counter (OTC).

For withdrawal actions initiated by the user, please consult the Front-End JavaScript SDK - Transfer Transaction.

Endpoint: <ck_hotwallet_url>/service/ledger/withdraw

Request payload:

JSON
{
  "uid": "c80df78a-95ef-4717-8c0d-081fcb352994",
  "type": "withdraw",
  "chain_id": "bitcoin",
  "amount": "0.5", // Decimal string
  "txid": "TRANSACTION_ABC-123"
}

The txid field represents your system-generated transaction ID.

Response payload example:

JSON
{
  "success": true,
  "message": "Withdrawn",
  "ciphertext": {
    "id": "65f1cb2360bed20013fc89e5"
  }
}

Retrieve User Balance

Utilize this REST API to fetch a user's ledger balance.

Endpoint: <ck_hotwallet_url>/service/ledger/balance/of

Request payload:

JSON
{
  "uid": "c80df78a-95ef-4717-8c0d-081fcb352994",
  "chain_id": "solana"
}

Response payload example:

JSON
{
  "success": true,
  "message": "Balance of",
  "ciphertext": {
    "int": "39995000",
    "amount": "0.039995",
    "decimals": 9,
    "pending": {
      "int": "3000000",
      "amount": "0.003",
      "decimals": 9
    }
  }
}

Retrieve Total Balance

Utilize this REST API to retrieve the total balances from the Dynamic Ledger.

Endpoint: <ck_hotwallet_url>/service/ledger/balance/total

Request payload:

JSON
{
  "chain_id": "solana"
}

Response payload example:

JSON
{
  "success": true,
  "message": "Balance total",
  "ciphertext": {
    "int": "39995000",
    "amount": "0.039995",
    "decimals": 9,
    "pending": {
      "int": "0",
      "amount": "0.0",
      "decimals": 9
    }
  }
}

Retrieve General Summary

Utilize this REST API to fetch a summary of the Dynamic Ledger.

NOTE

Response results are paginated

Endpoint: <ck_hotwallet_url>/service/ledger/summary/total

Request payload:

JSON
{
  "params": {
    // Obtain from SDK
  },
  "currentPage": 1,
  "perPage": 5 // Between 1 to 100
}

NOTE

The available options for params can be retrieved from the Pagination filters section.

Response payload example:

JSON
{
  "success": true,
  "message": "Summary total",
  "ciphertext": {
    "data": [
      // -- Snip --
      {
        "name": "Solana",
        "chain_id": "solana",
        "total": "12.039995",
        "decimals": 9,
        "usersCount": 1
      },
      {
        "name": "Bitcoin",
        "chain_id": "bitcoin",
        "total": "1.3339",
        "decimals": 8,
        "usersCount": 2
      },
      // -- Snip --
    ],
    "found": 7,
    "total": 7
  }
}

Retrieve User Summary by Chain

This REST API provides a summary of the user within the Dynamic Ledger.

NOTE

Response results are paginated

Endpoint: <ck_hotwallet_url>/service/ledger/summary/users

Request payload:

JSON
{
  "params": {
     chain_id: 'solanadevnet'
     // Obtain from SDK
  },
  "currentPage": 1,
  "perPage": 5 // Between 1 to 100
}

NOTE

The available options for params can be retrieved from the Pagination filters section.

Response payload example:

JSON
{
  "success": true,
  "message": "Summary total",
  "ciphertext": {
    "data": [
      // -- Snip --
      {
        "uid": "c80df78a-95ef-4717-8c0d-081fcb352994",
        "chain_id": "solana",
        "decimals": 9,
        "int": "39995000",
        "amount": "0.039995"
      }
      // -- Snip --
    ],
    "found": 7,
    "total": 7
  }
}