UNPKG

@privy-io/react-auth

Version:

React client for the Privy Auth API

55 lines (51 loc) 1.72 kB
import { ExtendedChainType, WalletResponseType, CurveSigningChainType } from '@privy-io/public-api'; import { U as User } from './types-gBbAJUjT.js'; import '@coinbase/wallet-sdk'; import '@reown/appkit'; import '@solana/wallet-adapter-base'; import 'react'; import 'viem'; import '@privy-io/js-sdk-core'; import '@base-org/account'; import '@solana/wallet-standard-features'; import '@wallet-standard/base'; import '@wallet-standard/features'; import '@metamask/eth-sig-util'; import '@solana/web3.js'; import 'eventemitter3'; interface CreateWalletInput { /** The chain type of the wallet to create. */ chainType: ExtendedChainType; } interface CreateWalletOutput { user: User; wallet: WalletResponseType; } interface UseCreateWalletInterface { /** * Create a new wallet for the user, on an extended chain. */ createWallet: (input: CreateWalletInput) => Promise<CreateWalletOutput>; } declare const useCreateWallet: () => UseCreateWalletInterface; interface SignRawHashInput { /** The address of the wallet to sign the hash with. */ address: string; /** The chain type of the wallet to sign the hash with. */ chainType: CurveSigningChainType; /** The hash to sign. */ hash: `0x${string}`; } interface SignRawHashOutput { /** The signature of the hash. */ signature: `0x${string}`; } interface UseSignRawHashInterface { /** * Sign a raw hash with a wallet along the blockchain's cryptographic curve. * This is only supported for extended chains. */ signRawHash: (input: SignRawHashInput) => Promise<SignRawHashOutput>; } declare const useSignRawHash: () => UseSignRawHashInterface; export { useCreateWallet, useSignRawHash };