Docs

tokenDelegate payload - Validator Delegation

Decode Hyperliquid `tokenDelegate` payloads for validator delegation, returned through Dwellir's read-only L1 gRPC API.

Read-only action reference

Dwellir's Hyperliquid gRPC API returns this decoded action payload through StreamBlocks and GetBlock. It does not submit or execute this action. Submit supported user write actions through Hyperliquid's native POST /exchange endpoint.

The decoded tokenDelegate payload records a token delegation or undelegation involving a Hyperliquid validator.

Sample Data

JSON
{
  "signature": {
    "r": "0xd3d8ea7bf5d7699274f77d6527be0a78f137cb7f41e8b90b87de639b1f4d5704",
    "s": "0x7041f94160b4b38e516507a201e5f65872fb7e9ce2522b901b31621048fbb653",
    "v": 27
  },
  "action": {
    "type": "tokenDelegate",
    "signatureChainId": "0xa4b1",
    "hyperliquidChain": "Mainnet",
    "validator": "0xa23b4556090260828ff3f939d2dbdd4f318b5f1f",
    "wei": 10000000000,
    "isUndelegate": false,
    "nonce": 1768148103446
  },
  "nonce": 1768148103446
}

View this transaction on Hypurrscan

Field Reference

Action Fields

FieldTypeDescription
typestringAlways "tokenDelegate"
signatureChainIdstringChain ID for EIP-712 signing
hyperliquidChainstringTarget chain: "Mainnet" or "Testnet"
validatorstringValidator address to delegate to
weinumberAmount in wei (smallest unit)
isUndelegatebooleantrue to undelegate, false to delegate
noncenumberTransaction nonce

Amount Conversion

The wei field is in the smallest token unit:

  • 14494791496000 wei = 14.49 tokens (assuming 12 decimals)

Use Cases

Staking Analytics

Track delegation and undelegation patterns:

Python
def process_tokenDelegate_action(action):
    validator = action.get('validator')
    amount_wei = action.get('wei')
    is_undelegate = action.get('isUndelegate')

    direction = 'undelegated from' if is_undelegate else 'delegated to'
    print(f"Tokens {direction} validator {validator[:10]}...")

Validator Monitoring

Track which validators are gaining or losing stake.

Network Security Analysis

Monitor total stake and distribution across validators.