> ## Documentation Index
> Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Reference

> Complete API reference for the Dynamic Unity SDK.

## Module accessors

| Accessor                              | Description                                          |
| ------------------------------------- | ---------------------------------------------------- |
| `DynamicSDK.Instance.Auth`            | Authentication (email, SMS, social, passkey, JWT)    |
| `DynamicSDK.Instance.Wallets`         | Wallet management, balances, signing, delegation     |
| `DynamicSDK.Instance.Networks.Evm`    | EVM transactions and contract interaction            |
| `DynamicSDK.Instance.Networks.Solana` | Solana signing, RPC connection, transactions         |
| `DynamicSDK.Instance.Networks.Sui`    | SUI signing and transactions                         |
| `DynamicSDK.Instance.UI`              | Built-in UI (auth flow, profile, private key reveal) |
| `DynamicSDK.Instance.Passkeys`        | Passkey registration and authentication              |
| `DynamicSDK.Instance.Mfa`             | Multi-factor authentication management               |

## Authentication

### Email

| Method                       | Description               |
| ---------------------------- | ------------------------- |
| `Auth.Email.SendOTP(email)`  | Send OTP to email address |
| `Auth.Email.VerifyOTP(code)` | Verify OTP code           |
| `Auth.Email.ResendOTP()`     | Resend OTP to email       |

### SMS

| Method                        | Description              |
| ----------------------------- | ------------------------ |
| `Auth.Sms.SendOTP(phoneData)` | Send OTP to phone number |
| `Auth.Sms.VerifyOTP(code)`    | Verify OTP code          |

### Social

| Method                          | Description                  |
| ------------------------------- | ---------------------------- |
| `Auth.Social.Connect(provider)` | Connect with social provider |

### Passkey

| Method                  | Description          |
| ----------------------- | -------------------- |
| `Auth.Passkey.SignIn()` | Sign in with passkey |

### External Auth

| Method                                            | Description               |
| ------------------------------------------------- | ------------------------- |
| `Auth.ExternalAuth.SignInWithExternalJwt(params)` | Sign in with external JWT |

### Session

| Property/Method       | Description                           |
| --------------------- | ------------------------------------- |
| `Auth.Token`          | Get current auth token                |
| `Auth.OnTokenChanged` | Event fired when token changes        |
| `Auth.OnUserChanged`  | Event fired when user profile changes |
| `Auth.Logout()`       | Log out current user                  |

## Wallets

### Access

| Property/Method                          | Description                     |
| ---------------------------------------- | ------------------------------- |
| `Wallets.UserWallets`                    | List of user's wallets          |
| `Wallets.OnUserWalletsChanged`           | Event fired when wallets change |
| `Wallets.GetBalance(wallet)`             | Get wallet balance              |
| `Wallets.GetMultichainBalances(request)` | Get multichain token balances   |

### Embedded Wallets

| Method                                            | Description            |
| ------------------------------------------------- | ---------------------- |
| `Wallets.Embedded.CreateWallet(chain, password?)` | Create embedded wallet |

### WaaS

| Method                                          | Description                 |
| ----------------------------------------------- | --------------------------- |
| `Wallets.Waas.GetWalletRecoveryState(wallet)`   | Check wallet recovery state |
| `Wallets.Waas.SetPassword(wallet, password)`    | Set wallet password         |
| `Wallets.Waas.UnlockWallet(wallet, password)`   | Unlock wallet               |
| `Wallets.Waas.UpdatePassword(wallet, old, new)` | Update wallet password      |

### Delegation

| Method                                                           | Description           |
| ---------------------------------------------------------------- | --------------------- |
| `Wallets.Waas.Delegation.IsWalletEligibleForDelegation(wallet)`  | Check eligibility     |
| `Wallets.Waas.Delegation.DelegateKeyShares(identifiers)`         | Delegate key shares   |
| `Wallets.Waas.Delegation.GetDelegationStatusForWallet(walletId)` | Get delegation status |
| `Wallets.Waas.Delegation.RevokeDelegation(identifiers)`          | Revoke delegation     |

## Networks

### EVM

| Method                                            | Description             |
| ------------------------------------------------- | ----------------------- |
| `Networks.Evm.SendTransaction(address, tx)`       | Send transaction        |
| `Networks.Evm.WriteContract(walletId, input)`     | Write to contract       |
| `Networks.Evm.SignMessage(walletId, message)`     | Sign message            |
| `Networks.Evm.SignTypedData(walletId, typedData)` | Sign EIP-712 typed data |

### Solana

| Method                                                            | Description               |
| ----------------------------------------------------------------- | ------------------------- |
| `Networks.Solana.SignMessage(walletId, message)`                  | Sign message              |
| `Networks.Solana.SignAndSendTransaction(walletId, txBytes, type)` | Sign and send transaction |
| `Networks.Solana.CreateConnection()`                              | Create RPC connection     |

### SUI

| Method                                                              | Description                  |
| ------------------------------------------------------------------- | ---------------------------- |
| `Networks.Sui.SignMessage(walletId, message)`                       | Sign message                 |
| `Networks.Sui.SignTransferTransaction(walletId, to, amount)`        | Sign transfer (no broadcast) |
| `Networks.Sui.SignAndSendTransferTransaction(walletId, to, amount)` | Sign and send transfer       |
| `Networks.Sui.SignTransaction(walletId, base64Tx)`                  | Sign raw transaction         |
| `Networks.Sui.SendTransaction(walletId, base64Tx)`                  | Send raw transaction         |

## UI

| Method                                | Description            |
| ------------------------------------- | ---------------------- |
| `UI.ShowAuth()`                       | Show authentication UI |
| `UI.ShowUserProfile()`                | Show user profile UI   |
| `UI.RevealEmbeddedWalletPrivateKey()` | Reveal private key     |

## Passkeys

| Method                                         | Description               |
| ---------------------------------------------- | ------------------------- |
| `Passkeys.RegisterPasskey()`                   | Register new passkey      |
| `Passkeys.GetPasskeys()`                       | List user's passkeys      |
| `Passkeys.AuthenticatePasskeyMFA(createToken)` | Authenticate with passkey |
| `Passkeys.DeletePasskey(request)`              | Delete passkey            |

## MFA

| Method                           | Description                         |
| -------------------------------- | ----------------------------------- |
| `Mfa.AddDevice(type)`            | Add MFA device (returns secret/URI) |
| `Mfa.VerifyDevice(code, type)`   | Verify MFA device                   |
| `Mfa.AuthenticateDevice(params)` | Authenticate with MFA               |
| `Mfa.GetNewRecoveryCodes()`      | Generate recovery codes             |

## Events

| Event                          | Description          |
| ------------------------------ | -------------------- |
| `OnWebViewReady`               | SDK is ready to use  |
| `Auth.OnTokenChanged`          | Auth token changed   |
| `Auth.OnUserChanged`           | User profile changed |
| `Wallets.OnUserWalletsChanged` | Wallets changed      |
