0.1.2 • Published 6 months ago
HashKit React
React library directly integrates with TON and Telegram
Hooks
Name | Description |
---|
useAddress | TON wallet Address |
useApp | Contains the app metadata |
useAuth |
useAuthKey |
useAuthedUser | Contains the current logged in user |
useBalance | TON wallet balance |
useBalanceQuery |
useCSV | Generates downloadable csv file from json data |
useChatData |
useContractActions |
useContracts |
useDebounce | Debounces any state value |
useDebounceEffect | Debounces any useEffect |
useDynamicAsset |
useEnvs (Pending) | Contains the env constant names / To be released |
useFilters | Performs graphql filters |
useGameScore |
useGetBalance |
useGram |
useGraph | Contains the graph client |
useInitApp |
useInitGram |
useInput | Form input state manager |
useInputState |
useIsAdmin |
useIsConnected |
useIsDelegate | Checks if user is an app delegate |
useIsDelegateOrOwner |
useIsOwnerAddr | Checks if current address is app owner |
useJSON | Generats downloadable json file from json object |
useJettonTransfer |
useLogout | Logout function |
useHashKit | Context HashKit Provider |
useHashKitAdmin |
useHashKitApp |
useHashKitDelegate |
useNftTransfer |
usePaginate | Paginates any array list based on size |
useSbtTransfer |
useSearch | Performs regex search on an array list |
useStorage |
useTeam (Pending) | Checks if user is member of a team / To be released |
useTelegram | Contains telegram functions |
useTelegramAuth | Contains telegram authentication function |
useTelegramAuthData |
useTelegramBack |
useTelegramChatData | Contains telegram chat data |
useTelegramCore | Contains the telegram object |
useTelegramLogin |
useTelegramParam | Contains extracted key->value param, e.g invite_XXXXX or join_YYYYYY |
useTelegramSetup | Contains telegram basic setup |
useTelegramShare | Contains telegram sharing functionality |
useTelegramUserId |
useTelegramUsername | Contains telegram user username |
useTonClient |
useTonContractClient |
useTonProvider |
useTonSubscription |
useTransfer |
useTransferMemo |
useUser | Contains the current user state |
useWallet | TON wallet |
useWalletAuth |
Provider
Name | Description |
---|
HashKitProvider |
Security Helpers
Name | Description |
---|
isValidHash | Checks the hash of the account, prevents modified tgWebData to have access to the app |
Helpers
Name | Description |
---|
addDays |
bufferToChunks |
clearAuthKey |
concatBytes |
createKey |
createParams |
createQuery |
dayFormat |
encodeData |
encodeOffChainContent |
extractContentCell |
flatPath |
flatten |
flattenSnakeCell |
fromNow |
makeSnakeCell |
mapFlatten |
query |
request |
requestAuthed |
shortAddr |
shortString |
shortUsername |
toBase64 |
toCryptoLogo |
toIPFSUrl |
toTonScanAddress |
toTonScanTx |
toTonViewer |
toUnix |
toUrl |
today |
unixFormat |
unixNow |