Prepare the account and sponsor
Use an already deployed Swig account configured for the canonical v0.9 EntryPoint,0x433709009B8330FDa32311DF1C2AFA402eD8D009. The selected authority must
be a secp256k1 role or an active secp256k1 session. The wallet’s permissions still
apply; sponsorship does not increase the role’s allowance.
The shared beacon enables automatic fleet upgrades. It also requires a bundler
with a compatible mempool policy. Coordinate account registration with the
bundler operator before submitting. Creating a wallet alone does not register it.
Set these values alongside RPC_URL and SIGNER_PRIVATE_KEY:
For the limited role from these guides, use an EOA recipient with no code and a
positive amount within the remaining allowance. The vault must hold the amount.
Include no calldata for this native-transfer permission.
Choose a TypeScript smart-account SDK
Both integrations usetoSwigSmartAccount from the Swig SDK. The existing client
owns operation preparation, estimation, sponsorship, submission, and receipt
polling. The adapter supplies Swig’s call encoding, role nonce, and signing hook.
Set
PAYMASTER_URL to an ERC-7677-compatible sponsor endpoint supporting your
chain, account, and EntryPoint version. Both examples use Viem’s standard
paymaster client. A paymaster is a contract with its own validation rules; an
arbitrary EOA address cannot serve as a paymaster.
For the TypeScript examples on the disposable local chain (1337), set only
TEST_PAYMASTER_ADDRESS and unset PAYMASTER_URL. Supplying both is rejected. The optional
contributor runner provisions this fixture.
From evm/typescript, run either client:
success field,
and prints userOperationHash and transactionHash. An included operation can
fail during wallet execution: asset movement and permission consumption revert,
but the EntryPoint nonce can be consumed and the sponsor charged. Check the
UserOperation result, not only its containing transaction receipt.
Run the Rust and Python examples locally
The Rust and Python examples use Alloy and Web3.py/eth-account with Swig’s thin adapter. Their runnable sponsorship setup is the disposable local chain (1337), using TEST_PAYMASTER_ADDRESS. The Rust example also uses Rundler’s fee
quote. The local runner provisions these inputs
and executes both examples.

