Appearance
Documentation / expo / PrivyProviderProps
Interface: PrivyProviderProps ​
Properties ​
appId ​
appId:
string
Privy application ID (can be found in privy developer dashboard)
children ​
children:
ReactNode
client? ​
client?:
any
A Privy client instance, instantiated and controlled externally.
See ​
Example ​
ts
// There should only ever be a single global instance of the Privy client
const client = createPrivyClient(opts);
// Pass the global instance of the Privy client to the provider
<PrivyProvider client={client}>{...}</PrivyProvider>
clientId? ​
clientId?:
string
Privy client ID (can be found in privy developer dashboard, in the clients section for each app)
config? ​
config?:
PrivyConfig
storage? ​
storage?:
any
By default, the Privy SDK will store any persisted state in SecureStorage. This behavior can be overridden by defining in a storage prop that implements the privy Storage
interface.
Example ​
ts
import type {Storage} from '@privy-io/expo';
class OtherStorage implements Storage { ... }
<PrivyProvider appId="<your-app-id>" storage={OtherStorage}>
{children}
</PrivyProvider>
supportedChains? ​
supportedChains?: [
Chain
,...Chain[]
]
A list of supported chains, used to specify which chains should be used throughout the application. Overrides the default list of supported chains. Calling sendTransaction
or switchChain
on an unsupported network will throw an error.
For embedded wallets, the wallet will automatically default to the first supplied supportedChain
.
Defaults to:
- mainnet
- goerli
- sepolia
- arbitrum
- arbitrumGoerli
- optimism
- optimismGoerli
- polygon
- polygonMumbai
- celo
- celoAlfajores
- filecoin
- filecoinCalibration
- base
- baseGoerli
- linea
- lineaTestnet
- avalanche
- avalancheFuji
- holesky
- redstoneHolesky