LogoLogo
WebsiteEnter AppHyperliquid
  • Unit
    • About Unit
      • Team
  • How To
    • Deposit
    • Withdraw
  • Architecture
    • Overview
    • Components
    • Security
  • Developers
    • API
      • Generate Address
        • Guardian Signatures
      • Operations
        • Deposit Lifecycle
        • Withdrawal Lifecycle
      • Withdraw Queue
    • Key Addresses
      • Mainnet
        • Bitcoin
        • Solana
        • Ethereum
      • Testnet
        • Bitcoin (Testnet)
        • Ethereum (Testnet)
        • Solana (Testnet)
          • SPL Tokens
  • FAQ
    • How do I get in touch with Unit?
    • Where's my transaction?
    • How do fees on Unit work?
    • What type of Bitcoin deposit address does Unit derive?
    • How long does a deposit/withdrawal take?
    • Are there any audits planned?
    • Is my unique deposit address permanent?
    • Can I generate multiple deposit addresses for my Hyperliquid wallet?
  • Legal
    • Regulatory Compliance
    • Terms of Service
    • Privacy Policy
Powered by GitBook
On this page
  1. Developers
  2. API

Generate Address

Generate an address for deposit/withdrawal.

On Unit, protocol addresses are tied to the destination address, the recipient of the deposit or withdrawal.

  • For deposits, the protocol address is a Unit-derived address on the source chain (Bitcoin, Ethereum, or Solana) assigned to a user's Hyperliquid address.

  • For withdrawals, the protocol address is a Unit-derived Hyperliquid address assigned to a user's address on the destination chain.

Once a protocol address is created, all future transfers received by this address - above the minimum amount - are credited to the respective destination address.

The minimum BTC amount is 0.002 BTC (20,000 sats), the minimum ETH amount is 0.05 ETH (5e16 wei), and the minimum SOL amount is 0.1 SOl. This ensures the deposit/withdrawal is sufficiently beyond the network fees associated with the operation.

Endpoint

GET /gen/:src_chain/:dst_chain/:asset/:dst_addr

Request Parameters

Name
Type
Required
Description

src_chain

String

Yes

source chain ("bitcoin", "solana", "ethereum", or "hyperliquid")

dst_chain

String

Yes

destination chain ("bitcoin", "solana", "ethereum", or "hyperliquid")

asset

String

Yes

asset symbol ("btc", "eth", "sol", or "fart")

dst_addr

String

Yes

destination address.

Example Request

The following generates a Bitcoin deposit address for a Hyperliquid user 0x99a5...9e1D

curl -X GET https://api.hyperunit-testnet.xyz/gen/bitcoin/hyperliquid/btc/0x99a5F7202c4983a6f0Ca9d8F0526Fcd9d2be9e1D

200: OK Successful Response

{
  "address": "tb1pwv4p3sgpy8g323mxsa5z4dnm0qnzlqcxk70gwdqvrmaf92psselsxcwf75",
  "signatures": {
    "field-node": "6FdyoeFFKkzT1fylI5xmMNSLMPC3aNICBL0Nj6KokYYpA9dqEpjdLoKBw4uGPDIdZEARc1QagKIirNzqoW5cNw==",
    "hl-node": "gkMJhxswzNqqMBx03wJy5zzHIcXyTrzfgb077F2CC4kDSyXqMPKE/HQOvaLpgMC21v3Fb/G8ujAuXafBIz2tVg==",
    "node-1": "6AbTFibJ7BQEXGFXRP5lROQ6w2aqVMDyy1xMLJL0mnyB1MeIPFIEPKbHKtAbsAdB37NhxSeL9iMKUkM5XnUnFg=="
  },
  "status": "OK"
}

200: Error Response

{"error":"invalid request"}

PreviousAPINextGuardian Signatures

Last updated 19 days ago