@saberhq/sail
Version:
Account caching and batched loading for React-based Solana applications.
10 lines • 600 B
JavaScript
import { deserializeAccount, deserializeMint, TOKEN_PROGRAM_ID, } from "@saberhq/token-utils";
import { makeProgramParserHooks } from "./makeProgramParserHooks";
export const { Mint: { useSingleData: useTokenMint, useData: useTokenMints, useBatchedData: useBatchedTokenMints, }, TokenAccount: { useSingleData: useTokenAccount, useData: useTokenAccounts, useBatchedData: useBatchedTokenAccounts, }, } = makeProgramParserHooks({
address: TOKEN_PROGRAM_ID,
accountParsers: {
Mint: deserializeMint,
TokenAccount: deserializeAccount,
},
});
//# sourceMappingURL=splHooks.js.map