Expand description
On-chain Funding and smart-account helpers.
Calldata encoders, Safe CREATE2 prediction, and UserOperation submit. On-chain Funding and smart-account helpers.
Encodes FundingAccount / TradingGateway calldata and can submit wallet-signed UserOperations (owner key → derive Polyester Safe → bundler). Separate from the API-key Connect surface.
Structs§
- Account
Abstraction Environment - Bundler / paymaster / EntryPoint / Safe deployment settings.
- Chain
Call - Contract call payload for a smart-account UserOperation.
- Contracts
Environment - Polyester application contract addresses.
- Entry
Point Config - EntryPoint configuration for ERC-4337.
- Guard
Approval - Guard approval tuple
(uint192 nonceSpace, uint256 deadline, bytes signature). - Json
RpcClient - JSON-RPC HTTP client (async; matches the SDK’s tokio/hyper stack).
- Polyester
Chain Environment - On-chain / AA settings for Funding UserOps (not API-key Connect).
- Polyester
Smart Account - Owner-key smart account: derive Safe, build/sign/submit Funding UserOps.
- Predicted
Safe - Predicted Safe address plus factory deploy payloads.
- Safe
Deployment Config - Safe / 4337 module deployment addresses.
- User
Operation Receipt - Receipt for a submitted UserOperation.
- Zipper
FeeQuote - Result of quoting a Zipper network fee for withdraws.
Enums§
Constants§
- POLYESTER_
TESTNET_ ENVIRONMENT - Polyester testnet (chain 888168) environment.
- USER_
OPERATION_ GAS_ BUFFER_ BPS - USER_
OPERATION_ MIN_ GAS_ BUFFER
Functions§
- add_
user_ operation_ gas_ buffer - Apply the standard gas buffer (20% or +50k, whichever is larger).
- encode_
add_ allowed_ external_ destinations - Encode
addAllowedExternalDestinations(uint16,bytes[],(uint192,uint256,bytes)). - encode_
add_ allowed_ internal_ accounts - Encode
addAllowedInternalAccounts(address[],(uint192,uint256,bytes)). - encode_
execute_ user_ op_ call_ data - Encode Safe4337Module.executeUserOpWithErrorString for a single call.
- encode_
funding_ withdraw_ to_ chain - Encode
FundingAccount.withdrawToChain((uint16,address,bytes,uint256,uint256)). - encode_
initialize_ guard_ signer - Encode
GuardRegistry.initializeSigner(address). - encode_
remove_ allowed_ external_ destinations - Encode
removeAllowedExternalDestinations(uint16,bytes[],(uint192,uint256,bytes)). - encode_
remove_ allowed_ internal_ accounts - Encode
removeAllowedInternalAccounts(address[],(uint192,uint256,bytes)). - encode_
rotate_ guard_ signer - Encode
GuardRegistry.rotateSigner(address,(uint192,uint256,bytes)). - encode_
set_ external_ destination_ allowlist_ required - Encode
setExternalDestinationAllowlistRequired(bool,(uint192,uint256,bytes)). - encode_
set_ internal_ account_ allowlist_ required - Encode
setInternalAccountAllowlistRequired(bool,(uint192,uint256,bytes)). - encode_
trading_ gateway_ deposit - Encode
TradingGateway.deposit(bytes32 uAssetId, uint256 uAmount). - encode_
trading_ gateway_ deposit_ to - Encode
TradingGateway.depositTo(address,bytes32,uint256). - encode_
withdraw_ destination - UTF-8 bytes of the normalized address (lowercase when not case-sensitive).
- pack_
paymaster_ and_ data - Pack paymaster fields into EntryPoint v0.7
paymasterAndData. - predict_
polyester_ smart_ account_ address - Alias matching the TypeScript
predictPolyesterSmartAccountAddressname. - predict_
safe_ address - Predict the Polyester Safe for a single owner (main account = salt 0).
- predict_
safe_ address_ with_ data - Deterministic CREATE2 Safe address + factory deploy data (zero RPC).
- quote_
zipper_ fee - Quote Zipper network fee via
feeFactory.getFee(uint16,address). - sign_
safe_ user_ operation - EIP-712 SafeOp signature packed as uint48/uint48/bytes (single EOA owner).
- stub_
signature - Stub signature used while requesting paymaster sponsorship.
Type Aliases§
- Smart
Account - Alias matching the task naming (
SmartAccount).