gill
@gillsdk/react/Functions

useLatestBlockhash

function useLatestBlockhash<TConfig>(__namedParameters): 
  | {
  latestBlockhash: Readonly<{
  }>;
}
  | {
  latestBlockhash: Readonly<{
  }>;
}
  | {
  latestBlockhash: Readonly<{
  }>;
}
  | {
  latestBlockhash: Readonly<{
  }>;
}
  | {
  latestBlockhash: Readonly<{
  }>;
};

Get the latest blockhash using the Solana RPC method of getLatestBlockhash

To auto refetch the latest blockhash, provide a options.refetchInterval value

Type Parameters

Type ParameterDefault type
TConfig extends | undefined | Readonly<{ }>| undefined | Readonly<{ }>

Parameters

ParameterType
__namedParametersUseLatestBlockhashInput<TConfig>

Returns

| { latestBlockhash: Readonly<{ }>; } | { latestBlockhash: Readonly<{ }>; } | { latestBlockhash: Readonly<{ }>; } | { latestBlockhash: Readonly<{ }>; } | { latestBlockhash: Readonly<{ }>; }

On this page