> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layerzero.network/llms.txt
> Use this file to discover all available pages before exploring further.

# LayerZero Hyperliquid SDK - Command Reference

> This section provides a reference for the CLI commands available through the `@layerzerolabs/hyperliquid-composer`. LayerZero enables secure crosschain...

This section provides a reference for the CLI commands available through the `@layerzerolabs/hyperliquid-composer` SDK.

Explanations and examples can be found in the [Hyperliquid OFT Deployment Guide](./hyperliquid-oft-deployment).

To view all commands and their options, run:

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer -h
```

### 1. Type Conversions

#### Compute the asset bridge address for a Core Spot token

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer to-bridge --token-index <coreIndex>
```

### 2. Reading Core Spot State

#### List Core Spot metadata

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer core-spot \
    --action get \
    --token-index <coreIndex> \
    --network {testnet | mainnet} \
    [--log-level {info | verbose}]
```

#### Create a deployment file for Core Spot deployment

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer core-spot \
    --action create \
    [--oapp-config <layerzero.config.ts>] \
    --token-index <coreIndex> \
    --network {testnet | mainnet} \
    [--log-level {info | verbose}]
```

#### Get a HIP-1 Token's information

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer hip-token \
    --token-index <coreIndex> \
    --network {testnet | mainnet} \
    [--log-level {info | verbose}]
```

#### View a deployment state

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer spot-deploy-state \
    --token-index <coreIndex> \
    --network {testnet | mainnet} \
    --deployer-address <0x> \
    [--log-level {info | verbose}]
```

### 3. Switching Blocks (`evmUserModify`)

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer set-block \
    --size {small | big} \
    --network {testnet | mainnet} \
    --private-key $PRIVATE_KEY \
    [--log-level {info | verbose}]
```

### 4. Deploying a CoreSpot (`spotDeploy`)

#### 4.1 `userGenesis`

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer user-genesis \
    --token-index <coreIndex> \
    [--action {* | userAndWei | existingTokenAndWei | blacklistUsers}] \
    --network {testnet | mainnet} \
    --private-key $PRIVATE_KEY_HYPERLIQUID \
    [--log-level {info | verbose}]
```

#### 4.2 `genesis`

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer set-genesis \
    --token-index <coreIndex> \
    --network {testnet | mainnet} \
    --private-key $PRIVATE_KEY_HYPERLIQUID \
    [--log-level {info | verbose}]
```

#### 4.3 `registerSpot`

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer register-spot \
    --token-index <coreIndex> \
    --network {testnet | mainnet} \
    --private-key $PRIVATE_KEY_HYPERLIQUID \
    [--log-level {info | verbose}]
```

#### 4.4 `createSpotDeployment`

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer create-spot-deployment \
    --token-index <coreIndex> \
    --network {testnet | mainnet} \
    --private-key $PRIVATE_KEY_HYPERLIQUID \
    [--log-level {info | verbose}]
```

#### 4.5 `setDeployerTradingFeeShare`

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer trading-fee \
    --token-index <coreIndex> \
    --share <[0%,100%]> \
    --network {testnet | mainnet} \
    --private-key $PRIVATE_KEY_HYPERLIQUID \
    [--log-level {info | verbose}]
```

### 5. Linking HyperEVM (OFT) and HyperCore (HIP-1)

#### 5.1 `requestEvmContract`

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer request-evm-contract \
    [--oapp-config <layerzero.config.ts>] \
    --token-index <coreIndex> \
    --network {testnet | mainnet} \
    --private-key $PRIVATE_KEY_HYPERCORE_DEPLOYER \ # CoreSpot Deployer's key
    [--log-level verbose]
```

#### 5.2 `finalizeEvmContract`

```bash wrap theme={null}
npx @layerzerolabs/hyperliquid-composer finalize-evm-contract \
    [--oapp-config <layerzero.config.ts>] \
    --token-index <coreIndex> \
    --network {testnet | mainnet} \
    --private-key $PRIVATE_KEY_HYPEREVM_DEPLOYER \ # OFT Deployer's key (on HyperEVM)
    [--log-level verbose]
```
