Skip to content

Overview

HookDescription
AMM Hooks
amm.useBurnHook for burning liquidity tokens and receiving the underlying token pair
amm.useLiquidityBalanceHook for getting the liquidity balance for an address in a specific pool
amm.useMintHook for minting liquidity tokens by providing a token pair
amm.usePoolHook for getting the reserves for a liquidity pool
amm.useRebalanceSwapHook for performing a rebalance swap between user and validator tokens
amm.useWatchBurnHook for watching liquidity burn events
amm.useWatchFeeSwapHook for watching fee swap events
amm.useWatchMintHook for watching liquidity mint events
amm.useWatchRebalanceSwapHook for watching rebalance swap events
Faucet Hooks
faucet.useFundHook for funding an account with testnet tokens
Fee Hooks
fee.useSetUserTokenHook for setting the user's default fee token preference
fee.useUserTokenHook for getting the user's default fee token preference
fee.useWatchSetUserTokenHook for watching user token set events
Nonce Hooks
nonce.useNonceHook for getting the nonce for an account and nonce key
nonce.useNonceKeyCountHook for getting the number of active nonce keys for an account
nonce.useWatchActiveKeyCountChangedHook for watching active key count changed events
nonce.useWatchNonceIncrementedHook for watching nonce incremented events
Policy Hooks
policy.useCreateHook for creating a new transfer policy for token access control
policy.useDataHook for getting the data for a transfer policy, including its type and admin address
policy.useIsAuthorizedHook for checking if an address is authorized by a transfer policy
policy.useModifyBlacklistHook for modifying the blacklist for a blacklist-type transfer policy
policy.useModifyWhitelistHook for modifying the whitelist for a whitelist-type transfer policy
policy.useSetAdminHook for setting the admin for a transfer policy
policy.useWatchAdminUpdatedHook for watching policy admin update events
policy.useWatchBlacklistUpdatedHook for watching blacklist update events
policy.useWatchCreateHook for watching policy creation events
policy.useWatchWhitelistUpdatedHook for watching whitelist update events
Reward Hooks
reward.useClaimHook for claiming accumulated rewards
reward.useGetTotalPerSecondHook for getting the total reward per second rate for all active streams
reward.useSetRecipientHook for setting or changing the reward recipient for a token holder
reward.useStartHook for starting a new reward stream that distributes tokens to opted-in holders
reward.useUserRewardInfoHook for getting reward information for a specific account
reward.useWatchRewardRecipientSetHook for watching reward recipient set events
reward.useWatchRewardScheduledHook for watching reward scheduled events
Stablecoin DEX Hooks
dex.useBalanceHook for getting a user's token balance on the Stablecoin DEX
dex.useBuyHook for buying a specific amount of tokens from the Stablecoin DEX orderbook
dex.useBuyQuoteHook for getting the quote for buying a specific amount of tokens
dex.useCancelHook for canceling an order from the orderbook
dex.useCreatePairHook for creating a new trading pair on the DEX
dex.useOrderHook for getting an order's details from the orderbook
dex.usePlaceHook for placing a limit order on the orderbook
dex.usePlaceFlipHook for placing a flip order that automatically flips when filled
dex.useTickLevelHook for getting the price level information at a specific tick
dex.useSellHook for selling a specific amount of tokens from the Stablecoin DEX orderbook
dex.useSellQuoteHook for getting the quote for selling a specific amount of tokens
dex.useWatchFlipOrderPlacedHook for watching flip order placed events
dex.useWatchOrderCancelledHook for watching order cancelled events
dex.useWatchOrderFilledHook for watching order filled events
dex.useWatchOrderPlacedHook for watching order placed events
dex.useWithdrawHook for withdrawing tokens from the DEX to the caller's wallet
Token Hooks
token.useAllowanceHook for getting the amount of tokens that a spender is approved to transfer on behalf of an owner
token.useApproveHook for approving a spender to transfer TIP-20 tokens on behalf of the caller
token.useBalanceHook for getting the token balance of an address
token.useBurnHook for burning TIP-20 tokens from the caller's balance
token.useBurnBlockedHook for burning TIP-20 tokens from a blocked address
token.useChangeTransferPolicyHook for changing the transfer policy for a TIP-20 token
token.useCreateHook for creating a new TIP-20 token and assigning the admin role to the calling account
token.useGrantRolesHook for granting one or more roles to an address
token.useHasRoleHook for checking if an address has a specific role
token.useMetadataHook for getting the metadata for a TIP-20 token, including name, symbol, decimals, currency, and total supply
token.useMintHook for minting new TIP-20 tokens to a recipient
token.usePauseHook for pausing a TIP-20 token, preventing all transfers
token.useRenounceRolesHook for renouncing one or more roles from the caller's address
token.useRevokeRolesHook for revoking one or more roles from an address
token.useSetRoleAdminHook for setting the admin role for another role
token.useSetSupplyCapHook for setting the supply cap for a TIP-20 token
token.useTransferHook for transferring TIP-20 tokens from the caller to a recipient
token.useUnpauseHook for unpausing a TIP-20 token, allowing transfers to resume
token.useWatchAdminRoleHook for watching role admin update events
token.useWatchApproveHook for watching token approval events
token.useWatchBurnHook for watching token burn events
token.useWatchCreateHook for watching new token creation events
token.useWatchMintHook for watching token mint events
token.useWatchRoleHook for watching role membership update events
token.useWatchTransferHook for watching token transfer events