Types
Glossary of general Types.
isBaseOptions
type isBaseOptions = {
chainId: number;
isMainnetOnly?: boolean; // If the chainId check is only allowed on mainnet
};
isEthereumOptions
type isEthereumOptions = {
chainId: number;
isMainnetOnly?: boolean; // If the chainId check is only allowed on mainnet
};
OnchainKitConfig
type OnchainKitConfig = {
address: Address | null; // Address is optional as we may not have an address for new users
apiKey: string | null; // ApiKey for Coinbase Developer Platform APIs
chain: Chain; // Chain must be provided as we need to know which chain to use
config?: {
appearance?: {
mode?: Mode | null; // Optionally determines color scheme based on OS preference or user selection
theme?: ComponentTheme | null; // Optionally sets the visual style for components
};
paymaster?: string | null; // Paymaster URL for sponsorship
};
rpcUrl: string | null; // RPC URL for onchain requests. Defaults to using CDP Node if the API Key is set
schemaId: EASSchemaUid | null; // SchemaId is optional as not all apps need to use EAS
projectId: string | null; // ProjectId from Coinbase Developer Platform, only required for Coinbase Onramp support
};
OnchainKitContextType
type OnchainKitContextType = OnchainKitConfig;
OnchainKitProviderReact
type OnchainKitProviderReact = {
address?: Address;
apiKey?: string;
chain: Chain;
children: ReactNode;
config?: {
appearance?: {
mode?: Mode | null;
theme?: ComponentTheme | null;
};
paymaster?: string;
};
rpcUrl?: string;
schemaId?: EASSchemaUid;
projectId?: string;
};