Wallets

Modular Wallets Android SDK

Welcome to Circle's Modular Wallets Android SDK documentation. The SDK enables developers to integrate Circle's Modular Wallets to build secure, scalable Web3 applications by leveraging tools for key management, smart account interactions, gasless transactions, and blockchain communication.

Follow the steps provided in the GitHub repository to install and set up the Modular Wallets Android SDK.

The following sections detail the SDK's transport mechanisms, client interactions, account management, utility functions, and supported blockchain networks.

  • Description: Interface representing a transport mechanism for making RPC requests.
request
  • Description: Sends an RPC request and returns the response.
  • Parameters:
    • req: RpcRequest - The RPC request to be sent.
    • Returns: Response<RpcResponse>
  • Description: Data class representing HTTP RPC client options.
  • Properties:
    • headers: Map<String, String>? - Optional headers to include in the HTTP requests.
  • Description: Creates a modular HTTP transport instance.
  • Parameters:
    • context: Context - The application context.
    • clientKey: String - The client key for authorization.
    • url: String - The URL for the HTTP transport.
  • Returns: HttpTransport - The configured HTTP transport instance.
  • Description: Creates an HTTP transport instance.
  • Parameters:
    • context: Context - The application context.
    • clientKey: String - The client key for authorization.
    • url: String - The URL for the HTTP transport.
  • Returns: HttpTransport - The configured HTTP transport instance.
  • Description: Creates an HTTP transport instance.
  • Parameters:
    • context: Context - The application context.
    • url: String - The URL for the HTTP transport.
    • config: HttpRpcClientOptions - The configuration options for the HTTP transport (default is an empty configuration).
  • Returns: HttpTransport - The configured HTTP transport instance.
  • Description: Represents a client that interacts with a blockchain, with the following derived classes:
    • BundlerClient
    • PaymasterClient
  • Properties:
    • chain: Chain - The blockchain that the client interacts with.
    • transport: Transport - The transport mechanism used for making RPC requests.
  • Description: Client for interacting with the Bundler API. A Bundler Client is an interface to interact with ERC-4337 Bundlers and provides the ability to send and retrieve User Operations through Bundler Actions.
  • Inheritance: Inherits from Client
estimateUserOperationGas
  • Description: Estimates the gas values for a User Operation to be executed successfully.
  • Parameters:
    • account: SmartAccount - The Account to use for User Operation execution.
    • calls: Array<EncodeCallDataArg> - The calls to execute in the User Operation.
    • paymaster: Paymaster? - Sets Paymaster configuration for the User Operation.
    • estimateFeesPerGas: (suspend (SmartAccount, BundlerClient, UserOperationV07) -> EstimateFeesPerGasResult)? - Prepares fee properties for the User Operation request. Not available in Java.
  • Returns: EstimateUserOperationGasResult
getChainId
  • Description: Returns the chain ID associated with the current network
  • Returns: Long - The current chain ID.
getSupportedEntryPoints
  • Description: Returns the EntryPoints that the bundler supports.
  • Returns: ArrayList<String> - The EntryPoints that the bundler supports.
getUserOperation
  • Description: Retrieves information about a User Operation given a hash.
  • Parameters:
    • userOpHash: String - User Operation hash.
  • Returns: GetUserOperationResult - User Operation information.
getUserOperationReceipt
  • Description: Returns the User Operation Receipt given a User Operation hash.
  • Parameters:
    • userOpHash: String - User Operation hash.
  • Returns: UserOperationReceipt - The User Operation receipt.
sendUserOperation
  • Description: Broadcasts a User Operation to the Bundler.
  • Parameters:
    • context: Context - The context used to launch framework UI flows ; use an activity context to make sure the UI will be launched within the same task stack
    • account: SmartAccount - The Account to use for User Operation execution.
    • calls: Array<EncodeCallDataArg>? - The calls to execute in the User Operation
    • partialUserOp: UserOperationV07- (default: UserOperationV07()) The partial User Operation to be completed .
    • paymaster: Paymaster? - Sets Paymaster configuration for the User Operation.
    • estimateFeesPerGas: (suspend (SmartAccount, BundlerClient, UserOperationV07) -> EstimateFeesPerGasResult)? - Prepares fee properties for the User Operation request. Not available in Java.
  • Returns: String - The hash of the sent User Operation.
prepareUserOperation
  • Description: Prepares a User Operation for execution and fills in missing properties.
  • Parameters:
    • account: SmartAccount - The Account to use for User Operation execution.
    • calls: Array<EncodeCallDataArg>? - The calls to execute in the User Operation
    • partialUserOp: UserOperationV07 - The partial User Operation to be completed
    • paymaster: Paymaster? - Sets Paymaster configuration for the User Operation.
    • estimateFeesPerGas: (suspend (SmartAccount, BundlerClient, UserOperationV07) -> EstimateFeesPerGasResult)? - Prepares fee properties for the User Operation request. Not available in Java.
  • Returns: UserOperationV07- The prepared User Operation.
waitForUserOperationReceipt
  • Description: Waits for the User Operation to be included on a Block (one confirmation), and then returns the User Operation receipt.
  • Parameters:
    • userOpHash: String - A User Operation hash.
    • pollingInterval: Long (default: 4000) - Polling frequency (in ms).
    • retryCount: Int (default: 6) - The number of times to retry.
    • timeout: Long? - Optional timeout (in ms) to wait before stopping polling.
  • Returns: UserOperationReceipt - The User Operation receipt.
getBalance
  • Description: Retrieves the balance of the specified address at a given block tag or block number.
  • Overloaded Methods:
    • Parameters:
      • address: String - The address to query the balance for. Only wallet addresses that registered with the using client key can be retrieved
      • blockNumber: BigInteger - The balance of the account at a block number.
    • Returns: BigInteger - The balance of the address in wei.
    • Parameters:
      • address: String - The address to query the balance for. Only wallet addresses that registered with the using client key can be retrieved
      • blockTag: String (default: "latest") - The balance of the account at a block tag.
    • Returns: BigInteger - The balance of the address in wei.
getBlockNumber
  • Description: Returns the number of the most recent block seen.
  • Returns: BigInteger - The number of the block.
getGasPrice
  • Description: Returns the current price of gas (in wei).
  • Returns: BigInteger - The gas price (in wei).
call
  • Description: Executes a new message call immediately without submitting a transaction to the network.
  • Parameters:
    • from: String? - The Account to call from.
    • to: String - The contract address or recipient.
    • data: String - A contract hashed method call with encoded args.
  • Returns: String - The call data.
getCode
  • Description: Retrieves the bytecode at an address.
  • Overloaded Methods:
    • Parameters:
      • address: String - The contract address.
      • blockNumber: BigInteger - The block number to perform the bytecode read against.
    • Returns: String - The contract's bytecode.
    • Parameters:
      • address: String - The contract address.
      • blockTag: String (default: "latest") - The block tag to perform the bytecode read against.
    • Returns: String - The contract's bytecode.
estimateMaxPriorityFeePerGas
  • Description: Returns an estimate for the max priority fee per gas (in wei) for a transaction to be likely included in the next block. The Action will either call eth_maxPriorityFeePerGas (if supported) or manually calculate the max priority fee per gas based on the current block base fee per gas + gas price.
  • Returns: BigInteger - An estimate (in wei) for the max priority fee per gas.
getBlock
  • Description: Returns information about a block at a block number, hash or tag.
  • Overloaded Methods:
    • Parameters:
      • includeTransactions: Boolean (default: false) - Whether or not to include transactions (as a structured array of Transaction objects).
      • blockNumber: BigInteger - Information at a given block number.
    • Returns: Block - Information about the block.
    • Parameters:
      • includeTransactions: Boolean (default: false) - Whether or not to include transactions (as a structured array of Transaction objects).
      • blockTag: String (default: "latest") - Information at a given block tag.
    • Returns: Block - Information about the block.
  • Description: Client for interacting with the Paymaster API. A Paymaster Client is an interface to interact with ERC-7677 compliant Paymasters and provides the ability to sponsor User Operation gas fees.
  • Inheritance: Inherits from Client
getPaymasterData
  • Description: Retrieves paymaster-related User Operation properties to be used for sending the User Operation.
  • Parameters:
    • userOp: T - The User Operation to retrieve Paymaster data for. Type T must be the subclass of UserOperation.
    • entryPoint: EntryPoint - EntryPoint address to target.
    • context: Map<String, Any>? - Paymaster specific fields.
  • Returns: GetPaymasterDataResult - Paymaster-related User Operation properties.
getPaymasterStubData
  • Description: Retrieves paymaster-related User Operation properties to be used for User Operation gas estimation.
  • Parameters:
    • userOp: T - The User Operation to retrieve Paymaster stub data for. Type T must be the subclass of UserOperation.
    • entryPoint: EntryPoint - EntryPoint address to target.
    • context: Map<String, Any>? - Paymaster specific fields.
  • Returns: GetPaymasterStubDataResult - Paymaster-related User Operation properties.
  • Description: Create a Circle smart account.
  • Parameters:
    • client: Client - The client used to interact with the blockchain.
    • owner: Account<SignResult> - The owner account associated with the Circle smart account.
    • version: String (default: "circle_passkey_account_v1") - The version of the Circle smart account.
    • name: String (default: passkey-{timestamp}, for example, 2025-01-01T00:00:00.000Z) - The wallet name assigned to the newly registered account.
  • Returns: CircleSmartAccount
  • Description: Creates a WebAuthn account.
  • Parameters:
    • credential: WebAuthnCredential - The WebAuthn credential associated with the account.
  • Returns: WebAuthnAccount - The created WebAuthn account.
  • Description: Logs in or registers a user and returns a WebAuthnCredential.
  • Parameters:
    • context: Context - The context used to launch framework UI flows ; use an activity context to make sure the UI will be launched within the same task stack
    • transport: Transport - The transport used to communicate with the RP API.
    • userName: String? (required for WebAuthnMode.Register) - The username of the user.
    • mode: WebAuthnMode - The mode of the WebAuthn credential.
  • Returns: WebAuthnCredential
  • Description: Represents a P-256 WebAuthn Credential.
  • Properties:
    • id: String - The unique identifier for the credential.
    • publicKey: String - The public key associated with the credential.
    • raw: PublicKeyCredential - The public key associated with the credential.
    • rpId: String - The relying party identifier.
  • Description: Abstract class representing an account.
  • Type Parameter: T - The type of the signed data.
getAddress
  • Description: Retrieves the address of the account.
  • Returns: The address of the account.
sign
  • Description: Signs the given hex data.
  • Parameters:
    • context: Context - The context in which the signing operation is performed.
    • hex: String - The hex data to sign.
  • Returns: The signed data of type T.
signMessage
  • Description: Signs the given message.
  • Parameters:
    • context: Context - The context in which the signing operation is performed.
    • message: String - The message to sign.
  • Returns: The signed message of type T.
signTypedData
  • Description: Signs the given typed data.
  • Parameters:
    • context: Context - The context in which the signing operation is performed.
    • typedData: String - The typed data to sign.
  • Returns: The signed typed data of type T.
  • Description: Represents a WebAuthn account for handling authentication credentials and signing. WebAuthn Accounts are commonly used as Smart Account Owners to sign User Operations and messages on behalf of the Smart Account.
  • Inheritance: Inherits from Account.
getAddress
  • Description: Retrieves the public key address associated with the WebAuthn credential.
  • Returns: String - The public key associated with the WebAuthn credential.
sign
  • Description: Signs the given hex data.
  • Parameters:
    • context: Context - The context used to launch framework UI flows ; use an activity context to make sure the UI will be launched within the same task stack
    • hex: String - The hex data to sign.
  • Returns: SignResult - The result of the signing operation.
signMessage
  • Description: Signs a plain text message.
  • Parameters:
    • context: Context - The context used to launch framework UI flows ; use an activity context to make sure the UI will be launched within the same task stack
    • message: String - The message to sign.
  • Returns: SignResult - The result of the signing operation.
signTypedData
  • Description: Signs typed data.
  • Parameters:
    • context: Context - The context used to launch framework UI flows ; use an activity context to make sure the UI will be launched within the same task stack
    • typedData: String - The typed data to sign.
  • Returns: SignResult - The result of the signing operation.
  • Description: A Smart Account is an account whose implementation resides in a Smart Contract, and implements the ERC-4337 interface.
  • Properties:
    • client: Client - The client used to interact with the blockchain.
    • entryPoint: EntryPoint - The entry point for the smart account.
    • userOperation: UserOperationConfiguration? - Configuration for the user operation.
getAddress
  • Description: Returns the address of the account.
  • Returns: String - The address of the smart account.
encodeCalls
  • Description: Encodes the given call data arguments.
  • Parameters:
    • args: Array<EncodeCallDataArg> - The call data arguments to encode.
  • Returns: String - The encoded call data.
getFactoryArgs
  • Description: Returns the factory arguments for the smart account.
  • Returns: Pair<String, String>? - A pair containing the factory address and factory data.
getNonce
  • Description: Returns the nonce for the smart account.
  • Parameters:
    • key: BigInteger? - Optional key to retrieve the nonce for.
  • Returns: BigInteger - The nonce of the smart account.
getStubSignature
  • Description: Returns the stub signature for the given user operation.
  • Parameters:
    • userOp: T - The user operation to retrieve the stub signature for. Type T must be the subclass of UserOperation.
  • Returns: String - The stub signature.
sign
  • Description: Signs the given hex string.
  • Parameters:
    • context: Context - The context instance.
    • hex: String - The hex string to sign.
  • Returns: String - The signed string.
signMessage
  • Description: Signs the given message.
  • Parameters:
    • context: Context - The context in which the signing operation is performed.
    • message: String - The message to sign.
  • Returns: String - The signed message.
signTypedData
  • Description: Signs the given typed data.
  • Parameters:
    • context: Context - The context in which the signing operation is performed.
    • typedData: String - The typed data to sign.
  • Returns: String - The signed typed data.
signUserOperation
  • Description: Signs the given user operation.
  • Parameters:
    • context: Context - The context in which the signing operation is performed.
    • chainId: Long - The chain ID for the user operation. Default is the chain ID of the client.
    • userOp: UserOperationV07 - The user operation to sign.
  • Returns: String - The signed user operation.
  • Description: Represents a Circle smart account.
  • Properties:
    • client: Client - The client used to interact with the blockchain.
    • owner: Account<SignResult> - The owner account associated with the Circle smart account.
    • entryPoint: EntryPoint - The entry point for the smart account.
    • userOperation: UserOperationConfiguration? - Configuration for the user operation.
  • Inheritance: Inherits from SmartAccount.
getAddress
  • Description: Returns the address of the Circle smart account.
  • Returns: String - The address of the Circle smart account.
encodeCalls
  • Description: Encodes the given call data arguments.
  • Parameters:
    • args: Array<EncodeCallDataArg> - The call data arguments to encode.
  • Returns: String - The encoded call data.
getFactoryArgs
  • Description: Returns the factory arguments if the account is not deployed.
  • Returns: Pair<String, String>? - The factory arguments or null if already deployed.
isDeployed
  • Description: Checks if the account is deployed.
  • Returns: Boolean - True if the account is deployed, false otherwise.
getNonce
  • Description: Returns the nonce for the Circle smart account.
  • Parameters:
    • key: BigInteger? - Optional key to retrieve the nonce for.
  • Returns: BigInteger -The nonce of the Circle smart account.
getStubSignature
  • Description: Returns the stub signature for the given user operation.
  • Parameters:
    • userOp: T -The user operation to retrieve the stub signature for. Type T must be the subclass of UserOperation.
  • Returns: String - The stub signature.
sign
  • Description: Signs the given message.
  • Parameters:
    • context: Context - The context used to launch framework UI flows ; use an activity context to make sure the UI will be launched within the same task stack.
    • message: String - The message to sign.
  • Returns: String - The signed string.
signMessage
  • Description: Signs the given message.
  • Parameters:
    • context: Context -The context used to launch framework UI flows ; use an activity context to make sure the UI will be launched within the same task stack.
    • message: String - The message to sign.
  • Returns: String - The signed message.
signTypedData
  • Description: Signs the given typed data.
  • Parameters:
    • context: Context - The context used to launch framework UI flows ; use an activity context to make sure the UI will be launched within the same task stack.
    • typedData: String - The typed data to sign.
  • Returns: String - The signed typed data.
signUserOperation
  • Description: Signs the given user operation.
  • Parameters:
    • context: Context - The context used to launch framework UI flows ; use an activity context to make sure the UI will be launched within the same task stack.
    • chainId: Long - The chain ID for the user operation. Default is the chain ID of the client.
    • userOp: UserOperationV07 - The user operation to sign.
  • Returns: String - The signed user operation.
getInitCode
  • Description: Returns the initialization code.
  • Returns: String? - The initialization code.
  • Description: Encodes an ERC20 token transfer into calldata for executing a User Operation.
  • Parameters:
    • to: String - The recipient address.
    • token: String - The token contract address or the name of Token enum. Supported tokens and their information are listed below.
    • amount: BigInteger - The amount to transfer.
  • Returns: EncodeTransferResult - The encoded transfer ABI and contract address.
  • Supported Tokens:
Blockchain NetworkToken Name (Symbol)Token EnumContract Address
Arbitrum MainnetUSD Coin (USDC)Arbitrum_USDC0xaf88d065e77c8cC2239327C5EDb3A432268e5831
Arbitrum MainnetArbitrum (ARB)Arbitrum_ARB0x912CE59144191C1204E64559FE8253a0e49E6548
Base MainnetUSD Coin (USDC)Base_USDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Optimism MainnetUSD Coin (USDC)Optimism_USDC0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85
Optimism MainnetOptimism (OP)Optimism_OP0x4200000000000000000000000000000000000042
Polygon MainnetUSD Coin (USDC)Polygon_USDC0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359
Unichain MainnetUSD Coin (USDC)Unichain_USDC0x078D782b760474a361dDA0AF3839290b0EF57AD6
Arbitrum Sepolia TestnetUSD Coin (USDC)ArbitrumSepolia_USDC0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d
Base Sepolia TestnetUSD Coin (USDC)BaseSepolia_USDC0x036CbD53842c5426634e7929541eC2318f3dCF7e
Optimism Sepolia TestnetUSD Coin (USDC)OptimismSepolia_USDC0x5fd84259d66Cd46123540766Be93DFE6D43130D7
Polygon Amoy TestnetUSD Coin (USDC)PolygonAmoy_USDC0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582
Unichain Sepolia TestnetUSD Coin (USDC)UnichainSepolia_USDC0x31d0220469e10c4E71834a79b1f276d740d3768F
  • Description: Encodes the arg(s) into calldata for executing a User Operation.
  • Overloaded Methods:
    • Parameters:
      • arg: EncodeCallDataArg - The call data argument.
    • Returns: String - The encoded call data.
    • Parameters:
      • args: Array<EncodeCallDataArg> - The array of call data arguments.
    • Returns: String - The encoded call data.
  • Description: Encodes the function name and parameters into an ABI encoded value (4 byte selector & arguments).
  • Parameters:
    • functionName: String - The function to encode from the ABI.
    • abiJson: String - The ABI definition in JSON format.
    • args: Array<Any> - The arguments for the function call.
  • Returns: String - The encoded function call data.
  • Description: Encodes a contract execution into calldata for executing a User Operation.
  • Parameters:
    • to: String - The recipient address.
    • abiSignature: String - The ABI signature.
    • args: Array<Any> - The arguments for the function call.
    • value: BigInteger - The value to send with the transaction.
  • Returns: String - The encoded call data.
  • Description: Converts a string representation of gwei to numerical wei.
  • Properties:
    • value: String - The string representation of gwei.
    • unit: String - The unit of the value (default is "wei").
  • Returns: BigInteger - The numerical value in wei.
  • Description: Converts a string representation of ether to numerical wei.
  • Properties:
    • value: String - The string representation of ether.
    • unit: String - The unit of the value (default is "wei").
  • Returns: BigInteger - The numerical value in wei.
  • Description: Gets the minimum verification gas limit for a given chain.
  • Properties:
    • deployed: Boolean - Whether the smart account is deployed.
    • chainId: Long - The chain ID.
  • Returns: BigInteger - The chain-specific minimum verification gas limit or the default value if the chain is not supported.
  • Description: Data class representing the result of a signing operation.
  • Parameters:
    • signature: String - The signature generated by the signing operation.
    • webAuthn: WebAuthnData - The WebAuthn data associated with the signing operation.
    • raw: AuthenticationCredential - The raw authentication credential used in the signing operation.
  • Description: Data class representing WebAuthn data.
  • Parameters:
    • authenticatorData: String - The authenticator data in hexadecimal format.
    • challengeIndex: Int - The index of the challenge in the client data JSON.
    • clientDataJSON: String - The client data JSON.
    • typeIndex: Int - The index of the type in the client data JSON.
    • userVerificationRequired: Boolean - Indicates whether user verification is required.
  • Description: Data class representing arguments required for encoding call data.
  • Properties:
    • to: String - The recipient address.
    • value: BigInteger? - The value to be sent with the transaction.
    • data: String? - The call data in hexadecimal format.
    • abiJson: String? - The ABI definition in JSON format.
    • args: Array<Any>? - The arguments for the function call.
    • functionName: String? - The function name.
  • Description: Response model for estimating gas usage for user operations.
  • Properties:
    • preVerificationGas: BigInteger? - Pre-verification gas limit.
    • verificationGasLimit: BigInteger? - Verification gas limit.
    • callGasLimit: BigInteger? - Call gas limit.
    • paymasterVerificationGasLimit: BigInteger? - Paymaster verification gas limit.
    • paymasterPostOpGasLimit: BigInteger? - Paymaster post-operation gas limit.
  • Description: Response model for estimating fees per gas.
  • Properties:
    • maxFeePerGas: BigInteger? - Maximum fee per gas (EIP-1559).
    • maxPriorityFeePerGas: BigInteger? - Maximum priority fee per gas (EIP-1559).
    • gasPrice: BigInteger? - Legacy gas price.
  • Description: Response model for getting user operation details.
  • Properties:
    • blockHash: String? - Block hash.
    • blockNumber: BigInteger? - Block number.
    • transactionHash: String? - Transaction hash.
    • entryPoint: String? - Entry point address.
    • userOperation: UserOperationRpc? - User operation details.
  • Description: Data class representing the receipt of a user operation.
  • Properties:
    • actualGasCost: BigInteger? - Actual gas cost.
    • actualGasUsed: BigInteger? - Actual gas used.
    • entryPoint: String? - Entry point address.
    • logs: List<Log>? - List of logs.
    • nonce: BigInteger? - Nonce.
    • paymaster: String? - Paymaster address.
    • reason: String? - Reason for failure (if any).
    • receipt: TransactionReceipt - Transaction receipt.
    • sender: String? - Sender address.
    • success: Boolean? - Success status.
    • userOpHash: String? - User operation hash.
  • Description: Data class representing a log entry.
  • Properties:
    • address: String? - Log address.
    • blockHash: String? - Block hash for the log.
    • blockNumber: BigInteger? - Block number for the log.
    • data: String? - Log data.
    • logIndex: BigInteger? - Log index.
    • transactionHash: String? - Transaction hash for the log.
    • transactionIndex: BigInteger? - Transaction index.
    • removed: Boolean? - Removed status.
    • topics: List<String>? - List of topics.
  • Description: Data class representing the receipt of a transaction.
  • Properties:
    • blobGasPrice: BigInteger? - Blob gas price.
    • blobGasUsed: BigInteger? - Blob gas used.
    • blockHash: String? - Block hash.
    • blockNumber: BigInteger? - Block number.
    • contractAddress: String? - Contract address.
    • cumulativeGasUsed: BigInteger? - Cumulative gas used.
    • effectiveGasPrice: BigInteger? - Effective gas price.
    • from: String? - Sender address.
    • gasUsed: BigInteger? - Gas used.
    • logs: List<Log>? - List of logs.
    • logsBloom: String? - Logs bloom.
    • root: String? - Root.
    • status: String? - Transaction status.
    • to: String? - Receiver address.
    • transactionHash: String? - Transaction hash.
    • transactionIndex: BigInteger? - Transaction index.
    • type: String? - Transaction type.
  • Description: Data class representing the result of getting paymaster data.
  • Properties:
    • paymasterAndData: String? - Combined paymaster and data.
    • paymasterData: String? - Paymaster data.
    • paymaster: String? - Paymaster address.
    • paymasterPostOpGasLimit: BigInteger? - Gas limit for post-operation of paymaster.
    • paymasterVerificationGasLimit: BigInteger? - Gas limit for verification of paymaster.
  • Description: Data class representing the result of getting paymaster stub data.
  • Properties:
    • paymasterAndData: String? - Combined paymaster and data.
    • paymaster: String? - Paymaster address.
    • paymasterData: String? - Paymaster data.
    • paymasterPostOpGasLimit: BigInteger? - Gas limit for post-operation of paymaster.
    • paymasterVerificationGasLimit: BigInteger? - Gas limit for verification of paymaster.
    • isFinal: Boolean? - Indicates if the data is final.
    • sponsor: Sponsor? - Sponsor information.
  • Description: Data class representing a block.
  • Properties:
    • baseFeePerGas: BigInteger? - Base fee per gas.
    • blobGasUsed: BigInteger? - Total used blob gas by all transactions in this block.
    • difficulty: BigInteger? - Difficulty for this block.
    • excessBlobGas: BigInteger? - Excess blob gas.
    • extraData: String? - "Extra data" field of this block.
    • gasLimit: BigInteger? - Maximum gas allowed in this block.
    • gasUsed: BigInteger? - Total used gas by all transactions in this block.
    • hash: String? - Block hash or null if pending.
    • logsBloom: String? - Logs bloom filter or null if pending.
    • miner: String? - Address that received this block’s mining rewards.
    • mixHash: String? - Unique identifier for the block.
    • nonce: String? - Proof-of-work hash or null if pending.
    • number: BigInteger? - Block number or null if pending.
    • parentBeaconBlockRoot: String? - Root of the parent beacon chain block.
    • parentHash: String? - Parent block hash.
    • receiptsRoot: String? - Root of this block’s receipts trie.
    • sealFields: List<String>? - List of seal fields.
    • sha3Uncles: String? - SHA3 of the uncles data in this block.
    • size: BigInteger? - Size of this block in bytes.
    • stateRoot: String? - Root of this block’s final state trie.
    • timestamp: BigInteger? - Unix timestamp of when this block was collated.
    • totalDifficulty: BigInteger? - Total difficulty of the chain until this block.
    • transactions: Array<String>? - List of transaction objects or hashes.
    • transactionsRoot: String? - Root of this block’s transaction trie.
    • uncles: Array<String>? - List of uncle hashes.
    • withdrawals: Array<Withdrawal>? - List of withdrawal objects.
    • withdrawalsRoot: String? - Root of this block’s withdrawals trie.
  • Description: The return type for encodeTransfer.
  • Properties:
    • data: String - The encoded data.
    • to: String - The token address.
  • Description: Enum class representing entry points with their respective addresses.
  • Properties:
    • address: String - The address of the entry point.
  • Entries
    • V07 - Represents the entry point version 0.7 with its respective address.
  • Description: Sealed class for setting User Operation Paymaster configuration.
    • If paymaster is PaymasterClient, it will use the provided Paymaster Client for sponsorship.
    • If paymaster is true, it will be assumed that the Bundler Client also supports Paymaster RPC methods (e.g. getPaymasterData), and uses them for sponsorship.
  • Subclasses
    • True
      • Description: Represents a Paymaster configuration where the Bundler Client supports Paymaster RPC methods.
      • Properties:
        • paymasterContext: Map<String, Any>? - Optional context for the paymaster.
    • Client
      • Description: Represents a Paymaster configuration using a provided Paymaster Client for sponsorship.
      • Properties:
        • client: PaymasterClient - The Paymaster Client used for sponsorship.
        • paymasterContext: Map<String, Any>? - Optional context for the paymaster.
  • Description: Abstract class representing a public key credential, with the following derived classes:
    • RegistrationCredential
    • AuthenticationCredential
  • Properties:
    • id: String - The unique identifier for the credential.
    • type: String - The type of the credential.
    • authenticatorAttachment: String - The attachment type of the authenticator.
    • response: AuthenticatorResponse - The response from the authenticator.
    • clientExtensionResults: AuthenticationExtensionsClientOutputs? - Optional client extension results.
  • Description: Data class representing a block.
  • Properties:
    • rawId: String - The raw identifier for the credential.
    • authenticatorAttachment: String - The attachment type of the authenticator.
    • type: String - The type of the credential.
    • id: String - The unique identifier for the credential.
    • response: AuthenticatorAttestationResponse - The attestation response from the authenticator.
    • clientExtensionResults: AuthenticationExtensionsClientOutputs? - Optional client extension results.
  • Inheritance: Inherits from PublicKeyCredential.
  • Description: Data class representing a registration credential.
  • Properties:
    • rawId: String - The raw identifier for the credential.
    • authenticatorAttachment: String - The attachment type of the authenticator.
    • type: String - The type of the credential.
    • id: String - The unique identifier for the credential.
    • response: AuthenticatorAssertionResponse - The assertion response from the authenticator.
    • clientExtensionResults: AuthenticationExtensionsClientOutputs? - Optional client extension results.
  • Inheritance: Inherits from PublicKeyCredential.
  • Description: Abstract class representing a user operation, with the following derived classes:
    • UserOperationV07
  • Properties:
    • sender: String? - The address of the sender.
    • nonce: BigInteger? - The nonce of the operation.
    • callData: String? - The data to be sent in the call.
    • callGasLimit: BigInteger? - The gas limit for the call.
    • verificationGasLimit: BigInteger? - The gas limit for verification.
    • preVerificationGas: BigInteger? - The gas used before verification.
    • maxPriorityFeePerGas: BigInteger? - The maximum priority fee per gas.
    • maxFeePerGas: BigInteger? - The maximum fee per gas.
    • signature: String? - The signature of the operation.
  • Description: Data class representing a user operation for version 0.7.
  • Properties:
    • sender: String? - The address of the sender.
    • nonce: BigInteger? - The nonce of the operation.
    • callData: String? - The data to be sent in the call.
    • callGasLimit: BigInteger? - The gas limit for the call.
    • verificationGasLimit: BigInteger? - The gas limit for verification.
    • preVerificationGas: BigInteger? - The gas used before verification.
    • maxPriorityFeePerGas: BigInteger? - The maximum priority fee per gas.
    • maxFeePerGas: BigInteger? - The maximum fee per gas.
    • signature: String? - The signature of the operation.
    • factory: String? - The factory address.
    • factoryData: String? - The data for the factory.
    • paymaster: String? - The paymaster address.
    • paymasterVerificationGasLimit: BigInteger? - The gas limit for paymaster verification.
    • paymasterPostOpGasLimit: BigInteger? - The gas limit for paymaster post-operation.
    • paymasterData: String? - The data for the paymaster.
  • Inheritance: Inherits from UserOperation.
  • Description: Data class representing a user operation in RPC format.
  • Properties:
    • sender: String? - The address of the sender.
    • nonce: String? - The nonce of the operation.
    • callData: String? - The data to be sent in the call.
    • callGasLimit: String? - The gas limit for the call.
    • verificationGasLimit: String? - The gas limit for verification.
    • preVerificationGas: String? - The gas used before verification.
    • maxPriorityFeePerGas: String? - The maximum priority fee per gas.
    • maxFeePerGas: String? - The maximum fee per gas.
    • signature: String? - The signature of the operation.
    • factory: String? - The factory address.
    • factoryData: String? - The data for the factory.
    • paymaster: String? - The paymaster address.
    • paymasterVerificationGasLimit: String? - The gas limit for paymaster verification.
    • paymasterPostOpGasLimit: String? - The gas limit for paymaster post-operation.
    • paymasterData: String? - The data for the paymaster.
    • initCode: String? - The initialization code.
    • paymasterAndData: String? - The paymaster and data.
  • Description: Converts a UserOperationV07 instance to a UserOperationRpc instance.
  • Returns: A UserOperationRpc instance with the corresponding properties from the UserOperationV07 instance.
  • Description: Converts a UserOperation instance to a UserOperationRpc instance.
  • Returns: A UserOperationRpc instance with the corresponding properties from the UserOperation instance.
  • Description: Converts a UserOperationRpc instance to a UserOperationV07 instance.
  • Returns: A UserOperationV07 instance with the corresponding properties from the UserOperationRpc instance.
  • Description: Enum class representing the WebAuthn modes.
  • Entries
    • Register - Mode for registering a new credential.
    • Login - Mode for logging in with an existing credential.
  • Description: Enum representing various tokens supported by encodeTransfer. The format is {chain}_{symbol}.
  • Entries
    • Polygon_USDC
    • Arbitrum_USDC
    • Arbitrum_ARB
    • Base_USDC
    • Optimism_USDC
    • Unichain_USDC
    • PolygonAmoy_USDC
    • ArbitrumSepolia_USDC
    • BaseSepolia_USDC
    • OptimismSepolia_USDC
    • UnichainSepolia_USDC
  • Description: Abstract class representing the necessary definition of a blockchain for the SDK, with the following derived object classes as predefined chains:
    • Arbitrum
    • ArbitrumSepolia
    • Base
    • BaseSepolia
    • Optimism
    • OptimismSepolia
    • Polygon
    • PolygonAmoy
    • Unichain
    • UnichainSepolia
  • Properties:
    • chainId: Long - The unique identifier for the blockchain.
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.