{
  "address": "94U5AHQMKkV5txNJ17QPXWoh474PheGou6cNP2FEuL1d",
  "metadata": {
    "name": "gateway",
    "version": "0.1.0",
    "spec": "0.1.0",
    "description": "ZetaChain Gateway program on Solana"
  },
  "instructions": [
    {
      "name": "call",
      "docs": [
        "Calls a contract on ZetaChain zEVM.",
        "# Arguments",
        "* `receiver` - The Ethereum address of the receiver on ZetaChain zEVM.",
        "* `message` - The message passed to the contract.",
        "* `max_message_size` - The maximum allowed message size."
      ],
      "discriminator": [
        181,
        94,
        56,
        161,
        194,
        221,
        200,
        3
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer making the call."
          ],
          "writable": true,
          "signer": true
        }
      ],
      "args": [
        {
          "name": "receiver",
          "type": {
            "array": [
              "u8",
              20
            ]
          }
        },
        {
          "name": "message",
          "type": "bytes"
        },
        {
          "name": "revert_options",
          "type": {
            "option": {
              "defined": {
                "name": "RevertOptions"
              }
            }
          }
        }
      ]
    },
    {
      "name": "deposit",
      "docs": [
        "Deposits SOL into the program and credits the `receiver` on ZetaChain zEVM.",
        "# Arguments",
        "* `ctx` - The instruction context.",
        "* `amount` - The amount of lamports to deposit.",
        "* `receiver` - The Ethereum address of the receiver on ZetaChain zEVM.",
        "* `deposit_fee` - The fee to be deducted from the deposited amount."
      ],
      "discriminator": [
        242,
        35,
        198,
        137,
        82,
        225,
        242,
        182
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer making the deposit."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        },
        {
          "name": "system_program",
          "docs": [
            "The system program."
          ],
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "receiver",
          "type": {
            "array": [
              "u8",
              20
            ]
          }
        },
        {
          "name": "revert_options",
          "type": {
            "option": {
              "defined": {
                "name": "RevertOptions"
              }
            }
          }
        }
      ]
    },
    {
      "name": "deposit_and_call",
      "docs": [
        "Deposits SOL and calls a contract on ZetaChain zEVM.",
        "# Arguments",
        "* `ctx` - The instruction context.",
        "* `amount` - The amount of SPL tokens to deposit.",
        "* `receiver` - The Ethereum address of the receiver on ZetaChain zEVM.",
        "* `message` - The message passed to the contract.",
        "* `revert_options` - The revert options created by the caller."
      ],
      "discriminator": [
        65,
        33,
        186,
        198,
        114,
        223,
        133,
        57
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer making the deposit."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        },
        {
          "name": "system_program",
          "docs": [
            "The system program."
          ],
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "receiver",
          "type": {
            "array": [
              "u8",
              20
            ]
          }
        },
        {
          "name": "message",
          "type": "bytes"
        },
        {
          "name": "revert_options",
          "type": {
            "option": {
              "defined": {
                "name": "RevertOptions"
              }
            }
          }
        }
      ]
    },
    {
      "name": "deposit_spl_token",
      "docs": [
        "Deposits SPL tokens and credits the `receiver` on ZetaChain zEVM.",
        "# Arguments",
        "* `ctx` - The instruction context.",
        "* `amount` - The amount of SPL tokens to deposit.",
        "* `receiver` - The Ethereum address of the receiver on ZetaChain zEVM."
      ],
      "discriminator": [
        86,
        172,
        212,
        121,
        63,
        233,
        96,
        144
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer making the deposit."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        },
        {
          "name": "whitelist_entry",
          "docs": [
            "The whitelist entry account for the SPL token."
          ],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  119,
                  104,
                  105,
                  116,
                  101,
                  108,
                  105,
                  115,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "mint_account"
              }
            ]
          }
        },
        {
          "name": "mint_account",
          "docs": [
            "The mint account of the SPL token being deposited."
          ]
        },
        {
          "name": "token_program",
          "docs": [
            "The token program."
          ],
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "from",
          "docs": [
            "The source token account owned by the signer."
          ],
          "writable": true
        },
        {
          "name": "to",
          "docs": [
            "The destination token account owned by the PDA."
          ],
          "writable": true
        },
        {
          "name": "system_program",
          "docs": [
            "The system program."
          ],
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "receiver",
          "type": {
            "array": [
              "u8",
              20
            ]
          }
        },
        {
          "name": "revert_options",
          "type": {
            "option": {
              "defined": {
                "name": "RevertOptions"
              }
            }
          }
        }
      ]
    },
    {
      "name": "deposit_spl_token_and_call",
      "docs": [
        "Deposits SPL tokens and calls a contract on ZetaChain zEVM.",
        "# Arguments",
        "* `ctx` - The instruction context.",
        "* `amount` - The amount of SPL tokens to deposit.",
        "* `receiver` - The Ethereum address of the receiver on ZetaChain zEVM.",
        "* `message` - The message passed to the contract.",
        "* `deposit_fee` - The fee to be deducted from the deposited amount.",
        "* `max_message_size` - The maximum allowed message size."
      ],
      "discriminator": [
        14,
        181,
        27,
        187,
        171,
        61,
        237,
        147
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer making the deposit."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        },
        {
          "name": "whitelist_entry",
          "docs": [
            "The whitelist entry account for the SPL token."
          ],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  119,
                  104,
                  105,
                  116,
                  101,
                  108,
                  105,
                  115,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "mint_account"
              }
            ]
          }
        },
        {
          "name": "mint_account",
          "docs": [
            "The mint account of the SPL token being deposited."
          ]
        },
        {
          "name": "token_program",
          "docs": [
            "The token program."
          ],
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "from",
          "docs": [
            "The source token account owned by the signer."
          ],
          "writable": true
        },
        {
          "name": "to",
          "docs": [
            "The destination token account owned by the PDA."
          ],
          "writable": true
        },
        {
          "name": "system_program",
          "docs": [
            "The system program."
          ],
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "receiver",
          "type": {
            "array": [
              "u8",
              20
            ]
          }
        },
        {
          "name": "message",
          "type": "bytes"
        },
        {
          "name": "revert_options",
          "type": {
            "option": {
              "defined": {
                "name": "RevertOptions"
              }
            }
          }
        }
      ]
    },
    {
      "name": "execute",
      "docs": [
        "Withdraws amount to destination program pda, and calls on_call on destination program",
        "# Arguments:",
        "* `amount`: Amount of SOL to transfer",
        "* `sender`: Sender's address",
        "* `data`: Arbitrary data to pass to the destination program",
        "* `signature`: Signature of the message",
        "* `recovery_id`: Recovery ID of the signature",
        "* `message_hash`: Hash of the message",
        "* `nonce`: Nonce of the message"
      ],
      "discriminator": [
        130,
        221,
        242,
        154,
        13,
        193,
        189,
        29
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer making the deposit."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        },
        {
          "name": "destination_program",
          "docs": [
            "The destination program."
          ]
        },
        {
          "name": "destination_program_pda",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  110,
                  101,
                  99,
                  116,
                  101,
                  100
                ]
              }
            ],
            "program": {
              "kind": "account",
              "path": "destination_program"
            }
          }
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "sender",
          "type": {
            "array": [
              "u8",
              20
            ]
          }
        },
        {
          "name": "data",
          "type": "bytes"
        },
        {
          "name": "signature",
          "type": {
            "array": [
              "u8",
              64
            ]
          }
        },
        {
          "name": "recovery_id",
          "type": "u8"
        },
        {
          "name": "message_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "nonce",
          "type": "u64"
        }
      ]
    },
    {
      "name": "execute_spl_token",
      "docs": [
        "Execute with SPL tokens. Caller is TSS.",
        "# Arguments:",
        "* `decimals`: Decimals of the token",
        "* `amount`: Amount of tokens to transfer",
        "* `sender`: Sender's Ethereum address",
        "* `data`: Arbitrary data to pass to the destination program",
        "* `signature`: Signature of the message",
        "* `recovery_id`: Recovery ID of the signature",
        "* `message_hash`: Hash of the message",
        "* `nonce`: Nonce of the message"
      ],
      "discriminator": [
        121,
        99,
        79,
        69,
        77,
        243,
        46,
        199
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer making the withdrawal."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        },
        {
          "name": "pda_ata",
          "docs": [
            "The associated token account for the Gateway PDA."
          ],
          "writable": true
        },
        {
          "name": "mint_account",
          "docs": [
            "The mint account of the SPL token being withdrawn."
          ]
        },
        {
          "name": "destination_program",
          "docs": [
            "The destination program."
          ]
        },
        {
          "name": "destination_program_pda",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  110,
                  101,
                  99,
                  116,
                  101,
                  100
                ]
              }
            ],
            "program": {
              "kind": "account",
              "path": "destination_program"
            }
          }
        },
        {
          "name": "destination_program_pda_ata",
          "docs": [
            "The destination program associated token account."
          ],
          "writable": true
        },
        {
          "name": "token_program",
          "docs": [
            "The token program."
          ],
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "docs": [
            "The associated token program."
          ],
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "docs": [
            "The system program."
          ],
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "decimals",
          "type": "u8"
        },
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "sender",
          "type": {
            "array": [
              "u8",
              20
            ]
          }
        },
        {
          "name": "data",
          "type": "bytes"
        },
        {
          "name": "signature",
          "type": {
            "array": [
              "u8",
              64
            ]
          }
        },
        {
          "name": "recovery_id",
          "type": "u8"
        },
        {
          "name": "message_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "nonce",
          "type": "u64"
        }
      ]
    },
    {
      "name": "increment_nonce",
      "docs": [
        "Increments nonce, used by TSS in case outbound fails.",
        "# Arguments:",
        "* `ctx` - The instruction context.",
        "* `amount` - The amount of lamports to increment.",
        "* `signature` - The signature of the message.",
        "* `recovery_id` - The recovery ID of the signature.",
        "* `message_hash` - The hash of the message.",
        "* `nonce` - The nonce of the message."
      ],
      "discriminator": [
        84,
        149,
        209,
        233,
        228,
        66,
        195,
        237
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer incrementing nonce."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "signature",
          "type": {
            "array": [
              "u8",
              64
            ]
          }
        },
        {
          "name": "recovery_id",
          "type": "u8"
        },
        {
          "name": "message_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "nonce",
          "type": "u64"
        }
      ]
    },
    {
      "name": "initialize",
      "docs": [
        "Initializes the gateway PDA.",
        "",
        "# Arguments",
        "* `ctx` - The instruction context.",
        "* `tss_address` - The Ethereum TSS address (20 bytes).",
        "* `chain_id` - The chain ID associated with the PDA."
      ],
      "discriminator": [
        175,
        175,
        109,
        31,
        13,
        152,
        155,
        237
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer initializing the program."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        },
        {
          "name": "system_program",
          "docs": [
            "The system program."
          ],
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "tss_address",
          "type": {
            "array": [
              "u8",
              20
            ]
          }
        },
        {
          "name": "chain_id",
          "type": "u64"
        }
      ]
    },
    {
      "name": "set_deposit_paused",
      "docs": [
        "Pauses or unpauses deposits. Caller is authority stored in PDA.",
        "# Arguments",
        "* `ctx` - The instruction context.",
        "* `deposit_paused` - Boolean flag to pause or unpause deposits."
      ],
      "discriminator": [
        98,
        179,
        141,
        24,
        246,
        120,
        164,
        143
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer performing the update."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "deposit_paused",
          "type": "bool"
        }
      ]
    },
    {
      "name": "unwhitelist_spl_mint",
      "docs": [
        "Unwhitelists an SPL token. Caller is TSS.",
        "# Arguments",
        "* `ctx` - The instruction context.",
        "* `signature` - The TSS signature.",
        "* `recovery_id` - The recovery ID for signature verification.",
        "* `message_hash` - Message hash for signature verification.",
        "* `nonce` - The current nonce value."
      ],
      "discriminator": [
        73,
        142,
        63,
        191,
        233,
        238,
        170,
        104
      ],
      "accounts": [
        {
          "name": "authority",
          "docs": [
            "The account of the authority performing the operation."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        },
        {
          "name": "whitelist_entry",
          "docs": [
            "The whitelist entry account being closed."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  119,
                  104,
                  105,
                  116,
                  101,
                  108,
                  105,
                  115,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "whitelist_candidate"
              }
            ]
          }
        },
        {
          "name": "whitelist_candidate",
          "docs": [
            "The mint account of the SPL token being unwhitelisted."
          ]
        }
      ],
      "args": [
        {
          "name": "signature",
          "type": {
            "array": [
              "u8",
              64
            ]
          }
        },
        {
          "name": "recovery_id",
          "type": "u8"
        },
        {
          "name": "message_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "nonce",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_authority",
      "docs": [
        "Updates the PDA authority. Caller is authority stored in PDA.",
        "# Arguments",
        "* `ctx` - The instruction context.",
        "* `new_authority_address` - The new authority's public key."
      ],
      "discriminator": [
        32,
        46,
        64,
        28,
        149,
        75,
        243,
        88
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer performing the update."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "new_authority_address",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "update_tss",
      "docs": [
        "Updates the TSS address. Caller is authority stored in PDA.",
        "# Arguments",
        "* `ctx` - The instruction context.",
        "* `tss_address` - The new Ethereum TSS address (20 bytes)."
      ],
      "discriminator": [
        227,
        136,
        3,
        242,
        177,
        168,
        10,
        160
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer performing the update."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "tss_address",
          "type": {
            "array": [
              "u8",
              20
            ]
          }
        }
      ]
    },
    {
      "name": "whitelist_spl_mint",
      "docs": [
        "Whitelists a new SPL token. Caller is TSS.",
        "# Arguments",
        "* `ctx` - The instruction context.",
        "* `signature` - The TSS signature.",
        "* `recovery_id` - The recovery ID for signature verification.",
        "* `message_hash` - Message hash for signature verification.",
        "* `nonce` - The current nonce value."
      ],
      "discriminator": [
        30,
        110,
        162,
        42,
        208,
        147,
        254,
        219
      ],
      "accounts": [
        {
          "name": "authority",
          "docs": [
            "The account of the authority performing the operation."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        },
        {
          "name": "whitelist_entry",
          "docs": [
            "The whitelist entry account being initialized."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  119,
                  104,
                  105,
                  116,
                  101,
                  108,
                  105,
                  115,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "whitelist_candidate"
              }
            ]
          }
        },
        {
          "name": "whitelist_candidate",
          "docs": [
            "The mint account of the SPL token being whitelisted."
          ]
        },
        {
          "name": "system_program",
          "docs": [
            "The system program."
          ],
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "signature",
          "type": {
            "array": [
              "u8",
              64
            ]
          }
        },
        {
          "name": "recovery_id",
          "type": "u8"
        },
        {
          "name": "message_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "nonce",
          "type": "u64"
        }
      ]
    },
    {
      "name": "withdraw",
      "docs": [
        "Withdraws SOL. Caller is TSS.",
        "Arguments:",
        "* `ctx` - The instruction context.",
        "* `amount` - The amount of lamports to withdraw.",
        "* `signature` - The signature of the message.",
        "* `recovery_id` - The recovery ID of the signature.",
        "* `message_hash` - The hash of the message.",
        "* `nonce` - The nonce of the message."
      ],
      "discriminator": [
        183,
        18,
        70,
        156,
        148,
        109,
        161,
        34
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer making the withdrawal."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        },
        {
          "name": "recipient",
          "docs": [
            "The recipient account for the withdrawn SOL."
          ],
          "writable": true
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "signature",
          "type": {
            "array": [
              "u8",
              64
            ]
          }
        },
        {
          "name": "recovery_id",
          "type": "u8"
        },
        {
          "name": "message_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "nonce",
          "type": "u64"
        }
      ]
    },
    {
      "name": "withdraw_spl_token",
      "docs": [
        "Withdraws SPL tokens. Caller is TSS.",
        "Arguments:",
        "* `ctx` - The instruction context.",
        "* `decimals` - The decimals of the token.",
        "* `amount` - The amount of tokens to transfer.",
        "* `signature` - The signature of the message.",
        "* `recovery_id` - The recovery ID of the signature.",
        "* `message_hash` - The hash of the message.",
        "* `nonce` - The nonce of the message."
      ],
      "discriminator": [
        219,
        156,
        234,
        11,
        89,
        235,
        246,
        32
      ],
      "accounts": [
        {
          "name": "signer",
          "docs": [
            "The account of the signer making the withdrawal."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pda",
          "docs": [
            "Gateway PDA."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97
                ]
              }
            ]
          }
        },
        {
          "name": "pda_ata",
          "docs": [
            "The associated token account for the Gateway PDA."
          ],
          "writable": true
        },
        {
          "name": "mint_account",
          "docs": [
            "The mint account of the SPL token being withdrawn."
          ]
        },
        {
          "name": "recipient",
          "docs": [
            "The recipient account for the withdrawn tokens."
          ]
        },
        {
          "name": "recipient_ata",
          "docs": [
            "The recipient's associated token account."
          ],
          "writable": true
        },
        {
          "name": "token_program",
          "docs": [
            "The token program."
          ],
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "docs": [
            "The associated token program."
          ],
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "docs": [
            "The system program."
          ],
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "decimals",
          "type": "u8"
        },
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "signature",
          "type": {
            "array": [
              "u8",
              64
            ]
          }
        },
        {
          "name": "recovery_id",
          "type": "u8"
        },
        {
          "name": "message_hash",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "nonce",
          "type": "u64"
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "Pda",
      "discriminator": [
        169,
        245,
        0,
        205,
        225,
        36,
        43,
        94
      ]
    },
    {
      "name": "WhitelistEntry",
      "discriminator": [
        51,
        70,
        173,
        81,
        219,
        192,
        234,
        62
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "SignerIsNotAuthority",
      "msg": "SignerIsNotAuthority"
    },
    {
      "code": 6001,
      "name": "NonceMismatch",
      "msg": "NonceMismatch"
    },
    {
      "code": 6002,
      "name": "TSSAuthenticationFailed",
      "msg": "TSSAuthenticationFailed"
    },
    {
      "code": 6003,
      "name": "DepositToAddressMismatch",
      "msg": "DepositToAddressMismatch"
    },
    {
      "code": 6004,
      "name": "MessageHashMismatch",
      "msg": "MessageHashMismatch"
    },
    {
      "code": 6005,
      "name": "MemoLengthExceeded",
      "msg": "MemoLengthExceeded"
    },
    {
      "code": 6006,
      "name": "DepositPaused",
      "msg": "DepositPaused"
    },
    {
      "code": 6007,
      "name": "SPLAtaAndMintAddressMismatch",
      "msg": "SPLAtaAndMintAddressMismatch"
    },
    {
      "code": 6008,
      "name": "EmptyReceiver",
      "msg": "EmptyReceiver"
    },
    {
      "code": 6009,
      "name": "InvalidInstructionData",
      "msg": "InvalidInstructionData"
    }
  ],
  "types": [
    {
      "name": "Pda",
      "docs": [
        "PDA account storing program state and settings."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "nonce",
            "docs": [
              "The nonce to ensure each signature can only be used once."
            ],
            "type": "u64"
          },
          {
            "name": "tss_address",
            "docs": [
              "The Ethereum TSS address (20 bytes)."
            ],
            "type": {
              "array": [
                "u8",
                20
              ]
            }
          },
          {
            "name": "authority",
            "docs": [
              "The authority controlling the PDA."
            ],
            "type": "pubkey"
          },
          {
            "name": "chain_id",
            "docs": [
              "The chain ID associated with the PDA."
            ],
            "type": "u64"
          },
          {
            "name": "deposit_paused",
            "docs": [
              "Flag to indicate whether deposits are paused."
            ],
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "RevertOptions",
      "docs": [
        "Struct containing revert options",
        "# Arguments",
        "* `revert_address` Address to receive revert.",
        "* `abort_address` Address to receive funds if aborted.",
        "* `call_on_revert` Flag if on_revert hook should be called.",
        "* `revert_message` Arbitrary data sent back in on_revert.",
        "* `on_revert_gas_limit` Gas limit for revert tx."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "revert_address",
            "type": "pubkey"
          },
          {
            "name": "abort_address",
            "type": "pubkey"
          },
          {
            "name": "call_on_revert",
            "type": "bool"
          },
          {
            "name": "revert_message",
            "type": "bytes"
          },
          {
            "name": "on_revert_gas_limit",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "WhitelistEntry",
      "docs": [
        "Whitelist entry account for whitelisted SPL tokens."
      ],
      "type": {
        "kind": "struct",
        "fields": []
      }
    }
  ]
}