Supported Transactions
taoflash relay supports ALL Bittensor transactions. Below are common examples organized by category to demonstrate the integration workflow. Any transaction that works on Bittensor can be submitted through the relay for MEV protection.
Staking Operations
addStake
Basic stake operation without price limits.
{
"call_module": "subtensorModule",
"call_function": "addStake",
"call_params": {
"hotkey": "5FHneW46...",
"netuid": 1,
"amountStaked": 1000000000
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Validator hotkey SS58 address |
netuid | number | Subnet network UID |
amountStaked | number | Amount in RAO (1 TAO = 1e9 RAO) |
addStakeLimit
Stake with price protection (recommended for MEV protection).
{
"call_module": "subtensorModule",
"call_function": "addStakeLimit",
"call_params": {
"hotkey": "5FHneW46...",
"netuid": 1,
"amountStaked": 1000000000,
"limitPrice": 999999999999,
"allowPartial": false
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Validator hotkey SS58 address |
netuid | number | Subnet network UID |
amountStaked | number | Amount in RAO (1 TAO = 1e9 RAO) |
limitPrice | number | Maximum price willing to pay |
allowPartial | boolean | Allow partial fills |
removeStake
Basic unstake operation.
{
"call_module": "subtensorModule",
"call_function": "removeStake",
"call_params": {
"hotkey": "5FHneW46...",
"netuid": 1,
"amountUnstaked": 1000000000
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Validator hotkey SS58 address |
netuid | number | Subnet network UID |
amountUnstaked | number | Amount to unstake in RAO |
removeStakeLimit
Unstake with price protection.
{
"call_module": "subtensorModule",
"call_function": "removeStakeLimit",
"call_params": {
"hotkey": "5FHneW46...",
"netuid": 1,
"amountUnstaked": 1000000000,
"limitPrice": 50000000,
"allowPartial": false
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Validator hotkey SS58 address |
netuid | number | Subnet network UID |
amountUnstaked | number | Amount to unstake in RAO |
limitPrice | number | Minimum price willing to accept |
allowPartial | boolean | Allow partial fills |
removeStakeFullLimit
Unstake entire position with optional price protection.
{
"call_module": "subtensorModule",
"call_function": "removeStakeFullLimit",
"call_params": {
"hotkey": "5FHneW46...",
"netuid": 1,
"limitPrice": 50000000
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Validator hotkey SS58 address |
netuid | number | Subnet network UID |
limitPrice | number/null | Minimum price (null for no limit) |
unstakeAll
Unstake from all positions for a hotkey.
{
"call_module": "subtensorModule",
"call_function": "unstakeAll",
"call_params": {
"hotkey": "5FHneW46..."
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Validator hotkey SS58 address |
unstakeAllAlpha
Unstake all alpha tokens.
{
"call_module": "subtensorModule",
"call_function": "unstakeAllAlpha",
"call_params": {
"hotkey": "5FHneW46..."
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Validator hotkey SS58 address |
Stake Movement
swapStake
Move stake between subnets.
{
"call_module": "subtensorModule",
"call_function": "swapStake",
"call_params": {
"hotkey": "5FHneW46...",
"originNetuid": 1,
"destinationNetuid": 2,
"alphaAmount": 1000000000
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Validator hotkey SS58 address |
originNetuid | number | Source subnet UID |
destinationNetuid | number | Target subnet UID |
alphaAmount | number | Amount of alpha to swap |
swapStakeLimit
Move stake between subnets with price protection.
{
"call_module": "subtensorModule",
"call_function": "swapStakeLimit",
"call_params": {
"hotkey": "5FHneW46...",
"originNetuid": 1,
"destinationNetuid": 2,
"alphaAmount": 1000000000,
"limitPrice": 50000000,
"allowPartial": false
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Validator hotkey SS58 address |
originNetuid | number | Source subnet UID |
destinationNetuid | number | Target subnet UID |
alphaAmount | number | Amount of alpha to swap |
limitPrice | number | Price limit for the swap |
allowPartial | boolean | Allow partial fills |
transferStake
Transfer stake to another coldkey.
{
"call_module": "subtensorModule",
"call_function": "transferStake",
"call_params": {
"destinationColdkey": "5Grw...",
"hotkey": "5FHneW46...",
"originNetuid": 1,
"destinationNetuid": 2,
"alphaAmount": 1000000000
}
}
| Parameter | Type | Description |
|---|---|---|
destinationColdkey | string | Recipient coldkey SS58 address |
hotkey | string | Validator hotkey SS58 address |
originNetuid | number | Source subnet UID |
destinationNetuid | number | Target subnet UID |
alphaAmount | number | Amount of alpha to transfer |
moveStake
Move stake between hotkeys.
{
"call_module": "subtensorModule",
"call_function": "moveStake",
"call_params": {
"originHotkey": "5FHneW46...",
"destinationHotkey": "5GHt...",
"originNetuid": 1,
"destinationNetuid": 2,
"alphaAmount": 1000000000
}
}
| Parameter | Type | Description |
|---|---|---|
originHotkey | string | Source hotkey SS58 address |
destinationHotkey | string | Target hotkey SS58 address |
originNetuid | number | Source subnet UID |
destinationNetuid | number | Target subnet UID |
alphaAmount | number | Amount of alpha to move |
Key Management
swapHotkey
Swap hotkey for a subnet (or all subnets if netuid is null).
{
"call_module": "subtensorModule",
"call_function": "swapHotkey",
"call_params": {
"hotkey": "5FHneW46...",
"newHotkey": "5GHt...",
"netuid": 1
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Current hotkey SS58 address |
newHotkey | string | New hotkey SS58 address |
netuid | number/null | Subnet UID (null for all subnets) |
scheduleSwapColdkey
Schedule a coldkey swap.
{
"call_module": "subtensorModule",
"call_function": "scheduleSwapColdkey",
"call_params": {
"newColdkey": "5Hxy..."
}
}
| Parameter | Type | Description |
|---|---|---|
newColdkey | string | New coldkey SS58 address |
Registration
burnedRegister
Register with burned TAO.
{
"call_module": "subtensorModule",
"call_function": "burnedRegister",
"call_params": {
"netuid": 1,
"hotkey": "5FHneW46..."
}
}
| Parameter | Type | Description |
|---|---|---|
netuid | number | Subnet network UID |
hotkey | string | Hotkey SS58 address to register |
register
Register with proof of work.
{
"call_module": "subtensorModule",
"call_function": "register",
"call_params": {
"netuid": 1,
"blockNumber": 123456,
"nonce": 789,
"work": "0x...",
"hotkey": "5FHneW46...",
"coldkey": "5Grw..."
}
}
| Parameter | Type | Description |
|---|---|---|
netuid | number | Subnet network UID |
blockNumber | number | Block number for PoW |
nonce | number | PoW nonce |
work | string | Hex-encoded PoW solution |
hotkey | string | Hotkey SS58 address |
coldkey | string | Coldkey SS58 address |
rootRegister
Register on root network.
{
"call_module": "subtensorModule",
"call_function": "rootRegister",
"call_params": {
"hotkey": "5FHneW46..."
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Hotkey SS58 address to register |
Network Management
registerNetwork
Register a new subnet.
{
"call_module": "subtensorModule",
"call_function": "registerNetwork",
"call_params": {
"hotkey": "5FHneW46..."
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Hotkey SS58 address for the new subnet |
Transfers
transfer
Transfer TAO between accounts.
{
"call_module": "balances",
"call_function": "transfer",
"call_params": {
"dest": "5Grw...",
"value": 1000000000
}
}
| Parameter | Type | Description |
|---|---|---|
dest | string | Recipient SS58 address |
value | number | Amount in RAO |
Alpha Token Operations
burnAlpha
Burn alpha tokens.
{
"call_module": "subtensorModule",
"call_function": "burnAlpha",
"call_params": {
"hotkey": "5FHneW46...",
"amount": 1000000000,
"netuid": 1
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Hotkey SS58 address |
amount | number | Amount of alpha to burn |
netuid | number | Subnet network UID |
recycleAlpha
Recycle alpha tokens.
{
"call_module": "subtensorModule",
"call_function": "recycleAlpha",
"call_params": {
"hotkey": "5FHneW46...",
"amount": 1000000000,
"netuid": 1
}
}
| Parameter | Type | Description |
|---|---|---|
hotkey | string | Hotkey SS58 address |
amount | number | Amount of alpha to recycle |
netuid | number | Subnet network UID |
Batch Operations
batch
Execute multiple calls (continues on failure).
{
"call_module": "utility",
"call_function": "batch",
"call_params": {
"calls": []
}
}
| Parameter | Type | Description |
|---|---|---|
calls | array | Array of call objects to execute |
batchAll
Execute multiple calls (atomic - all or nothing).
{
"call_module": "utility",
"call_function": "batchAll",
"call_params": {
"calls": []
}
}
| Parameter | Type | Description |
|---|---|---|
calls | array | Array of call objects (all must succeed) |
forceBatch
Force batch execution.
{
"call_module": "utility",
"call_function": "forceBatch",
"call_params": {
"calls": []
}
}
| Parameter | Type | Description |
|---|---|---|
calls | array | Array of call objects to force execute |
Proxy Operations
proxy
Execute a call on behalf of another account.
{
"call_module": "proxy",
"call_function": "proxy",
"call_params": {
"real": "5Grw...",
"forceProxyType": null,
"call": {}
}
}
| Parameter | Type | Description |
|---|---|---|
real | string | Account to act on behalf of |
forceProxyType | string/null | Force specific proxy type |
call | object | Call to execute |
addProxy
Add a proxy account.
{
"call_module": "proxy",
"call_function": "addProxy",
"call_params": {
"delegate": "5FHn...",
"proxyType": "Any",
"delay": 0
}
}
| Parameter | Type | Description |
|---|---|---|
delegate | string | Proxy account SS58 address |
proxyType | string | Proxy type (Any, Staking, etc.) |
delay | number | Announcement delay in blocks |
Amount Conversion
TAO uses RAO as its base unit (1 TAO = 10^9 RAO):
const RAO_PER_TAO = 1_000_000_000n
// TAO to RAO
const rao = BigInt(tao * 1e9)
// RAO to TAO
const tao = Number(rao) / 1e9
Price Limits
The limitPrice parameter protects against slippage:
| Operation | Limit Meaning | No Limit Value |
|---|---|---|
| Buy (addStakeLimit) | Maximum price | 999999999999 |
| Sell (removeStakeLimit) | Minimum price | 1 |