/**
 * 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": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "extraAccountMetaList",
          "writable": true
        },
        {
          "name": "mint"
        },
        {
          "name": "systemProgram"
        },
        {
          "name": "liqsolCore"
        }
      ],
      "args": []
    }
  ],
  "accounts": [
    {
      "name": "distributionState",
      "discriminator": [
        7,
        25,
        94,
        15,
        208,
        170,
        4,
        103
      ]
    }
  ],
  "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"
    }
  ],
  "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"
          }
        ]
      }
    }
  ]
};
