Skip to content

API Documentation

Welcome to the Turing Wallet API documentation. This SDK lets you integrate Turing Wallet into your DApp with support for TBC, BTC, Ethereum, and BSC chains.

New to Turing Wallet?

Start with the Getting Started Guide for a step-by-step walkthrough including installation, setup, and a complete DApp example.

Quick Start

ts
import { useTuringWallet } from "turing-wallet-provider";

const wallet = useTuringWallet();

// Connect to wallet
const addresses = await wallet.connect();
console.log(addresses);
// => { tbcAddress, btcAddress, ethAddress, bnbAddress }

// Send a transaction
const { txid } = await wallet.sendTransaction([
  { flag: "P2PKH", address: "recipient_address", satoshis: 10000 },
]);

You can also use the Turing global object: await Turing.connect(). See Getting Started for details on both patterns.

API Overview

Connection

MethodDescription
connectConnect to wallet and get addresses
disconnectDisconnect from wallet
isConnectedCheck connection status

Account Info

MethodDescription
getPubKeyGet public key
getAddressGet wallet addresses
getInfoGet wallet name, platform, version

Signing & Encryption

MethodDescription
signMessageSign a message with encoding support
signTransactionSign raw transactions
signAssociatedTransactionSign parent-child transactions
encryptEncrypt data with wallet key
decryptDecrypt data with wallet key

TBC Transactions

MethodDescription
sendTransactionSend TBC transactions (P2PKH, NFT, FT, PoolNFT, Stablecoin)
sendBatchRequestBatch multiple requests (up to 5)

EVM Transactions

MethodDescription
evm.sendTransactionSend Ethereum/BSC transactions (native + ERC20)

BTC Transactions

MethodDescription
btc.sendTransactionSend BTC transactions
btc.signTransactionSign BTC transactions (Legacy/SegWit/Taproot)
btc.sendBatchRequestBTC batch requests