// This file is auto-generated by @hey-api/openapi-ts

import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
import type { LaunchNftCollectionData, LaunchNftCollectionResponses, LaunchNftCollectionErrors, LaunchTokenData, LaunchTokenResponses, LaunchTokenErrors, GetContractInfoData, GetContractInfoResponses, GetContractInfoErrors, GetNftInfoData, GetNftInfoResponses, GetNftInfoErrors, GetNftV2InfoData, GetNftV2InfoResponses, GetNftV2InfoErrors, FaucetData, FaucetResponses, FaucetErrors, GetTokenInfoData, GetTokenInfoResponses, GetTokenInfoErrors, GetTokenBalanceData, GetTokenBalanceResponses, GetTokenBalanceErrors, GetNonceData, GetNonceResponses, GetNonceErrors, GetTokenHoldersData, GetTokenHoldersResponses, GetTokenHoldersErrors, GetTransactionsData, GetTransactionsResponses, GetTransactionsErrors, ProveData, ProveResponses, ProveErrors, GetProofData, GetProofResponses, GetProofErrors, SendTransactionData, SendTransactionResponses, SendTransactionErrors, TxStatusData, TxStatusResponses, TxStatusErrors, MintTokensData, MintTokensResponses, MintTokensErrors, MintNftData, MintNftResponses, MintNftErrors, TransferNftData, TransferNftResponses, TransferNftErrors, CmsStoreNftData, CmsStoreNftResponses, CmsStoreNftErrors, CmsReadNftData, CmsReadNftResponses, CmsReadNftErrors, CmsReserveNftData, CmsReserveNftResponses, CmsReserveNftErrors, ApproveNftData, ApproveNftResponses, ApproveNftErrors, SellNftData, SellNftResponses, SellNftErrors, BuyNftData, BuyNftResponses, BuyNftErrors, TransferTokensData, TransferTokensResponses, TransferTokensErrors, AirdropTokensData, AirdropTokensResponses, AirdropTokensErrors, RedeemTokensData, RedeemTokensResponses, RedeemTokensErrors, BurnTokensData, BurnTokensResponses, BurnTokensErrors, TokenBidData, TokenBidResponses, TokenBidErrors, TokenOfferData, TokenOfferResponses, TokenOfferErrors, BuyTokensData, BuyTokensResponses, BuyTokensErrors, SellTokensData, SellTokensResponses, SellTokensErrors, WithdrawTokenBidData, WithdrawTokenBidResponses, WithdrawTokenBidErrors, WithdrawTokenOfferData, WithdrawTokenOfferResponses, WithdrawTokenOfferErrors, UpdateTokenBidWhitelistData, UpdateTokenBidWhitelistResponses, UpdateTokenBidWhitelistErrors, UpdateTokenOfferWhitelistData, UpdateTokenOfferWhitelistResponses, UpdateTokenOfferWhitelistErrors, UpdateTokenAdminWhitelistData, UpdateTokenAdminWhitelistResponses, UpdateTokenAdminWhitelistErrors } from './types.gen.js';
import { client as _heyApiClient } from './client.gen.js';

export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
    /**
     * You can provide a client instance returned by `createClient()` instead of
     * individual options. This might be also useful if you want to implement a
     * custom client.
     */
    client?: Client;
    /**
     * You can pass arbitrary values through the `meta` object. This can be
     * used to access values that aren't defined as part of the SDK function.
     */
    meta?: Record<string, unknown>;
};

/**
 * Deploy a new NFT Collection contract.
 * The `launch` endpoint is used to deploy a new NFT Collection on the Mina blockchain.
 * It allows users to create a new NFT Collection with customizable parameters.
 *
 */
export const launchNftCollection = <ThrowOnError extends boolean = false>(options: Options<LaunchNftCollectionData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<LaunchNftCollectionResponses, LaunchNftCollectionErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/nft/launch',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Deploy a new fungible token contract.
 * The `launch` endpoint is used to deploy a new fungible token on the Mina blockchain.
 * It allows users to create a new token with customizable parameters such as symbol,
 * decimals, URI, and admin contract type (standard or advanced).
 *
 */
export const launchToken = <ThrowOnError extends boolean = false>(options: Options<LaunchTokenData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<LaunchTokenResponses, LaunchTokenErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/launch',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Retrieve contract info
 * Retrieves detailed information about a contract.
 */
export const getContractInfo = <ThrowOnError extends boolean = false>(options: Options<GetContractInfoData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<GetContractInfoResponses, GetContractInfoErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/info/contract',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Retrieve NFT Info for Mina NFT V3
 * Retrieves detailed information about a Mina NFT V3 (NFT standard).
 */
export const getNftInfo = <ThrowOnError extends boolean = false>(options: Options<GetNftInfoData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<GetNftInfoResponses, GetNftInfoErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/info/nft',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Retrieve NFT Info for Mina NFT V2
 * Retrieves detailed information about a Mina NFT V2.
 */
export const getNftV2Info = <ThrowOnError extends boolean = false>(options: Options<GetNftV2InfoData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<GetNftV2InfoResponses, GetNftV2InfoErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/info/nft-v2',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Request Funds from Faucet
 * Requests funds from the faucet for testing purposes.
 */
export const faucet = <ThrowOnError extends boolean = false>(options: Options<FaucetData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<FaucetResponses, FaucetErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/faucet',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Retrieve information about a fungible token.
 * The `info` endpoint retrieves detailed information about a specific fungible token deployed on the Mina blockchain.
 *
 */
export const getTokenInfo = <ThrowOnError extends boolean = false>(options: Options<GetTokenInfoData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<GetTokenInfoResponses, GetTokenInfoErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/info/token',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Retrieve the balance of a specific token for an address.
 * The `balance` endpoint retrieves the balance of a specific fungible token for a given Mina address.
 *
 */
export const getTokenBalance = <ThrowOnError extends boolean = false>(options: Options<GetTokenBalanceData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<GetTokenBalanceResponses, GetTokenBalanceErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/info/balance',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Retrieve the nonce for an address
 * The `nonce` endpoint retrieves the nonce for a given Mina address, taking into account the pending transactions.
 *
 */
export const getNonce = <ThrowOnError extends boolean = false>(options: Options<GetNonceData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<GetNonceResponses, GetNonceErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/info/nonce',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Retrieve the holders of a token
 * The `holders` endpoint retrieves the holders of a token.
 *
 */
export const getTokenHolders = <ThrowOnError extends boolean = false>(options: Options<GetTokenHoldersData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<GetTokenHoldersResponses, GetTokenHoldersErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/info/holders',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Retrieve the transactions of a address
 * The `transactions` endpoint retrieves the transactions of a address.
 *
 */
export const getTransactions = <ThrowOnError extends boolean = false>(options: Options<GetTransactionsData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<GetTransactionsResponses, GetTransactionsErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/info/transactions',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Generate proofs for signed token transactions.
 * The `prove` endpoint initiates the proof generation process for a set of signed token transactions.
 * It returns a job ID which can be used to check the status and retrieve the proofs or tx hashes using the `/proof` endpoint.
 *
 */
export const prove = <ThrowOnError extends boolean = false>(options: Options<ProveData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<ProveResponses, ProveErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/transaction/prove',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Check the status of a proof generation job and retrieve proofs.
 * The `proof` endpoint allows you to check the status of a proof generation job initiated via the `/prove` endpoint.
 * It returns the status of the job and the proofs or tx hashes if they are ready.
 *
 */
export const getProof = <ThrowOnError extends boolean = false>(options: Options<GetProofData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<GetProofResponses, GetProofErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/transaction/proof',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Send a transaction to the Mina blockchain.
 * The `send` endpoint allows you to send a transaction to the Mina blockchain.
 *
 */
export const sendTransaction = <ThrowOnError extends boolean = false>(options: Options<SendTransactionData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<SendTransactionResponses, SendTransactionErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/transaction/send',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Retrieve the status of a transaction by its hash.
 * The `tx-status` endpoint allows you to check the current status of a transaction on the Mina blockchain by providing the transaction hash. It returns whether the transaction has been applied, failed, or is still pending.
 *
 */
export const txStatus = <ThrowOnError extends boolean = false>(options: Options<TxStatusData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<TxStatusResponses, TxStatusErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/transaction/status',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Mint new tokens to a specified address.
 * The `mint` endpoint allows authorized users to mint new tokens of a fungible token on the Mina blockchain.
 * This transaction increases the total supply of the token by creating new tokens and assigning them to a specified address.
 * The sender must have the authority to mint tokens, typically the admin of the token contract.
 *
 */
export const mintTokens = <ThrowOnError extends boolean = false>(options: Options<MintTokensData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<MintTokensResponses, MintTokensErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/mint',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Mint new NFT to a specified address.
 * The `mint` endpoint allows authorized users to mint new NFT on the Mina blockchain.
 * This transaction creates new NFT.
 * The sender must have the authority to mint NFTs, typically the admin of the NFT contract.
 *
 */
export const mintNft = <ThrowOnError extends boolean = false>(options: Options<MintNftData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<MintNftResponses, MintNftErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/nft/mint',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Transfer NFT to a specified address.
 * The `transfer` endpoint allows authorized users to transfer NFT on the Mina blockchain.
 * The sender must have the authority to transfer NFTs, being the owner or approved address of the NFT.
 *
 */
export const transferNft = <ThrowOnError extends boolean = false>(options: Options<TransferNftData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<TransferNftResponses, TransferNftErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/nft/transfer',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Store on-demand NFT in CMS
 * The `store` endpoint allows collection creators to store on-demand NFT in CMS.
 *
 */
export const cmsStoreNft = <ThrowOnError extends boolean = false>(options: Options<CmsStoreNftData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<CmsStoreNftResponses, CmsStoreNftErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/nft/cms/store',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Read on-demand NFT from CMS
 * The `read` endpoint allows collection creators to read on-demand NFT from CMS.
 *
 */
export const cmsReadNft = <ThrowOnError extends boolean = false>(options: Options<CmsReadNftData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<CmsReadNftResponses, CmsReadNftErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/nft/cms/read',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Reserve or remove reserve of on-demand NFT in CMS
 * The `reserve` endpoint allows collection admins to reserve or remove reserve of on-demand NFT in CMS.
 *
 */
export const cmsReserveNft = <ThrowOnError extends boolean = false>(options: Options<CmsReserveNftData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<CmsReserveNftResponses, CmsReserveNftErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/nft/cms/reserve',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Approve a specified address to transfer NFT.
 * The `approve` endpoint allows authorized users to approve a specified address to transfer NFT.
 * The sender must have the authority to approve NFTs, being the owner of the NFT.
 *
 */
export const approveNft = <ThrowOnError extends boolean = false>(options: Options<ApproveNftData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<ApproveNftResponses, ApproveNftErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/nft/approve',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Sell NFT at a specified price by creating a Offer contract.
 * The `sell` endpoint allows authorized users to sell NFT on the Mina blockchain.
 * The sender must have the authority to sell NFTs, being the owner of the NFT or approved address.
 *
 */
export const sellNft = <ThrowOnError extends boolean = false>(options: Options<SellNftData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<SellNftResponses, SellNftErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/nft/sell',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Buy NFT.
 * The `buy` endpoint allows authorized users to buy NFT on the Mina blockchain.
 *
 */
export const buyNft = <ThrowOnError extends boolean = false>(options: Options<BuyNftData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<BuyNftResponses, BuyNftErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/nft/buy',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Transfer tokens from one address to another.
 * The `transfer` endpoint allows users to transfer tokens of a fungible token on the Mina blockchain from one address to another.
 * The sender must have sufficient balance and appropriate permissions to perform the transfer.
 *
 */
export const transferTokens = <ThrowOnError extends boolean = false>(options: Options<TransferTokensData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<TransferTokensResponses, TransferTokensErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/transfer',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Distribute tokens to multiple addresses via airdrop.
 * Allows users to distribute tokens to multiple addresses in a single transaction.
 * This is efficient for distributing tokens during events like token launches or community rewards.
 *
 */
export const airdropTokens = <ThrowOnError extends boolean = false>(options: Options<AirdropTokensData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<AirdropTokensResponses, AirdropTokensErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/airdrop',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Redeem tokens for a MINA (applicable for Fungible Tokens with Bonding Curve Admin)
 * The `redeem` endpoint allows users to redeem tokens of a fungible token on the Mina blockchain for a MINA.
 * The sender must have sufficient balance and appropriate permissions to perform the transfer.
 *
 */
export const redeemTokens = <ThrowOnError extends boolean = false>(options: Options<RedeemTokensData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<RedeemTokensResponses, RedeemTokensErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/redeem',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Burn tokens from one address.
 * The `burn` endpoint allows users to burn tokens of a fungible token on the Mina blockchain from one address.
 * The sender must have sufficient balance and appropriate permissions to perform the burn.
 *
 */
export const burnTokens = <ThrowOnError extends boolean = false>(options: Options<BurnTokensData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<BurnTokensResponses, BurnTokensErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/burn',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Place a bid on a token
 * Allows users to place a bid on an token.
 *
 */
export const tokenBid = <ThrowOnError extends boolean = false>(options: Options<TokenBidData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<TokenBidResponses, TokenBidErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/bid/create',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Create an offer to sell tokens at a specified price.
 * Allows users to create an offer to sell a specified amount of tokens at a given price.
 *
 */
export const tokenOffer = <ThrowOnError extends boolean = false>(options: Options<TokenOfferData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<TokenOfferResponses, TokenOfferErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/offer/create',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Purchase tokens from an existing offer.
 * Allows users to purchase tokens from an existing offer on the Mina blockchain.
 * This endpoint facilitates the transaction where tokens are transferred from the offer address to the buyer's address in exchange for the specified price.
 *
 */
export const buyTokens = <ThrowOnError extends boolean = false>(options: Options<BuyTokensData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<BuyTokensResponses, BuyTokensErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/offer/buy',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Sell a token to the Bid contract.
 * Allows token owners to sell their tokens to the Bid contract.
 *
 */
export const sellTokens = <ThrowOnError extends boolean = false>(options: Options<SellTokensData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<SellTokensResponses, SellTokensErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/bid/sell',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Withdraw a previously placed bid on an token.
 * Allows users to withdraw a bid they have previously placed using the `/bid` endpoint.
 * This transaction cancels the active bid, releasing any locked funds.
 *
 */
export const withdrawTokenBid = <ThrowOnError extends boolean = false>(options: Options<WithdrawTokenBidData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<WithdrawTokenBidResponses, WithdrawTokenBidErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/bid/withdraw',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Withdraw a previously made offer to sell a token.
 * Allows users to withdraw an offer they have previously made using the `/offer` endpoint.
 * This transaction cancels the active offer, releasing any locked tokens.
 *
 */
export const withdrawTokenOffer = <ThrowOnError extends boolean = false>(options: Options<WithdrawTokenOfferData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<WithdrawTokenOfferResponses, WithdrawTokenOfferErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/offer/withdraw',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Update the bid whitelist
 * Allows administrators to update the whitelist of addresses permitted to interact with the Bid contract.
 * This is essential for managing participation in bidding processes, especially for controlled or private auctions.
 *
 */
export const updateTokenBidWhitelist = <ThrowOnError extends boolean = false>(options: Options<UpdateTokenBidWhitelistData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<UpdateTokenBidWhitelistResponses, UpdateTokenBidWhitelistErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/bid/whitelist',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Update the offer whitelist
 * Allows administrators to update the whitelist of addresses permitted to interact with the Offer contract.
 * This is essential for managing participation in offer processes, especially for controlled or private sales.
 *
 */
export const updateTokenOfferWhitelist = <ThrowOnError extends boolean = false>(options: Options<UpdateTokenOfferWhitelistData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<UpdateTokenOfferWhitelistResponses, UpdateTokenOfferWhitelistErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/offer/whitelist',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};

/**
 * Update the advanced admin whitelist
 * Allows administrators to update the whitelist of admin contracts.
 *
 */
export const updateTokenAdminWhitelist = <ThrowOnError extends boolean = false>(options: Options<UpdateTokenAdminWhitelistData, ThrowOnError>) => {
    return (options.client ?? _heyApiClient).post<UpdateTokenAdminWhitelistResponses, UpdateTokenAdminWhitelistErrors, ThrowOnError>({
        security: [
            {
                name: 'x-api-key',
                type: 'apiKey'
            }
        ],
        url: '/token/admin/whitelist',
        ...options,
        headers: {
            'Content-Type': 'application/json',
            ...options.headers
        }
    });
};