Documentation Index
Fetch the complete documentation index at: https://docs.cavos.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Constructor
new CavosNativeSDK(config: CavosNativeConfig)
CavosNativeConfig
interface CavosNativeConfig {
appId: string;
rpId: string; // Required
network?: 'sepolia' | 'mainnet';
paymasterApiKey?: string;
starknetRpcUrl?: string;
}
Initialization
init()
async init(): Promise<void>
Initialize SDK and restore session. Optional (SDK auto-initializes on first use).
Authentication
getLoginUrl(provider, redirectUri)
async getLoginUrl(
provider: 'google' | 'apple',
redirectUri: string
): Promise<string>
Get OAuth URL for browser authentication.
setAuthData(authData)
async setAuthData(authData: {
access_token: string;
user: UserInfo;
}): Promise<void>
Set auth data after OAuth callback.
logout()
async logout(): Promise<void>
isAuthenticated()
isAuthenticated(): boolean
getUserInfo()
getUserInfo(): UserInfo | null
Wallet
createWallet()
async createWallet(): Promise<void>
Create or recover wallet (smart flow).
loadWallet()
async loadWallet(): Promise<void>
Load existing wallet (triggers biometric).
recoverWallet()
async recoverWallet(): Promise<void>
Recover wallet from backend using passkey.
hasWalletLocally()
async hasWalletLocally(): Promise<boolean>
clearWallet()
async clearWallet(): Promise<void>
getAddress()
getAddress(): string | null
getActiveAddress()
getActiveAddress(): string | null
Unified getter for any wallet type.
hasWallet()
async hasWallet(): Promise<boolean>
getBalance()
async getBalance(): Promise<string>
getFundingAddress()
getFundingAddress(): string | null
isAccountDeployed()
async isAccountDeployed(): Promise<boolean>
retryWalletUnlock()
async retryWalletUnlock(): Promise<void>
Transactions
execute(calls, options?)
async execute(
calls: Call | Call[],
options?: { gasless?: boolean }
): Promise<string>
Passkey
isPasskeySupported()
async isPasskeySupported(): Promise<boolean>
isPasskeyOnlyMode()
isPasskeyOnlyMode(): boolean
Onramp
getOnramp(provider)
getOnramp(provider: 'RAMP_NETWORK'): string
Advanced
getAccount()
getAccount(): Account | null
getActiveAccount()
getActiveAccount(): Account | null
Unified getter for any wallet type.
Deprecated Methods
| Method | Replacement |
|---|
createPasskeyOnlyWallet() | createWallet() |
loadPasskeyOnlyWallet() | loadWallet() |
recoverWalletWithPasskey() | recoverWallet() |
hasPasskeyOnlyWallet() | hasWalletLocally() |
clearPasskeyOnlyWallet() | clearWallet() |
getPasskeyOnlyAddress() | getAddress() |
getPasskeyOnlyAccount() | getAccount() |