# Core Business Process (Seamless Transition from Web2 to Web3)

### Process 1: Obtain User Permissions via Social Login
Complete WebAuth login to acquire user **EOA control address** and identity authorization token
```typescript
const authResult = await webAuth.getAuth().loginWithGoogleRedirect();
const owner = authResult.eoaAddress;
const accessToken = authResult.accessToken;
```

### Process 2: Automatically Derive User AA Contract Wallet Address
No manual wallet creation required. The SDK generates exclusive smart accounts automatically based on EOA addresses
```typescript
const { aaWalletAddress } = await aaWalletSdk.getAaWalletAddressByEoaAddress({
  eoaAddress: owner,
  index: 0 // Wallet index, increment for multi-wallet scenarios
});
console.log('User AA Wallet Address:', aaWalletAddress);
```

### Process 3: Send Zero-Gas Sponsored Transactions
Transactions are automatically sponsored by Paymaster, users hold no native tokens required
```typescript
// Construct on-chain call data (batch transactions supported)
const txCalls = [
  {
    to: 'Target contract address',
    value: 0n,
    data: 'Contract call calldata',
  }
];

// Initiate MPC signature & gas-sponsored transaction
async function sendZeroGasTx() {
  try {
    const { txHash } = await aaWalletSdk.sendMpcTransaction({
      owner: owner,
      authToken: accessToken,
      baseUrl: webAuthUrl,
      calls: txCalls
    });
    console.log('Transaction succeeded, Tx Hash:', txHash);
  } catch (err) {
    console.error('Transaction failed, please check Paymaster balance', err);
  }
}
```

---
