Wallets

Modular Wallets Web SDK

Welcome to Circle's Modular Wallets Web 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 on the NPM package repository to install and set up the Modular Wallets Web SDK.

The following sections detail the SDK's transport mechanisms, client interactions, account management, providers, utilities, interfaces, and types.

Transports handle communication between the SDK and blockchain networks or APIs. They form the foundation for executing requests, such as JSON-RPC calls, ensuring secure and efficient interactions.

  • Description: Creates a custom transport instance with the given clientUrl and clientKey.
  • Parameters:
    • clientUrl: string - The Client URL to use.
    • clientKey: string - The Client key to use.
  • Returns: CustomTransport - The custom transport instance.
  • Description: Creates a custom transport instance with the given clientUrl and clientKey.
  • Parameters:
    • clientUrl: string - The Client URL to use.
    • clientKey: string - The Client key to use.
  • Returns: CustomTransport - The custom transport instance.
AspecttoModularTransporttoPasskeyTransport
PurposeHandles modular wallet-related blockchain actions.Handles passkey-based user authentication.
ServiceTalks to Circle Modular Wallet API for wallet operations.Talks to Circle Relying Party (RP) API for authentication flows.
FocusBlockchain and wallet operations (transactions, balances).WebAuthn-based secure login and registration.
InteractionBlockchain-focused (e.g., Arbitrum Sepolia).Credential-focused (e.g., verifying passkeys).
Example Use CaseSending gasless transactionsRegistering or logging into a modular wallet.
  • User Authentication:
    • Use toPasskeyTransport for registering a wallet or logging in with a passkey.
    • This verifies the WebAuthn credential with Circle's RP API.
  • Blockchain Operations:
    • After authentication, use toModularTransport to interact with the wallet on-chain (e.g., sending transactions or fetching balances).
  • Description: Creates a Bundler Client for interacting with ERC-4337 Bundlers, enabling the sending and retrieval of User Operations through Bundler Actions.
  • Parameters:
    • config: BundlerClientConfig - The configuration object containing the following properties:
      • transport: Transport - The transport mechanism used for making RPC requests.
      • chain?: Chain - Specifies the blockchain chain to interact with.
      • Other optional properties can be found in the Viem Bundler Client Documentation.
  • Returns: BundlerClient - A Bundler Client.
Bundler Actions

The Bundler Client supports the following key actions:

  • estimateUserOperationGas - Calculates the gas required for a User Operation.
  • sendUserOperation - Submits a User Operation to the bundler for processing.
  • getUserOperationReceipt - Retrieves the receipt for a User Operation.

For the full list of actions and detailed documentation, see the Viem Bundler Actions Documentation.

  • Description: Creates a public client for interacting with blockchain nodes. This client is used for tasks such as querying blockchain data and sending transactions.
  • Parameters:
    • config: PublicClientConfig - The configuration object containing the following properties:
      • transport: Transport - The transport mechanism used for making RPC requests.
      • chain?: Chain - Specifies the blockchain chain to interact with.
      • Other optional properties can be found in the Viem Public Client Documentation.
  • Returns: PublicClient - A Public Client.
Public Client Actions

The Public Client supports the following key actions:

  • getBlock - Retrieves information about a block using its number, hash, or a specific tag
  • getTransaction - Fetches details of a transaction using its hash.
  • getBalance - Returns the balance of the specified address.
  • call - Executes a "call" to a contract function and retrieves the result without modifying the blockchain state.
  • sendTransaction - Submits a signed transaction to the blockchain network for processing.
  • verifyMessage - Confirms whether a given message was signed by the specified address.

For the full list of actions and detailed documentation, see the Viem Public Actions Documentation.

  • Description: Creates an RP Client for interacting with the RP API
  • Parameters:
    • config: RpClientConfig - The configuration object containing the following properties:
      • transport: Transport - The transport mechanism used for making RPC requests. (required)
      • cacheTime?: number (default: 4_000) - Time (in milliseconds) that cached data will remain in memory.
      • key?: string - A key for the client.
      • name?: string - A name for the client.
      • pollingInterval?: number (default: 4_000) - Frequency (in milliseconds) for polling enabled actions & events.
      • rpcSchema?: rpcSchema - Typed JSON-RPC schema for the client.
  • Returns: RpClient<transport, rpcSchema> - An RP Client.
  • Description: Creates a Circle smart account.
  • Parameters:
    • client: Client - The client instance.
    • owner: WebAuthnAccount | LocalAccount - The owner account associated with the Circle smart account.
    • address?: Address - The address.
    • name?: string (default: "passkey-{timestamp}", e.g. 2025-01-01T00:00:00.000Z) - The wallet name assigned to the newly registered account.
    • nonce?: bigint - The Nonce.
  • Returns: Promise<ToCircleSmartAccountReturnType>
  • Description: Logs in or registers a user and returns a WebAuthnCredential.
  • Parameters:
    • mode: WebAuthnMode - The mode of the WebAuthn credential (Login or Register).
    • transport: Transport - The transport used to communicate with the RP API.
    • credentialId?: string - The existing credential ID for passkey login.
    • username?: string - The username for passkey registration.
  • Returns: Promise<WebAuthnCredential>
  • Description: Provider for connecting to the Modular Wallets API and executing Web3 API requests.
  • Parameters:
    • clientUrl: string - The Client URL to use.
    • clientKey: string - The Client key to use.
request
  • Description: Sends a Web3 API request to the Modular Wallets API using the specified method and payload, with optional request configuration.
  • Parameters:
    • payload: Web3APIPayload<API, Method> - The payload for the Web3 API request, including the method name and its parameters.
    • requestOptions?: RequestInit - Optional configuration for the HTTP request, such as headers or request mode.
  • Returns: Promise<ResultType> - A promise resolving to the result of the API call.
  • Description: Provider for connecting to the Paymaster API, enabling interaction with ERC-7677 compliant Paymasters to sponsor User Operation gas fees.
  • Parameters:
    • clientUrl: string - The Client URL to use.
    • clientKey: string - The Client key to use.
request
  • Description: Sends a request to the Paymaster API using the specified method and payload, with optional request configuration.
  • Parameters:
    • payload: Web3APIPayload<API, Method> - The payload for the API request, including the method name and its parameters.
    • requestOptions?: RequestInit - Optional configuration for the HTTP request, such as headers or request mode.
  • Returns: Promise<ResultType> - A promise resolving to the result of the API call.
  • Description: Provider for connecting to the RP API and executing Web3 API requests.
  • Parameters:
    • clientUrl: string - The Client URL to use.
    • clientKey: string - The Client key to use.
request
  • Description: Sends a request to the RP API using the specified method and payload, with optional request configuration.
  • Parameters:
    • payload: Web3APIPayload<API, Method> - The payload for the API request, including the method name and its parameters.
    • requestOptions?: RequestInit - Optional configuration for the HTTP request, such as headers or request mode.
  • Returns: Promise<ResultType> - A promise resolving to the result of the API call.
  • Description: An EIP-1193 wrapper provider for connecting to the Modular Wallets API and the public RPC endpoint and executing Web3 API requests via the passed-in bundler client instance.
  • Parameters:
    • bundlerClient: BundlerClient - The bundler client instance.
    • publicClient: PublicClient - The public client instance.
request
  • Description: Sends a request to the Modular Wallets API using the specified method and payload, with optional request configuration.
  • Parameters:
    • payload: Web3APIPayload<API, Method> - The payload for the API request, including the method name and its parameters.
    • requestOptions?: RequestInit - Optional configuration for the HTTP request, such as headers or request mode.
  • Returns: Promise<ResultType> - A promise resolving to the result of the API call.
  • Description: Creates an address mapping for recovery.
  • Parameters:
    • client: Client<Transport> - The Client to use.
    • params: CreateAddressMappingParameters - Parameters to use.
  • Returns: Promise<CreateAddressMappingReturnType> - The mapping result.
  • Description: Encodes the ERC20 transfer for user operations.
  • Parameters:
    • to: 0x${string} - The recipient address.
    • token: 0x${string} - The token contract address. Supported tokens and their information are listed below.
    • amount: bigInt - The amount to transfer.
  • Returns: EncodeTransferReturnType - The encoded transfer.
  • Supported Tokens:
Blockchain NetworkToken Name (Symbol)EnumContract Address
Polygon MainnetUSD Coin (USDC)ContractAddress.Polygon_USDC0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359
Arbitrum MainnetUSD Coin (USDC)ContractAddress.Arbitrum_USDC0xaf88d065e77c8cC2239327C5EDb3A432268e5831
Arbitrum MainnetArbitrum (ARB)ContractAddress.Arbitrum_ARB0x912CE59144191C1204E64559FE8253a0e49E6548
Base MainnetUSD Coin (USDC)ContractAddress.Base_USDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Optimism MainnetUSD Coin (USDC)ContractAddress.Optimism_USDC0x0b2c639c533813f4aa9d7837caf62653d097ff85
Optimism MainnetOptimism (OP)ContractAddress.Optimism_OP0x4200000000000000000000000000000000000042
Unichain MainnetUSD Coin (USDC)ContractAddress.Unichain_USDC0x078D782b760474a361dDA0AF3839290b0EF57AD6
Polygon Amoy TestnetUSD Coin (USDC)ContractAddres.PolygonAmoy_USDC0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582
Arbitrum Sepolia TestnetUSD Coin (USDC)ContractAddress.ArbitrumSepolia_USDC0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d
Base Sepolia TestnetUSD Coin (USDC)ContractAddress.BaseSepolia_USDC0x036CbD53842c5426634e7929541eC2318f3dCF7e
Optimism Sepolia TestnetUSD Coin (USDC)ContractAddress.OptimismSepolia_USDC0x5fd84259d66Cd46123540766Be93DFE6D43130D7
Unichain Sepolia TestnetUSD Coin (USDC)ContractAddress.UnichainSepolia_USDC0x31d0220469e10c4E71834a79b1f276d740d3768F
  • Description: Estimates the gas required to execute and finalize the recovery process.
  • Parameters:
    • client: Client<Transport, Chain | undefined, SmartAccount | undefined> - The Client to use.
    • params: EstimateExecuteRecoveryGasParameters - Parameters to use.
  • Returns: Promise<EstimateUserOperationGasReturnType> - The mapping result.
  • Description: Estimates the gas required to register a recovery address during the recovery process.
  • Parameters:
    • client: Client<Transport, Chain | undefined, SmartAccount | undefined> - The Client to use.
    • params: EstimateRegisterRecoveryAddressGasParameters - Parameters to use.
  • Returns: Promise<EstimateUserOperationGasReturnType> - An estimate of gas values necessary to register a recovery address.
  • Description: Executes and finalizes the recovery process.
  • Parameters:
    • client: Client<Transport, Chain | undefined, SmartAccount | undefined> - The Client to use.
    • params: ExecuteRecoveryParameters - Parameters to use.
  • Returns: Promise<0x${string}> - The user operation hash from executing recovery onchain.
  • Description: Gets the Circle smart wallet address for the user.
  • Parameters:
    • client: Client<Transport> - The Client to use.
    • params: GetAddressParameters - Parameters to use.
  • Returns: Promise<ModularWallet> - Circle smart wallet creation response.
  • Description: Gets the address mapping for a given owner.
  • Parameters:
    • client: Client<Transport> - The Client to use.
    • params: GetAddressMappingParameters - Parameters to use.
  • Returns: Promise<GetAddressMappingReturnType> - The mapping result.
  • Description: Returns the login options, including a challenge for verification.
  • Parameters:
    • client: Client<Transport> - The Client to use.
    • params: GetLoginOptionsParameters - Parameters to use.
  • Returns: Promise<CustomPublicKeyCredentialRequestOptions> - Credential Request Options.
  • Description: Returns the login verification response to indicate if it's verified or not.
  • Parameters:
    • client: Client<Transport> - The Client to use.
    • params: GetLoginVerificationParameters - Parameters to use.
  • Returns: Promise<GetLoginVerificationReturnType> - WebAuthn Verification Response.
  • Description: Gets the Circle modular wallet address.
  • Parameters:
    • parameters: GetCircleSmartAccountAddressParameters - The configuration object containing the following properties:
      • client: CircleModularWalletClient - The Circle modular wallet client instance.
      • owner: WebAuthnAccount - The owner.
      • name?: string - The Circle Smart Account wallet name.
  • Returns: Promise<GetAddressReturnType> - The Circle modular wallet address.
  • Description: Returns the registration options, including a challenge for verification.
  • Parameters:
    • client: Client<Transport> - The Client to use.
    • params: GetRegistrationOptionsParameters - Parameters to use.
  • Returns: Promise<CustomPublicKeyCredentialCreationOptions> - Credential Creation Options.
  • Description: Returns the registration verification response to indicate if it's verified or not.
  • Parameters:
    • client: Client<Transport> - The Client to use.
    • params: GetRegistrationVerificationParameters - Parameters to use.
  • Returns: Promise<GetRegistrationVerificationReturnType> - WebAuthn Verification Response.
  • Description: Returns the Modular Wallets actions.
  • Parameters:
    • client: Client<Transport> - The Client to use.
  • Returns: ModularWalletActions - Modular Wallets Actions.
  • Description: Converts a string representation of ether to numerical wei.
  • Properties:
    • value: string - The string representation of ether.
  • Returns: bigint - The numerical value in wei. For more information, see the Viem documentation.
  • Description: Converts a string representation of gwei to numerical wei.
  • Properties:
    • value: string - The string representation of gwei..
  • Returns: bigint - The numerical value in wei. For more information, see the Viem documentation.
  • Description: Returns the Recovery actions.
  • Parameters:
    • client: Client<Transport> - The Client to use.
  • Returns: RecoveryActions - Recovery Actions.
  • Description: Registers a recovery address during the recovery process.
  • Parameters:
    • client: Client<Transport, Chain | undefined, SmartAccount | undefined> - The Client to use.
    • params: RegisterRecoveryAddressParameters - Parameters to use.
  • Returns: Promise<0x${string}> - The user operation hash from registering the recovery address onchain.
  • Description: Returns the RP actions.
  • Parameters:
    • client: Client<Transport> - The Client to use.
  • Returns: RpActions - Rp Actions.
  • Description: Transforms a client into a Circle modular wallet client using decorators.
  • Parameters:
    • client: Client - The client instance.
  • Returns: CircleModularWalletClient - A decorated Circle modular wallet client.
  • Description: Creates a Local Account from a Wallet Client.
  • Parameters:
    • walletClient: WalletClient - The Wallet Client to use.
  • Returns: LocalAccount - A Local Account.
  • Description: Signs a hash and parses it to a ABI-encoded webauthn signature. The dynamic part of the secp256r1 signature.
  • Parameters:
    • parameters: WebAuthnSignParameters - The configuration object containing the following properties:
      • hash: Hash - The hash to sign.
      • owner: WebAuthnAccount - The owner of the account.
  • Returns: Promise<0x${string}> - The ABI-encoded webauthn signature.
  • Description: Enum class representing the different types of accounts.
  • Members:
    • Local - An account that is stored locally and supports private key-based signing.
    • WebAuthn - An account that relies on WebAuthn for authentication and signing.
  • Description: Enum class representing the supported token contract addresses.
  • Members:
    • Arbitrum_ARB - The Arbitrum governance token contract address.
    • Arbitrum_USDC - The USDC token contract address on Arbitrum.
    • ArbitrumSepolia_USDC - The USDC token contract address on Arbitrum testnet.
    • Base_USDC - The USDC token contract address on Base.
    • BaseSepolia_USDC - The USDC token contract address on Base testnet.
    • Optimism_OP - The Optimism governance token contract address.
    • Optimism_USDC - The USDC token contract address on Optimism.
    • OptimismSepolia_USDC - The USDC token contract address on Optimism testnet.
    • Polygon_USDC - The USDC token contract address on Polygon.
    • PolygonAmoy_USDC - The USDC token contract address on Polygon testnet.
    • Unichain_USDC - The USDC token contract address on Unichain.
    • UnichainSepolia_USDC - The USDC token contract address on Unichain testnet.
  • Description: Enum class representing the owner identifier types for address mapping.
  • Members:
    • EOA - The Externally Owned Account (EOA) owner identifier.
    • WebAuthn - The WebAuthn owner identifier.
  • Description: Enum class representing the WebAuthn modes.
  • Members:
    • Login - Mode for logging in with an existing credential.
    • Register - Mode for registering a new credential.
  • Description: Represents a digital signature from a WebAuthn credential, allowing servers to verify and authenticate a user during actions like signing in.
  • Properties:
    • userHandle: ArrayBuffer - A read-only property providing an opaque identifier for linking a user account to its credentials. MDN Reference
  • Description: Represents a digital signature from a WebAuthn credential, allowing servers to verify and authenticate a user during actions like signing in.
  • Methods:
    • getPublicKey(): ArrayBuffer - Returns an ArrayBuffer containing the DER SubjectPublicKeyInfo of the new credential, or null if unavailable. MDN Reference
  • Description: Defines the parameters required to create a WebAuthn credential.
  • Properties:
    • credential: PublicKeyCredential - The WebAuthn Credential.
    • rpId: string | undefined - The RP ID.
  • Description: Defines the parameters required to create a WebAuthn credential with support for custom user entities and advanced authentication options.
  • Properties:
    • challenge: string - A unique challenge generated by the server to prevent replay attacks.
    • pubKeyCredParams: PublicKeyCredentialParameters[] - The list of acceptable credential types and cryptographic algorithms.
    • rp: PublicKeyCredentialRpEntity - The relying party (RP) entity initiating the credential creation.
    • user: CustomPublicKeyCredentialUserEntity - Information about the user for whom the credential is being created.
    • attestation?: AttestationConveyancePreference - Indicates the desired attestation type (e.g., none, indirect, or direct).
    • authenticatorSelection?: AuthenticatorSelectionCriteria - Specifies criteria for selecting the authenticator to use.
    • excludeCredentials?: PublicKeyCredentialDescriptor[] - Credentials to exclude during the creation process to prevent duplication.
    • extensions?: AuthenticationExtensionsClientInputs - Additional extensions for client-side processing during credential creation.
    • timeout?: number - The time (in milliseconds) the operation is allowed to take before timing out.
  • Description: Represents a descriptor for a WebAuthn credential.
  • Properties:
    • id: string - The unique identifier for the credential.
    • type: "public-key" - The type of credential, which is always "public-key" for WebAuthn.
    • transports?: AuthenticatorTransport[] - The list of supported transport methods.
  • Description: Defines the parameters for requesting a WebAuthn credential.
  • Properties:
    • challenge: string - A unique challenge generated by the server to prevent replay attacks.
    • allowCredentials?: CustomPublicKeyCredentialDescriptor[] - A list of credentials that are allowed to authenticate the user.
    • extensions?: AuthenticationExtensionsClientInputs - Additional extensions for client-side processing during the authentication process.
    • rpId?: string - The relying party (RP) ID associated with the authentication request.
    • timeout?: number - The time (in milliseconds) the operation is allowed to take before timing out.
    • userVerification?: UserVerificationRequirement - Specifies the user verification level required.
  • Description: Represents information about a user entity for creating or managing WebAuthn credentials.
  • Properties:
    • displayName: string - The user's display name.
    • id: string - A unique identifier for the user.
    • name: string - The user's name (for example, username or email).
  • Description: Defines the parameters required to estimate gas to execute recovery.
  • Properties:
    • credential: P256Credential - The newly registered passkey credential.
  • Description: Defines the parameters required to estimate gas to register a recovery address.
  • Properties:
    • recoveryAddress: 0x${string} - The derived address of the recovery key.
  • Description: Defines the parameters required to execute recovery.
  • Properties:
    • credential: P256Credential - The newly registered passkey credential.
  • Description: Represents the return type for a login verification request.
  • Properties:
    • publicKey: string - The public key associated with the login verification process.
  • Description: Represents the return type for a registration verification request.
  • Properties:
    • verified?: null | boolean - The verification status, which can be true (verified), false (not verified), or null (no status available).
  • Description: Defines the parameters required to register a recovery address.
  • Properties:
    • recoveryAddress: 0x${string} - The recovery address.
  • Description: Defines the parameters required to create a Circle Modular Wallet Client.
  • Properties:
    • client: Client - The client instance used to interact with the Circle Modular Wallet.
  • Description: Defines the parameters required to convert an account to a WebAuthn-based account.
  • Properties:
    • mode: WebAuthnMode - The WebAuthn mode to be used.
    • transport: Transport - The transport mechanism used for interacting with the WebAuthn API.
    • credentialId?: string - The ID of the WebAuthn credential.
    • username?: string - The username associated with the account.
  • Description: Represents a WebAuthn credential.
  • Properties:
    • id: string - The unique identifier for the WebAuthn credential.
    • publicKey: 0x${string} - The public key associated with the credential, in hexadecimal format.
    • raw: PublicKeyCredential - The raw WebAuthn credential object.
    • rpId: undefined | string - The relying party (RP) ID linked to the credential.
  • Description: Represents a client for interacting with Circle Modular Wallets.
  • Type Definition:
JavaScript
type CircleModularWalletClient: Client<
    Transport,
    Chain | undefined,
    Account | undefined,
    ExtendedRpcSchema<RpcSchema>,
    ModularWalletActions,
>
  • Description: Extends the SmartAccountImplementation with additional factory arguments and signing capabilities specific to Circle's modular smart contract accounts.
  • Type Definition:
JavaScript
type CircleSmartAccountImplementation = Assign<
  SmartAccountImplementation<
    typeof entryPoint07Abi,
    "0.7",
    {
      abi: typeof entryPoint07Abi;
      factory: {
        abi: typeof CIRCLE_MSCA_6900_V1_EP07_FACTORY_ABI;
        address: Address;
      };
    }
  >,
  {
    getFactoryArgs: NonNullable<
      SmartAccountImplementation["getFactoryArgs"]
    >;
    sign: NonNullable<SmartAccountImplementation["sign"]>;
  }
>
  • Description: The return type for adding an address mapping.
  • Type Definition:
JavaScript
CreateAddressMappingReturnType: AddressMappingResponse[]
  • Description: The RPC schema for adding an address mapping.
  • Type Definition:
JavaScript
type CreateAddressMappingRpcSchema = {
  Method: "circle_createAddressMapping";
  Parameters: [CreateAddressMappingParameters];
  ReturnType: CreateAddressMappingReturnType;
}
  • Description: Represents possible error types for creating an RP Client, combining standard client error types and additional error types.
  • Type Definition:
JavaScript
type CreateRpClientErrorType = CreateClientErrorType | ErrorType
  • Description: Extends the base RPC schema by appending the Modular Wallet RPC schema. If rpcSchema is provided and extends RpcSchema, it combines both; otherwise, it defaults to the Modular Wallet RPC schema.
  • Type Definition:
JavaScript
type ExtendedRpcSchema = rpcSchema extends RpcSchema
  ? [...ModularWalletRpcSchema, ...rpcSchema]
  : ModularWalletRpcSchema
  • Description: The return type for getting an address mapping.
  • Type Definition:
JavaScript
GetAddressMappingReturnType: AddressMappingResponse[]
  • Description: Get the address mapping for the specified owner.
  • Type Definition:
JavaScript
type GetAddressMappingRpcSchema = {
  Method: "circle_getAddressMapping";
  Parameters: [GetAddressMappingParameters];
  ReturnType: GetAddressMappingReturnType;
}
  • Description: Defines the parameters required for retrieving an address.
  • Type Definition:
JavaScript
type GetAddressParameters = [
  {
    metadata?: { name?: string };
    scaConfiguration: {
      initialOwnershipConfiguration: Omit<
        InitialOwnershipConfiguration,
        "ownershipContractAddress"
      >;
      scaCore: string;
    };
  },
]
  • Description: The Get Circle modular wallet address response.
  • Type Definition:
JavaScript
type GetAddressReturnType = ModularWallet
  • Description: Defines the RPC schema for the circle_getAddress method
  • Type Definition:
JavaScript
type GetAddressRpcSchema = {
  Method: "circle_getAddress";
  Parameters?: [
    {
      scaConfiguration: {
        initialOwnershipConfiguration: Omit<
          InitialOwnershipConfiguration,
          "ownershipContractAddress"
        >;
        scaCore: string;
      };
    }
  ];
  ReturnType: GetAddressReturnType;
}
  • Description: Defines the parameters required to retrieve login options.
  • Type Definition:
JavaScript
type GetLoginOptionsParameters = {
  userId: string;
}
  • Description: Defines the parameters required to retrieve login options.
  • Type Definition:
JavaScript
type GetLoginOptionsReturnType = CustomPublicKeyCredentialRequestOptions
  • Description: Defines the RPC schema for the rp_getLoginOptions method.
  • Type Definition:
JavaScript
type GetLoginOptionsRpcSchema = {
  Method: "rp_getLoginOptions";
  Parameters?: [userId: string];
  ReturnType: GetLoginOptionsReturnType;
}
  • Description: Defines the parameters required to verify a login attempt.
  • Type Definition:
JavaScript
type GetLoginVerificationParameters = {
  credential: PublicKeyCredential;
}
  • Description: Defines the RPC schema for the rp_getLoginVerification method.
  • Type Definition:
JavaScript
type GetLoginVerificationRpcSchema = {
  Method: "rp_getLoginVerification";
  Parameters?: [authenticationCredential: PublicKeyCredential];
  ReturnType: GetLoginVerificationReturnType;
}
  • Description: Defines the parameters required to retrieve registration options.
  • Type Definition:
JavaScript
type GetRegistrationOptionsParameters = {
  username: string;
}
  • Description: Represents the return type for retrieving registration options.
  • Type Definition:
JavaScript
type GetRegistrationOptionsReturnType = CustomPublicKeyCredentialCreationOptions
  • Description: Defines the RPC schema for the rp_getRegistrationOptions method.
  • Type Definition:
JavaScript
type GetRegistrationOptionsRpcSchema = {
  Method: "rp_getRegistrationOptions";
  Parameters?: [username: string];
  ReturnType: GetRegistrationOptionsReturnType;
}
  • Description: Defines the parameters required to verify a registration attempt.
  • Type Definition:
JavaScript
type GetRegistrationVerificationParameters = {
  credential: PublicKeyCredential;
}
  • Description: Defines the RPC schema for the rp_getRegistrationVerification method.
  • Type Definition:
JavaScript
type GetRegistrationVerificationRpcSchema = {
  Method: "rp_getRegistrationVerification";
  Parameters?: [registrationCredential: PublicKeyCredential];
  ReturnType: GetRegistrationVerificationReturnType;
}
  • Description: Represents the available actions for a modular wallet,
  • Type Definition:
JavaScript
type ModularWalletActions = {
  getAddress: (
    parameters: GetAddressParameters,
  ) => Promise<GetAddressReturnType>;
}
  • Description: Represents the RPC schema for modular wallets.
  • Type Definition:
JavaScript
type ModularWalletRpcSchema = [GetAddressRpcSchema]
  • Description: Represents the actions available for the passkey recovery process.
  • Type Definition:
JavaScript
type RecoveryActions = {
    estimateExecuteRecoveryGas: (
        parameters: EstimateExecuteRecoveryGasParameters,
    ) => Promise<EstimateUserOperationGasReturnType>;
    estimateRegisterRecoveryAddressGas: (
        parameters: EstimateRegisterRecoveryAddressGasParameters,
    ) => Promise<EstimateUserOperationGasReturnType>;
    executeRecovery: (
        parameters: ExecuteRecoveryParameters,
    ) => Promise<SendUserOperationReturnType>;
    registerRecoveryAddress: (
        params: RegisterRecoveryAddressParameters,
    ) => Promise<SendUserOperationReturnType>;
}
  • Description: Represents the actions available for the RP (Relying Party) API.
  • Type Definition:
JavaScript
type RpActions = {
  getLoginOptions: (
    parameters: GetLoginOptionsParameters,
  ) => Promise<GetLoginOptionsReturnType>;
  getLoginVerification: (
    parameters: GetLoginVerificationParameters,
  ) => Promise<GetLoginVerificationReturnType>;
  getRegistrationOptions: (
    parameters: GetRegistrationOptionsParameters,
  ) => Promise<GetRegistrationOptionsReturnType>;
  getRegistrationVerification: (
    parameters: GetRegistrationVerificationParameters,
  ) => Promise<GetRegistrationVerificationReturnType>;
}
  • Description: Represents a prettified RP (Relying Party) client.
  • Type Definition:
JavaScript
type RpClient = Prettify<
  Client<
    transport,
    undefined,
    undefined,
    rpcSchema extends RpcSchema
      ? [...RpRpcSchema, ...rpcSchema]
      : RpRpcSchema,
    RpActions
  >
>
  • Description: Represents the configuration options for creating an RP (Relying Party) client.
  • Type Definition:
JavaScript
type RpClientConfig = Prettify<
  Pick<
    ClientConfig<transport, undefined, undefined, rpcSchema>,
    | "cacheTime"
    | "key"
    | "name"
    | "pollingInterval"
    | "rpcSchema"
    | "transport"
  >
>
  • Description: Represents the RPC schema for the RP (Relying Party) client.
  • Type Definition:
JavaScript
type RpRpcSchema = [
  GetLoginOptionsRpcSchema,
  GetLoginVerificationRpcSchema,
  GetRegistrationOptionsRpcSchema,
  GetRegistrationVerificationRpcSchema
]
  • Description: Defines the parameters required to create a Circle Smart Account.
  • Type Definition:
JavaScript
type ToCircleSmartAccountParameters = {
  address?: Address;
  client: Client;
  name?: string;
  nonce?: bigint;
  owner: WebAuthnAccount;
}
  • Description: Represents the return type for creating a Circle Smart Account.
  • Type Definition:
JavaScript
type ToCircleSmartAccountReturnType = Prettify<
  SmartAccount<CircleSmartAccountImplementation>
>
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.