Server-only method. Requires API secret key.
Usage
const result = await sdk.executeWalletUpgrade(
{
walletAddress: "0x...",
typedData: upgrade.typedData,
signature: ["0xr", "0xs"],
},
bearerToken,
);
Parameters
| Parameter | Type | Required | Description |
|---|
walletAddress | string | Yes | Wallet address being upgraded |
typedData | TypedData | Yes | SNIP-12 typed data from prepareWalletUpgrade |
signature | string[] | Yes | User signature over the typed data |
bearerToken | string | No | JWT token. Falls back to apiSecretKey if not provided |
Return Value
Returns a Promise<ExecuteWalletUpgradeResponse>:
| Field | Type | Description |
|---|
transactionHash | string | Transaction hash for the upgrade |
newClassHash | string | New class hash after upgrade |
newWalletType | WalletType | New wallet type after upgrade |
Example
See prepareWalletUpgrade for a complete upgrade flow.