Docs
Supported ChainsBittensorBittensor-Specific Methods

offchain_localStorageSet - JSON-RPC Method

Set an offchain local storage key on the node (admin-only).

Description

Access local offchain storage APIs (admin‑only). Useful for off‑chain workers and node‑local caching on self‑hosted nodes.

Sets an offchain local storage key. Restricted to self-hosted nodes with offchain RPC enabled.

Code Examples

curl -X POST https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY \
+  -H 'Content-Type: application/json' \
+  -d '{"jsonrpc":"2.0","method":"offchain_localStorageSet","params":[],"id":1}'
import requests, json

url = 'https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY'
headers = {'Content-Type': 'application/json'}
payload = {
  "jsonrpc": "2.0",
  "method": "offchain_localStorageSet",
  "params": [],
  "id": 1
}
res = requests.post(url, headers=headers, data=json.dumps(payload))
print(res.json()['result'])
const res = await fetch('https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "method": "offchain_localStorageSet",
  "params": [],
  "id": 1
})
});
const data = await res.json();
console.log(data.result);

On this page