/**
 * Program IDL in camelCase format in order to be used in JS/TS.
 *
 * Note that this is only a type helper and is not the actual IDL. The original
 * IDL can be found at `target/idl/transfer_hook.json`.
 */
export type TransferHook = {
  "address": "HbBpH9opFW9gcYVanHLweKuHhWQ8P3Kcc1mbpAx1vojz",
  "metadata": {
    "name": "transferHook",
    "version": "0.1.0",
    "spec": "0.1.0",
    "description": "Created with Anchor"
  },
  "instructions": [
    {
      "name": "initializeExtraAccountMetaList",
      "discriminator": [
        43,
        34,
        13,
        49,
        167,
        88,
        235,
        235
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "extraAccountMetaList",
          "writable": true
        },
        {
          "name": "mint"
        },
        {
          "name": "systemProgram"
        },
        {
          "name": "liqsolCore"
        }
      ],
      "args": []
    },
    {
      "name": "transferHook",
      "discriminator": [
        105,
        37,
        101,
        197,
        75,
        251,
        102,
        26
      ],
      "accounts": [
        {
          "name": "sourceToken"
        },
        {
          "name": "mint"
        },
        {
          "name": "destinationToken"
        },
        {
          "name": "authority"
        },
        {
          "name": "extraAccountMetaList"
        },
        {
          "name": "liqsolCore"
        },
        {
          "name": "senderUserRecord",
          "writable": true
        },
        {
          "name": "receiverUserRecord",
          "writable": true
        },
        {
          "name": "distributionState",
          "writable": true
        },
        {
          "name": "bucketTokenAccount"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "updateExtraAccountMetaList",
      "discriminator": [
        44,
        125,
        141,
        226,
        97,
        179,
        166,
        96
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "globalConfig"
        },
        {
          "name": "extraAccountMetaList",
          "writable": true
        },
        {
          "name": "mint"
        },
        {
          "name": "systemProgram"
        },
        {
          "name": "liqsolCore"
        }
      ],
      "args": []
    }
  ],
  "accounts": [
    {
      "name": "distributionState",
      "discriminator": [
        7,
        25,
        94,
        15,
        208,
        170,
        4,
        103
      ]
    },
    {
      "name": "globalConfig",
      "discriminator": [
        149,
        8,
        156,
        202,
        160,
        252,
        176,
        217
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "amountTooBig"
    },
    {
      "code": 6001,
      "name": "isNotCurrentlyTransferring"
    },
    {
      "code": 6002,
      "name": "tlvAccountResolutionError"
    },
    {
      "code": 6003,
      "name": "cannotTransferToBucket",
      "msg": "Cannot transfer liqSOL directly to bucket - only protocol minting is allowed"
    },
    {
      "code": 6004,
      "name": "unauthorized",
      "msg": "Unauthorized: caller is not the admin"
    }
  ],
  "types": [
    {
      "name": "distributionState",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "liqsolMint",
            "type": "pubkey"
          },
          {
            "name": "currentIndex",
            "type": "u64"
          },
          {
            "name": "totalShares",
            "docs": [
              "Sum of all user shares across the system"
            ],
            "type": "u64"
          },
          {
            "name": "lastBucketBalance",
            "docs": [
              "Last observed bucket balance used for incremental index updates"
            ],
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "bucketBump",
            "docs": [
              "Cached bucket authority bump to avoid repeated find_program_address calls"
            ],
            "type": "u8"
          },
          {
            "name": "poolBump",
            "docs": [
              "Cached pool authority bump to avoid repeated find_program_address calls"
            ],
            "type": "u8"
          },
          {
            "name": "bucketAuthority",
            "docs": [
              "Cached bucket authority pubkey for transfer-hook optimization"
            ],
            "type": "pubkey"
          },
          {
            "name": "poolAuthority",
            "docs": [
              "Cached pool authority pubkey for transfer-hook optimization"
            ],
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "globalConfig",
      "docs": [
        "Zero-copy global config PDA"
      ],
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                7
              ]
            }
          },
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "cranky",
            "type": "pubkey"
          },
          {
            "name": "reservedPubkey",
            "type": {
              "array": [
                "pubkey",
                1
              ]
            }
          },
          {
            "name": "minUserDeposit",
            "docs": [
              "Minimum SOL amount a user can deposit"
            ],
            "type": "u64"
          },
          {
            "name": "minUnstakeRequest",
            "docs": [
              "Minimum SOL amount for an unstake/withdrawal request"
            ],
            "type": "u64"
          },
          {
            "name": "minRebalanceStakeDelta",
            "docs": [
              "Minimum stake delta to trigger a stake rebalance order"
            ],
            "type": "u64"
          },
          {
            "name": "minRebalanceUnstakeDelta",
            "docs": [
              "Minimum unstake delta to trigger an unstake rebalance order"
            ],
            "type": "u64"
          },
          {
            "name": "transientThreshold",
            "docs": [
              "Minimum transient stake to include in effective stake calculations"
            ],
            "type": "u64"
          },
          {
            "name": "minLateEpochSlotGate",
            "docs": [
              "Minimum slots that must have elapsed in the epoch before late epoch operations can execute"
            ],
            "type": "u64"
          },
          {
            "name": "reservedU64",
            "type": {
              "array": [
                "u64",
                2
              ]
            }
          },
          {
            "name": "cooldownEpochs",
            "docs": [
              "Epochs a validator must wait in the graveyard before it is booted. This begins after the last recorded state change"
            ],
            "type": "u16"
          },
          {
            "name": "depositFeeMultiplier",
            "docs": [
              "Multiplier for deposit fee calculation, this would be average \"pay rate x number of epochs we expect the stake to warm up\""
            ],
            "type": "u16"
          },
          {
            "name": "minVppEntry",
            "docs": [
              "Minimum VPP score required to enter the active validator set, this is a fall back for when the val set is really small"
            ],
            "type": "u16"
          },
          {
            "name": "minVppExit",
            "docs": [
              "VPP score threshold below which a validator is removed from active set, again a fall back"
            ],
            "type": "u16"
          },
          {
            "name": "tinyNetworkThreshold",
            "docs": [
              "Max validators for \"tiny\" network band (uses fixed VPP thresholds) as above"
            ],
            "type": "u16"
          },
          {
            "name": "smallNetworkThreshold",
            "docs": [
              "Max validators for \"small\" network band (uses percentile-based selection)"
            ],
            "type": "u16"
          },
          {
            "name": "mediumNetworkThreshold",
            "docs": [
              "Max validators for \"medium\" network band (uses percentile-based selection)"
            ],
            "type": "u16"
          },
          {
            "name": "largeNetworkEntryRank",
            "docs": [
              "Fixed rank threshold to enter active set in large networks (0-indexed)"
            ],
            "type": "u16"
          },
          {
            "name": "largeNetworkExitRank",
            "docs": [
              "Fixed rank threshold to exit active set in large networks (0-indexed)"
            ],
            "type": "u16"
          },
          {
            "name": "reservedU16",
            "type": {
              "array": [
                "u16",
                3
              ]
            }
          },
          {
            "name": "smallNetworkEntryPercent",
            "docs": [
              "Percentile rank required to enter active set in small networks"
            ],
            "type": "u8"
          },
          {
            "name": "smallNetworkExitPercent",
            "docs": [
              "Percentile rank below which validators exit in small networks"
            ],
            "type": "u8"
          },
          {
            "name": "mediumNetworkEntryPercent",
            "docs": [
              "Percentile rank required to enter active set in medium networks"
            ],
            "type": "u8"
          },
          {
            "name": "mediumNetworkExitPercent",
            "docs": [
              "Percentile rank below which validators exit in medium networks"
            ],
            "type": "u8"
          },
          {
            "name": "reservedU8",
            "type": {
              "array": [
                "u8",
                2
              ]
            }
          },
          {
            "name": "featureFlags",
            "docs": [
              "Bit 0: DepositsEnabled, Bit 1: WithdrawalsEnabled, Bit 2: ClaimWithdrawalsEnabled,",
              "Bit 3: ProcessStakeOrdersEnabled, Bit 4: ProcessUnstakeOrdersEnabled,",
              "Bit 5: ProcessPayCycleEnabled, Bit 6: RebalancingEnabled, Bits 7-15: Reserved"
            ],
            "type": "u16"
          },
          {
            "name": "reservedFlags",
            "type": {
              "array": [
                "u16",
                1
              ]
            }
          }
        ]
      }
    }
  ]
};
